/* ---------- a new learner's first days (onboard.js): the five first things, Nếp's tips, "Nếp là ai" ---------- */

/* the card of five on Hôm nay, under the hello */
.ob-card { margin: 0 0 14px; padding: 14px 14px 6px; background: var(--card, #fff); border-radius: 22px;
  box-shadow: 0 1px 0 var(--line, #E8E4D8), 0 12px 26px -20px rgba(0, 0, 0, .45); border: var(--rim-w, 0) solid var(--rim, transparent);
  animation: ob-rise .42s var(--ease-out, ease) both; }
.ob-head { display: flex; align-items: center; gap: 8px; }
.ob-head b { font-size: 17px; font-weight: 800; color: var(--ink, #1E211D); }
.ob-n { margin-left: auto; padding: 2px 10px; border-radius: 99px; font-size: 14px; font-weight: 800; color: var(--acc-ink, #0F7543); background: var(--acc-soft, #E3F4EA); font-variant-numeric: tabular-nums; }
.ob-bar { position: relative; height: 8px; margin: 10px 0 4px; border-radius: 99px; background: var(--fill, #F1EEE5); overflow: hidden; }
.ob-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--acc, #2DBE70); transition: width .6s var(--ease-out, ease); }
.ob-list { margin: 0; padding: 0; list-style: none; }
.ob-list li + li .ob-row { border-top: 1px solid var(--line, #E8E4D8); }
.ob-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 9px 0; border: 0; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--t-press, 90ms) ease; }
.ob-row:active:not(.done) { transform: scale(.985); }
.ob-row:focus-visible { outline: 3px solid var(--acc, #2DBE70); outline-offset: 2px; border-radius: 12px; }
.ob-row.done { cursor: default; }
.ob-ok { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; font-weight: 800;
  color: var(--ink2, #5C635D); background: var(--fill, #F1EEE5); }
.ob-row.done .ob-ok { color: #fff; background: var(--acc-btn, #14884F); animation: ob-tick .4s var(--ease-out, ease) both; }
.ob-ok svg { width: 18px; height: 18px; }
.ob-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ob-tx b { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ink, #1E211D); }
.ob-tx small { font-size: 14px; line-height: 1.3; color: var(--ink2, #5C635D); }
.ob-row.done .ob-tx b { color: var(--ink2, #5C635D); }
.ob-g { flex: none; display: flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 800; color: var(--honey-ink, #8A5A00); }
.ob-g svg { width: 18px; height: 18px; }
/* all five: said once, then gone */
.ob-fin { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 10px; background: var(--honey-soft, #FFF1CC); animation: ob-pop .5s var(--ease-out, ease) both; }
.ob-fin canvas, .ob-fin img { flex: none; width: 64px; height: 64px; }
.ob-fin b { display: block; font-size: 17px; font-weight: 800; color: var(--ink, #1E211D); }
.ob-fin p { margin: 2px 0 0; font-size: 15px; color: var(--ink2, #5C635D); }
.ob-pulse { animation: ob-pulse .9s ease-in-out 2; }

@keyframes ob-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes ob-pop { from { opacity: 0; transform: scale(.96); } }
@keyframes ob-tick { from { transform: scale(.4); } 60% { transform: scale(1.15); } }
@keyframes ob-pulse { 50% { transform: scale(1.025); } }

/* "Tới đó" on a card of "Nếp là ai": the tips' ring round the thing on its tab, no dimming, a beat of glow, then gone */
.ob-spot { position: fixed; z-index: 55; pointer-events: none; border-radius: 16px; opacity: 0;
  box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 5px var(--acc, #1FA463), 0 0 0 12px rgba(31, 164, 99, .22); animation: ob-spot 2.6s ease-in-out forwards; }
.ob-spot.still { animation: ob-spot-still 2.6s linear forwards; }
@keyframes ob-spot {
  0% { opacity: 0; transform: scale(1.06); } 12% { opacity: 1; transform: none; }
  40% { box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 5px var(--acc, #1FA463), 0 0 0 18px rgba(31, 164, 99, .08); }
  65% { box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 5px var(--acc, #1FA463), 0 0 0 12px rgba(31, 164, 99, .24); }
  85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes ob-spot-still { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* Nếp's tips: the page dims, a ring stays round what he points at, his bubble beside it */
.ob-co { position: fixed; inset: 0; z-index: 190; opacity: 0; transition: opacity .22s ease; -webkit-tap-highlight-color: transparent; }
.ob-co.in { opacity: 1; }
.ob-hole { position: fixed; pointer-events: none; border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 8px rgba(31, 164, 99, .42), 0 0 0 200vmax rgba(20, 17, 10, .5); }
html[data-theme="dark"] .ob-hole { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 8px rgba(76, 214, 140, .45), 0 0 0 200vmax rgba(0, 0, 0, .62); }
.ob-bub { position: fixed; padding: 14px 14px 12px; border-radius: 20px; background: var(--card, #fff); color: var(--ink, #1E211D);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5); transform: translateY(6px) scale(.98); transition: transform .32s var(--ease-out, ease); }
.ob-bub.up { transform: translateY(-6px) scale(.98); }
.ob-co.in .ob-bub { transform: none; }
.ob-tip { position: absolute; top: -7px; width: 14px; height: 14px; margin-left: -7px; background: inherit; border-radius: 3px; transform: rotate(45deg); }
.ob-bub.up .ob-tip { top: auto; bottom: -7px; }
.ob-bub-in { position: relative; display: flex; align-items: center; gap: 10px; }
.ob-bub-in canvas, .ob-bub-in img { flex: none; width: 52px; height: 52px; }
.ob-bub-in p { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.ob-acts { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ob-skip { min-height: 44px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink2, #5C635D); cursor: pointer; }
.ob-dots { display: flex; gap: 5px; margin: 0 auto; }
.ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line, #E8E4D8); }
.ob-dots i.on { background: var(--acc, #2DBE70); }
.ob-acts .ob-ok-btn { margin-left: auto; min-height: 44px; padding: 0 18px; }
.ob-dots + .ob-ok-btn { margin-left: 0; }

/* the row on Tôi */
.ob-me { display: flex; align-items: center; gap: 12px; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; border: 0;
  -webkit-tap-highlight-color: transparent; transition: transform var(--t-press, 90ms) ease; }
.ob-me:active { transform: scale(.985); }
.ob-me canvas, .ob-me img { flex: none; width: 52px; height: 52px; }
.ob-me-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ob-me-tx b { font-size: 17px; font-weight: 800; }
.ob-me-tx small { font-size: 14px; color: var(--ink2, #5C635D); }
.ob-chev { flex: none; width: 20px; height: 20px; color: var(--ink3, #5C625C); }

/* "Nếp là ai" */
.ob-ab { max-width: 680px; margin: 0 auto; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
.ob-ab .bar { margin: 0 -16px 4px; }
.ob-hero { display: flex; align-items: center; gap: 14px; padding: 12px 0 8px; animation: ob-rise .45s var(--ease-out, ease) both; }
.ob-hero canvas, .ob-hero img { flex: none; width: 120px; height: 120px; }
.ob-hero h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -.01em; color: var(--ink, #1E211D); }
.ob-hero p { margin: 2px 0 0; font-size: 17px; font-weight: 700; color: var(--acc-ink, #0F7543); }
.ob-story { margin: 6px 0 22px; padding: 18px 18px 6px; border-radius: var(--r-card, 24px); background: var(--card, #fff); box-shadow: var(--sh-card);
  border-left: 5px solid var(--honey, #EDA328); animation: ob-rise .45s .06s var(--ease-out, ease) both; }
.ob-story h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--ink, #1E211D); }
.ob-story p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: var(--ink, #1E211D); }
.ob-story [lang="ko"] { font-weight: 700; color: var(--honey-ink, #8A5A00); }
.ob-h { margin: 0 0 10px; font-size: 20px; font-weight: 800; color: var(--ink, #1E211D); }
.ob-feats { display: grid; gap: 10px; }
@media (min-width: 720px) { .ob-feats { grid-template-columns: 1fr 1fr; } }
.ob-feat { display: flex; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card, #fff); box-shadow: var(--sh-card); }
.ob-feat-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--fill, #F1EEE5); }
.ob-feat-ic svg { width: 26px; height: 26px; }
.ob-feat-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.ob-feat h3 { margin: 2px 0 4px; font-size: 16px; font-weight: 800; color: var(--ink, #1E211D); }
.ob-feat p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink2, #5C635D); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.ob-chips span { padding: 3px 9px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink2, #5C635D); background: var(--fill, #F1EEE5); }
.ob-try { margin-top: 10px; min-height: 40px; padding: 0 16px; }
.ob-feat-note { margin-top: 8px !important; font-size: 14px !important; color: var(--ink3, #5C625C) !important; }
.ob-replay { width: 100%; margin: 20px 0 10px; }
.ob-foot { margin: 6px 0 0; font-size: 13px; color: var(--ink3, #5C625C); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ob-card, .ob-fin, .ob-hero, .ob-story, .ob-row.done .ob-ok, .ob-pulse { animation: none; }
  .ob-co, .ob-bub, .ob-bar > i { transition: none; }
  .ob-bub, .ob-bub.up { transform: none; }
}
