/* v34: recovered v32 palettes, alongside the retained v33 themes. */
:root[data-theme=vivid-v2]{color-scheme:light;--bg:#fbf6ff;--card:#ffffff;--line:#e3d8ef;--ink:#281c42;--muted:#625772;--brand:#7035b9;--gold:#6931b4;--mint:#086c59;--panel:#fff;--raised:#f1e6ff;--field:#f8f2ff;--secondary:#f0e7fa;--secondary-line:#ccbae3;--hero:linear-gradient(120deg,#eee1ff,#dff8ef);--hero-line:#d9c7eb;--hero-ink:#392454;--hero-button:#7035b9;--hero-button-ink:#fff;--hero-button-line:#7035b9;--button-line:#7035b9;--badge-bg:#eee3ff;--badge-line:#d4bfef;--selected-bg:#eee3ff;--selected-line:#9c70d0;--timer-bg:#eee3ff;--timer-line:#b692d9;--urgent-bg:#ffe5eb;--urgent-ink:#a51a42;--urgent-line:#d77c99;--good-bg:#e4f5ec;--good-line:#6da48e;--bad-bg:#ffedf2;--bad-line:#cf8b9f;--bad-ink:#a4254d;--nav-bg:#fff;--progress-bg:#e8dff1;--question-ink:#392a4e;--letter-bg:#ffeaf0;--letter-line:#deb4c2;--resume-bg:#f0e8fb;--resume-line:#b99bda;--notice-bg:#e8f8f2;--notice-line:#98bfb0;--notice-ink:#176451;--future:#7035b9;--future-soft:#eee3ff;--read-answer:#086c59;--read-context:#195b83;--read-question:#6931b4;--asked-bg:transparent;--plain-question:#6931b4;--memory-question:#6931b4;--arcade-bg:#eee3ff;--arcade-star:#7d5a9e;--arcade-ship:#095f53;--arcade-enemy:#a51a42;--arcade-shot:#6630ae}
:root[data-theme=vivid-v2]{--asked-ink:var(--plain-question);--context-ink:#195b83;--noquestion-ink:var(--plain-question);--memory-question:var(--plain-question);--strong-red:#ce0027}
:root[data-theme=vivid-v2]{--bg:#e8dcf5;--card:#f9f4ff;--panel:#f9f4ff;--field:#f1e8fc;--raised:#ded0f2;--nav-bg:#f1e7fb;--line:#c7b4df}
:root[data-theme=mono-v2]{color-scheme:light;--bg:#f2f2f2;--card:#fff;--line:#cecece;--ink:#171717;--muted:#555;--brand:#292929;--gold:#343434;--mint:#313131;--panel:#fff;--raised:#e9e9e9;--field:#fafafa;--secondary:#ececec;--secondary-line:#aaa;--hero:linear-gradient(120deg,#e2e2e2,#fafafa);--hero-line:#aaa;--hero-ink:#292929;--hero-button:#292929;--hero-button-ink:#fff;--hero-button-line:#292929;--button-line:#292929;--badge-bg:#e9e9e9;--badge-line:#aaa;--selected-bg:#ddd;--selected-line:#333;--timer-bg:#e7e7e7;--timer-line:#888;--urgent-bg:#d2d2d2;--urgent-ink:#111;--urgent-line:#333;--good-bg:#e6e6e6;--good-line:#555;--bad-bg:#eee;--bad-line:#333;--bad-ink:#111;--nav-bg:#fff;--progress-bg:#d7d7d7;--question-ink:#202020;--letter-bg:#eee;--letter-line:#888;--resume-bg:#e5e5e5;--resume-line:#888;--notice-bg:#e8e8e8;--notice-line:#999;--notice-ink:#222;--plain-question:#191919;--asked-ink:var(--plain-question);--context-ink:#535353;--read-answer:#222;--noquestion-ink:var(--plain-question);--memory-question:var(--plain-question);--future:#292929;--future-soft:#2929290d;--strong-red:#151515;--arcade-bg:#171717;--arcade-star:#aaa;--arcade-ship:#fff;--arcade-enemy:#a5a5a5;--arcade-shot:#f0f0f0}
:root[data-theme=naruto-v2]{color-scheme:light;--bg:#fff3e4;--card:#fffdf9;--panel:#fff;--line:#bddcf1;--ink:#172b50;--muted:#56647b;--brand:#c8510a;--gold:#b84707;--mint:#156687;--raised:#e9f6ff;--field:#fff;--secondary:#eaf6ff;--secondary-line:#85bedf;--hero:linear-gradient(125deg,#18365f,#245b91);--hero-line:#7fcbff;--hero-ink:#fff;--hero-button:#e76f12;--hero-button-ink:#102742;--hero-button-line:#ffb562;--button-line:#a63e04;--badge-bg:#ffead1;--badge-line:#d99352;--selected-bg:#fff0de;--selected-line:#e67825;--timer-bg:#edf8ff;--timer-line:#86c8ec;--urgent-bg:#fff0ed;--urgent-ink:#a22f22;--urgent-line:#df968b;--good-bg:#e7f7ef;--good-line:#6aab8a;--bad-bg:#fff0ed;--bad-line:#d9988d;--bad-ink:#982b20;--nav-bg:#fffdf9f5;--progress-bg:#d8efff;--context-ink:#172b50;--read-context:#172b50;--question-ink:#183655;--plain-question:#a93e06;--asked-ink:#a93e06;--read-answer:#135881;--noquestion-ink:#a93e06;--letter-bg:#ffe5c8;--letter-line:#d7a16c;--resume-bg:#fff3dd;--resume-line:#d9a265;--notice-bg:#e8f5f4;--notice-line:#84b7b1;--notice-ink:#205f64;--future:#b14a0c;--future-soft:#56beff28;--strong-red:#b73f3f}
[data-theme=naruto-v2] body{background:radial-gradient(ellipse at top left,#88d8ff48,transparent 43%),radial-gradient(ellipse at top right,#ffd09c80,transparent 55%),var(--bg)}
[data-theme=naruto-v2] .card,[data-theme=naruto-v2] .book{box-shadow:inset 3px 0 #f28a30,0 4px 18px #142c4e07}
[data-theme=naruto-v2] .brand-icon{background:#ff963b;color:#142e53;border-color:#ba570c}
[data-theme=naruto-v2] .primary{background:linear-gradient(135deg,#d15c0c,#b74606);color:#fff}
[data-theme=naruto-v2] .theme-preview.naruto-young{background:linear-gradient(145deg,#ffa14b 52%,#79cfff 52%,#79cfff 68%,#193a64 68%)}
[data-theme=naruto-v2] .hero{box-shadow:0 0 0 1px #83d0ff44,0 8px 24px #184f7520}[data-theme=naruto-v2] .nav button.active{color:#176395;background:#cceeff}[data-theme=naruto-v2] .timer{box-shadow:0 0 0 3px #71c7ff18}[data-theme=naruto-v2] .leaf-mark{filter:drop-shadow(0 0 18px #68caff)}[data-theme=naruto-v2] .chakra-orbit.second{border-bottom-color:#8ad9ff;box-shadow:0 0 12px #70d2ff30}
:root[data-theme=naruto-v2]{--read-answer:#087337;--quiz-answer:#087337}
[data-theme=naruto-v2] .reading-answer strong,[data-theme=naruto-v2] .reading-answer>span{color:var(--read-answer)}
[data-theme=naruto-v2] .answer>span:not(.letter){color:var(--quiz-answer);font-weight:650}
[data-theme=naruto-v2] .answer.correct>span:not(.letter){color:#08662f}
[data-theme=naruto-v2] .answer.wrong>span:not(.letter){color:var(--bad-ink)}
[data-theme=naruto-v2] .answer-note{color:#087337}

/* Mark VI armor: deep red, gold, silver edges and a restrained cyan HUD. */
:root[data-theme=ironman]{color-scheme:dark;--bg:#111722;--card:#212730;--panel:#26303d;--raised:#343e4d;--field:#151c26;--line:#687380;--ink:#f8f6f2;--muted:#c5cbd3;--brand:#a7273c;--gold:#f6d58e;--mint:#a2efd0;--future:#7cdef5;--future-soft:#7cdef516;--secondary:#303643;--secondary-line:#8294a7;--nav-bg:#141b25;--hero:linear-gradient(120deg,#532431,#243d4f);--hero-line:#95a6b4;--hero-ink:#f8f6f2;--hero-button:#a7273c;--hero-button-ink:#fff;--hero-button-line:#e7a1a6;--button-line:#e7a1a6;--read-answer:#a2efd0;--read-context:#dbe3ed;--read-question:#7cdef5;--plain-question:#a5eaff;--question-ink:#f8f6f2;--context-ink:#dbe3ed;--strong-red:#ff9ca9;--letter-bg:#382d37;--letter-line:#a38b78;--badge-bg:#2d3744;--badge-line:#95a6b4;--selected-bg:#203f50;--selected-line:#7cdef5;--progress-bg:#394651;--good-bg:#203d34;--good-line:#79bb9b;--bad-bg:#482934;--bad-line:#d58d9c;--bad-ink:#ffcad3;--notice-bg:#243b47;--notice-line:#8cb7ca;--notice-ink:#d4f5ff;--resume-bg:#35333d;--resume-line:#b3a58d;--timer-bg:#203d34;--timer-line:#79bb9b;--urgent-bg:#492831;--urgent-line:#e1959e;--urgent-ink:#ffc3cd;--arcade-bg:#111722;--arcade-star:#e9c77c;--arcade-ship:#7cdef5;--arcade-enemy:#ff8e9c;--arcade-shot:#baffee}
[data-theme=ironman] body{background-image:radial-gradient(ellipse at 100% 0,#7cdef512,transparent 48%),linear-gradient(#c6d0db06 1px,transparent 1px),linear-gradient(90deg,#c6d0db06 1px,transparent 1px);background-size:auto,38px 38px,38px 38px}
[data-theme=ironman] .card:not(.admission-card),[data-theme=ironman] .book,[data-theme=ironman] .block-choice{background:linear-gradient(125deg,#acb8c80b,transparent 45%),var(--card);border-top-color:#c4ced8;box-shadow:inset 3px 0 0 #a7273c,inset 0 -1px 0 #f6d58e38,0 5px 18px #0002}
[data-theme=ironman] .brand-icon{filter:drop-shadow(0 0 7px #7cdef550)}
[data-theme=ironman] .primary{background:linear-gradient(110deg,#b62b40,#842335);color:#fff;border-color:#cdb28b;box-shadow:inset 0 1px 0 #f9e6b780,0 3px 14px #0002}
[data-theme=ironman] .secondary{color:#f8f6f2;border-color:#95a6b4}
[data-theme=ironman] .learning-dashboard{border-color:#95a6b4}
[data-theme=ironman] .timer{color:#b3f3d6;text-shadow:none}
[data-theme=ironman] .timer.urgent{color:var(--urgent-ink)}

/* Keep dark themes readable where historical rules assumed a light surface. */
:root[data-theme=naruto-young]{--quiz-answer:#a2eb80;--strong-red:#ffb8a9}
:root[data-theme=forest]{--strong-red:#ffc0b8}
:root[data-theme=mono]{--strong-red:#e7ebf0}
[data-theme=naruto-young] .answer.correct>span:not(.letter){color:var(--mint)}
[data-theme=naruto-young] .answer-note{color:var(--mint)}
:root:is([data-theme=naruto-young],[data-theme=mono],[data-theme=forest],[data-theme=ironman]) .exam-countdown{--countdown-ink:var(--ink);--verse-ink:var(--ink);--verse-ref:var(--gold);--cancel-ink:#ffb6b3}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .exam-countdown{--countdown-ink:var(--ink);--verse-ink:var(--ink);--verse-ref:var(--gold);--cancel-ink:#b92737}
:root:is([data-theme=naruto-young],[data-theme=mono],[data-theme=forest],[data-theme=ironman]) .review-item{--review-green:#a8e9c4;--review-red:#ffc2c6;--review-good-fill:#22452f;--review-bad-fill:#4b2935;--review-good-line:#76ae87;--review-bad-line:#d38b98}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .review-item{--review-green:#086a3c;--review-red:#b41737;--review-good-fill:#e6f5ec;--review-bad-fill:#fdecef;--review-good-line:#2ba56a;--review-bad-line:#dc4b66}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .psa-kicker{color:#3f663d}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .pdf-book-status.available{color:#126943}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .welcome-notice h2 .emoji-icon{filter:none}

/* All seven themes have independent, named previews. */
.theme-preview.naruto-v2{background:linear-gradient(145deg,#ffa14b 52%,#79cfff 52%,#79cfff 68%,#193a64 68%)}
.theme-preview.naruto-v2 i:nth-child(1){background:#d96113}.theme-preview.naruto-v2 i:nth-child(2){background:#193a64}.theme-preview.naruto-v2 i:nth-child(3){background:#fff3e4}
.theme-preview.vivid-v2{background:#d7c2ed}.theme-preview.vivid-v2 i:nth-child(1){background:#7035b9}.theme-preview.vivid-v2 i:nth-child(2){background:#0d8b7c}.theme-preview.vivid-v2 i:nth-child(3){background:#e96082}
.theme-preview.mono-v2{background:#d5d5d5}.theme-preview.mono-v2 i:nth-child(1){background:#fff}.theme-preview.mono-v2 i:nth-child(2){background:#222}.theme-preview.mono-v2 i:nth-child(3){background:#888}
.theme-preview.ironman{background:linear-gradient(130deg,#963044,#4c647a)}.theme-preview.ironman i:nth-child(1){background:#d04b58}.theme-preview.ironman i:nth-child(2){background:#f6d58e}.theme-preview.ironman i:nth-child(3){background:#c5deec}
.theme-preview.naruto-young{background:#17263d}
.settings-layout .theme-option strong{overflow-wrap:anywhere}
.settings-layout .theme-option:last-child{grid-column:1/-1}

/* The main admission card stays bright within every surrounding palette. */
:root{--exam-surface:#fffaf5;--exam-tint:#fff1dd;--exam-control:#fffdf9;--exam-panel:#f7eddf;--exam-line:#d6c9ba;--exam-ink:#302d30;--exam-muted:#655a53}
:root[data-theme=naruto-young]{--exam-surface:#fffaf4;--exam-tint:#eaf3fa;--exam-control:#fffdf9;--exam-panel:#f2eee9;--exam-line:#c4ccd6;--exam-ink:#23334c;--exam-muted:#526174}
:root[data-theme=forest]{--exam-surface:#fafbf5;--exam-tint:#eaf1df;--exam-control:#fffefa;--exam-panel:#f0f2e6;--exam-line:#c8d1ba;--exam-ink:#2c382d;--exam-muted:#52624f}
:root:is([data-theme=mono],[data-theme=mono-v2]){--exam-surface:#fcfaf7;--exam-tint:#f0ede6;--exam-control:#fffefa;--exam-panel:#f1eeea;--exam-line:#cbc6bf;--exam-ink:#302e2d;--exam-muted:#625f5a}
:root[data-theme=vivid-v2]{--exam-surface:#fffafd;--exam-tint:#f4eafa;--exam-control:#fffdfd;--exam-panel:#f5edf6;--exam-line:#d9c6df;--exam-ink:#382b42;--exam-muted:#695772}
:root[data-theme=ironman]{--exam-surface:#fffbf4;--exam-tint:#ede9e3;--exam-control:#fffdf8;--exam-panel:#f1ede4;--exam-line:#c4b9a6;--exam-ink:#302e35;--exam-muted:#625d64}
.card.admission-card{color-scheme:light;--admission-red:#bd1735;--admission-soft:#dc23440c;--card:var(--exam-surface);--panel:var(--exam-panel);--field:var(--exam-control);--raised:var(--exam-panel);--ink:var(--exam-ink);--muted:var(--exam-muted);--line:var(--exam-line);--secondary:var(--exam-control);--secondary-line:var(--exam-line);--gold:var(--admission-red);background:linear-gradient(140deg,var(--exam-tint),var(--exam-surface) 65%);color:var(--exam-ink);border:1px solid #dbb9ba;border-top:3px solid var(--admission-red);border-left:4px solid var(--admission-red);box-shadow:0 5px 22px #a51a3215}
.admission-card .time-options button{background:var(--exam-control);color:var(--exam-ink);border-color:var(--exam-line)}
.admission-card .time-options button.active{background:#dc23440c;color:var(--admission-red);border-color:var(--admission-red)}
.admission-card .exam-saved{background:var(--exam-panel);border-color:var(--exam-line)}
.admission-card .exam-saved strong{color:var(--exam-ink)}
.admission-card .secondary{color:var(--exam-ink);background:var(--exam-control);border-color:var(--exam-line)}
.admission-card .admission-start{border-radius:11px}

/* PSA viewing is a document surface. Android opens the same four sheets in an immersive activity. */
body.psa-images-fullscreen{overflow:hidden;background:#e7e4dd}
body.psa-images-fullscreen #app>main{position:fixed;inset:0;max-width:none;margin:0;padding:0;min-height:0;height:100%;background:#e7e4dd}
body.psa-images-fullscreen .nav,body.psa-images-fullscreen .mini-player,body.psa-images-fullscreen .top{display:none!important}
.psa-fullscreen-document{position:absolute;inset:0;border:0;width:100%;height:100%;background:#e7e4dd}
body.psa-session .exam-submit{background:#4f754e!important;border-color:#a8c799!important;color:#fff!important}

/* Readable options and A–E labels in neutral, selected, correct and wrong states. */
:root{--option-ink:var(--ink);--incise-ink:var(--gold);--option-correct-ink:#a8e9c4}
:root[data-theme=naruto-young]{--option-ink:#b7f29c;--incise-ink:#ffd0a3;--option-correct-ink:#b7f29c}
:root[data-theme=forest]{--option-ink:#ddf8d9;--incise-ink:#e7f8dd;--option-correct-ink:#b8f4cc}
:root[data-theme=mono]{--option-ink:#f2f4f7;--incise-ink:#fbfcff;--option-correct-ink:#c6f0d5}
:root[data-theme=ironman]{--option-ink:#eff6fb;--incise-ink:#ffe5a4;--option-correct-ink:#a2efd0}
:root[data-theme=naruto-v2]{--option-ink:#08662f;--incise-ink:#983b08;--option-correct-ink:#08662f}
:root[data-theme=vivid-v2]{--option-ink:#342449;--incise-ink:#7b204b;--option-correct-ink:#086349}
:root[data-theme=mono-v2]{--option-ink:#171717;--incise-ink:#1b1b1b;--option-correct-ink:#1b1b1b}
.answers .answer>span:not(.letter){color:var(--option-ink);font-weight:700}
.answers .answer .letter{color:var(--incise-ink);background:var(--letter-bg);border-color:var(--letter-line);font-weight:850}
.answers .answer.chosen .letter{color:var(--incise-ink);background:var(--selected-bg);border-color:var(--selected-line)}
.answers .answer.correct>span:not(.letter),.answers .answer.correct .letter{color:var(--option-correct-ink)}
.answers .answer.correct .letter{background:var(--good-bg);border-color:var(--good-line)}
.answers .answer.wrong>span:not(.letter),.answers .answer.wrong .letter{color:var(--bad-ink)}
.answers .answer.wrong .letter{background:var(--bad-bg);border-color:var(--bad-line)}
body.psa-session .answers .answer.chosen .letter{background:#a6c992;color:#132417;border-color:#d4edc5}
body.psa-session .answers .answer.chosen>span:not(.letter){color:#effce8}
:root:is([data-theme=naruto-v2],[data-theme=vivid-v2],[data-theme=mono-v2]) .psa-session .quiz-mode:before{color:#3f663d}

/* A single flat surface prevents a rectangular header against a page gradient. */
html body.in-session{background:var(--bg);background-image:none}
.in-session .session-header{background:var(--bg);background-image:none;box-shadow:none}
