@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/nunito-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/nunito-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); }
:root {
  --cream: #F0F7FB; --paper: #FFFFFF; --sky: #E3F1F9; --sky-deep: #CDE4F1;
  --blue: #1F6A9C; --blue-mid: #4E94C4; --blue-soft: #A9D3EC; --navy: #173F31;
  --gold: #2B7452; --gold-bright: #4FA37A; --gold-soft: #E0F0E6; --gold-ink: #1E5A40;
  --ink: #17323F; --muted: #4D6572; --line: #D2E3EC;
  --good: #1F7A4D; --good-bg: #E6F4EC; --bad: #A33A27; --bad-bg: #FBEAE6;
  --shadow: 0 8px 26px rgba(23, 63, 49, .09);
  --serif: 'Nunito', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-x: clip; }
body.playing { padding-bottom: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; letter-spacing: -.005em; line-height: 1.22; margin: 0; color: var(--navy); }
h1 { font-size: clamp(26px, 6.2vw, 34px); }
h2 { font-size: 22px; }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }
ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 12px 0; }
.skip:focus { left: 0; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.view { padding-top: 20px; padding-bottom: 8px; }
.view > * + * { margin-top: 14px; }
.view > h1 { margin-top: 8px; }

/* header, navigation, footer */
.site-head { background: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 4px 18px rgba(23, 63, 49, .08); }
.head-row { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
.logo-link { display: flex; justify-content: center; }
.logo { width: min(280px, 100%); height: auto; }
.head-right { display: flex; justify-content: flex-end; }
.snd-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--gold-soft); color: var(--gold-ink); display: grid; place-items: center; cursor: pointer; }
.snd-btn svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.snd-btn svg path.waves, .snd-btn svg path.slash { fill: none; }
.snd-btn svg path.slash { display: none; stroke: var(--bad); }
.snd-btn.off svg path.waves { display: none; }
.snd-btn.off svg path.slash { display: block; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 22px rgba(23, 63, 49, .08); }
body.playing .bottom-nav { display: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 14px; }
.nav-item.on { color: var(--navy); background: var(--gold-soft); }
.nav-ico { width: 28px; height: 28px; object-fit: contain; }
.site-foot { margin-top: 28px; padding: 18px 0 8px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-name { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 16px; margin: 0 0 4px; }
.foot-line { margin: 0 0 6px; overflow-wrap: anywhere; }
.foot-link { display: inline-block; margin-top: 4px; font-weight: 600; }
body.playing .site-foot { display: none; }

/* cards and text */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-soft); padding: 5px 12px; border-radius: 999px; }
.lead { font-size: 18px; color: var(--muted); }
.sec { margin-top: 24px !important; }
.sm { font-size: 18px; margin: 14px 0 6px; }
.back { display: flex; width: max-content; max-width: 100%; margin-bottom: 4px; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--blue); }
.back::before { content: '\2190'; margin-right: 8px; }
.hero { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; background: linear-gradient(180deg, var(--gold-soft), #fff); }
.hero-text > * + * { margin-top: 10px; }
.hero-img { width: 120px; max-height: 190px; object-fit: contain; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.pill { min-height: 48px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--sky-deep); background: #fff; color: var(--navy); font-weight: 600; cursor: pointer; }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subject { text-decoration: none; display: block; color: inherit; min-height: 110px; }
.subject h3 { margin-bottom: 4px; }
.subject p { margin: 0; color: var(--muted); font-size: 15px; }
.subject.soon { background: #fff; }
.strip { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-top: 14px; }
.strip-img { width: 48px; height: 48px; object-fit: contain; }
.strip div { display: flex; flex-direction: column; }
.strip span { color: var(--muted); font-size: 15px; }
.more { padding: 0; }
.more summary { padding: 16px 18px; font-weight: 600; color: var(--navy); cursor: pointer; min-height: 52px; }
.more > *:not(summary) { margin: 0 18px 16px; }
.rules { list-style: none; }
.rules li { position: relative; padding: 6px 0 6px 28px; }
.rules li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-bright); }
.topic, .act { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: inherit; margin-top: 10px; min-height: 76px; }
.topic h3, .act h3 { margin-bottom: 2px; }
.topic p, .act p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { flex: none; font-size: 14px; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); padding: 6px 12px; border-radius: 999px; text-align: center; }
.meta.got { background: var(--good-bg); color: var(--good); }
.empty { display: flex; align-items: center; gap: 14px; }
.empty-img { width: 70px; flex: none; }

/* play */
.play-top { display: flex; justify-content: space-between; align-items: center; }
.count { font-weight: 600; color: var(--muted); font-size: 15px; }
.bar { height: 12px; border-radius: 999px; background: var(--sky-deep); overflow: hidden; margin-top: 4px; }
.bar span { display: block; height: 100%; background: var(--gold-bright); border-radius: 999px; transition: width .35s ease; }
.intro { text-align: center; }
.intro > * + * { margin-top: 10px; }
.intro-img { width: 110px; max-height: 170px; object-fit: contain; margin: 0 auto; }
.intro .rules { text-align: left; max-width: 420px; margin: 0 auto; }
.qcard .prompt { font-size: 22px; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; text-align: left; background: #fff; border: 2px solid var(--sky-deep); border-radius: 16px; cursor: pointer; font-size: 18px; }
.opt .letter, .letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sky); color: var(--navy); font-weight: 600; font-size: 15px; }
.letter.empty { background: transparent; border: 2px dashed var(--sky-deep); }
.opt .otext { flex: 1; overflow-wrap: anywhere; }
.opt.on { border-color: var(--blue); background: var(--sky); }
.opt.on .letter { background: var(--blue); color: #fff; }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt .mark { font-size: 13px; font-weight: 600; flex: none; }
.opt.right .mark { color: var(--good); } .opt.wrong .mark { color: var(--bad); }
.locked .opt, .locked .chip, .locked .slot, .locked .box-head { cursor: default; }
.sentence { font-size: 22px; line-height: 2.1; font-family: var(--serif); margin-bottom: 10px; }
.slot { display: inline-block; min-width: 110px; min-height: 46px; padding: 2px 14px; margin: 0 4px; border: 2px dashed var(--blue-soft); border-radius: 12px; background: var(--sky); font: inherit; color: var(--navy); cursor: pointer; vertical-align: middle; }
.slot.filled { border-style: solid; border-color: var(--blue); background: #fff; font-weight: 600; }
.slot.right { border-color: var(--good); background: var(--good-bg); }
.slot.wrong { border-color: var(--bad); background: var(--bad-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 48px; padding: 8px 16px; border-radius: 14px; border: 2px solid var(--sky-deep); background: #fff; font-size: 18px; cursor: pointer; color: var(--navy); font-weight: 500; }
.chip:disabled { opacity: .35; cursor: default; }
.chip.sel { border-color: var(--blue); background: var(--sky); box-shadow: 0 0 0 3px rgba(3, 64, 156, .15); }
.chip.placed { background: var(--gold-soft); border-color: #F0DDA8; }
.chip.right { border-color: var(--good); background: var(--good-bg); }
.chip.wrong { border-color: var(--bad); background: var(--bad-bg); }
.hint { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.match .col { display: grid; gap: 10px; margin-bottom: 14px; }
.match .opt { min-height: 54px; }
.match .opt.sel { border-color: var(--blue); background: var(--sky); box-shadow: 0 0 0 3px rgba(3, 64, 156, .15); }
.match .opt.paired { background: var(--gold-soft); border-color: #F0DDA8; }
.match .opt.right { border-color: var(--good); background: var(--good-bg); }
.match .opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.answer-area { min-height: 72px; padding: 12px; border: 2px dashed var(--blue-soft); border-radius: 16px; background: var(--sky); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.answer-area.right { border-color: var(--good); background: var(--good-bg); border-style: solid; }
.answer-area.wrong { border-color: var(--bad); background: var(--bad-bg); border-style: solid; }
.placeholder { color: var(--muted); font-size: 15px; }
.endmark { font-size: 22px; font-weight: 600; color: var(--navy); }
.sort .chips.bank { min-height: 56px; margin-bottom: 14px; padding: 10px; border-radius: 16px; background: var(--sky); }
.boxes { display: grid; gap: 12px; }
.box { border: 2px solid var(--sky-deep); border-radius: 16px; overflow: hidden; background: #fff; }
.box-head { display: block; width: 100%; min-height: 48px; padding: 8px 14px; text-align: left; border: 0; background: var(--sky); font-weight: 600; color: var(--navy); cursor: pointer; font-size: 17px; }
.box-head.target { background: var(--gold-soft); color: var(--gold-ink); }
.box .chips.in { padding: 12px; min-height: 64px; }
.tin { width: 100%; min-height: 58px; padding: 10px 16px; border: 2px solid var(--sky-deep); border-radius: 16px; font: inherit; font-size: 22px; background: #fff; color: var(--navy); }
.tin:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(3, 64, 156, .15); }
.tin.right { border-color: var(--good); background: var(--good-bg); }
.tin.wrong { border-color: var(--bad); background: var(--bad-bg); }
.actions { margin-top: 14px; display: flex; gap: 10px; }
.actions.col { flex-direction: column; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 24px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; text-align: center; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:disabled { background: #B9C2D6; border-color: #B9C2D6; cursor: not-allowed; }
.btn.ghost { border-color: var(--sky-deep); }
.btn.big { width: 100%; min-height: 58px; font-size: 18px; }
.feedback { margin-top: 14px; padding: 16px; border-radius: 20px; border: 2px solid; }
.feedback.good { background: var(--good-bg); border-color: #A6D7BC; }
.feedback.bad { background: var(--bad-bg); border-color: #EBB9AE; }
.feedback:focus { outline: none; }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 20px; }
.fb-head strong { font-family: var(--serif); color: var(--navy); }
.fb-img { width: 54px; height: 70px; object-fit: contain; flex: none; }
.fb-ans { font-weight: 600; overflow-wrap: anywhere; }
.fb-why { color: var(--ink); }
.fb-example { background: var(--surface, #f7f5f0); border: 1px solid rgba(26,36,86,.15); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.fb-ex-head { display: block; color: var(--navy, #1a2456); margin-bottom: 6px; }
.fb-ex-q { margin: 4px 0; font-weight: 600; }
.fb-ex-ch { margin: 2px 0; color: var(--ink); }
.fb-ex-ans { margin: 4px 0; font-weight: 600; }
.fb-ex-why { margin: 4px 0 0; color: var(--ink); }

/* SEA Journey map (Plus): a winding road of milestones */
.journey { margin: 14px 0; }
.jy-road { position: relative; margin: 10px 0 4px; padding: 6px 0; }
.jy-road::before { content: ''; position: absolute; top: 0; bottom: 0; left: 26px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(to bottom, var(--navy, #1a2456) 0 14px, rgba(26,36,86,.25) 14px 24px); opacity: .5; }
.jy-ms { position: relative; margin: 0 0 14px; padding-left: 52px; }
.jy-ms-in { display: flex; gap: 12px; align-items: center; background: var(--surface, #f7f5f0); border: 1.5px solid rgba(26,36,86,.14); border-radius: 14px; padding: 10px 12px; cursor: pointer; list-style: none; }
.jy-ms-in::-webkit-details-marker { display: none; }
.jy-ms-done > .jy-ms-in, .jy-ms-done > details > .jy-ms-in { border-color: var(--gold, #c9a227); background: rgba(201,162,39,.1); }
.jy-ms-go > details > .jy-ms-in { border-color: rgba(26,36,86,.4); }
.jy-start .jy-ms-in, .jy-dest .jy-ms-in { background: var(--navy, #1a2456); border-color: var(--navy, #1a2456); cursor: default; }
.jy-start .jy-ms-in strong, .jy-dest .jy-ms-in strong, .jy-start .jy-ms-in .jy-state, .jy-dest .jy-ms-in .jy-state { color: #fff; }
.jy-start .jy-ms-in { text-decoration: none; cursor: pointer; }
.jy-ms::before { content: ''; position: absolute; left: 20px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid rgba(26,36,86,.35); box-sizing: border-box; }
.jy-ms-done::before { border-color: var(--gold, #c9a227); background: var(--gold, #c9a227); }
.jy-ms-go::before { border-color: var(--navy, #1a2456); }
.jy-ms-tx { display: flex; flex-direction: column; gap: 2px; }
.jy-ms-ico { flex: 0 0 auto; }
.jy-ring { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.jy-ring-in { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: var(--navy, #1a2456); }
.jy-ms-det { width: 100%; }
.jy-skills { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 2px; padding: 4px 2px 2px 8px; border-left: 3px solid rgba(201,162,39,.4); }
.jy-node { display: flex; gap: 8px; align-items: center; text-decoration: none; color: inherit; padding: 6px 8px; border-radius: 10px; }
.jy-node:hover { background: rgba(26,36,86,.06); }
.jy-ico { flex: 0 0 auto; }
.jy-sk-name { font-weight: 600; flex: 1 1 auto; }
.jy-state { color: var(--ink); font-size: .9rem; }
.jy-notstarted { opacity: .7; }
.jy-placed .jy-state { color: var(--gold-dark, #8a6d1a); font-weight: 600; }
.jy-placecard { text-align: center; }
@media (min-width: 700px) {
  .jy-road::before { left: 50%; margin-left: -2px; }
  .jy-ms { width: 50%; padding-left: 0; padding-right: 40px; }
  .jy-ms::before { left: auto; right: -8px; }
  .jy-ms.jy-right { margin-left: 50%; padding-right: 0; padding-left: 40px; }
  .jy-ms.jy-right::before { right: auto; left: -8px; }
  .jy-start, .jy-dest { width: 60%; margin-left: 20%; padding: 0; }
  .jy-start::before, .jy-dest::before { display: none; }
}
.admin-chip { background: var(--navy, #1a2456); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; margin-right: 8px; align-self: center; }
a.report { display: inline-block; margin: 2px 0 14px; font-size: 14px; color: var(--muted); }
.feedback .btn { margin-top: 4px; }

/* results */
.result { text-align: center; }
.res-img { width: 120px; max-height: 190px; object-fit: contain; margin: 0 auto 6px; }
.score { font-family: var(--serif); font-weight: 600; font-size: 40px; color: var(--navy); margin: 6px 0 0; line-height: 1.1; }
.scoresub { color: var(--muted); }
.rd-stars { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.rd-star { width: 58px; height: 58px; object-fit: contain; animation: pop .5s ease both; }
.rd-star.dim { filter: grayscale(1); opacity: .28; animation: none; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rd-star { animation: none; } .bar span { transition: none; } }
.starwhy { list-style: none; max-width: 440px; margin: 10px auto; text-align: left; }
.starwhy li { position: relative; padding: 9px 12px 9px 38px; margin: 6px 0; border-radius: 12px; line-height: 1.4; }
.starwhy li.got { background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; }
.starwhy li.got::before { content: ''; position: absolute; left: 14px; top: 13px; width: 14px; height: 8px; border-left: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(-45deg); }
.starwhy li.next { background: #fff; border: 1px dashed #C9B58A; color: var(--muted); }
.starwhy li.next::before { content: ''; position: absolute; left: 12px; top: 13px; width: 14px; height: 14px; border: 2px solid #C9B58A; border-radius: 50%; }
.total { font-weight: 600; margin-top: 12px; }
.nextrank { color: var(--muted); }
.rankup { font-family: var(--serif); font-size: 22px; color: var(--gold-ink); font-weight: 600; }
.newbadges { margin-top: 10px; text-align: left; }
.nb { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--gold-soft); border-radius: 14px; margin-top: 8px; }
.nb-img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.nb div { display: flex; flex-direction: column; }
.nb span { font-size: 14px; color: var(--gold-ink); }
.review h2 { margin-bottom: 8px; font-size: 20px; }
.miss { padding: 12px 0; border-top: 1px solid var(--line); }
.miss:first-of-type { border-top: 0; }
.miss p { margin: 0 0 4px; overflow-wrap: anywhere; }
.mq { font-weight: 600; color: var(--navy); }
.mg { color: var(--bad); }
.mc { color: var(--good); font-weight: 600; }
.mw { color: var(--muted); }

/* my stars */
.me { text-align: center; }
.me-star { width: 70px; margin: 0 auto 4px; }
.me-num { font-family: var(--serif); font-weight: 700; font-size: 52px; color: var(--navy); line-height: 1; }
.me-label { color: var(--muted); margin: 0; }
.me-rank { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--gold-ink); margin: 8px 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 6px; text-align: center; display: flex; flex-direction: column; }
.stat strong { font-family: var(--serif); font-size: 26px; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.badge img { width: 48px; height: 48px; object-fit: contain; filter: grayscale(1); opacity: .3; }
.badge.got { background: var(--gold-soft); border-color: #F0DDA8; }
.badge.got img { filter: none; opacity: 1; }
.badge strong { font-size: 14px; color: var(--navy); line-height: 1.2; }
.badge span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.mail { background: var(--sky); }
.mailform { display: grid; gap: 10px; margin-top: 8px; }
.mailform label { font-weight: 600; color: var(--navy); }
.mailform input[type=email] { min-height: 54px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; font-size: 17px; width: 100%; }
.formmsg { font-weight: 600; margin: 0; }

@media (min-width: 700px) {
  body { font-size: 18px; }
  .hero { grid-template-columns: 1fr 170px; padding: 26px; }
  .hero-img { width: 170px; max-height: 250px; }
  .logo { width: 330px; }
  .opts { grid-template-columns: 1fr 1fr; }
  .match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .match .hint { grid-column: 1 / -1; margin: 0; }
  .actions.col { flex-direction: row; flex-wrap: wrap; }
  .actions.col .btn.big { width: auto; flex: 1 1 200px; }
  .boxes { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 360px) {
  body { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr 90px; }
  .hero-img { width: 90px; }
  .stats { gap: 6px; }
}

.foot-line a { white-space: nowrap; }

.vis { margin: 4px 0 16px; }
.vis svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.vis svg.circ { max-width: 200px; }
.passage { padding: 0; margin-top: 14px; }
.passage summary { padding: 14px 18px; font-weight: 600; color: var(--navy); cursor: pointer; min-height: 52px; }
.passage .pbody { padding: 0 18px 8px; }
.passage .pbody h3 { margin-bottom: 8px; font-size: 19px; }
.passage .pbody p { font-size: 18px; line-height: 1.7; }
.miss .vis { margin-bottom: 8px; }

.topic > div, .act > div { min-width: 0; flex: 1 1 140px; }
@media (max-width: 380px) {
  .topic, .act { flex-wrap: wrap; align-items: flex-start; }
  .topic .meta, .act .meta { flex: none; }
}

/* ====== engine v2 ====== */
:root { --head-h: 66px; --timer-h: 0px; --warn: #A33A27; --warn-bg: #FBEAE6; --plus: #6B3FA0; --plus-bg: #F1EAFA; }

/* pictures, tables */
.visgroup > .vis + .vis { margin-top: 6px; }
.vis .tscroll, .tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.vtable { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; }
.vtable caption { caption-side: top; font-weight: 700; color: var(--navy); padding: 0 0 8px; text-align: center; }
.vtable th, .vtable td { border: 1.5px solid var(--navy); padding: 7px 8px; text-align: center; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; }
.vtable th { min-width: 4.2em; }
.vtable thead th { background: var(--sky-deep); color: var(--navy); font-weight: 600; }
.vtable tbody th { background: var(--sky); font-weight: 600; text-align: left; color: var(--navy); }
.vtable .qcell { background: var(--gold-soft); height: 36px; min-width: 52px; border-style: dashed; }
.vtable td.circled, .vtable th.circled { outline: 3px solid var(--warn); outline-offset: -5px; border-radius: 12px; }
.vtable td.b { font-weight: 700; }
.gtable td.incell { padding: 4px; white-space: nowrap; }
.cin { width: 100%; min-width: 58px; max-width: 120px; min-height: 44px; padding: 4px 8px; border: 2px solid var(--blue-soft); border-radius: 10px; font: inherit; font-size: 18px; text-align: center; background: var(--sky); color: var(--navy); }
.cin:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(3, 64, 156, .15); }
.cin.right { border-color: var(--good); background: var(--good-bg); }
.cin.wrong { border-color: var(--bad); background: var(--bad-bg); }
.cunit { margin-left: 4px; color: var(--muted); font-size: 14px; }
.vis svg.clock { max-width: 240px; } .vis svg.angle { max-width: 300px; }

/* circle */
.circle .cline { font-family: var(--serif); font-size: 22px; line-height: 2.3; margin: 0 0 10px; }
.tok { font: inherit; color: var(--navy); background: transparent; border: 2px solid transparent; border-radius: 10px; padding: 4px 6px; min-height: 44px; cursor: pointer; }
.tok:hover { background: var(--sky); }
.tok.on { border-color: var(--blue); background: var(--sky); box-shadow: 0 0 0 3px rgba(3, 64, 156, .15); }
.tok.on { border-radius: 999px; }
.tok.right { border-color: var(--good); background: var(--good-bg); border-radius: 999px; }
.tok.wrong { border-color: var(--bad); background: var(--bad-bg); border-radius: 999px; text-decoration: line-through; }
.fixbox { margin-top: 8px; } .fixlab { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; }

/* multi, steps, pair */
.opt .letter.box { border-radius: 8px; background: #fff; border: 2px solid var(--blue-soft); }
.opt.on .letter.box { background: var(--blue); border-color: var(--blue); }
.opt.on .letter.box::after { content: ''; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.opt.missed { border-color: var(--gold); background: var(--gold-soft); border-style: dashed; }
.opt.missed .mark { color: var(--gold-ink); }
.pickcount.nudge { color: var(--bad); font-weight: 600; }
.multi .opts { grid-template-columns: 1fr; }
.steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stepitem { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; background: #fff; border: 2px solid var(--sky-deep); border-radius: 16px; min-height: 60px; }
.stepitem.right { border-color: var(--good); background: var(--good-bg); }
.stepitem.wrong { border-color: var(--bad); background: var(--bad-bg); }
.stepnum { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sky); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.steptext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stepctl { flex: none; display: flex; gap: 6px; }
.mv { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--blue-soft); background: var(--sky); color: var(--navy); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; }
.mv:disabled { opacity: .3; cursor: default; }
.pairpart + .pairpart { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--sky-deep); }
.plabel { font-size: 16px; color: var(--gold-ink); margin-bottom: 4px; }
.pq { font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.pair .sentence { font-size: 20px; }

/* passages: poems, notices, docked */
/* The passage sits in the page and scrolls with it, so it never covers the question. */
.passage.dock { position: static; }
.passage.dock[open] .pbody { max-height: none; overflow: visible; }
.passage.dock summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dockhint { font-size: 13px; font-weight: 500; color: var(--muted); }
.poem h3 { margin-bottom: 4px; } .poem .byline { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.stanza { margin: 0 0 14px; }
.passage .pbody .pl { display: flex; margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.pl .ln { flex: none; width: 2.2em; margin-right: 10px; text-align: right; color: var(--gold-ink); font-family: var(--sans); font-size: 14px; font-weight: 600; padding-top: 2px; }
.pl .lt { flex: 1; min-width: 0; padding-left: 1.2em; text-indent: -1.2em; }
.notice { border: 3px solid var(--navy); border-radius: 18px; padding: 16px; background: var(--gold-soft); text-align: center; }
.notice .n-title { font-size: 22px; text-transform: none; margin-bottom: 4px; }
.n-sub { font-weight: 600; color: var(--gold-ink); margin-bottom: 8px !important; }
.n-rows { margin: 8px 0; text-align: left; } .n-rows > div { display: flex; gap: 10px; padding: 6px 0; border-top: 1px dashed #D9C28A; }
.n-rows dt { flex: none; width: 34%; font-weight: 700; color: var(--navy); } .n-rows dd { margin: 0; flex: 1; overflow-wrap: anywhere; }
.n-bullets { text-align: left; margin: 8px 0 8px 20px; list-style: disc; } .n-bullets li { padding: 2px 0; }
.passage .pbody .n-foot { font-weight: 600; margin: 8px 0 0; font-size: 16px; }
.tpass h3 { margin-bottom: 8px; }
.passage .pbody .tpass { padding-bottom: 6px; }

/* exam mode */
.examtoggle { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border: 2px solid var(--sky-deep); border-radius: 16px; background: var(--sky); cursor: pointer; }
.examtoggle input { width: 24px; height: 24px; margin-top: 3px; flex: none; accent-color: var(--navy); }
.examtoggle span span { display: inline; color: var(--muted); }
.timer { position: sticky; top: var(--head-h); z-index: 21; display: flex; justify-content: center; align-items: center; gap: 10px; height: 40px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(23, 63, 49, .25); }
.timer .tnum { font-variant-numeric: tabular-nums; font-size: 20px; }
.timer.warn { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .78; } }
@media (prefers-reduced-motion: reduce) { .timer.warn { animation: none; } }
.play.exam { --timer-h: 48px; }
.timeused { font-weight: 600; color: var(--navy); }

/* feedback and results additions */
.fb-parts { list-style: none; margin: 4px 0 8px; display: grid; gap: 4px; }
.fb-parts li { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .7); overflow-wrap: anywhere; font-size: 16px; }
.fb-parts li.ok strong { color: var(--good); } .fb-parts li.no strong { color: var(--bad); }
.btn.small { min-height: 44px; padding: 6px 16px; font-size: 15px; margin-top: 6px; }
.mmiss { color: var(--gold-ink); font-weight: 600; }
.secrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.secrow:first-of-type { border-top: 0; } .secname { font-weight: 600; color: var(--navy); } .secnum { font-weight: 600; }
.secbar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--sky-deep); overflow: hidden; } .secbar span { display: block; height: 100%; background: var(--gold-bright); }
.weaklist { list-style: none; } .weaklist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); } .weaklist .wn { color: var(--muted); font-size: 15px; }
.seedline { color: var(--muted); font-size: 14px; margin-top: 10px; }
.resume, .fresh, .nostars { color: var(--gold-ink); font-weight: 600; }
.levels .lvrow { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; } .levels .lvrow span { color: var(--muted); font-size: 15px; }

/* tiers */
.plustag { display: inline-block; margin-left: 8px; padding: 2px 10px; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; background: var(--plus-bg); color: var(--plus); vertical-align: middle; }
.eyebrow.plus { background: var(--plus-bg); color: var(--plus); }
.lockedcard { background: #FBFAFD; border-style: dashed; border-color: #CDBDE6; align-items: flex-start; }
.lockedcard h3 { color: #4B4560; }
.lockpreview { color: var(--ink) !important; font-size: 15px !important; margin-top: 6px !important; overflow-wrap: anywhere; }
.locknote { color: var(--plus) !important; font-weight: 600; margin-top: 4px !important; }
.meta.lock { background: var(--plus-bg); color: var(--plus); }
.previewq { background: var(--plus-bg); border-radius: 14px; padding: 12px 14px; margin: 10px 0; } .previewq p { margin: 4px 0 0; }
.locked h1 { margin: 8px 0; }
.locked > * + * { margin-top: 10px; }

/* extras on home and practise */
.extras > * + * { margin-top: 12px; } .extras { margin-top: 14px; }
.extras .strip div, .sugg div { display: flex; flex-direction: column; min-width: 0; }
.justforyou { background: linear-gradient(180deg, var(--gold-soft), #fff); border-color: #F0DDA8; }
.start-here { background: var(--sky); }
.sugg { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; color: inherit; margin-top: 10px; min-height: 64px; }
.sugg span:not(.meta) { color: var(--muted); font-size: 15px; }
.suggest h2.sec { margin-bottom: 0; }
.psum .psline { font-weight: 600; margin: 0 0 6px; } .psline.good { color: var(--good); } .psline.focus { color: var(--gold-ink); }
.prow { padding: 10px 0; border-top: 1px solid var(--line); }
.phead { display: flex; flex-direction: column; margin-bottom: 8px; } .phead span { color: var(--muted); font-size: 15px; }
.meter { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); height: 26px; border-radius: 999px; background: var(--sky-deep); overflow: visible; }
.meter .seg { font-size: 11.5px; text-align: center; line-height: 26px; color: var(--muted); border-right: 2px solid #fff; } .meter .seg:last-child { border-right: 0; }
.meter .mk { position: absolute; top: -4px; width: 14px; height: 34px; margin-left: -7px; border-radius: 8px; background: var(--navy); border: 2px solid #fff; z-index: 2; }

/* skill map, bands */
.bchip, .rchip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.b-strong { background: var(--good-bg); color: var(--good); } .b-getting { background: var(--gold-soft); color: var(--gold-ink); } .b-needs { background: var(--bad-bg); color: var(--bad); } .b-new { background: var(--sky); color: var(--navy); } .b-hidden, .r-hidden { background: #EDEDF2; color: #8A8FA0; }
.r-ready { background: var(--good-bg); color: var(--good); } .r-ontrack { background: #E3F0FB; color: var(--blue); } .r-building { background: var(--gold-soft); color: var(--gold-ink); } .r-notyet { background: var(--bad-bg); color: var(--bad); }
.skillmap h3 { margin-bottom: 8px; } .sgroup { padding: 8px 0; border-top: 1px solid var(--line); } .sgroup:first-of-type { border-top: 0; }
.schips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.schip { text-decoration: none; padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 14px; font-weight: 600; font-size: 15px; }

/* report */
.report-bar { display: grid; gap: 8px; } .report-bar label { font-weight: 600; color: var(--navy); }
.report-bar input { min-height: 50px; padding: 8px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; width: 100%; }
.print-copy { display: none; }
.print-head { display: none; } .rwho { color: var(--muted); }
.rrow { padding: 10px 0; border-top: 1px solid var(--line); } .rrow:first-child { border-top: 0; }
.rhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rdet { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.skilllist { list-style: none; } .skilllist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); } .skilllist .sname { flex: 1 1 160px; font-weight: 600; } .sacc { color: var(--muted); font-size: 14px; }
.nsrow { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.blur { filter: blur(5px); user-select: none; }
.plusnote { background: var(--plus-bg); border-color: #D9C9F0; }
.report h2 { margin-bottom: 6px; } .report .rsub h3.sm { margin-top: 16px; }

@media print {
  body { background: #fff; font-size: 12pt; padding: 0 !important; }
  .site-head, .bottom-nav, .site-foot, .noprint, .back, .more > summary::marker, #site-foot { display: none !important; }
  .report .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; border-radius: 8px; margin-top: 10px; }
  .report details.more { display: block; } .report details.more[open] > *, .report details.more > * { display: block; }
  .print-head { display: block; text-align: center; } .print-logo { width: 240px; margin: 0 auto 6px; } .print-head p { font-size: 10pt; margin: 0; }
  .wrap { max-width: none; padding: 0; } a { color: #000; text-decoration: none; }
  .bchip, .rchip { border: 1px solid #666; }
  .print-copy { display: block; text-align: center; font-size: 9pt; color: #444; margin: 4px 0 8px; }
}
@media (min-width: 700px) { .multi .opts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .vtable { font-size: 13.5px; } .vtable th, .vtable td { padding: 6px 3px; } .vtable th { min-width: 0; } .cin { min-width: 40px; font-size: 16px; padding: 4px 2px; } }
@media (max-width: 380px) { .circle .cline { font-size: 20px; } .stepitem { padding-left: 8px; gap: 8px; } .mv { width: 42px; } .cin { font-size: 17px; } .vtable { font-size: 15px; } }

/* icon pack */
.ico { flex: none; object-fit: contain; display: block; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 10px; }
.pill .ico { width: 24px; height: 24px; }
.subject .subj-ico { width: 52px; height: 52px; margin-bottom: 6px; }
.row-ico { width: 44px; height: 44px; }
.act .row-ico { width: 40px; height: 40px; }
.topic { flex-wrap: wrap; row-gap: 6px; }
.topic > .grow, .act > .grow { flex: 1 1 130px; min-width: 0; }
.topic > .meta { margin-left: 56px; }
@media (min-width: 400px) { .topic > .meta { margin-left: 0; } }
.lvl { display: flex; align-items: center; gap: 8px; }
.lvl .lvl-ico { width: 30px; height: 30px; }
.lock-mascot { width: 120px; height: 120px; margin: 0 auto 4px; }
.intro-img.sm { width: 130px; height: 130px; max-height: none; }
.res-img.sm { width: 150px; height: 150px; max-height: none; }
.streakchip { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; vertical-align: middle; color: var(--gold-ink); }
.streakchip .ico { width: 20px; height: 20px; }
.timer .tlab { position: static; transform: none; width: auto; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; line-height: 1.2; }
.timer .tlab .ico { width: 26px; height: 26px; background: #fff; border-radius: 50%; padding: 2px; }
.fb-img { width: 46px; height: 46px; }
.rd-star { width: 58px; height: 58px; }
.rankup-box { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.rankup-box .rankup-ico { width: 84px; height: 84px; }
.rankup-box .rankup { margin: 0; }
.me-star { width: 104px; height: 104px; }
.ranks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rankcell { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px; border-radius: 16px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.rankcell .rank-img { width: 64px; height: 64px; filter: grayscale(1); opacity: .35; }
.rankcell.got .rank-img { filter: none; opacity: 1; }
.rankcell.cur { background: var(--gold-soft); border-color: #F0DDA8; }
.rankcell strong { font-size: 13.5px; color: var(--navy); line-height: 1.2; }
.rankcell span { font-size: 12.5px; color: var(--muted); }
.nb-img { width: 48px; height: 48px; }
.badge img { width: 56px; height: 56px; }
.nav-ico { width: 28px; height: 28px; }
.lockedcard .row-ico { margin-top: 2px; }

.badges { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }

/* Plus: header button, code page */
.plus-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #D9C9F0; background: var(--plus-bg); color: var(--plus); display: grid; place-items: center; text-decoration: none; font-weight: 700; font-size: 26px; }
.plus-btn.on { background: var(--plus); border-color: var(--plus); }
.plus-btn .plus-ico { width: 28px; height: 28px; }
.plusbox { text-align: center; }
.plusbox .mailform { text-align: left; }
.plusform input { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; text-align: center; min-height: 54px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; font-size: 20px; width: 100%; }
.formmsg.warn { color: var(--warn); }
.plusfine { color: var(--muted); font-size: 15px; }
.plushint { margin: 0; font-size: 15px; } .plushint a { color: var(--plus); font-weight: 600; }

/* ====== what Plus adds ====== */
.plus-card { border-left: 5px solid var(--plus); background: var(--plus-bg); border-style: solid; border-color: #CDBDE6; border-left-color: var(--plus); }
.plus-card .row-ico { opacity: .9; }
.plus-card .meta.lock { background: var(--plus); color: #fff; }
.tprog { margin: 14px 0 16px; }
.tprog-bar { display: flex; gap: 3px; height: 16px; border-radius: 999px; overflow: hidden; background: var(--sky-deep); }
.tprog-bar.thin { height: 8px; margin-top: 6px; }
.tseg { display: block; min-width: 6px; }
.tseg.done { background: var(--good); }
.tseg.left { background: var(--blue-soft); }
.tseg.plus { background: repeating-linear-gradient(135deg, var(--plus) 0 8px, #8E66C2 8px 16px); }
.tprog-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.tprog-leg .k::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.tprog-leg .k.free::before { background: var(--good); }
.tprog-leg .k.plus::before { background: var(--plus); }
.plusline { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); background: var(--plus-bg); border-color: #CDBDE6; margin-bottom: 14px; }
.plusline .grow { min-width: 0; flex: 1 1 140px; }
.plusline strong, .plusline span:not(.plustag) { display: block; }
.plusline span:not(.plustag) { font-size: 15px; color: var(--plus); font-weight: 600; }
.plusline .plustag { margin: 0; flex: none; }
.nextplus { border-color: #CDBDE6; background: #FBFAFD; }
.nplist { list-style: none; margin: 12px 0; display: grid; gap: 10px; }
.nplist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed #CDBDE6; border-radius: 14px; background: #fff; }
.nplist .grow { flex: 1 1 140px; min-width: 0; }
.nplist strong, .nplist .grow span { display: block; }
.nplist .grow span { font-size: 15px; color: var(--muted); }
.nplist .plustag { margin: 0; }
.fine { font-size: 15px; color: var(--muted); }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.vtile { background: var(--plus-bg); border-radius: 16px; padding: 14px 12px; text-align: center; }
.vtile strong { display: block; font: 600 32px var(--serif); color: var(--plus); line-height: 1.1; }
.vtile span { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.vlist, .vsteps { margin: 0; padding-left: 22px; }
.vlist li, .vsteps li { margin-bottom: 8px; }
.bigprice { font: 600 26px var(--serif); color: var(--navy); }
.vtopics { list-style: none; margin: 10px 0 0; display: grid; gap: 12px; }
.vtopics li strong, .vtopics li span { display: block; }
.vtopics li span { font-size: 15px; color: var(--muted); }
.diagnote { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--gold-soft); text-align: left; }
.diagnote p { margin: 6px 0 0; overflow-wrap: anywhere; }
.plushome { border-color: #CDBDE6; }
@media (min-width: 600px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ====== Get Plus, paid, renewal ====== */
.buybox .mailform { text-align: left; }
.buybox .flab { font-weight: 600; color: var(--navy); }
.curchoice { margin: 0 0 8px; }
.curnote { margin: 0 0 2px; }
.linkbtn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--navy); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; text-align: left; }
.curpills { margin: 0 0 4px; }
.curpills .pill { min-width: 96px; justify-content: center; padding: 8px 18px; }
.buyform select { min-height: 54px; padding: 10px 44px 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; font-size: 17px; width: 100%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230F2A5C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; color: var(--ink); }
.buyform input[type=tel], .buyform input[type=email] { min-height: 54px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; font-size: 17px; width: 100%; }
.buytotal { background: var(--plus-bg); border-radius: 16px; padding: 14px 16px; margin: 4px 0; }
.buytotal strong { display: block; font: 600 26px var(--serif); color: var(--plus); line-height: 1.2; }
.buytotal span { display: block; font-size: 15px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--ink); line-height: 1.45; }
.consent input { width: 26px; height: 26px; flex: none; margin: 2px 0 0; accent-color: var(--plus); }
.renewcode { background: var(--gold-soft); border-radius: 14px; padding: 10px 14px; margin: 0; }
.renewcode strong { font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--navy); }
.buyalt { margin: 12px 0 4px; }
.bigcode { font: 700 clamp(28px, 9vw, 40px)/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; color: var(--plus); background: var(--plus-bg); border-radius: 18px; padding: 16px 12px; margin: 12px 0; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.paidbox .actions { margin-top: 8px; }
.renewwrap { padding-top: 14px; }
.renewwrap + .view { padding-top: 10px; }
.renewbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--plus-bg); border: 1px solid #D9C9F0; border-radius: 16px; padding: 10px 12px 10px 16px; font-weight: 600; color: var(--navy); }
.renewbar .btn.small { min-height: 42px; padding: 6px 18px; font-size: 16px; background: var(--plus); border-color: var(--plus); color: #fff; }

/* CLINIC PROMO BANNER */
.clinic-promo { padding: 0; overflow: hidden; }
.clinic-promo-img { display: block; }
.clinic-promo-img img { display: block; width: 100%; height: auto; }
.clinic-promo-body { padding: 20px 18px 22px; }
.clinic-promo-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold, #B8860B); margin: 0 0 6px; }
.clinic-promo-heading { font-size: 1.25rem; font-weight: 700; margin: 0 0 12px; color: var(--navy); line-height: 1.25; }
.clinic-promo-text { font-size: 0.92rem; line-height: 1.6; margin: 0 0 10px; }
.clinic-promo-links { margin-top: 16px; }

/* ============================
   LEADERBOARD + DUEL
   ============================ */

/* board intro text */
.board-intro { font-size: 1rem; line-height: 1.6; margin: 0 0 20px; color: var(--ink-soft); }

/* league tabs */
.board-tabs { display: flex; gap: 8px; margin: 0 0 18px; }
.board-tab { flex: 1; padding: 10px 8px; border: 2px solid var(--navy, #1a2456); border-radius: 12px; background: #fff; color: var(--navy, #1a2456); font-weight: 700; font-size: 15px; cursor: pointer; }
.board-tab.on { background: var(--navy, #1a2456); color: #fff; }

/* board list */
.board-list { list-style: none; padding: 0; margin: 0 0 14px; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid rgba(0,0,0,.07); font-size: 1rem; }
.board-row.me { background: rgba(186,147,13,.08); border-radius: 10px; padding-left: 8px; }
.board-rank { min-width: 32px; font-weight: 700; font-size: 1.1rem; text-align: center; }
.board-avatar { display: inline-flex; align-items: center; justify-content: center; }
.board-nick { flex: 1; font-weight: 600; }
.board-stars { color: var(--gold, #b8930d); font-weight: 700; }
.board-streak { font-size: 0.9rem; }

/* my row (when outside top 20) */
.board-my-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; background: rgba(186,147,13,.12); border-radius: 10px; margin: 8px 0; font-size: 1rem; }

/* week label, totals, loading */
.board-week { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 10px; }
.board-total { font-size: 0.85rem; color: var(--ink-soft); margin: 10px 0 0; }
.board-loading { color: var(--ink-soft); font-style: italic; }
.board-empty { color: var(--ink-soft); }
.board-err { color: #c0392b; }

/* my profile card at bottom */
.board-me-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface, #f7f5f0); border-radius: 14px; margin-top: 18px; }
.board-me-avatar { display: inline-flex; align-items: center; justify-content: center; }
.board-me-nick { font-weight: 700; flex: 1; }
.board-me-league { font-size: 0.82rem; color: var(--ink-soft); }

/* duel button */
.board-duel-btn { display: block; margin: 18px 0 0; width: 100%; text-align: center; }

/* join flow */
.board-step { }
.avatar-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.av-btn { width: 64px; height: 64px; border-radius: 12px; border: 2px solid transparent; background: var(--surface, #f7f5f0); cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; }
.av-btn.sel { border-color: var(--navy, #1a2456); background: rgba(26,36,86,.08); }
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.board-avatar .av-img, .board-me-avatar .av-img, .duel-opp-emo .av-img { border-radius: 50%; }
.board-avatar .av-img { width: 36px; height: 36px; }
.board-me-avatar .av-img { width: 48px; height: 48px; }
.duel-opp-emo .av-img { width: 40px; height: 40px; }
.board-cc-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.board-cc-label { font-size: 0.9rem; font-weight: 600; }
.board-cc-in { padding: 10px 12px; border: 2px solid var(--line, #ddd); border-radius: 10px; font-size: 1rem; width: 100%; box-sizing: border-box; }
.board-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; font-size: 0.92rem; line-height: 1.5; }
.board-consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--navy, #1a2456); }

/* duel play view */
.duel-opp { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface, #f7f5f0); border-radius: 12px; margin: 0 0 18px; font-weight: 700; font-size: 1.1rem; }
.duel-opp-emo { font-size: 2rem; }
.duel-prog { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 8px; }
.duel-stem { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; line-height: 1.5; }
.duel-opt { display: block; width: 100%; text-align: left; padding: 12px 14px; margin: 6px 0; border: 2px solid var(--line, #ddd); border-radius: 12px; background: #fff; font-size: 1rem; cursor: pointer; }
.duel-opt.right { border-color: #27ae60; background: #eafaf1; }
.duel-opt.wrong { border-color: #c0392b; background: #fdedec; }
.duel-fb { font-weight: 700; margin: 10px 0 0; }
.duel-done { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.duel-result { font-size: 1.05rem; line-height: 1.5; margin: 12px 0; }

/* streak toast */
.board-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy, #1a2456); color: #fff; padding: 10px 22px; border-radius: 24px; font-weight: 700; font-size: 1rem; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; z-index: 999; }
.board-toast.in { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Upgrade dropdowns (free sees Plus, Plus sees Exam Ready) */
.plusdrop > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plusdrop > summary .plustag { margin-left: 0; }
.plusdrop .plusdrop-body { padding: 0 14px; }
.plusdrop .plusdrop-body .card { margin-top: 10px; }
.plusdrop > p, .plusdrop > ul, .plusdrop > .actions { margin-left: 18px; margin-right: 18px; }
.plusdrop > .actions { margin-bottom: 18px; }
.plustag.exam { background: #e8f1fb; color: #0f3c78; }
h3.sec.lvl.sm { font-size: 16px; margin: 14px 0 4px; }

/* forgot your code */
.forgotcode { margin: 16px 0; text-align: left; }
.forgotcode summary { cursor: pointer; font-weight: 600; padding: 10px 0; }

/* games: streak, chests, sprint, boss battle */
.gm-top { display: flex; gap: 12px; justify-content: space-around; text-align: center; }
.gm-stat { display: flex; flex-direction: column; align-items: center; }
.gm-big { font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.gm-small { font-size: 0.95rem; color: var(--ink-soft, #4a5670); margin: 4px 0 0; }
.gm-flame { font-weight: 600; margin: 12px 0 2px; }
.gm-next { color: var(--ink-soft, #4a5670); margin: 0 0 16px; }
.gm-chest { text-align: center; background: #E8F4EC; border-color: #4FA37A; }
.gm-chestbox { min-height: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 8px; }
.gm-chesticon { font-size: 3.4rem; animation: gmwiggle 1.6s ease-in-out infinite; }
.gm-pop { font-size: 2.2rem; font-weight: 800; color: #B7791F; animation: gmpop 0.6s ease-out; }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 8px 0 18px; }
.gm-card { position: relative; text-decoration: none; color: inherit; display: block; }
.gm-card h3 { margin: 6px 0 4px; }
.gm-card p { margin: 0; color: var(--ink-soft, #4a5670); }
.gm-card.won { border-color: #27ae60; }
.gm-icon { font-size: 2.4rem; display: block; }
.gm-tag { display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 999px; background: var(--sky-deep); color: var(--navy); font-size: 0.85rem; font-weight: 600; }
.gm-soon { color: var(--ink-soft, #4a5670); text-align: center; margin: 8px 0 20px; }
.gm-home { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; border-color: #E0A93E; background: #FFFBEF; margin: 16px 0; }
.gm-homeleft { display: flex; flex-direction: column; gap: 4px; }
.gm-homeleft span { color: var(--ink-soft, #4a5670); font-size: 0.95rem; }
.gm-homeright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gm-homeright .gm-big { font-size: 1.3rem; }
.gm-playbtn { padding: 6px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; }
.gm-subj { display: grid; gap: 10px; margin-top: 14px; }
.gm-hud { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 6px; font-weight: 700; color: var(--navy); }
.gm-time { font-size: 1.6rem; }
.gm-combo { color: #B7791F; min-width: 90px; text-align: right; }
.gm-timebar { height: 12px; border-radius: 999px; background: var(--sky-deep); overflow: hidden; margin-bottom: 14px; }
.gm-timebar span { display: block; height: 100%; background: var(--blue-mid); transition: width 0.2s linear; }
.gm-timebar span.low { background: #c0392b; }
.gm-coinline { font-weight: 700; color: #B7791F; font-size: 1.15rem; margin: 10px 0; }
.gm-miss { padding: 8px 0; border-top: 1px solid var(--sky-deep); }
.gm-miss-q { margin: 0 0 4px; font-weight: 600; }
.gm-miss-a { margin: 0; color: #1e7e46; }
.gm-boss { text-align: center; }
.gm-bossface { font-size: 4.2rem; line-height: 1.1; display: inline-block; }
.gm-bossface.hit { animation: gmhit 0.45s ease-out; }
.gm-bossface.down { transform: rotate(80deg); opacity: 0.55; }
.gm-hpbar { height: 18px; border-radius: 999px; background: #f3d4d0; overflow: hidden; margin: 8px 0 4px; }
.gm-hpbar span { display: block; height: 100%; background: #c0392b; transition: width 0.35s ease; }
.gm-hearts { font-size: 1.6rem; margin: 4px 0 0; letter-spacing: 4px; }
.gm-limit { text-align: center; }
@keyframes gmwiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes gmpop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
@keyframes gmhit { 0% { transform: translateX(0); } 25% { transform: translateX(-10px) rotate(-6deg); } 60% { transform: translateX(10px) rotate(6deg); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .gm-chesticon, .gm-pop, .gm-bossface.hit { animation: none; } .gm-timebar span, .gm-hpbar span { transition: none; } }

/* ---------- games v2: arena, rush, hub art ---------- */
.gm-hubico { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto 6px; }
.gm-hubcard { text-align: center; }
.gm-setup-ico, .gm-result-ico { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 8px; }
.gm-coin-sm { width: 26px; height: 26px; vertical-align: middle; display: inline-block; }
.gm-bosses { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gm-bosscard { color: #fff; text-align: center; border: 0; }
.gm-bosscard h3, .gm-bosscard p { color: #fff; }
.gm-bosscard p { opacity: .85; font-size: 14px; }
.gm-bosscard-img { width: 120px; height: 120px; object-fit: contain; display: block; margin: 0 auto 4px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.gm-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6); z-index: 9; background: rgba(0,0,0,.35); border-radius: 22px; }
.gm-count.tick { animation: gmTick .5s ease-out; }
@keyframes gmTick { from { transform: scale(1.6); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.gm-float { position: absolute; transform: translate(-50%, 0); font-weight: 800; font-size: 30px; color: #fff; text-shadow: 0 3px 0 #b3261e, 0 0 12px rgba(0,0,0,.5); pointer-events: none; z-index: 8; animation: gmFloat 1.05s ease-out forwards; white-space: nowrap; }
.gm-float.crit { font-size: 44px; color: #ffd84a; text-shadow: 0 3px 0 #c2410c, 0 0 18px #ff8a00; }
.gm-float.gold { color: #ffd84a; text-shadow: 0 2px 0 #8a5a0f; }
.gm-float.red { color: #ff6b6b; }
@keyframes gmFloat { from { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } to { opacity: 0; margin-top: -70px; } }
.shake { animation: gmShake .4s; } @keyframes gmShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }

/* Answer Rush: underwater reef */
.gm-rush { position: relative; background: url(../img/games/sea-bg.webp) center/cover no-repeat, #0b4a86; border-radius: 22px; padding: 12px 12px 18px; color: #fff; min-height: 80vh; overflow: hidden; isolation: isolate; }
.gm-rush::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(ellipse at 50% 0%, rgba(255,214,90,.75) 0%, rgba(255,160,40,.28) 55%, transparent 80%); }
/* fever glow layer */
.gm-fglow { position: absolute; left: 0; top: 0; width: 100%; height: auto; opacity: 0; pointer-events: none; z-index: 1; transition: opacity .6s; }
.gm-rush.fever .gm-fglow { opacity: .9; animation: gmGlowSway 3s ease-in-out infinite alternate; }
@keyframes gmGlowSway { from { transform: translateY(-2%); } to { transform: translateY(2%); } }
.gm-rush.fever::after { opacity: 1; animation: gmPulse2 1.1s infinite alternate; }
@keyframes gmPulse2 { from { filter: brightness(.9); } to { filter: brightness(1.3); } }
.gm-rush .gm-hud { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'g g' 's c'; gap: 6px 10px; align-items: center; font-weight: 800; margin: 0; }
.gm-gauge { position: relative; aspect-ratio: 942 / 578; grid-area: g; max-width: 230px; justify-self: start; width: 70%; }
.gm-gimg { display: block; width: 100%; height: auto; }
.gm-gslot { position: absolute; left: 18.5%; right: 9%; top: 36%; bottom: 35%; border-radius: 999px; background: #0a2a52; overflow: hidden; }
.gm-gslot span { display: block; height: 100%; background: linear-gradient(#7de3ff, #1aa3e8); border-radius: 999px; transition: width .2s linear; }
.gm-gslot span.low { background: linear-gradient(#ffb199, #e0432b); }
.gm-gauge .gm-time { position: absolute; left: 50%; top: 50%; transform: translate(-30%, -50%); font-size: 20px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.gm-rush .gm-score { grid-area: s; font-size: 28px; color: #ffe27a; text-shadow: 0 2px 5px rgba(0,0,0,.6); }
.gm-rush .gm-combo { grid-area: c; color: #fff; font-size: 18px; text-align: right; text-shadow: 0 2px 5px rgba(0,0,0,.7); }
.gm-field { position: relative; margin-top: 8px; z-index: 2; }
.gm-sign { position: relative; max-width: 460px; aspect-ratio: 942 / 450; margin: 4px auto 6px; }
.gm-signimg { display: block; width: 100%; height: auto; }
.gm-sign .gm-rush-q { position: absolute; left: 14%; right: 14%; top: 27%; bottom: 24%; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 40px; line-height: 1.1; font-weight: 900; color: #3a1e06; text-shadow: 0 1px 0 rgba(255,255,255,.5); overflow: hidden; }
.gm-bubbles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 0; }
.gm-bubble { position: relative; border: 0; background: transparent no-repeat center/contain; aspect-ratio: 1 / 0.92; padding: 0; font: inherit; color: #fff; cursor: pointer; animation: gmBob 2.6s ease-in-out infinite alternate; filter: drop-shadow(0 8px 10px rgba(0,30,70,.35)); }
.gm-bubble.b0 { background-image: url(../img/games/sea-bubble-aqua.webp); } .gm-bubble.b1 { background-image: url(../img/games/sea-bubble-pink.webp); } .gm-bubble.b2 { background-image: url(../img/games/sea-bubble-gold.webp); } .gm-bubble.b3 { background-image: url(../img/games/sea-bubble-violet.webp); }
.gm-btxt { position: absolute; left: 16%; right: 16%; top: 24%; bottom: 24%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: clamp(26px, 9vw, 38px); font-weight: 900; line-height: 1.05; overflow-wrap: anywhere; color: #fff; -webkit-text-stroke: 5px #0a2f63; paint-order: stroke fill; text-shadow: 0 3px 6px rgba(0,30,70,.6); }
@keyframes gmBob { from { transform: translateY(0); } to { transform: translateY(-9px); } }
.gm-bubble.right { filter: drop-shadow(0 0 14px #b7ffd2) drop-shadow(0 0 28px #3dff94); transform: scale(1.06); }
.gm-bubble.wrong { background-image: url(../img/games/sea-wrong-bubble.webp) !important; filter: drop-shadow(0 6px 8px rgba(0,30,70,.35)); animation: gmSink 1.2s ease-in forwards; }
@keyframes gmSink { to { transform: translateY(40px); opacity: .35; } }
.gm-bubble:disabled { cursor: default; } .gm-bubble.right:disabled { animation: none; }
.gm-bubble.pop { animation: gmPop .35s ease-out; } @keyframes gmPop { 50% { transform: scale(1.22); } }
.gm-burst { position: absolute; left: 50%; top: 50%; width: 120%; height: auto; transform: translate(-50%, -50%); pointer-events: none; animation: gmBurst .7s ease-out forwards; z-index: 3; }
@keyframes gmBurst { from { opacity: 1; transform: translate(-50%, -50%) scale(.5); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }
.gm-sea { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.gm-sealife { position: absolute; width: 68px; height: auto; opacity: .9; left: -90px; animation: gmSwim 40s linear infinite; }
.gm-sealife.l3 { width: 90px; } .gm-sealife.l4, .gm-sealife.l5 { width: 56px; left: auto; right: -80px; animation-name: gmSwimBack; }
@keyframes gmSwim { to { left: 110%; } } @keyframes gmSwimBack { to { right: 110%; } }
.gm-rush.fever .gm-sealife { animation-duration: 14s !important; }
.gm-rise { position: absolute; bottom: -20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.18); animation: gmRise 8s linear infinite; }
@keyframes gmRise { to { transform: translateY(-110vh); opacity: .2; } }
.gm-result-ico { max-height: 190px; width: auto; }
@media (prefers-reduced-motion: reduce) { .gm-sealife, .gm-rise, .gm-bubble { animation: none; } }

/* Boss arena */
.gm-arena { position: relative; border-radius: 22px; padding: 12px; color: #fff; min-height: 85vh; overflow: hidden; transition: box-shadow .2s; }
.gm-arena.flash { box-shadow: inset 0 0 90px rgba(255,0,0,.75); }
.gm-arena.frozen { box-shadow: inset 0 0 90px rgba(120,200,255,.7); }
.gm-arena-top { display: flex; justify-content: space-between; align-items: center; }
.gm-leave { color: #fff; opacity: .8; font-weight: 600; text-decoration: none; padding: 8px 4px; }
.gm-hearts { display: flex; gap: 4px; } .gm-heart { width: 32px; height: 32px; }
.gm-stage { position: relative; text-align: center; margin-top: 4px; }
.gm-bossname { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.gm-hpbar2 { position: relative; height: 22px; background: rgba(0,0,0,.45); border: 2px solid #fff; border-radius: 12px; overflow: hidden; margin: 8px auto; max-width: 420px; }
.gm-hpbar2 span { display: block; height: 100%; background: linear-gradient(#ff6b6b, #c0261f); transition: width .4s; }
.gm-hpbar2 span.low { background: linear-gradient(#ffb347, #e0541f); animation: gmPulse 0.6s infinite alternate; }
.gm-hpbar2 em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.gm-bosswrap { position: relative; width: 210px; height: 220px; margin: 0 auto; animation: gmIdle 2.2s ease-in-out infinite alternate; }
@keyframes gmIdle { from { transform: translateY(0) scale(1); } to { transform: translateY(-8px) scale(1.03); } }
.gm-arena.rage .gm-bosswrap { animation-duration: 1s; filter: drop-shadow(0 0 16px rgba(255,60,0,.9)); }
.gm-bossimg { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,.5)); }
.gm-bosswrap.hit { animation: gmHit .4s; } @keyframes gmHit { 0% { transform: translateX(0); filter: brightness(2.2); } 25% { transform: translateX(-14px); } 50% { transform: translateX(14px); } 100% { transform: translateX(0); filter: none; } }
.gm-bosswrap.lunge { animation: gmLunge .5s; } @keyframes gmLunge { 40% { transform: scale(1.35) translateY(30px); } 100% { transform: scale(1); } }
.gm-bosswrap.down { animation: none; transform: translateY(18px) rotate(-6deg); }
.gm-bosswrap.laugh { animation: gmIdle .35s infinite alternate; }
.gm-taunt { position: absolute; right: -30px; top: -10px; width: 120px; opacity: 0; transform: scale(.6); transition: .25s; pointer-events: none; }
.gm-taunt.on { opacity: 1; transform: scale(1); } .gm-taunt-img { width: 100%; height: auto; }
.gm-fx { position: absolute; pointer-events: none; z-index: 5; }
.gm-fx.center { left: 50%; top: 50%; width: 220px; transform: translate(-50%, -50%); animation: gmFxIn .9s ease-out forwards; }
.gm-fx.big { width: 280px; }
.gm-fx.hitfx { left: 50%; top: 45%; width: 110px; mix-blend-mode: screen; transform: translate(-50%, -50%); animation: gmFxIn .65s ease-out forwards; }
@keyframes gmFxIn { from { opacity: 0; scale: .4; } 30% { opacity: 1; scale: 1.1; } to { opacity: 0; scale: 1.2; } }
.gm-qtimer { height: 12px; border-radius: 8px; background: rgba(0,0,0,.45); margin: 10px 2px; overflow: hidden; }
.gm-qtimer span { display: block; height: 100%; width: 100%; background: linear-gradient(#5ec4ff, #1e7fd6); transition: width .1s linear; }
.gm-qtimer span.low { background: linear-gradient(#ff8a65, #e0341f); }
.gm-qcard { background: rgba(255,255,255,.96); color: #1a2433; border-radius: 20px; padding: 14px; }
.gm-q { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.gm-opts { display: grid; gap: 10px; }
.gm-opt { text-align: left; border: 2px solid #d6dbe6; background: #fff; color: #1a2433; border-radius: 14px; min-height: 54px; padding: 10px 14px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.gm-opt:active { transform: scale(.98); }
.gm-opt.right { background: #dff6e7; border-color: #19a05a; } .gm-opt.wrong { background: #fde3e3; border-color: #d33; } .gm-opt.gone { opacity: .2; }
.gm-fb { margin: 10px 2px 0; font-weight: 700; color: #a32e2e; }
.gm-tools { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.gm-tool { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 6px; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.5); border-radius: 16px; color: #fff; padding: 6px 12px; font: inherit; cursor: pointer; min-height: 52px; }
.gm-tool.off { opacity: .35; cursor: default; }
.gm-tool-ico { width: 34px; height: 34px; object-fit: contain; grid-row: span 2; } .gm-tool-n { font-weight: 800; } .gm-tool-l { font-size: 12px; opacity: .85; }
.gm-super { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #ffd84a; animation: gmPulse .6s infinite alternate; }
.gm-super-ico { width: 44px; height: 44px; object-fit: contain; }
/* Boss arena fills the whole screen; the boss and the question are both always visible */
body.playing .gm-arena { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100vh; height: 100dvh; min-height: 0; border-radius: 0; margin: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; box-sizing: border-box; }
body.playing .gm-arena .gm-arena-top { flex: 0 0 auto; }
body.playing .gm-arena .gm-stage { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; margin-top: 0; }
body.playing .gm-arena .gm-bossname { flex: 0 0 auto; font-size: 18px; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
body.playing .gm-arena .gm-hpbar2 { flex: 0 0 auto; width: 100%; height: 20px; margin: 4px auto; }
body.playing .gm-arena .gm-bosswrap { flex: 1 1 0; min-height: 80px; width: min(78vw, 360px); height: auto; margin: 0 auto; }
body.playing .gm-arena .gm-qtimer { flex: 0 0 auto; margin: 6px 2px; }
body.playing .gm-arena .gm-qcard { flex: 0 1 auto; max-height: 46dvh; max-height: 46vh; overflow-y: auto; padding: 10px 12px; box-shadow: 0 -4px 18px rgba(0,0,0,.35); }
body.playing .gm-arena .gm-q { font-size: 18px; margin: 0 0 8px; }
body.playing .gm-arena .gm-opts { gap: 8px; }
body.playing .gm-arena .gm-opt { min-height: 46px; padding: 8px 12px; font-size: 16px; }
body.playing .gm-arena .gm-tools { flex: 0 0 auto; margin-top: 8px; }
body.playing .gm-arena .gm-tool { min-height: 44px; padding: 4px 10px; }
@media (min-width: 900px) { body.playing .gm-arena .gm-qcard { max-width: 760px; width: 100%; margin: 0 auto; } body.playing .gm-arena .gm-bosswrap { width: min(40vw, 420px); } }
.gm-bossresult { color: #fff; text-align: center; } .gm-bossresult h1, .gm-bossresult .scoresub, .gm-bossresult .gm-coinline { color: #fff; }
.gm-result-boss { width: 190px; height: 190px; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); }
@media (min-width: 700px) { .gm-opts { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .gm-bosswrap, .gm-bubble, .gm-super { animation: none !important; } }

/* duel race */
.duel-banner { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; margin: 6px 0; }
.duel-banner img { width: 54px; height: 54px; object-fit: contain; }
.duel-track { display: grid; gap: 10px; margin: 8px 0 14px; }
.duel-lane { display: grid; gap: 2px; }
.duel-lane-name { font-size: 13px; font-weight: 700; color: var(--muted); }
.duel-lane.you .duel-lane-name { color: var(--navy); }
.duel-rail { position: relative; height: 52px; border-radius: 26px; background: linear-gradient(#e9eef8, #d4def0); border: 2px solid var(--line); }
.duel-flag { position: absolute; right: 8px; top: 12px; font-size: 24px; }
.duel-runner { position: absolute; top: 2px; left: 0; width: 44px; height: 44px; transition: left .8s cubic-bezier(.2,.9,.3,1.2); }
.duel-runner img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.duel-runner.boost { animation: gmPop .5s; }
.duel-note { font-size: 12px; color: var(--muted); }

@media (max-height: 820px) { .gm-bosswrap { width: 170px; height: 175px; } .gm-q { font-size: 18px; } .gm-opt { min-height: 48px; padding: 8px 12px; font-size: 16px; } }

/* Join page: selected animal summary and a pinned join bar */
.board-pick { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); margin: 4px 0 10px; }
.board-pick img { width: 56px; height: 56px; border-radius: 50%; }
.board-joinbar { position: sticky; bottom: 86px; z-index: 6; background: #fff; border: 2px solid var(--sky-deep); border-radius: 18px; padding: 12px 14px; margin-top: 14px; box-shadow: 0 -6px 18px rgba(10,40,90,.18); display: grid; gap: 8px; }
.board-joinbar .board-consent { font-size: 14px; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; }
.board-joinbar .board-consent input { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.board-joinbar .board-err:empty { display: none; }
.board-joinbar .btn { width: 100%; }

.duel-puff { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-weight: 900; font-size: 18px; animation: gmFloat .9s ease-out forwards; }
.duel-puff.ok { color: #19a05a; } .duel-puff.no { color: #c0392b; }
.duel-botnote { text-align: center; font-size: 14px; color: var(--muted); margin: 6px 0 10px; }

/* lesson layer */
.lesson { margin-top: 16px; }
.lesson .eyebrow { display: inline-block; }
.lesson-title { font-size: 24px; margin: 4px 0 12px; }
.lesson-h { font-size: 20px; margin: 20px 0 8px; }
.lesson p, .lesson li { font-size: 18px; line-height: 1.6; }
.lesson-big { background: var(--gold-soft); border-radius: 16px; padding: 14px 16px; }
.lesson-big h3 { font-size: 17px; margin-bottom: 4px; color: var(--gold-ink); }
.lesson-big p { margin: 0; color: var(--ink); }
.lesson-steps, .lesson-wsteps { list-style: none; counter-reset: ls; margin: 0; padding: 0; }
.lesson-steps li, .lesson-wsteps li { counter-increment: ls; position: relative; padding: 6px 0 6px 42px; min-height: 40px; }
.lesson-steps li::before, .lesson-wsteps li::before { content: counter(ls); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sky); color: var(--navy); font-weight: 600; font-size: 15px; }
.lesson-ex { background: var(--sky); border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
.lesson-ex .lesson-q { font-weight: 600; color: var(--navy); margin: 0 0 6px; }
.lesson-ex .lesson-wsteps li::before { background: #fff; }
.lesson-ex .lesson-a { margin: 8px 0 0; font-weight: 700; color: var(--good); }
.lesson-watch { margin: 0; padding-left: 22px; }
.lesson-watch li { padding: 4px 0; }
.lesson-stretch { margin: 18px 0 0; color: var(--muted); }
.lesson .btn.big { margin-top: 20px; }
.lesson-skip { display: block; text-align: center; margin-top: 14px; padding: 10px; min-height: 44px; color: var(--blue); font-weight: 600; background: none; border: 0; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; width: 100%; }
.lesson-toggle { margin-top: 14px; }
.lesson-toggle .btn { width: 100%; }
.lesson-btn { min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 2px solid var(--sky-deep); background: #fff; color: var(--navy); font-weight: 600; font-size: 15px; cursor: pointer; }
.play-top .play-tools { display: flex; align-items: center; gap: 10px; }
.lesson-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15, 42, 92, .55); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; }
.lesson-modal { max-width: 640px; margin: 0 auto; }
.lesson-modal .lesson { margin-top: 0; }
body.lesson-open { overflow: hidden; }
.topic-body.hidden { display: none; }
@media print { .lesson-overlay { display: none; } }
.twoclocks { display: flex; gap: 8px; justify-content: center; }
.twoclocks .tc { margin: 0; flex: 1 1 0; max-width: 220px; min-width: 0; }
.twoclocks .tc svg.clock { max-width: 100%; }
/* lesson-nudge */
.lesson-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; font-size: 14px; padding: 6px 12px; }
.lesson-btn .lesson-glyph { flex: none; }
.play-top .play-tools { min-width: 0; gap: 8px; }
.nudge { margin: 12px 0 8px; padding: 12px 14px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold-bright); color: var(--gold-ink); }
.nudge .nudge-msg { margin: 0 0 10px; font-weight: 600; }
.nudge.done .nudge-msg { margin: 0; }
.nudge .nudge-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.nudge .nudge-btns .btn { min-height: 44px; margin: 0; flex: 1 1 120px; }

/* lesson pictures */
.lesson-pic { margin: 10px 0 6px; max-width: 100%; overflow: hidden; }
.lesson-pic .visgroup { margin: 0; }
.lesson-pic .vis { margin: 4px 0 8px; }
.lesson-pic .vis svg { max-width: 100%; }
.lesson-main-pic { margin: 12px 0 0; background: #fff; border: 1px solid var(--sky-deep); border-radius: 16px; padding: 8px 6px; }
.lesson-ex > .lesson-pic { background: #fff; border-radius: 12px; padding: 8px 4px; margin: 8px 0 10px; }
.lesson-wsteps li .lesson-spic { margin: 8px 0 4px; margin-left: -42px; background: #fff; border-radius: 12px; padding: 6px 4px; }
.lesson .lesson-pic .cw svg.cw-face { max-width: 205px; }
.lesson .lesson-pic .cw-digital { margin-top: 2px; height: 38px; line-height: 34px; font-size: 22px; }
.lesson .lesson-pic .cw button.cw-btn.spd { display: none; }
.lesson .lesson-pic .cw button.cw-btn { min-width: 0; padding: 4px 12px; }
.lesson .lesson-pic .vis svg.clock { max-width: 190px; }
.lesson .lesson-pic .cw-controls { margin-top: 6px; gap: 6px; }
.lesson .lesson-pic .cw-cap { font-size: 13px; }
@media (max-width: 340px) { .lesson .lesson-pic .cw svg.cw-face { max-width: 180px; } .lesson-ex { padding: 12px 10px; } }

/* simpler-help */
.help-row { margin: 4px 0 14px; }
.help-btn { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--gold-bright); background: var(--gold-soft); color: var(--gold-ink); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.help-btn:hover, .help-btn:focus-visible { background: #F7E4B4; }
.simpler .simpler-explain { margin: 6px 0 12px; }
.simpler .simpler-explain p { margin: 0 0 10px; font-size: 18px; line-height: 1.5; color: var(--ink); }
.simpler .simpler-pic { margin: 6px 0 14px; display: flex; justify-content: center; max-width: 100%; overflow: hidden; }
.simpler .simpler-count { margin: 14px 0 6px; }
.simpler .simpler-ex { margin-top: 6px; }
.simpler .simpler-steptext { margin: 0; font-size: 19px; line-height: 1.5; color: var(--navy); font-weight: 600; }
.simpler .simpler-next { margin-top: 12px; width: 100%; }
.simpler .simpler-go { margin-top: 14px; }
.easy-done .btn { width: 100%; margin-top: 10px; }
.simpler .simpler-pic .visgroup { width: 100%; }
.lesson-ex .lesson-pic .cw-cap { display: none; }
.lesson-pic svg.clock { overflow: visible; }

/* Add to home screen */
.install { position: relative; margin-top: 16px; padding: 16px 18px; background: var(--sky); border-color: var(--sky-deep); box-shadow: none; }
.install .install-title { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 19px; margin: 0 0 4px; line-height: 1.25; }
.install .install-text { margin: 0 0 12px; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.install .install-go { width: 100%; }
.install-how { background: var(--paper); border: 1px solid var(--sky-deep); border-radius: 14px; }
.install-how summary { padding: 12px 14px; min-height: 48px; font-weight: 600; color: var(--navy); cursor: pointer; display: flex; align-items: center; }
.install-how ol { margin: 0; padding: 0 16px 12px 36px; font-size: 16px; }
.install-how li { margin: 0 0 6px; }
.install.home { padding-right: 56px; }
.install.home .install-title { font-size: 17px; font-family: var(--sans); font-weight: 600; }
.install-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; border-radius: 50%; cursor: pointer; }
.install-x:hover, .install-x:focus-visible { background: var(--sky-deep); color: var(--navy); }
@media print { .install-host { display: none !important; } }

.hero { grid-template-columns: 1fr 130px; }
.hero-img.hero-app { border-radius: 50%; width: 100%; max-width: 130px; height: auto; max-height: none; aspect-ratio: 1 / 1; object-fit: cover; justify-self: center; box-shadow: 0 8px 22px rgba(11,45,114,.22); }
@media (min-width: 600px) { .hero { grid-template-columns: 1fr 210px; } .hero-img.hero-app { max-width: 210px; } }
@media (max-width: 380px) { .hero { grid-template-columns: 1fr 104px; } .hero-img.hero-app { max-width: 104px; } }
.classes-promo .clinic-promo-links { display: flex; flex-wrap: wrap; gap: 10px; }

.home-note { font-size: 0.92rem; line-height: 1.6; color: var(--muted, #5b6679); margin: 0 2px 6px; }
.home-note strong { color: var(--navy); }

/* Three choices at the bottom of a lesson: I don't get it, Practise more, Skip */
.lesson-choices { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 18px; }
.lesson-choices .lesson-choice { width: 100%; margin: 0; text-align: center; }
.lesson-choices .help-btn { min-height: 52px; font-size: 1rem; }
.lesson-choices .lesson-skip { margin-top: 0; }

/* ---------- Calm view ---------- */
.head-row { grid-template-columns: 1fr auto 1fr; }
.plus-btn { justify-self: start; }
.head-right { align-items: center; gap: 8px; }
.cf-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #EAF2EA; color: #2F6B4A; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cf-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cf-btn.on { background: #2F6B4A; color: #fff; }
.snd-btn { width: 44px; height: 44px; }
.logo { width: min(280px, 100%); height: auto; }

html.calm {
  --cream: #F2F0E9; --paper: #FBFAF6; --sky: #ECEFEC; --sky-deep: #DCE3DE;
  --blue: #3B5C7C; --blue-mid: #56728D; --blue-soft: #98ADBF; --navy: #2B3C4E;
  --gold: #8F7A52; --gold-bright: #BBA77C; --gold-soft: #EFE9DA; --gold-ink: #4F4228;
  --ink: #2A3036; --muted: #596069; --line: #D9D5C9;
  --good: #3F6F57; --good-bg: #E3ECE6; --bad: #8F5347; --bad-bg: #F0E5E1;
  --shadow: 0 2px 8px rgba(40, 45, 50, .06);
  --serif: Verdana, Tahoma, 'Segoe UI', Arial, sans-serif;
  --sans: Verdana, Tahoma, 'Segoe UI', Arial, sans-serif;
}
html.calm body { font-size: 18px; line-height: 1.8; letter-spacing: .02em; word-spacing: .1em; text-align: left; }
html.calm h1, html.calm h2, html.calm h3 { font-weight: 700; line-height: 1.35; letter-spacing: .01em; }
html.calm p, html.calm li { max-width: 62ch; }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.calm .site-head { box-shadow: none; border-bottom: 1px solid var(--line); background: var(--paper); }
html.calm .card, html.calm .topic, html.calm .act, html.calm .subject { box-shadow: none; }
html.calm img, html.calm svg.ico, html.calm .nav-ico, html.calm .row-ico { filter: saturate(.55) contrast(.95); }
html.calm .snd-btn, html.calm .nav-item[href="#/board"], html.calm a[href="#/board"].strip, html.calm a[href="#/board"].card, html.noboard a[href="#/board"].strip, html.noboard a[href="#/board"].card { display: none !important; }
html.calm .site-head .head-right { gap: 0; }
html.calm .head-row { grid-template-columns: 1fr auto 1fr; }
html.calm .bottom-nav, html.calm #bottom-nav { grid-template-columns: repeat(4, 1fr); }
html.calm .rd-star, html.calm .confetti, html.calm .spark { display: none !important; }
html.calm .btn.primary { background: var(--navy); }
html.calm .passage.dock { position: static; }
html.calm .passage.dock[open] .pbody { max-height: none; overflow: visible; }
html.calm .bottom-nav { background: var(--paper); }
html.calm .hero h1 { font-size: clamp(22px, 5.4vw, 28px); }

/* ---------- Comfort settings panel ---------- */
.comfort .cf-intro { color: var(--muted); }
.cf-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cf-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-text strong { font-size: 1.02rem; }
.cf-note { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.cf-switch { flex: none; width: 56px; height: 32px; border-radius: 999px; border: 2px solid var(--blue-soft); background: #fff; padding: 0; position: relative; cursor: pointer; }
.cf-switch .cf-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); transition: left .15s; }
.cf-switch[aria-checked="true"] { background: var(--blue); border-color: var(--blue); }
.cf-switch[aria-checked="true"] .cf-knob { left: 27px; background: #fff; }
.cf-switch:disabled { opacity: .45; cursor: not-allowed; }
.comfort .btn.big { margin-top: 12px; width: 100%; }
.comfort-card .btn { width: 100%; }
.listen-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; margin: 0 0 12px; border-radius: 999px; border: 1.5px solid var(--blue-soft); background: var(--sky); color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.listen-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.listen-btn svg path:nth-child(2) { fill: none; }
.listen-btn.playing { background: var(--blue); color: #fff; border-color: var(--blue); }
.passage .pbody .listen-btn { margin-top: 4px; }

/* more space in the text (letters, words and lines move together) */
html.space body { letter-spacing: .05em; word-spacing: .14em; line-height: 1.75; }
html.space .btn, html.space .opt, html.space .nav-item { letter-spacing: .03em; }
/* bigger text */
html.big body { zoom: 1.14; }
/* quieter menu */
html.noboard .nav-item[href="#/board"] { display: none !important; }
html.noboard .bottom-nav { grid-template-columns: repeat(4, 1fr); }
html.nostreak .streakchip { display: none !important; }

/* passage exercises: passage and every question on one scrolling page */
.onepage-hint { margin: 14px 2px 4px; font-weight: 600; color: var(--navy); }
.onepage-q { margin-top: 18px; }
.onepage-q .qnum { display: inline-block; font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.onepage-q .actions { margin-top: 14px; }
.onepage-q .feedback { margin-top: 14px; }
.onepage-finish { margin: 22px 0 40px; text-align: center; }
.onepage-left { margin: 0 0 10px; font-weight: 600; }

.review-card .review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.review-card .review-actions .btn { text-decoration: none; text-align: center; }

/* Today's Summit week dots and the parent weekly summary */
.weekdots { display: flex; gap: 6px; margin-top: 8px; }
.weekdots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(26,36,86,.14); display: inline-block; }
.weekdots i.on { background: var(--gold, #c9a227); }
html.nostreak .weekdots { display: none !important; }
.weekly .weekrow { display: flex; gap: 6px; margin: 8px 0; }
.weekly .wday { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.weekly .wday i { width: 22px; height: 22px; border-radius: 50%; background: rgba(26,36,86,.12); display: block; }
.weekly .wday.on i { background: var(--gold, #c9a227); }
.weekly .weekline { font-weight: 600; margin: 6px 0 10px; }
.weekly .weekgroup { margin-top: 10px; } .weekly .weekgroup p { margin: 4px 0; }

.sampleban { background: var(--plus-bg); border-color: #D9C9F0; }
.sampleban .btn { margin-top: 8px; }
.plusnote .btn { margin: 4px 0 10px; }
@media print { .sampleban .btn { display: none; } }
.curtoggle { display: flex; gap: 8px; margin: 0 0 10px; }
.curopt { flex: 1; min-height: 52px; padding: 10px 12px; border: 2px solid #c9d3ea; border-radius: 12px; background: #fff; color: #0d2a5c; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer; }
.curopt.on { background: #0d2a5c; border-color: #0d2a5c; color: #fff; }
.curopt:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
@media (max-width: 420px) { .curtoggle { flex-direction: column; } }

/* plans: two cards with a monthly or yearly switch */
.plans { margin: 18px 0; }
.plans-h { font: 600 clamp(24px, 6vw, 32px) var(--serif); color: var(--navy); text-align: center; margin: 0 0 14px; }
.plans-switch { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 10px; padding: 4px; gap: 4px; background: var(--sky); border-radius: 999px; }
.psw { border: 0; background: transparent; color: var(--navy); font: inherit; font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.psw.on { background: #fff; box-shadow: 0 1px 4px rgba(15,42,92,.18); }
.psave { color: var(--blue); font-weight: 600; }
.plans-cur { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; }
.pcur { border: 1.5px solid var(--sky-deep); background: #fff; color: var(--navy); font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.pcur.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.psw:focus-visible, .pcur:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 720px) { .plans-grid { grid-template-columns: 1fr; } }
.plan { background: var(--paper); border: 1.5px solid var(--line); border-radius: 20px; padding: 22px 20px 20px; box-shadow: var(--shadow); }
.plan-plus { border-color: var(--navy); }
.plan h3 { font: 600 24px var(--serif); color: var(--navy); margin: 0; }
.plan-sub { margin: 2px 0 14px; color: var(--muted); font-size: 15px; }
.plan-price { font: 600 40px/1.1 var(--serif); color: var(--navy); margin: 0; }
.plan-per { margin: 2px 0 14px; color: var(--muted); font-size: 14px; }
.plan .btn { width: 100%; text-align: center; }
.plan-note { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.plan-lead { margin: 18px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { position: relative; padding: 0 0 9px 28px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.plan-list li::before { content: ''; position: absolute; left: 3px; top: 5px; width: 6px; height: 11px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* Lesson v2 parts and the Learn library */
.lesson-words { background: #EEF3FB; border-radius: 16px; padding: 14px 16px; margin-top: 12px; }
.lesson-words h3 { font-size: 17px; margin: 0 0 6px; color: var(--navy, #0F2A5C); }
.lesson-words dl { margin: 0; }
.lesson-words dt { font-weight: 700; margin-top: 8px; color: #03409C; }
.lesson-words dd { margin: 2px 0 0; }
.lesson-practice { background: #F3FAF5; border: 1px solid #CFE6D6; border-radius: 16px; padding: 12px 16px; margin-top: 18px; }
.lesson-practice h3 { font-size: 17px; margin: 0 0 6px; color: #2F6B4A; }
.lesson-practice ul { margin: 0; padding-left: 22px; }
.lesson-practice li { padding: 3px 0; }
.lesson-grownups { border: 1px dashed #C9B27A; border-radius: 16px; padding: 12px 16px; margin-top: 18px; background: #fffdf6; }
.lesson-grownups h3 { font-size: 17px; margin: 0 0 4px; }
.lesson-grownups p { margin: 0; }
.learn-subj { margin-bottom: 8px; }
.learn-search { margin: 12px 0; }
.learn-search input { width: 100%; box-sizing: border-box; font: inherit; padding: 12px 14px; border: 2px solid var(--line, #E3DFD2); border-radius: 14px; min-height: 48px; }
.learn-card + .learn-card { margin-top: 10px; }
.learn-more-h { margin: 22px 0 6px; font-size: 20px; }
.view .learn-card, .learn-list .learn-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.lesson-toggle .btn + .btn { margin-top: 8px; }
.learn-eyebrow { height: 8px; }
.lesson-more { margin-top: 12px; }
.lesson-more > summary, .lesson-grownups > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.lesson-more[open] > summary { margin-bottom: 8px; }
.lesson-grownups > summary { font-size: 17px; }
.lesson-grownups p { margin: 6px 0 0; }

/* Free trial card on the Plus page */
.trialcard { background: var(--gold-soft); border: 1.5px solid var(--gold-bright); border-radius: 16px; padding: 18px; margin: 14px 0 20px; text-align: left; }
.trialcard h2 { margin: 0 0 6px; }
.trialcard p { margin: 0 0 10px; }
.trialcard input[type=email] { width: 100%; min-height: 54px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; font-size: 18px; margin-bottom: 10px; background: #fff; }

/* legal pages */
.legal ul { margin: 6px 0 10px; padding-left: 22px; } .legal li { margin: 4px 0; line-height: 1.5; }
.legal-copy { font-weight: 600; margin: 0 0 4px; } .legal-short { background: var(--gold-soft); }
.contentnote { line-height: 1.5; }

/* Teacher platform (phase 1) */
.tp-card { margin: 0 0 18px; }
.tp-field { display: block; margin: 0 0 12px; }
.tp-field > span { display: block; font-weight: 600; margin: 0 0 4px; }
.tp-field input, .tp-field select, .tp-field textarea, .tp-card select { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; background: #fff; box-sizing: border-box; }
.tp-sub { display: block; color: #4a5272; font-size: 15px; margin: 2px 0 8px; }
.tp-msg { color: var(--navy); font-weight: 600; min-height: 1.2em; margin: 6px 0; }
.tp-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.tp-tab { flex: 1; min-height: 44px !important; padding: 8px !important; font-size: 16px !important; }
.tp-tab.on { background: var(--navy); color: #fff; }
.tp-kid, .tp-hw { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tp-hw { flex-direction: column; align-items: flex-start; }
.tp-kid code { font-size: 18px; letter-spacing: 1px; background: #eef2ff; padding: 4px 10px; border-radius: 8px; }
.tp-small { min-height: 40px !important; padding: 6px 16px !important; font-size: 15px !important; }
.tp-danger { color: #a02020; border-color: #a02020; margin-top: 18px; }
.tp-form { margin: 0 0 18px; }
.tp-hwcard { margin: 0 0 14px; }
.btn.link { border: 0; background: none; text-decoration: underline; min-height: 40px; }
.tp-topiccard { border: 2px solid var(--line); border-radius: 18px; padding: 14px; margin: 12px 0; }
.tp-act { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tp-preview { width: 100%; background: #f6f8ff; border-radius: 12px; padding: 8px 12px; }
.tp-q p { margin: 4px 0; }

/* Layout polish (mountain palette release): centred headings, numbers and cards; wider desktop */
#app .view > h1, #app .view > .lead, #app .view > h2 { text-align: center; }
.hero { grid-template-columns: 1fr !important; justify-items: center; text-align: center; padding: 26px 20px; }
.hero-text { text-align: center; }
.hero-img.hero-app { order: -1; max-width: 150px !important; }
@media (min-width: 600px) { .hero-img.hero-app { max-width: 140px !important; } }
.subject { text-align: center; }
.subject .subj-ico { margin: 0 auto 6px; }
.stat, .stats, .score, .rankup, .me-num, .me-rank { text-align: center; }
.topic > .grow, .act > .grow { text-align: left; }
@media (min-width: 1000px) { body:not(.playing) .wrap { max-width: 980px; } }

/* Summit climb (topic mastery) */
.mastery { text-align: center; }
.mastery .mt-svg { width: 100%; max-width: 360px; height: auto; margin: 0 auto 6px; display: block; overflow: visible; }
.mastery h2 { margin: 4px 0 6px; }
.mastery .mt-line { font-weight: 600; color: var(--navy); margin: 0 0 10px; }
.mastery .mt-bar { height: 12px; border-radius: 999px; background: var(--sky-deep); overflow: hidden; max-width: 420px; margin: 0 auto 12px; }
.mastery .mt-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.mastery .mt-how { font-size: 15px; color: var(--muted); max-width: 30em; margin: 0 auto 14px; }
.mastery.summit { border-color: var(--gold-bright); background: linear-gradient(180deg, var(--gold-soft), #fff); }

/* ---- Mountain home: scene hero, art subject cards, calm older-child look ---- */
.hero.scene { position: relative; display: block; overflow: hidden; padding: 0; min-height: 330px; border: 0; background: linear-gradient(180deg, var(--sky), var(--cream)); }
.hero.scene .scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.hero.scene .hero-text { position: relative; z-index: 2; padding: 22px 20px 0; max-width: 100%; background: linear-gradient(180deg, rgba(240,247,251,.94) 0%, rgba(240,247,251,.88) 62%, rgba(240,247,251,0) 100%); padding-bottom: 54px; }
.hero.scene .hero-text h1 { font-size: clamp(28px, 7.2vw, 38px); line-height: 1.12; }
.hero.scene .hero-text p { color: var(--ink); max-width: 30em; margin-bottom: 14px; }
.hero.scene .btn { margin-top: 2px; }
.hero.scene .scene-mascot { position: absolute; right: 6px; bottom: -6px; height: 150px; width: auto; z-index: 3; filter: drop-shadow(0 6px 8px rgba(23,63,49,.25)); pointer-events: none; }
.hero.scene.calm { min-height: 0; background: linear-gradient(180deg, var(--sky), #fff); border: 1px solid var(--line); }
.hero.scene.calm .hero-text { background: none; padding: 20px 20px 22px; }
.subj-art { width: 64px; height: 64px; object-fit: contain; margin-bottom: 4px; }
.home-about { margin-top: 14px; }
.home-about .home-note { margin: 8px 0 0; }
@media (min-width: 600px) { .hero.scene { min-height: 360px; } .hero.scene .hero-text { max-width: 58%; background: linear-gradient(90deg, rgba(240,247,251,.95) 0%, rgba(240,247,251,.9) 78%, rgba(240,247,251,0) 100%); padding-bottom: 28px; } .hero.scene .scene-mascot { height: 220px; right: 18px; } }
.hero.scene:not(.calm) .hero-text { text-align: left; }
.hero.scene:not(.calm) .hero-text .eyebrow { margin-left: 0; }
.hero.scene:not(.calm) .scene-mascot { height: 138px; right: 0; }
.hero.scene:not(.calm) .hero-text { padding-bottom: 96px; }
@media (min-width: 600px) { .hero.scene:not(.calm) .hero-text { padding-bottom: 40px; } .hero.scene:not(.calm) .scene-mascot { height: 230px; } }

/* ---- The trail ---- */
.trail-head { text-align: center; margin: 6px 0 8px; }
.trail-head h2 { font-size: 24px; }
.trail-head p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.trail { position: relative; width: 100%; max-width: 440px; margin: 0 auto; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #D7EAF5 0%, #EAF4F8 38%, #E3F0E8 100%); border: 1px solid var(--line); }
.trail-svg { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 100%); }
.tseg { fill: none; stroke: #C4DCEA; stroke-width: 18; stroke-linecap: butt; }
.tseg.done { stroke: var(--gold-bright); }
.trail-flag { position: absolute; left: 50%; top: 0; width: 22%; transform: translate(-50%, 4%); }
.trail-flaglabel { position: absolute; left: 50%; top: 14.6%; transform: translateX(-50%); font: 800 13px var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: rgba(255,255,255,.8); padding: 2px 10px; border-radius: 999px; display: none; }
.trail-camp { position: absolute; left: 50%; bottom: 0; width: 24%; transform: translate(-50%, 8%); }
.tnode { position: absolute; transform: translate(-50%, -50%); display: block; width: 0; height: 0; text-decoration: none; color: var(--navy); }
.tdisc { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; background: #fff; border: 4px solid var(--blue-soft); box-shadow: 0 6px 14px rgba(23,63,49,.18); display: grid; place-items: center; }
.tdisc .ico { width: 44px; height: 44px; }
.tnode.done .tdisc { border-color: var(--gold-bright); }
.tnode.here .tdisc { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(31,106,156,.22), 0 6px 14px rgba(23,63,49,.2); }
.tcheck { position: absolute; right: -6px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #fff; font: 800 15px/26px var(--serif); text-align: center; border: 2px solid #fff; }
.tlab { position: absolute; top: 0; transform: translateY(-50%); width: 148px; display: flex; flex-direction: column; line-height: 1.25; }
.tnode.l .tlab { left: 46px; text-align: left; }
.tnode.r .tlab { right: 46px; text-align: right; }
.tlab strong { font: 800 15px/1.2 var(--serif); }
.tlab em { font-style: normal; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.tnode.here .tlab em { color: var(--blue); font-weight: 600; }
.tmascot { position: absolute; width: 64px; height: auto; top: -62px; filter: drop-shadow(0 4px 6px rgba(23,63,49,.3)); pointer-events: none; }
.tnode.l .tmascot { left: -78px; } .tnode.r .tmascot { left: 14px; }
.tnode:focus-visible .tdisc { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { .tnode.here .tdisc { animation: tpulse 2.4s ease-in-out infinite; } }
@keyframes tpulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(31,106,156,.18), 0 6px 14px rgba(23,63,49,.2); } 50% { box-shadow: 0 0 0 10px rgba(31,106,156,.1), 0 6px 14px rgba(23,63,49,.2); } }
.tmascot { max-width: none; }

/* ---- Welcome flow ---- */
.welcome { text-align: center; padding: 22px 18px 20px; }
.welcome h1 { margin: 6px 0 6px; }
.welcome .lead { margin: 0 0 14px; }
.wsteps { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.wsteps i { width: 34px; height: 8px; border-radius: 999px; background: var(--sky-deep); }
.wsteps i.on { background: var(--blue); } .wsteps i.was { background: var(--gold-bright); }
.wpick { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 10px; }
.wpick .av-img { width: 112px; height: 112px; border-radius: 50%; border: 5px solid var(--blue-soft); background: #fff; }
.wpick strong { font: 800 22px var(--serif); color: var(--navy); }
.wpick .wname { font-size: 28px; }
.wgrid { justify-content: center; gap: 8px; }
.wgrid .av-btn { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: #fff; border-color: var(--sky-deep); }
.wgrid .av-btn.sel { border-color: var(--blue); background: var(--sky); }
.welcome .btn { margin: 6px auto 0; display: flex; justify-content: center; }
.welcome .btn.big { width: 100%; max-width: 360px; margin-top: 12px; }
.wskip { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--blue); font-weight: 600; min-height: 44px; cursor: pointer; text-decoration: underline; }
.wstd { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; margin: 0 auto 6px; }
.wstd-btn { min-height: 64px; border-radius: 20px; border: 3px solid var(--sky-deep); background: #fff; font: 800 20px var(--serif); color: var(--navy); cursor: pointer; }
.wstd-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.wnote { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 5px; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700; }
.me-chip .av-img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; }
.wstdline { margin: 0 0 10px; text-align: center; color: var(--muted); font-weight: 600; }
.wstdline a { margin-left: 4px; }

body.welcoming .bottom-nav, body.welcoming .site-foot { display: none; }
body.welcoming { padding-bottom: 32px; }

/* ---- Placement map in the mountain look ---- */
.meter { background: linear-gradient(90deg, #CFE5F2, #BFDDCB); height: 30px; }
.meter .seg { line-height: 30px; font-weight: 700; color: var(--navy); font-size: 12.5px; }
.meter .mk { top: -6px; width: 16px; height: 42px; margin-left: -8px; background: var(--blue); border-color: #fff; box-shadow: 0 3px 8px rgba(23,63,49,.3); }
.psline.cmp { background: var(--sky); border-radius: 14px; padding: 10px 12px; font-weight: 500; color: var(--ink); }
.psum .prow:first-of-type { border-top: 0; }

/* Role chooser and role onboarding */
.welcome.roles .wrole { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin: 0 0 12px; border: 2px solid var(--sky-deep); border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; min-height: 72px; }
.welcome.roles .wrole:hover, .welcome.roles .wrole:focus-visible { border-color: var(--blue); background: var(--cream); }
.wrole strong { display: block; font-size: 1.1rem; }
.wrole span { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.wrows { margin: 14px 0 18px; display: grid; gap: 10px; text-align: left; }
.wrow { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; background: var(--cream); border-radius: 14px; }
.wrow strong { display: block; }
.wrow span { display: block; color: var(--muted); font-size: .95rem; }
.welcome .btn.big { display: block; width: 100%; margin: 10px 0 0; text-align: center; box-sizing: border-box; }
.tourbar { margin: 0 0 14px; }

/* Click-through tour */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour.flat { background: rgba(23, 50, 63, .55); }
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(23, 50, 63, .55); outline: 3px solid #fff; pointer-events: none; transition: top .2s, left .2s, width .2s, height .2s; }
.tour-card { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 520px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 18px 20px 14px; box-shadow: 0 8px 30px rgba(23, 50, 63, .35); }
.tour-card h2 { margin: 6px 0 6px; font-size: 1.2rem; }
.tour-card p { margin: 0 0 12px; color: var(--ink); line-height: 1.45; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--sky-deep); }
.tour-dots i.on { background: var(--blue); }
.tour-dots i.was { background: var(--blue-mid); }
.tour-row { display: flex; gap: 10px; justify-content: flex-end; }
.tour-row .btn { min-height: 44px; }
.tour-card .link-btn { display: block; margin: 8px 0 0; }
.welcome.roles .wrole { text-align: left; }
.tour-dots i { display: block; flex: none; }
.tour-card .link-btn { background: none; border: 0; padding: 8px 0; color: var(--blue); text-decoration: underline; font: inherit; cursor: pointer; text-align: left; min-height: 44px; }
.little blockquote { margin: 12px 0 2px; padding: 4px 0 4px 14px; border-left: 4px solid var(--blue-soft); font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.little .qsrc { margin: 0 0 8px 18px; color: var(--muted); font-size: .9rem; }
.little-steps { padding-left: 22px; margin: 6px 0 12px; display: grid; gap: 6px; }

/* Layout tidy: centred headings, pills and buttons */
.pills { justify-content: center; }
h1, h2.sec, .sec, .welcome h1, .welcome .lead, .welcome .wnote, .tourbar { text-align: center; }
.tourbar { display: flex; justify-content: center; }
.welcome .wnote { margin: 12px 0; }
.welcome > p.lead { margin: 18px 0 8px; }
.welcome .wrows + .wnote, .welcome .pills { margin-top: 8px; }
.welcome .btn, .welcome .link-btn { display: block; width: 100%; box-sizing: border-box; text-align: center; margin: 10px 0 0; }
.wstdline { text-align: center; }
.hero h1, .hero .hero-text { text-align: left; }
.welcome h2, .mail h2 { text-align: center; }

/* Class pills: one size, stacked in a tidy grid */
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 420px; margin: 8px auto 14px; }
.pills .pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 8px 6px; box-sizing: border-box; white-space: nowrap; }
.wstd { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
.wstd-btn { width: 100%; min-height: 52px; white-space: nowrap; }
.wstd-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 6px; }
.wstd-btn .ico, .wstd-btn img { width: 24px; height: 24px; flex: none; }
.wstd { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pills { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wstd-btn, .pills .pill { gap: 6px; padding: 8px 4px; font-size: .98rem; }
.wstd-btn .pill-ico, .pills .pill-ico { width: 22px; height: 22px; flex: none; }
.wstd-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Animated welcome scene */
body.wscene-on #site-head { display: none; }
body.wscene-on { background: #BFE0F0; padding-bottom: 0; }
.wscene-wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.wscene { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 18px 14px 120px; box-sizing: border-box; }
.ws-bg { position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none; object-fit: cover; z-index: 0; animation: wsPan 60s ease-in-out infinite alternate; }
@keyframes wsPan { from { transform: scale(1.02) translate(-1.5%, 0); } to { transform: scale(1.1) translate(1.5%, -1%); } }
.ws-rays { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, rgba(255,247,200,.0) 20%, rgba(255,247,200,.35) 32%, rgba(255,247,200,0) 44%, rgba(255,247,200,.25) 58%, rgba(255,247,200,0) 70%); mix-blend-mode: screen; animation: wsRay 14s ease-in-out infinite alternate; }
@keyframes wsRay { from { opacity: .45; transform: translateX(-4%); } to { opacity: .9; transform: translateX(4%); } }
.ws-mist { position: absolute; z-index: 1; left: -30%; width: 160%; height: 38%; pointer-events: none; background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%), radial-gradient(ellipse at 75% 40%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%); filter: blur(6px); }
.ws-mist.m1 { top: 38%; animation: wsDrift 48s linear infinite; }
.ws-mist.m2 { top: 62%; opacity: .8; animation: wsDrift 70s linear infinite reverse; }
@keyframes wsDrift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
.ws-bird { position: absolute; z-index: 2; width: 54px; left: -80px; pointer-events: none; }
.ws-bird svg { width: 100%; fill: #17323F; display: block; }
.ws-bird .wl, .ws-bird .wr { transform-origin: 30px 18px; animation: wsFlap .55s ease-in-out infinite alternate; }
.ws-bird .wr { animation-direction: alternate-reverse; animation-name: wsFlapR; }
@keyframes wsFlap { from { transform: rotate(18deg); } to { transform: rotate(-22deg); } }
@keyframes wsFlapR { from { transform: rotate(-18deg); } to { transform: rotate(22deg); } }
.ws-bird.b1 { top: 12%; animation: wsFly 26s linear infinite; }
.ws-bird.b2 { top: 24%; width: 34px; animation: wsFly 38s linear infinite 6s; opacity: .85; }
.ws-bird.b3 { top: 8%; width: 42px; animation: wsFly 32s linear infinite 15s; }
@keyframes wsFly { 0% { transform: translate(0, 0); } 25% { transform: translate(30vw, -16px); } 50% { transform: translate(60vw, 10px); } 75% { transform: translate(90vw, -12px); } 100% { transform: translate(125vw, 6px); } }
.ws-logo { position: relative; z-index: 3; width: min(430px, 88vw); height: auto; margin: 6px 0 12px; filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 4px 14px rgba(255,255,255,.9)); animation: wsFloat 7s ease-in-out infinite; }
@keyframes wsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ws-panel { position: relative; z-index: 3; width: min(520px, 100%); background: rgba(255,255,255,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 24px; padding: 20px 18px 14px; box-shadow: 0 10px 40px rgba(23,63,49,.25); animation: wsRise .9s ease-out both; }
@keyframes wsRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.ws-panel h1 { margin: 0 0 6px; font-size: 1.7rem; }
.ws-panel .lead { margin: 0 0 14px; }
.ws-panel .wrole { margin: 0 0 10px; transition: transform .2s; animation: wsRise .8s ease-out both; }
.ws-panel .wrole:nth-of-type(1) { animation-delay: .25s; } .ws-panel .wrole:nth-of-type(2) { animation-delay: .4s; } .ws-panel .wrole:nth-of-type(3) { animation-delay: .55s; }
.ws-panel .wrole:hover { transform: translateY(-2px) scale(1.01); }
.ws-climber { position: absolute; z-index: 2; right: 2%; bottom: 8px; height: min(34vh, 260px); width: auto; max-width: none; animation: wsBob 4.5s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(23,63,49,.35)); }
@keyframes wsBob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
.ws-snd { position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(23,63,49,.88); color: #fff; border: 0; border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; max-width: 86vw; }
@media (max-width: 560px) { .ws-climber { height: 22vh; right: -2%; } .ws-snd { left: 14px; transform: none; max-width: 60vw; font-size: .9rem; padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { .ws-bg, .ws-rays, .ws-mist, .ws-bird, .ws-logo, .ws-climber, .ws-panel, .ws-panel .wrole, .ws-bird .wl, .ws-bird .wr { animation: none !important; } .ws-bird { display: none; } }
.ws-panel .wrole { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 2px solid var(--sky-deep); border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; min-height: 72px; text-align: left; box-sizing: border-box; }
.ws-panel .wrole strong { display: block; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.ws-panel .wrole span { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; text-decoration: none; }
.ws-panel .wrole:hover, .ws-panel .wrole:focus-visible { border-color: var(--blue); background: var(--cream); }
.ws-panel h1, .ws-panel .lead { text-align: center; }
.ws-panel .wskip { display: block; margin: 6px auto 4px; }
/* Climber on the left, larger */
.ws-climber { right: auto; left: 3%; height: min(58vh, 520px); }
@media (max-width: 760px) { .ws-climber { position: relative; left: auto; right: auto; bottom: auto; align-self: flex-start; height: 30vh; margin: -6px 0 0 4px; } .wscene { padding-bottom: 96px; } .ws-snd { bottom: 16px; } }
.ws-climber { animation: none !important; }
.ws-panel.welcome { text-align: center; }
.ws-panel .wrows, .ws-panel .wrow { text-align: left; }
.ws-panel .wpick, .ws-panel .wstd { margin-left: auto; margin-right: auto; }
/* Keep the mountain in place while the panel scrolls */
.ws-bg, .ws-rays, .ws-mist, .ws-bird { position: fixed; }
.ws-bg { inset: -6% auto auto -6%; width: 112vw; height: 112vh; }
.ws-rays { inset: 0; }
@media (min-width: 761px) { .ws-climber { position: fixed; left: 3%; bottom: 0; height: min(58vh, 520px); } }
.ws-panel .btn, .ws-panel a.btn { display: block; width: 100%; max-width: none; box-sizing: border-box; text-align: center; margin: 10px 0 0; }
/* Climber stands on the bottom edge; headings centred everywhere */
.ws-climber { bottom: 0 !important; }
@media (max-width: 760px) { .ws-climber { margin-bottom: 0; } .wscene { padding-bottom: 0; } .ws-snd { position: fixed; } }
h1, h2, h3 { text-align: center; }
.hero h1, .hero h2, .hero h3, a.card h2, a.card h3, a h3, .trail h2, .trail h3, .tlab, .tp-card h3 { text-align: left; }
.card.subject h3 { text-align: center; }
.ws-panel .btn, .ws-panel a.btn, .ws-panel button.btn { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
/* Teachers hub */
.th-pick h2, .th-head h2, .th-offer h2 { text-align: center; }
.pills.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.th-head p, .th-offer p { text-align: center; }
.th-topic summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.th-topic summary strong { font-size: 1.1rem; }
.th-sub { display: block; color: var(--muted); font-size: .92rem; }
.th-check { display: flex; align-items: center; gap: 10px; margin: 8px 0; min-height: 44px; font-weight: 700; }
.th-act { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.th-act input, .th-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.th-actbody { flex: 1; min-width: 0; display: grid; gap: 3px; }
.th-actbody .link-btn { justify-self: start; background: none; border: 0; padding: 6px 0; color: var(--blue); text-decoration: underline; font: inherit; cursor: pointer; min-height: 40px; }
.th-q { padding: 8px 12px; background: var(--cream); border-radius: 12px; margin: 6px 0; }
.th-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px); z-index: 50; max-width: 560px; margin: 0 auto; display: none; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: 0 6px 24px rgba(23,50,63,.3); font-weight: 700; }
.th-bar .btn { min-height: 44px; }
.wplans { margin: 14px 0; text-align: left; }
.wplans .plans-h { font-size: 1.15rem; text-align: center; }
.wplans .plans-grid { grid-template-columns: 1fr !important; }
.wown input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 10px 14px; border: 2px solid var(--sky-deep); border-radius: 14px; font: inherit; text-align: center; }
.wwarn { color: var(--bad); min-height: 1.2em; }

/* Opening video (classes start with ttvid so they never clash with the exercise intro card) */
.ttvid { position: fixed; inset: 0; z-index: 9999; background: #0f2a3a; display: flex; align-items: center; justify-content: center; transition: opacity .5s ease; }
.ttvid.out { opacity: 0; pointer-events: none; }
.ttvid-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(22px) brightness(.85); }
.ttvid-v { position: relative; height: 100%; width: auto; max-width: 100%; aspect-ratio: 9/16; object-fit: contain; background: transparent; }
@media (max-aspect-ratio: 9/16) { .ttvid-v { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; } }
.ttvid-skip, .ttvid-snd { position: absolute; z-index: 2; border: 0; border-radius: 999px; padding: 10px 18px; font: 700 15px/1 'Nunito', system-ui, sans-serif; background: rgba(255,255,255,.92); color: #173F31; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.ttvid-skip { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.ttvid-snd { top: max(16px, env(safe-area-inset-top)); left: 16px; }
.ttvid-snd.on { background: #1F6A9C; color: #fff; }
.ttvid.paused .ttvid-v { cursor: pointer; }
/* Teacher gradebook */
.gb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; border: 1px solid #d6e4ee; border-radius: 12px; }
.gb-tbl { border-collapse: collapse; width: 100%; font: 600 14px/1.3 'Nunito', system-ui, sans-serif; min-width: 420px; }
.gb-tbl th, .gb-tbl td { padding: 9px 10px; text-align: center; border-bottom: 1px solid #e6eff5; white-space: nowrap; }
.gb-tbl th { background: #eef5fa; color: #173F31; font-weight: 800; vertical-align: bottom; }
.gb-tbl th small { display: block; font-weight: 600; color: #5b7384; font-size: 11px; }
.gb-tbl .gb-name { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.gb-tbl th.gb-name { background: #eef5fa; }
.gb-hi { background: #dff1e6; color: #14502f; } .gb-mid { background: #e3eefa; color: #174a7a; } .gb-low { background: #fdf0d8; color: #7a4e0b; } .gb-vlow { background: #fbe4e1; color: #8a2a1f; }
.gb-none, .gb-na { color: #8da0ad; } .gb-avg { font-weight: 800; }
.gb-foot th, .gb-foot td { border-top: 2px solid #c9dbe8; }
.gb-key span { display: inline-block; padding: 3px 10px; margin: 2px 6px 2px 0; border-radius: 999px; font: 700 12px/1.2 'Nunito', system-ui, sans-serif; }
@media print { .gb-scroll { overflow: visible; border: 0; } .gb-tbl { min-width: 0; font-size: 12px; } }

/* mountain question screen (approved 2026-11-16) */
body.playing { min-height: 100vh; background-color: #EEF5F9 !important; background-image: linear-gradient(180deg, rgba(238,245,249,.15) 0%, rgba(238,245,249,.55) 22%, #EEF5F9 52%), url(../img/art/northern-range.webp) !important; background-size: 100% 100%, 100% 62vh !important; background-position: top, top !important; background-repeat: no-repeat !important; background-attachment: scroll !important; }
body.playing .qcard, body.playing .card { background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(23,63,49,.12); border-color: rgba(31,106,156,.12); }
body.playing .bar { height: 14px; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 2px rgba(31,106,156,.18); overflow: visible; position: relative; margin: 34px 14px 16px 0; }
body.playing .bar > span, body.playing .bar > div { position: relative; display: block; min-width: 8px; background: linear-gradient(90deg, #2f8f63, #4fb286); border-radius: 999px; overflow: visible; }
body.playing .bar > span::after, body.playing .bar > div::after { content: ''; position: absolute; right: -16px; bottom: 4px; width: 38px; height: 54px; background: url(../img/art/climbing-trim.webp) center bottom / contain no-repeat; }

/* teacher homework chooser: level, then topic, then exercise (wide view) */
.tp-wide { max-width: 1060px !important; }
.tp-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.tp-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #eef2f6; color: #4a5272; font-weight: 600; }
.tp-steps li b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--navy); }
.tp-steps li.on { background: var(--navy); color: #fff; } .tp-steps li.on b { background: #fff; }
.tp-steps li.done { background: #dff1e8; color: #17402f; }
.tp-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.tp-chiplab { font-weight: 700; min-width: 64px; color: var(--navy); }
.tp-chip { min-height: 44px !important; padding: 6px 16px !important; font-size: 16px !important; border: 2px solid var(--sky-deep) !important; background: #fff !important; color: var(--navy) !important; border-radius: 999px !important; }
.tp-chip.on { background: var(--navy) !important; color: #fff !important; border-color: var(--navy) !important; }
.tp-steph { margin: 16px 0 8px; }
.tp-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tp-topic { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; background: #fff; border: 2px solid var(--line); border-radius: 18px; font: inherit; color: inherit; cursor: pointer; min-height: 88px; }
.tp-topic:hover, .tp-topic:focus-visible { border-color: var(--navy); box-shadow: 0 6px 18px rgba(23,63,49,.12); }
.tp-topic strong { display: block; font-size: 18px; color: var(--navy); }
.tp-meta { display: block; font-size: 14px; color: #4a5272; margin-top: 2px; }
.tp-topic .row-ico { width: 56px; height: 56px; flex: none; }
.tp-pickhead { display: flex; align-items: center; gap: 16px; }
.tp-pickhead .row-ico { width: 64px; height: 64px; flex: none; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tp-actmain { display: flex; align-items: center; gap: 14px; width: 100%; }
.tp-actmain .row-ico { width: 40px; height: 40px; flex: none; }
.tp-side { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .tp-actmain { flex-wrap: wrap; } .tp-side { justify-content: flex-start; } .tp-steps li span { font-size: 14px; } }
@media (max-width: 640px) { .tp-steps { gap: 4px; } .tp-steps li { padding: 6px 8px; gap: 5px; min-width: 0; } .tp-steps li b { width: 22px; height: 22px; font-size: 13px; } .tp-chiplab { min-width: 100%; } .tp-pickhead { flex-wrap: wrap; } .tp-topics { grid-template-columns: 1fr; } }

/* tidy chips: equal-size pills in a neat grid */
.tp-chiprow { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 4px 0 14px !important; }
.tp-chiprow.tp-three { grid-template-columns: repeat(3, 1fr); max-width: 520px; }
.tp-chiplab { display: block; margin: 8px 0 0; min-width: 0 !important; }
.tp-chip { display: flex !important; flex-direction: column; align-items: center; justify-content: center; width: 100%; line-height: 1.15; }
.tp-chip small { font-size: 11px; font-weight: 600; opacity: .8; margin-top: 1px; }
@media (max-width: 640px) { .tp-chiprow { grid-template-columns: repeat(3, 1fr); } }
.tp-chiprow { min-width: 0; } .tp-chip { min-width: 0 !important; padding: 6px 4px !important; white-space: nowrap; }
.tp-showpw { margin: -4px 0 14px; }

/* mountain background on the plain pages (queued for the next deploy, approved 2026-11-16) */
body:not(.playing) { background-color: #EEF5F9; background-image: linear-gradient(180deg, rgba(238,245,249,.2) 0%, rgba(238,245,249,.5) 40%, rgba(238,245,249,.9) 80%, #EEF5F9 100%), url(../img/art/northern-range.webp); background-size: 100% 36vh, 100% 36vh; background-position: top, top; background-repeat: no-repeat; background-attachment: scroll; }
body:not(.playing) .view > h1, body:not(.playing) .view > h2:first-child, body:not(.playing) .view > p:first-of-type { text-shadow: 0 0 10px rgba(238,245,249,.95), 0 0 3px rgba(238,245,249,.95); }
body:not(.playing) .card, body:not(.playing) .tp-card { background: rgba(255,255,255,.94); }
html.calm body:not(.playing) { background-image: none; }
@media print { body:not(.playing) { background: none !important; } }

/* avatar poses on the plain pages, tucked beside the page title */
body:not(.playing) .wrap.view { position: relative; }
body[data-page="teacher"] .wrap.view::before, body[data-page="practise"] .wrap.view::before, body[data-page="stars"] .wrap.view::before, body[data-page="board"] .wrap.view::before, body[data-page="parents"] .wrap.view::before, body[data-page="homework"] .wrap.view::before { content: ''; position: absolute; top: 4px; right: 10px; width: 96px; height: 112px; background: no-repeat right top / contain; pointer-events: none; z-index: 0; }
body[data-page="teacher"] .wrap.view::before { background-image: url(../img/mtn/pointing_up.webp); }
body[data-page="practise"] .wrap.view::before { background-image: url(../img/mtn/reading.webp); }
body[data-page="stars"] .wrap.view::before { background-image: url(../img/mtn/holding_a_trophy.webp); }
body[data-page="board"] .wrap.view::before { background-image: url(../img/mtn/cheering.webp); }
body[data-page="parents"] .wrap.view::before { background-image: url(../img/mtn/smiling_and_waving.webp); }
body[data-page="homework"] .wrap.view::before { background-image: url(../img/mtn/writing.webp); }
body[data-page] .wrap.view::before { width: 84px !important; height: 84px !important; border-radius: 50%; background-size: cover !important; background-position: center !important; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(23,63,49,.25); top: 10px !important; right: 12px !important; }
@media (min-width: 900px) { body[data-page] .wrap.view::before { width: 130px; height: 150px; right: 20px; } }
html.calm .wrap.view::before { display: none; }
@media print { .wrap.view::before { display: none; } }
/* the bottom bar always keeps every item on one row (the teacher Homework item makes six) */
.bottom-nav { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bottom-nav .nav-item span { font-size: 12px; }
body[data-page="teacher"] .wrap.view, body[data-page="practise"] .wrap.view, body[data-page="stars"] .wrap.view, body[data-page="board"] .wrap.view, body[data-page="parents"] .wrap.view, body[data-page="homework"] .wrap.view { padding-top: 30px; min-height: 0; }
body[data-page] .wrap.view::before { top: 0; width: 92px; height: 112px; right: 12px; }
body[data-page] .wrap.view > h1:first-child, body[data-page] .wrap.view > h1:first-child + p { padding-right: 90px; padding-left: 0; text-align: left; }
@media (min-width: 900px) { body[data-page] .wrap.view > h1:first-child, body[data-page] .wrap.view > h1:first-child + p { padding-right: 140px; text-align: center; padding-left: 140px; } }
body[data-page] .wrap.view > h1:first-child + p { color: #1d3b2f; font-weight: 600; }
@media (min-width: 700px) { body[data-page] .wrap.view::before { width: 150px; height: 176px; right: 28px; } body[data-page] .wrap.view { padding-top: 36px; } }

/* excitement: confetti, star glow, cheer toast, perfect ribbon */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
.fx-cheer { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9998; display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; background: #fff; border: 3px solid #F5B800; border-radius: 999px; box-shadow: 0 10px 28px rgba(23,63,49,.25); font-weight: 800; color: var(--navy, #173f31); max-width: 92vw; animation: fxCheerIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.fx-cheer img { width: 72px; height: 72px; flex: none; }
.fx-cheer span { display: flex; align-items: center; }
.fx-cheer.out { animation: fxCheerOut .4s ease-in both; }
@keyframes fxCheerIn { from { transform: translate(-50%, 40px) scale(.7); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes fxCheerOut { to { transform: translate(-50%, 30px) scale(.9); opacity: 0; } }
.rd-stars { gap: 12px; }
.rd-star:not(.dim) { width: 72px; height: 72px; filter: drop-shadow(0 0 10px rgba(245,184,0,.85)) drop-shadow(0 4px 6px rgba(23,63,49,.25)); animation: starPop .7s cubic-bezier(.2,1.5,.4,1) both, starGlow 1.8s ease-in-out .9s infinite alternate; }
@keyframes starPop { 0% { transform: scale(.1) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.35) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes starGlow { from { filter: drop-shadow(0 0 6px rgba(245,184,0,.6)) drop-shadow(0 4px 6px rgba(23,63,49,.25)); } to { filter: drop-shadow(0 0 18px rgba(255,216,77,1)) drop-shadow(0 4px 6px rgba(23,63,49,.25)); } }
.result .res-img { animation: resBounce 1.1s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes resBounce { 0% { transform: translateY(40px) scale(.7); opacity: 0; } 60% { transform: translateY(-12px) scale(1.06); opacity: 1; } 100% { transform: none; } }
.result.perfect { position: relative; overflow: hidden; background: linear-gradient(180deg, #FFF8D6 0%, #fff 38%); border: 3px solid #F5B800; }
.result.perfect::after { content: ''; position: absolute; inset: -40% -10% auto; height: 80%; background: radial-gradient(closest-side, rgba(255,216,77,.55), rgba(255,216,77,0)); animation: sunPulse 2.4s ease-in-out infinite alternate; pointer-events: none; }
@keyframes sunPulse { from { opacity: .45; transform: scale(.9); } to { opacity: 1; transform: scale(1.1); } }
.result.perfect > * { position: relative; z-index: 1; }
.perfect-ribbon { display: inline-block; margin: 0 auto 6px; padding: 6px 22px; background: linear-gradient(180deg, #FFD84D, #F5B800); color: #3b2b00; font-weight: 900; letter-spacing: .08em; border-radius: 10px; box-shadow: 0 6px 14px rgba(120,84,0,.3); animation: ribbonIn .7s cubic-bezier(.2,1.5,.4,1) .2s both; }
@keyframes ribbonIn { from { transform: scale(.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(-2deg); opacity: 1; } }
.result h1 { animation: titlePop .6s cubic-bezier(.2,1.5,.4,1) .15s both; }
@keyframes titlePop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.nb { animation: badgeIn .8s cubic-bezier(.2,1.5,.4,1) .6s both; }
.nb .nb-img { filter: drop-shadow(0 0 12px rgba(245,184,0,.9)); animation: starGlow 1.6s ease-in-out infinite alternate; }
@keyframes badgeIn { from { transform: scale(.3) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.rankup-box { animation: badgeIn .8s cubic-bezier(.2,1.5,.4,1) .4s both; }
.fb.good .fb-img, .fb-head .fb-img { animation: fbPop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes fbPop { from { transform: scale(.2) rotate(-30deg); } to { transform: none; } }
.fb.good { box-shadow: 0 0 0 3px rgba(79,178,134,.55), 0 10px 24px rgba(47,143,99,.25); }
@media (prefers-reduced-motion: reduce) { .rd-star, .result .res-img, .perfect-ribbon, .result h1, .nb, .nb .nb-img, .rankup-box, .fx-cheer, .result.perfect::after { animation: none !important; } }
html.calm .fx-canvas, html.calm .fx-cheer, html.calm .perfect-ribbon { display: none !important; }

.bust { display: block; margin: 0 auto 6px; width: 150px; height: 150px; animation: resBounce 1.1s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 6px 10px rgba(23,63,49,.25)); }
.result.perfect .bust { width: 170px; height: 170px; }
.fb-bust { width: 58px; height: 58px; flex: none; animation: fbPop .5s cubic-bezier(.2,1.6,.4,1) both; }
.tp-bust { width: 84px; height: 84px; margin: 0 auto 4px; display: block; }
@media (prefers-reduced-motion: reduce) { .bust, .fb-bust { animation: none !important; } }

/* teacher: questions shown the way a child meets them */
.pv-card { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.pv-top { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; flex-wrap: wrap; }
.pv-n { font-weight: 800; color: var(--navy); } .pv-type { background: #E3F2FA; color: #0f4a73; font-weight: 700; padding: 3px 12px; border-radius: 999px; font-size: 14px; } .pv-marks { color: #5b6280; font-size: 14px; }
.pv-q { font-weight: 700; margin: 4px 0 8px; } .pv-part .pv-q { font-weight: 600; }
.pv-opts, .pv-pairs, .pv-groups { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pv-opt { display: inline-block; padding: 7px 14px; border: 2px solid var(--sky-deep); border-radius: 12px; background: #fff; }
.pv-opt.ok { background: #E4F4EC; border-color: #2F8F63; font-weight: 700; }
.pv-arrow { font-weight: 800; color: #5b6280; }
.pv-input { border: 2px dashed var(--sky-deep); border-radius: 12px; padding: 10px 14px; color: #5b6280; background: #f8fbfd; }
.pv-sentence { font-size: 18px; margin: 4px 0; } .pv-hit { background: #FFE9A6; padding: 1px 6px; border-radius: 6px; font-weight: 800; }
.pv-group { flex: 1 1 140px; border: 2px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pv-steps { margin: 4px 0 4px 20px; } .pv-grid { border-collapse: collapse; } .pv-grid th, .pv-grid td { border: 2px solid var(--line); padding: 6px 12px; } .pv-ans { background: #E4F4EC; font-weight: 700; }
.pv-why { color: #4a5272; font-size: 15px; margin: 8px 0 0; } .pv-vis { max-width: 360px; } .pv-passage { background: #f6f8ff; padding: 8px 12px; border-radius: 10px; }
.pv-part { margin: 6px 0 6px 10px; padding-left: 10px; border-left: 3px solid var(--sky-deep); }

/* Parents page: short, icon-led */
.pt-lead { text-align: center; font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 4px 0 12px; }
.ptiles { display: grid; gap: 10px; margin: 12px 0; }
a.ptile, button.ptile { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-align: left; text-decoration: none; color: inherit; cursor: pointer; width: 100%; font: inherit; }
.ptile .pt-ico, .pacc .pt-ico { flex: 0 0 52px; width: 52px; height: 52px; object-fit: contain; }
.ptile .pt-txt { flex: 1; display: grid; gap: 2px; } .ptile strong { font-size: 1.08rem; color: var(--navy); } .ptile .pt-txt span { color: var(--muted); font-size: .95rem; }
.ptile .pt-go { font-size: 1.8rem; color: var(--navy); }
.pacc-list { display: grid; gap: 8px; margin: 14px 0; }
.pacc { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.pacc > summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; font-size: 1.05rem; }
.pacc > summary::-webkit-details-marker { display: none; }
.pacc > summary::after { content: '+'; margin-left: auto; font-size: 1.5rem; color: var(--muted); }
.pacc[open] > summary::after { content: '\2212'; }
.pacc-body { padding: 0 16px 14px 16px; display: grid; gap: 6px; } .pacc-body p { margin: 0; }
.pacc-q { font-weight: 700; color: var(--navy); }
.weekly h2 { text-align: center; }

.fx-cheer img { border-radius: 50%; }
.clinic-more > summary, .lesson-more > summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 6px 0; }
.lesson-words.lesson-more, .lesson-practice.lesson-more { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin: 10px 0; }

/* Page headers: a large round mountain avatar on the left, the title centred beside it */
body[data-page] .wrap.view::before { left: 14px !important; right: auto !important; top: 4px !important; width: 96px !important; height: 96px !important; border: 4px solid rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(23,63,49,.28); }
body[data-page] .wrap.view > h1:first-child, body[data-page] .wrap.view > h1:first-child + p { padding-left: 112px !important; padding-right: 12px !important; text-align: center !important; }
@media (min-width: 700px) {
  body[data-page] .wrap.view::before { left: 40px !important; width: 150px !important; height: 150px !important; top: 6px !important; border-width: 5px; }
  body[data-page] .wrap.view > h1:first-child, body[data-page] .wrap.view > h1:first-child + p { padding-left: 190px !important; padding-right: 190px !important; }
  body[data-page] .wrap.view { padding-top: 40px; }
}
@media (min-width: 1000px) { body[data-page] .wrap.view::before { left: 70px !important; } }
/* Teacher and homework pages put a card straight under the title: keep the title row as tall as the avatar so the card starts below it */
body[data-page="teacher"] .wrap.view > h1:first-child, body[data-page="homework"] .wrap.view > h1:first-child { min-height: 100px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 700px) { body[data-page="teacher"] .wrap.view > h1:first-child, body[data-page="homework"] .wrap.view > h1:first-child { min-height: 160px; } }
.lesson-apply.lesson-more { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin: 10px 0; }
.lesson-apply ul { margin: 0 0 8px; padding-left: 22px; }
.lesson-apply li { padding: 4px 0; }
/* Climber pinned to the bottom of the screen on phones too (Nov 2026) */
@media (max-width: 760px) { .ws-climber { position: fixed !important; left: 2%; right: auto; bottom: 0 !important; top: auto; align-self: auto; margin: 0; height: 26vh; z-index: 2; } }

/* Wider screens: tablets and computers use the width instead of leaving it empty */
@media (min-width: 768px) { .wrap { max-width: 860px; padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1100px) {
  body:not(.playing) .wrap { max-width: 1180px; padding-left: 32px; padding-right: 32px; }
  body.playing .wrap { max-width: 900px; }
  body { font-size: 18px; }
  .bottom-nav { left: 50%; right: auto; width: min(760px, 92vw); transform: translateX(-50%); border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; }
  .extras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: stretch; }
  .extras > * + *, .extras > .strip { margin-top: 0; }
  .extras > .strip { height: 100%; }
  .extras > .start-here, .extras > .hero, .extras > h2, .extras > h3, .extras > .card:not(.strip) { grid-column: 1 / -1; }
  .view > .grid2 { gap: 18px; }
  .stats { gap: 16px; }
}
@media (min-width: 1500px) { body:not(.playing) .wrap { max-width: 1320px; } body { font-size: 19px; } }

.cardgrid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 10px; }
@media (min-width: 900px) { .cardgrid { grid-template-columns: 1fr 1fr; gap: 14px 16px; } .cardgrid > .card { margin-top: 0; height: 100%; } }
@media (min-width: 1300px) { body:not(.playing) .wrap { max-width: 1240px; } }

.pathsw { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 4px 0 8px; }

/* Journey map restyled to match the mountain trail */
body:not(.playing) .card.journey { background: linear-gradient(180deg, #D7EAF5 0%, #EAF4F8 38%, #E3F0E8 100%); border-radius: 28px; border: 1px solid var(--line); padding: 20px 16px 24px; }
.jy-road::before { width: 16px; border-radius: 8px; background: #C4DCEA; opacity: 1; left: 20px; }
.jy-ms::before { width: 22px; height: 22px; margin-top: -11px; left: 17px; background: #fff; border: 4px solid var(--blue-soft); box-shadow: 0 3px 8px rgba(23,63,49,.18); }
.jy-ms-done::before { background: var(--gold-bright); border-color: var(--gold-bright); }
.jy-ms-go::before { border-color: var(--blue); }
.jy-ms-in { background: #fff; border: 2px solid var(--blue-soft); border-radius: 20px; padding: 12px 14px; box-shadow: 0 6px 16px rgba(23,63,49,.10); }
.jy-ms-done > .jy-ms-in, .jy-ms-done > details > .jy-ms-in { background: var(--good-bg); border-color: var(--gold-bright); }
.jy-ms-go > details > .jy-ms-in { border-color: var(--blue); }
.jy-start .jy-ms-in, .jy-dest .jy-ms-in { background: linear-gradient(135deg, #1E5A40, #2B7452); border-color: #2B7452; border-radius: 999px; padding: 12px 20px; }
.jy-ring { background: var(--blue-soft); }
.jy-ring-in { color: var(--navy); }
.jy-skills { border-left: 4px solid var(--blue-soft); }
.jy-node:hover { background: var(--sky); }
.jy-placed .jy-state { color: var(--blue); }
@media (min-width: 700px) {
  .jy-road::before { left: 50%; margin-left: -8px; }
  .jy-ms::before { left: auto; right: -11px; }
  .jy-ms.jy-right::before { right: auto; left: -11px; }
}

.jy-ring { width: 68px; height: 68px; box-shadow: 0 4px 10px rgba(23,63,49,.14); }
.jy-ring-in { width: 54px; height: 54px; }
.jy-ring-in .ico { width: 42px; height: 42px; }

.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

.lvlearn { display: inline-block; margin-left: 8px; font-weight: 700; color: var(--blue); }

/* ---------- Coming back: improvement line, next choices, short start, parent prompt ---------- */
.hero.scene .hero-text p.hero-cap, .hero-cap { font-size: .95rem; color: var(--muted); margin: 8px 0 0; }
.eng-progress, .eng-next { margin-top: 14px; }
.eng-progress h2, .eng-next h2 { margin: 0 0 6px; color: var(--navy); text-align: left; }
.eng-progress .eng-line { margin: 0 0 12px; color: var(--muted); }
.eng-progress.up { border-color: var(--gold-bright); }
.eng-progress.up h2 { color: var(--good); }
.eng-row { display: grid; grid-template-columns: 6.5rem 1fr 3rem; align-items: center; gap: 10px; margin-top: 8px; }
.eng-lab { font-size: .95rem; color: var(--muted); }
.eng-num { font-weight: 700; text-align: right; color: var(--navy); }
.eng-bar { display: block; height: 12px; border-radius: 999px; background: var(--sky-deep); overflow: hidden; }
.eng-fill { display: block; height: 100%; border-radius: 999px; }
.eng-fill.was { background: var(--blue-soft); }
.eng-fill.now { background: var(--gold-bright); }
.eng-opts { display: grid; gap: 10px; margin-top: 10px; }
.eng-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-decoration: none; color: inherit; }
.eng-opt:hover, .eng-opt:focus-visible { border-color: var(--blue-mid); background: var(--cream); }
.eng-ico { flex: 0 0 40px; width: 40px; height: 40px; object-fit: contain; }
.eng-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.eng-txt strong { color: var(--navy); font-size: 1.05rem; }
.eng-txt span { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.eng-go { font-size: 1.7rem; color: var(--navy); line-height: 1; }
.eng-note { margin: 10px 0 0; color: var(--muted); font-size: .95rem; }
.eng-note + .eng-note { margin-top: 4px; }
.eng-parent { border-top: 1px solid var(--line); padding-top: 12px; }
@media (min-width: 760px) {
  .eng-opts { grid-template-columns: repeat(3, 1fr); }
  .eng-opt { flex-direction: column; text-align: center; justify-content: center; padding: 16px 12px; min-height: 140px; }
  .eng-go { display: none; }
}
@media (max-width: 380px) { .eng-row { grid-template-columns: 5.2rem 1fr 2.8rem; gap: 8px; } }
.hero.scene:not(.calm) .hero-btns { justify-content: flex-start; }
@media (min-width: 760px) { .extras > .justforyou { height: auto; align-self: start; } }

/* mock navigation and saved mocks */
.secpick { margin: 14px 0 6px; text-align: left; }
.secpick-note, .qmap-note, .savednote { font-size: 15px; color: var(--muted); }
.secpick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbtn { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--sky-deep); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chipbtn.on { border-color: var(--blue); background: var(--sky); color: var(--navy); }
.play-top .mapbtn { margin-left: auto; }
.qmap { margin: 10px 0; }
.qmap-sec { font-size: 16px; margin: 12px 0 6px; }
.qmap-row { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--sky-deep); background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.qchip.cur { border-color: var(--blue); background: var(--sky); }
.qchip.qskip { border-color: #B7791F; background: #FFF6E0; }
.qchip.done, .qchip.right { background: var(--good-bg); border-color: var(--good); color: var(--good); cursor: default; }
.qchip.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); cursor: default; }
.qmap-confirm { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--sky); }
.qmap-confirm .btn { margin-right: 8px; }
.skipbtn { margin-top: 8px; }

/* Mock paper top row on narrow phones: Leave, question count and Questions button keep apart. */
.play-top { gap: 8px; }
.play-top .count { flex: 1 1 auto; min-width: 0; text-align: center; font-size: .92rem; white-space: nowrap; }
.play-top .mapbtn { margin-left: 0; flex: none; padding-left: 12px; padding-right: 12px; }
/* children on one device, rating stars, "how did you hear" */
.kids-grid { display: grid; gap: 10px; margin: 6px 0 16px; }
.kid-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--sky-deep); background: #fff; text-align: left; cursor: pointer; }
.kid-btn.on { border-color: var(--navy); background: var(--gold-soft); }
.kid-face { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--sky); font-size: 26px; font-weight: 800; color: var(--navy); }
.kid-face img { width: 100%; height: 100%; object-fit: cover; }
.kid-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.kid-txt strong { color: var(--navy); font-size: 1.05rem; }
.kid-txt span { color: var(--muted); font-size: .92rem; }
.kid-tags { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.kid-tags em { font-style: normal; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--navy); color: #fff; }
.kid-tags em.plus { background: var(--blue); }
.kid-rm { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.stars-row { display: flex; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.star-btn { width: 56px; height: 56px; font-size: 40px; line-height: 1; border: 0; background: transparent; color: #C9D6DD; cursor: pointer; padding: 0; }
.star-btn.on { color: #F2B01E; }
.rate-card { text-align: center; }
.rate-card .btn { margin-top: 10px; text-decoration: none; }
.hear-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.hear-card .link-btn { margin-top: 4px; }
@media (max-width: 360px) { .star-btn { width: 48px; height: 48px; font-size: 34px; } }
.kid-fab { position: fixed; right: 12px; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
.kid-fab[hidden] { display: none; }
.kid-fab-face { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; background: var(--sky); box-shadow: 0 4px 14px rgba(23, 63, 49, .28); }
.kid-fab-face img { width: 100%; height: 100%; object-fit: cover; }
.kid-fab-lab { font-size: .72rem; font-weight: 700; color: #fff; background: var(--navy); padding: 1px 9px; border-radius: 999px; }
@media (min-width: 900px) { .kid-fab { right: 22px; } }
