/* Jenny design system (2026-10-23): bright, rounded, big targets — like the best kids' apps.
   Always light: children's screens stay cheerful; the parents' corner uses the same palette. */
:root {
  --bg: #f3f9ff;
  --bg2: #fff6ec;
  --ink: #253047;
  --muted: #6b7690;
  --brand: #ff7a59;          /* coral: main actions */
  --brand-dark: #e85f3d;
  --brand-ink: #fff;
  --sky: #4ea8ff;            /* focus tasks, links */
  --mint: #2fbf86;           /* relax tasks, correct */
  --sun: #ffc93c;            /* stars, streak */
  --grape: #8b6cff;          /* role-play */
  --soft: #fff0e6;
  --card: #ffffff;
  --line: #e3ecf7;
  --ok: #22a06b;
  --alert: #e5484d;
  --shadow: 0 8px 24px rgba(37, 48, 71, .10);
  --shadow-press: 0 3px 0 rgba(37, 48, 71, .14);
  --radius: 22px;
  --font-head: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) fixed; color: var(--ink);
  font: 600 18px/1.45 var(--font-body);
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
h1, h2, h3, .huge, .primary, .ask, .card-word, .hint, .say-word, .flash-word, .gate-q, .code, .phrase .en {
  font-family: var(--font-head); letter-spacing: .2px;
}
button { font: inherit; cursor: pointer; border: 0; border-radius: 16px; touch-action: manipulation;
  transition: transform .08s ease, box-shadow .08s ease, background .15s; }
button:active { transform: translateY(2px) scale(.98); }
input, select, textarea { font: inherit; font-weight: 600; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
                background: var(--card); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); }
[hidden] { display: none !important; }

