/* Explicit, persistent themes. Light is the default; navigation never selects a theme. */
html[data-theme]{--ink:var(--text);--muted:var(--text-muted);--line:var(--border);--bg:var(--page);--soft:var(--hint-bg)}
html .language-picker{background:transparent;border:0;padding:0}
/* A light support surface keeps the official dark body legible; the PNG is unchanged. */
html[data-theme=dark] .with-character .brand-character,html[data-theme=dark] .onboard-dialog .brand-character{background:#eef2e7;border-radius:20px;padding:8px}
html[data-theme] .btn.secondary:hover{background:var(--surface-alt);color:var(--text)}
html[data-theme] .btn:disabled:hover,html[data-theme] .move-btn:disabled{opacity:1;background:var(--surface-alt);color:var(--text-muted);border-color:var(--border)}
html{color-scheme:light;--page:#f7f8f4;--surface:#fff;--surface-alt:#eef2e7;--text:#252922;--text-muted:#546047;--border:#c7d0bd;--hint-bg:#eef6e1;--selected:#e8f5d2;--selected-border:#52721e;--control:#fff;--control-text:#25301b}
html[data-theme=dark]{color-scheme:dark;--page:#20231e;--surface:#292e25;--surface-alt:#333b2c;--text:#f5f7ef;--text-muted:#c7d2bb;--border:#69785c;--hint-bg:#35442b;--selected:#3e542c;--selected-border:#adf22e;--control:#30382a;--control-text:#f5f8ee}
html body,html #main[data-screen],html #main{background:var(--page);color:var(--text)}
html #main[data-screen=quiz],html #main[data-screen=summary],html #main[data-screen=plans]{margin-top:0;border-radius:0;min-height:calc(100svh - 88px)}
html .header,html .mobile-nav{background:var(--surface);border-color:var(--border)}
html .header-end .xp-pill,html .desktop-nav,html .desktop-nav button{background:var(--surface);color:var(--text)}
html .desktop-nav button.active{background:var(--surface-alt);color:var(--text)}
.theme-picker{display:flex;align-items:center}.theme-picker select,.language-picker select{font:inherit;font-size:13px;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:12px;min-height:44px;padding:8px 10px;max-width:130px}
html .header-end{gap:10px}html .intro .eyebrow,html .dose-summary .intro .eyebrow,html .welcome-copy .lead,html .today-invite p,html .constancy,html .subtle,html .muted,html .fineprint,html .source-language{color:var(--text-muted)}
html .btn.secondary,html .question-card .btn.secondary,html .featured-discovery .btn.secondary,html .next-topics .btn.secondary,html .dose-summary>.account-actions .btn.secondary,html .subscription-shell>.btn.secondary{background:var(--control);color:var(--control-text);border-color:var(--border)}
html .btn.primary{background:#adf22e;color:#17220a;border:1px solid #638425}
html .btn[aria-pressed=true]{background:var(--selected);border:2px solid var(--selected-border);color:var(--text)}
html .btn:disabled{opacity:1;background:var(--surface-alt);border-color:var(--border);color:var(--text-muted);cursor:not-allowed}
html .btn:focus-visible,html .answer:focus-visible,html select:focus-visible,html input:focus-visible,html a:focus-visible,html summary:focus-visible,html button:focus-visible{outline:3px solid #4e88d8;outline-offset:4px}
html .btn:hover,html .btn.secondary:hover{filter:none;background:var(--surface-alt);color:var(--text)}html .btn.primary:hover{background:#bafb4c;color:#17220a}
html .quiz-progress-info,html .session-xp{color:var(--text-muted)}html .quiz-track{background:var(--border)}html .quiz-track span{background:#86b322}
html .quiz-top .icon-btn,html .subscription-shell>.icon-btn{background:var(--surface);border-color:var(--border);color:var(--text)}
html .question-card{background:var(--surface);border:1px solid var(--border);padding:32px;border-radius:24px;color:var(--text)}
html .question-card>.eyebrow,html .question-hint{color:var(--text-muted)}html .question-card h1{max-width:820px;line-height:1.28}
html .answer{background:var(--surface);border-color:var(--border);color:var(--text);position:relative;min-height:76px;align-items:center}
html .answer-letter{background:var(--surface-alt);color:var(--text)}
html .answer:not(:disabled):hover{background:var(--surface-alt);border-color:var(--selected-border)}
html .answer.picked{background:var(--selected);border:2px solid var(--selected-border);color:var(--text)}
html .answer.picked .answer-letter{background:#adf22e;color:#17220a}
html .answer.correct{background:#ddf2bd;border:2px solid #4d741b;color:#17220a}html .answer.correct .answer-letter{background:#adf22e;color:#17220a}
html .answer.selected{background:var(--surface-alt);border:2px solid #82936c;color:var(--text)}html .answer.dim{opacity:1;color:var(--text-muted)}
html .check-action .btn{min-height:54px}html .learning-actions{gap:12px}html .hint-copy{background:var(--hint-bg);color:var(--text);display:flex;align-items:center;gap:14px}html .hint-copy .brand-icon{width:40px;height:auto;flex-shrink:0}
html .feedback{background:var(--hint-bg);border:1px solid var(--border);color:var(--text)}html .feedback h2{color:var(--text)}html .feedback .chosen-answer{color:var(--text-muted)}
html .question-card .source-panel,html .featured-discovery .source-panel{color:var(--text);border-color:var(--border)}html .source-panel{background:var(--hint-bg);color:var(--text);border-color:var(--border)}
html .order-list li,html .match-bank span,html .match-list label,html .structured-result{background:var(--surface-alt);border-color:var(--border);color:var(--text)}html .order-number{color:var(--text-muted)}html .move-btn{color:var(--text);background:var(--control);border-color:var(--border)}html .match-list select{background:var(--control);color:var(--text);border-color:var(--border)}
html .mini-metrics>div,html .world-tile,html .stats-row,html .insight-card,html .library-entry,html .account-layout>section,html .checkout-summary,html .checkout-controls,html .featured-discovery,html .subscription-card{background:var(--surface);border-color:var(--border);color:var(--text)}
html .mini-metrics span,html .discovery-heading small,html .summary-numbers span,html .completion-ring small,html .subscription-shell>p{color:var(--text-muted)}
html .filter-row button,html .library-search input,html .profile-form input,html .login-form input,html #preferences input[type=time]{background:var(--surface);color:var(--text);border-color:var(--border)}
html .filter-row button.active{background:var(--selected);color:var(--text);border:2px solid var(--selected-border)}html .collection-tabs button{color:var(--text)}html .collection-tabs button[aria-pressed=true]{border-color:var(--selected-border)}
html .icon-cover{background:var(--surface-alt)}html .icon-cover .world-icon,html .world-tile .world-icon{background:#fff;border-radius:14px;padding:5px}
html .next-topics,html .summary-numbers>div{border-color:var(--border)}html .next-topics .btn[aria-pressed=true]{background:var(--selected)}html .featured-discovery>.eyebrow{color:var(--text-muted)}
html .dose-summary .join-card,html .join-card{background:var(--hint-bg);color:var(--text);border:1px solid var(--border)}html .join-card h2{color:var(--text)}
html .preview-strip,html .local-notice,html .test-outcome{background:var(--hint-bg);color:var(--text);border-color:var(--border)}html .legal-links a,html #main[data-screen=plans] .legal-links a{color:var(--text-muted)}
html .error-box{background:var(--surface-alt);color:var(--text);border-color:#bd7c43}html .tag{border-color:var(--border);color:var(--text)}html .checkout-controls>.tag{background:var(--hint-bg)}
html dialog,html #learning-dialog,html #confirm-dialog{background:var(--surface);color:var(--text);border:1px solid var(--border)}html dialog p,html #learning-dialog p,html #learning-dialog .source-language{color:var(--text-muted)}html #learning-dialog .learning-actions{background:var(--surface)}html .learning-diagram>div{background:var(--hint-bg)}html .curiosity-card{background:var(--surface-alt);border-color:var(--border);color:var(--text)}html .curiosity-card .eyebrow,html .curiosity-source{color:var(--text)}
html .wondy-message,html .question-card .wondy-message,html .dose-summary .wondy-message{background:transparent;color:var(--text);padding:0}
html .brand-icon{object-fit:contain;object-position:center;filter:none;transform:none;width:42px;height:auto;border-radius:0;flex:0 0 auto}
html .brand-character{display:block;width:170px;height:auto;object-fit:contain;object-position:center;filter:none;transform:none;flex-shrink:0;max-width:100%}
html .with-character{gap:22px;align-items:center}html .with-character .brand-character{width:155px;height:auto}html .welcome-copy .with-character{max-width:550px;margin-top:24px}html .welcome-copy .with-character p{max-width:310px;font-size:16px}
html .dose-summary .with-character{justify-content:center}html .onboard-dialog .brand-character{width:125px;height:auto;margin:0 auto 12px}html .subscription-shell>.brand-icon{display:block;width:64px;margin:12px auto 26px}
/* Help is a white utility surface in both themes. Its icon uses black eyes. */
.welcome-visual{position:relative;min-width:0}.welcome-visual .welcome-photo{margin:0;height:480px}.welcome-visual .welcome-character{position:absolute;right:16px;bottom:34px;width:145px;filter:none}.welcome-guidance{max-width:390px;line-height:1.6;color:var(--text-muted);margin-top:22px}
@media(max-width:760px){html .welcome-layout{gap:16px}html .welcome-visual{order:2}html .welcome-visual .welcome-photo{height:220px}html .welcome-visual .welcome-character{width:105px;right:12px;bottom:22px}html .welcome-copy h1{font-size:30px;line-height:1.15}html .welcome-copy .lead{font-size:17px;line-height:1.5}html .welcome-guidance{order:6;font-size:14px;margin-top:0}body:has(.welcome-layout) .mobile-nav{display:none}html .header-inner{padding:10px 16px;gap:6px 18px}}
html .help-button{background:#fff;color:#242523;border-color:#c7d0bd}html .help-button .brand-icon{width:26px;height:auto}
html .welcome-photo{height:480px}html .welcome-copy h1{font-size:clamp(30px,3.3vw,44px)}html .welcome-layout{gap:42px}
html .passport-large{background:#242523;color:#f5f7ef}html .passport-large p{color:#dce3cf}
html .review-notice{padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--surface-alt);color:var(--text)}html[data-theme=dark] .note{color:var(--text-muted)}html .aff{background:var(--surface-alt)}html .plans article{border-color:var(--border)}html .worldline{border-color:var(--border)}html .official-companion{width:160px;height:auto;object-fit:contain}html .wondy{background:#242523;color:#f5f7ef}html .closing{color:#242523}
@media(max-width:1100px){html .header-inner{gap:16px;padding:18px 24px}html .desktop-nav button{padding:12px}html .header-inner .logo-button img{width:145px}html .welcome-layout{gap:26px}}
@media(max-width:800px){html .header-inner{flex-wrap:wrap;gap:12px;padding:14px 18px}html .desktop-nav{display:none}html .header-end{margin-left:auto;gap:8px}.theme-picker select,.language-picker select{padding:8px;font-size:12px;max-width:110px}html .header-inner .logo-button img{width:125px}html .welcome-layout{grid-template-columns:1fr}html .welcome-photo{height:260px}html .welcome-copy .with-character{order:4;margin-top:0}html .welcome-copy>.fineprint{order:5}html .with-character .brand-character{width:130px}html .welcome-copy h1{font-size:32px}html .question-card{padding:24px 20px}html .quiz-top{margin-bottom:20px}html .question-card h1{font-size:27px}html .answer{align-items:flex-start}html .question-hint{font-size:14px}html .header-end .xp-pill{font-size:12px;min-height:44px}html .mobile-nav{border-color:var(--border)}html .mobile-nav button{color:var(--text)}html .mobile-nav button.active{color:var(--text);background:var(--selected);border-top-color:var(--selected-border)}html .welcome-copy .with-character p{font-size:15px}html .theme-picker{min-width:78px}}
@media(max-width:520px){html .header-inner .logo-button img{width:110px}html .header-inner{padding:14px 16px}html .header-end{width:100%;justify-content:flex-end}html .header-inner .logo-button{margin-bottom:-56px;z-index:1}html .header-end .theme-picker{margin-left:125px}html .header-end .xp-pill{position:absolute;top:72px;right:16px;z-index:1}html .header{padding-bottom:48px}html #main{padding-top:24px}html #main[data-screen=quiz]{padding-left:14px;padding-right:14px}.theme-picker select,.language-picker select{font-size:12px;max-width:105px}html .header-end{gap:7px}html .question-card{padding:22px 16px}html .question-card h1{font-size:25px}html .quiz-progress-info{font-size:12px}html .session-xp{font-size:12px}html .answers{grid-template-columns:1fr 1fr}html .answer{font-size:15px;min-height:95px}html .with-character{gap:14px}html .with-character .brand-character{width:110px}html .welcome-copy h1{font-size:30px}}
@media(max-width:360px){html .answers{grid-template-columns:1fr}html .answer{min-height:62px;flex-direction:row;align-items:center}html .header-end .theme-picker{margin-left:112px}.theme-picker select,.language-picker select{max-width:88px}}
@media(max-width:520px){html .header{padding-bottom:0}html .header-inner{display:grid;grid-template-columns:1fr auto;gap:12px 18px}html .header-inner .logo-button{margin:0;grid-column:1;grid-row:1}html .header-end{display:contents}html .header-end .theme-picker{margin:0;min-width:0;grid-column:2;grid-row:1;justify-self:end}html .header-end .language-picker{grid-column:1;grid-row:2;justify-self:start}html .header-end .xp-pill{position:static;grid-column:2;grid-row:2;justify-self:end}.theme-picker select,.language-picker select{max-width:148px}html .welcome-layout{padding-top:0}}
@media(max-width:760px){html .welcome-layout{gap:16px}html .header-inner{padding:10px 16px;gap:6px 18px}}
