/* Professional pixel Biology atlas. Exam figures intentionally stay unfiltered. */
:root {
  --paper:#f5f2e8; --surface:#fffdf6; --ink:#163b32; --text:#293e36;
  --muted:#58675b; --line:#c3cbbb; --sage:#e5ead9; --moss:#66846a;
  --ochre:#c5a95f; --coral:#bd604d; --blue:#456f81; --focus:#936d24;
  --body-font:-apple-system,BlinkMacSystemFont,"PingFang HK","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
}
html { min-width:320px; background:var(--paper); scroll-behavior:auto; scroll-padding:88px 0 155px; }
body { margin:0; min-width:320px; background:var(--paper); color:var(--text); font:16px/1.65 var(--body-font); }
button,input,select,textarea { font:inherit; color:inherit; }
button { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid var(--focus); outline-offset:4px;
}
button:disabled { cursor:not-allowed; }
[hidden] { display:none!important; }
h1,h2,h3 { color:var(--ink); font-family:var(--body-font); line-height:1.35; letter-spacing:0; }
h1 { font-size:32px; margin:10px 0; }
h2 { font-size:23px; margin:0 0 16px; }
h3 { font-size:18px; }
p { line-height:1.75; }
.app { max-width:none; margin:0; padding:72px 0 0; min-height:100vh; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:0; padding:24px; margin-top:20px; box-shadow:none; }
.sub,.source-note,.filter-note,.record-status,.question-source,.question-figure figcaption { color:var(--muted); }
.primary,.secondary,.danger,.hero-primary,.hero-secondary {
  border-radius:0; padding:10px 16px; min-height:44px; font-weight:650; border:1px solid var(--ink);
  background:var(--surface); color:var(--ink); cursor:pointer; box-shadow:none; transition:background .2s,border-color .2s;
}
.primary,.hero-primary { color:var(--surface); background:var(--ink); border:2px solid var(--ink); }
.primary:hover:not(:disabled),.hero-primary:hover:not(:disabled) { background:#285646; border-color:#285646; }
.secondary:hover:not(:disabled),.hero-secondary:hover:not(:disabled) { background:var(--sage); }
.primary:active:not(:disabled),.secondary:active:not(:disabled),.hero-primary:active,.hero-secondary:active { box-shadow:inset 0 2px 0 #0003; }
.primary:disabled,.secondary:disabled { opacity:.5; }
.danger,.dont-know { color:#8b352b!important; background:#f9ede3!important; border:1px solid #b47260!important; box-shadow:none; }
.danger:hover:not(:disabled),.dont-know:hover:not(:disabled) { background:#f5d7c7!important; }
.atlas-icon { width:24px; height:24px; flex:none; vertical-align:middle; image-rendering:pixelated; }
.global-nav {
  position:fixed; z-index:70; inset:0 0 auto; height:72px; background:var(--paper); color:var(--ink);
  display:flex; gap:30px; align-items:center; padding:0 max(24px,calc((100vw - 1380px)/2));
  border:0; border-bottom:1px solid var(--ink); border-radius:0; box-shadow:none;
}
.wordmark { display:flex; align-items:center; gap:10px; border:0; background:none; color:var(--ink); font-size:19px; font-weight:750; white-space:nowrap; padding:8px 0; cursor:pointer; }
.wordmark small { display:block; font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.12em; text-align:left; }
.desktop-nav { display:flex; gap:4px; flex:1; justify-content:center; }
.site-nav-button,.nav-text,.mobile-menu-button { font-size:14px; min-height:44px; border:0; background:none; padding:9px 10px; cursor:pointer; color:var(--muted); white-space:nowrap; }
.site-nav-button.active { color:var(--ink); font-weight:750; box-shadow:inset 0 -3px var(--ink); }
.site-nav-button:hover,.nav-text:hover { background:var(--sage); color:var(--ink); }
.nav-actions { display:flex; gap:12px; align-items:center; margin-left:auto; }
.nav-text { display:flex; gap:6px; align-items:center; }
.account-bar { display:flex; align-items:center; gap:8px; border:0; padding:0; margin:0; }
.account-info { font-size:12px; color:var(--muted); max-width:155px; }
.account-info strong { color:var(--ink); }
.avatar-badge { display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--line); color:var(--ink); background:var(--sage); font-size:14px; font-weight:700; }
#logoutButton { min-height:36px; padding:5px 8px; font-size:12px; }
.mobile-menu-button { display:none; }
.mobile-nav { position:absolute; top:72px; right:0; left:0; display:grid; grid-template-columns:repeat(3,1fr); background:var(--surface); padding:12px 20px; border-bottom:2px solid var(--ink); }
.screen { scroll-margin-top:88px; }
.setup-content,.fusion-hero,#result,#dashboard { width:calc(100% - 48px); max-width:1380px; margin-left:auto; margin-right:auto; }
.setup-content { padding-bottom:56px; }
.fusion-hero {
  position:relative; display:flex; justify-content:space-between; align-items:center; gap:24px; margin-top:24px;
  min-height:268px; padding:24px 28px 44px; background:var(--sage); border:1px solid var(--line); overflow:hidden;
}
.atlas-hero-scenes { position:absolute; inset:0; overflow:hidden; }
.atlas-hero-scene { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:75% 50%; image-rendering:pixelated; border:0; opacity:0; transition:opacity .8s ease; }
.atlas-hero-scene.is-active { opacity:1; }
.atlas-hero-scene[data-atlas-scene="2"] { object-position:75% 53%; }
.fusion-hero-copy { position:relative; z-index:1; width:560px; max-width:100%; padding:16px 18px; background:#f5f2e8ee; border:1px solid #b8c6a680; }
.fusion-eyebrow,.login-kicker,.section-kicker { color:var(--muted); font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.12em; }
.fusion-hero-copy p { margin:6px 0 0; font-size:15px; }
.fusion-hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.fusion-hero-actions button { min-height:40px; padding:7px 14px; font-size:14px; }
.atlas-hero-controls { position:absolute; z-index:2; bottom:8px; right:12px; display:flex; gap:3px; padding:3px; background:#f5f2e8ee; border:1px solid #b8c6a6; }
.atlas-hero-controls button { min-height:32px; padding:3px 10px; border:0; background:transparent; color:var(--ink); font-size:11px; cursor:pointer; }
.atlas-hero-controls button[aria-pressed="true"] { color:var(--surface); background:var(--ink); }
.atlas-hero-controls button:hover:not(:disabled) { background:var(--sage); color:var(--ink); }
.atlas-hero-controls button:disabled { color:var(--muted); }
.fusion-hero-progress,.scene-dock { display:none; }
.mode-panel { padding:20px 24px; }
.mode-panel>h2 { font-size:18px; margin-bottom:12px; }
.modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.mode { position:relative; display:grid; grid-template-columns:32px 1fr; align-content:start; align-items:start; gap:2px 10px; min-height:112px; padding:16px; border:1px solid var(--line); border-radius:0; background:var(--surface); text-align:left; color:var(--text); transform:none; }
.mode .atlas-icon { grid-row:1/3; margin-top:3px; }
.mode strong { display:block; color:var(--ink); font-size:17px; margin:0 0 4px; }
.mode small { font-size:12px; line-height:1.7; color:var(--muted); }
.mode::after { content:none; }
.mode:hover:not(:disabled),.mode:focus-visible:not(:disabled) { border-color:var(--ink); background:var(--sage); transform:none; }
.mode:disabled { opacity:.58; background:#ebece3; }
.wrong-mode-tools { display:flex; justify-content:flex-end; margin-top:10px; }
.wrong-mode-tools button { font-size:12px; padding:4px 10px; min-height:32px; }
.mode-panel>.source-note { margin:12px 0 0; font-size:12px; }
.section-head { display:flex; justify-content:space-between; gap:16px; align-items:end; margin-bottom:18px; }
.section-head h2 { margin:3px 0 0; }
.section-head p { font-size:13px; margin:0; color:var(--muted); }
#customBank { padding-bottom:130px; }
.bank-summary { display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:16px; margin:0 0 16px; }
.source-picker-card { background:none; border:0; border-radius:0; padding:0; }
.source-picker-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 8px; }
.source-picker-head strong { font-size:14px; }
.source-picker-head span { font-size:12px; color:var(--muted); }
.source-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.source-choice { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 16px; min-height:64px; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:0; font:inherit; cursor:pointer; transform:none; }
.source-choice strong { font-size:24px; font-variant-numeric:tabular-nums; line-height:1.2; }
.source-choice span { font-size:14px; font-weight:650; white-space:nowrap; margin:0; }
.source-choice.on { border:2px solid var(--ink); padding:11px 15px; background:var(--sage); box-shadow:none; }
.source-choice:hover { border-color:var(--ink); transform:none; }
.source-choice:focus-visible { outline:3px solid var(--focus); outline-offset:3px; transform:none; }
.bank-item { padding:12px; border:1px solid var(--line); border-radius:0; background:var(--paper); text-align:center; }
.visual-count { display:flex; align-items:center; justify-content:center; gap:12px; }
.visual-count strong { font-size:24px; }
.visual-count span { font-size:12px; line-height:1.5; max-width:85px; text-align:left; }
.filter-row { display:flex; align-items:center; gap:16px; margin:0 0 20px; }
.filter-row label { display:flex; align-items:center; gap:10px; flex:none; font-size:14px; }
.filter-row select { min-height:44px; min-width:120px; border:1px solid var(--line); border-radius:0; background:var(--surface); padding:8px 10px; }
.filter-note { flex:1; flex-basis:auto; font-size:12px; margin:0; line-height:1.65; }
.selected-source-note { color:var(--ink); font-weight:700; }
.chapters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; max-height:none; overflow:visible; padding:0 0 20px; }
.chapter {
  position:relative; isolation:isolate; min-width:0; height:176px; padding:0!important; overflow:hidden;
  border:2px solid var(--line); border-radius:0; background:var(--paper); color:var(--ink); text-align:left;
  appearance:none; -webkit-appearance:none; transform:none; box-shadow:none; transition:none; scroll-margin:88px 0 160px;
}
.chapter:not(.on) { background:var(--paper); color:var(--ink); border-color:var(--line); }
.chapter:not(.on) .chapter-copy { background:transparent; color:var(--ink); }
.chapter-art {
  position:absolute; z-index:-1; inset:0; display:block; width:100%; height:100%; object-fit:cover;
  object-position:center; image-rendering:pixelated; opacity:1; transform:none; filter:none;
  mask:none; -webkit-mask:none; clip-path:inset(0 0 0 48%); transition:none;
}
.chapter-copy { position:absolute; z-index:1; inset:0 auto 0 0; display:flex; flex-direction:column; justify-content:center; gap:8px; width:49%; max-width:none; padding:16px 12px; transition:none; }
.chapter-copy strong { font:600 12px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.03em; }
.chapter-copy .chapter-title { font-size:16px; line-height:1.5; font-weight:650; overflow-wrap:anywhere; }
.chapter-copy .chapter-count { font-size:12px; line-height:1.5; color:var(--muted); font-weight:400; }
.chapter-tick { position:absolute; top:10px; right:10px; padding:2px; width:28px; height:28px; background:var(--surface); border:1px solid var(--ink); visibility:hidden; opacity:0; transition:opacity .2s ease; }
.chapter-tick img { width:22px; height:22px; display:block; }
.chapter:hover:not(:disabled) { border-color:var(--moss); background:#eef0df; transform:none; }
.chapter:hover .chapter-art { opacity:1; transform:none; }
.chapter:focus-visible { outline:3px solid var(--focus); outline-offset:4px; }
.chapter.on { border:2px solid var(--ink); background:var(--sage); color:var(--surface); box-shadow:inset 0 0 0 1px var(--ink); font-weight:inherit; }
.chapter.on .chapter-art { clip-path:inset(0); opacity:1; transform:none; }
.chapter.on .chapter-copy {
  inset:10px auto auto 10px; width:max-content; max-width:calc(100% - 62px);
  display:grid; grid-template-columns:auto auto; gap:3px 12px; justify-content:start;
  background:var(--ink); padding:7px 9px; color:var(--surface);
}
.chapter.on .chapter-copy strong { grid-column:1; grid-row:1; font-size:10px; line-height:1.4; }
.chapter.on .chapter-title { grid-column:1/-1; grid-row:2; max-width:190px; font-size:13px; line-height:1.5; }
.chapter.on .chapter-count { grid-column:2; grid-row:1; justify-self:end; color:#d6e0c9; font-size:10px; line-height:1.4; }
.chapter.on .chapter-tick { visibility:visible; opacity:1; }
.chapter:disabled { opacity:1; color:#65705e; background:#e7e7dc; border-color:#d0d1c3; cursor:not-allowed; transform:none; box-shadow:none; }
.chapter:disabled .chapter-art { opacity:.5; }
.chapter:disabled:hover .chapter-art { opacity:.5; transform:none; }
.chapter-fallback { position:absolute; z-index:-2; inset:0 0 0 48%; display:grid; place-content:center; padding:18px; color:var(--ink); background:var(--sage); font-size:13px; text-align:center; }
.chapter.on .chapter-fallback { inset:0; padding-left:55%; }
.chapter.art-failed .chapter-art { visibility:hidden; }
.chapter-tools {
  position:fixed; bottom:16px; left:50%; transform:translateX(-50%); width:min(1330px,calc(100% - 96px)); z-index:25; display:flex; align-items:center; gap:12px;
  margin:0; padding:14px 16px; background:var(--ink); color:var(--surface); border:1px solid var(--ink);
  visibility:hidden; pointer-events:none;
}
body[data-action-dock="shown"] .chapter-tools { visibility:visible; pointer-events:auto; }
.chapter-tool-buttons { display:flex; gap:8px; }
.chapter-tools .secondary { background:#204b3f; color:var(--surface); border-color:#91a18a; font-size:13px; padding:7px 11px; min-height:40px; }
.chapter-tools .secondary:hover { background:#365d4c; }
.chapter-tools .primary { margin-left:auto; background:#e5e9cc; color:var(--ink); border-color:#e5e9cc; white-space:nowrap; }
.chapter-tools .primary:hover:not(:disabled) { background:var(--surface); border-color:var(--surface); }
.selection-summary { display:flex; gap:14px; align-items:baseline; margin:0; font-size:14px; font-variant-numeric:tabular-nums; }
.selection-summary small { font-size:12px; color:#d6e0c9; }
.selection-summary strong { font-size:20px; }
.feedback-panel { padding:20px 24px; }
.feedback-panel h2 { font-size:18px; }
.feedback-panel .sub { font-size:13px; }
.feedback-form { grid-template-columns:180px 1fr; gap:12px 20px; }
.feedback-form label { font-size:14px; }
.feedback-actions { grid-column:1/-1; }
.feedback-form select,.feedback-form textarea,.question-feedback-form select,.question-feedback-form textarea,.login-field input { border:1px solid var(--line); border-radius:0; background:var(--surface); }
.feedback-message { color:var(--ink); font-size:14px; }
.login-wrap { position:relative; display:grid; grid-template-columns:1fr 1fr; align-items:center; max-width:1000px; min-height:600px; margin:48px auto; background:var(--sage); border:1px solid var(--line); }
.login-wrap::before,.login-wrap::after { content:none; }
.login-art { display:block; width:100%; height:430px; object-fit:cover; object-position:right; image-rendering:pixelated; }
.login-card { position:relative; width:100%; margin:0; padding:40px; border:0; border-left:1px solid var(--line); background:var(--surface); min-height:600px; display:flex; flex-direction:column; justify-content:center; }
.login-card h2 { font-size:28px; margin:12px 0; }
.login-card .sub { font-size:14px; }
.login-tabs { display:flex; gap:0; margin:16px 0 20px; border-bottom:1px solid var(--line); }
.login-tabs button { flex:1; min-height:44px; border:0; background:none; font-weight:600; color:var(--muted); cursor:pointer; }
.login-tabs button.active { color:var(--ink); background:var(--sage); box-shadow:inset 0 -3px var(--ink); }
.login-field { font-size:14px; }
.login-field input { min-height:46px; width:100%; padding:10px 12px; }
.login-error { min-height:24px; font-size:14px; }
.guest-login-section { margin:0; border:0; padding:0; }
.guest-login-section h3 { font-size:17px; margin:0 0 8px; }
.guest-login-note { font-size:13px; color:var(--muted); }
#quiz { width:calc(100% - 48px); max-width:960px; margin:24px auto 50px; background:var(--paper); color:var(--text); padding:0; }
#quiz .topline { margin:0 0 12px; align-items:flex-start; }
#counter { font-size:15px; font-weight:700; color:var(--ink); white-space:nowrap; }
.tag { font-size:12px; line-height:1.6; padding:3px 8px; border-radius:0; background:var(--sage); border:1px solid var(--line); color:var(--ink); }
.tag.paper { background:#f3ecd6; border-color:#d9c995; }
.progress { height:5px; border-radius:0; background:#dde1d2; }
.bar { background:var(--ink); }
#quiz>.panel { margin-top:16px; padding:32px; min-height:0; background:var(--surface); border:1px solid var(--line); border-radius:0; box-shadow:none; }
#quiz .question { font:20px/1.9 var(--body-font); margin:0 0 22px; color:var(--text); }
.question-source { font-size:12px; line-height:1.7; border-top:1px solid var(--line); }
.question-feedback-row { justify-content:flex-end; margin:10px 0 18px; }
.question-feedback-row button { font-size:12px; min-height:32px; padding:4px 10px; }
.shared-stem { background:#f4f4e9; border:1px solid var(--line); border-left:3px solid var(--moss); border-radius:0; padding:16px; }
.shared-stem>small { color:var(--ink); letter-spacing:0; }
.supplied-figure,.question-images img,.ce-source-image,.ce-option-image { image-rendering:auto; filter:none; border-radius:0; }
.supplied-table,.ce-source-table,.ce-option-table,.paper-table { color:var(--text); font-family:var(--body-font); }
.supplied-table td,.ce-source-table td,.ce-source-table th,.ce-option-table td,.ce-option-table th,.paper-table td,.paper-table th { border-color:#aebaa8; }
.supplied-table tr:not(:last-child),.ce-option-table th,.ce-source-table th,.paper-table th { background:#eff1e4; }
.option { border:1px solid var(--line); border-radius:0; background:var(--surface); font:17px/1.8 var(--body-font); padding:14px 16px 14px 56px; color:var(--text); transform:none; box-shadow:none; }
.option:hover:not(:disabled) { border-color:var(--ink); background:#f1f2e5; }
.option.selected { background:#eaf0ee; border:2px solid var(--blue); padding:13px 15px 13px 55px; }
.option.correct { background:#e8efe1; border:2px solid #42734c; padding:13px 15px 13px 55px; }
.option.wrong { background:#f8e9e0; border:2px solid #b05b48; padding:13px 15px 13px 55px; }
.option:disabled { opacity:1; }
.letter { width:28px; height:28px; top:16px; left:16px; border:1px solid var(--line); border-radius:0; color:var(--ink); background:var(--paper); font:650 14px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.option.selected .letter { color:var(--surface); background:var(--blue); border-color:var(--blue); }
.option.correct .letter { color:var(--surface); background:#42734c; border-color:#42734c; }
.option.wrong .letter { color:var(--surface); background:#b05b48; border-color:#b05b48; }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.actions #quit { margin-right:auto; }
.feedback { padding:20px; border-radius:0; margin-top:20px; line-height:1.9; font-size:16px; }
.feedback.good { color:var(--text); background:#e8efe1; border:1px solid #719076; }
.feedback.bad { color:var(--text); background:#f9eee4; border:1px solid #c68a73; }
.feedback h3 { font-size:18px; }
.explanation { font:16px/1.9 var(--body-font); margin-top:12px; }
.marking,.review-answer { border-radius:0; background:var(--surface); border-left:3px solid var(--moss); }
.question-feedback-form { border-radius:0; background:#f1f3e7; border-color:var(--line); }
#result,#dashboard { padding:6px 0 50px; }
#result { max-width:1000px; }
.stat,.dashboard-stat { padding:20px; border:1px solid var(--line); border-radius:0; background:var(--sage); font-size:14px; }
.stat strong,.dashboard-stat strong { color:var(--ink); font:700 32px/1.4 var(--body-font); font-variant-numeric:tabular-nums; }
.analysis-box { border:1px solid var(--moss); border-radius:0; background:#edf1e3; }
.analysis-box.alert { border-color:#b67a65; background:#f9eee4; }
.analysis-box.caution { border-color:#b7a365; background:#f7f0da; }
.analysis-box h3 { font-size:19px; }
.level,.weak-topic { border-radius:0; }
.weak { display:flex; justify-content:space-between; align-items:start; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.weak>strong { white-space:nowrap; font-size:14px; }
.level.weak { display:inline-block; padding:3px 9px; }
.review-item { border-radius:0; background:var(--surface); border:1px solid var(--line); }
.review-item summary { min-height:44px; font-size:14px; }
.exam-review { border-color:var(--line); }
.review-question { font:18px/1.9 var(--body-font); }
.wrong-manager,.wrong-question-item,.student-detail,.feedback-entry,.guest-invite-card,.dashboard-empty,.confirm-dialog { border-radius:0; border-color:var(--line); box-shadow:none; }
.wrong-manager-head { display:flex; justify-content:space-between; gap:16px; align-items:start; }
.wrong-manager-head p { margin:0; color:var(--muted); font-size:14px; }
.wrong-question-list { display:grid; gap:12px; margin-top:18px; }
.wrong-question-item { display:grid; grid-template-columns:1fr auto; align-items:start; gap:18px; border:1px solid var(--line); padding:16px; background:var(--surface); }
.wrong-question-heading { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:8px; font-weight:650; }
.wrong-question-meta,.wrong-question-source { font-size:12px; color:var(--muted); }
.wrong-question-item .supplied-figure { max-height:240px; }
.records-table { color:var(--text); }
.records-table th { background:var(--sage); color:var(--ink); }
.records-table tbody tr[data-user]:hover,.records-table tbody tr.selected { background:#edf1e3; }
.student-detail,.feedback-inbox,.feedback-entry,.guest-invite-card { background:var(--surface); }
.invite-settings { gap:10px; }
.invite-settings select { border-radius:0; border-color:var(--line); min-height:44px; }
.invite-code-value { color:var(--ink); background:var(--sage); border-radius:0; }
.confirm-overlay,.search-overlay { position:fixed; z-index:120; inset:0; background:#163b3290; padding:90px 24px 30px; overflow:auto; }
.confirm-overlay { display:grid; align-items:center; justify-items:center; padding:24px; }
.confirm-dialog { max-width:540px; padding:28px; border:1px solid var(--ink); background:var(--surface); }
.search-dialog { max-width:850px; margin:auto; background:var(--surface); padding:24px; border:1px solid var(--ink); }
.search-bar { display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; }
.search-bar label { grid-column:1/-1; color:var(--ink); font-weight:700; }
.search-bar input { width:100%; min-height:48px; background:var(--paper); border:1px solid var(--line); border-radius:0; padding:10px; font-size:16px; }
.search-results { display:grid; margin-top:16px; }
.search-result { display:flex; justify-content:space-between; align-items:center; min-height:64px; gap:12px; padding:12px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:var(--surface); text-align:left; cursor:pointer; }
.search-result strong,.search-result small { display:block; }
.search-result small { font-size:12px; color:var(--muted); margin-top:4px; }
.search-result:hover { background:var(--sage); }
@media (max-width:1180px) {
  .global-nav { gap:20px; padding:0 24px; }
  .account-info { display:none; }
  .desktop-nav { gap:0; }
  .site-nav-button { padding:9px 8px; }
  .chapters { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:850px) {
  .desktop-nav { display:none; }
  .mobile-menu-button { display:block; border:1px solid var(--line); padding:6px 10px; }
  .chapters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .modes { grid-template-columns:1fr; }
  .mode { min-height:88px; }
  .bank-summary { grid-template-columns:1fr; }
  .visual-count { min-height:0; justify-content:flex-start; padding:8px 12px; }
  .visual-count span { max-width:none; }
  .filter-row { align-items:start; }
  .chapter-tools { flex-wrap:wrap; }
  .selection-summary { margin-left:auto; }
  .chapter-tools .primary { width:100%; margin-left:0; }
  .login-wrap { width:calc(100% - 48px); margin:32px auto; min-height:0; }
  .login-art { height:400px; }
  .login-card { padding:28px; min-height:520px; }
}
@media (max-width:600px) {
  html { scroll-padding-top:80px; }
  .app { padding-top:64px; }
  .global-nav { height:64px; padding:0 16px; gap:10px; }
  .wordmark { font-size:16px; gap:8px; }
  .wordmark .atlas-icon { width:24px; height:24px; }
  .wordmark small { font-size:8px; }
  .nav-actions { gap:8px; }
  .nav-text { font-size:0; padding:8px 0; }
  .nav-text .atlas-icon { width:22px; height:22px; }
  .avatar-badge { display:none; }
  #logoutButton { border:0; padding:4px; font-size:12px; }
  .mobile-menu-button { min-height:40px; font-size:12px; padding:6px 9px; }
  .mobile-nav { top:64px; padding:12px; }
  .mobile-nav .site-nav-button { font-size:13px; }
  .setup-content,.fusion-hero,#result,#dashboard { width:calc(100% - 32px); }
  .fusion-hero { display:block; padding:108px 14px 52px; min-height:340px; margin-top:16px; }
  .fusion-hero-copy { padding:14px; }
  .atlas-hero-scene,#fusionHeroImage { display:block; object-position:78% 50%; }
  .atlas-hero-controls { bottom:5px; right:5px; left:5px; justify-content:center; }
  .atlas-hero-controls button { min-height:44px; padding:4px 10px; }
  .fusion-hero-copy h1 { font-size:27px; margin:8px 0; }
  .fusion-hero-copy p { font-size:13px; }
  .fusion-hero-actions { gap:8px; }
  .fusion-hero-actions button { padding:7px 10px; font-size:12px; }
  .panel { margin-top:16px; padding:18px; }
  .mode-panel { padding:18px; }
  .mode { min-height:92px; padding:14px; }
  .mode strong { font-size:16px; }
  .mode small { font-size:12px; }
  .mode-panel>.source-note { font-size:11px; }
  #customBank { padding:18px 0 148px; border:0; background:none; }
  .section-head { margin-bottom:18px; align-items:start; }
  .section-head h2 { font-size:23px; }
  .section-head p { font-size:11px; max-width:104px; }
  .bank-summary { gap:10px; }
  .source-picker-head { align-items:start; }
  .source-picker-head span { max-width:146px; text-align:right; font-size:11px; }
  .source-choice { padding:10px 8px; display:block; text-align:left; min-height:75px; }
  .source-choice.on { padding:9px 7px; }
  .source-choice strong { display:block; font-size:23px; }
  .source-choice span { display:block; font-size:12px; margin-top:5px; }
  .visual-count { background:var(--surface); }
  .visual-count strong { font-size:18px; }
  .visual-count span { font-size:11px; }
  .filter-row { display:block; margin-bottom:18px; }
  .filter-row label { justify-content:space-between; }
  .filter-row select { flex:1; max-width:230px; }
  .filter-note { display:block; margin:10px 0 0; font-size:11px; }
  .chapters { grid-template-columns:1fr; gap:12px; padding-bottom:16px; }
  .chapter { height:176px; }
  .chapter-copy { padding:16px; }
  .chapter-copy .chapter-title { font-size:17px; }
  .chapter-copy strong { font-size:12px; }
  .chapter.on .chapter-copy { inset:10px auto auto 10px; width:max-content; padding:7px 9px; }
  .chapter.on .chapter-copy strong { font-size:10px; }
  .chapter.on .chapter-title { font-size:13px; }
  .chapter-tools { bottom:0; width:calc(100% - 24px); padding:12px; margin:0; gap:9px; }
  .chapter-tool-buttons { gap:6px; }
  .chapter-tools .secondary { padding:6px 8px; font-size:11px; min-height:36px; }
  .selection-summary { display:block; text-align:right; font-size:12px; }
  .selection-summary strong { font-size:16px; }
  .selection-summary small { display:block; font-size:10px; }
  .chapter-tools .primary { min-height:44px; font-size:14px; }
  .feedback-form { grid-template-columns:1fr; }
  .login-wrap { display:block; width:calc(100% - 32px); margin:16px auto 32px; border:0; }
  .login-art { width:100%; height:154px; object-position:75% 50%; }
  .login-card { min-height:0; padding:26px 22px; border:1px solid var(--line); }
  .login-card h2 { font-size:25px; }
  #quiz { width:100%; max-width:none; margin:18px 0 32px; }
  #quiz .topline { padding:0 16px; gap:8px; }
  #quiz .progress { width:calc(100% - 32px); margin:auto; }
  #quiz>.panel { padding:24px 16px; margin-top:14px; border-width:1px 0; }
  #quiz .question { font-size:18px; line-height:1.9; }
  #quiz .meta { gap:5px; }
  .tag { font-size:11px; }
  .option { font-size:16px; padding:12px 12px 12px 50px; }
  .option.selected,.option.correct,.option.wrong { padding:11px 11px 11px 49px; }
  .letter { top:15px; left:12px; }
  .actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .actions #quit { margin-right:0; }
  #submit,#next { grid-column:1/-1; }
  .actions button { font-size:13px; min-height:44px; }
  .feedback { padding:16px; font-size:15px; }
  .feedback h3 { font-size:16px; }
  .explanation { font-size:16px; }
  .result-grid { grid-template-columns:repeat(3,1fr); gap:6px; }
  .stat { padding:14px 3px; font-size:11px; }
  .stat strong { font-size:23px; }
  .weak { display:block; }
  .weak>strong { display:block; margin-top:6px; }
  .wrong-manager-head { display:block; }
  .wrong-manager-head button { margin-top:12px; width:100%; }
  .wrong-question-item { grid-template-columns:1fr; }
  .wrong-question-item .danger { min-height:44px; }
  .dashboard-head { display:block; }
  .dashboard-head>button { margin-top:12px; }
  .dashboard-stats { grid-template-columns:repeat(3,1fr); gap:5px; }
  .dashboard-stat { padding:12px 3px; font-size:10px; }
  .dashboard-stat strong { font-size:23px; }
  .search-overlay { padding:80px 16px 24px; }
  .search-dialog { padding:18px; }
  .search-bar { grid-template-columns:1fr; }
  .search-bar button { justify-self:end; }
  .confirm-dialog { padding:22px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}
@media print {
  .global-nav,.fusion-hero,.chapter-tools,.question-feedback-row,.wrong-sync-retry { display:none!important; }
  body,.app,#quiz { background:#fff; }
  .app { padding:0; }
  #result,#quiz { width:100%; margin:0; }
  .panel { border-color:#777; }
}
