/* Study hub (v2): five bottom tabs, focus mode for questions. Tokens come from theme.css. */
.hub-body{margin:0;background:var(--ground);padding-bottom:calc(76px + env(safe-area-inset-bottom))}
.hub-body.focus-mode{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
.hub{max-width:760px;margin:0 auto;padding:12px 16px 24px;display:flex;flex-direction:column;gap:16px}
.hub h1{font-size:28px;font-weight:700;margin:0;letter-spacing:-.02em;line-height:1.2}
.hub h2{font-size:17px;font-weight:600;margin:0 0 8px;line-height:1.4}
.hub p{margin:0}
.hub a{text-decoration:none}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding-top:4px}
.page-head small{color:var(--muted);font-size:12px}
.page-head .back,.back-btn{display:inline-flex;align-items:center;min-height:36px;color:var(--accent);font-size:14px;margin-right:auto}
.page-head:has(.back){flex-direction:column;align-items:flex-start;gap:2px}
.countdown{display:flex;flex-direction:column;align-items:flex-end;line-height:1.1}
.countdown b{font-size:24px;color:var(--accent)}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);padding:14px 16px;display:flex;flex-direction:column;gap:8px;color:var(--ink)}
.card p{font-size:13px;line-height:1.6;color:var(--muted)}
.card .row,.row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.card .row em{margin-left:auto;font-style:normal;font-size:12px;font-weight:600;color:var(--accent)}
.big{font-size:28px;font-weight:700}
.meter{position:relative;height:8px;border-radius:4px;background:var(--subtle)}
.meter>span{position:absolute;left:0;top:0;height:8px;border-radius:4px;background:var(--accent)}
.meter>i{position:absolute;top:-3px;width:2px;height:14px;background:var(--ink)}
.meter>i.goal{background:var(--amber-11)}
.meter-labels{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}
.resume{flex-direction:row;align-items:center;background:var(--accent-3);border-color:var(--accent-6)}
.resume>div{flex:1;display:flex;flex-direction:column;gap:2px}
.resume small{color:var(--accent);font-weight:600;font-size:12px}
.resume b{font-size:15px}.resume span{font-size:12px;color:var(--muted)}
.play-dot{width:40px;height:40px;border-radius:20px;background:var(--accent);color:#fff;display:grid;place-items:center;font-style:normal}
.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.section-head span{font-size:12px;color:var(--muted)}
.list{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.list-row{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;min-height:56px;padding:10px 14px;border:0;border-radius:0;background:transparent;text-align:left;color:var(--ink);font:inherit;font-weight:400}
.list-row+.list-row{border-top:1px solid var(--subtle)}
.list-row>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.list-row b{font-size:14px;font-weight:600}.list-row span{font-size:12px;color:var(--muted)}.list-row small{font-size:11px;color:var(--faint)}
.list-row>button{min-height:32px;padding:4px 14px;border-radius:999px;font-size:13px;font-weight:600;color:var(--accent);flex-shrink:0}.list-row>button.primary{color:#fff}
.list-row:hover{background:rgba(0,0,0,.03)}
/* .list-row span is secondary text; the clickable English inside a .stem keeps the stem's size and colour. */
.list-row .stem span{font-size:inherit;color:inherit;font-weight:inherit}
.muted-row{opacity:.7}
.tag{font-style:normal;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--accent-3);color:var(--accent);flex-shrink:0}
.tag.red{background:var(--tomato-2);color:var(--tomato-11)}.tag.amber{background:var(--amber-2);color:var(--amber-11)}.tag.gray{background:var(--subtle);color:var(--muted)}
.badge{width:36px;height:36px;flex-shrink:0;border-radius:10px;background:var(--accent-3);color:var(--accent);font-style:normal;font-weight:700;display:grid;place-items:center}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:18px;background:var(--paper);border:1px solid var(--line);color:var(--ink);font-size:13px}
.chip b{font-size:11px;color:var(--muted);font-weight:600}
.chip.red{background:var(--tomato-2);border-color:var(--tomato-6);color:var(--tomato-12)}
.caption{font-size:12px;line-height:1.55;color:var(--faint)}
.empty{padding:20px 16px;text-align:center;color:var(--muted);font-size:13px}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;padding:2px;border-radius:10px;background:var(--fill)}
.seg a{display:grid;place-items:center;min-height:34px;border-radius:8px;color:var(--ink);font-size:13px;font-weight:500;text-align:center;padding:0 4px}
.seg a.on{background:var(--paper);color:var(--ink);font-weight:600;box-shadow:0 3px 8px rgba(0,0,0,.12),0 3px 1px rgba(0,0,0,.04)}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.set{gap:8px}.set small{font-size:11px;color:var(--muted)}
.bar{flex:1;height:4px;border-radius:2px;background:var(--subtle);overflow:hidden}
.bar>span{display:block;height:100%;border-radius:2px;background:var(--accent)}.bar>span.red{background:var(--tomato-11)}
.actions-row{display:flex;flex-wrap:wrap;gap:8px}.actions-row button{flex:1;min-width:120px}
.actions-col{display:flex;flex-direction:column;gap:8px}
button.wide{width:100%}
.part-row{display:flex;align-items:center;gap:10px;padding:6px 0;color:var(--ink)}
.part-row>span:first-child{width:72px;font-size:13px;flex-shrink:0}.part-row small{width:108px;white-space:nowrap;text-align:right;font-size:12px;color:var(--muted)}
.bars{display:flex;gap:12px;align-items:flex-end;height:220px;border-bottom:1px solid var(--line);padding-top:8px}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;justify-content:flex-end;height:100%}
.bar-col b{font-size:13px}.bar-col small{font-size:11px;color:var(--muted)}
.stack{width:28px;display:flex;flex-direction:column;border-radius:6px 6px 0 0;overflow:hidden}
.stack .l{background:var(--accent-6)}.stack .r{background:var(--accent)}
.legend{display:flex;gap:12px;font-size:11px;color:var(--muted)}.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px}.legend .l{background:var(--accent-6)}.legend .r{background:var(--accent)}
.add-score summary{min-height:44px;display:flex;align-items:center;color:var(--accent);cursor:pointer}
.add-score form,.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.add-score label,.form-grid label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.add-score input,.form-grid input{min-height:40px;border:1px solid var(--line-strong);border-radius:var(--r-sm);padding:0 10px;font-size:16px}
.en{font-family:var(--font-en);font-size:17px}
/* bottom tabs */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.82);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:1px solid rgba(0,0,0,.08)}
.tabbar[hidden]{display:none}
.tabbar a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;color:var(--faint);font-size:11px;font-weight:500}
.tabbar a.on{color:var(--accent)}
.tabbar a.on::before{content:"";position:absolute;top:-6px;width:20px;height:3px;border-radius:2px;background:var(--accent)}
/* focus mode */
.focus-head{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:8px;margin:-12px -16px 0;padding:8px 12px;background:rgba(255,255,255,.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid rgba(0,0,0,.08)}
.focus-head>div{flex:1;min-width:0;display:flex;flex-direction:column}
.focus-head b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.focus-head small{font-size:11px;color:var(--muted)}
.focus-head button,.back-btn{width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:20px;background:transparent;font-size:22px;color:var(--ink);display:grid;place-items:center;margin:0}
.pill.timer{font-variant-numeric:tabular-nums}.pill.timer.late{background:var(--tomato-2);color:var(--tomato-11)}
.warn{color:var(--amber-11);font-style:normal}
.progress{height:3px;background:var(--subtle);margin:0 -16px}.progress>span{display:block;height:3px;background:var(--accent);transition:width 220ms var(--ease-out)}
.play-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
@media(min-width:900px){.hub:has(.play-grid.has-material){max-width:1200px}.play-grid.has-material{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start}.play-grid.has-material .material{position:sticky;top:64px;max-height:calc(100vh - 160px);overflow:auto}}
.material{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);padding:12px 14px}
.material-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-size:13px}
.material-head a{font-size:12px;color:var(--accent)}
.material-body p,.material>p{font-family:var(--font-en);font-size:16px;line-height:1.65;white-space:pre-wrap;margin:0 0 10px;overflow-wrap:anywhere}
.material mark{background:var(--amber-6);color:var(--ink);border-radius:3px;padding:0 3px}
.material u{text-decoration:none;color:var(--faint)}
.material details summary{min-height:40px;display:flex;align-items:center;font-weight:600;font-size:13px;cursor:pointer}
.graphic{background:var(--subtle);border-radius:var(--r-md);padding:10px 12px;margin-bottom:8px;font-size:13px}.graphic pre{white-space:pre-wrap;font-size:13px;margin:6px 0 0;font-family:inherit}
.question{display:flex;flex-direction:column;gap:10px}
.photo{width:100%;border-radius:var(--r-md);border:1px solid var(--line)}
.page-link{display:inline-flex;align-items:center;min-height:36px;font-size:13px;color:var(--accent)}
.options{display:flex;flex-direction:column;gap:8px}
.opt{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:6px 12px;border:1.5px solid var(--line);border-radius:var(--r-md);background:var(--paper);text-align:left;font-family:var(--font-en);font-size:17px;font-weight:400;letter-spacing:-.01em;color:var(--ink)}
.opt b{width:28px;height:28px;flex-shrink:0;border-radius:14px;display:grid;place-items:center;background:var(--subtle);color:var(--muted);font:600 13px system-ui,-apple-system,sans-serif}
.opt.on{border-color:var(--accent);background:var(--accent-2)}.opt.on b{background:var(--accent);color:#fff}
.chip-toggle{align-self:flex-start;min-height:40px;padding:0 14px;border-radius:999px;font-size:13px;color:var(--muted)}
.chip-toggle.on{background:var(--amber-2);border-color:var(--amber-6);color:var(--amber-11)}
.result{border-radius:var(--r-lg);padding:10px 14px;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.result.ok{background:var(--accent-2);border:1px solid var(--accent-6)}.result.bad{background:var(--tomato-2);border:1px solid var(--tomato-6);color:var(--tomato-12)}
.result span{font-size:12px;color:var(--muted)}
.glosses{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);padding:0 14px}
.glosses .choice-gloss{border-bottom:1px solid var(--subtle)}.glosses .choice-gloss:last-child{border-bottom:0}
.choice-gloss.is-wrong b,.choice-gloss.is-wrong>div{color:var(--tomato-11)}
.explain{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.explain h3{margin:0;font-size:15px}.explain p{font-size:15px;line-height:1.7}
.warn-box{background:var(--amber-2);border-radius:var(--r-md);padding:8px 10px;font-size:13px!important;color:#4f3422}
.focus-foot{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;gap:8px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(transparent,var(--ground) 24%)}
.focus-foot button{flex:1;min-height:52px;border-radius:var(--r-lg);font-size:16px}
.focus-foot #grid-toggle{flex:0 0 52px}
.hub-audio{position:sticky;top:0;z-index:25;background:var(--paper);border-bottom:1px solid var(--line);padding:8px 16px;display:flex;flex-direction:column;gap:2px}
.hub-audio[hidden]{display:none}.hub-audio audio{width:100%}.hub-audio small{font-size:11px;color:var(--muted)}
.hub-body:has(.hub-audio:not([hidden])) .focus-head{top:var(--audio-h,72px)}
.mark{width:28px;height:28px;border-radius:14px;display:grid;place-items:center;font-style:normal;font-weight:700;flex-shrink:0}
.mark.ok{background:var(--accent-3);color:var(--accent)}.mark.bad{background:var(--tomato-2);color:var(--tomato-11)}
.grid-dialog{max-width:420px}.qgrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:12px 0;max-height:50vh;overflow:auto}
.qgrid button{min-height:40px;padding:0;font-size:13px}.qgrid .done{background:var(--accent-3);border-color:var(--accent-6)}.qgrid .here{outline:2px solid var(--accent)}
@media(min-width:900px){.tabbar{max-width:760px;margin:0 auto;border:1px solid var(--line);border-bottom:0;border-radius:16px 16px 0 0}}
.ask{max-width:360px;border-radius:var(--r-lg)}.ask p{font-size:15px;line-height:1.6;margin:0 0 16px}
.options.letters{flex-direction:row}.options.letters .opt{justify-content:center;padding:6px}.options.letters .opt b{width:36px;height:36px;border-radius:18px;font-size:16px}.options.letters .opt span{display:none}
.mark.skip{background:var(--subtle);color:var(--faint)}
.to-material{align-self:flex-start;display:inline-flex;border:0;background:none;padding:0;font:inherit;cursor:pointer;align-items:center;min-height:32px;font-size:13px;color:var(--accent)}@media(min-width:900px){.to-material{display:none}}
.primary-link{display:flex;align-items:center;justify-content:center;flex:1;min-height:48px;border-radius:var(--r-md);background:var(--accent);color:#fff;font-weight:600}
.list-row button[data-drop-word],.list-row button[data-drop-score]{color:var(--muted);min-height:32px;font-size:12px}
#material{scroll-margin-top:64px}#question{scroll-margin-top:64px}
.phrases .stem{font-family:var(--font-en);font-size:16px;line-height:1.5;margin:0;background:none;border:0;padding:0}.phrases .badge{width:28px;height:28px;font-size:12px}
.words .stem{font-family:var(--font-en);font-size:17px;margin:0;background:none;border:0;padding:0}.words .stem.ex{font-size:14px;color:var(--muted);margin-top:4px}
.list-row button.speech-word{padding:0;min-height:0;min-width:0;font-size:inherit;flex-shrink:1}
.list-row button.speech-sentence-play{padding:0;min-height:28px}

.pace{margin-top:12px;display:flex;flex-direction:column;gap:4px}.pace>b{font-size:13px}.pace .bar{position:relative}.pace .bar i{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--muted)}
.sprint-days{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px}
.sprint-day{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0;border-radius:10px;background:var(--subtle)}
.sprint-day small{font-size:11px;color:var(--muted)}.sprint-day.today{outline:2px solid var(--accent);background:var(--accent-3)}
.fam-chips{position:sticky;top:0;z-index:5;flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:6px 16px;background:var(--ground);scrollbar-width:none}.fam-chips::-webkit-scrollbar{display:none}
.fam-chips .chip{flex-shrink:0}section[id^="fam-"]{scroll-margin-top:56px}
.fam-chips .chip{border:1px solid var(--line);font:inherit;font-size:13px;cursor:pointer}
dialog.zoom[open]{border-radius:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#000;display:flex;flex-direction:column}
dialog.zoom img{flex:1;min-height:0;width:100%;object-fit:contain;touch-action:pinch-zoom}
dialog.zoom button{margin:8px 16px calc(8px + env(safe-area-inset-bottom))}
img.photo{cursor:zoom-in}
.audio-fail{font-size:12px;color:var(--tomato-11);margin:4px 0 0}.audio-fail button{margin-left:8px;min-height:32px;padding:0 12px;font-size:12px}
.clip{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 14px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg)}
.focus-mode .clip{position:sticky;top:57px;z-index:15;box-shadow:0 4px 12px rgba(26,33,30,.06)}
.clip-play{width:48px;height:48px;min-height:48px;padding:0;border:0;border-radius:24px;background:var(--accent);color:#fff;font-size:16px;display:grid;place-items:center}
.clip-bar{height:6px;border-radius:3px;background:var(--subtle);overflow:hidden}.clip-bar>span{display:block;width:0;height:100%;background:var(--accent);transition:width 240ms linear}
.clip small{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;text-align:right}
.clip-note{margin-top:-8px}
.qblock{display:flex;flex-direction:column;gap:8px}.qblock+.qblock{margin-top:8px}.qblock .stem{margin:0}
.options.letters .opt{min-height:72px}
.hub-body .toast{z-index:50;bottom:calc(84px + env(safe-area-inset-bottom))}
.set .bar{flex:none}.section-head h2{min-width:0}.section-head span{white-space:nowrap}
.clip small.fail{color:var(--tomato-11)}

/* Mistake cards (phone and computer) */
.mhead{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.mstem{margin:2px 0;font-family:var(--font-en);font-size:15px;line-height:1.45;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- phone: today keeps its single-column order; computer-only parts stay hidden ---------- */
.dash,.dash-main,.dash-side{display:contents}
.dash-side>.score{order:1}.dash-main>.resume{order:2}.dash-main>.sprint{order:3}.dash-main>.plan{order:4}.dash-side>.weak{order:5}
.today-stats,.qnav,.side-brand,.side-foot{display:none}
.stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.stat-row>div{display:flex;flex-direction:column;gap:2px}
.stat-row b{font-size:22px;font-variant-numeric:tabular-nums}.stat-row small{font-size:12px;color:var(--muted)}

/* ---------- computer (≥1024px): left sidebar, dashboard columns, test-style question screen ---------- */
@media (min-width:1024px){
  .hub-body{--side:232px;padding:0 0 0 var(--side)}
  .hub-body.focus-mode{padding:0}
  .tabbar{top:0;bottom:0;left:0;right:auto;width:var(--side);max-width:none;margin:0;display:flex;flex-direction:column;gap:2px;padding:20px 12px 16px;border:0;border-right:1px solid rgba(0,0,0,.08);border-radius:0;background:#fbfbfd;-webkit-backdrop-filter:none;backdrop-filter:none}
  .tabbar a{text-decoration:none;flex-direction:row;justify-content:flex-start;gap:12px;min-height:44px;padding:0 12px;border-radius:10px;font-size:14px;font-weight:500;color:var(--muted)}
  .tabbar a:hover{background:rgba(0,0,0,.04);color:var(--ink)}
  .tabbar a.on{background:rgba(0,0,0,.06);color:var(--ink);font-weight:600}.tabbar a.on svg{color:var(--accent)}.tabbar a.on::before{display:none}
  .tabbar svg{width:20px;height:20px;flex-shrink:0}
  .side-brand{display:flex;flex-direction:column;gap:2px;padding:4px 12px 20px}
  .side-brand b{font-size:17px;color:var(--ink)}.side-brand small{font-size:12px;color:var(--muted)}
  .side-foot{display:flex;flex-direction:column;gap:6px;margin-top:auto;padding:12px 12px 0;font-size:12px;line-height:1.5;color:var(--faint);border-top:1px solid var(--subtle)}
  .side-foot a{color:var(--accent)}
  .hub{max-width:1160px;padding:32px 40px 56px;gap:20px}
  .hub h1{font-size:32px}
  .hub-body .toast{bottom:32px}
  .list-row{transition:background-color 120ms}
  .card.set{transition:border-color 150ms,box-shadow 150ms}.card.set:hover{border-color:var(--accent-6);box-shadow:0 4px 14px rgba(26,33,30,.07)}
  /* today */
  .dash{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
  .dash-main,.dash-side{display:flex;flex-direction:column;gap:20px;min-width:0}
  .dash-main{grid-column:1;grid-row:1}.dash-side{grid-column:2;grid-row:1;position:sticky;top:24px}
  .today-stats{display:flex}
  .hub[data-view="today"] .page-head .countdown{display:none}
  .plan .list-row{min-height:68px;padding:12px 18px}.plan .list-row b{font-size:15px}
  /* practice, progress */
  .seg{max-width:560px}
  .grid2{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
  .fam-chips{margin:0;padding:8px 0}
  .actions-col{flex-direction:row;flex-wrap:wrap}.actions-col button{flex:1 1 220px}
  .hub[data-view="me"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .hub[data-view="me"]>.page-head{grid-column:1/-1}
  /* question screen: full width, navigator rail on the right, actions under the question */
  .hub-body.focus-mode .hub{max-width:none;padding:0 40px 32px}
  .hub-body.focus-mode .hub>:not(.focus-head):not(.progress){width:100%;max-width:1360px;margin-left:auto;margin-right:auto}
  .focus-head{margin:0 -40px;padding:8px max(40px,calc(50% - 640px))}
  .progress{margin:0 -40px}
  .play-shell{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:32px;align-items:start;margin-top:8px}
  .play-main{display:flex;flex-direction:column;gap:16px;min-width:0}
  .play-grid:not(.has-material),.play-main:has(.play-grid:not(.has-material))>:is(.clip,.clip-note){width:100%;max-width:780px;margin-left:auto;margin-right:auto}
  .play-grid.has-material{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px}
  .play-grid.has-material .material{top:72px;max-height:calc(100vh - 120px)}
  .qnav{display:flex;flex-direction:column;gap:12px;position:sticky;top:72px;max-height:calc(100vh - 96px);overflow:auto;padding:14px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg)}
  .qnav h2{margin:0}
  .qnav .qgrid{grid-template-columns:repeat(5,minmax(0,1fr));margin:0;max-height:none;overflow:visible}
  .qnav .qgrid button{min-height:34px;font-size:12px;border-radius:8px}
  .qnav .qgrid .ok{background:var(--accent-3);border-color:var(--accent-6);color:var(--accent)}
  .qnav .qgrid .bad{background:var(--tomato-2);border-color:var(--tomato-6);color:var(--tomato-11)}
  .qnav .qgrid button:disabled{opacity:.4;cursor:default}
  .keys{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;margin:0;padding-top:12px;border-top:1px solid var(--subtle);font-size:12px;color:var(--muted)}
  .keys dt,.keys dd{margin:0}
  kbd{display:inline-block;min-width:22px;padding:1px 6px;border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:6px;background:var(--ground);font:600 11px/1.5 system-ui,-apple-system,sans-serif;color:var(--ink);text-align:center}
  .focus-foot{position:sticky;bottom:0;left:auto;right:auto;z-index:10;padding:16px 0 20px;background:linear-gradient(transparent,var(--ground) 35%)}
  .focus-foot button{min-height:48px}
  .focus-foot #grid-toggle{display:none}
  .opt{transition:border-color 120ms,background-color 120ms}.opt:hover{border-color:var(--accent-6)}
  .qblock{margin:0 -12px;padding:10px 12px;border:1px solid transparent;border-radius:var(--r-lg)}
  .qblock.active{border-color:var(--accent-6);background:var(--accent-2)}
  .hub-body.focus-mode .hub[data-view="summary"]>:not(.focus-head):not(.progress){max-width:920px}
  .photo{display:block;width:auto;max-width:100%;max-height:52vh;margin:0 auto}
  /* Part 1 on a computer: photo on the left, answers and explanation on the right, like a test screen. */
  .question:has(>.photo){display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px 24px;align-items:start}
  .question:has(>.photo)>.photo{grid-column:1;grid-row:1/span 30;max-height:70vh;height:auto;justify-self:center;align-self:start}
  .question:has(>.photo)>.chip-toggle{justify-self:start}
  .question:has(>.photo)>:not(.photo){grid-column:2}
  .play-grid:has(.question>.photo),.play-main:has(.question>.photo)>:is(.clip,.clip-note){max-width:1120px}
  .actions-row>:is(.primary,.primary-link):only-child{flex:0 0 auto;min-width:260px}
  .hub:not(.focus) .actions-row>*{flex:0 1 auto;min-width:200px}
  .hub[data-view="item"] .play-grid:not(.has-material){max-width:880px;margin-left:0}
  .hub>button.primary.wide{align-self:flex-start;width:auto;min-width:280px}
  /* Lists of short items become card grids on a wide screen; .rows keeps a list as rows (plan, phrases, scores). */
  .hub .list:not(.rows){display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;background:none;border:0;border-radius:0;overflow:visible}
  .hub .list:not(.rows)>.list-row{min-height:76px;padding:16px 18px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);transition:border-color 150ms,box-shadow 150ms}
  .hub .list:not(.rows)>.list-row+.list-row{border-top:1px solid var(--line)}
  .hub .list:not(.rows)>.list-row:hover{background:var(--paper);border-color:var(--accent-6);box-shadow:0 6px 18px rgba(0,0,0,.06)}
  .hub .list:not(.rows)>.empty{grid-column:1/-1;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg)}
  .hub .list.mlist{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}.hub .list.mlist>.list-row{align-items:flex-start}
  .hub[data-view="summary"] .list{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
  .hub .list:has([data-mock]){grid-template-columns:repeat(auto-fill,minmax(420px,1fr))}
  .hub .list:is(.words,.phrases)>.list-row{align-items:flex-start}
  .hub .list.words{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.words .stem{font-size:21px;font-weight:600}
  .hub .list.phrases{grid-template-columns:repeat(auto-fill,minmax(440px,1fr))}.phrases .stem{font-size:17px}
  .hub .list.rows{max-width:100%}
  /* type and module scale for a computer screen */
  .hub{gap:24px}
  .hub h2{font-size:20px}
  .page-head small{font-size:13px}
  .card{padding:20px 22px;gap:10px}.card p{font-size:14px}
  .caption{font-size:13px}
  .list-row b{font-size:16px}.list-row span{font-size:14px}.list-row small{font-size:12.5px}
  .mstem{font-size:16px}
  .chip{min-height:38px;padding:0 14px;font-size:14px}.chip b{font-size:12px}
  .tag{font-size:12px;padding:3px 9px}
  .section-head span{font-size:13px}
  .seg a{min-height:38px;font-size:14px}
  .tabbar a{font-size:15px}
  .card.set{padding:18px 20px}.card.set b{font-size:16px}.set small{font-size:12.5px}
  .big{font-size:40px}.stat-row b{font-size:28px}
  .badge{width:40px;height:40px}
  .stem{font-size:20px}.opt{font-size:18px;min-height:56px}
  .material-body p,.material>p{font-size:17px}
  .explain p{font-size:16px}
}
/* The old room's .score (right-aligned, no wrap) must not leak into the hub's score card. */
.card.score{text-align:left;white-space:normal}
/* Today's plan: a finished item stays listed with its result. */
.done-row b{color:var(--muted);font-weight:500}.done-row .mark{flex-shrink:0}
.button-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:var(--r-md);background:var(--fill);color:var(--ink);font-size:14px;font-weight:500}
.button-link:hover{background:var(--fill-hover)}
.item-nav{display:flex;align-items:center;gap:8px}.item-nav small{font-size:13px;color:var(--muted)}.item-nav .off{opacity:.3;pointer-events:none}

/* Listening graphics (tables, charts, original crops) */
.gfx{margin:0;display:flex;flex-direction:column;gap:10px}
.gfx figcaption{font-weight:600;font-size:15px;color:var(--ink);letter-spacing:-.01em}
.g-table table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--paper)}
.g-table th{background:var(--subtle);text-align:left;font-weight:600;font-size:12px;color:var(--muted);padding:8px 12px;letter-spacing:.02em}
.g-table td{padding:9px 12px;border-top:1px solid var(--line);color:var(--ink);white-space:pre-line}
.g-table tbody tr:first-child td{border-top:0}.g-table thead+tbody tr:first-child td{border-top:1px solid var(--line)}
.g-table tr:nth-child(even) td{background:rgba(0,0,0,.015)}
.g-pie-body{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.g-pie svg{width:150px;height:150px;flex-shrink:0;filter:drop-shadow(0 2px 6px rgba(0,0,0,.08))}
.g-pie svg path{stroke:#fff;stroke-width:1.2}
.g-pie ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;flex:1;min-width:160px}
.g-pie li{display:flex;align-items:center;gap:8px;font-size:14px}.g-pie li i{width:10px;height:10px;border-radius:3px;flex-shrink:0}
.g-pie li span{flex:1}.g-pie li b{font-variant-numeric:tabular-nums}
.g-bar{display:grid;grid-template-columns:minmax(80px,auto) 1fr auto;align-items:center;gap:10px;font-size:14px}
.g-bar>div{height:10px;border-radius:5px;background:var(--subtle);overflow:hidden}.g-bar i{display:block;height:100%;border-radius:5px;background:var(--accent)}
.g-bar b{font-variant-numeric:tabular-nums;min-width:48px;text-align:right}
.g-image img{width:100%;height:auto;border-radius:10px;border:1px solid var(--line);background:#fff;cursor:zoom-in}
.g-source{align-self:flex-start;font-size:12px;color:var(--accent)}
/* Reading passages: a chart or stamp kept as the original picture, at its own size */
.doc-figure{margin:14px 0}.doc-figure img{width:auto;max-width:100%;align-self:flex-start}
.g-sub{margin:-4px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.g-flow ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;gap:22px}
.g-flow li{position:relative;min-width:200px;text-align:center;padding:9px 18px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:14px;font-weight:500}
.g-flow li+li::before{content:"";position:absolute;left:50%;top:-18px;width:1.5px;height:12px;background:var(--faint)}
.g-flow li+li::after{content:"";position:absolute;left:calc(50% - 4px);top:-8px;border:4px solid transparent;border-top:5px solid var(--faint)}
/* Reading passages rendered as documents */
.doc-sep{display:flex;align-items:center;gap:10px;margin:18px 0 12px;color:var(--faint);font-size:12px;font-weight:600;letter-spacing:.04em}
.doc-sep::before,.doc-sep::after{content:"";flex:1;height:1px;background:var(--line)}
.doc-table{overflow-x:auto;margin:0 0 12px}
.doc-table table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.doc-table th{background:var(--subtle);text-align:left;font-weight:600;font-size:12.5px;color:var(--muted);padding:7px 10px;vertical-align:bottom}
.doc-table td{padding:8px 10px;border-top:1px solid var(--line);vertical-align:top;line-height:1.45}
.doc-nav{display:flex;flex-wrap:wrap;gap:6px;white-space:normal!important}
.doc-nav span{padding:2px 10px;border-radius:999px;background:var(--subtle);font-size:13px;color:var(--muted)}
.doc-fields{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:0 0 12px;font-size:15px;line-height:1.5}
.doc-fields dt{color:var(--muted);font-weight:500}.doc-fields dd{margin:0;overflow-wrap:anywhere}
.cb{display:inline-grid;place-items:center;width:15px;height:15px;margin:0 3px;vertical-align:-2px;border:1.5px solid var(--faint);border-radius:4px;font-style:normal;font-size:11px;font-weight:700;color:#fff}
.cb.on{background:var(--accent);border-color:var(--accent)}
.slot{display:inline-block;padding:0 6px;margin:0 2px;border-radius:6px;background:var(--amber-2);color:var(--amber-11);font-size:13px;font-weight:600}
.doc-table th,.doc-table td{overflow-wrap:normal;word-break:normal}
.doc-title{font-weight:600;font-size:16px;line-height:1.4}
.doc-rows{display:flex;flex-direction:column;gap:8px;margin:0 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.doc-rows p{margin:0!important;display:flex;flex-wrap:wrap;gap:2px 12px;font-size:14px;line-height:1.5;white-space:normal!important}
.doc-rows p+p{padding-top:8px;border-top:1px solid var(--subtle)}
.doc-rows p.doc-caption{font-size:12.5px;font-weight:600;color:var(--muted)}
.doc-rows b{font-weight:600}.doc-rows span{color:var(--ink)}
.chat .who{font-weight:600;font-size:14px;margin-right:8px}.chat small{font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums}
.addr{overflow-wrap:normal;word-break:normal}
.doc-fields dd{overflow-wrap:break-word}

/* ---------- 2026-10-22 fixes ---------- */
/* Hub only (review.html also loads hub.css with body.hub-body): a new question starts at the top at once, not after a long scroll. */
html:has(body.hub-body:not(.room-body)){scroll-behavior:auto}
.tabbar a{text-decoration:none}
.side-foot a{padding:0;min-height:0;font-size:13px}
/* Form-like passages: a long label never squeezes its value into columns of letters; on a phone the label sits above the value. */
.doc-fields{grid-template-columns:fit-content(40%) minmax(0,1fr)}
.doc-fields dd{overflow-wrap:break-word;word-break:normal}
@media(max-width:560px){.doc-fields{grid-template-columns:minmax(0,1fr);gap:0}.doc-fields dt{margin-top:10px;font-size:13px}.doc-fields dt:first-child{margin-top:0}.doc-fields dd{font-size:15px}}
/* Score meter: each number sits under its own line. */
.meter-labels{position:relative;height:16px}
.meter-labels span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
.meter-labels span:first-child{transform:none}.meter-labels span:last-child{transform:translateX(-100%)}
.meter-labels .line{color:var(--ink);font-weight:600}.meter-labels .goal{color:var(--amber-11);font-weight:600}
/* A disabled main button reads as not yet available (solid grey), not as a pale version of the green one. */
.hub button.primary:disabled,.hub button.primary:disabled:hover{opacity:1;background:var(--subtle);border-color:var(--line);color:var(--faint);cursor:not-allowed}
/* "Guessed" is an outlined switch; switched on it turns amber. */
.hub .chip-toggle{background:var(--paper);border:1px dashed var(--line-strong);color:var(--muted)}
.hub .chip-toggle:hover{background:var(--paper);border-color:var(--amber-6);color:var(--amber-11)}
.hub .chip-toggle.on{border-style:solid;background:var(--amber-2);border-color:var(--amber-6);color:var(--amber-11)}
.qhead{display:flex;align-items:center;gap:8px}.qhead .stem{flex:1;min-width:0}
.chip-toggle.mini{min-height:32px;padding:0 10px;font-size:12px;flex-shrink:0;align-self:center}
/* Mistakes due today keep their answer folded until the redo. */
.list-row span.due-note,.due-note{color:var(--amber-11);font-weight:500}
.later{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper);padding:0 14px}
.later>summary{min-height:48px;display:flex;align-items:center;cursor:pointer;color:var(--accent-11);font-size:14px;font-weight:500}
.later[open]{padding-bottom:14px}.later>div{display:flex;flex-direction:column;gap:12px}
.qnav [data-act="finish"]{min-height:40px;font-weight:600}
.head-sync{font-size:11px;color:var(--amber-11);background:var(--amber-2);border-radius:999px;padding:2px 8px;white-space:nowrap;max-width:40vw;overflow:hidden;text-overflow:ellipsis}.head-sync[hidden]{display:none}
.actions-row.center{justify-content:center;margin-top:12px}
.pace-miss{color:var(--amber-11)}
/* Small green text uses the darker green step (≥4.5:1 on white and on the tinted chips). */
.tag,.badge,.resume small,.page-head .back,.to-material,.page-link,.material-head a,.list-row>button:not(.primary):not([data-drop-word]):not([data-drop-score]),.g-source,.side-foot a,.add-score summary{color:var(--accent-11)}
.list-row b .tag{white-space:nowrap;display:inline-block}
@media(min-width:900px){.hub:has(#later){max-width:1200px}}
@media (min-width:1024px){.actions-col{max-width:760px}}

/* ---------- 2026-10-22 look and reading ---------- */
/* After submitting, the options keep their card shape; the answer and the reader's own choice are named, not only coloured.
   (.choice-gloss > div stays: the word and sentence speakers are added inside it.) */
.hub .glosses{display:flex;flex-direction:column;gap:8px;background:none;border:0;padding:0}
.hub .glosses .choice-gloss,.hub .glosses .choice-gloss:last-child{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 12px;border:1.5px solid var(--line);border-radius:var(--r-md);background:var(--paper)}
.hub .glosses .choice-gloss>b{width:28px;height:28px;flex-shrink:0;border-radius:14px;display:grid;place-items:center;background:var(--subtle);color:var(--muted);font:600 13px/1 var(--sans)}
.hub .glosses .choice-gloss>div{flex:1;min-width:0;font-family:var(--font-en);font-size:17px;line-height:1.45;color:var(--ink)}
.hub .glosses .choice-gloss.is-answer{border-color:var(--accent-6);background:var(--accent-2)}.hub .glosses .choice-gloss.is-answer>b{background:var(--accent);color:#fff}
.hub .glosses .choice-gloss.is-wrong{border-color:var(--tomato-6);background:var(--tomato-2)}.hub .glosses .choice-gloss.is-wrong>b{background:var(--tomato-11);color:#fff}
.hub .glosses .choice-gloss.is-answer>div,.hub .glosses .choice-gloss.is-wrong>div{color:var(--ink)}
.gl-tag{flex-shrink:0;font-style:normal;font-size:12px;font-weight:600;white-space:nowrap}.gl-tag.ok{color:var(--accent-11)}.gl-tag.bad{color:var(--tomato-11)}
/* Explanation: the distractor notes as one quiet list (the reader's wrong pick marked), vocabulary set apart, readable line length. */
.hub .explain h3{font-size:16px;font-weight:600;color:var(--ink);letter-spacing:0}
.hub .explain>:is(p,.why-not){max-width:672px}
.why-not{list-style:none;margin:0;padding:8px;background:var(--subtle);border-radius:var(--r-md);display:flex;flex-direction:column;gap:2px}
.why-not li{font-size:14.5px;line-height:1.6;padding:3px 8px;border-radius:6px}
.why-not li.mine{background:var(--tomato-2);color:var(--tomato-12)}
.hub .explain .vocab-line{font-size:14px;color:var(--muted);padding-top:8px;border-top:1px dashed var(--line)}
.hub .explain .chips{align-items:center}.hub .explain .chips::before{content:"考点";font-size:12px;color:var(--muted)}
.hub .explain .chips .chip{min-height:28px;padding:0 10px;font-size:12px;background:var(--accent-3);border-color:transparent;color:var(--accent-11)}
.review-note{display:flex;flex-direction:column;gap:2px;padding:10px 14px;border-radius:var(--r-md);background:var(--subtle);font-size:13px;line-height:1.55;color:var(--ink)}
.review-note span{color:var(--muted);font-size:12px}
.stem-hint{font-size:14px;line-height:1.5;color:var(--muted);margin:0 2px}
/* P3/P4: a group of three fits one computer screen; the stem is a heading, not a card. */
.hub .qblock .stem{background:none;border:0;padding:0 2px;margin:0;font-size:17px;font-weight:600;line-height:1.4}
.hub .qblock .options{gap:6px}.hub .qblock .opt{min-height:48px}
/* The progress line sits on the bottom edge of the sticky header. */
.focus-head .progress{position:absolute;left:0;right:0;bottom:-1px;height:3px;margin:0;background:transparent}.focus-head .progress>span{min-width:6px}
/* Today: the first open task stands out, each says where it starts. */
.plan .list-row .go{flex-shrink:0;box-sizing:border-box;min-width:68px;padding:5px 12px;border-radius:999px;text-align:center;font-size:13px;font-weight:600;color:var(--accent-11);white-space:nowrap}
.mark.step{background:var(--subtle);color:var(--muted);font-size:13px}.plan .list-row.next .mark.step{background:var(--accent);color:#fff}
@media(max-width:600px){.plan .list-row:not(.next) .go{display:none}}
.plan .list-row.next{background:var(--accent-2);box-shadow:inset 3px 0 0 var(--accent)}
.plan .list-row.next .go{background:var(--accent);color:#fff}
/* Accuracy colours: red below 60 %, amber 60–79 %; type tags (mock, timed) are blue so amber keeps meaning "attention". */
.chip.amber{background:var(--amber-2);border-color:var(--amber-6);color:var(--amber-11)}
.bar>span.red{background:#e54d2e}.bar>span.amber{background:#e2a336}.bar>span.na{background:var(--line-strong)}
.tag.blue{background:#ebf3fe;color:#0d5bb5}
/* Mistake cards */
.mlast b.ok{color:var(--accent-11)}.mlast b.bad{color:var(--tomato-11)}
.mcard .dots{font-style:normal;letter-spacing:1px;color:var(--accent);font-size:10px;margin-left:2px}
/* Large controls do not shrink when pressed; their background answers instead. */
.hub .opt:active:not(:disabled),.hub .list-row:active:not(:disabled),.hub .focus-foot button:active:not(:disabled){transform:none}
.hub .opt:active:not(:disabled){background:var(--accent-2)}
/* Pace in a timed reading set */
.pace-tag{font-variant-numeric:tabular-nums}.pace-tag.behind{color:var(--amber-11);font-weight:600}
.focus-head small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.focus-head .pill{white-space:nowrap}
/* Results: answer sheet, filters, explanation paging */
.split{display:flex;gap:16px;flex-wrap:wrap;font-size:14px;color:var(--muted)}.split b{font-size:18px;color:var(--ink)}
.sheet{gap:6px}.sheet .section-head{flex-wrap:wrap}.sheet .section-head h2{flex-shrink:0;white-space:nowrap}.sheet .section-head span{white-space:normal;text-align:right}
@media(max-width:600px){.sheet .section-head span{text-align:left;flex-basis:100%}}
.sheet-part{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;align-items:start;padding:4px 0}.sheet-part>b{font-size:13px;color:var(--muted);padding-top:7px}
.cells{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:4px}
.cell{position:relative;display:grid;place-items:center;height:32px;border-radius:6px;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;background:var(--subtle);color:var(--muted);border:1px solid transparent}
.cell.ok{background:var(--accent-3);color:var(--accent-11)}.cell.bad{background:var(--tomato-2);color:var(--tomato-11);border-color:var(--tomato-6)}
.cell.guess::after{content:"";position:absolute;top:-1px;right:-1px;width:10px;height:10px;border-radius:0 6px 0 0;background:linear-gradient(225deg,var(--amber-11) 50%,transparent 50%)}
.cell.slow::before{content:"";position:absolute;bottom:3px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:2px;background:currentColor}
.cell.dim{background:transparent;border-color:var(--line)}
.review-pick{display:flex;flex-direction:column;gap:10px}.review-pick .section-head{align-items:center}.review-pick .section-head button{min-height:36px;padding:0 14px;font-size:13px}
.filters .chip{cursor:pointer;font:inherit;font-size:13px}.filters .chip.on{background:var(--accent-3);border-color:var(--accent-6);color:var(--accent-12);font-weight:600}.filters .chip.on b{color:var(--accent-11)}
.rev-nav{display:flex;gap:6px}.rev-nav .button-link{min-height:34px;padding:0 12px;font-size:13px;white-space:nowrap}.rev-nav .off{opacity:.35;pointer-events:none}
.focus-head>.rev-nav{flex:0 0 auto;flex-direction:row;margin-left:auto}.rev-nav.foot{justify-content:space-between;margin-top:8px}
@media(max-width:600px){.focus-head .rev-nav{display:none}}
.keys-help>summary{cursor:pointer;font-size:12px;color:var(--muted);min-height:28px;display:flex;align-items:center;list-style:none}
.keys-help>summary::-webkit-details-marker{display:none}.keys-help>summary::after{content:"›";margin-left:6px;transition:transform 150ms}.keys-help[open]>summary::after{transform:rotate(90deg)}
.p7-types{display:flex;flex-direction:column;gap:12px}.p7-types h2{margin:0}
.hub .qblock .opt{line-height:1.3;padding-top:6px;padding-bottom:6px}.keys-help[open]>summary{margin-bottom:8px}
@media (min-width:1024px){
  .hub .glosses .choice-gloss,.hub .glosses .choice-gloss:last-child{min-height:56px}.hub .glosses .choice-gloss>div{font-size:18px}
  .why-not li{font-size:15px}
  .hub .qblock .opt{min-height:44px;padding:4px 10px;font-size:16px}.hub .qblock .opt b{width:24px;height:24px;font-size:12px}
  /* Unanswered group questions: options two by two, so the three questions and the player fit one screen. */
  .hub .qblock[data-k] .options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .hub .qblock{padding:8px 12px}.hub .qblock+.qblock{margin-top:4px}
  .hub .focus-foot{background:linear-gradient(rgba(245,245,247,0),var(--ground) 16px)}
  /* Listening groups with a graphic: the questions get the wider column (reading keeps the passage wider). */
  .play-main:has(>.clip) .play-grid.has-material{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
  /* Explanations after handing in: a readable width, a passage at most as wide as on the question screen. */
  .hub-body.focus-mode .hub[data-view="review"]>.play-grid:not(.has-material),.hub-body.focus-mode .hub[data-view="review"]>:is(.clip,.clip-note){max-width:880px}
  .hub-body.focus-mode .hub[data-view="review"]>.play-grid.has-material{max-width:1200px}
  /* Passages get the room: reading column about 1.35× the question column, a narrower navigator. */
  .play-shell:has(.has-material){grid-template-columns:minmax(0,1fr) 200px;gap:24px}
  .play-grid.has-material{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
  .play-shell:has(.has-material) .qnav .qgrid{grid-template-columns:repeat(4,minmax(0,1fr))}
  /* Questions without a passage or photo: question and navigator centred together. */
  .hub-body.focus-mode .hub>.play-shell:not(:has(.has-material)):not(:has(.photo)){max-width:1052px}
  /* Sentence speakers in a passage stay small, so the lines keep their spacing. */
  .hub .material .speech-sentence-play{width:22px;height:22px;min-width:22px;min-height:22px;vertical-align:-4px}
}
/* Exam rhythm card (last day and exam day) */
.rhythm ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.rhythm li{display:grid;grid-template-columns:6.5em minmax(0,1fr);gap:4px;font-size:14px;line-height:1.6;color:var(--ink)}.rhythm li b{color:var(--accent-11)}

/* ---------- 2026-10-22 accounts ---------- */
.form-grid>button{align-self:end;min-height:40px}
.switch-row{display:flex;align-items:center;gap:8px;min-height:44px;font-size:14px;color:var(--ink);cursor:pointer}
.switch-row input{width:20px;height:20px;accent-color:var(--accent)}
.welcome{border-color:var(--accent-6)}
.welcome ol{margin:0;padding-left:1.4em;display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.6;color:var(--ink)}
.welcome li b{margin-right:6px;color:var(--accent-11)}
.list-row b small{display:inline;margin:0 0 0 4px;font-weight:400;color:var(--muted)}
.card.log summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}

/* ---------- 2026-10-22 top bar, account menu, dialogs ----------
   Account entry at the top right (NN/g utility navigation); menu as a disclosure (WAI-ARIA APG); sign-in, invite and
   settings as small native dialogs (web.dev sign-in form practices: labels, 44px targets, 16px inputs, autocomplete). */
.appbar{position:sticky;top:0;z-index:30;background:rgba(245,245,247,.86);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid rgba(0,0,0,.06)}
.appbar[hidden]{display:none}
.appbar-in{position:relative;max-width:760px;margin:0 auto;height:52px;padding:0 12px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.appbar-brand{display:flex;flex-direction:column;min-width:0;line-height:1.25}.appbar-brand b{font-size:16px;font-weight:600}.appbar-brand small{font-size:12px;color:var(--muted)}
.account-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:4px 10px 4px 6px;border:0;border-radius:999px;background:transparent;color:var(--ink);cursor:pointer}
.account-btn:hover,.account-btn[aria-expanded="true"]{background:var(--fill)}
.account-btn svg{color:var(--muted)}
.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--accent-3);color:var(--accent-11);font-size:14px;font-weight:600;line-height:1}
.account-name{font-size:14px;font-weight:500;max-width:9em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu{position:absolute;right:12px;top:calc(100% - 2px);z-index:45;width:260px;max-width:calc(100vw - 24px);padding:6px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:0 12px 32px rgba(26,33,30,.14),0 2px 6px rgba(26,33,30,.06);transform-origin:top right;animation:pop-in 140ms var(--ease-out)}
.account-menu[hidden]{display:none}
.menu-head{display:flex;align-items:center;gap:10px;padding:8px 10px 12px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.menu-head b{display:block;font-size:15px;font-weight:600}.menu-head small{display:block;font-size:12px;color:var(--muted)}
.account-menu button{display:flex;align-items:center;width:100%;min-height:42px;padding:0 10px;border:0;border-radius:var(--r-sm);background:none;color:var(--ink);font-size:14px;font-weight:400;text-align:left;cursor:pointer}
.account-menu button:hover,.account-menu button:focus-visible{background:var(--fill);outline:none}
.account-menu button:active:not(:disabled){transform:none}
.account-menu hr{border:0;border-top:1px solid var(--line);margin:6px 0}
.focus-mode .appbar{display:none}
.page-head>.link{align-self:flex-end;min-height:36px}
/* Below the computer layout the top bar is sticky: what stuck at the top now sticks under it, clear of a notch. */
@media (max-width:1023px){
  .hub-body{--appbar-h:calc(53px + env(safe-area-inset-top))}
  .appbar{padding-top:env(safe-area-inset-top)}
  .appbar-in{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .fam-chips{top:var(--appbar-h)}section[id^="fam-"]{scroll-margin-top:calc(var(--appbar-h) + 56px)}
}
dialog.dialog-fallback{position:fixed;z-index:100;top:max(16px,5vh);left:0;right:0;margin:0 auto;display:block;box-shadow:0 0 0 100vmax rgba(26,33,30,.35)}
@media (max-width:1023px){.account-name{display:none}.account-btn{padding:4px}.account-btn svg{display:none}}
@media (min-width:1024px){
  /* On a computer the account button simply sits at the page's top right (the sidebar has the name and countdown). */
  .appbar{position:static;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;border:0}
  .appbar-in{max-width:1160px;height:56px;padding:12px 32px 0 40px;justify-content:flex-end}
  .appbar-brand{display:none}
  .account-menu{right:32px}
  .hub{padding-top:12px}
}
@keyframes pop-in{from{opacity:0;transform:translateY(-4px) scale(.98)}}
dialog.modal{position:fixed;padding:0;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper);color:var(--ink);box-shadow:0 24px 64px rgba(26,33,30,.2)}
dialog.modal.small{width:min(400px,calc(100vw - 32px))}
dialog.modal[open]{animation:pop-in 180ms var(--ease-out)}
@media (prefers-reduced-motion:reduce){dialog.modal[open],.account-menu{animation:none}}
/* A phone's keyboard takes the lower half: dialogs sit near the top there. */
@media (max-width:600px){dialog.modal{margin:max(16px,5vh) auto auto;width:calc(100vw - 24px)}.modal-body{padding:20px}}
.modal-body{display:flex;flex-direction:column;gap:12px;padding:24px}
.modal-body h2{margin:0;padding-right:32px;font-size:20px;font-weight:600;line-height:1.35}
.modal-body p{margin:0}
.modal-close{position:absolute;top:12px;right:12px;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:22px;line-height:1;cursor:pointer}
.modal-close:hover{background:var(--fill);color:var(--ink)}
.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:4px}
.modal-actions button{min-height:44px;padding:0 18px}
.modal-actions .count{margin-right:auto;font-size:13px;color:var(--muted)}
.modal-body .form-grid{gap:12px}.modal-body .form-grid .wide{grid-column:1/-1}
.auth-head{display:flex;align-items:center;gap:12px;margin-bottom:4px;padding-right:36px}
.auth-mark{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;flex:none;background:var(--accent);color:#fff;font-size:18px;font-weight:700}
.auth-head h2{padding:0}.auth-head p{font-size:13px;color:var(--muted)}
.auth-form{display:flex;flex-direction:column;gap:10px}
.auth-form[hidden]{display:none}
.auth-form label,.modal-body .form-grid label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;color:var(--ink)}
.modal-body input:not([type=checkbox]){box-sizing:border-box;width:100%;min-height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--paper);color:var(--ink);font-size:16px}
.modal-body input:not([type=checkbox]):focus{border-color:var(--accent)}
.auth-form .remember{flex-direction:row;align-items:center;gap:8px;min-height:32px;font-weight:400;color:var(--muted)}
.auth-form .remember input{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.auth-form>button,.owner-body>button{min-height:46px;font-size:16px}
.pw{display:flex;gap:8px}.pw input{flex:1;min-width:0}
.pw .show{flex:none;min-height:44px;padding:0 12px;font-size:13px;font-weight:500}
.form-error{color:var(--tomato-11);font-size:13px;line-height:1.5}.form-error:empty{display:none}
.pw-field{display:flex;flex-direction:column;gap:6px}
.label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:20px}.label-row label{font-size:13px;font-weight:500}
.auth-alt{display:flex;align-items:center;justify-content:center;gap:4px;padding-top:12px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
button.link{display:inline-flex;align-items:center;min-height:32px;padding:0;border:0;background:none;color:var(--accent);font-size:13px;font-weight:500;cursor:pointer}
button.link:hover{background:none;text-decoration:underline}
.card.score button.link{margin-left:6px}
.auth-note{padding:10px 12px;border:1px solid var(--amber-6);border-radius:var(--r-sm);background:var(--amber-2);font-size:13px;line-height:1.55}
.owner details{border-top:1px solid var(--line);padding-top:4px}
.owner-body{display:flex;flex-direction:column;gap:10px;padding-bottom:2px}
.owner summary{display:flex;align-items:center;min-height:40px;font-size:13px;color:var(--muted);cursor:pointer}
.share-text{box-sizing:border-box;width:100%;padding:12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--subtle);color:var(--ink);font:inherit;font-size:14px;line-height:1.6;resize:none}
.page-head>.primary{min-height:40px;padding:0 16px}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* 2026-10-23 phrase list: each sentence plays its own cut of the day's recording */
.say-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.say-bar .caption{flex:1 1 240px}
/* as specific as the list's link-colour rule for row buttons, which it must override */
.list.phrases>.list-row>button.say-play{width:36px;height:36px;min-height:36px;flex-shrink:0;padding:0;border:0;border-radius:18px;background:var(--accent);color:#fff;font-size:13px;display:grid;place-items:center}
.hub .list.phrases>.list-row.on-air{background:var(--accent-2);box-shadow:inset 3px 0 0 var(--accent)}
@media (min-width:1024px){.hub .list.phrases>.list-row.on-air{border-color:var(--accent-6)}}
/* one size for every drill page: 每次 5 / 10 / 20 题 */
.size-pick{align-items:center;margin:4px 0 12px}.set-runs .caption{margin-top:8px}.set-runs button{white-space:nowrap}.size-pick>span{font-size:13px;color:var(--muted)}
.hub .actions-col button:not(.primary):disabled{opacity:.55;cursor:not-allowed}
