/* H2edu English: flashcards, sticker charts, Miss Ivy.
   Builds on app.css tokens. English words are set in chalk-blue ink, the one colour this module adds. */
:root {
  --chalk: #1D4F91;        /* English words, Miss Ivy */
  --chalk-2: #E8F0FB;
  --crayon: #B53116;
  --ok: #186E3F;
  --ok-2: #E6F4EC;
  --no: #A82810;
  --star: #F5A623;
  --card-edge: #1C1715;
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* 30/09/2026 refresh: soft layered depth instead of hard black offsets; a tactile "lip" under things a child taps */
  --edge: rgba(28, 23, 21, .09);
  --lift: 0 1px 2px rgba(28, 23, 21, .05), 0 10px 30px -12px rgba(28, 23, 21, .22);
  --lift-lg: 0 2px 4px rgba(28, 23, 21, .04), 0 24px 60px -24px rgba(29, 79, 145, .32);
  --lip: #E6DED2;
}

[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[lang="en"] { font-family: var(--display); }
.en-word { color: var(--chalk); font: 800 clamp(34px, 9vw, 64px)/1.1 var(--display); letter-spacing: -0.02em; }
/* Chinese lesson text (YCT 1): Noto Sans SC so every device draws Simplified Chinese glyph forms, not Japanese ones;
   pinyin sits above the Han text as ruby, in the ink of the help text. */
[lang="zh-CN"], .en-word[lang="zh-CN"] { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.en-word[lang="zh-CN"] { font-weight: 700; }
[lang="zh-CN"] ruby { ruby-position: over; }
[lang="zh-CN"] rt { font-size: .4em; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; padding-bottom: .15em; }
.opt.text [lang="zh-CN"] { font-size: 1.5em; line-height: 1.2; }

/* ---------- in-app browser + mic notices ---------- */
.en-notice { display: flex; gap: 12px; align-items: flex-start; background: #FFF6E5; border: 1px solid #F3D29A;
  color: #6B4A00; border-radius: 14px; padding: 12px 14px; margin: 14px 0; font-size: 14px; }
.en-notice b { color: #4A3300; }
.en-notice .btn { min-height: 38px; padding: 6px 14px; font-size: 13.5px; flex: none; }

/* ---------- kid header ---------- */
.kidbar { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 22px 0 8px; }
.kid-ava { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(145deg, #2D6BC0, var(--chalk)); color: #fff; display: grid;
  place-items: center; font: 800 30px/1.1 var(--display); transform: rotate(-4deg); box-shadow: 0 10px 22px -8px rgba(29, 79, 145, .55); }
.kidbar h1 { font: 800 clamp(24px, 5vw, 34px)/1.15 var(--display); margin: 0 0 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13.5px; }
.pill.hot { background: #FFF1E6; border-color: #F8C9A5; color: #9A3C00; }
.pill.gold { background: var(--sun-light); border-color: #F3D29A; color: #7A4E00; }

/* ---------- today card (primary action) ---------- */
.today { display: grid; gap: 16px; background: linear-gradient(135deg, #fff 55%, var(--chalk-2)); border: 1px solid var(--edge); border-radius: 24px;
  padding: 20px; box-shadow: var(--lift-lg); margin: 16px 0 26px; }
@media (min-width: 760px) { .today { grid-template-columns: 1fr auto; align-items: center; padding: 24px 28px; } }
.today h2 { font: 800 22px/1.25 var(--display); margin: 0 0 4px; }
.today p { margin: 0; color: var(--ink-2); }
.today .btn { min-height: 56px; font-size: 17px; padding: 12px 28px; }

/* ---------- section heads ---------- */
.sec { margin: 34px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec h2 { font: 800 clamp(21px, 4vw, 26px)/1.25 var(--display); margin: 0; }
.sec .muted { margin: 0; }

/* ---------- homework list ---------- */
.hw { display: grid; gap: 10px; }
.hw a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-decoration: none;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.hw a:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.hw .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--chalk-2); }
.hw b { display: block; font-size: 15px; }
.hw small { color: var(--ink-2); }
.hw .done-tag { font-weight: 800; font-size: 13px; color: var(--ok); }
.hw .due-tag { font-weight: 700; font-size: 12.5px; color: var(--no); white-space: nowrap; }

/* ---------- level switch ---------- */
.levels { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- unit cards with sticker slots (signature) ---------- */
.units { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.unit-card { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: 22px; padding: 18px 16px 14px; overflow: hidden;
  box-shadow: var(--lift); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.unit-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--uc, var(--chalk)); }
.unit-card:hover { transform: translateY(-3px); box-shadow: var(--lift-lg); color: var(--ink); }
.unit-card:active { transform: translateY(1px); }
.unit-card .top { display: flex; gap: 12px; align-items: center; }
.unit-card .pic { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 30px;
  background: color-mix(in srgb, var(--uc, #2563EB) 14%, white); border: 1.5px solid color-mix(in srgb, var(--uc, #2563EB) 40%, white); }
.unit-card .n { font: 700 12.5px/1.35 var(--body); color: var(--ink-2); }
.unit-card h3 { font: 800 19px/1.2 var(--display); margin: 3px 0 0; }
.unit-card .vi { font-size: 13.5px; color: var(--ink-2); }
.unit-card .can { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.45; }
.unit-card .ribbon { position: absolute; top: 12px; right: 12px; background: var(--crayon); color: #fff; font: 800 12px/1.35 var(--body);
  padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 10px -4px rgba(181, 49, 22, .6); }
.unit-card.locked { opacity: .78; }

.stickers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.stk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1.35;
  border: 1.5px dashed #CFC5B6; background: var(--paper); filter: grayscale(1); opacity: .55; }
.stk.on { border: 2px solid #E9B949; background: #FFF3C9; filter: none; opacity: 1; transform: rotate(-8deg);
  box-shadow: 0 3px 0 #E9C46A; }
.stk.on.gold { background: #FFD66B; }
.stk.big { width: 44px; height: 44px; font-size: 21px; cursor: pointer; }
button.stk { padding: 0; font-family: inherit; }
button.stk:focus-visible { outline-offset: 3px; }
.stk.cur { border-style: solid; border-color: var(--chalk); opacity: 1; filter: none; box-shadow: 0 0 0 3px var(--chalk-2); }

/* ---------- review strip ---------- */
.review { display: flex; gap: 14px; align-items: center; background: var(--chalk-2); border-radius: 18px; padding: 14px 16px; flex-wrap: wrap; }
.review .faces { display: flex; gap: 4px; font-size: 26px; flex-wrap: wrap; }
.review .grow { flex: 1 1 220px; }
.review b { display: block; font-size: 15.5px; }

/* ---------- learning path: a level is a course, a Unit a stage ---------- */
.courses { display: grid; gap: 12px; }
.course summary { cursor: pointer; list-style: none; }
.course summary::-webkit-details-marker { display: none; }
.course .stage { margin-top: 16px; }
.course .stage h3 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 0 0 8px; font-size: 16px; }

/* ---------- class board: shared goal first, names second ---------- */
.board2 { display: grid; gap: 16px; }
@media (min-width: 820px) { .board2 { grid-template-columns: 1.1fr .9fr; } }
.goal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.goal .meter { height: 14px; margin: 10px 0 6px; }
.goal .meter i { background: linear-gradient(90deg, var(--star), #F28C28); }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--paper); }
.board-list li.me { background: var(--chalk-2); font-weight: 700; }

/* ---------- landing (no token) ---------- */
.en-hero { display: grid; gap: 28px; padding: 36px 0 12px; align-items: center; }
@media (min-width: 900px) { .en-hero { grid-template-columns: 1.15fr .85fr; padding-top: 52px; } }
.en-hero h1 { font: 800 clamp(32px, 5.6vw, 52px)/1.12 var(--display); margin: 0 0 14px; letter-spacing: -0.02em; }
.en-hero h1 span { color: var(--chalk); }
.en-hero .hero-lead { color: var(--ink-2); font-size: 16.5px; max-width: 58ch; margin: 0 0 20px; }
.demo-card { position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: 28px;
  box-shadow: var(--lift-lg); padding: 26px 22px 20px; text-align: center; transform: rotate(1.5deg); }
.demo-card .tape { position: absolute; top: -14px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(245, 166, 35, .55); border-radius: 3px; }
.demo-card .pic { font-size: 96px; line-height: 1.1; }
.demo-card .vi { color: var(--ink-2); margin: 6px 0 14px; }
.demo-card .demo-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.demo-card .demo-heard { min-height: 24px; margin-top: 10px; font-weight: 700; }

.flow { display: grid; gap: 0; counter-reset: f; border-left: 3px solid var(--line); margin-left: 12px; }
.flow li { list-style: none; position: relative; padding: 0 0 22px 26px; }
.flow li::before { counter-increment: f; content: counter(f); position: absolute; left: -17px; top: 0; width: 30px; height: 30px;
  border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 14px/1.35 var(--display); }
.flow b { display: block; font: 800 18px/1.35 var(--display); margin-bottom: 2px; }
.flow p { margin: 0; color: var(--ink-2); max-width: 66ch; }
.flow .who { font-size: 12.5px; font-weight: 700; color: var(--chalk); text-transform: uppercase; letter-spacing: .04em; }

.saves { display: grid; gap: 12px; }
@media (min-width: 760px) { .saves { grid-template-columns: 1.3fr 1fr 1fr; } }
.save { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.save:first-child { background: var(--ink); color: #fff; border-color: var(--ink); }
.save:first-child p { color: #D9D1C7; }
.save b { display: block; font: 800 30px/1.15 var(--display); margin-bottom: 6px; }
.save p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- unit page ---------- */
.unit-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 14px 0 12px; }
.unit-head .pic { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; font-size: 36px;
  background: linear-gradient(150deg, #fff, color-mix(in srgb, var(--uc, #2563EB) 22%, white)); border: 1px solid color-mix(in srgb, var(--uc, #2563EB) 30%, white);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--uc, #2563EB) 70%, transparent); transform: rotate(-3deg); }
.unit-head h1 { font: 800 clamp(26px, 5.4vw, 38px)/1.12 var(--display); margin: 0; letter-spacing: -0.02em; }
.unit-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.u-chip { display: inline-block; font: 700 12px/1.35 var(--body); padding: 4px 9px; border-radius: 999px; margin: 0 6px 4px 0;
  background: color-mix(in srgb, var(--uc, #2563EB) 12%, white); color: color-mix(in srgb, var(--uc, #2563EB) 80%, black); }
.u-vi { font-weight: 600; }
.u-can { display: inline-block; margin-top: 2px; }
.acts-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.acts-nav .lbl { font-size: 13px; color: var(--ink-2); margin-right: 4px; }

.stage { position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: 30px; box-shadow: var(--lift-lg);
  padding: 22px 14px 18px; min-height: 480px; display: flex; flex-direction: column; overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: linear-gradient(90deg, var(--uc, var(--chalk)), color-mix(in srgb, var(--uc, var(--chalk)) 45%, #F5A623)); }
@media (min-width: 760px) { .stage { padding: 28px 34px 24px; } }
.stage-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.stage-top h2 { flex: 1 1 auto; min-width: 12ch; }
.dots { flex-wrap: wrap; }
.stage-top h2 { font: 800 21px/1.25 var(--display); margin: 0; display: flex; gap: 10px; align-items: center; }
.act-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; flex: none;
  background: color-mix(in srgb, var(--uc, #2563EB) 12%, white); }
.stage-tools { display: flex; gap: 10px; align-items: center; }
.stage-top .mins { font: 700 12.5px/1.35 var(--body); color: var(--ink-2); background: var(--paper); padding: 6px 10px; border-radius: 999px; }
.quit { width: 42px; min-width: 42px; padding: 0; border-radius: 50%; }
.dots { display: flex; gap: 4px; }
.dots i { width: 14px; height: 7px; border-radius: 4px; background: var(--line); transition: background .2s, width .2s; }
.dots i.ok { background: var(--ok); }
.dots i.bad { background: var(--star); }
.dots i.cur { background: var(--uc, var(--chalk)); width: 24px; }
.stage-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.say-btn { border: 0; background: linear-gradient(160deg, #2D6BC0, var(--chalk)); color: #fff; width: 80px; height: 80px; border-radius: 50%; font-size: 30px; cursor: pointer;
  box-shadow: 0 6px 0 #10325E, 0 14px 24px -10px rgba(29, 79, 145, .6); transition: transform .1s; }
.say-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #10325E; }
.say-btn.sm { width: 54px; height: 54px; font-size: 22px; box-shadow: 0 4px 0 #10325E; }
.say-btn.xs { width: 36px; height: 36px; font-size: 15px; box-shadow: 0 3px 0 #10325E; vertical-align: middle; margin-left: 4px; }
.flash { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(100%, 440px); background: #fff; font: inherit; color: inherit;
  border: 1px solid var(--edge); border-radius: 28px; box-shadow: var(--lift), 0 6px 0 var(--lip); padding: 12px 12px 18px; cursor: pointer; }
button.flash:active { transform: translateY(3px); box-shadow: var(--lift), 0 3px 0 var(--lip); }
.flash .vi { color: var(--ink-2); font-size: 15px; margin: 0; }
.flash.sent .en-word { font-size: clamp(26px, 6vw, 40px); line-height: 1.15; }
.flash .en-word { padding: 0 6px; }

.opts { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 520px); }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt { border: 2px solid transparent; background: #fff; border-radius: 22px; min-height: 96px; font-size: 54px; cursor: pointer; color: inherit;
  box-shadow: 0 0 0 1px var(--edge), 0 5px 0 var(--lip); display: grid; place-items: center; gap: 6px; padding: 8px; transition: transform .1s, background .15s, border-color .15s; }
.opt.pic { padding: 7px 7px 9px; }
.opt.text { font: 800 26px/1.2 var(--display); color: var(--chalk); min-height: 84px; }
.opt:hover { border-color: color-mix(in srgb, var(--uc, #2563EB) 35%, white); }
.opt:active { transform: translateY(3px); box-shadow: 0 0 0 1px var(--edge), 0 2px 0 var(--lip); }
.opt.right { background: var(--ok-2); border-color: var(--ok); box-shadow: 0 5px 0 #9FD3B4; animation: pop .35s var(--ease); }
.opt.wrong { background: #FBEAE5; border-color: var(--no); animation: shake .35s; }
.opt[disabled] { cursor: default; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.exam-part { display: block; font: 600 12.5px/1.35 var(--body); color: var(--ink-2); margin-top: 3px; }
.opt small { display: block; font: 800 17px/1.35 var(--display); color: var(--chalk); margin-top: 2px; }

/* ---------- Starters lessons: parts, story, speaking frames, phonics ---------- */
.acts-nav .part { display: grid; gap: 4px; padding-right: 10px; margin-right: 2px; border-right: 1px dashed var(--line); }
.acts-nav .part:last-child { border-right: 0; }
.part-lbl { font: 800 12px/1.35 var(--display); color: var(--ink-2); }
.part-stk { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.story-page { display: grid; justify-items: center; gap: 8px; width: min(100%, 520px); background: #fff; border: 1.5px solid var(--line);
  border-radius: 28px; padding: 12px 12px 18px; }
.story-pic { width: min(100%, 360px); }
.story-line { font: 800 clamp(24px, 6vw, 36px)/1.25 var(--display); color: var(--chalk); margin: 0; }
.story-page .vi, .stage-body > .vi { color: var(--ink-2); font-size: 15px; margin: 0; }
.story-q { font: 800 clamp(22px, 5.5vw, 30px)/1.25 var(--display); margin: 0; color: var(--ink); }
.story-q .blank { color: var(--crayon); }
.story-all { width: min(100%, 520px); text-align: left; background: var(--chalk-2); border-radius: 14px; padding: 8px 14px; }
.story-all summary { cursor: pointer; font-weight: 700; }
.story-all p { margin: 6px 0; font-size: 17px; }
.mic-box { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 120px; }
.talk-card { width: min(100%, 520px); background: #fff; border: 1.5px solid var(--line); border-radius: 22px;
  padding: 14px 18px; text-align: left; }
.talk-card p { font: 800 clamp(20px, 5vw, 28px)/1.25 var(--display); color: var(--chalk); margin: 6px 0; }
.ph { color: var(--crayon); text-decoration: underline 3px; text-underline-offset: 4px; }
.ph-intro { display: grid; justify-items: center; gap: 10px; max-width: 52ch; }
.ph-intro p { margin: 0; font-size: 16px; }
.ph-big { font: 800 84px/1.1 var(--display); color: var(--crayon); }
.ph-groups { display: grid; gap: 8px; width: 100%; text-align: left; }
.ph-groups div { background: var(--chalk-2); border-radius: 14px; padding: 8px 12px; display: grid; gap: 2px; }
.ph-groups span { font-size: 18px; }

.slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.slot { width: 46px; height: 54px; border-bottom: 4px solid var(--line); display: grid; place-items: center;
  font: 800 34px/1.1 var(--display); color: var(--chalk); transition: border-color .2s; }
.slot.in { border-color: var(--ok); animation: pop .3s var(--ease); }
.slot.words { width: auto; min-width: 54px; padding: 0 6px; font-size: 24px; height: 46px; }
.tiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 520px; }
.tile { border: 1px solid #EAD9AE; background: #FFF8E6; border-radius: 14px; min-width: 52px; min-height: 54px; padding: 4px 12px;
  font: 800 26px/1.2 var(--display); cursor: pointer; box-shadow: 0 4px 0 #EFD9A0; color: var(--ink); transition: transform .08s; }
.tile:active { transform: translateY(3px); box-shadow: 0 1px 0 #EFD9A0; }
.tile.word { font-size: 20px; background: #fff; border-color: var(--edge); box-shadow: 0 4px 0 var(--lip); }
.tile.used { visibility: hidden; }
.tile.wrong { animation: shake .35s; background: #FBEAE5; }

.mic { border: 0; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F0714F, var(--crayon) 60%); color: #fff; font-size: 40px; cursor: pointer;
  box-shadow: 0 7px 0 #7E1F0B, 0 16px 28px -10px rgba(181, 49, 22, .6); transition: transform .1s; }
.mic:active { transform: translateY(5px); box-shadow: 0 2px 0 #7E1F0B; }
.mic.on { animation: pulse 1.1s infinite; background: #94240D; }
.mic[disabled] { opacity: .5; }
@keyframes pulse { 0% { box-shadow: 0 7px 0 #7E1F0B, 0 0 0 0 rgba(181, 49, 22, .45); } 100% { box-shadow: 0 7px 0 #7E1F0B, 0 0 0 22px rgba(181, 49, 22, 0); } }
.heard-line { min-height: 28px; font-size: 18px; }
.heard-line .w { padding: 0 3px; border-radius: 6px; }
.heard-line .w.y { background: var(--ok-2); color: var(--ok); }
.heard-line .w.n { background: #FBEAE5; color: var(--no); }
.scorebig { font: 800 44px/1.15 var(--display); animation: pop .4s var(--ease); }
.scorebig.ok { color: var(--ok); }
.scorebig.meh { color: #875C00; }
.stage-foot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.stage-foot .btn { min-width: 150px; }

/* chat */
.chat { width: 100%; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px 8px; text-align: left; }
.bub { max-width: 86%; padding: 11px 15px; border-radius: 18px; line-height: 1.45; animation: pop .3s var(--ease); }
.bub.ivy { align-self: flex-start; background: var(--chalk-2); border: 1.5px solid #C4D6F0; border-bottom-left-radius: 6px; }
.bub.ivy .en { font: 700 18px/1.35 var(--display); color: var(--chalk); }
.bub.ivy .mai { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); border-top: 1px dashed #C4D6F0; padding-top: 6px; }
.bub.kid { align-self: flex-end; background: #FFF3C9; border: 1.5px solid #F3D29A; border-bottom-right-radius: 6px; font: 700 17px/1.35 var(--display); }
.bub .who { display: block; font: 700 12px/1.35 var(--body); color: var(--ink-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.chat-ctl { display: grid; gap: 10px; justify-items: center; width: 100%; }
.sugg { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sugg button { border: 1.5px dashed var(--chalk); background: #fff; color: var(--chalk); border-radius: 999px; padding: 8px 14px;
  font: 700 15px/1.3 var(--display); cursor: pointer; }
.typebox { display: flex; gap: 8px; width: min(100%, 460px); }
.typebox input { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 44px; }
.ivy-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--chalk); color: #fff; display: inline-grid; place-items: center;
  font: 800 14px/1.35 var(--display); flex: none; }

/* result */
.result { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 0; }
.ring { --p: 0; width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--paper-2) 0); animation: pop .5s var(--ease); }
.ring span { width: 112px; height: 112px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 36px/1.15 var(--display); }
.result h3 { font: 800 24px/1.25 var(--display); margin: 0; }
.earned { font: 800 20px/1.3 var(--display); color: #875C00; }
.score-count { margin: 0; font: 600 18px/1.3 var(--display); color: var(--ink); }
.score-count b { font-weight: 800; }
.q-num { color: var(--ink-3); font-weight: 800; }
/* a teacher's own test: every question back with the answer and her explanation */
.q-review { width: min(100%, 620px); margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; text-align: left; counter-reset: qr; }
.q-review li { counter-increment: qr; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.q-review .q-prompt { margin: 0 0 6px; font-size: 16px; }
.q-review .q-prompt::before { content: counter(qr) ". "; font-weight: 800; }
.q-review .q-mark { margin: 0; font-size: 15px; }
.q-review li.ok .q-mark { color: var(--ok); }
.q-review li.no .q-mark { color: var(--no); }
.q-review .q-why { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink); }

/* worksheet block on unit page */
.sheet-box { display: grid; gap: 14px; margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
@media (min-width: 760px) { .sheet-box { grid-template-columns: 1fr 1fr; align-items: start; } }
.sheet-box h2 { font: 800 21px/1.25 var(--display); margin: 0 0 6px; }
.w-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.w-items span { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--ok-2); color: var(--ok); font-weight: 700; }
.w-items span.x { background: #FBEAE5; color: var(--no); }

/* teacher panel */
.teach { position: relative; overflow: hidden; margin-top: 26px; border: 2px dashed var(--chalk); border-radius: 20px; padding: 18px; background: #F6F9FE; }
.teach .wm { position: absolute; inset: -20%; z-index: 2; pointer-events: none; user-select: none; display: flex; flex-wrap: wrap;
  gap: 46px 64px; align-content: space-around; justify-content: space-around; transform: rotate(-18deg);
  font: 700 15px var(--display); color: var(--chalk); opacity: .1; }
/* a teacher file viewed in the page (cô Linh 01/11/2026), the watermark over it as over the lesson plan */
.doc-view { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(20, 24, 33, .92); }
.doc-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; color: #fff; }
.doc-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-frame { position: relative; flex: 1; overflow: hidden; background: #fff; display: grid; place-items: center; }
.doc-frame iframe { width: 100%; height: 100%; border: 0; }
.doc-frame img, .doc-frame video { max-width: 100%; max-height: 100%; }
.doc-frame .wm { position: absolute; inset: -20%; z-index: 2; pointer-events: none; user-select: none; display: flex; flex-wrap: wrap;
  gap: 46px 64px; align-content: space-around; justify-content: space-around; transform: rotate(-18deg);
  font: 700 15px var(--display); color: var(--chalk); opacity: .16; }
.teach h2 { font: 800 21px/1.25 var(--display); margin: 0 0 4px; color: var(--chalk); }
.teach ol { padding-left: 20px; margin: 10px 0; }
.teach li { margin-bottom: 8px; }
.teach .mins { font-weight: 800; color: var(--chalk); }
.docs { display: grid; gap: 8px; margin: 10px 0; }
.docs a, .docs div { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }

/* present mode (TV in class) */
body.en-present { background: #FFFDF7; }
body.en-present .topbar, body.en-present .foot, body.en-present .en-hide-present { display: none !important; }
.tv { position: fixed; inset: 0; z-index: 80; background: #FFFDF7; display: grid; grid-template-rows: auto 1fr auto; gap: 1.2vh; padding: 1.6vh 2.4vw; }
.tv button { font-family: var(--display); }
.tv .btn { font-size: max(15px, 2.1vh); min-height: max(44px, 5.4vh); padding: 0 max(14px, 1.4vw); }
.tv-top { display: flex; align-items: center; gap: 1.2vw; flex-wrap: wrap; font: 800 2.4vh/1.2 var(--display); }
.tv-modes { display: flex; gap: .6vw; flex-wrap: wrap; flex: 1; justify-content: center; }
.tv-modes button, .tv-tools button { border: 2px solid var(--card-edge); background: #fff; border-radius: 999px; padding: .8vh 1.2vw; font-size: 2.1vh; font-weight: 800; cursor: pointer; }
.tv-modes button[aria-pressed="true"] { background: var(--chalk); color: #fff; }
.tv-tools { display: flex; gap: .6vw; }
.tv-tools button.on { background: var(--crayon); color: #fff; }
.tv-stage { display: grid; place-items: center; align-content: safe center; gap: 2vh; text-align: center; min-height: 0; overflow-y: auto; } /* a tall card scrolls instead of covering the mode buttons on a phone (01/11/2026) */
.tv-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.tv-hint { color: var(--ink-2); font-size: 1.9vh; }
.tv-say { font: 700 2.8vh/1.3 var(--display); margin: 0; }
.tv-card { display: grid; place-items: center; gap: 1vh; }
.tv .p-pic { font-size: 30vh; line-height: 1; }
.tv .p-word { font: 800 13vh/1.05 var(--display); color: var(--chalk); letter-spacing: -0.02em; }
.tv .p-word.s { font-size: 7.5vh; }
.tv .p-vi { font-size: 3.4vh; color: var(--ink-2); }
.tv-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; }
.team { display: flex; align-items: center; gap: 1vw; border: 3px solid var(--card-edge); border-radius: 20px; padding: 1vh 1.4vw; background: #fff; }
.team.turn { background: #FFF3C9; box-shadow: 0 0 0 5px var(--star); }
.t-name { font: 800 3vh/1.2 var(--display); flex: 1; }
.t-score { font: 800 6vh/1.1 var(--display); min-width: 2ch; text-align: center; color: var(--chalk); }
.t-plus, .t-minus { border: 2px solid var(--card-edge); background: #fff; border-radius: 14px; font: 800 2.6vh/1.2 var(--display); padding: .8vh 1vw; cursor: pointer; }
.t-plus { background: var(--ok-2); }
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4vh 1vw; width: min(100%, 110vh); }
.m-card { position: relative; height: 17vh; border: 3px solid var(--card-edge); border-radius: 18px; background: var(--chalk); color: #fff; cursor: pointer; box-shadow: 3px 3px 0 var(--card-edge); }
.m-card .m-back { font: 800 6vh/1.1 var(--display); }
.m-card .m-face { display: none; }
.m-card.up { background: #fff; color: var(--ink); }
.m-card.up .m-back { display: none; }
.m-card.up .m-face { display: grid; place-items: center; height: 100%; }
.m-card.done { background: var(--ok-2); border-color: var(--ok); }
.m-pic { font-size: 10vh; line-height: 1; }
.m-word { font: 800 4.2vh/1.1 var(--display); color: var(--chalk); }
.r-box { position: relative; width: 44vh; height: 44vh; display: grid; place-items: center; border: 3px solid var(--card-edge); border-radius: 24px; background: #fff; overflow: hidden; }
.r-pic { font-size: 34vh; line-height: 1; }
.r-cover { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.r-tile { border: 2px solid #fff; background: var(--chalk); cursor: pointer; transition: opacity .35s; }
.r-tile.off { opacity: 0; pointer-events: none; }
.r-answer { font: 800 6vh/1.1 var(--display); color: var(--chalk); }
.q-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2vw; width: min(100%, 130vh); }
.q-opt { position: relative; height: 30vh; border: 3px solid var(--card-edge); border-radius: 22px; background: #fff; font-size: 17vh; cursor: pointer; box-shadow: 4px 4px 0 var(--card-edge); }
.q-opt i { position: absolute; top: 1vh; left: 1.2vh; font: 800 3.4vh/1.1 var(--display); font-style: normal; color: var(--ink-2); }
.q-opt.right { background: var(--ok-2); border-color: var(--ok); }
.q-opt.wrong { background: #FBEAE5; border-color: var(--no); opacity: .6; }
.tv-win p { font: 800 9vh/1.1 var(--display); margin: 0; }
.tv-win span { display: block; font: 700 3.4vh/1.4 var(--display); color: var(--ink-2); }
.tv-win small { display: block; font-size: 2.4vh; margin: 1vh 0 2vh; }
@media (max-width: 700px) { .m-grid, .q-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tv-teams { grid-template-columns: 1fr; } }
/* Phương Dung's slide games (04/11/2026): situation cards, Vietnamese-to-Chinese choice, question balloons */
.z-line { display: inline-flex; flex-direction: column; align-items: center; gap: .3vh; }
.z-line b { font-size: 4.6vh; line-height: 1.15; }
.z-line i { font: 700 2.4vh/1.2 var(--display); font-style: normal; color: var(--crayon); }
.z-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2vw; width: min(100%, 150vh); }
.z-card { position: relative; display: grid; gap: 1.4vh; align-content: start; min-height: 26vh; padding: 2.2vh 1.6vw; border: 3px solid var(--sun); border-radius: 22px; background: #fff; text-align: left; cursor: pointer; box-shadow: 4px 4px 0 var(--card-edge); font: 700 2.6vh/1.35 var(--display); color: var(--ink); }
.z-card:nth-child(3n+2) { border-color: var(--leaf); }
.z-card:nth-child(3n) { border-color: var(--sky); }
.z-num { position: absolute; top: 1vh; right: 1.2vh; font-size: 2.2vh; color: var(--ink-2); }
.z-ans { display: grid; gap: .4vh; place-items: center; padding: 1.4vh; border: 3px solid var(--leaf); border-radius: 16px; background: var(--leaf-light); text-align: center; }
.z-ans small, .b-ans small, .b-q small { font-size: 2.1vh; color: var(--leaf); }
.pk-q { font: 800 4.2vh/1.3 var(--display); padding: 1.6vh 3vw; border: 3px solid var(--sun); border-radius: 20px; background: var(--sun-light); color: var(--ink); }
.pk-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2vw; width: min(100%, 140vh); }
.pk-opt { position: relative; display: grid; place-items: center; gap: 1vh; min-height: 22vh; padding: 2vh 1vw; border: 3px solid var(--card-edge); border-radius: 22px; background: #fff; cursor: pointer; box-shadow: 4px 4px 0 var(--card-edge); color: var(--ink); }
.pk-opt .pk-n { position: absolute; top: 1vh; left: 1.2vh; font: 800 3vh/1 var(--display); font-style: normal; color: var(--ink-2); }
.pk-opt.right { background: var(--ok-2); border-color: var(--ok); }
.pk-opt.wrong { opacity: .35; }
.pk-ok { font: 800 2.4vh/1 var(--display); font-style: normal; color: var(--ok); }
.b-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2vw; width: min(100%, 150vh); align-items: start; }
.b-col { display: grid; justify-items: center; gap: 1.6vh; }
.b-ball { position: relative; width: 17vh; height: 21vh; margin-bottom: 5vh; border: 0; border-radius: 50% 50% 48% 48%; color: #fff; font: 800 7vh/1 var(--display); cursor: pointer; box-shadow: inset -1.6vh -1.6vh 0 rgba(28, 23, 21, .12); transition: transform .25s var(--ease), opacity .25s; }
.b-ball::before { content: ""; position: absolute; top: 2.6vh; left: 3.4vh; width: 2.6vh; height: 4vh; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.b-ball::after { content: ""; position: absolute; left: 50%; bottom: -5vh; width: 2px; height: 5vh; background: var(--ink-2); }
.b-ball.b0 { background: var(--crayon); }
.b-ball.b1 { background: var(--sun); color: var(--ink); }
.b-ball.b2 { background: var(--leaf); }
.b-ball.b3 { background: var(--sky); }
.b-ball.pop { transform: scale(1.25); opacity: 0; }
.b-q { display: grid; gap: .4vh; place-items: center; font: 700 2.4vh/1.3 var(--display); }
.b-card { display: grid; place-items: center; width: 100%; min-height: 16vh; padding: 1.6vh; border: 3px solid var(--leaf); border-radius: 18px; background: var(--leaf-light); cursor: pointer; font: 700 2.2vh/1.3 var(--display); color: var(--leaf); }
.z-ans[hidden], .pk-ok[hidden], .b-ball[hidden], .b-q[hidden], .b-card[hidden], .b-ans[hidden], .b-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .b-ball { transition: none; } }
@media (max-width: 700px) { .z-grid, .pk-opts { grid-template-columns: 1fr; } .b-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* speaking game judged by the teacher (cô Linh 01/11/2026): a smaller picture leaves room for the turn line and buttons */
.tv .sp-card .p-pic { font-size: 24vh; }
.tv .sp-card .p-pic .scene, .tv .sp-card .p-pic .emo-tile { height: 40vh; max-width: 100%; }
.tv .sp-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
/* the laptop scores the child (cô Linh 01/11/2026 21:09: "Các bé đến gần laptop nói"): one big button, the result under it */
@media (min-width: 701px) { .tv-stage:has(.sp-mic) .sp-card .p-pic :is(.scene, .emo-tile) { height: 34vh; } }
.tv .sp-mic { font-size: max(20px, 3.6vh); min-height: max(56px, 8vh); padding: 0 max(24px, 3vw); border: 0; border-radius: 999px; background: var(--crayon); color: #fff; box-shadow: 0 6px 0 #7E1F0B; cursor: pointer; }
.tv .sp-mic.on { animation: pulse 1.1s infinite; background: #94240D; opacity: 1; }
.tv .sp-mic[disabled] { cursor: default; }
.tv .sp-heard { min-height: 1.3em; margin: 0; font: 700 max(17px, 3vh)/1.3 var(--display); color: var(--ink); }
.tv .sp-pass { color: var(--ok); }
.tv .sp-nomic { margin: 0; }
@media (prefers-reduced-motion: reduce) { .tv .sp-mic.on { animation: none; } }
/* a phone or a narrow window: modes scroll in one row, the stage keeps to the screen width */
.tv, .tv-stage { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 700px) {
  .tv .p-pic .scene, .tv .p-pic .emo-tile { height: 32vh; max-width: 100%; }
  .tv-top b { flex: 1 1 auto; min-width: 0; }
  .tv-modes { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .tv-modes button { flex: none; white-space: nowrap; }
  .tv-tools { margin-left: auto; }
  .tv .p-word { font-size: min(13vh, 15vw); }
  .tv .p-word.s { font-size: min(7.5vh, 8vw); }
  .tv .sp-card .p-pic .scene, .tv .sp-card .p-pic .emo-tile { height: 28vh; }
}

/* lesson full screen (cô Linh 01/11/2026): the stage fills the screen. The page goes full screen, not the stage, so
   toasts (z 90), confetti (80) and dialogs (60) appended to <body> still show over it (z 50). */
.stage-bar { display: flex; justify-content: flex-end; margin: -6px 0 8px; }
body.stage-full { overflow: hidden; }
body.stage-full .stage-wrap { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 8px; background: var(--paper);
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
body.stage-full .stage-bar { margin: 0; }
body.stage-full .stage { flex: 1; min-height: 0; overflow-y: auto; }
body.stage-full .flash { width: min(100%, 560px); }

/* test + report */
.test-q { width: 100%; display: grid; gap: 16px; justify-items: center; }
.skillbars { display: grid; gap: 10px; width: 100%; }
.skillbar { display: grid; grid-template-columns: 90px 1fr 48px; gap: 10px; align-items: center; font-size: 14.5px; }
.skillbar .meter { height: 12px; }
.skillbar .meter i { background: var(--chalk); }
.report-paper { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); max-width: 820px; margin: 22px auto 40px; }
.report-paper header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.report-paper h1 { font: 800 clamp(24px, 4.6vw, 34px)/1.15 var(--display); margin: 0; }
.report-paper .body p { font-size: 16px; line-height: 1.75; margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--paper); border-radius: 14px; padding: 12px; }
.fact b { display: block; font: 800 26px/1.15 var(--display); }
.fact span { font-size: 13px; color: var(--ink-2); }
.chips-words { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-words span { font: 700 14px/1.35 var(--display); padding: 6px 10px; border-radius: 999px; background: var(--chalk-2); color: var(--chalk); }
.chips-words.weak span { background: #FFF3C9; color: #7A4E00; }

/* printable worksheet */
.ws { max-width: 794px; margin: 18px auto 40px; background: #fff; padding: 28px 34px; border: 1px solid var(--line); border-radius: 8px; color: #111; }
.ws header { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px; }
.ws h1 { font: 800 26px/1.15 var(--display); margin: 0; }
.ws .name-line { font-size: 15px; }
.ws h2 { font: 800 18px/1.25 var(--display); margin: 18px 0 10px; }
.ws-trace { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
.ws-trace .tr { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
.ws-trace .tr .pic { font-size: 38px; text-align: center; }
.ws-trace svg { width: 100%; height: 58px; }
.ws-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
.ws-item { display: grid; grid-template-columns: 30px 52px 1fr; gap: 8px; align-items: end; min-height: 64px; }
.ws-item .no { font: 800 20px/1.15 var(--display); border: 2px solid #111; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; align-self: center; }
.ws-item .pic { font-size: 40px; align-self: center; text-align: center; }
.ws-item .line { border-bottom: 2px solid #111; height: 40px; font: 700 18px/40px var(--display); color: #555; }
.ws-item.wide { grid-column: 1 / -1; grid-template-columns: 30px 52px 1fr; }
.ws .foot-note { margin-top: 20px; font-size: 12.5px; color: #555; border-top: 1px dashed #aaa; padding-top: 8px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .topbar, .foot, .no-print { display: none !important; }
  .ws { border: 0; padding: 0; margin: 0; max-width: none; }
}
@media (max-width: 560px) { .ws { padding: 18px 14px; } .ws-trace, .ws-items { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.more-phr { margin-top: 12px; }
.more-phr summary { list-style: none; display: inline-flex; }
.more-phr summary::-webkit-details-marker { display: none; }
.more-phr .phrases { margin-top: 14px; }

/* ---------- living scenes (en-scenes.js): each joint turns around its own origin ---------- */
.scene, .emo-tile { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; position: relative;
  background: #EEF8FF; box-shadow: inset 0 0 0 1px rgba(28, 23, 21, .07); }
.scene svg { display: block; width: 100%; height: 100%; }
.scene.clip { aspect-ratio: 16 / 9; }
.scene.clip video { display: block; width: 100%; height: 100%; object-fit: cover; background: #CFEFFF; }
.scene.clip .ai-tag { position: absolute; right: 8px; bottom: 8px; font: 700 12px/1.35 var(--body); font-style: normal; color: #fff; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 6px; }
.emo-tile { display: grid; place-items: center; font-size: clamp(64px, 17vw, 112px); line-height: 1.1;
  background: radial-gradient(circle at 50% 42%, #fff 0 30%, color-mix(in srgb, var(--uc, #2563EB) 13%, #fff) 75%); }
.emo-tile.sm { font-size: clamp(40px, 11vw, 58px); border-radius: 14px; }
.scene.sm { border-radius: 14px; }
.scene .p, .scene .obj, .scene .scroll, .scene .cloud, .scene .waves, .scene .speed { transform-box: view-box; transform-origin: 0 0; }
.scene .p { transform: rotate(var(--a, 0deg)); }
.scene .shadow-b, .scene .shadow-h { transform-box: fill-box; transform-origin: center; }
.scene * { animation-duration: var(--dur, 2s); animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.scene .cloud { animation: sc-drift 9s ease-in-out infinite alternate; }
.scene .cloud.c2 { animation-duration: 12s; animation-direction: alternate-reverse; }
.scene .scroll { animation: sc-scroll var(--dur) linear infinite; }
.scene .scroll.slow { animation-duration: 9s; }
@keyframes sc-drift { to { transform: translateX(26px); } }
@keyframes sc-scroll { to { transform: translateX(var(--step, -80px)); } }

/* kicking, football: wind up, kick, the ball flies */
.sc-kicking, .sc-football { --dur: 2s; }
:is(.sc-kicking, .sc-football) .thighR { animation-name: k-thigh; }
:is(.sc-kicking, .sc-football) .shinR { animation-name: k-shin; }
:is(.sc-kicking, .sc-football) .armR { animation-name: k-arm-r; }
:is(.sc-kicking, .sc-football) .armL { animation-name: k-arm-l; }
:is(.sc-kicking, .sc-football) .kid { animation-name: k-lean; }
.sc-kicking .ball-kick { animation-name: k-ball; }
.sc-football .ball-kick { animation-name: k-goal; }
@keyframes k-thigh { 0%, 75%, 100% { transform: rotate(0); } 22% { transform: rotate(30deg); } 40% { transform: rotate(-32deg); } 55% { transform: rotate(-62deg); } }
@keyframes k-shin { 0%, 100% { transform: rotate(0); } 22% { transform: rotate(80deg); } 40% { transform: rotate(2deg); } 55% { transform: rotate(0); } 75% { transform: rotate(8deg); } }
@keyframes k-arm-r { 0%, 75%, 100% { transform: rotate(8deg); } 40% { transform: rotate(40deg); } }
@keyframes k-arm-l { 0%, 75%, 100% { transform: rotate(-8deg); } 40% { transform: rotate(-45deg); } }
@keyframes k-lean { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-5deg); } }
@keyframes k-ball { 0%, 40% { transform: none; opacity: 1; } 70% { transform: translate(150px, -95px) rotate(720deg) scale(.55); opacity: 1; }
  71%, 92% { transform: none; opacity: 0; } 100% { opacity: 1; } }
@keyframes k-goal { 0%, 40% { transform: none; opacity: 1; } 70% { transform: translate(150px, -40px) rotate(720deg) scale(.7); opacity: 1; }
  71%, 92% { transform: none; opacity: 0; } 100% { opacity: 1; } }

/* hitting, baseball: bat back, swing, the pitched ball flies off */
.sc-hitting, .sc-baseball { --dur: 2.2s; }
:is(.sc-hitting, .sc-baseball) .swing { animation-name: h-swing; }
:is(.sc-hitting, .sc-baseball) .wrist { animation-name: h-wrist; }
:is(.sc-hitting, .sc-baseball) .ball-hit { animation-name: h-ball; animation-timing-function: linear; }
@keyframes h-swing { 0%, 40% { transform: rotate(160deg); } 52% { transform: rotate(0); } 64%, 78% { transform: rotate(-80deg); } 100% { transform: rotate(-200deg); } }
@keyframes h-wrist { 0%, 40% { transform: rotate(115deg); } 52% { transform: rotate(0); } 64%, 78% { transform: rotate(-20deg); } 100% { transform: rotate(115deg); } }
@keyframes h-ball { 0% { transform: translate(170px, -20px); opacity: 0; } 6% { opacity: 1; } 50%, 53% { transform: none; opacity: 1; }
  78% { transform: translate(170px, -120px) scale(.6); opacity: 1; } 79%, 100% { opacity: 0; } }

/* throwing: overarm, the ball leaves the hand */
.sc-throwing { --dur: 1.9s; }
.sc-throwing .armR { animation-name: t-arm; }
.sc-throwing .foreR { animation-name: t-fore; }
.sc-throwing .inhand { animation-name: t-hand; animation-timing-function: steps(1, end); }
.sc-throwing .ball-throw { animation-name: t-ball; animation-timing-function: linear; }
@keyframes t-arm { 0% { transform: rotate(30deg); } 30% { transform: rotate(150deg); } 48% { transform: rotate(245deg); } 62% { transform: rotate(320deg); } 100% { transform: rotate(390deg); } }
@keyframes t-fore { 0%, 48%, 100% { transform: rotate(-10deg); } 30% { transform: rotate(-60deg); } }
@keyframes t-hand { 0%, 47% { opacity: 1; } 48%, 99% { opacity: 0; } }
@keyframes t-ball { 0%, 47% { transform: none; opacity: 0; } 48% { transform: none; opacity: 1; } 64% { transform: translate(70px, -34px); }
  82% { transform: translate(165px, 20px); opacity: 1; } 83%, 100% { opacity: 0; } }

/* bouncing, basketball: dribble */
.sc-bouncing, .sc-basketball { --dur: .8s; }
:is(.sc-bouncing, .sc-basketball) .armR { animation-name: b-arm; }
:is(.sc-bouncing, .sc-basketball) .foreR { animation-name: b-fore; }
:is(.sc-bouncing, .sc-basketball) .ball-bounce { animation-name: b-ball; }
:is(.sc-bouncing, .sc-basketball) .shadow-b { animation-name: b-shadow; }
@keyframes b-arm { 0%, 100% { transform: rotate(-35deg); } 50% { transform: rotate(-18deg); } }
@keyframes b-fore { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(-8deg); } }
@keyframes b-ball { 0%, 100% { transform: none; animation-timing-function: cubic-bezier(.5, 0, 1, 1); }
  50% { transform: translateY(42px) scale(1.08, .86); animation-timing-function: cubic-bezier(0, 0, .5, 1); } }
@keyframes b-shadow { 0%, 100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }

/* riding: pedals, wheels, the road runs past */
.sc-riding { --dur: 1s; }
.sc-riding .spin { animation: sc-spin .8s linear infinite; }
.sc-riding :is(.thighL, .thighR) { animation-name: r-thigh; animation-timing-function: linear; }
.sc-riding :is(.shinL, .shinR) { animation-name: r-shin; animation-timing-function: linear; }
.sc-riding :is(.thighR, .shinR) { animation-delay: -.5s; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@keyframes r-thigh { 0%, 100% { transform: rotate(-72deg); } 50% { transform: rotate(-38deg); } }
@keyframes r-shin { 0%, 100% { transform: rotate(62deg); } 25% { transform: rotate(40deg); } 50% { transform: rotate(28deg); } 75% { transform: rotate(52deg); } }

/* walking, running: legs and arms swing in opposite phase */
.sc-walking { --dur: 1.1s; }
.sc-running { --dur: .62s; }
.sc-walking :is(.thighL, .thighR) { animation-name: w-thigh; }
.sc-walking :is(.shinL, .shinR) { animation-name: w-shin; }
.sc-walking .armL { animation-name: w-arm; }
.sc-walking .armR { animation-name: w-arm; animation-delay: calc(var(--dur) / -2); }
:is(.sc-walking, .sc-running) :is(.thighR, .shinR) { animation-delay: calc(var(--dur) / -2); }
.sc-walking .kid { animation-name: w-bob; animation-duration: calc(var(--dur) / 2); }
.sc-running .kid { animation-name: run-bob; animation-duration: calc(var(--dur) / 2); }
.sc-running :is(.thighL, .thighR) { animation-name: run-thigh; }
.sc-running :is(.shinL, .shinR) { animation-name: run-shin; }
.sc-running .armL { animation-name: run-arm; }
.sc-running .armR { animation-name: run-arm; animation-delay: calc(var(--dur) / -2); }
.sc-running .speed { animation: run-lines .5s linear infinite; }
.sc-running .scroll { animation-duration: .45s; }
@keyframes w-thigh { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-18deg); } }
@keyframes w-shin { 0%, 100% { transform: rotate(14deg); } 25% { transform: rotate(24deg); } 50%, 75% { transform: rotate(2deg); } }
@keyframes w-arm { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
@keyframes w-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-2px); } }
@keyframes run-thigh { 0%, 100% { transform: rotate(30deg); } 50% { transform: rotate(-45deg); } }
@keyframes run-shin { 0%, 100% { transform: rotate(80deg); } 50% { transform: rotate(30deg); } 75% { transform: rotate(95deg); } }
@keyframes run-arm { 0%, 100% { transform: rotate(-40deg); } 50% { transform: rotate(40deg); } }
@keyframes run-bob { 0%, 100% { transform: rotate(9deg); } 50% { transform: translateY(-4px) rotate(9deg); } }
@keyframes run-lines { 0% { transform: translateX(10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-24px); opacity: 0; } }

/* swimming: one arm turns over the water, the waves roll */
.sc-swimming { --dur: 1.4s; }
.sc-swimming .armS { animation: s-arm 1.4s linear infinite; }
.sc-swimming .swim { animation-name: s-bob; }
.sc-swimming .waves { animation: s-wave 1.2s linear infinite; }
.sc-swimming .waves.w2 { animation-duration: 2s; animation-direction: reverse; }
.sc-swimming .splash { transform-box: fill-box; transform-origin: center bottom; animation: s-splash 1.4s ease-out infinite; }
@keyframes s-arm { from { transform: rotate(-140deg); } to { transform: rotate(220deg); } }
@keyframes s-bob { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }
@keyframes s-wave { to { transform: translateX(-40px); } }
@keyframes s-splash { 0%, 30% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: translateY(-8px) scale(1.2); } }

/* skating: push and glide */
.sc-skating { --dur: 2.2s; }
.sc-skating .glide { animation-name: sk-glide; }
.sc-skating .thighL { animation-name: sk-push; }
.sc-skating .scroll { animation-duration: 1.6s; }
@keyframes sk-glide { 0%, 100% { transform: translateX(-16px) rotate(-2deg); } 50% { transform: translateX(16px) rotate(2deg); } }
@keyframes sk-push { 0%, 100% { transform: rotate(34deg); } 50% { transform: rotate(6deg); } }

/* hopping: up and down on one foot */
.sc-hopping { --dur: .75s; }
.sc-hopping .hop { animation-name: hop-up; }
.sc-hopping .shadow-h { animation-name: hop-shadow; }
@keyframes hop-up { 0%, 100% { transform: none; animation-timing-function: cubic-bezier(0, 0, .4, 1); } 50% { transform: translateY(-26px); animation-timing-function: cubic-bezier(.6, 0, 1, 1); } }
@keyframes hop-shadow { 0%, 100% { transform: none; } 50% { transform: scale(.6); opacity: .5; } }

/* tennis, badminton, table tennis: the racket meets the ball */
.sc-tennis, .sc-badminton { --dur: 2s; }
.sc-tabletennis { --dur: 1.3s; }
.sc-tennis .armR { animation-name: te-arm; }
.sc-tennis .ball-tennis { animation-name: te-ball; animation-timing-function: linear; }
.sc-badminton .armR { animation-name: bd-arm; }
.sc-badminton .shuttle { animation-name: bd-shuttle; animation-timing-function: linear; }
.sc-tabletennis .armR { animation-name: tt-arm; }
.sc-tabletennis .ball-tt { animation-name: tt-ball; animation-timing-function: linear; }
@keyframes te-arm { 0%, 38% { transform: rotate(70deg); } 52% { transform: rotate(-60deg); } 64%, 80% { transform: rotate(-140deg); } 100% { transform: rotate(70deg); } }
@keyframes te-ball { 0% { transform: translate(160px, -40px); opacity: 0; } 5% { opacity: 1; } 50%, 53% { transform: none; opacity: 1; }
  75% { transform: translate(170px, -70px); opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes bd-arm { 0%, 38% { transform: rotate(150deg); } 52% { transform: rotate(200deg); } 64%, 80% { transform: rotate(290deg); } 100% { transform: rotate(150deg); } }
@keyframes bd-shuttle { 0% { transform: translate(150px, -30px) rotate(180deg); opacity: 0; } 5% { opacity: 1; } 50%, 53% { transform: rotate(180deg); opacity: 1; }
  78% { transform: translate(170px, 100px) rotate(20deg); opacity: 1; } 79%, 100% { opacity: 0; } }
@keyframes tt-arm { 0%, 100% { transform: rotate(30deg); } 45% { transform: rotate(-50deg); } 60% { transform: rotate(-85deg); } }
@keyframes tt-ball { 0% { transform: translate(150px, -26px); opacity: 0; } 5% { opacity: 1; } 25% { transform: translate(40px, 17px); } 45% { transform: none; }
  65% { transform: translate(110px, 17px); } 85% { transform: translate(190px, -25px); opacity: 1; } 86%, 100% { opacity: 0; } }

/* hockey: the stick taps the ball along */
.sc-hockey { --dur: 1.6s; }
.sc-hockey .swing { animation-name: hk-swing; }
.sc-hockey .ball-hockey { animation-name: hk-ball; }
@keyframes hk-swing { 0%, 40%, 100% { transform: rotate(14deg); } 50% { transform: rotate(-6deg); } 60% { transform: rotate(-12deg); } }
@keyframes hk-ball { 0%, 50% { transform: none; opacity: 1; } 80% { transform: translateX(150px); opacity: 1; } 81%, 95% { transform: none; opacity: 0; } 100% { opacity: 1; } }

/* phonics: the mouth */
.mouth-card { display: grid; gap: 10px; justify-items: center; width: min(100%, 360px); }
.mouth-card svg { width: min(100%, 250px); height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.mouth-steps { display: grid; gap: 6px; width: 100%; text-align: left; }
.mouth-steps > span { padding: 7px 12px; border-radius: 12px; background: var(--paper); font-size: 15px; transition: background .2s, color .2s; }
.mouth-steps > span.on { background: var(--chalk); color: #fff; }
.mouth-steps b { font-family: var(--display); }

/* ---------- 30/09/2026: English-first lesson screens (cô Linh's review) ---------- */
body:not(.show-vi) .vi-help { display: none; }
.vi-help { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.sec .vi-help, .today .vi-help, .review .vi-help { margin-top: 4px; }
.parent-box { margin-top: 34px; padding: 18px 20px; border: 1.5px dashed var(--edge); border-radius: 20px; background: var(--chalk-2); }
.parent-box h2 { font: 800 19px/1.2 var(--display); margin: 0 0 4px; }
.parent-box h3 { font: 800 16px/1.2 var(--display); margin: 18px 0 8px; }
.parent-box .toggle { margin-top: 10px; }
.intro { gap: 14px; }
.intro-ic { width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(150deg, #fff, color-mix(in srgb, var(--uc, #2563EB) 20%, white)); box-shadow: var(--lift); }
.intro-en { font: 700 clamp(20px, 4.6vw, 26px)/1.3 var(--display); color: var(--ink); max-width: 30ch; margin: 0; }
.intro-thumb { position: relative; width: min(100%, 480px); aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: 22px;
  overflow: hidden; cursor: pointer; background: #000; box-shadow: var(--lift); }
.intro-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.intro-thumb .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; color: #fff; padding-left: 6px; background: rgb(0 0 0 / .55); }
.intro-thumb:focus-visible { outline: 4px solid var(--uc, #2563EB); outline-offset: 3px; }
.intro-title { font: 800 clamp(22px, 5vw, 30px)/1.2 var(--display); color: var(--ink); margin: 0; }
.btn-go { min-width: 220px; min-height: 60px; font-size: 19px; border-radius: 999px; }
.cue { font: 700 17px/1.3 var(--display); color: var(--ink-2); margin: 0; }
.prompt-pic { width: min(100%, 340px); }
.letters { display: flex; gap: 4px; justify-content: center; font: 800 38px/1.1 var(--display); }
.letters span { min-width: 30px; padding: 6px 4px 8px; border-radius: 10px; }
.letters .y { background: var(--ok-2); color: var(--ok); }
.letters .n { background: #FBEAE5; color: var(--no); text-decoration: underline wavy 2px; text-underline-offset: 6px; }
.said { font: 700 17px/1.35 var(--display); margin-top: 6px; }
.said .muted { font: 500 14px/1.3 var(--body); }
.ph-ipa { font: 500 18px/1.3 "Segoe UI", "Noto Sans", "DejaVu Sans", system-ui, sans-serif; color: var(--ink-2); }
small.ph-ipa { font-size: 13px; }
.flash .ph-ipa { display: block; margin: 2px 0 6px; }
.ph-lbl { font: 700 13px/1.35 var(--body); color: var(--ink-2); background: var(--paper); padding: 5px 10px; border-radius: 999px; }
.ph-mouths { display: grid; gap: 14px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); justify-items: center; }
.ph-mouth { display: grid; gap: 6px; justify-items: center; }
.ph-mouth > b { font: 800 16px/1.35 var(--display); color: var(--chalk); }

/* homework: four parts in a row */
.hw-bar { display: grid; gap: 10px; margin: 4px 0 14px; padding: 14px 16px; border-radius: 22px; color: #fff;
  background: linear-gradient(120deg, var(--chalk), #2D6BC0 60%, #3E86D6); box-shadow: 0 16px 30px -18px rgba(29, 79, 145, .8); }
.hw-bar > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.hw-bar > div b { font: 800 20px/1.2 var(--display); }
.hw-bar > div span { opacity: .85; font-size: 14px; }
.hw-bar ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.hw-bar li { display: flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px; padding: 8px 10px; font: 700 14px/1.35 var(--display); }
.hw-bar li > span:first-child { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); flex: none; font-size: 13px; }
.hw-bar li small { margin-left: auto; }
.hw-bar li.cur { background: #fff; color: var(--chalk); }
.hw-bar li.cur > span:first-child { background: var(--chalk-2); }
.hw-bar li.on > span:first-child { background: var(--ok); color: #fff; }
.hw-report .skillbars { width: min(100%, 420px); text-align: left; }
.hw-report .skillbar { grid-template-columns: 130px 1fr 48px; }
.hw-report .meter i { background: linear-gradient(90deg, var(--ok), #4CB77A); }

/* mind map: the topic in the middle, pictures around it on coloured branches */
.mm { position: relative; width: min(100%, 640px); aspect-ratio: 1 / 1.08; margin: 0 auto; }
@media (min-width: 640px) { .mm { aspect-ratio: 4 / 3; } .mm .mm-node { width: 20%; } .mm .mm-center { width: 28%; } }
.mm .c0 { --mc: #B53116; } .mm .c1 { --mc: #875C00; } .mm .c2 { --mc: #186E3F; } .mm .c3 { --mc: #165CC8; } .mm .c4 { --mc: #6D28D9; } .mm .c5 { --mc: #9D174D; }
.mm-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mm-l { fill: none; stroke: var(--mc); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .4; }
.mm-l.on { opacity: 1; stroke-width: 4; }
.mm-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; min-height: 20%; display: grid; place-items: center; gap: 2px;
  background: #fff; border-radius: 999px; padding: 12px 10px; text-align: center; box-shadow: 0 0 0 6px color-mix(in srgb, var(--uc, #2563EB) 14%, white), var(--lift-lg); }
.mm-center span { font-size: clamp(22px, 5vw, 34px); line-height: 1.1; }
.mm-center b { font: 800 clamp(13px, 3.2vw, 19px)/1.25 var(--display); color: var(--chalk); }
.mm-node { position: absolute; width: 28%; transform: translate(-50%, -50%); display: grid; gap: 4px; padding: 5px 5px 7px; cursor: pointer;
  background: #fff; border: 2px solid color-mix(in srgb, var(--mc) 35%, white); border-radius: 18px; color: inherit; font: inherit;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--mc) 30%, white), var(--lift); transition: transform .15s var(--ease); }
.mm-node:hover { transform: translate(-50%, -53%); }
.mm-node > span[lang] { font: 800 clamp(12px, 3vw, 16px)/1.25 var(--display); color: var(--mc); }
.mm-node.sel { border-color: var(--mc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc) 25%, white), var(--lift-lg); }
.mm-node.on { background: color-mix(in srgb, var(--mc) 9%, white); border-color: var(--mc); }
.mm-node i { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff;
  display: grid; place-items: center; font: 800 14px/1.35 var(--body); font-style: normal; box-shadow: 0 3px 8px rgba(24, 110, 63, .45); }
.mm-panel { display: grid; justify-items: center; gap: 10px; width: 100%; min-height: 60px; }
.mm-said { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mm-said span { font: 700 14px/1.35 var(--display); padding: 6px 12px; border-radius: 999px; color: var(--mc);
  background: #F2ECE4; border: 1px solid #E4DDD0; }
.mm-said .c0 { --mc: #B53116; } .mm-said .c1 { --mc: #875C00; } .mm-said .c2 { --mc: #186E3F; } .mm-said .c3 { --mc: #165CC8; } .mm-said .c4 { --mc: #6D28D9; } .mm-said .c5 { --mc: #9D174D; }
.mm-free { display: grid; justify-items: center; gap: 12px; }
.mm-big { font-size: 64px; line-height: 1.1; }
.mm-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mm-chips span { font: 800 16px/1.35 var(--display); padding: 9px 14px; border-radius: 999px; background: var(--paper); color: var(--ink-2); transition: background .2s, color .2s; }
.mm-chips span.on { background: var(--ok); color: #fff; }
.bub.kid.solo { display: inline-block; max-width: 100%; }

/* chat: Miss Ivy's question comes with its picture */
.bub-pic { width: min(260px, 70vw); margin: 4px 0 8px; }

/* teacher videos */
.yt-list { display: grid; gap: 10px; width: min(100%, 520px); }
.yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }
.yt-play { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; font: inherit; color: #fff;
  background: linear-gradient(120deg, #1C1715, #3A2D27); border: 0; border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 #000; }
.yt-ic { width: 44px; height: 44px; border-radius: 50%; background: #FF3D3D; display: grid; place-items: center; font-size: 17px; flex: none; }
.yt-play b { display: block; font: 800 16px/1.35 var(--display); }
.yt-play small { opacity: .75; }
.vid-form { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 8px 0 4px; }
@media (min-width: 760px) { .vid-form { grid-template-columns: 230px 1.4fr 1fr auto; } }
@media (min-width: 760px) { #link-form { grid-template-columns: 1.6fr 1fr auto; } }
.teach-h { font: 800 17px var(--display); margin: 16px 0 6px; }
.sheet-box { display: block; }
.sheet-box > details > summary { list-style: none; cursor: pointer; }
.sheet-box > details > summary::-webkit-details-marker { display: none; }
.sheet-box > details > summary h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sheet-box > details > summary h2::after { content: "▾"; font-size: 16px; color: var(--ink-2); }
.sheet-box h2 small { font: 600 12.5px/1.35 var(--body); color: var(--ink-2); background: var(--paper); padding: 5px 9px; border-radius: 999px; }

/* TV classroom mode with scenes */
.tv .p-pic .scene, .tv .p-pic .emo-tile { width: auto; height: 46vh; margin: 0 auto; font-size: 30vh; }
.tv .r-pic .scene, .tv .r-pic .emo-tile { width: 44vh; height: 33vh; font-size: 24vh; }
.tv .q-opt .scene, .tv .q-opt .emo-tile { width: 92%; height: auto; margin: 0 auto; font-size: 15vh; }
.tv .m-pic .scene, .tv .m-pic .emo-tile { width: 92%; margin: 0 auto; font-size: 9vh; }

/* ---------- child's page: My tasks, My class, bottom tabs (15/10/2026, layout learnt from Uup's student page) ---------- */
#k-tasks, #k-class, #k-stickers, #k-parents { scroll-margin-top: 88px; }
.task-tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--edge); border-radius: 16px; padding: 5px; margin-bottom: 12px; max-width: 420px; }
.task-tabs button {
  flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  font: 800 16px var(--display); cursor: pointer;
}
.task-tabs button small { font: 700 12px var(--body); margin-left: 4px; color: inherit; opacity: .8; }
.task-tabs button[aria-selected="true"] { background: var(--ok-2); color: var(--ok); }
.task-list { display: grid; gap: 10px; }
.task {
  display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "pic body go" "pic kind go"; gap: 4px 14px; align-items: center;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--edge); border-radius: 18px; color: var(--ink); text-decoration: none;
  box-shadow: var(--lift); transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.task:hover { transform: translateY(-2px); box-shadow: var(--lift-lg); color: var(--ink); }
.task-pic { grid-area: pic; width: 56px; height: 56px; border-radius: 14px; background: var(--chalk-2); display: grid; place-items: center; font-size: 28px; }
.task-body { grid-area: body; min-width: 0; }
.task-body b { display: block; font: 800 16px/1.3 var(--display); }
.task-body small { display: block; color: var(--ink-2); font-size: 13px; }
.task-note { font-style: italic; }
.task-kind { grid-area: kind; justify-self: start; font: 700 12px var(--body); padding: 2px 10px; border-radius: 999px; background: var(--ok-2); color: var(--ok); }
.task-kind.k-test { background: #FDECE8; color: var(--no); }
.task-go { grid-area: go; font: 800 15px var(--display); color: var(--chalk); white-space: nowrap; }
.task.near .task-due { color: #8A5300; font-weight: 700; }
.task.soon .task-due, .task.late .task-due { color: var(--no); font-weight: 800; }
.task.late { border-color: #F2C3B8; }
.task-empty { background: var(--card); border: 1px dashed var(--edge); border-radius: 18px; padding: 18px; text-align: center; margin: 0; font: 700 16px var(--display); }

.class-note { background: var(--sun-light); border: 1px solid #F3D29A; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.class-note b { font: 800 16px var(--display); }
.class-note p { margin: 4px 0 0; white-space: pre-line; }
.course2 { background: var(--card); border: 1px solid var(--edge); border-radius: 22px; padding: 16px; box-shadow: var(--lift); margin-bottom: 12px; }
.course2-head { display: flex; gap: 8px 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.course2-head .pills { width: 100%; }
.u-path { display: grid; gap: 10px; }
@media (min-width: 900px) { .u-path { grid-template-columns: 1fr 1fr; align-items: start; } }
.u-stage { border: 1.5px solid var(--edge); border-radius: 16px; background: var(--paper); }
.u-stage[open] { border-color: var(--ok); background: #fff; }
.u-stage summary { display: flex; gap: 14px; align-items: center; padding: 12px 14px; min-height: 72px; cursor: pointer; list-style: none; }
.u-stage summary::-webkit-details-marker { display: none; }
.u-ring {
  --p: 0; width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--ok-2) 0);
}
.u-ring span { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 12px var(--body); color: var(--ok); }
.u-stage.is-done .u-ring span { background: var(--ok); color: #fff; }
.u-name { flex: 1; min-width: 0; }
.u-name b { display: block; font: 800 16px/1.3 var(--display); }
.u-name small { color: var(--ink-2); font-size: 13px; }
.u-chev { font-size: 22px; color: var(--ink-3); transition: transform .15s var(--ease); }
.u-stage[open] .u-chev { transform: rotate(90deg); }
.u-stage .hw { padding: 0 12px 12px; }

.kid-tabs { display: none; }
@media (max-width: 899px) {
  body.has-kid-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .kid-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around;
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--edge); box-shadow: 0 -6px 24px rgba(28, 23, 21, .08);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .kid-tabs a {
    flex: 1; display: grid; justify-items: center; gap: 2px; min-height: 56px; padding: 6px 4px; border-radius: 12px;
    color: var(--ink-2); text-decoration: none; font: 700 13px var(--display);
  }
  .kid-tabs a span { font-size: 22px; line-height: 1.1; }
  .kid-tabs a:active { background: var(--ok-2); color: var(--ok); }
}
@media (prefers-reduced-motion: reduce) { .task, .u-chev { transition: none; } }

/* ---------- a teacher's own test (quiz.py): passage, audio, true/false and fill-in ---------- */
.q-ctx { width: 100%; max-width: 640px; display: grid; gap: 10px; justify-items: center; }
.q-sec { margin: 0; font: 800 15px var(--display); color: var(--chalk); }
.q-audio { width: 100%; max-width: 420px; }
.q-passage { width: 100%; max-height: 38vh; overflow-y: auto; text-align: left; background: var(--chalk-2); border-radius: 16px; padding: 14px 16px;
  font: 600 17px/1.6 var(--display); color: var(--ink); }
.q-prompt { margin: 0; font: 800 clamp(20px, 4.5vw, 28px)/1.35 var(--display); color: var(--ink); max-width: 640px; }
.q-blank { color: var(--chalk); letter-spacing: 2px; }
.fill-in { width: min(100%, 360px); min-height: 56px; border: 2px solid var(--edge); border-radius: 16px; padding: 10px 16px; text-align: center;
  font: 800 24px var(--display); color: var(--chalk); background: #fff; }
.fill-in:focus { outline: 3px solid var(--chalk); outline-offset: 2px; }

/* ---------- lessons folded by Unit (cô Linh 17/10/2026) ---------- */
.unit-groups { display: grid; gap: 12px; }
.ugroup { background: var(--card); border: 1px solid var(--edge); border-radius: 20px; box-shadow: var(--lift); }
.ugroup > summary { display: flex; gap: 14px; align-items: center; padding: 14px 18px; min-height: 72px; cursor: pointer; list-style: none; }
.ugroup > summary::-webkit-details-marker { display: none; }
.ugroup[open] > summary { border-bottom: 1px solid var(--edge); }
.ug-pic { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--chalk-2); display: grid; place-items: center; font-size: 26px; }
.ug-name { flex: 1; min-width: 0; }
.ug-name b { display: block; font: 800 18px/1.3 var(--display); }
.ug-name small { color: var(--ink-2); font-size: 13px; }
.ug-prog { display: grid; gap: 2px; justify-items: end; width: 110px; flex: none; }
.ug-prog .meter { width: 100%; height: 8px; }
.ug-prog small { font: 700 12.5px var(--body); color: var(--ink-2); }
.ug-chev { font-size: 24px; color: var(--ink-3); transition: transform .15s var(--ease); }
.ugroup[open] > summary .ug-chev { transform: rotate(90deg); }
.ugroup > .units { padding: 16px; }
.ug-extra { margin: 14px 0 0; font: 800 15px var(--display); color: var(--ink-2); }
/* a book (Pre-starters 1, 2, 3; cô Linh 01/11/2026) holds its Unit folds, set in a little on a tinted floor */
.ubook-units { display: grid; gap: 10px; padding: 12px 12px 14px 24px; background: var(--chalk-2); border-radius: 0 0 19px 19px; }
.ubook-units > .ugroup { box-shadow: none; border-radius: 16px; }
.ubook-units > .ugroup > summary { min-height: 60px; padding: 10px 14px; }
.ubook-units .ug-pic { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; background: var(--card); }
.ubook-units .ug-name b { font-size: 16px; }
@media (max-width: 560px) { .ug-prog { width: 70px; } .ugroup > summary { padding: 12px 14px; gap: 10px; }
  .ubook-units { padding: 10px 8px 10px 14px; } .ubook-units > .ugroup > .units { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .ug-chev { transition: none; } }

/* HimiLearn: a pack's own picture sits where an emoji would, at the same size */
.pic-img { width: 1em; height: 1em; object-fit: contain; vertical-align: middle; }
/* a drawn vocabulary picture (cô Linh 29/10/2026) fills its card: white like the drawing's own background. A pack's
   drawings (/goi/) too: at 1em the picture-book scenes of the Chinese lessons were stamp-sized (Huyền 07/11/2026) */
.emo-tile:has(> .pic-img:is([src*="/static/hinh/"], [src*="/goi/"])) { background: #fff; }
.emo-tile > .pic-img:is([src*="/static/hinh/"], [src*="/goi/"]) { width: 92%; height: 92%; border-radius: 12px; }

/* ---------- Chinese-only games (cô Trang's lesson 1 slides, 26/10/2026) ---------- */
.count-box { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; width: min(100%, 420px); padding: 16px;
  background: #fff; border-radius: 22px; box-shadow: var(--lift); font-size: clamp(34px, 9vw, 50px); line-height: 1.1; }
.twin-py { display: flex; align-items: center; gap: 12px; font: 800 clamp(34px, 9vw, 52px)/1.1 var(--display); color: var(--chalk); }
.opt.text.twin { min-height: 140px; }
/* the hand is the question: drawn big enough to tell 7 (pinched tips) from 9 (hooked finger) on a phone */
.prompt-pic.gest { width: min(100%, 260px); }
.prompt-pic.gest .emo-tile { aspect-ratio: 1; }
.prompt-pic.gest .pic-img { width: 88%; height: 88%; }
.opt.text.twin [lang="zh-CN"] { font-size: clamp(64px, 18vw, 96px); font-weight: 500; color: var(--ink); line-height: 1; }
.dlg { display: grid; gap: 10px; width: min(100%, 420px); }
.dlg .prompt-pic { justify-self: center; width: min(100%, 220px); }
/* on a phone the question and its answers fit one screen (Phương Dung 05/11 saw the question but not the answers) */
@media (max-width: 600px) { .dlg .prompt-pic { width: 96px; } .dlg { gap: 6px; } .dlg .bub { font-size: 24px; padding: 8px 14px; } }
/* a Chinese unit names each sticker under it */
/* mouth (Khẩu hình): two sounds side by side, each with the lips from the front and the tongue from the side */
.ph-mouths.py { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ph-mouth > b.py-ini { font: 800 44px/1 var(--display); color: var(--chalk); }
.mouth-views { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mouth-card.py svg { width: min(48%, 170px); }
.tongue-dot { fill: none; stroke: var(--crayon); stroke-width: 3; animation: tongue-dot 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tongue-dot { 50% { transform: scale(1.5); opacity: .45; } }
.py-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.py-word { padding: 6px 14px; border: 2px solid var(--card-edge); border-radius: 14px; background: #fff; font-size: 26px; line-height: 1.3; color: var(--ink); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .tongue-dot { animation: none; } }
/* join: build the word from its characters; empty boxes on top, character tiles below, the picture once it is built */
.join-q { display: grid; justify-items: center; gap: 2px; text-align: center; }
.join-q b { font: 800 24px/1.3 var(--display); color: var(--ink); }
.join-q i { font: 700 18px/1.3 var(--display); font-style: normal; color: var(--crayon); }
.join-slots, .join-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.join-slot { width: 76px; height: 76px; border: 3px dashed var(--ink-2); border-radius: 18px; background: #fff; font-size: 40px; line-height: 1; color: var(--ink); cursor: pointer; }
.join-slot:not(:empty) { border-style: solid; border-color: var(--sky); }
.join-slot.right { border-color: var(--ok); background: var(--ok-2); animation: pop .35s var(--ease); }
.join-slot.wrong { border-color: var(--no); background: #FBEAE5; animation: shake .35s; }
.join-tile { width: 68px; height: 68px; border: 3px solid var(--card-edge); border-radius: 16px; background: var(--sun-light); font-size: 36px; line-height: 1; color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--card-edge); }
.join-tile:disabled { opacity: .3; box-shadow: none; cursor: default; }
.join-pic { display: grid; justify-items: center; gap: 6px; font: 700 17px/1.4 var(--display); color: var(--ink); animation: pop .35s var(--ease); }
.join-pic .pic-img, .join-pic img { width: min(220px, 60vw); height: auto; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .join-slot.right, .join-slot.wrong, .join-pic { animation: none; } }
@media (max-width: 600px) { .join-slot { width: 64px; height: 64px; font-size: 34px; } .join-tile { width: 58px; height: 58px; font-size: 30px; } }
/* flip: six pairs face down under the panda card back; a picture fills its card; a pair found stays up in green */
.flip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: min(100%, 560px); }
.flip-card { position: relative; aspect-ratio: 1; min-height: 88px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 700px; }
.flip-back, .flip-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; overflow: hidden;
  border-radius: 16px; backface-visibility: hidden; transition: transform .4s var(--ease); box-shadow: var(--lift); }
.flip-back { background: #B3261E; }
.flip-back img, .flip-face.pic .pic-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flip-face { background: #fff; color: var(--ink); transform: rotateY(180deg); padding: 4px; }
.flip-face.pic { padding: 0; align-content: end; }
.flip-card.up .flip-back { transform: rotateY(-180deg); }
.flip-card.up .flip-face { transform: rotateY(0); }
.flip-card.done .flip-face { outline: 4px solid var(--ok); outline-offset: -4px; }
.flip-han { font-size: 30px; line-height: 1.2; }
.flip-emo { font-size: 44px; line-height: 1; margin-bottom: auto; padding-top: 14%; }
.flip-vi { position: relative; width: 100%; padding: 2px 4px; font: 700 12px/1.35 var(--display); text-align: center; color: var(--ink); background: rgba(255, 255, 255, .9); }
@media (prefers-reduced-motion: reduce) { .flip-back, .flip-face { transition: none; } }
@media (max-width: 600px) { .flip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
/* an answer is a whole sentence: one per row, so it stays on one line */
.opt.text.ans { grid-column: 1 / -1; min-height: 60px; padding: 6px 12px; }
.opt.text.ans [lang="zh-CN"] { font-size: 1.1em; }
.stk-cell { display: grid; justify-items: center; gap: 2px; width: 68px; }
.stk-name { font-size: 12px; line-height: 1.3; text-align: center; color: var(--ink-2); }
.dlg-row { display: flex; align-items: center; gap: 10px; }
.dlg-row.b { justify-content: flex-end; }
.dlg .who { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--chalk-2);
  color: var(--chalk); font: 800 16px/1 var(--display); }
.dlg-row.b .who { order: 2; }
.dlg .bub { border: 0; border-radius: 18px; padding: 10px 18px; background: #fff; box-shadow: var(--lift); font-size: 28px; color: var(--ink); cursor: pointer; }
.dlg .bub.b { background: var(--chalk-2); color: var(--ink-2); cursor: default; min-width: 96px; text-align: center; }
.hz-head { display: flex; align-items: center; gap: 10px; font: 800 30px/1 var(--display); color: var(--chalk); }
.hz-box { position: relative; background: #fff; border-radius: 18px; box-shadow: var(--lift); touch-action: none; line-height: 0; }
.hz-grid { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--crayon); stroke-width: .6; opacity: .35; }
.hz-grid path { stroke-dasharray: 3 3; }
.hz-box > svg:not(.hz-grid) { position: relative; }
/* reading line by line, and acting out a dialogue (role): the child's own lines on the right, as in a chat */
.story-who { margin: 0; font: 700 18px/1.3 var(--display); color: var(--ink-2); }
.role-pic { display: block; width: 72px; margin: 0 auto 4px; }
.role-log { display: grid; gap: 10px; width: min(100%, 460px); max-height: 46vh; overflow-y: auto; padding: 4px; }
.rl { display: grid; justify-items: start; gap: 2px; opacity: .6; }
.rl.me { justify-items: end; }
.rl.now { opacity: 1; }
.rl-who { font: 700 14px/1.4 var(--display); color: var(--ink-2); }
.rl-bub { background: #fff; border-radius: 18px; padding: 8px 16px; box-shadow: var(--lift); font-size: 26px; line-height: 1.5; color: var(--ink); }
.rl.me .rl-bub { background: var(--chalk-2); }
.rl.now .rl-bub { outline: 3px solid var(--uc, var(--chalk)); }

/* sing along (song): the line being sung lights up; a tap replays it */
.song-pic { width: 112px; }
.watch { display: block; width: 100%; max-height: 68vh; border-radius: 16px; background: #000; }
.watch-title { margin: 4px 0 2px; }
.watch-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 6px; }
.watch-pick .btn { min-height: 44px; padding: 6px 14px; font-size: 14.5px; }
.song { list-style: none; margin: 0; padding: 4px; display: grid; gap: 8px; width: min(100%, 520px); max-height: 46vh; overflow-y: auto; }
.song li { display: grid; justify-items: center; gap: 2px; }
.song .vi { margin: 0; font-size: 15px; }
.song-line { min-height: 44px; border: 0; border-radius: 18px; padding: 6px 18px; background: #fff; box-shadow: var(--lift);
  font-size: 26px; line-height: 1.5; color: var(--ink); opacity: .6; cursor: pointer; transition: transform .2s, opacity .2s; }
.song li.now .song-line { opacity: 1; outline: 3px solid var(--uc, var(--chalk)); transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .song-line { transition: none; } .song li.now .song-line { transform: none; } }

/* Exam practice and grammar topics (/tieng-anh/luyen-de, /tieng-anh/ngu-phap, cô Linh 28/10/2026) */
.practice-list { display: grid; gap: 26px; margin-top: 8px; }
.practice-list .vi-help { max-width: 70ch; }
.psets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.pset { background: var(--card); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--lift); padding: 16px; display: grid; gap: 12px; }
.pset header { display: flex; gap: 12px; align-items: center; }
.pset header .pic { font-size: 40px; line-height: 1; }
.pset h3 { margin: 0; font: 800 19px/1.25 var(--display); color: var(--chalk); }
.papers { display: grid; gap: 8px; }
.pp-paper, .gtopic { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 12px; border-radius: 16px;
  background: var(--chalk-2); color: var(--ink); text-decoration: none; }
.pp-paper > span:nth-child(2), .gtopic > span:nth-child(2) { flex: 1; display: grid; }
.pp-paper small, .gtopic small { color: var(--ink-2); font: 500 13px/1.4 var(--body); }
.pp-paper .ic { font-size: 26px; }
a.pp-paper:hover, a.gtopic:hover { outline: 2px solid var(--chalk); }
a.pp-paper:focus-visible, a.gtopic:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
.pp-paper.locked, .gtopic.locked { opacity: .6; }
.best { font: 800 15px/1 var(--display); color: var(--ok); background: var(--ok-2); padding: 6px 9px; border-radius: 999px; }
.best.gold { color: var(--gold); background: var(--sun-light); }
.gtopics { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.gtopic .no { font: 800 17px/1 var(--display); color: var(--chalk); background: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.gtopic b { color: var(--chalk); }
.part-list { text-align: left; max-width: 560px; margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.part-list li { background: var(--chalk-2); border-radius: 14px; padding: 8px 12px; }
.part-list small { display: block; color: var(--ink-2); font-size: 13px; }
.part-card { display: grid; gap: 6px; justify-items: center; max-width: 520px; }
.part-card h3 { margin: 0; font: 800 34px/1.1 var(--display); color: var(--chalk); }
.name-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.name-chips span { font: 700 15px/1.3 var(--display); padding: 5px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.name-chips span.on { background: var(--chalk); color: #fff; }
/* A scene: emoji laid out on sky and grass (outdoors) or a wall and floor (home), positions in percent. */
.ex-scene { position: relative; width: min(100%, 640px); aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden;
  background: linear-gradient(#DDEFFF 0 42%, #DDEFCF 42%); border: 1px solid var(--edge); }
.ex-scene.home { background: linear-gradient(#FFF4E2 0 58%, #EBD9BC 58%); }
.sc-o { position: absolute; transform: translate(-50%, -50%); font-size: calc(clamp(22px, 5.6vw, 40px) * var(--s, 1)); line-height: 1;
  background: none; border: 0; padding: 4px; border-radius: 16px; white-space: nowrap; color: inherit; }
button.sc-o { cursor: pointer; }
button.sc-o:hover { background: rgba(255, 255, 255, .55); }
button.sc-o:focus-visible { outline: 3px solid var(--chalk); outline-offset: 1px; }
.sc-o.sel { background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 3px var(--chalk); }
/* drawn practice-test pictures (cô Linh 30/10/2026): a person or thing a little larger than its emoji, a story panel
   and a picture answer filling their box, a drawn background covering the scene */
.ex-scene.drawn { background-size: cover; background-position: center; }
.sc-o .pic-img[src*="/static/hinh/"] { width: 1.9em; height: 1.9em; }
.panels figure .pic-img[src*="/static/hinh/"] { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; }
.opt.pic .pic-img:is([src*="/static/hinh/"], [src*="/goi/"]) { width: 2.6em; height: 2.6em; }
.pset-docs { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--edge); font-size: 14px; }
.pset-link { display: flex; gap: 6px; flex-wrap: wrap; }
.pset-link input { flex: 1 1 14em; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--edge); border-radius: 10px; font-size: 15px; }
.sc-o.painted { background: color-mix(in srgb, var(--paint) 60%, transparent); box-shadow: 0 0 0 3px var(--paint); }
.sc-o .tag { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font: 800 12px/1.2 var(--display); color: #fff;
  background: var(--chalk); padding: 2px 7px; border-radius: 8px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.sw { display: grid; justify-items: center; gap: 3px; border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 6px 8px;
  font: 700 13px/1.2 var(--display); color: var(--ink); cursor: pointer; min-width: 52px; }
.sw i { width: 28px; height: 28px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.sw.on { border-color: var(--chalk); }
.sw:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
.q-pic { font-size: 96px; line-height: 1; }
.q-pic.card { background: #fff; border: 1px solid var(--edge); border-radius: 22px; padding: 18px 26px; box-shadow: var(--lift); }
.q-prompt.big { font-size: clamp(28px, 7vw, 44px); color: var(--chalk); }
.q-passage mark { background: none; color: var(--chalk); font-weight: 800; }
.q-passage mark.cur { background: var(--sun-light); outline: 2px solid var(--star); border-radius: 6px; }
.opts.box { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 620px); }
.opts.box .opt { font-size: 38px; min-height: 84px; }
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(100%, 620px); }
.panels figure { margin: 0; background: #fff; border: 1px solid var(--edge); border-radius: 16px; padding: 10px 4px 6px; font-size: clamp(24px, 6vw, 38px); line-height: 1.15; }
.panels figcaption { font: 800 13px/1.3 var(--display); color: var(--ink-2); margin-top: 6px; }
.pp-review { width: 100%; max-width: 620px; text-align: left; display: grid; gap: 10px; }
.pp-review h4 { margin: 0 0 4px; font: 800 16px/1.3 var(--display); }
.pp-review h4 small { font: 500 13px/1.4 var(--body); color: var(--ink-2); }
.pp-review ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pp-review li { display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; padding: 6px 10px; border-radius: 12px; background: var(--ok-2); }
.pp-review li.no { background: #FBEAE5; }
.pp-review li small { grid-column: 2; color: var(--ink-2); }
.pp-review .mark { font-weight: 800; color: var(--ok); }
.pp-review li.no .mark { color: var(--no); }
.gram { align-items: stretch; text-align: left; }
.gram h2 { font: 800 19px/1.3 var(--display); margin: 0 0 8px; }
.explain { background: var(--sun-light); border-radius: 18px; padding: 14px 16px; }
.explain p { margin: 0 0 10px; line-height: 1.6; max-width: 70ch; }
.forms { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.forms li { background: #fff; border-radius: 10px; padding: 5px 10px; color: var(--chalk); font-weight: 700; }
.examples { display: grid; gap: 8px; }
.gx { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; background: var(--chalk-2); border-radius: 14px; padding: 8px 12px; }
.gx .pic { font-size: 30px; }
.gx p { margin: 0; font-weight: 700; color: var(--chalk); font-size: 18px; }
.gx small { color: var(--ink-2); }
.gram > .btn { align-self: center; }
.feedback { display: grid; gap: 4px; padding: 10px 14px; border-radius: 14px; max-width: 520px; width: 100%; }
.feedback.ok { background: var(--ok-2); color: var(--ok); }
.feedback.no { background: #FBEAE5; color: var(--no); }
.feedback small { color: var(--ink-2); font-size: 14px; }
.tile[disabled] { opacity: .3; cursor: default; }
@media (max-width: 520px) { .opts.box { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sc-o { padding: 2px; } }