.screen { display: none; min-height: 100dvh; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.screen.active { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.primary { background: var(--brand); color: var(--brand-ink); padding: 14px 24px; font-weight: 800; box-shadow: 0 5px 0 var(--brand-dark); }
.primary:active { box-shadow: 0 2px 0 var(--brand-dark); }
.primary.huge { font-size: 28px; padding: 22px 40px; border-radius: 28px; margin-top: 8px; }
.primary:disabled { opacity: .5; }
.ghost { background: var(--card); color: var(--ink); padding: 10px 16px; border: 2px solid var(--line); box-shadow: var(--shadow-press); }
.link { background: none; color: var(--muted); text-decoration: underline; padding: 8px; }
.error { color: var(--alert); font-weight: 600; text-align: center; max-width: 560px; }
.error.floating { position: fixed; left: 16px; right: 16px; bottom: 120px; background: var(--card);
                  padding: 12px; border-radius: 12px; box-shadow: var(--shadow); }
.small { color: var(--muted); font-size: 15px; }
h1 { font-size: 40px; margin: 8px 0 0; }
h2 { margin: 8px 0; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 20px; }

/* ---- Jenny's face ---- */
.hero { text-align: center; margin-top: 4vh; }
.jenny-face { position: relative; width: 120px; height: 120px; border-radius: 50%; margin: 0 auto;
  background: radial-gradient(circle at 35% 30%, #ffd1b8, var(--brand)); box-shadow: var(--shadow); }
.jenny-face.big { width: 150px; height: 150px; }
.jenny-face .eye { position: absolute; top: 38%; width: 12%; height: 14%; background: #2b2233; border-radius: 50%; }
.jenny-face .eye:first-child { left: 30%; } .jenny-face .eye:nth-child(2) { right: 30%; }
.jenny-face .mouth { position: absolute; left: 32%; right: 32%; top: 60%; height: 12%;
  border-bottom: 5px solid #2b2233; border-radius: 0 0 50% 50%; transition: height .12s; }
.jenny.speaking .jenny-face .mouth { animation: talk .28s infinite alternate; background: #2b2233;
  border-radius: 40%; height: 14%; }
.jenny.speaking .jenny-face { animation: bob 1.2s ease-in-out infinite; }
@keyframes talk { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ---- Start ---- */
.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 640px; }
.person { background: var(--card); border: 3px solid var(--line); color: var(--ink); padding: 14px 20px;
  border-radius: 20px; font-size: 22px; min-width: 120px; }
.person.on { border-color: var(--brand); background: var(--soft); font-weight: 700; }
.person.learner { cursor: default; }
.person .x { margin-left: 8px; color: var(--muted); font-size: 16px; }
.add-person { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.override { text-align: center; background: var(--soft); padding: 12px 16px; border-radius: 16px; }

/* ---- Settings ---- */
#settings label { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 6px; }
#settings label.row { flex-direction: row; align-items: center; }
#settings label.row input { width: auto; }
.row-buttons { display: flex; gap: 12px; }

/* ---- Talk ---- */
#talk.screen.active { padding: 0; gap: 0; height: 100dvh; }
.topbar { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--card); }
.chip { background: var(--soft); padding: 4px 12px; border-radius: 99px; font-size: 15px; }
.mic { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.mic-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); opacity: .25; transition: opacity .1s, transform .1s; }
.mic.off .mic-dot { background: var(--alert); opacity: 1; }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.end { background: var(--soft); color: var(--ink); padding: 8px 14px; font-size: 16px; }

.stage { flex: 1; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 20px; padding: 16px; overflow-y: auto; }
.jenny { text-align: center; flex: 0 1 320px; }
.subtitle { min-height: 2.8em; font-size: 22px; margin: 14px 0 0; }
.subtitle:empty { visibility: hidden; }
.card { background: var(--card); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); text-align: center;
  flex: 0 1 340px; animation: pop .25s ease-out; }
.card img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 18px; }
.card img:not([src]), .card img[src=""] { display: none; }
.card.wordonly { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.card-word { font-size: 44px; font-weight: 800; margin-top: 8px; }
.card-vi { color: var(--muted); font-size: 20px; }
.hint { font-size: 54px; font-weight: 800; color: var(--brand); flex-basis: 100%; text-align: center; animation: pop .25s; }
.check { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.check button { background: var(--card); border: 3px solid var(--brand); color: var(--ink); font-size: 26px;
  padding: 16px 28px; border-radius: 22px; box-shadow: var(--shadow); }
.check button.picked { background: var(--brand); color: var(--brand-ink); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

.tip { position: fixed; right: 16px; top: 72px; max-width: 300px; background: var(--card); border-left: 5px solid var(--brand);
  padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); font-size: 15px; z-index: 5; }
.tip p { margin: 4px 0; }
.bottombar { width: 100%; display: flex; justify-content: center; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.ask { background: #5b8cff; color: #fff; font-size: 26px; font-weight: 700; padding: 18px 44px; border-radius: 99px; box-shadow: var(--shadow); }
.ask.armed { background: #2f5fd6; transform: scale(.97); }

/* ---- Summary ---- */
#summary .sum-words { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 900px; }
.word { background: var(--card); border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow); min-width: 180px; max-width: 280px; }
.word b { font-size: 28px; display: block; }
.word .vi { color: var(--muted); }
.word .ex { font-style: italic; margin-top: 6px; font-size: 16px; }
.sum-block { background: var(--card); border-radius: 16px; padding: 12px 16px; max-width: 640px; width: 100%; box-shadow: var(--shadow); }
.sum-block .wrong { text-decoration: line-through; color: var(--muted); }
.sum-block .right { color: var(--ok); font-weight: 700; }
.game { background: var(--card); border-radius: 16px; padding: 12px 16px; max-width: 640px; width: 100%; margin: 8px 0; box-shadow: var(--shadow); }
.game form { display: flex; gap: 8px; margin-top: 8px; }
.game .fb { margin-top: 6px; font-weight: 600; }
.tiles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tiles span { background: var(--soft); padding: 4px 10px; border-radius: 8px; }
.sum-alerts { background: #fde8ea; color: #7a0d18; border: 2px solid var(--alert); border-radius: 16px; padding: 12px 16px; max-width: 640px; width: 100%; }

/* ---- Parent alert ---- */
.alert { position: fixed; inset: 0; background: rgba(120, 0, 20, .55); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 16px; }
.alert-box { background: #fff; color: #2b2233; border: 6px solid var(--alert); border-radius: 24px; padding: 24px;
  max-width: 560px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.4); animation: pop .2s; }
.alert-box h2 { color: var(--alert); font-size: 32px; }
.alert-text { font-size: 22px; font-weight: 600; }

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  .primary.huge { font-size: 24px; padding: 18px 28px; }
  .card-word { font-size: 36px; }
  .hint { font-size: 40px; }
  .ask { font-size: 22px; padding: 16px 32px; }
  .topbar { gap: 8px; } #mic-label { display: none; }
  .tip { left: 16px; right: 16px; max-width: none; }
}

/* ---- Parents rate Jenny ---- */
.rate { display: flex; flex-direction: column; gap: 10px; }
.stars { display: flex; gap: 6px; }
.stars button { background: none; font-size: 36px; padding: 0 2px; color: var(--line); line-height: 1; }
.stars button.on { color: #f5a623; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags button { background: var(--soft); color: var(--ink); padding: 6px 12px; font-size: 15px; border: 2px solid transparent; }
.tags button.on { border-color: var(--brand); font-weight: 700; }
.rate textarea { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); width: 100%; resize: vertical; }

/* ---- Avatar (teacher Jenny) ---- */
.avatar { width: 190px; height: 190px; margin: 0 auto; }
.avatar.big { width: 210px; height: 210px; }
.avatar-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 14px rgba(80, 40, 20, .18)); }
.avatar-svg .m { display: none; }
.avatar-svg[data-mouth="X"] .m-X, .avatar-svg[data-mouth="M"] .m-M, .avatar-svg[data-mouth="A"] .m-A,
.avatar-svg[data-mouth="E"] .m-E, .avatar-svg[data-mouth="O"] .m-O, .avatar-svg[data-mouth="U"] .m-U,
.avatar-svg[data-mouth="F"] .m-F, .avatar-svg[data-mouth="L"] .m-L, .avatar-svg[data-mouth="S"] .m-S { display: inline; }
.av-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.av-eye + .av-eye { animation-delay: .02s; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }
.av-head { transform-box: view-box; transform-origin: 100px 170px; transition: transform .35s ease; }
.jenny.listening .av-head { transform: rotate(-5deg); }
.jenny.listening .av-brows { transform: translateY(-2px); }
.jenny.speaking .avatar { animation: bob 1.4s ease-in-out infinite; }
.hero .avatar { animation: bob 3s ease-in-out infinite; }

/* ---- Picture card: emoji now, drawing when ready ---- */
.card-emoji { font-size: 120px; line-height: 1.1; }
.card.has-pic .card-emoji { display: none; }
.card:not(.has-pic) img { display: none; }

/* ---- "Con nói thử" ---- */
.phrase { flex-basis: 100%; max-width: 640px; background: var(--card); border: 3px dashed #5b8cff; border-radius: 22px;
  padding: 14px 18px; text-align: center; box-shadow: var(--shadow); animation: pop .25s; }
.phrase .label { color: #5b8cff; font-weight: 700; font-size: 16px; }
.phrase .en { font-size: 32px; font-weight: 800; margin: 4px 0; }
.phrase .vi { color: var(--muted); font-size: 18px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.word .pic { width: 84px; height: 84px; object-fit: contain; display: block; margin-bottom: 4px; }
.word .emo { font-size: 56px; line-height: 1; display: block; }
@media (max-width: 600px) { .avatar { width: 150px; height: 150px; } .phrase .en { font-size: 26px; } .card-emoji { font-size: 96px; } }

/* ---- Parents coach Jenny ---- */
#settings textarea, .coach textarea, .coach input { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); width: 100%; }
.coach summary { cursor: pointer; font-weight: 700; }
.cline { border-top: 1px solid var(--line); padding: 8px 0; }
.cline .who { color: var(--muted); font-size: 14px; }
.cline .jl { margin: 2px 0 6px; }
.cline button { background: var(--soft); color: var(--ink); padding: 4px 12px; font-size: 15px; }
.cline .edit { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cline .saved { color: var(--ok); font-weight: 600; }
.taught { display: flex; gap: 8px; align-items: start; padding: 4px 0; border-top: 1px solid var(--line); }
.taught button { background: none; color: var(--alert); padding: 0 6px; }

/* ---- Families, children ---- */
.form { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form .two { display: flex; gap: 12px; } .form .two label { flex: 1; }
.skills { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.skills legend { color: var(--muted); padding: 0 6px; }
.skill-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.skill-row .opts { display: flex; gap: 6px; }
.skill-row button { background: var(--soft); color: var(--ink); padding: 6px 10px; font-size: 15px; border: 2px solid transparent; }
.skill-row button.on { border-color: var(--brand); font-weight: 700; }
.kids { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.kids button { background: var(--card); border: 2px solid var(--line); color: var(--ink); padding: 6px 14px; border-radius: 99px; }
.kids button.on { border-color: var(--brand); background: var(--soft); font-weight: 700; }
.set-block { width: 100%; max-width: 480px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; }
.kid-row, .fam-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
.kid-row button, .fam-row button { background: var(--soft); color: var(--ink); padding: 4px 10px; font-size: 14px; }
.fam-row.off { opacity: .5; }
.invite-form { display: flex; gap: 6px; flex-wrap: wrap; } .invite-form input:first-child { flex: 1 1 180px; } .invite-form input[type=number] { width: 80px; }
.invite-out { background: var(--soft); border-radius: 12px; padding: 10px; white-space: pre-wrap; font-size: 15px; }
.code { font-size: 26px; font-weight: 800; letter-spacing: 3px; }

/* ---- Warm-up flashcards ---- */
.flash { width: 100%; max-width: 360px; min-height: 260px; background: var(--card); border-radius: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 16px; }
.flash-pic { font-size: 110px; line-height: 1; } .flash-pic img { width: 180px; height: 180px; object-fit: contain; }
.flash-word { font-size: 40px; font-weight: 800; } .flash-vi { color: var(--muted); font-size: 20px; }
.choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.choices button { background: var(--card); border: 3px solid var(--line); border-radius: 20px; padding: 8px; width: 110px; height: 110px;
  font-size: 64px; display: flex; align-items: center; justify-content: center; }
.choices button img { width: 90px; height: 90px; object-fit: contain; }
.choices button.ok { border-color: var(--ok); } .choices button.bad { border-color: var(--alert); opacity: .6; }

/* ---- Practice ---- */
.ex-head { width: 100%; max-width: 720px; display: flex; align-items: center; gap: 10px; }
.ex-steps { flex: 1; display: flex; gap: 6px; }
.ex-steps span { flex: 1; height: 34px; border-radius: 99px; background: var(--line); cursor: pointer;
  border: solid transparent; border-width: 10px 0; background-clip: padding-box; margin: -10px 0; }   /* bigger tap area */
.ex-steps span.focus.done { background-color: var(--sky); } .ex-steps span.relax.done { background-color: var(--mint); }
.ex-steps span.now { background-color: var(--brand); }
.ex-stars { font-weight: 700; }
.avatar.small { width: 110px; height: 110px; }
.ex-body { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ex-feedback { font-weight: 700; min-height: 1.4em; text-align: center; }
.mood { font-size: 14px; padding: 2px 10px; border-radius: 99px; margin-left: 8px; vertical-align: middle; }
.mood.focus { background: #dfe8ff; color: #2f4fb8; } .mood.relax { background: #d8f3e6; color: #1f7a50; }
.slots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 54px; }
.slots span { min-width: 44px; height: 54px; border-bottom: 4px solid var(--brand); font-size: 32px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.pieces { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pieces button { background: var(--soft); color: var(--ink); font-size: 26px; font-weight: 700; padding: 10px 16px; border-radius: 14px; min-width: 52px; }
.pieces button:disabled { opacity: .25; }
.spell-q { font-size: 64px; line-height: 1; } .spell-vi { color: var(--muted); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 520px; }
.match button { background: var(--card); border: 3px solid var(--line); border-radius: 18px; min-height: 84px; font-size: 24px; font-weight: 700; color: var(--ink); }
.match button.pic { font-size: 54px; } .match button img { width: 70px; height: 70px; object-fit: contain; }
.match button.sel { border-color: var(--brand); } .match button.ok { border-color: var(--ok); background: #e6f7ee; color: #1f5c3c; }
.match button.bad { border-color: var(--alert); }
.say-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.say-word { font-size: 38px; font-weight: 800; } .say-words span { font-size: 24px; margin: 0 3px; }
.say-words .ok { color: var(--ok); } .say-words .miss { color: var(--alert); text-decoration: underline; }
.rec { background: #ff5b6e; color: #fff; font-size: 22px; font-weight: 700; padding: 14px 26px; border-radius: 99px; }
.rec.on { animation: pulse 1s infinite; } @keyframes pulse { 50% { transform: scale(1.06); } }
.cw { display: grid; gap: 3px; } .cw input { width: 38px; height: 38px; text-align: center; font-size: 22px; font-weight: 800; text-transform: lowercase;
  border-radius: 6px; border: 2px solid var(--line); padding: 0; background: var(--card); color: var(--ink); }
.cw .blank { width: 38px; height: 38px; } .cw .cell { position: relative; } .cw .num { position: absolute; font-size: 10px; left: 3px; top: 1px; color: var(--muted); }
.cw input.ok { border-color: var(--ok); background: #e6f7ee; color: #1f5c3c; } .cw input.bad { border-color: var(--alert); }
.clues { display: flex; flex-direction: column; gap: 4px; font-size: 18px; }
.story-s { font-size: 24px; line-height: 1.6; max-width: 640px; text-align: center; } .story-s .w.on { background: #ffe7a8; border-radius: 6px; }
.pl-sets { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.pl-set { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; }
.pl-set .bar { flex: 1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; } .pl-set .bar i { display: block; height: 100%; background: var(--ok); }
.badge { background: var(--alert); color: #fff; border-radius: 99px; padding: 0 8px; font-size: 14px; margin-left: 4px; }
.kind { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.days { display: flex; gap: 6px; flex-wrap: wrap; } .days button { background: var(--soft); color: var(--ink); padding: 6px 10px; border: 2px solid transparent; }
.days button.on { border-color: var(--brand); font-weight: 700; }
.gate-q { font-size: 34px; font-weight: 800; }
.rp-summary { max-width: 640px; } .rp-summary li { margin: 6px 0; }
.rp-chart { width: 100%; max-width: 640px; }
.pic-vi { font-size: 20px; font-weight: 700; line-height: 1.2; padding: 4px; }

/* ================= 2026-10-23 redesign: kid home, cards, tab bar ================= */
.home { gap: 14px !important; padding-bottom: 110px !important; }
.home-head { width: 100%; max-width: 640px; display: flex; align-items: center; gap: 12px; }
.avatar.mini { width: 72px; height: 72px; margin: 0; flex: none; }
.hello { flex: 1; }
.hello-hi { font-family: var(--font-head); font-size: 26px; font-weight: 800; line-height: 1.1; }
.chips { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.chip-stat { background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 2px 10px; font-weight: 800; font-size: 15px; }
.icon-btn { background: var(--card); border: 2px solid var(--line); width: 48px; height: 48px; border-radius: 50%; font-size: 22px; flex: none; }
.card-box { width: 100%; max-width: 640px; background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); }
.box-title { font-family: var(--font-head); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
.plan-steps { display: flex; gap: 8px; }
.plan-step { flex: 1; background: var(--bg); border-radius: 16px; padding: 10px 8px; text-align: center; font-weight: 800; font-size: 15px; }
.plan-step .dot { display: block; margin: 0 auto 4px; width: 30px; height: 30px; border-radius: 50%; background: var(--line);
  color: var(--muted); line-height: 30px; font-family: var(--font-head); }
.plan-step.done { background: #e7f8f0; color: var(--ok); } .plan-step.done .dot { background: var(--mint); color: #fff; }
.plan-step.done .dot::after { content: "✓"; } .plan-step.done .dot { font-size: 0; } .plan-step.done .dot::after { font-size: 18px; }
.topics { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.topic-card { flex: 0 0 120px; scroll-snap-align: start; background: var(--bg); border: 3px solid transparent; border-radius: 20px;
  padding: 10px 8px; text-align: center; color: var(--ink); }
.topic-card .te { font-size: 42px; line-height: 1.1; display: block; }
.topic-card .tv { font-weight: 800; font-size: 15px; display: block; } .topic-card .tn { color: var(--muted); font-size: 12px; display: block; }
.topic-card.on { border-color: var(--brand); background: #fff3ee; }
.modes { display: flex; gap: 8px; margin-top: 6px; }
.mode { flex: 1; background: var(--bg); color: var(--ink); padding: 10px 6px; font-weight: 800; font-size: 15px; border: 3px solid transparent; }
.mode.on { border-color: var(--sky); background: #eaf4ff; }
.who summary { cursor: pointer; list-style: none; } .who summary::-webkit-details-marker { display: none; }
.who .people { margin-top: 8px; } .who .add-person { margin-top: 8px; max-width: none; }
.start-big { width: 100%; max-width: 640px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--card);
  border-top: 2px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
.tab { background: none; flex: 1; max-width: 140px; font-size: 24px; display: flex; flex-direction: column; align-items: center; color: var(--muted); position: relative; }
.tab span { font-size: 12px; font-weight: 800; } .tab.on { color: var(--brand); }
.tab .badge { position: absolute; top: 0; right: 22%; font-style: normal; font-size: 12px; }
.aw-stats { display: flex; gap: 10px; width: 100%; max-width: 640px; }
.aw-stats div { flex: 1; background: var(--card); border-radius: var(--radius); padding: 12px; text-align: center; box-shadow: var(--shadow); }
.aw-stats b { display: block; font-family: var(--font-head); font-size: 34px; } .aw-stats span { color: var(--muted); font-size: 14px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; width: 100%; max-width: 640px; }
.badge-card { background: var(--card); border-radius: var(--radius); padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.badge-card .be { font-size: 44px; display: block; } .badge-card.locked { opacity: .45; filter: grayscale(1); }
.topic.chip { background: #eaf4ff; }
.scene { width: 100%; max-width: 520px; background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); text-align: center; flex-basis: 100%; }
.scene img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 16px; } .scene img:not([src]) { display: none; }
.scene-emoji { font-size: 90px; } .scene img[src] + .scene-emoji { display: none; }
.bottombar { gap: 10px; flex-wrap: wrap; align-items: center; }
.hint-btn { background: var(--sun); color: var(--ink); font-size: 20px; font-weight: 800; padding: 16px 20px; border-radius: 99px; box-shadow: 0 4px 0 #d9a520; }
.hints { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.hints div { background: #fff8db; border: 2px dashed var(--sun); border-radius: 16px; padding: 8px 16px; font-size: 22px; font-weight: 800; }
.ask { box-shadow: 0 5px 0 #2f6fd6; background: var(--sky) !important; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
@media (max-width: 600px) { .hello-hi { font-size: 22px; } .topic-card { flex-basis: 104px; } .mode { font-size: 13px; } }
.pieces button.sel { background: var(--sky); color: #fff; }
.say-card.ok-row .story-s { color: var(--ok); } .say-card.bad-row .story-s { color: var(--alert); }
.say-card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); width: 100%; max-width: 560px; }

/* ================= 2026-10-24 free trial + feedback ================= */
#join .hero { margin-bottom: 4px; }
.trial { gap: 4px; }
.trial + .trial-form { margin-top: -6px; }
#trial[hidden] + .trial-form { display: none; }
.consent { align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.or { text-align: center; margin: 4px 0; }
.join-details { width: 100%; max-width: 520px; }
.join-details summary { cursor: pointer; font-weight: 800; color: var(--sky); text-align: center; padding: 8px; }
.link-btn { background: none; color: var(--sky); font-weight: 800; text-decoration: underline; padding: 6px; box-shadow: none; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { background: var(--bg); color: var(--ink); border: 3px solid transparent; padding: 10px 16px; font-weight: 800; box-shadow: none; }
.chip-btn.on { border-color: var(--sky); background: #eaf4ff; }
.thanks { font-size: 20px; font-weight: 800; text-align: center; }
.fb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.fb-row { background: var(--bg); border-radius: 14px; padding: 8px 12px; }
.fb-row p { margin: 4px 0 0; white-space: pre-wrap; }
#feedback .stars .star { font-size: 36px; background: none; color: var(--line); box-shadow: none; padding: 2px 6px; }
#feedback .stars .star.on { color: var(--sun); }

/* ================= 2026-10-24 minutes of learning ================= */
.wl-head { text-align: center; }
.wl-total { font-family: var(--font-head); font-size: 44px; font-weight: 800; color: var(--brand); }
.wl-bar { display: flex; height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.wl-bar .plan { background: var(--sky); } .wl-bar .topup { background: var(--mint); }
.wl-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-weight: 600; }
.wl-item:last-child { border-bottom: 0; }
.wl-item button { flex: none; font-size: 14px; padding: 8px 12px; }
.wl-item button:disabled { opacity: .6; }
.wl-safe { background: #eefaf4; border-radius: 14px; padding: 10px 12px; color: var(--ok); }
.wl-h { padding: 4px 0; font-size: 14px; }
.chip-min { font-family: inherit; color: var(--ink); box-shadow: none; cursor: pointer; }

.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 640px; }
.tier-card { background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border: 3px solid transparent; }
.tier-card.on { border-color: var(--brand); }
.tier-card ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.tier-card.premium b { color: var(--grape); } .tier-card.basic b { color: var(--ok); }
@media (max-width: 600px) { .tiers { grid-template-columns: 1fr; } }
.wl-warn, .minutes-warn { width: 100%; max-width: 640px; background: #fff4e0; color: #9a5b00; border-radius: 14px;
  padding: 10px 12px; font-weight: 700; margin: 0; }
.chip-min.low { background: #fff4e0; border-color: var(--sun); }
.chip-min.empty { background: #ffe8e4; border-color: var(--brand); }

#timer.low { color: var(--brand); font-weight: 800; }
