.account-card{border:1px solid #dbe7fb}.account-card #accountName{font-weight:600;font-size:15px}.account-card #syncStatus{font-size:14px;margin:8px 0;color:#496178}.account-card .toolbar{margin-top:12px}.import-label{display:inline-block;cursor:pointer;background:white;border:1.5px solid #ddd;border-radius:8px;padding:8px 14px;font-size:14px}dialog{width:min(94vw,460px);max-height:90svh;overflow:auto;margin:auto;padding:24px;border:1px solid #dbe7fb;border-radius:16px;color:#222;box-shadow:0 16px 80px #0003}dialog::backdrop{background:#13233c88}dialog label{display:block;margin:14px 0;font-size:14px}dialog input{display:block;width:100%;padding:11px;font-size:16px;margin-top:5px;border:1px solid #bbb;border-radius:8px}dialog .toolbar{margin-top:16px}#authError{font-size:14px;color:#a62b22;min-height:24px}#recoveryText{font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f6f8;padding:15px;border-radius:8px;margin:16px 0}#closeRecovery{margin-top:14px}#historyPanel{margin-top:12px;max-height:240px;overflow:auto}#historyPanel button{margin:4px}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #63a1ff;outline-offset:3px}[hidden]{display:none!important}
/* One visual system for accounts, practice, and personal records. */
:root{--ink:#142c3a;--muted:#637984;--teal:#127c74;--line:#dfe8ed;--page:#f2f6f8;--soft:#e7f4f1;color-scheme:light}
body{padding:0 24px 48px;background:var(--page);color:var(--ink);font-size:16px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;line-height:1.7}
.wrap{max-width:1000px;margin:auto}.site-head{height:100px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:20px;margin-bottom:46px}.site-logo{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;font-size:22px;font-weight:750;letter-spacing:.04em;line-height:1.35}.logo-mark{display:grid;place-items:center;width:43px;height:47px;background:var(--teal);border-radius:13px 13px 13px 3px;color:white;font-size:25px;font-family:Georgia,serif}.logo-sub{display:block;font-size:10px;letter-spacing:.14em;font-weight:600;color:var(--muted);margin-top:3px}.head-note{color:var(--muted);font-size:14px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:.16em;color:var(--teal);margin-bottom:10px}
.page-heading h1{text-align:left;font-size:clamp(26px,4vw,36px);line-height:1.4;margin:0 0 9px;letter-spacing:-.03em}.sub{text-align:left;color:var(--muted);font-size:14px;margin-bottom:28px}.stats-grid{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:16px;margin-bottom:24px}.stats-grid>div{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px 24px}.stats-grid span{display:block;font-size:14px;color:var(--muted)}.stats-grid strong{font-size:30px;line-height:1.6;letter-spacing:-.025em;font-variant-numeric:tabular-nums}.stats-grid>div:last-child strong{font-size:22px}.card{border:1px solid var(--line);border-radius:17px;padding:25px;box-shadow:0 4px 16px #102d3d03;margin-bottom:20px}h2{font-size:17px;color:var(--ink);margin-bottom:13px}.account-card{position:relative;background:#eaf5f2;border-color:#cee7df}.account-card h2{font-size:15px}.account-card #accountName{font-size:18px}.account-card .toolbar{margin-bottom:8px;gap:8px}.account-card #syncStatus{color:#36635e;font-size:14px}.account-card .hint{font-size:13px;color:#50716a;line-height:1.8}.hint,.small{font-size:13px;color:var(--muted)}
#view-setup{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:20px;align-items:start}#view-setup>.card{margin:0}#view-setup>.small{grid-column:1/-1;text-align:left!important;font-size:12px;line-height:1.8;color:#788d96}
.seg{gap:8px}.seg button{border:1px solid var(--line);padding:11px 5px;border-radius:10px;font-size:14px;color:#425c69}.seg button.on{border-color:var(--teal);background:var(--soft);color:var(--teal)}.row{font-size:15px;margin:17px 0}.row input[type=number]{width:70px;background:#f7fafb;border:1px solid #c8d9e1;padding:8px;border-radius:8px;color:var(--ink)}label.chk{font-size:14px;margin:12px 0}input[type=checkbox]{accent-color:var(--teal);width:16px;height:16px;vertical-align:middle;margin-right:3px}button{font-family:inherit;transition:background .15s,box-shadow .15s}button:hover{filter:brightness(.97)}button.big,.btn-next{background:var(--teal);border-radius:10px;padding:13px 14px;font-size:16px;color:white}button.big:hover,.btn-next:hover{background:#09685f}button.big:disabled{background:#8bbab3}.ghost,.import-label,button.ghost{border:1px solid #cbdadf;background:#fff;color:#345462;font-size:14px;border-radius:8px;padding:9px 12px;line-height:1.5;cursor:pointer}.ghost.on{border-color:var(--teal);color:var(--teal);background:var(--soft)}.badge{background:#d9efea;color:var(--teal);font-size:13px}.btnrow{gap:10px}.btnrow button{font-size:15px;border-radius:10px;padding:13px 8px}.btn-know{background:#e2f3ed;color:#167355}.btn-unknow{background:#fff0e8;color:#a35732}.btn-speak{background:#edf3f6;color:#42616e}.progress{font-size:14px;line-height:1.8;color:var(--muted)}a.back{color:var(--teal);font-size:14px}.flash{min-height:280px;padding:48px 16px;background:#f8fbfc;margin:20px 0;border:1px solid #edf2f5}.flash .w{font-size:clamp(32px,6vw,49px);letter-spacing:-.02em}.flash .p{color:#7b909a;font-size:16px;margin-top:12px}.flash .m{color:var(--teal);font-size:20px}.flash .tap{font-size:14px;color:var(--muted)}.flash.hidden-m .tap{color:var(--teal)}.q{background:#f2f7f8;padding:30px;font-size:22px}.q .phon{font-size:15px;color:var(--muted)}input.answer{border-color:#c7d9df;padding:15px;color:var(--ink)}input.answer:focus{border-color:var(--teal)}.feedback{min-height:30px}table.words{font-size:16px}table.words td,table.words th{padding:15px 10px;border-color:#e6eef1}table.words th{font-size:14px;color:var(--muted)}td .pw{font-size:14px;color:#708792}td .wm{color:#345462}td.wcell .tag{font-size:12px;color:var(--teal);border-color:#80b9ac}td .wm.hidden{visibility:visible;color:transparent;position:relative;cursor:pointer}td .wm.hidden:after{content:'点击查看释义';position:absolute;left:0;top:0;color:#75918c;font-size:14px}.toolbar input[type=text]{padding:11px 13px;font-size:16px;border-color:#cadce2}.result-line{line-height:1.9;font-size:16px}.pill{font-size:13px}
#authScreen{position:relative;display:grid;grid-template-columns:1.1fr 1fr;min-height:100svh;margin:0 -24px -48px}.auth-story{display:flex;flex-direction:column;background:#153d48;color:#f4fbfa;padding:48px clamp(30px,6vw,100px)}.auth-story .site-logo{font-size:25px}.auth-story .logo-mark{background:#a9dec8;color:#153d48}.auth-story .logo-sub{color:#98b8bd}.story-content{margin:auto 0;padding:70px 0}.auth-story .eyebrow{color:#9bd6bd}.auth-story h1{font-size:clamp(30px,3.9vw,54px);text-align:left;font-weight:650;line-height:1.45;margin:20px 0;letter-spacing:-.035em}.story-content>p:not(.eyebrow){color:#bed6db;font-size:16px;line-height:1.9}.sample-word{border-left:2px solid #85c7b1;padding:4px 0 4px 22px;margin-top:46px}.sample-word>span{display:block;color:#b5cdd2;font-size:14px}.sample-word strong{display:block;font-size:38px;letter-spacing:-.02em;font-family:Georgia,serif;font-weight:500;margin:4px 0}.sample-word p{font-size:15px;color:#def0eb;margin-top:7px}.story-footer{font-size:13px;line-height:1.9;color:#9bbfc4}.auth-panel{display:flex;align-items:center;justify-content:center;background:#f7fafb;padding:64px 40px}.auth-panel form{width:100%;max-width:380px}.auth-panel h2{font-size:32px;letter-spacing:-.035em;line-height:1.4;margin-bottom:12px}.auth-lead{color:var(--muted);font-size:16px;margin-bottom:30px}.auth-panel label{display:block;font-size:14px;font-weight:600;margin:18px 0}.auth-panel input{display:block;width:100%;border:1px solid #cbdce2;border-radius:9px;background:white;padding:13px;font-size:16px;color:var(--ink);margin-top:8px;line-height:1.4}.auth-panel input::placeholder{font-size:14px;color:#8499a3}.auth-panel .big{margin-top:0;width:100%;padding:14px}.auth-links{display:flex;justify-content:space-between;gap:10px;margin:19px 0}.auth-links button{padding:2px 0;border:0;background:none;color:var(--teal);font-size:14px;cursor:pointer;text-align:left}.guest-button{display:block;width:100%;border:1px solid var(--line);background:transparent;border-radius:9px;color:#52717c;font-size:15px;padding:12px;cursor:pointer;margin-top:25px}.auth-footnote{font-size:12px;color:#7a8e98;line-height:1.9;margin-top:23px}
@media(max-width:850px){#authScreen{grid-template-columns:1fr 1fr}.auth-story{padding:36px 30px}.story-content{padding:60px 0}.auth-panel{padding:42px 28px}#view-setup{grid-template-columns:1fr}.account-card .toolbar{flex-wrap:wrap}}
.learning-mode .page-heading,.learning-mode .stats-grid{display:none}.learning-mode .site-head{height:78px;margin-bottom:20px}.learning-mode .account-card{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;padding:12px 20px}.learning-mode .account-card h2,.learning-mode .account-card .toolbar,.learning-mode .account-card>.hint{display:none}.learning-mode .account-card #accountName{font-size:14px}.learning-mode .account-card #syncStatus{font-size:13px;margin:0}
@media(max-width:620px){body{padding:0 16px 30px}.site-head{height:82px;margin-bottom:30px}.head-note{font-size:12px;max-width:90px;text-align:right}.site-logo{font-size:20px}.logo-sub{font-size:9px}.logo-mark{width:37px;height:41px}.page-heading h1{font-size:28px}.sub{font-size:13px;max-width:340px}.stats-grid{gap:8px;margin-bottom:16px;grid-template-columns:1fr 1fr 1.3fr}.stats-grid>div{padding:13px 12px;border-radius:12px}.stats-grid span{font-size:12px}.stats-grid strong{font-size:25px}.stats-grid>div:last-child strong{font-size:16px;line-height:2.5}.card{padding:20px 16px;border-radius:14px;margin-bottom:16px}.account-card .ghost,.account-card .import-label{font-size:13px;padding:8px 10px}.flash{min-height:260px;padding:35px 12px}.flash .w{font-size:37px}.btnrow{gap:7px}.btnrow button{font-size:14px}#view-setup{gap:16px}.seg button{font-size:14px;padding:11px 3px}.row{font-size:14px}.row input[type=number]{width:58px}#authScreen{display:block;margin:0 -16px -30px}.auth-story{padding:24px}.auth-story .site-logo{font-size:21px}.story-content{padding:26px 0 5px}.story-content .eyebrow{display:none}.auth-story h1{font-size:27px;margin:0 0 12px;line-height:1.5}.story-content>p:not(.eyebrow){font-size:14px}.sample-word,.story-footer{display:none}.auth-panel{padding:32px 24px 40px}.auth-panel form{max-width:420px}.auth-panel h2{font-size:26px}.auth-panel .eyebrow{display:none}.auth-lead{font-size:14px;margin-bottom:22px}.auth-links button{font-size:13px}.guest-button{margin-top:22px}.auth-panel label{margin:15px 0}.toolbar input[type=text]{min-width:100px}table.words{font-size:14px}table.words td,table.words th{padding:12px 6px}.q{padding:22px;font-size:19px}}

/* The new shell is scoped so the original login and study pages retain their styles. */
body.new-shell {
  --app-bg: #F7F8FA;
  --app-card: #FFFFFF;
  --app-primary: #2563EB;
  --app-error: #EF4444;
  --app-knowledge: #F59E0B;
  --app-ink: #19263D;
  --app-muted: #516078;
  --app-line: #DFE5EE;
  --app-shadow: 0 6px 22px #24385609;
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--app-ink);
}
#study-shell { min-height: 100svh; display: flex; flex-direction: column; }
#study-shell *, #study-shell *::before, #study-shell *::after { box-sizing: border-box; }
#study-shell a { color: var(--app-primary); }
#study-shell .skip-link { position: absolute; left: 12px; top: -100px; z-index: 5; padding: 8px 12px; background: white; }
#study-shell .skip-link:focus { top: 8px; }
#study-shell .app-header { position: sticky; z-index: 3; top: 0; background: var(--app-card); border-bottom: 1px solid var(--app-line); }
#study-shell .header-inner { max-width: 1140px; margin: auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
#study-shell .app-brand { display: flex; gap: 9px; align-items: center; font-size: 1.1rem; font-weight: 750; color: var(--app-ink); text-decoration: none; white-space: nowrap; }
#study-shell .app-brand span { display: grid; place-items: center; border-radius: 9px; width: 34px; height: 34px; background: var(--app-primary); color: white; }
#study-shell .app-nav { display: flex; gap: 3px; flex-wrap: wrap; }
#study-shell .app-nav a { padding: 8px 12px; color: var(--app-muted); border-radius: 7px; text-decoration: none; font-size: .92rem; }
#study-shell .app-nav a:hover, #study-shell .app-nav [aria-current] { background: #EAF0FF; color: #1D4ED8; }
#study-shell .app-account { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: flex-end; margin-left: auto; font-size: .875rem; color: var(--app-muted); }
#study-shell #session-label { overflow-wrap: anywhere; }
#study-shell #main-content, #study-shell .app-footer { width: min(100%, 1140px); margin: 0 auto; padding: 42px 24px; }
#study-shell #main-content { flex: 1; }
#study-shell .app-footer { padding-top: 18px; padding-bottom: 24px; font-size: .9rem; }
#study-shell .app-intro { margin-bottom: 22px; }
#study-shell .app-intro h1 { margin: 0; text-align: left; color: var(--app-ink); font-size: clamp(1.72rem, 4vw, 2.5rem); line-height: 1.25; }
#study-shell .app-intro p, #study-shell .muted { margin: 7px 0; color: var(--app-muted); }
#study-shell .app-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
#study-shell .module-card, #study-shell .study-card, #study-shell .practice-preview li {
  border: 1px solid var(--app-line); background: var(--app-card); border-radius: 15px; box-shadow: var(--app-shadow);
}
#study-shell .module-card { min-height: 222px; display: flex; flex-direction: column; align-items: flex-start; padding: 22px; color: var(--app-ink); text-decoration: none; }
#study-shell .module-card:hover { border-color: #9DB7F4; box-shadow: 0 8px 24px #223C6415; }
#study-shell .module-card h2, #study-shell .study-card h2 { color: var(--app-ink); font-size: 1.15rem; margin: 0 0 7px; }
#study-shell .module-card p { color: var(--app-muted); margin: 0 0 15px; }
#study-shell .module-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-weight: 750; font-size: 1.2rem; margin-bottom: 15px; }
#study-shell .vocab-icon { color: #1D4ED8; background: #EAF0FF; }
#study-shell .practice-icon { color: #225F53; background: #E8F4EF; }
#study-shell .module-action { color: #1D4ED8; font-weight: 650; margin-top: auto; }
#study-shell .practice-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; gap: 16px; }
#study-shell .practice-preview li { padding: 16px; }
#study-shell button, #study-shell input, #study-shell select { font: inherit; }
#study-shell input:not([type="checkbox"]), #study-shell select { border: 1px solid #C8D4E3; border-radius: 8px; padding: 8px 10px; background: white; color: var(--app-ink); min-height: 42px; }
#study-shell input[type="checkbox"] { accent-color: var(--app-primary); }
#study-shell .soft-button, #study-shell .primary-button, #study-shell .mask-button, #study-shell .seg-control button { min-height: 42px; cursor: pointer; border-radius: 8px; padding: 7px 13px; line-height: 1.4; }
#study-shell .soft-button { color: var(--app-ink); border: 1px solid #C8D4E3; background: white; }
#study-shell .soft-button:hover:not(:disabled) { background: #F1F5FE; }
#study-shell .primary-button { color: white; background: var(--app-primary); border: 1px solid transparent; font-weight: 650; }
#study-shell .primary-button:hover { background: #1D4ED8; }
#study-shell button:disabled { opacity: .55; cursor: default; }
#study-shell .vocab-toolbar, #study-shell .vocab-options, #study-shell .plan-form, #study-shell .day-controls, #study-shell .pager { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
#study-shell .vocab-toolbar { justify-content: space-between; }
#study-shell .vocab-options { margin: 20px 0 14px; }
#study-shell .vocab-storage { font-size: .9rem; color: var(--app-muted); margin: 10px 0 18px; }
#study-shell .seg-control { display: inline-flex; gap: 3px; background: #EBEFF6; padding: 3px; border-radius: 10px; }
#study-shell .seg-control button { border: 1px solid transparent; background: transparent; color: var(--app-muted); }
#study-shell .seg-control [aria-pressed="true"] { border-color: #D6E2FD; color: #1D4ED8; background: white; font-weight: 650; }
#study-shell .study-card { padding: 23px; }
#study-shell .word-card { min-height: 240px; }
#study-shell .word-display.compact-list { display: grid; gap: 10px; }
#study-shell .compact-list .word-card { min-height: auto; padding: 14px 18px; }
#study-shell .word-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#study-shell .word-heading h2 { margin: 0; overflow-wrap: anywhere; }
#study-shell .word-spelling { font-size: clamp(1.6rem, 4vw, 2.65rem); line-height: 1.2; }
#study-shell .compact-list .word-spelling { font-size: 1.28rem; }
#study-shell .word-meaning { margin: 13px 0; font-size: 1.07rem; }
#study-shell .word-example { margin: 14px 0 3px; }
#study-shell .mask-wrap { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#study-shell .mask-button { border: 1px dashed #A8B9D6; color: #1D4ED8; background: #F0F4FF; font-size: .925rem; }
#study-shell .pager { justify-content: center; margin: 16px 0; }
#study-shell #word-position { color: var(--app-muted); font-variant-numeric: tabular-nums; }
#study-shell .plan-form { margin: 8px 0; }
#study-shell .plan-form input { width: 90px; margin-left: 6px; }
#study-shell .day-controls { margin-top: 12px; }
#study-shell .day-controls label { display: grid; gap: 4px; }
#study-shell .round-card { margin-top: 14px; }
#study-shell .dictation-clue { font-size: 1.25rem; margin: 12px 0; }
#study-shell .answer-form { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 10px; margin: 16px 0 12px; }
#study-shell .answer-form label { flex-basis: 100%; }
#study-shell .answer-form input { width: min(320px, 100%); }
#study-shell .feedback-ok { color: #146441; font-weight: 650; }
#study-shell .feedback-error { color: #A32222; border-left: 3px solid var(--app-error); padding-left: 10px; }
#study-shell .letter-line { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0; align-items: center; }
#study-shell .letter-label { min-width: 5em; font-size: .9rem; color: var(--app-muted); }
#study-shell .letter { min-width: 1.25rem; text-align: center; border-radius: 4px; padding: 2px; font-weight: 700; font-family: ui-monospace, monospace; }
#study-shell .letter.correct { background: #E3F3E8; color: #146441; }
#study-shell .letter.incorrect { background: #FCE7E7; color: #AD2828; text-decoration: underline; }
@media (max-width: 730px) {
  #study-shell .header-inner { padding: 8px 14px; gap: 5px 12px; flex-wrap: wrap; }
  #study-shell .app-nav { order: 3; flex-basis: 100%; }
  #study-shell #main-content, #study-shell .app-footer { padding-right: 15px; padding-left: 15px; }
  #study-shell #main-content { padding-top: 26px; }
  #study-shell .app-modules { grid-template-columns: 1fr; gap: 12px; }
  #study-shell .module-card { min-height: auto; padding: 17px; }
  #study-shell .module-icon { width: 38px; height: 38px; margin-bottom: 8px; }
  #study-shell .study-card { padding: 16px; }
}

/* Stage 1: common tokens for the study hub, vocabulary, and account screens. */
body.new-shell, body.account-only {
  --app-bg: #F7F8FA;
  --app-card: #FFFFFF;
  --app-ink: #19263D;
  --app-muted: #516078;
  --app-line: #E5E7EB;
  --app-control-line: #CAD4E3;
  --app-primary: #2563EB;
  --app-link: #1D4ED8;
  --app-tint: #EDF3FF;
  --app-success: #10B981;
  --app-success-text: #065F46;
  --app-success-bg: #DDF5E9;
  --app-error: #EF4444;
  --app-error-text: #9E2323;
  --app-error-bg: #FCE7E7;
  --app-knowledge: #F59E0B;
  --app-knowledge-bg: #FFF3D8;
  --app-knowledge-text: #77500A;
  --app-shadow: 0 6px 22px #24385609;
  color-scheme: light;
}
[data-theme="dark"] :is(body.new-shell, body.account-only) {
  --app-bg: #111827;
  --app-card: #182235;
  --app-ink: #EDF2FC;
  --app-muted: #ACB9CD;
  --app-line: #344157;
  --app-control-line: #4F6079;
  --app-link: #9CBFFF;
  --app-tint: #253751;
  --app-success-text: #9FF0C8;
  --app-success-bg: #153F34;
  --app-error-text: #FFC0BA;
  --app-error-bg: #4D272C;
  --app-knowledge-bg: #463522;
  --app-knowledge-text: #FFDA8F;
  --app-shadow: 0 6px 22px #0000001C;
  color-scheme: dark;
}
#study-shell [hidden] { display: none !important; }
#study-shell a, #study-shell .module-action { color: var(--app-link); }
#study-shell .app-nav a { color: var(--app-muted); }
#study-shell .app-nav a:hover, #study-shell .app-nav [aria-current] { background: var(--app-tint); color: var(--app-link); }
#study-shell .app-header { background: var(--app-card); }
#study-shell .skip-link { background: var(--app-card); }
#study-shell :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--app-link); outline-offset: 2px; }
#study-shell .theme-button { min-height: 36px; padding-inline: 9px; white-space: nowrap; }
#study-shell .app-intro { margin-bottom: 20px; }
#study-shell .hub-progress { display: flex; gap: 8px; margin: 0 0 19px; flex-wrap: wrap; }
#study-shell .hub-progress span { padding: 5px 10px; border-radius: 999px; color: var(--app-link); background: var(--app-tint); font-size: .87rem; }
#study-shell a.module-card { color: var(--app-ink); }
#study-shell .vocab-icon { color: var(--app-link); background: var(--app-tint); }
#study-shell .practice-icon { color: var(--app-success-text); background: var(--app-success-bg); }
#study-shell .word-star { color: var(--app-knowledge-text); background: var(--app-knowledge-bg); }
#study-shell .vocab-tools, #study-shell .vocab-footer-tools, #study-shell .dialog-actions {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
}
#study-shell .vocab-tools label, #study-shell .vocab-search { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; }
#study-shell .vocab-footer-tools { margin-top: 16px; }
#study-shell .vocab-search { margin-left: auto; }
#study-shell .vocab-search input { inline-size: min(230px, 100%); }
#study-shell :is(input:not([type="checkbox"]), select, textarea, .soft-button) {
  font: inherit;
  color: var(--app-ink);
  border-color: var(--app-control-line);
  background: var(--app-card);
}
#study-shell .soft-button:hover:not(:disabled), #study-shell .seg-control { background: var(--app-tint); }
#study-shell .seg-control [aria-pressed="true"] { color: var(--app-link); background: var(--app-card); border-color: var(--app-line); }
#study-shell .letter-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; }
#study-shell .alphabet-button { background: var(--app-card); color: var(--app-ink); border: 1px solid var(--app-line); border-radius: 6px; min-height: 30px; min-width: 30px; padding: 3px 6px; cursor: pointer; }
#study-shell .alphabet-button[aria-pressed="true"] { color: var(--app-link); background: var(--app-tint); border-color: var(--app-control-line); font-weight: 700; }
#study-shell .word-display.card-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 12px; }
#study-shell .card-flow .word-card { min-height: 150px; padding: 15px; }
#study-shell .card-flow .word-spelling { font-size: 1.43rem; }
#study-shell .word-star { display: inline-block; margin-inline-start: 8px; padding: 2px 7px; border-radius: 20px; font-size: .72rem; vertical-align: middle; }
#study-shell .word-variants { font-size: .9rem; }
#study-shell .mask-button { color: var(--app-link); background: var(--app-tint); border-color: var(--app-control-line); }
#study-shell .feedback-ok { color: var(--app-success-text); }
#study-shell .feedback-error { color: var(--app-error-text); }
#study-shell .letter.correct { color: var(--app-success-text); background: var(--app-success-bg); }
#study-shell .letter.incorrect { color: var(--app-error-text); background: var(--app-error-bg); }
#study-shell .app-dialog {
  width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto;
  border: 1px solid var(--app-control-line); border-radius: 15px; padding: 20px;
  background: var(--app-card); color: var(--app-ink); box-shadow: 0 12px 40px #0003;
}
#study-shell .app-dialog::backdrop { background: #101828A8; }
#study-shell .app-dialog h2 { color: var(--app-ink); margin: 0; }
#study-shell .dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
#study-shell .app-dialog p { margin: 7px 0 13px; color: var(--app-muted); }
#study-shell .app-dialog textarea { display: block; width: 100%; margin-block: 6px 12px; padding: 10px; border-radius: 8px; resize: vertical; }
#study-shell .word-file-label { display: grid; gap: 5px; }
#study-shell .word-file-label input { max-width: 100%; }
#study-shell input[type="file"]::file-selector-button { margin-right: 10px; }
#study-shell .mistake-list { margin: 0; padding: 0; list-style: none; }
#study-shell .mistake-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--app-line); padding: 8px 0; }
#study-shell .mistake-list strong { overflow-wrap: anywhere; }

/* The legacy page is retained for account sync and historical backup only. */
body.account-only { background: var(--app-bg); color: var(--app-ink); --teal: var(--app-link); --ink: var(--app-ink); --muted: var(--app-muted); --line: var(--app-line); }
.account-only #studyApp :is(.page-heading, .stats-grid, #resume, #view-setup, #view-card, #view-test, #view-list, #view-result) { display: none !important; }
.account-only .auth-story { background: #182A47; color: #F7F8FA; }
.account-only .auth-story .logo-mark { background: #DDE9FF; color: #243B64; }
.account-only .auth-story :is(.eyebrow, .story-footer, .logo-sub, .sample-word span, .story-content > p, .sample-word p) { color: #C4D3EF; }
.account-only .sample-word { border-color: #A3BDF5; }
.account-only .auth-panel { background: var(--app-bg); }
.account-only :is(.auth-panel input, .account-card, #recoveryDialog, .auth-panel .guest-button, #studyApp .ghost, #studyApp .import-label) {
  background: var(--app-card); color: var(--app-ink); border-color: var(--app-control-line);
}
.account-only .auth-panel .big, .account-only #downloadRecovery { background: var(--app-primary); color: #FFF; }
.account-only .auth-panel :is(.auth-footnote, input::placeholder), .account-only .account-card :is(#syncStatus, .hint) { color: var(--app-muted); }
@media (max-width: 730px) {
  #study-shell .header-inner { gap: 5px 8px; }
  #study-shell .app-nav a { padding: 8px 10px; }
  #study-shell .vocab-search { margin-left: 0; }
  #study-shell .app-account { font-size: .8rem; }
  #study-shell .vocab-tools { width: 100%; }
}
@media (max-width: 390px) {
  #study-shell .mistake-list li { grid-template-columns: 1fr auto; }
  #study-shell .mistake-list li span { grid-column: 1; grid-row: 2; }
}
@media print {
  #study-shell :is(.app-header, .app-footer, .skip-link, .pager, .vocab-tools, .vocab-footer-tools, button) { display: none !important; }
  body.new-shell { background: white; color: #111; }
  #study-shell #main-content { width: 100%; padding: 0; }
  #study-shell .study-card { break-inside: avoid; box-shadow: none; background: white; border-color: #ccc; color: #111; }
  #study-shell :is(h1, h2, p, .muted) { color: #111 !important; }
}

/* Stage 2 — English practice. */
#study-shell .practice-toolbar { margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 14px; background: var(--app-card); }
#study-shell .practice-capsules, #study-shell .practice-tools, #study-shell .practice-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
#study-shell .practice-capsule { padding: 8px 13px; border: 1px solid var(--app-control-line); border-radius: 999px; color: var(--app-muted); background: var(--app-card); cursor: pointer; }
#study-shell .practice-capsule[aria-pressed="true"] { color: var(--app-link); background: var(--app-tint); border-color: var(--app-link); font-weight: 700; }
#study-shell .practice-tools { margin-top: 10px; }
#study-shell .practice-filter { font-weight: 600; cursor: pointer; }
#study-shell .practice-stats, #study-shell .practice-storage { margin: 9px 0 0; font-size: .9rem; }
#study-shell .practice-storage { color: var(--app-error-text); }
#study-shell .practice-intro { margin: 0 0 13px; }
#study-shell .practice-body :is(h2,h3,h4) { color: var(--app-ink); line-height: 1.4; }
#study-shell .practice-intro h2 { font-size: 1.35rem; margin-bottom: 5px; }
#study-shell .practice-controls { margin: 0 0 13px; }
#study-shell .practice-field { display: inline-flex; gap: 7px; align-items: center; margin-bottom: 6px; }
#study-shell .practice-field select { max-width: min(100%, 19rem); }
#study-shell .practice-empty { color: var(--app-muted); }
#study-shell .exercise-stack { display: grid; min-width: 0; gap: 12px; }
#study-shell .practice-exercise { min-width: 0; margin: 0; padding: 17px; }
#study-shell .practice-exercise :is(h3,h4), #study-shell .practice-article h3 { margin: 0 0 9px; font-size: 1.08rem; overflow-wrap: break-word; }
#study-shell .exercise-meta { margin: 0 0 6px; color: var(--app-link); font-size: .84rem; font-weight: 650; }
#study-shell .practice-source { margin: 0 0 9px; font-size: .85rem; }
#study-shell .practice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#study-shell .practice-option { display: flex; text-align: start; align-items: center; gap: 8px; min-height: 42px; min-width: 0; padding: 7px 9px; border: 1px solid var(--app-control-line); border-radius: 8px; color: var(--app-ink); background: var(--app-card); cursor: pointer; overflow-wrap: anywhere; }
#study-shell button.practice-option:not(:disabled):hover { background: var(--app-tint); }
#study-shell button.practice-option:disabled { opacity: 1; }
#study-shell .choice-letter { display: grid; place-items: center; flex: 0 0 1.45rem; min-height: 1.45rem; border-radius: 4px; font-weight: 700; background: var(--app-tint); color: var(--app-link); }
#study-shell .practice-option.option-correct { border-color: var(--app-success); background: var(--app-success-bg); color: var(--app-success-text); }
#study-shell .practice-option.option-wrong { border-color: var(--app-error); background: var(--app-error-bg); color: var(--app-error-text); }
#study-shell .practice-feedback:not(:empty) { margin: 10px 0; }
#study-shell .practice-feedback p { margin: 5px 0; }
#study-shell .practice-good { color: var(--app-success-text); font-weight: 650; }
#study-shell .practice-wrong { color: var(--app-error-text); font-weight: 650; }
#study-shell .knowledge-reveal { display: grid; grid-template-rows: 1fr; animation: knowledge-in .26s ease-out both; }
#study-shell .knowledge-inner { overflow: hidden; min-height: 0; }
#study-shell .practice-knowledge { margin: 5px 0; padding: 13px; border: 1px solid var(--app-knowledge); border-left-width: 4px; border-radius: 8px; background: var(--app-knowledge-bg); color: var(--app-ink); }
#study-shell .practice-knowledge h3 { color: var(--app-knowledge-text); }
#study-shell .knowledge-detail + .knowledge-detail { margin-top: 10px; }
#study-shell .practice-knowledge h4 { margin: 0 0 2px; font-size: .94rem; }
#study-shell .practice-knowledge ul { margin: 5px 0 0; padding-inline-start: 1.25rem; }
@keyframes knowledge-in { from { grid-template-rows: 0fr; opacity: 0; } to { grid-template-rows: 1fr; opacity: 1; } }

#study-shell .split-tabs { display: none; }
#study-shell .practice-split { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: 12px; }
#study-shell .practice-pane { min-width: 0; min-height: 0; height: clamp(445px, 66svh, 820px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 15px; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-card); }
#study-shell .practice-pane > h3 { margin: 0 0 10px; }
#study-shell .practice-pane .practice-options { grid-template-columns: 1fr; }
#study-shell .practice-english, #study-shell .translation-prompt { font-size: 1.06rem; line-height: 1.85; overflow-wrap: break-word; }
#study-shell .cloze-blank { margin-inline: 2px; padding: 2px 6px; border: 1px solid var(--app-knowledge); border-radius: 6px; background: var(--app-knowledge-bg); color: var(--app-knowledge-text); cursor: pointer; }
#study-shell .cloze-blank.blank-active { outline: 2px solid var(--app-link); outline-offset: 1px; }
#study-shell .cloze-question legend { padding: 1px 5px; font-weight: 700; }
#study-shell .cloze-question.cloze-active { border-color: var(--app-link); }

#study-shell .reading-modes { flex-wrap: wrap; margin: 7px 0 8px; }
#study-shell .reading-modes button { padding-inline: 8px; }
#study-shell .reading-paragraph { margin: 0 0 13px; line-height: 1.9; font-size: 1.06rem; overflow-wrap: break-word; }
#study-shell .reading-paragraph-label { margin: 0 0 3px; color: var(--app-muted); font-size: .8rem; }
#study-shell .reading-sentence { border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#study-shell .reading-sentence:focus { outline: 1px dashed var(--app-knowledge); outline-offset: 2px; }
#study-shell .word-token { border-radius: 3px; cursor: pointer; }
#study-shell .word-token:is(:hover, :focus, [aria-expanded="true"]) { color: var(--app-link); background: var(--app-tint); outline-offset: 1px; }
#study-shell .sentence-translate { font-size: .68rem; line-height: 1.4; margin-inline: 4px 2px; padding: 1px 4px; border: 1px solid var(--app-control-line); border-radius: 5px; color: var(--app-link); background: var(--app-tint); cursor: pointer; vertical-align: super; }
#study-shell .reading-zh, #study-shell .reading-zh-paragraph { display: none; }
#study-shell .reading-sentence.translation-open .reading-zh { display: block; margin: 4px 0; padding: 4px 8px; border-inline-start: 2px solid var(--app-link); color: var(--app-ink); background: var(--app-tint); }
#study-shell .reading-body[data-translation="parallel"] .reading-zh-paragraph { display: block; color: var(--app-ink); background: var(--app-tint); padding: 8px 10px; border-radius: 7px; }
#study-shell .reading-body[data-translation="zh"] :is(.reading-en,.sentence-translate) { display: none; }
#study-shell .reading-body[data-translation="zh"] .reading-zh { display: inline; margin: 0; padding: 0; background: none; border: 0; }
#study-shell .sentence-target { animation: sentence-pulse .65s ease-in-out alternate infinite; background: var(--app-knowledge-bg); }
@keyframes sentence-pulse { from { background: var(--app-knowledge-bg); } to { background: #F59E0B80; } }
#study-shell .word-bubble { position: fixed; z-index: 15; max-width: min(300px, calc(100vw - 16px)); min-width: min(190px, calc(100vw - 16px)); padding: 10px 12px; border: 1px solid var(--app-control-line); border-radius: 10px; background: var(--app-card); box-shadow: 0 6px 24px #0003; color: var(--app-ink); }
#study-shell .word-bubble p { margin: 4px 0; overflow-wrap: anywhere; }
#study-shell .word-bubble .soft-button, #study-shell .word-bubble-close { min-height: 32px; padding: 4px 9px; font-size: .83rem; }
#study-shell .word-bubble-close { color: var(--app-link); border: 0; background: transparent; cursor: pointer; }
#study-shell .word-audio-status:empty { display: none; }
#study-shell .practice-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#study-shell .practice-draft { display: grid; gap: 6px; margin-block: 9px; }
#study-shell .practice-draft textarea { display: block; width: 100%; padding: 9px 11px; resize: vertical; border-radius: 8px; }
#study-shell .reference-panel summary, #study-shell .writing-draft summary { color: var(--app-link); font-weight: 650; cursor: pointer; }
#study-shell .reference-panel :is(p, ul) { margin: 8px 0; line-height: 1.7; }
#study-shell .reference-panel ul, #study-shell .writing-outline { padding-inline-start: 1.4rem; }
#study-shell .score-mark, #study-shell .writing-paragraph mark { color: var(--app-knowledge-text); background: var(--app-knowledge-bg); border-radius: 3px; }
#study-shell .writing-model { margin: 12px 0; display: grid; gap: 11px; }
#study-shell .writing-row { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 11px; align-items: start; }
#study-shell .writing-paragraph, #study-shell .writing-prompt, #study-shell .writing-draft { padding: 16px; }
#study-shell .writing-paragraph mark { cursor: pointer; border-bottom: 1px solid var(--app-knowledge); }
#study-shell .writing-paragraph mark.note-active { color: var(--app-ink); background: #F59E0B70; outline: 1px solid var(--app-knowledge); }
#study-shell .writing-notes { display: grid; gap: 7px; }
#study-shell .writing-note { display: grid; text-align: start; gap: 3px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-card); color: var(--app-ink); padding: 9px 10px; cursor: pointer; overflow-wrap: anywhere; }
#study-shell .writing-note.note-active { border-color: var(--app-knowledge); background: var(--app-knowledge-bg); }
#study-shell .writing-note-type { color: var(--app-knowledge-text); font-size: .82rem; }
#study-shell .writing-draft { margin-top: 13px; }
#study-shell .writing-count { display: block; }

@media (max-width: 760px) {
  #study-shell .split-tabs { display: inline-flex; flex-wrap: wrap; margin-bottom: 8px; }
  #study-shell .practice-split, #study-shell .writing-row { grid-template-columns: minmax(0, 1fr); }
  #study-shell .practice-pane { height: auto; min-height: 0; overflow: visible; scrollbar-gutter: auto; }
  #study-shell .practice-split[data-pane="article"] > :nth-child(2), #study-shell .practice-split[data-pane="questions"] > :first-child { display: none; }
  #study-shell .practice-toolbar, #study-shell .practice-pane { padding: 10px; }
}
@media (max-width: 420px) { #study-shell .practice-options { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  #study-shell :is(.knowledge-reveal,.sentence-target) { animation: none; }
  #study-shell .sentence-target { outline: 2px solid var(--app-knowledge); }
}

/* Stage 3 — math and personal error-book printing. */
#study-shell .math-heading { display: flex; flex-wrap: wrap; gap: 5px 18px; align-items: start; justify-content: space-between; }
#study-shell .math-heading .practice-intro { flex: 1 1 270px; }
#study-shell .math-open-formulas { position: fixed; z-index: 4; top: 71px; right: max(15px, calc((100vw - 1080px)/2)); box-shadow: 0 4px 14px #142c5a30; }
#study-shell .math-heading { padding-right: 105px; }
#study-shell .math-card { padding: 18px; min-width: 0; }
#study-shell .math-card h3 { margin: 0 0 8px; font-size: 1.18rem; }
#study-shell .math-stem { margin: 6px 0 10px; line-height: 1.85; }
#study-shell .math-vendor-message { margin-bottom: 9px; }
#study-shell .math-card .practice-option { align-items: start; }
#study-shell .math-card .practice-option > span:last-child { min-width: 0; }
#study-shell .math-analysis { margin-top: 14px; }
#study-shell .math-analysis > summary { display: list-item; cursor: pointer; border: 1px solid var(--app-control-line); border-radius: 8px; padding: 9px 12px; color: var(--app-link); font-weight: 700; }
#study-shell .math-analysis[open] > summary { background: var(--app-tint); }
#study-shell .math-layers { display: grid; gap: 10px; margin-top: 10px; }
#study-shell .math-layer { min-width: 0; padding: 13px 14px; border: 1px solid var(--app-line); border-radius: 9px; }
#study-shell .math-layer h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 1rem; }
#study-shell .math-layer-number { display: inline-block; font: 700 .76rem/1.5 system-ui; padding: 2px 6px; border-radius: 5px; background: var(--app-tint); color: var(--app-link); }
#study-shell .math-layer p, #study-shell .math-steps li { line-height: 1.76; }
#study-shell .math-steps, #study-shell .math-legend { padding-inline-start: 1.4rem; }
#study-shell .math-steps li + li { margin-top: 7px; }
#study-shell .math-final { padding-top: 6px; margin-top: 8px; border-top: 1px solid var(--app-line); font-weight: 650; }
#study-shell .math-caution { background: var(--app-knowledge-bg); border-color: var(--app-knowledge); border-left: 4px solid var(--app-error); }
#study-shell .math-caution .math-layer-number { color: var(--app-error-text); background: var(--app-error-bg); }
#study-shell .math-tex, #study-shell .math-layer .katex-display, #study-shell .formula-results .katex-display { max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
#study-shell .math-layer .katex-display { margin-block: .45em; }
#study-shell .math-layer .katex-display > .katex, #study-shell .formula-card .katex-display > .katex { text-align: start; }
#study-shell .math-assessment [aria-pressed="true"] { background: var(--app-tint); border-color: var(--app-link); color: var(--app-link); }
#study-shell .math-figure { margin: 0; min-width: 0; }
#study-shell .math-plot-tools, #study-shell .math-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 8px; }
#study-shell .math-plot-tools .soft-button { min-height: 35px; padding: 5px 8px; }
#study-shell .math-board { width: 100%; min-height: 218px; overflow: hidden; border-radius: 8px; color: #334155; background: #F8FAFC; }
#study-shell .math-board > svg, #study-shell .math-geometry > svg { display: block; width: 100%; height: auto; }
#study-shell .math-board .axis text { fill: #334155; }
#study-shell .math-board .tick line { stroke: #B8C8DA; stroke-opacity: .68; }
#study-shell .math-board .math-points { pointer-events: none; }
#study-shell .math-board .math-points circle { fill: #17285D; stroke: #FFF; stroke-width: 1.4; }
#study-shell .math-board .math-points text { fill: #0F2251; stroke: #F8FAFC; stroke-width: 3; paint-order: stroke; font: 650 12px system-ui; }
#study-shell .math-board-status:empty { display: none; }
#study-shell .math-figure figcaption, #study-shell .math-legend { margin-top: 7px; font-size: .88rem; }
#study-shell .math-legend { padding: 0; list-style: none; color: var(--app-muted); }
#study-shell .math-legend li:not(:first-child)::before { content: '·'; margin-right: 6px; }

#study-shell .formula-drawer { position: fixed; width: min(560px, 100vw); max-width: 100vw; height: 100svh; max-height: 100svh; inset: 0 0 0 auto; padding: 0; margin: 0; border: 0; border-left: 1px solid var(--app-control-line); background: var(--app-card); color: var(--app-ink); overscroll-behavior: contain; }
#study-shell .formula-drawer[open] { animation: formula-slide .22s ease-out both; }
#study-shell .formula-drawer::backdrop { background: #10182780; }
@keyframes formula-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
#study-shell .formula-pane { min-height: 100%; padding: 0 16px 18px; }
#study-shell .formula-header { position: sticky; top: 0; z-index: 1; padding: 13px 0 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--app-line); background: var(--app-card); }
#study-shell .formula-header h3 { margin: 0; font-size: 1.2rem; color: var(--app-ink); }
#study-shell .formula-search { display: grid; align-items: center; grid-template-columns: auto 1fr; margin: 10px 0; }
#study-shell .formula-search input { min-width: 0; width: 100%; }
#study-shell .formula-tabs { gap: 5px; }
#study-shell .formula-tabs .practice-capsule { font-size: .85rem; }
#study-shell .formula-status { margin: 9px 0; }
#study-shell .formula-group > h4 { margin: 15px 0 6px; color: var(--app-link); }
#study-shell .formula-card { min-width: 0; padding: 9px 11px; margin: 6px 0; border: 1px solid var(--app-line); border-radius: 8px; }
#study-shell .formula-card h5 { margin: 0 0 3px; font-size: .94rem; }
#study-shell .formula-card .katex-display { margin: .35em 0; }
#study-shell .formula-card p { font-size: .86rem; }

.mistake-print { display: none; }

@media (max-width: 930px) {
}
@media (max-width: 730px) {
  #study-shell .math-open-formulas { top: 99px; }
}
@media (max-width: 600px) {
  #study-shell .math-card { padding: 12px; }
  #study-shell .math-layer { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #study-shell .formula-drawer[open] { animation: none; }
}

@page mistake-book { size: A4; margin: 15mm 16mm; }
@media print {
  body.printing-mistakes { display: block !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; color-scheme: light; background: #FFF !important; }
  body.printing-mistakes > :not(.mistake-print) { display: none !important; }
  body.printing-mistakes > .mistake-print { display: block !important; page: mistake-book; width: auto; margin: 0; padding: 0; color: #000 !important; background: #FFF !important; font: 10.5pt/1.55 "Microsoft YaHei", system-ui, sans-serif; }
  .mistake-print :is(h1,h2,h3,p,li,.katex) { color: #000 !important; background: #FFF !important; overflow-wrap: anywhere; text-align: left; }
  .mistake-print h1 { margin: 0 0 6pt; font-size: 19pt; }
  .mistake-print h2 { margin: 14pt 0 5pt; padding: 2pt 0; font-size: 13pt; border-bottom: 1pt solid #222; break-after: avoid; }
  .mistake-print h3 { margin: 0; font-size: 11pt; break-after: avoid; }
  .mistake-print p { margin: 3pt 0; white-space: pre-wrap; }
  .mistake-print .print-items { margin: 4pt 0 0; padding-left: 16pt; }
  .mistake-print li + li { margin-top: 7pt; }
  .mistake-print button, .mistake-print dialog { display: none !important; }
}
/* Study workspace: shared palette, dashboard and exercise navigation. */
body.new-shell, body.account-only {
  --app-bg:#f5f6fa; --app-card:#fffefa; --app-ink:#222641; --app-muted:#5e657b;
  --app-line:#e2e5ef; --app-control-line:#ced3e3; --app-primary:#414a9e; --app-link:#3c458f;
  --app-tint:#eeeffb; --app-shadow:0 2px 3px #20284a05, 0 12px 34px #20284a07;
  font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif;
}
[data-theme="dark"] :is(body.new-shell,body.account-only) {
  --app-bg:#111525; --app-card:#1a2033; --app-ink:#f0f1fa; --app-muted:#b1b8cf;
  --app-line:#303a57; --app-control-line:#495477; --app-primary:#4655a9; --app-link:#bac5ff;
  --app-tint:#262f54; --app-shadow:0 12px 26px #080a1628;
}
#study-shell :is(.header-inner,#main-content,.app-footer) { width:min(100%,1190px); max-width:none; }
#study-shell .app-header { box-shadow:0 1px 0 #20284a03; }
#study-shell .header-inner { min-height:70px; gap:clamp(18px,4vw,52px); padding-block:9px; }
#study-shell .app-brand { gap:10px; line-height:1.16; letter-spacing:.015em; }
#study-shell .app-brand .brand-symbol { width:38px; height:38px; border-radius:11px; background:#303773; color:#fff; }
#study-shell .brand-symbol svg, #study-shell .theme-button svg { width:19px; height:19px; }
#study-shell .app-brand .brand-name { display:block; background:none; color:inherit; width:auto; height:auto; }
#study-shell .brand-name small { display:block; color:var(--app-muted); font-size:.63rem; font-weight:650; margin-top:3px; }
#study-shell .app-nav { align-items:center; gap:5px; }
#study-shell .app-nav a { padding:8px 14px; font-weight:650; border-radius:9px; }
#study-shell .app-nav a:hover, #study-shell .app-nav a[aria-current] { background:var(--app-tint); color:var(--app-link); }
#study-shell .app-account { flex-wrap:nowrap; gap:10px; }
#study-shell #session-label { max-width:12ch; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#study-shell #session-label:empty { display:none; }
#study-shell #session-link { display:inline-flex; align-items:center; min-height:40px; padding:0 13px; border:1px solid var(--app-line); border-radius:9px; text-decoration:none; color:var(--app-link); font-weight:700; white-space:nowrap; }
#study-shell #session-link:hover { background:var(--app-tint); }
#study-shell #theme-toggle { display:grid; place-items:center; width:40px; min-height:40px; padding:0; border-color:transparent; background:transparent; color:var(--app-muted); }
#study-shell #theme-toggle:hover { background:var(--app-tint); color:var(--app-link); }
#study-shell #main-content { padding-top:34px; }
#study-shell .app-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--app-muted); font-size:.81rem; padding-top:15px; }
#study-shell .app-footer a { color:var(--app-muted); text-underline-offset:4px; }
#study-shell .dashboard-top { display:grid; grid-template-columns:minmax(0,2.15fr) minmax(260px,1fr); gap:18px; }
#study-shell .dashboard-hero { position:relative; display:flex; align-items:center; isolation:isolate; min-height:318px; overflow:hidden; padding:38px clamp(23px,4.25vw,57px); border-radius:22px; background:linear-gradient(130deg,#23294d 6%,#323b76 72%,#424b88); color:#fff; }
#study-shell .hero-art { position:absolute; width:min(62%,430px); height:100%; top:0; right:-22px; object-fit:cover; z-index:-1; opacity:.75; }
#study-shell .dashboard-copy { max-width:520px; }
#study-shell .dash-eyebrow { font-size:.69rem; line-height:1.4; font-weight:760; letter-spacing:.16em; color:var(--app-link); margin:0 0 8px; }
#study-shell .dashboard-copy .dash-eyebrow { color:#d0d6ff; display:flex; align-items:center; gap:9px; margin-bottom:16px; }
#study-shell .dashboard-copy .dash-eyebrow span { width:18px; height:1px; background:#e8bba8; }
#study-shell .dashboard-hero h1 { color:#fff; text-align:left; font-size:clamp(1.85rem,4vw,3.3rem); font-weight:760; letter-spacing:-.055em; line-height:1.17; margin:0; }
#study-shell .dashboard-copy > p:not(.dash-eyebrow) { max-width:31ch; margin:14px 0 26px; color:#e1e5f8; font-size:.98rem; line-height:1.75; }
#study-shell a.hero-cta { display:inline-flex; align-items:center; gap:22px; min-height:45px; padding:7px 15px; border-radius:9px; background:#f5f2ef; color:#2c335e; text-decoration:none; font-weight:740; font-size:.9rem; }
#study-shell a.hero-cta:hover { background:#fff; }
#study-shell .hero-cta span { font-size:1rem; }
#study-shell .dashboard-progress { border:1px solid var(--app-line); border-radius:22px; background:var(--app-card); box-shadow:var(--app-shadow); padding:27px clamp(17px,2.4vw,29px); display:flex; flex-direction:column; }
#study-shell .dashboard-progress-head,#study-shell .dashboard-progress dl > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#study-shell .dashboard-progress h2,#study-shell .dashboard-section-head h2 { color:var(--app-ink); font-size:1.32rem; margin:0; line-height:1.25; }
#study-shell .local-label { white-space:nowrap; border-radius:999px; border:1px solid var(--app-line); color:var(--app-muted); padding:4px 8px; font-size:.7rem; }
#study-shell .dashboard-progress dl { margin:17px 0 15px; }
#study-shell .dashboard-progress dl > div { border-bottom:1px solid var(--app-line); padding:11px 0; min-height:55px; }
#study-shell .dashboard-progress dt { font-size:.87rem; color:var(--app-muted); }
#study-shell .dashboard-progress dd { margin:0; font-size:1.07rem; font-weight:730; font-variant-numeric:tabular-nums; }
#study-shell .dashboard-progress dd small { color:var(--app-muted); font-weight:500; }
#study-shell .review-shortcut { display:flex; align-items:center; justify-content:space-between; min-height:39px; margin-top:auto; text-decoration:none; color:var(--app-link); font-weight:720; font-size:.9rem; }
#study-shell .review-shortcut:hover { text-decoration:underline; text-underline-offset:5px; }
#study-shell .dashboard-modules { margin-top:32px; }
#study-shell .dashboard-section-head { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:15px; }
#study-shell .dashboard-section-head > p { color:var(--app-muted); margin:0; font-size:.8rem; }
#study-shell .app-modules { gap:16px; }
#study-shell .module-card { min-height:197px; padding:19px; border-radius:17px; transition:border-color .16s,box-shadow .16s; }
#study-shell .module-card:hover { border-color:var(--app-link); box-shadow:var(--app-shadow); }
#study-shell .module-card-top { display:flex; justify-content:space-between; align-items:start; width:100%; gap:8px; }
#study-shell .module-icon { margin:0 0 14px; width:42px; height:42px; border-radius:11px; font-size:1.2rem; }
#study-shell .module-icon svg { width:21px; height:21px; }
#study-shell .vocab-icon { background:#f0ecfa; color:#573a89; }
#study-shell .practice-icon { background:#e8f4ef; color:#246355; }
#study-shell .math-icon { background:#faeee5; color:#8a4824; font-family:Georgia,serif; font-size:1.63rem; }
#study-shell .module-number { color:var(--app-muted); font-size:.66rem; font-weight:690; letter-spacing:.11em; }
#study-shell .module-card h3 { color:var(--app-ink); font-size:1.09rem; margin:0 0 4px; }
#study-shell .module-card p { font-size:.85rem; line-height:1.65; margin-bottom:13px; }
#study-shell .module-action { font-size:.86rem; display:flex; justify-content:space-between; width:100%; color:var(--app-link); }
#study-shell .study-card { border-radius:15px; }
#study-shell .exercise-heading { display:flex; align-items:end; justify-content:space-between; gap:13px; padding-bottom:17px; border-bottom:1px solid var(--app-line); }
#study-shell .app-intro .dash-eyebrow { color:var(--app-link); margin:0 0 6px; }
#study-shell .exercise-actions { display:flex; flex-wrap:wrap; gap:7px; padding-bottom:5px; }
#study-shell .exercise-actions button { font-size:.85rem; }
#study-shell .practice-layout { display:grid; grid-template-columns:176px minmax(0,1fr); align-items:start; gap:22px; }
#study-shell .practice-sidebar { position:sticky; top:85px; display:grid; gap:3px; min-width:0; padding:12px 8px; background:var(--app-card); border:1px solid var(--app-line); border-radius:14px; box-shadow:var(--app-shadow); }
#study-shell .practice-sidebar .dash-eyebrow { padding:5px 8px 2px; margin:0; }
#study-shell .practice-sidebar .math-topic-label { margin-top:8px; border-top:1px solid var(--app-line); padding-top:11px; }
#study-shell .practice-topic { display:flex; align-items:center; gap:7px; min-width:0; min-height:42px; border:1px solid transparent; border-radius:9px; cursor:pointer; padding:5px 8px; font-size:.88rem; white-space:nowrap; color:var(--app-ink); text-align:left; background:transparent; }
#study-shell .practice-topic:hover,#study-shell .practice-topic[aria-pressed="true"] { background:var(--app-tint); color:var(--app-link); }
#study-shell .practice-topic[aria-pressed="true"] { font-weight:750; }
#study-shell .topic-index { font-size:.68rem; color:var(--app-muted); font-variant-numeric:tabular-nums; }
#study-shell .topic-count { margin-left:auto; border-radius:999px; padding:0 5px; color:var(--app-knowledge-text); background:var(--app-knowledge-bg); font-size:.72rem; }
#study-shell .exercise-main { min-width:0; }
#study-shell .exercise-toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:4px 12px; padding:8px 13px; margin-bottom:18px; background:var(--app-card); border:1px solid var(--app-line); border-radius:12px; }
#study-shell .exercise-toolbar .practice-stats,#study-shell .exercise-toolbar .practice-filter { font-size:.85rem; }
#study-shell .exercise-toolbar .practice-filter { display:flex; align-items:center; gap:4px; min-height:34px; }
#study-shell .route-loading { padding:19px 0; }
#study-shell .route-loading h1 { margin:0; color:var(--app-ink); text-align:left; }
#study-shell .vocab-toolbar { padding:10px; background:var(--app-card); border:1px solid var(--app-line); border-radius:13px; }
#study-shell .vocab-tools { padding-inline:4px; }
.account-only .auth-story { background:linear-gradient(140deg,#23294d,#38447e); }
.account-only .auth-story .logo-mark { background:#e7e9ff; color:#2e3667; }
.account-only .auth-story .sample-word { border-color:#d0ae9c; }
.account-only .auth-panel input,.account-only .auth-panel .big { border-radius:11px; }
@media(max-width:1000px) {
  #study-shell .practice-layout { grid-template-columns:minmax(0,1fr); gap:13px; }
  #study-shell .practice-sidebar { position:static; display:flex; flex-wrap:wrap; padding:6px; }
  #study-shell .practice-sidebar .dash-eyebrow,#study-shell .topic-index { display:none; }
}
@media(max-width:730px) {
  #study-shell .header-inner { min-height:0; gap:5px 8px; padding:9px 13px 6px; }
  #study-shell .app-nav { justify-content:space-between; }
  #study-shell .app-nav a { flex:1; text-align:center; padding:6px; }
  #study-shell #session-label { display:none; }
  #study-shell #main-content { padding-top:16px; }
  #study-shell .dashboard-top { grid-template-columns:minmax(0,1fr); gap:12px; }
  #study-shell .dashboard-hero { min-height:0; padding:23px 19px; border-radius:16px; }
  #study-shell .hero-art { opacity:.46; }
  #study-shell .dashboard-copy > p:not(.dash-eyebrow) { margin-bottom:16px; }
  #study-shell .dashboard-progress { padding:14px; border-radius:16px; }
  #study-shell .dashboard-progress dl { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:7px 0; }
  #study-shell .dashboard-progress dl > div { display:block; min-height:0; padding:3px 0 7px; }
  #study-shell .dashboard-progress dd { margin-top:2px; }
  #study-shell .dashboard-modules { margin-top:22px; }
  #study-shell .dashboard-section-head > p { display:none; }
  #study-shell .app-modules { grid-template-columns:minmax(0,1fr); gap:9px; }
  #study-shell .module-card { min-height:0; padding:13px 14px; }
  #study-shell .module-icon { width:35px; height:35px; margin-bottom:7px; }
  #study-shell .module-card p { margin-bottom:7px; }
  #study-shell .exercise-heading { align-items:start; flex-direction:column; gap:5px; }
  #study-shell .exercise-actions { padding-bottom:0; }
  #study-shell .practice-sidebar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  #study-shell .practice-topic { justify-content:center; font-size:.83rem; padding-inline:2px; gap:3px; }
  #study-shell .topic-count { margin-left:0; }
}
@media(prefers-reduced-motion:reduce) { #study-shell .module-card { transition:none; } }

@media (max-width: 730px) {
  body.new-shell { --app-shadow: 0 2px 6px #20284a10; }
  #study-shell .module-card { transition: none; }
}
/* Mobile-first workspace palette and daily vocabulary practice. */
body.new-shell, body.account-only {
  --app-bg:#f5f7f2; --app-card:#fff; --app-ink:#202e28; --app-muted:#56665d;
  --app-line:#dfe7df; --app-control-line:#c5d1c7; --app-primary:#236349; --app-link:#205f46;
  --app-tint:#e4f0e7; --app-shadow:0 3px 15px #20382a0b;
}
[data-theme="dark"] :is(body.new-shell,body.account-only) {
  --app-bg:#101b17; --app-card:#182822; --app-ink:#edf6f0; --app-muted:#b3c5ba;
  --app-line:#354a40; --app-control-line:#496154; --app-primary:#286449; --app-link:#a1dbb6;
  --app-tint:#263e32; --app-shadow:0 4px 14px #030b0726;
}
#study-shell :is(a,button,input,select,textarea):focus-visible { outline-color:var(--app-link); }
#study-shell .app-brand .brand-symbol { background:#205540; }
#study-shell .app-nav a { display:flex; justify-content:center; align-items:center; gap:6px; }
#study-shell .app-nav svg { width:18px; height:18px; flex:none; }
#study-shell .workspace-heading { margin-bottom:22px; }
#study-shell .workspace-heading h1 { margin:0; font-size:clamp(1.85rem,3.6vw,2.72rem); font-weight:760; letter-spacing:-.035em; line-height:1.22; text-align:left; color:var(--app-ink); }
#study-shell .workspace-heading > p:last-child { margin:6px 0 0; color:var(--app-muted); font-size:.9rem; }
#study-shell .dash-eyebrow { letter-spacing:.12em; }
#study-shell .dashboard-hero { min-height:246px; padding-block:30px; border-radius:20px; background:#174434; }
#study-shell .dashboard-hero h2 { color:#f5fbf7; font-size:clamp(1.9rem,3.15vw,2.9rem); font-weight:740; letter-spacing:-.035em; line-height:1.2; margin:0; }
#study-shell .dashboard-copy .dash-eyebrow { color:#d2ead8; margin-bottom:9px; }
#study-shell .dashboard-copy > p:not(.dash-eyebrow) { color:#e2f0e5; margin:10px 0 19px; max-width:28em; }
#study-shell .hero-art { width:min(65%,440px); right:-25px; opacity:.63; }
#study-shell a.hero-cta { background:#e1efda; color:#193e2d; }
#study-shell a.hero-cta:hover { background:#f3faf0; }
#study-shell .dashboard-progress { border-radius:20px; padding-block:18px; }
#study-shell .dashboard-progress dl { margin:9px 0; }
#study-shell .dashboard-progress dl > div { min-height:46px; }
#study-shell .dashboard-modules { margin-top:26px; }
#study-shell .module-card { min-height:174px; padding:16px; }
#study-shell .module-icon { width:43px; height:43px; margin-bottom:8px; }
#study-shell .module-number { letter-spacing:.03em; }
#study-shell .vocab-icon { color:#265941; background:#e1efe3; }
#study-shell .practice-icon { color:#325473; background:#e7eff7; }
#study-shell .math-icon { color:#6f5321; background:#f7edd4; }
#study-shell .primary-button:hover { background:#174b36; }
#study-shell .exercise-toolbar { border-radius:13px; }
#study-shell .dictation-mode-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px 15px; padding:12px 15px; margin-bottom:12px; border-radius:12px; border:1px solid var(--app-line); background:var(--app-tint); }
#study-shell .dictation-mode-bar p { margin:1px 0 0; font-size:.85rem; color:var(--app-muted); }
#study-shell .speech-switch { position:relative; display:inline-flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; font-weight:680; font-size:.84rem; }
#study-shell .speech-switch input { position:absolute; width:1px; height:1px; opacity:0; }
#study-shell .speech-track { display:inline-flex; align-items:center; height:24px; width:42px; padding:3px; border-radius:20px; background:#65756c; }
#study-shell .speech-track::before { content:''; width:18px; height:18px; border-radius:50%; background:#fff; }
#study-shell .speech-switch input:checked + .speech-track { justify-content:flex-end; background:var(--app-primary); }
#study-shell .speech-switch input:focus-visible + .speech-track { outline:2px solid var(--app-link); outline-offset:3px; }
#study-shell .dictation-prompt { display:flex; align-items:center; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; padding:16px; margin-block:10px; border-radius:13px; background:var(--app-tint); }
#study-shell .dictation-prompt strong { font-size:clamp(1.7rem,6vw,2.45rem); line-height:1.23; overflow-wrap:anywhere; }
#study-shell .dictation-feedback { border-top:1px solid var(--app-line); margin:8px 0 12px; padding-top:8px; }
#study-shell .dictation-feedback p { margin:5px 0; }
#study-shell .dictation-review-actions { display:flex; flex-wrap:wrap; gap:8px; }
#study-shell #dictation-answer { scroll-margin:32px; }
.account-only .auth-story { background:#174434; }
.account-only .auth-story .logo-mark { background:#e1efda; color:#205540; }
.account-only .auth-story :is(.eyebrow,.story-footer,.logo-sub,.sample-word) { color:#d3e7d8; }
@media(max-width:730px) {
  #study-shell { padding-bottom:calc(65px + env(safe-area-inset-bottom, 0px)); }
  #study-shell .app-header { position:static; }
  #study-shell .header-inner { min-height:59px; }
  #study-shell .app-nav { position:fixed; inset:auto 0 0; z-index:5; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; padding:5px 10px calc(5px + env(safe-area-inset-bottom, 0px)); background:var(--app-card); border-top:1px solid var(--app-line); }
  #study-shell .app-nav a { flex-direction:column; gap:2px; min-height:48px; font-size:.76rem; line-height:1.25; }
  #study-shell .workspace-heading { margin-bottom:14px; }
  #study-shell .workspace-heading .dash-eyebrow { margin-bottom:5px; }
  #study-shell .dashboard-hero { min-height:0; padding:19px; border-radius:16px; }
  #study-shell .hero-art { opacity:.34; }
  #study-shell .dashboard-copy > p:not(.dash-eyebrow) { max-width:17em; margin:8px 0 13px; font-size:.87rem; }
  #study-shell .dashboard-progress { padding:12px 15px; border-radius:16px; }
  #study-shell .dashboard-progress dl > div { min-height:0; }
  #study-shell .dashboard-modules { margin-top:20px; }
  #study-shell .dashboard-section-head { margin-bottom:10px; }
  #study-shell .module-card { display:grid; grid-template-columns:44px minmax(0,1fr) 45px; grid-template-rows:auto auto; column-gap:10px; min-height:0; align-items:center; padding:10px 12px; }
  #study-shell .module-card-top { grid-area:1/1/3/2; }
  #study-shell .module-icon { width:40px; height:40px; margin:0; }
  #study-shell .module-number { display:none; }
  #study-shell .module-card h3 { grid-area:1/2/2/3; margin:0; font-size:1rem; }
  #study-shell .module-card p { grid-area:2/2/3/3; margin:2px 0 0; font-size:.77rem; }
  #study-shell .module-action { grid-area:1/3/3/4; justify-content:center; font-size:0; }
  #study-shell .module-action span { font-size:1.1rem; }
  #study-shell .answer-form input { flex:1 0 100%; }
  #study-shell :is(.answer-form,.dictation-review-actions) button { min-height:44px; }
}
@media print { #study-shell .app-nav { display:none !important; } }
#study-shell .plan-card summary { cursor:pointer; font-size:1rem; font-weight:720; }
#study-shell .plan-card[open] summary { margin-bottom:8px; }
#study-shell #dictation-panel:not([hidden]) { display:flex; flex-direction:column; }
#study-shell #round-panel { margin:0 0 12px; }
#study-shell #plan-settings:not([open]) { padding-block:11px; }
@media(max-width:730px) {
  #study-shell .app-nav { padding-left:max(10px,env(safe-area-inset-left,0px)); padding-right:max(10px,env(safe-area-inset-right,0px)); }
}

#study-shell .practice-references { margin:-7px 0 16px; color:var(--app-muted); border:1px solid var(--app-line); border-radius:10px; padding:7px 12px; background:var(--app-card); font-size:.88rem; }
#study-shell .practice-references summary { cursor:pointer; color:var(--app-link); line-height:2; }
#study-shell .practice-references p { margin:5px 0; }
#study-shell .practice-references ul { margin:6px 0; padding-inline-start:1.25em; }
#study-shell .exercise-stack[tabindex] { scroll-margin-top:84px; }
#study-shell .practice-pager span { color:var(--app-muted); font-size:.9rem; }

#study-shell .math-lab { padding:9px; border:1px solid var(--app-line); border-radius:12px; background:var(--app-card); }
#study-shell .math-lab .math-lab-title { margin:0 0 4px; font-weight:710; color:var(--app-ink); }
#study-shell .math-lab > svg { display:block; width:100%; max-width:580px; height:auto; margin:auto; }
#study-shell .lab-plot-bg { fill:var(--app-tint); opacity:.42; }
#study-shell .lab-grid { stroke:var(--app-control-line); stroke-width:.65; }
#study-shell .lab-axis, #study-shell .lab-line.lab-axis { stroke:var(--app-muted); stroke-width:1; }
#study-shell .lab-tick, #study-shell .lab-note { font:10px system-ui,sans-serif; fill:var(--app-muted); }
#study-shell .lab-note { fill:var(--app-ink); font-weight:650; paint-order:stroke; stroke:var(--app-card); stroke-width:2.5; stroke-linejoin:round; }
#study-shell .lab-line { fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#study-shell .lab-main { stroke:#226e5a; }
#study-shell .lab-guide { stroke:#ac601d; stroke-dasharray:5 3; }
#study-shell .lab-fill { fill:#d39842; opacity:.35; }
#study-shell .lab-hole { fill:var(--app-card); stroke:#226e5a; stroke-width:2; }
#study-shell .lab-dot { fill:#226e5a; stroke:var(--app-card); stroke-width:1.1; }
[data-theme="dark"] #study-shell :is(.lab-main,.lab-hole) { stroke:#85d5ac; }
[data-theme="dark"] #study-shell .lab-guide { stroke:#ffbd76; }
[data-theme="dark"] #study-shell .lab-dot { fill:#85d5ac; }
#study-shell .math-lab-controls, #study-shell .math-lab-slider { display:flex; align-items:end; flex-wrap:wrap; gap:6px 8px; }
#study-shell .math-lab-slider { flex:1 1 245px; min-width:0; flex-wrap:nowrap; }
#study-shell .math-lab-control { display:grid; flex:1 1 auto; min-width:0; font-weight:660; font-size:.86rem; color:var(--app-ink); }
#study-shell .math-lab input[type="range"] { min-width:0; width:100%; height:44px; padding:0; border:0; background:transparent; accent-color:var(--app-primary); touch-action:pan-y; }
#study-shell .math-lab-controls button, #study-shell .math-plot-tools button { min-height:44px; min-width:44px; }
#study-shell .math-lab-readout { display:block; margin:8px 0 2px; color:var(--app-ink); font-size:.88rem; font-variant-numeric:tabular-nums; }
#study-shell .math-advanced { margin-top:10px; }
#study-shell .math-advanced > summary { cursor:pointer; color:var(--app-link); padding-block:7px; }
#study-shell .math-board[data-gestures="false"] > svg { pointer-events:none; }
#study-shell .math-board[data-gestures="true"] { touch-action:none; }
#study-shell .math-plot-tools [aria-pressed="true"] { background:var(--app-tint); color:var(--app-link); }
#study-shell .math-card-title { display:flex; align-items:center; justify-content:space-between; gap:6px 12px; flex-wrap:wrap; }
#study-shell .math-card-title h3 { margin:3px 0 6px; }
#study-shell .math-visual-shortcut { color:var(--app-link); font-weight:680; font-size:.83rem; min-height:44px; }
#study-shell .math-visual-region { scroll-margin-top:82px; }
@media(max-width:730px) {
  #study-shell .math-visual-region { scroll-margin-top:12px; }
  #study-shell .math-lab { padding:6px; }
}
@media(max-width:730px) {
  #study-shell .math-open-formulas { position:static; box-shadow:none; min-height:44px; }
  #study-shell .math-lab-slider { flex-basis:193px; }
  #study-shell .math-lab-controls button { -webkit-tap-highlight-color:#d6eadb; }
}
#study-shell .practice-panel { margin:0; padding:0; min-inline-size:0; border:0; }
#study-shell .practice-pending { padding:7px 10px; border-inline-start:3px solid var(--app-primary); background:var(--app-tint); font-size:.88rem; border-radius:5px; }
#study-shell .practice-retry { margin-bottom:9px; }
