/* Grid Pass · 手机优先减负层：玻璃用于导航，阅读区保持稳定对比度。 */
:root { --reading-size:18px; --ux-paper:#fff; --ux-canvas:#f5f7fa; --ux-line:#e4e8ef; --ux-text:#202b3b; --ux-muted:#627086; }
html[data-theme="dark"] { --ux-paper:#1b2431; --ux-canvas:#101722; --ux-line:#344152; --ux-text:#edf2fa; --ux-muted:#acb9cb; }
body { background:var(--ux-canvas); color:var(--ux-text); }
.ambient-light { opacity:.2; pointer-events:none; }
.surface, .question-card, .bank-item, .settings-card, .mode-card, .topic-card { background:var(--ux-paper)!important; border:1px solid var(--ux-line); box-shadow:0 3px 15px rgba(27,44,67,.035); backdrop-filter:none; -webkit-backdrop-filter:none; border-radius:20px; }
.surface::before, .surface::after { display:none; }
.topbar h1, .question-title, .study-hero h2, .score-copy h2 { font-family:inherit; }
.topbar h1 { font-size:26px; line-height:1.35; }
.topbar p { color:var(--ux-muted); letter-spacing:.12em; }
.topbar .streak-pill { display:none; }
.topbar { min-height:92px; }
.bottom-nav { grid-template-columns:repeat(4,1fr); }
button { touch-action:manipulation; }
html, body, *, *::before, *::after { touch-action:pan-x pan-y pinch-zoom; }
button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline:3px solid #5685dd; outline-offset:3px; }
.ghost-button, .secondary-button, .option-button { box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.primary-button { box-shadow:none; }
.text-link { min-height:40px; display:inline-flex; align-items:center; margin:0; }
.field, .select-field, textarea { font-size:16px; }
.bank-bar { gap:8px; margin-bottom:18px; }
.bank-chip { min-height:40px; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; background:var(--ux-paper); border:1px solid var(--ux-line); }
.bank-chip small { display:none; }
.bank-chip.active { background:var(--ux-text); color:var(--ux-paper); }
html[data-theme="dark"] .bank-chip.active { background:#edf2fa; color:#1b2431; border-color:#edf2fa; }
.bottom-nav button:not(.active) { background:transparent!important; box-shadow:none!important; }
.study-hero { padding:26px; margin-bottom:16px; }
.study-caption, .study-progress { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; color:var(--ux-muted); }
.study-hero h2 { margin:18px 0 10px; font-size:28px; letter-spacing:-.03em; }
.study-hero p { color:var(--ux-muted); font-size:14px; line-height:1.6; margin:0 0 20px; }
.study-start { width:100%; min-height:52px; justify-content:space-between; padding:0 20px; }
.study-progress { margin:18px 0 9px; }
.study-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.study-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:8px; }
.study-secondary button { min-width:0; min-height:44px; justify-content:center; font-size:13px; margin:0; }
.memory-mode-note { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; color:var(--ux-muted); font-size:12px; line-height:1.7; margin:2px 0 12px; }
.memory-mode-note strong { color:var(--blue); }
.memory-part { width:100%; margin:0 0 12px; }
.memory-answer { margin:14px 0; padding:10px 12px; color:var(--green); background:var(--green-soft); border-radius:12px; font-size:14px; }
.memory-option { cursor:default; }
.memory-options .memory-option, .memory-options .memory-option:hover { color:var(--ux-text); border:1px solid var(--ux-line); background:var(--ux-paper); box-shadow:none; }
.memory-options .memory-option > :nth-child(2) { color:var(--ux-text); -webkit-text-fill-color:currentColor; }
.memory-options .memory-option.correct, .memory-options .memory-option.correct:hover, html[data-theme="dark"] .memory-options .memory-option.correct { background:var(--green-soft); border-color:var(--green); box-shadow:inset 0 0 0 1px var(--green); }
.memory-actions { margin-top:14px; }
.memory-analysis { margin-top:12px; border:1px solid var(--ux-line); border-radius:12px; padding:0 12px; }
.memory-analysis summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-size:14px; }
.memory-analysis > p { font-size:14px; line-height:1.7; }
.memory-quiz-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.memory-quiz-fields label { min-width:0; color:var(--ux-muted); font-size:12px; line-height:1.8; }
.memory-quiz-start { width:100%; min-height:48px; }
.route-actions [data-action="open-memory-quiz"] { min-height:44px; }
.option-order-control { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:6px 0 12px; padding:0; }
.option-order-control > span { font-size:13px; color:var(--ux-muted); min-width:0; }
.option-order-control small { display:block; font-size:11px; margin-top:3px; }
.option-order-segment { display:flex; gap:3px; padding:3px; background:var(--ux-canvas); border:1px solid var(--ux-line); border-radius:12px; flex-shrink:0; }
.option-order-segment button { min-width:64px; min-height:44px; border:0; border-radius:9px; background:transparent; color:var(--ux-muted); font:inherit; font-size:14px; cursor:pointer; }
.option-order-segment button[aria-pressed="true"] { color:var(--ux-text); background:var(--ux-paper); box-shadow:0 2px 8px #0001,inset 0 0 0 1px var(--ux-line); font-weight:650; }
.option-order-segment button:disabled { opacity:.8; cursor:default; }
.option-order-segment button:focus-visible { outline:2px solid var(--red); outline-offset:2px; }
.study-shortcuts button { text-align:left; padding:18px; cursor:pointer; }
.study-shortcuts button > span { display:block; color:var(--red); font-size:23px; margin-bottom:12px; }
.study-shortcuts strong { display:block; font-size:16px; margin-bottom:5px; }
.study-shortcuts small { color:var(--ux-muted); font-size:12px; }
.study-review { padding:20px; display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.study-review p { margin:7px 0 0; color:var(--ux-muted); font-size:13px; }
.compact-details { padding:18px; margin-bottom:16px; }
.compact-details summary, .settings-card summary, .exam-advanced summary, .ai-settings summary { cursor:pointer; font-weight:650; min-height:36px; line-height:1.5; }
.compact-details summary small { color:var(--ux-muted); font-weight:400; margin-left:10px; }
.compact-details .topic-line { grid-template-columns:minmax(100px,1fr) 1fr 42px; }
.route-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 14px; min-height:48px; }
.route-bar strong { font-size:14px; color:var(--ux-muted); }
.route-bar .ghost-button { border:0; background:transparent; padding-left:0; }
.route-bar .text-link { color:var(--ux-muted); }
.route-actions { display:flex; gap:4px; align-items:center; flex-shrink:0; }
.practice-search-button { min-height:44px; min-width:44px; padding:4px; background:transparent; border:0; color:var(--ux-muted); font-size:23px; cursor:pointer; }
.route-actions .text-link { font-size:12px; }
.practice-lookup-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.practice-lookup-filters input { grid-column:1/-1; }
#practice-search-list .search-result { border:1px solid var(--ux-line); box-shadow:none; }
.practice-order { padding:16px; margin-bottom:14px; }
.practice-order-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.practice-order-fields label { min-width:0; font-size:12px; color:var(--ux-muted); }
.practice-order-fields select { margin-top:6px; min-height:44px; font-size:14px; color:var(--ux-text); background:var(--ux-paper); }
.practice-order-start { display:flex; align-items:center; gap:14px; margin-top:12px; flex-wrap:wrap; }
.practice-order-start .primary-button { flex:1 1 auto; min-height:46px; }
.practice-order-start .text-link { margin:0; min-height:44px; display:flex; align-items:center; font-size:12px; }
.practice-order > p { color:var(--ux-muted); font-size:11px; line-height:1.6; margin:8px 0 0; }
.order-tag { font-size:11px; color:var(--ux-muted); padding:4px 7px; border:1px solid var(--ux-line); border-radius:999px; }
.option-order-note { font-size:12px; color:var(--ux-muted); margin:0 0 10px; }
.feedback .option-source-note { color:var(--ux-muted); font-size:12px; line-height:1.6; padding:7px 9px; margin:8px 0; background:var(--ux-canvas); border-radius:8px; }
body[data-view="exam"] .bank-bar, body[data-view="settings"] .bank-bar, body[data-view="ai"] .bank-bar { display:none; }
body.answering .topbar, body.answering .bank-bar, body.answering .bottom-nav { display:none!important; }
.question-title { font-size:var(--reading-size)!important; line-height:1.7!important; font-weight:600; }
.practice-layout > * { min-width:0; }
.question-card, .feedback, .similar-strip { min-width:0; overflow-wrap:anywhere; }
/* Native button grid sizing is fragile on mobile; flex text owns its full wrapped height. */
.option-button { appearance:none; -webkit-appearance:none; display:flex; height:auto; max-height:none; min-width:0; white-space:normal; font-size:var(--reading-size)!important; line-height:1.6; min-height:52px!important; background:var(--ux-paper); border:1px solid var(--ux-line); }
.option-button > .option-key { flex:0 0 30px; }
.option-button > :nth-child(2) { flex:1 1 0%; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.option-button > .option-check { flex:0 0 20px; }
.option-button:disabled { opacity:1; color:var(--ux-text); -webkit-text-fill-color:currentColor; cursor:default; }
.option-list { gap:10px; }
.option-button.selected { background:var(--red-soft); border-color:var(--red); }
.option-button.correct { background:var(--green-soft); border-color:var(--green); }
.option-button.wrong { background:var(--red-soft); border-color:var(--red); }
.option-button.correct, html[data-theme="dark"] .option-button.correct { box-shadow:inset 0 0 0 1px var(--green); }
.option-button.wrong, html[data-theme="dark"] .option-button.wrong { box-shadow:inset 0 0 0 1px var(--red); }
.question-actions { background:var(--ux-paper); border-color:var(--ux-line); box-shadow:none; }
.question-toolbar { gap:8px; }
.question-toolbar .history-chip, .question-toolbar .diff-tag, .question-toolbar .topic-tag { display:none; }
.question-number { color:var(--ux-muted); }
.favorite-button, .copy-button { min-width:44px; min-height:44px; }
.favorite-actions { display:inline-flex; align-items:center; flex:0 0 auto; gap:0; }
.favorite-actions-text { flex-wrap:wrap; gap:6px; }
.favorite-actions-text button { min-height:44px; }
.favorite-filter { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.priority-favorite { color:#955015; }
.priority-favorite.favorite-button { color:#887465; }
.priority-favorite.active, .favorite-button.priority-favorite.active { color:#955015; }
.favorite-mark { white-space:nowrap; font-size:12px; margin-left:4px; color:var(--amber); }
.favorite-mark.priority-favorite, .answer-card-star.priority-favorite { color:#955015; }
html[data-theme="dark"] .priority-favorite, html[data-theme="dark"] .priority-favorite.active, html[data-theme="dark"] .favorite-button.priority-favorite.active { color:#dc9058; }
html[data-theme="dark"] .favorite-button.priority-favorite:not(.active) { color:#c4aa96; }
.question-toolbar-right { gap:4px; }
.question-toolbar-right .question-number { min-width:0; white-space:normal; overflow-wrap:anywhere; }
.question-toolbar-right .copy-button { flex:0 0 44px; }
.feedback { margin-top:14px; padding:13px; border-radius:16px; box-shadow:none; }
.feedback-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:32px; }
.feedback-head { margin:0; gap:8px; font-size:15px; }
.feedback-head .result-icon { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--green); font-size:13px; }
.wrong-feedback .feedback-head .result-icon { background:var(--red); }
.answer-key { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:var(--green-soft); color:var(--green); font-size:12px; font-weight:650; }
.wrong-feedback .answer-key { background:var(--red-soft); color:var(--red); }
.feedback-folds { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
.feedback-folds > details[open] { grid-column:1 / -1; }
.feedback-folds .explain-details, .feedback-folds .similar-details { min-width:0; margin:0; border:1px solid var(--ux-line); border-radius:11px; background:var(--ux-paper); overflow:hidden; }
.feedback-folds summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:40px; padding:7px 10px; cursor:pointer; font-size:12px; font-weight:700; }
.feedback-folds summary::-webkit-details-marker { display:none; }
.feedback-folds summary::after { content:"▾"; flex:0 0 auto; color:var(--ux-muted); font-size:10px; transition:transform 160ms ease; }
.feedback-folds details[open] > summary::after { transform:rotate(180deg); }
.feedback-folds .explain-state, .feedback-folds .similar-count { margin-left:auto; color:var(--ux-muted); font-size:10px; font-weight:600; }
.feedback-folds details[open] .explain-state, .feedback-folds details[open] .similar-count { display:none; }
.feedback p { font-size:clamp(14px,calc(var(--reading-size) - 2px),18px); line-height:1.68; }
.bank-detail p, .bank-detail li, .short-answer-text { font-size:var(--reading-size); line-height:1.75; }
.feedback .provenance { color:var(--ux-muted); font-size:11px; line-height:1.55; padding:7px 9px; background:var(--ux-canvas); border-radius:8px; }
.bank-detail .provenance, .provenance { color:var(--ux-muted); font-size:12px; line-height:1.7; padding:10px 12px; background:var(--ux-canvas); border-radius:10px; }
.feedback .explain-body { padding:4px 11px 11px; }
.feedback .answer-detail { margin:2px 0 8px; padding-bottom:8px; border-bottom:1px dashed var(--ux-line); color:var(--green); }
.feedback .memory-tip { margin-top:8px!important; padding-top:8px; }
.feedback .source-line { margin-top:8px; padding-top:8px; }
.source-review-note { margin:8px 0; padding:9px 11px; border-inline-start:3px solid #b07817; border-radius:6px; background:color-mix(in srgb, #c99025 12%, transparent); font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.analysis-references { display:flex; flex-direction:column; gap:2px; margin-top:6px; }
.analysis-references a { display:flex; align-items:center; min-height:44px; padding:4px 2px; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.feedback .button-row { gap:14px; }
.feedback .text-link { margin-top:9px; }
.explanation-text { white-space:pre-line; }
.explain-details summary { gap:6px; }
.similar-strip { padding-top:14px; }
.similar-strip { grid-template-columns:minmax(0,1fr); }
.similar-item { appearance:none; -webkit-appearance:none; height:auto; white-space:normal; min-width:0; min-height:48px; background:var(--ux-paper); display:flex; flex-direction:column; align-items:stretch; gap:7px; padding:11px 12px; }
.similar-item > span { flex:0 0 auto; min-width:0; white-space:normal; overflow:visible; text-overflow:clip; }
.similar-item-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--ux-muted)!important; font-size:11px; }
.similar-question-text { font-size:clamp(14px,calc(var(--reading-size) - 2px),18px); line-height:1.65; overflow-wrap:anywhere; }
.similar-item-foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:11px; color:var(--ux-muted)!important; }
.similar-item-foot > span:last-child { color:var(--red); }
.similar-item > .bank-tag { flex:0 0 auto; }
.similar-item .history-chip { display:none; }
.feedback .similar-strip { margin:0; padding:4px 9px 9px; border:0; gap:6px; }
.feedback .similar-item { min-height:40px; padding:10px; border-color:var(--ux-line); }
.bank-item summary { align-items:start; }
.bank-question { -webkit-line-clamp:2; line-height:1.6; font-size:16px; }
.bank-question small { display:block; color:var(--ux-muted); font-size:12px; margin-bottom:5px; }
.bank-question { white-space:normal; }
.bank-question-copy { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.bank-item[open] .bank-question, .review-detail .bank-question { display:block; -webkit-line-clamp:unset; line-clamp:unset; overflow:visible; text-overflow:clip; white-space:normal; }
.bank-item[open] .bank-question-copy, .review-detail .bank-question-copy { display:block; -webkit-line-clamp:unset; line-clamp:unset; -webkit-box-orient:initial; overflow:visible; max-height:none; white-space:normal; text-overflow:clip; }
.review-detail .bank-question-copy { font-size:var(--reading-size); line-height:1.7; }
.search-result { position:relative; }
.search-result-entry { appearance:none; -webkit-appearance:none; display:flex; flex-direction:column; align-items:stretch; gap:9px; width:100%; min-width:0; height:auto; min-height:48px; padding:14px 16px 50px; color:var(--ux-text); background:transparent; border:0; border-radius:inherit; text-align:left; white-space:normal; font:inherit; cursor:pointer; }
.search-result-entry:focus-visible { outline:2px solid var(--red); outline-offset:-3px; }
.search-result-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--ux-muted); font-size:12px; }
.search-result-meta .type-tag { font-size:11px; padding:3px 7px; }
.search-result-star { margin-left:auto; color:var(--gold,#ac7d23); font-size:17px; }
.search-result-question { display:block; font-size:clamp(15px,calc(var(--reading-size) - 1px),19px); line-height:1.65; overflow-wrap:anywhere; }
.search-result-foot { position:absolute; bottom:9px; left:16px; right:16px; min-height:36px; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--ux-muted); font-size:11px; }
.search-result-foot > span:last-child { color:var(--red); }
.search-result-preview { position:absolute; bottom:8px; left:16px; min-height:38px; margin:0; font-size:12px; z-index:1; }
.feedback .answer-diff { margin:6px 0 0; font-size:12px; line-height:1.5; color:var(--red); }
.session-progress .batch-progress { font-size:12px; line-height:1.5; color:var(--ux-muted); }
.my-recall { border-style:dashed; }
.my-recall .short-answer-text { white-space:pre-wrap; }
.last-answer { color:var(--ux-muted); }
.bank-detail { border-top:1px solid var(--ux-line); }
.load-more { width:100%; min-height:48px; margin:14px 0; }
.profile-summary { padding:22px; margin-bottom:18px; }
.profile-summary h2 { font-size:22px; margin:0 0 12px; }
.profile-summary p { color:var(--ux-muted); font-size:14px; line-height:1.7; }
.settings-grid { grid-template-columns:1fr; gap:12px; }
.settings-card { padding:18px 22px; }
.settings-card[open] summary { margin-bottom:15px; }
.settings-card p { line-height:1.7; }
.setting-row { gap:18px; }
.setting-row > span { line-height:1.6; }
#auto-advance { width:22px; height:22px; flex-shrink:0; }
.exam-advanced { padding:14px 0; margin-bottom:12px; }
.exam-advanced[open] summary { margin-bottom:16px; }
.answer-comparison { padding:18px; display:flex; flex-wrap:wrap; gap:16px; margin:16px 0; font-size:16px; }
.review-card { max-height:160px; overflow:auto; }
.score-circle { box-shadow:none; }
#context-panel { padding:0; border:1px solid var(--ux-line); border-radius:24px; width:min(720px,96vw); max-height:90dvh; background:var(--ux-paper); color:var(--ux-text); overflow:hidden; box-shadow:0 24px 100px #0003; }
#context-panel::backdrop { background:rgba(20,30,46,.35); backdrop-filter:blur(5px); }
body:has(#context-panel[open]) { overflow:hidden; }
.panel-header { padding:12px 18px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--ux-line); background:var(--ux-paper); min-height:64px; }
.panel-header button { min-height:44px; }
.panel-body { padding:18px; max-height:calc(90dvh - 64px); overflow:auto; overscroll-behavior:contain; }
.panel-body .bank-item { border:0; box-shadow:none; }
.panel-body .bank-detail { padding-left:0; padding-right:0; }
.question-preview { min-width:0; overflow-wrap:anywhere; }
.preview-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--ux-muted); font-size:12px; }
.preview-question { margin:16px 0; font-size:var(--reading-size); line-height:1.7; font-weight:650; white-space:normal; }
.preview-actions { gap:8px; margin-bottom:16px; }
.preview-actions button { min-height:44px; }
.preview-options { list-style:none; display:grid; gap:9px; margin:0; padding:0; }
.preview-options li { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid var(--ux-line); border-radius:12px; font-size:var(--reading-size); line-height:1.65; }
.preview-option-key { flex:0 0 22px; font-weight:700; }
.preview-option-text { flex:1 1 0%; min-width:0; overflow-wrap:anywhere; }
.preview-options .is-answer { background:var(--green-soft); border-color:var(--green); }
.preview-correct { flex:0 0 18px; color:var(--green); font-weight:700; }
.preview-answer { margin:14px 0; color:var(--green); font-size:16px; line-height:1.7; white-space:pre-wrap; }
.preview-analysis { border-top:1px solid var(--ux-line); padding-top:12px; font-size:16px; line-height:1.7; }
.preview-analysis summary { cursor:pointer; min-height:44px; font-weight:650; }
.preview-analysis p { font-size:clamp(14px,calc(var(--reading-size) - 2px),18px); line-height:1.7; }
.preview-analysis .provenance { font-size:11px; }
.panel-body .ai-layout { display:block; }
.panel-body .ai-side { margin-top:16px; }
.panel-body .ai-chat { min-height:0; }
.panel-body .ai-messages { max-height:36dvh; min-height:100px; }
.panel-body .ai-empty { padding:20px 8px; }
.panel-body .ai-context > span { max-width:200px; }
.panel-body .ai-bubble { font-size:16px; line-height:1.7; }
.panel-body .ai-quick { flex-wrap:wrap; }
.panel-body .ai-settings { background:var(--ux-canvas); }
.panel-body .ai-side > article { display:none; }
#update-notice { position:fixed; left:50%; transform:translateX(-50%); bottom:100px; z-index:80; width:min(94vw,500px); border:1px solid var(--ux-line); padding:12px; border-radius:16px; background:var(--ux-paper); box-shadow:0 8px 40px #0002; font-size:13px; }
#update-notice button { min-height:40px; background:transparent; color:var(--red); border:0; padding:6px 10px; }
@media (max-width:780px) {
  .main-area { padding:0 14px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { min-height:82px; margin:0 -14px 12px; padding:14px 18px 12px; position:static; box-shadow:none; }
  .topbar h1 { font-size:24px; max-width:100%; }
  .topbar p { font-size:10px; margin:0 0 4px; }
  .bank-bar { margin:0 0 16px; }
  .bottom-nav { min-height:66px; grid-template-columns:repeat(4,1fr); border-radius:24px; }
  .bottom-nav button { min-height:50px; }
  .bottom-nav button small { font-size:11px; }
  .study-hero { padding:22px; }
  .study-hero h2 { font-size:26px; }
  .study-shortcuts { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .study-shortcuts button { padding:14px 8px; text-align:center; }
  .study-shortcuts button > span { float:none; margin:0 0 8px; font-size:22px; }
  .study-shortcuts strong { font-size:14px; }
  .study-shortcuts small { display:none; }
  .study-review { display:block; padding:18px; }
  .study-review .button-row { margin-top:12px; }
  .filters { display:grid; grid-template-columns:1fr 1fr; padding:14px; gap:10px; }
  #bank-search { grid-column:1 / -1; }
  .bank-item-meta { display:none; }
  .section-head h2 { font-size:18px; }
  .mode-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .mode-card { padding:18px 14px; }
  .mode-card p { font-size:12px; }
  .topic-grid { grid-template-columns:1fr; gap:10px; }
  .topic-card { padding:18px; }
  body[data-view="practice"]:not(.answering) .topbar { display:flex; }
  body[data-view="practice"]:not(.answering) .bank-bar { display:flex; }
  body.answering .main-area { padding-top:max(8px,env(safe-area-inset-top)); padding-bottom:calc(20px + env(safe-area-inset-bottom)); }
  .question-card, body[data-view="practice"] .question-card { padding:18px 14px; }
  .feedback { padding:12px; }
  .feedback-folds .explain-state { display:none; }
  .practice-layout { grid-template-columns:minmax(0,1fr); }
  .question-toolbar { flex-wrap:wrap; }
  .question-toolbar-left, .question-toolbar-right { width:100%; min-width:0; }
  .question-toolbar-right { flex-wrap:nowrap; }
  .question-toolbar-right .question-number { margin-right:auto; }
  .route-bar { margin-bottom:8px; }
  .question-actions { position:sticky; bottom:8px; z-index:8; gap:8px; padding:8px; border-radius:16px; }
  .question-actions .primary-button, .question-actions .ghost-button { min-height:46px!important; font-size:15px; }
  .session-side { order:0; }
  .exam-bar { padding:12px; gap:8px; font-size:12px; }
  .exam-meta { display:none; }
  .exam-timer { font-size:18px; }
  .settings-card { padding:16px; }
  .settings-card .topic-line { grid-template-columns:1fr 60px; }
  .settings-card .topic-line .progress-track { display:none; }
  .settings-card .setting-row > span { max-width:65%; }
  .settings-card .setting-row.column > span { max-width:100%; }
  #context-panel { margin:auto auto 0; width:100%; max-width:100%; border-radius:24px 24px 0 0; max-height:94dvh; }
  .panel-body { max-height:calc(94dvh - 64px); padding:14px 14px calc(18px + env(safe-area-inset-bottom)); }
  .panel-body .bank-detail p, .panel-body .bank-detail li { font-size:16px; }
  .panel-body .ai-composer { padding:10px; }
  .panel-body .ai-composer textarea { min-width:0; font-size:16px; }
}
@media (max-width:360px) { .study-hero h2 { font-size:23px; } .mode-grid { grid-template-columns:1fr; } .question-actions > button { flex-basis:90px; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }

/* v34 · 一个续答入口、按需展开设置、轻量切库与对照。 */
.scope-picker { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border:1px solid var(--ux-line); border-radius:16px; background:var(--ux-paper); color:var(--ux-text); text-align:left; min-height:54px; }
.scope-picker > span:first-child { display:flex; align-items:center; gap:10px; min-width:0; flex-wrap:wrap; }
.scope-picker small, .scope-picker-count { font-size:12px; color:var(--ux-muted); }
.scope-picker strong { font-size:15px; }
.scope-picker-count { flex-shrink:0; }
.bank-picker-list { display:grid; gap:8px; }
.bank-picker-list button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:64px; padding:12px; border:1px solid var(--ux-line); border-radius:14px; background:var(--ux-paper); color:var(--ux-text); text-align:left; }
.bank-picker-list button[aria-pressed="true"] { background:var(--red-soft); border-color:var(--red); }
.bank-picker-list strong { display:block; font-size:15px; line-height:1.5; }
.bank-picker-list small { display:block; margin-top:4px; font-size:12px; color:var(--ux-muted); }
.practice-hub { padding:16px; margin-bottom:14px; }
.practice-hub > .config-hint { margin:0 0 10px; }
.practice-hub > .text-link { font-size:12px; }
.practice-hub .study-start { font-size:16px; height:auto; white-space:normal; padding:12px; line-height:1.5; }
.practice-hub .practice-order { padding:0; margin:12px 0 0; }
.practice-order > summary { min-height:44px; cursor:pointer; color:var(--ux-text); font-weight:600; font-size:14px; }
.practice-order > summary small { display:block; font-size:12px; font-weight:400; color:var(--ux-muted); line-height:1.7; margin-top:5px; }
.practice-order[open] .practice-order-fields { margin-top:14px; }
.practice-order-fields select, .practice-order-fields input { width:100%; max-width:100%; font-size:16px; margin-top:6px; min-height:44px; }
.practice-start-field { grid-column:1 / -1; }
.practice-start-field small { display:block; margin-top:6px; line-height:1.6; }
.practice-quick { padding:0 14px; overflow:hidden; }
.practice-quick > button { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:54px; padding:12px 0; border:0; border-bottom:1px solid var(--ux-line); border-radius:0; background:transparent; color:var(--ux-text); font-size:15px; text-align:left; }
.practice-quick > button:last-child { border-bottom:0; }
.practice-quick small { color:var(--ux-muted); font-size:12px; }
.config-hint { font-size:12px; color:var(--ux-muted); line-height:1.65; }
.wrong-order-control { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--ux-muted); font-size:12px; margin:12px 0; }
.wrong-order-control select { min-width:0; max-width:100%; width:100%; min-height:44px; font-size:14px; }
.exam-scope-summary small { font-size:12px; color:var(--ux-muted); }
.exam-scope-summary h2 { margin:8px 0 16px; font-size:22px; line-height:1.5; overflow-wrap:anywhere; }
.exam-scope-modes { display:flex; flex-wrap:wrap; gap:8px; }
.exam-scope-warning { color:var(--red); font-size:13px; line-height:1.6; background:var(--red-soft); padding:10px; border-radius:10px; }
.similar-item .similar-difference { color:var(--red); font-size:11px; line-height:1.6; }
.similar-question-text mark, .similar-comparison mark { background:#fff0bf; color:#644513; border-radius:3px; }
html[data-theme="dark"] .similar-question-text mark, html[data-theme="dark"] .similar-comparison mark { background:#53432c; color:#ffe2a0; }
.similar-comparison { margin:12px 0; padding:12px; background:var(--ux-canvas); border:1px solid var(--ux-line); border-radius:12px; }
.similar-comparison summary { cursor:pointer; font-size:13px; line-height:1.7; min-height:32px; }
.similar-comparison small { color:var(--ux-muted); font-size:12px; }
.similar-comparison p { font-size:14px; line-height:1.7; margin:8px 0 12px; }
/* 安全一级内的两部分是子入口，不增加主题库或大块配置。 */
.safety-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.safety-parts button { min-width: 0; padding: 14px 12px; text-align: left; cursor: pointer; }
.safety-parts strong { display: block; font-size: 15px; line-height: 1.5; }
.safety-parts strong span { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.safety-parts small { display: block; font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 4px; }

/* A bounded, readable answer card: source-order type boundaries and bookmark badges. */
.answer-card-panel { width:100%; min-width:0; margin-top:10px; }
.answer-card-type-nav { display:flex; flex-wrap:wrap; gap:6px; }
.answer-card-type-nav button { min-height:40px; border:1px solid var(--ux-line); border-radius:10px; padding:7px 10px; background:var(--ux-paper); color:var(--ux-text); font-size:12px; cursor:pointer; }
.answer-card-type-nav small { margin-left:4px; color:var(--ux-muted); }
.answer-card-legend { display:flex; gap:6px 12px; flex-wrap:wrap; padding:10px 0 4px; font-size:11px; line-height:1.5; color:var(--ux-muted); }
.legend-good { color:var(--green); }.legend-bad { color:var(--red); }.legend-answered { color:var(--blue); }
.legend-favorite, .answer-card-star { color:#ad7807; }
.exam-grid.answer-card-sections { display:block; position:relative; max-height:40vh; margin-top:6px; overflow-y:auto; overflow-x:hidden; padding:0 5px 8px 1px; overscroll-behavior:contain; scrollbar-gutter:stable; }
.answer-card-section + .answer-card-section { margin-top:16px; }
.answer-card-section h3 { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; padding:9px 2px; margin:0 0 6px; border-bottom:1px solid var(--ux-line); background:var(--ux-paper); color:var(--ux-text); font-size:13px; line-height:1.5; }
.answer-card-section h3 small { color:var(--ux-muted); font-weight:400; font-size:11px; }
.answer-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(44px,1fr)); gap:8px; padding:4px; }
.exam-grid.answer-card-sections .answer-card-cell { position:relative; aspect-ratio:auto; min-height:44px; padding:8px 2px; font-size:13px; border-radius:10px; color:var(--ux-text); background:var(--ux-paper); }
.exam-grid.answer-card-sections .answer-card-cell.good { color:var(--green); border-color:var(--green); background:var(--green-soft); }
.exam-grid.answer-card-sections .answer-card-cell.bad { color:var(--red); border-color:var(--red); background:var(--red-soft); }
.answer-card-star { position:absolute; right:-3px; top:-6px; display:grid; place-items:center; width:17px; height:17px; border-radius:50%; background:var(--ux-paper); font-size:14px; line-height:1; pointer-events:none; }
.answer-card-result { position:absolute; bottom:2px; right:4px; font-size:9px; line-height:1; pointer-events:none; }
.exam-grid.answer-card-sections .answer-card-cell.previously-done { background:var(--blue-soft); border-color:var(--blue); border-style:dashed; }
.answer-card-history-dot { position:absolute; bottom:4px; right:4px; width:5px; height:5px; border-radius:50%; background:var(--blue); pointer-events:none; }
.legend-history, .learning-history { color:var(--blue); }
.learning-history { margin:0 0 10px; font-size:12px; line-height:1.6; }
.queued-practice-next { width:100%; }

/* v48：阅读区自然增高，题目工具与底栏不受文字长短影响。 */
.auto-advance-control { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:4px 0; color:var(--ux-muted); font-size:13px; }
.auto-advance-control > span { min-width:0; overflow-wrap:anywhere; }
.auto-advance-switch { position:relative; flex:0 0 68px; width:68px; height:44px; padding:0; border:0; border-radius:22px; background:var(--ux-line); color:var(--ux-muted); cursor:pointer; }
.auto-advance-switch i { position:absolute; left:8px; top:10px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 4px #0002; transition:transform .15s; }
.auto-advance-state { position:absolute; right:12px; top:0; line-height:44px; font-size:12px; font-weight:700; }
.auto-advance-switch[aria-checked="true"] { background:var(--red); color:#fff; }
.auto-advance-switch[aria-checked="true"] i { transform:translateX(28px); }
.auto-advance-switch[aria-checked="true"] .auto-advance-state { right:auto; left:12px; }
.question-card.study-question-card { padding:0!important; border:0; border-radius:0; background:transparent!important; box-shadow:none; min-width:0; overflow:visible; }
.study-question-card .question-head { padding:14px 16px; margin:0 0 12px; min-width:0; }
.study-question-card .question-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-height:44px; padding:0; border:0; }
.study-question-card .question-toolbar-left { width:auto; min-width:0; gap:6px; }
.study-question-card .question-toolbar-right { width:auto; min-width:0; flex-wrap:nowrap; gap:4px; }
.study-question-card .question-toolbar-right .question-number, .study-question-card .question-toolbar-right .history-chip { display:none; }
.study-question-card .question-toolbar-right .favorite-button, .study-question-card .copy-button { width:44px; height:44px; padding:0; flex:0 0 44px; }
.question-position { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; min-height:30px; padding:2px 0 8px; color:var(--ux-muted); font-size:12px; line-height:1.5; }
.question-position > span { min-width:0; overflow-wrap:anywhere; }
.question-position > strong { flex:0 0 auto; color:var(--red); font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.question-position small { font-size:11px; color:var(--ux-muted); }
.question-progress { height:3px; margin-bottom:8px; }
.study-question-card .option-order-control { margin:0; padding:4px 0; border:0; background:transparent; min-height:48px; }
.study-question-card .learning-history { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; min-height:28px; margin:5px 0 0; line-height:1.5; }
.study-question-card .learning-history .status-tag { font-size:10px; padding:3px 7px; }
.study-question-card .question-stem { min-width:0; min-height:104px; margin:0 0 14px; padding:18px 16px; display:flex; align-items:center; }
.study-question-card .question-title { margin:0!important; min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; word-break:normal; }
.study-question-card .option-list { min-width:0; gap:10px; }
.study-question-card .option-button { width:100%; min-width:0; height:auto!important; max-height:none!important; min-height:64px!important; padding:14px 15px!important; border-radius:18px; align-items:flex-start; gap:10px; }
.study-question-card .option-button .option-key { flex:0 0 30px; align-self:flex-start; margin-top:2px; }
.study-question-card .option-button > :nth-child(2) { min-width:0; flex:1 1 0%; white-space:normal; overflow-wrap:anywhere; line-height:1.6; max-height:none; overflow:visible; }
.study-question-card .option-button .option-check { flex:0 0 18px; width:18px; min-width:0; max-width:18px; font-size:16px; line-height:24px; align-self:flex-start; margin-top:4px; }
.study-question-card .study-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:8px; position:sticky; bottom:12px; margin:14px 0; padding:8px; min-width:0; border:1px solid var(--ux-line); border-radius:18px; background:var(--ux-paper); z-index:25; }
.study-question-card .study-actions > button { width:100%; min-width:0; height:54px; min-height:54px!important; padding:6px 8px; margin:0; flex:none; border-radius:14px; white-space:normal; line-height:1.3; font-size:14px; overflow-wrap:anywhere; }
.study-question-card .study-actions .card-shell-toggle { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; background:var(--ux-canvas); border:1px solid var(--ux-line); color:var(--ux-text); font-size:13px; }
.study-actions .card-shell-toggle small { font-size:10px; line-height:1.3; color:var(--ux-muted); font-variant-numeric:tabular-nums; }
.study-question-card .study-actions > button:hover { transform:none; }
.study-question-card .study-actions > button:disabled { opacity:.48; }
.study-question-card .study-actions > .needs-selection { background:var(--ux-canvas); color:var(--ux-muted); border-color:var(--ux-line); opacity:1; }
.study-question-card .study-actions > button { touch-action:manipulation!important; -webkit-tap-highlight-color:transparent; }
@media (hover:none), (pointer:coarse) {
  .study-question-card .study-actions > button, .study-question-card .option-button { transition:none; touch-action:manipulation!important; }
  .study-question-card .study-actions > button:hover { transform:none; }
  .study-question-card .option-button:not(.selected):not(.correct):not(.wrong):hover { background:var(--ux-paper); border-color:var(--ux-line); box-shadow:none; }
}
.card-progress-note { font-size:12px; color:var(--ux-muted); }
.back-bar { min-width:0; overflow-wrap:anywhere; }
/* v49：设置默认收起，题头只显示定位、实际已答进度与本轮正确率。 */
.study-question-card .question-toolbar-left { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.question-type-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.question-source { color:var(--ux-muted); font-size:10px; line-height:1.4; overflow-wrap:anywhere; }
.study-question-card .question-position { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 8px; padding:2px 0 0; min-height:44px; }
.question-session-stats { min-width:0; }
.question-session-stats > div { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.round-progress { color:var(--red); font-size:15px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.round-accuracy { color:var(--ux-muted); font-size:11px; white-space:nowrap; }
.study-question-card .learning-history { display:block; min-height:0; margin:0; font-size:10px; line-height:1.5; }
.question-preferences { min-width:0; }
.question-preferences > summary { display:flex; align-items:center; justify-content:flex-end; gap:6px; min-height:44px; padding:0 2px 0 8px; cursor:pointer; color:var(--ux-muted); font-size:12px; list-style:none; }
.question-preferences > summary::-webkit-details-marker { display:none; }
.question-preferences > summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:8px; }
.question-preferences[open] { grid-column:1 / -1; }
.question-preferences[open] > summary { border-top:1px solid var(--ux-line); margin-top:4px; }
.question-preferences[open] > summary > span { transform:rotate(180deg); }
.question-preferences-body { padding:0 2px 4px; }
.auto-advance-speed { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; color:var(--ux-muted); font-size:13px; }
.auto-advance-speed .select-field { width:auto; min-width:0; max-width:65%; min-height:44px; font-size:13px; }
.auto-advance-speed .select-field:disabled { opacity:.5; }
.question-order-control { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:48px; font-size:13px; color:var(--ux-muted); }
.question-order-control > span { min-width:0; }
.question-order-control small { display:block; font-size:10px; }
.question-preferences .config-hint { font-size:11px; line-height:1.5; margin:6px 0; }
.study-question-card .question-progress { margin:3px 0 0; }
.study-question-card .question-stem { min-height:80px; padding-top:16px; padding-bottom:16px; margin-bottom:12px; }
.study-question-card .option-list { gap:8px; }
@media (max-width:780px), (max-width:960px) and (max-height:500px) {
  body.answering .app-shell { display:block; }
  body.answering .sidebar { display:none; }
  body.answering .main-area { padding-left:14px; padding-right:14px; }
  body.answering .main-area { padding-bottom:calc(104px + env(safe-area-inset-bottom)); }
  body.answering #app > .route-bar { position:sticky; top:0; z-index:30; min-height:52px; background:var(--ux-canvas); }
  body.answering .route-bar strong { flex:1 1 0%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; }
  body.answering .route-bar > button, body.answering .route-actions { flex:0 0 auto; }
  body.answering .route-bar > button { min-height:44px; }
  body.answering .route-actions .text-link { min-height:44px; }
  body.answering .exam-bar { position:sticky; top:52px; z-index:28; }
  .study-question-card .question-head { padding:10px 12px 12px; }
  .study-question-card .question-stem { padding:18px 15px; }
  .study-question-card .study-actions { position:fixed; left:0; right:0; bottom:0; width:auto; max-width:none; z-index:45; margin:0; padding:10px max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); border-width:1px 0 0; border-radius:0; box-shadow:0 -3px 20px rgba(20,30,50,.06); }
  .session-side:not(.card-open), .memory-session-progress:not(.card-open) { display:none; }
  .session-side.card-open { position:static; min-width:0; }
  .answer-card-panel { scroll-margin-block:68px 104px; }
  .option-button, .question-stem, .feedback { scroll-margin-block:68px 104px; }
  body.answering .toast { bottom:calc(92px + env(safe-area-inset-bottom)); }
  body.answering #update-notice { bottom:calc(96px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce) { .auto-advance-switch i { transition:none; } }
.exam-grid .answer-card-cell.current { outline:2px solid var(--red); outline-offset:1px; box-shadow:none; }
.exam-grid.answer-card-sections .answer-card-cell.answered { color:var(--blue); border-color:var(--blue); background:var(--blue-soft); }
html[data-theme="dark"] .answer-card-star, html[data-theme="dark"] .legend-favorite { color:#f5c662; }
.answer-card-cell:focus-visible, .answer-card-type-nav button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

.custom-practice-entry { width:100%; text-align:center; min-height:44px; margin:0 0 8px; }
.custom-practice-config { margin:12px 0; padding:14px; }
.custom-practice-config > summary { display:flex; flex-direction:column; gap:4px; min-height:40px; cursor:pointer; }
.custom-practice-config > summary strong { font-size:15px; }
.custom-practice-config > summary small { color:var(--ux-muted); font-size:12px; }
.custom-practice-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.custom-practice-fields label { display:grid; gap:6px; min-width:0; font-size:13px; color:var(--ux-text); }
.custom-practice-fields .field, .custom-practice-fields .select-field { width:100%; min-width:0; min-height:44px; }
.custom-full-row { grid-column:1 / -1; }
.custom-count-presets { display:flex; flex-wrap:wrap; gap:6px; }
.custom-count-presets button { min-height:44px; padding:8px 12px; }
.custom-practice-start { width:100%; min-height:48px; }
.round-completion-actions { display:grid; grid-template-columns:1fr; gap:10px; width:100%; max-width:450px; }
.round-completion-actions button { width:100%; min-height:48px; }
.round-completion-actions button:disabled { opacity:.5; cursor:default; }

/* 保存异常只在确有未落盘数据时持续提示，不再误报手机容量。 */
#storage-notice{position:fixed;z-index:10000;top:env(safe-area-inset-top,0px);left:8px;right:8px;margin:auto;max-width:760px;padding:10px 12px;border:1px solid #dcaa56;border-radius:14px;background:#fff5dd;color:#704100;box-shadow:0 4px 24px #0002;font-size:13px;line-height:1.5}
#storage-notice span{display:block}#storage-notice button{min-height:36px;margin:6px 8px 0 0;padding:4px 12px;border:1px solid #b77d26;border-radius:9px;background:#fff;color:#704100;font:inherit;touch-action:manipulation}
