/* English with Khoa: skin for the student side (home, lesson player, sign-in).
   Loaded after app.css. White page, neutral greys, one green for action, solid colour per unit. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

:root {
  --bg: #fff; --surface: #fff; --sunken: #f4f5f7;
  --ink: #232a36; --ink-2: #485060; --ink-3: #6a7282; --ink-4: #a8aeb9;
  --line: #e4e6ea; --line-2: #eef0f2;
  --accent: #12a150; --accent-2: #0c7c3c; --accent-soft: #e4f7eb; --accent-line: #a9e2bf;
  --green: #12a150; --green-d: #0c7c3c; --green-soft: #e4f7eb; --green-line: #a9e2bf;
  --blue: #1683e6; --blue-d: #0f66b8; --blue-soft: #e4f2fe; --blue-line: #a6d4fb;
  --yellow: #ffc21a; --yellow-d: #d99a00; --amber: #8a5a00; --amber-soft: #fff4d1; --amber-line: #ffdc73;
  --red: #e5484d; --red-d: #c0353a; --red-soft: #ffe8e8; --red-line: #ffbcbd;
  --pink: #e0397e; --pink-d: #b8245f; --orange: #ff8a1f; --orange-d: #d96c08; --purple: #8b5cf6; --purple-d: #6d3fe0;
  --r: 18px; --r-s: 14px;
  --shadow: none;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Nunito", "Segoe UI", system-ui, sans-serif;
}
html { background: #fff; }
body { background: #fff; font: 700 16px/1.5 "Nunito", "Segoe UI", system-ui, sans-serif; color: var(--ink); }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0; font-weight: 900; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 16.5px; line-height: 1.3; font-weight: 800; }
.small { font-size: 14px; }
.muted { color: var(--ink-3); }
.strong { font-weight: 800; }
a { color: var(--blue-d); font-weight: 800; }
.pi { width: 24px; height: 24px; flex: none; display: block; }

/* ---------- controls ---------- */
.btn { height: 48px; padding: 0 20px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--blue-d); font: 800 15.5px "Nunito", sans-serif; letter-spacing: .02em; box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s, filter .15s; cursor: pointer; }
.btn:hover { background: #fff; filter: brightness(.97); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.btn.primary, .btn.green { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-2); }
.btn.primary:hover, .btn.green:hover { background: var(--accent); filter: brightness(1.06); }
.btn.primary:active, .btn.green:active { box-shadow: 0 0 0 var(--accent-2); }
.btn.white { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.btn.white:active { box-shadow: 0 0 0 rgba(0, 0, 0, .22); }
.btn.go { background: var(--yellow); border-color: var(--yellow); color: #3d2c00; box-shadow: 0 4px 0 var(--yellow-d); }
.btn.go:active { box-shadow: 0 0 0 var(--yellow-d); }
.btn.ghost { border-color: transparent; box-shadow: none; color: var(--ink-3); }
.btn.ghost:active { transform: none; }
.btn.s { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 13px; box-shadow: 0 3px 0 var(--line); }
.btn.l { height: 54px; padding: 0 30px; font-size: 17px; border-radius: 17px; }
.btn:disabled { filter: grayscale(.7); opacity: .5; transform: none; }
.btn:focus-visible, .input:focus-visible, .seg button:focus-visible, .switch:focus-visible, .node:focus-visible, .pnav a:focus-visible, .ptabs a:focus-visible, .flip:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.input { min-height: 48px; border: 2px solid var(--line); border-radius: var(--r-s); font-weight: 700; padding: 9px 12px; background: var(--sunken); }
.input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.field > span { font-size: 14.5px; font-weight: 800; color: var(--ink-2); }
.seg { background: var(--sunken); border-radius: 14px; padding: 4px; }
.seg button { border-radius: 11px; font: 800 14px "Nunito", sans-serif; min-height: 38px; }
.seg button.on { box-shadow: 0 2px 0 var(--line); color: var(--blue-d); }
.switch { width: 44px; height: 26px; }
.switch::after { width: 20px; height: 20px; top: 3px; left: 3px; }
.switch.on::after { transform: translateX(18px); }

/* ---------- surfaces ---------- */
.card { border: 2px solid var(--line); border-radius: var(--r); box-shadow: none; background: #fff; }
.card.pad { padding: 18px 20px; }
.card > header { padding: 14px 18px; border-bottom: 2px solid var(--line-2); }
.card > .body { padding: 16px 18px; }
.badge { height: 26px; padding: 0 10px; font-size: 12.5px; font-weight: 800; }
.badge.green { background: var(--green-soft); color: var(--green-d); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue-d); }
.bar { height: 14px; background: var(--sunken); overflow: hidden; }
.bar > i { background: var(--accent); transition: width .5s var(--bounce); }
.bar > b { display: none; }
.note { border-radius: var(--r-s); font-weight: 700; }
.note.fb { background: var(--green-soft); color: #0a5a2c; }
.list > * { padding: 12px 18px; border-bottom: 2px solid var(--line-2); }
.list > a { color: var(--ink); font-weight: 700; }
.list > a:hover { background: var(--sunken); text-decoration: none; }
.n { width: 30px; height: 30px; border-radius: 10px; font-size: 13.5px; font-weight: 800; }
.n.done { background: var(--accent); }
.empty { font-weight: 700; }
.empty b { font-size: 17px; }
.tabs { border-bottom: 2px solid var(--line); }
.tabs a { font-weight: 800; font-size: 14.5px; border-bottom-width: 3px; margin-bottom: -2px; }
.tabs a.on { color: var(--blue-d); border-color: var(--blue); }
dialog { border-radius: 24px; border: 2px solid var(--line); }
dialog footer { border-top: 2px solid var(--line-2); }
.toast { background: var(--ink); border-radius: 14px; font-weight: 800; animation: pop .3s var(--bounce); }
.toast.bad { background: var(--red); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 14px) scale(.9); } }
@keyframes pop2 { from { opacity: 0; transform: scale(.92); } }
.rec { border: 2px dashed var(--blue-line); border-radius: 16px; background: var(--blue-soft); padding: 14px; }
.rec.live { border-style: solid; border-color: var(--red-line); background: var(--red-soft); }
.rec .live-dot { width: 14px; height: 14px; }
.rec .btn[data-a=start] { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-d); }
.rec .time { font: 900 18px "Nunito", sans-serif; }
.chart .line, .chart .dot { stroke: var(--accent); }
.chart text { font: 700 10.5px "Nunito", sans-serif; }
audio { width: 100%; max-width: 360px; height: 40px; }

/* ---------- brand ---------- */
.plogo { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.plogo:hover { text-decoration: none; }
.plogo .mark { width: 40px; height: 40px; flex: none; transition: transform .3s var(--bounce); }
.plogo:hover .mark { transform: rotate(-8deg) scale(1.06); }
.plogo span { font: 900 19px/1.1 "Nunito", sans-serif; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.plogo b { color: var(--accent); font-weight: 900; }

/* ---------- app frame ---------- */
.papp { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.pnav { position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.pnav .plogo { padding: 0 8px 20px; }
.pnav a.t { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 12px; border: 2px solid transparent; border-radius: 14px; color: var(--ink-3); font: 800 15px "Nunito", sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.pnav a.t .pi { width: 30px; height: 30px; }
.pnav a.t:hover { background: var(--sunken); text-decoration: none; }
.pnav a.t.on { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-d); }
[data-tab=learn] .pi { color: var(--accent); } [data-tab=homework] .pi { color: var(--blue); } [data-tab=me] .pi { color: var(--orange); }
.cnt { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 13px; display: grid; place-items: center; letter-spacing: 0; }
.pnav .out { margin-top: auto; }
.quiet { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-3); font-weight: 800; font-size: 14px; }
.quiet:hover { background: var(--sunken); text-decoration: none; color: var(--ink-2); }
.quiet.on { color: var(--blue-d); background: var(--blue-soft); }
.pmain { min-width: 0; padding: 28px 28px 60px; }
.pcols { max-width: 1010px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 32px; row-gap: 22px; align-items: start; }
.phead, .ppath { grid-column: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ppath { gap: 10px; }
.pside { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pone { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.pone.wide { max-width: 860px; }
.ptop, .ptabs { display: none; }
.sec { margin-top: 12px; }
.lead { font-size: 15.5px; font-weight: 700; margin-top: -8px; }
.sum { color: var(--ink-2); margin-top: 6px; font-weight: 600; }
.k { font: 800 12.5px "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cline { display: flex; align-items: center; gap: 14px; }
.tile { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.tile .pi { width: 30px; height: 30px; }
.tile.g { background: var(--green-soft); color: var(--accent); } .tile.y { background: var(--amber-soft); color: var(--yellow-d); } .tile.o { background: #ffeedd; color: var(--orange); }
.bigv { font: 900 26px/1.1 "Nunito", sans-serif; }
.foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 14.5px; }
.back .ico { transform: rotate(180deg); }
.hello p { color: var(--ink-3); font-weight: 700; }
.hello.row { display: flex; align-items: center; gap: 14px; }
.pbanner { background: var(--amber-soft); border: 2px solid var(--amber-line); border-radius: 16px; padding: 10px 14px; font-weight: 800; color: #5f3d00; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.avatar-l { width: 60px; height: 60px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 900 28px "Nunito", sans-serif; box-shadow: 0 4px 0 var(--accent-2); }

/* numbers */
.chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip { border: 2px solid var(--line); border-radius: 16px; padding: 12px 8px 10px; text-align: center; }
.chip > .pi { width: 30px; height: 30px; margin: 0 auto 2px; }
.chip b { display: block; font: 900 24px/1.15 "Nunito", sans-serif; }
.chip span { font-size: 12px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.c-fire { color: var(--orange); } .c-star { color: var(--yellow); } .c-bolt { color: var(--blue); }
.mini { display: inline-flex; align-items: center; gap: 4px; font: 900 17px "Nunito", sans-serif; }
.mini .pi { width: 24px; height: 24px; }

/* mission */
.mission { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #fff; background: var(--accent); box-shadow: 0 5px 0 var(--accent-2); }
.mission.hw { background: var(--blue); box-shadow: 0 5px 0 var(--blue-d); }
.mission .k { color: #fff; opacity: .92; }
.mission h2 { font-size: 26px; line-height: 1.15; color: #fff; }
.mission p { font-weight: 700; color: #fff; }
.mission .art { position: absolute; right: -26px; bottom: -40px; width: 200px; height: 200px; color: #fff; opacity: .16; transform: rotate(-14deg); }
.mission .inside { position: relative; z-index: 1; display: grid; gap: 14px; }
.mission .btn { justify-self: start; min-width: 160px; }
.mission:not(.hw) .btn.white { color: var(--accent-2); } .mission.hw .btn.white { color: var(--blue-d); }
.mrow { display: flex; align-items: center; gap: 14px; }
.mtile { width: 58px; height: 58px; flex: none; border-radius: 18px; background: #fff; display: grid; place-items: center; color: var(--accent); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.mission.hw .mtile { color: var(--blue); }
.mtile .pi { width: 34px; height: 34px; }

/* daily goal */
.goal { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: var(--sunken); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s var(--bounce); }
.ring text { font: 900 22px "Nunito", sans-serif; fill: var(--ink); }
.week { display: flex; gap: 6px; justify-content: space-between; }
.week div { flex: 1; text-align: center; font-size: 11.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; }
.week i { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 36px; margin: 0 auto 3px; border-radius: 50%; background: var(--sunken); color: #fff; }
.week .on i { background: var(--orange); }
.week i .pi { width: 18px; height: 18px; }
.week .today { color: var(--ink); }
.week .today i { outline: 3px solid var(--line); outline-offset: 2px; }

/* ---------- learning path ---------- */
.unit { display: flex; flex-direction: column; gap: 4px; }
details.unit { display: block; }
details.unit > summary { list-style: none; cursor: pointer; border-radius: 18px; }
details.unit > summary::-webkit-details-marker { display: none; }
details.unit > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.uhead { border-radius: 18px; padding: 16px 18px; color: #fff; background: var(--uc); box-shadow: 0 5px 0 var(--ud); display: flex; align-items: center; gap: 14px; }
.uhead .num { font: 800 13px "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .95; }
.uhead h2 { font-size: 22px; color: #fff; }
.uhead p { font-size: 14.5px; font-weight: 700; opacity: .95; }
.uhead .pill { margin-left: auto; flex: none; background: rgba(255, 255, 255, .24); border-radius: 99px; padding: 5px 12px; font: 800 14px "Nunito", sans-serif; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.uhead .pill .pi { width: 18px; height: 18px; }
.unit.locked .uhead { background: var(--sunken); box-shadow: none; border: 2px solid var(--line); color: var(--ink-3); padding: 12px 16px; }
.unit.locked .uhead h2 { color: var(--ink-3); font-size: 18px; }
.unit.locked .pill { background: #fff; border: 2px solid var(--line); color: var(--ink-3); }
.path { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 0 18px; }
.nwrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateX(var(--dx, 0)); }
.nwrap.has-start { margin-top: 36px; }
.node { position: relative; width: 76px; height: 70px; border-radius: 50%; background: var(--uc); color: #fff; box-shadow: 0 8px 0 var(--ud); display: grid; place-items: center; transition: transform .1s, box-shadow .1s, filter .15s; margin-bottom: 8px; }
.node .pi { width: 36px; height: 36px; transition: transform .25s var(--bounce); }
.node:hover { filter: brightness(1.06); }
.node:hover .pi { transform: scale(1.14) rotate(-6deg); }
.node:active { transform: translateY(8px); box-shadow: 0 0 0 var(--ud); }
.node.done { background: var(--yellow); box-shadow: 0 8px 0 var(--yellow-d); }
.node.done:active { box-shadow: 0 0 0 var(--yellow-d); }
.node.next::before { content: ""; position: absolute; inset: -9px -9px -15px; border-radius: 50%; border: 4px solid var(--line); }
.tick { position: absolute; right: -4px; bottom: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; border: 3px solid #fff; display: grid; place-items: center; }
.tick .pi { width: 14px; height: 14px; }
.nlabel { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.startb { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ud); border: 2px solid var(--line); border-radius: 12px; padding: 5px 13px; font: 900 14px "Nunito", sans-serif; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; animation: bob 1.4s ease-in-out infinite; z-index: 2; }
.startb::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 9px; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%); transform: translateX(-50%); }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }
.lockmsg { text-align: center; color: var(--ink-3); font-weight: 800; padding: 4px 0 10px; }

/* homework */
.hwnote.open { border-color: var(--blue-line); }
.hwnote.open > header { background: var(--blue-soft); border-color: var(--blue-line); border-radius: 16px 16px 0 0; }
.tavatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font: 900 20px "Nunito", sans-serif; flex: none; }
.hwnote:not(.open) .tavatar { background: var(--ink-4); }
.hwtext { font-size: 18px; font-weight: 800; line-height: 1.4; }
.bubble { background: var(--green-soft); border: 2px solid var(--green-line); border-radius: 16px; padding: 12px 14px; font-weight: 700; color: #0a5a2c; }
.bubble b { display: block; font: 800 12.5px "Nunito", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--green-d); margin-bottom: 2px; }

/* sentences to fix */
.flip { display: block; width: 100%; text-align: left; border: 2px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--line); padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; transition: transform .08s, box-shadow .08s; }
.flip:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.flip .w { color: var(--red-d); font-weight: 800; font-size: 17px; }
.flip .r { color: var(--green-d); font-weight: 800; font-size: 17px; margin-top: 4px; display: none; }
.flip .hint { font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.flip.open { border-color: var(--green-line); background: var(--green-soft); box-shadow: 0 4px 0 var(--green-line); }
.flip.open .w { text-decoration: line-through; opacity: .75; font-size: 15px; }
.flip.open .r { display: block; animation: pop2 .3s var(--bounce); }
.flip.open .hint { display: none; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------- lesson player (class.html) ---------- */
.cl, .cl .ctop { background: #fff; }
.ctop { border-bottom: 2px solid var(--line); }
.ctop .ttl b { font: 900 18px "Nunito", sans-serif; }
.ctop .ttl span { font-size: 14px; font-weight: 700; }
.ctop .back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--ink-3); }
.ctop .back:hover { background: var(--sunken); color: var(--ink); }
.ctop .back .ico { width: 24px; height: 24px; stroke-width: 2.6; }
.rail .nav a { height: 48px; border-radius: 14px; font-weight: 800; font-size: 15px; }
.rail .nav a.on { background: var(--blue-soft); color: var(--blue-d); }
.rail .nav .n { width: 28px; height: 28px; border-radius: 50%; font-size: 13px; }
.rail .nav a.on .n { background: var(--blue); }
.shead .k { color: var(--accent-2); font-size: 13px; }
.shead h1 { font-size: 30px; }
.shead p { font-weight: 700; }
.cl .card > header h2 { font-size: 19px; }
.cfoot { border-top: 2px solid var(--line); }
.cfoot .btn.primary { height: 52px; padding: 0 28px; font-size: 16.5px; }
.pbtn { width: 46px; height: 46px; border: 0; background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-d); transition: transform .08s, box-shadow .08s; }
.pbtn:hover { background: var(--blue); filter: brightness(1.08); }
.pbtn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--blue-d); }
.pbtn.on { background: var(--red); box-shadow: 0 4px 0 var(--red-d); }
.cl .btn.primary[data-say] { background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }
.warm li, .rule, .line span.t, .model { font-size: 17px; font-weight: 700; }
.vrow .strong, .vrow b { font-size: 18px; }
.vrow .vi { color: var(--blue-d); font-weight: 800; }
.script, .readtext { font-size: 18px; line-height: 1.75; font-weight: 700; }
.script mark { background: var(--amber-soft); color: #6b4500; border-radius: 6px; padding: 0 4px; font-weight: 800; }
.trap { border-width: 2px; }
.qq { font: 900 22px/1.35 "Nunito", sans-serif; }
.opt { min-height: 56px; border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--line); font-weight: 800; font-size: 16.5px; background: #fff; transition: transform .08s, box-shadow .08s; }
.opt:hover { background: var(--sunken); }
.opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.opt .l { width: 30px; height: 30px; border-radius: 10px; font-weight: 800; font-size: 13.5px; }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 4px 0 var(--blue-line); color: var(--blue-d); }
.opt.ok { border-color: var(--accent); background: var(--green-soft); box-shadow: 0 4px 0 var(--green-line); animation: yes .45s var(--bounce); }
.opt.ok .l { background: var(--accent); color: #fff; }
.opt.no { border-color: var(--red); background: var(--red-soft); box-shadow: 0 4px 0 var(--red-line); animation: nope .35s; }
@keyframes yes { 40% { transform: scale(1.03); } }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.qres .big { font: 900 52px/1.05 "Nunito", sans-serif; color: var(--accent); }
.qf .qtext { font: 900 36px/1.2 "Nunito", sans-serif; }
.qf .tbar { height: 16px; }
.qf .tbar i { background: var(--yellow); }
.qf .secs { font: 900 34px "Nunito", sans-serif; }
.qf .sum { font: 900 52px/1.05 "Nunito", sans-serif; color: var(--accent); }
.task { font: 900 24px/1.3 "Nunito", sans-serif; }
.prep > div { border: 2px solid var(--line); background: #fff; border-radius: 14px; }
.prep > div:nth-child(1) b i { background: var(--blue); } .prep > div:nth-child(2) b i { background: var(--pink-d); }
.prep > div:nth-child(3) b i { background: var(--orange-d); } .prep > div:nth-child(4) b i { background: var(--accent); }
.prep b i { width: 26px; height: 26px; border-radius: 9px; font-size: 14px; }
.prep span { font-size: 14px; font-weight: 700; }
.chips span { border: 2px solid var(--blue-line); background: var(--blue-soft); color: var(--blue-d); font-weight: 800; font-size: 15px; padding: 8px 14px; }
.stages button { border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); border-radius: 14px; font-weight: 800; background: #fff; }
.stages button.on { border-color: var(--yellow-d); background: var(--amber-soft); color: #5f3d00; box-shadow: 0 3px 0 var(--amber-line); }
.clock { font: 900 76px/1 "Nunito", sans-serif; }
.tm-bar { height: 14px; } .tm-bar i { background: var(--yellow); }
.grow-item { border: 0; padding: 10px 14px; border-radius: 14px; background: var(--blue-soft); }
.stateview .card { border-radius: 24px; }
.burst { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; background: var(--amber-soft); color: var(--yellow-d); display: grid; place-items: center; animation: pop2 .5s var(--bounce); }
.burst .pi { width: 54px; height: 54px; }
.burst.g { background: var(--green-soft); color: var(--accent); } .burst.b { background: var(--blue-soft); color: var(--blue); }
.unitdone { text-align: center; justify-items: center; } .unitdone .row { justify-content: center; } .unitdone h1 { font-size: 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pcols { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .pside { grid-column: 1; grid-row: auto; position: static; }
  .only-wide { display: none; }
}
@media (max-width: 900px) {
  .papp { grid-template-columns: 1fr; }
  .pnav { display: none; }
  .pmain { padding: 14px 16px 104px; }
  .ptop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 2px solid var(--line); padding: 8px 16px; margin: -14px -16px 16px; }
  .ptop .plogo .mark { width: 34px; height: 34px; } .ptop .plogo span { font-size: 17px; }
  .ptop .right { display: flex; gap: 12px; }
  .ptabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 2px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .ptabs a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 2px solid transparent; border-radius: 14px; font: 800 11.5px "Nunito", sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); position: relative; }
  .ptabs a .pi { width: 28px; height: 28px; }
  .ptabs a.on { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-d); }
  .ptabs a:hover { text-decoration: none; }
  .ptabs .cnt { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 20px; height: 20px; font-size: 12px; padding: 0 5px; }
  h1 { font-size: 25px; }
  .mission { padding: 18px; } .mission h2 { font-size: 23px; }
  .mission .art { width: 160px; height: 160px; }
  .mtile { width: 50px; height: 50px; border-radius: 15px; } .mtile .pi { width: 30px; height: 30px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .pone.wide .tiles { grid-template-columns: 1fr; }
  .hide-phone { display: none; }
  .uhead { padding: 14px; } .uhead h2 { font-size: 20px; }
  .qf .qtext { font-size: 30px; } .clock { font-size: 62px; } .task { font-size: 21px; } .shead h1 { font-size: 26px; }
  .cfoot { border-top: 2px solid var(--line); background: #fff; }
  .cfoot .btn { height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .startb, .burst { animation: none !important; } }

/* lesson player: step strip (icons, not text tabs) */
.rail .nav .n { width: 34px; height: 34px; border-radius: 50%; background: var(--sunken); color: var(--ink-3); display: grid; place-items: center; }
.rail .nav .n .pi { width: 18px; height: 18px; }
.rail .nav .n.done { background: var(--accent); color: #fff; }
.rail .nav a.on .n { background: var(--blue); color: #fff; }
.rail .nav a { height: 52px; gap: 12px; }
@media (max-width: 900px) {
  .ctabs { border: 0; padding: 2px 18px 10px; gap: 0; justify-content: space-between; align-items: center; overflow: visible; }
  .ctabs a { flex: 1; min-height: 44px; padding: 0; margin: 0; border: 0; display: flex; align-items: center; justify-content: center; position: relative; }
  .ctabs a .lb { display: none; }
  .ctabs a .n { width: 38px; height: 38px; border-radius: 50%; background: var(--sunken); color: var(--ink-4); display: grid; place-items: center; position: relative; z-index: 1; transition: transform .2s var(--bounce); }
  .ctabs a .n .pi { width: 20px; height: 20px; }
  .ctabs a.done .n { background: var(--accent); color: #fff; }
  .ctabs a.on .n { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); transform: scale(1.08); }
  .ctabs a + a::before { content: ""; position: absolute; left: -50%; right: 50%; top: 50%; height: 4px; margin-top: -2px; background: var(--sunken); }
  .ctabs a.done + a::before { background: var(--accent); }
}

/* home: dotted trail behind the step buttons */
.path { position: relative; }
.trail { position: absolute; left: 0; top: 0; pointer-events: none; }
.trail path { fill: none; stroke: var(--line); stroke-width: 7; stroke-linecap: round; stroke-dasharray: .1 13; }
.path { gap: 24px; }
.nwrap { z-index: 1; }
.nlabel { background: #fff; padding: 0 8px; border-radius: 8px; }

/* lesson player: quiz */
.qhead { gap: 12px; margin-bottom: 16px; }
.qhead .bar { height: 12px; }
.qn { font: 800 14px "Nunito", sans-serif; color: var(--ink-3); white-space: nowrap; }
.opts { gap: 10px; }
.qfb { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; font-size: 16px; animation: pop2 .25s var(--bounce); }
.qfb .pi { width: 26px; height: 26px; }
.note.fb.qfb .pi { color: var(--accent); }
.note.bad.qfb { color: #7a1b1f; }
.note.bad.qfb .pi { color: var(--red); }
.qact .btn { min-width: 180px; }
.qact .btn:disabled { background: var(--sunken); border-color: var(--line); color: var(--ink-4); box-shadow: 0 4px 0 var(--line); filter: none; opacity: 1; }
@media (max-width: 900px) { .qact .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .qfb { animation: none; } }

/* audio player for recordings */
.ap { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; }
.ap-b { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 var(--blue-d); cursor: pointer; margin-bottom: 4px; transition: transform .08s, box-shadow .08s; }
.ap-b:active { transform: translateY(4px); box-shadow: 0 0 0 var(--blue-d); }
.ap-b:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.ap-b .pi { width: 20px; height: 20px; }
.ap-t { flex: 1; height: 10px; border-radius: 99px; background: var(--sunken); overflow: hidden; cursor: pointer; }
.ap-t i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; }
.ap-s { font: 800 14px "Nunito", sans-serif; color: var(--ink-3); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* recorder: one big round button */
.rec { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-radius: 18px; padding: 16px; }
.recbtn { width: 68px; height: 68px; flex: none; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 5px 0 var(--blue-d); cursor: pointer; margin-bottom: 5px; transition: transform .08s, box-shadow .08s; }
.recbtn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--blue-d); }
.recbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.recbtn .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.recbtn.stop { background: var(--red); box-shadow: 0 5px 0 var(--red-d); animation: recpulse 1.4s ease-out infinite; }
.recbtn.stop:active { box-shadow: 0 0 0 var(--red-d); }
@keyframes recpulse { from { outline: 0 solid rgba(229, 72, 77, .5); } to { outline: 14px solid rgba(229, 72, 77, 0); } }
.rectext { display: grid; gap: 2px; min-width: 0; flex: 1 1 180px; }
.rectext b { font: 900 18px/1.2 "Nunito", sans-serif; color: var(--ink); }
.rec .rectext .time { font-size: 28px; font-variant-numeric: tabular-nums; }
.recdone { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.recact { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .recbtn.stop { animation: none; } }

/* lesson player: end of unit */
.cfoot[hidden] { display: none; }
.leftsteps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.leftsteps .btn { gap: 8px; }
.leftsteps .btn .pi { width: 20px; height: 20px; color: var(--blue); }

/* home: daily goal reached */
.goalok { border-color: var(--amber-line); background: var(--amber-soft); }
.goalok .muted { color: #6b4500; }
.ring.full .fg { stroke: var(--yellow); }
.ring.full .bg { stroke: #fff; }
.ring .okmark { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.goalok .week i { background: #fff; }
.goalok .week .on i { background: var(--orange); }
.goalok .week div { color: #6b4500; }
.goalok .week .today i { outline-color: var(--amber-line); }
