/* Five complete, high-contrast palettes. System fonts stay available offline. */
:root,[data-theme="aurora"]{--theme-bg:#100a23;--theme-surface:#241636;--theme-panel:#302043;--theme-text:#faf5ff;--theme-muted:#d3c4e6;--theme-accent:#dcc0ff;--theme-second:#87eee0;--theme-ink:#211334;--theme-border:#886ba7;--theme-font:ui-rounded,'Trebuchet MS',system-ui,sans-serif;--theme-heading:ui-rounded,'Trebuchet MS',system-ui,sans-serif;--theme-radius:1.65rem;--theme-motion:themeAurora 24s ease-in-out infinite alternate}
[data-theme="cinema"]{--theme-bg:#17120f;--theme-surface:#282019;--theme-panel:#362b21;--theme-text:#fff6e6;--theme-muted:#e0cbb5;--theme-accent:#ffd48b;--theme-second:#eb9c94;--theme-ink:#28190c;--theme-border:#aa8663;--theme-font:Georgia,'Times New Roman',serif;--theme-heading:Georgia,'Times New Roman',serif;--theme-radius:.7rem;--theme-motion:themeCinema 14s ease-in-out infinite alternate}
[data-theme="ocean"]{--theme-bg:#031d2b;--theme-surface:#093448;--theme-panel:#10475b;--theme-text:#f0fcff;--theme-muted:#bde0ee;--theme-accent:#7be8f6;--theme-second:#a2f5c8;--theme-ink:#082633;--theme-border:#4d8ba0;--theme-font:'Segoe UI',Arial,sans-serif;--theme-heading:'Segoe UI',Arial,sans-serif;--theme-radius:2.2rem;--theme-motion:themeOcean 22s ease-in-out infinite alternate}
[data-theme="sunrise"]{--theme-bg:#fff4e6;--theme-surface:#fffaf3;--theme-panel:#ffe4c6;--theme-text:#382318;--theme-muted:#694331;--theme-accent:#85391c;--theme-second:#345b54;--theme-ink:#fff8ef;--theme-border:#b58762;--theme-font:'Avenir Next','Segoe UI',Arial,sans-serif;--theme-heading:Georgia,serif;--theme-radius:1.3rem;--theme-motion:themeSunrise 26s ease-in-out infinite alternate}
[data-theme="arcade"]{--theme-bg:#101522;--theme-surface:#20293d;--theme-panel:#2b354b;--theme-text:#f5ffe8;--theme-muted:#d2ddbc;--theme-accent:#d8fb8f;--theme-second:#ff9ad6;--theme-ink:#202b15;--theme-border:#879969;--theme-font:'Courier New',ui-monospace,monospace;--theme-heading:'Courier New',ui-monospace,monospace;--theme-radius:.45rem;--theme-motion:themeArcade 18s steps(6,end) infinite alternate}
html[data-theme]:not(.kids-mode){color-scheme:dark;--gold:var(--theme-accent);--gold-glow:var(--theme-accent);--text-primary:var(--theme-text);--text-secondary:var(--theme-muted);--text-muted:var(--theme-muted);--bg-dark:var(--theme-bg);--bg-card:var(--theme-surface);--purple:var(--theme-second)}
html[data-theme="sunrise"]:not(.kids-mode){color-scheme:light}
html[data-theme]:not(.kids-mode) body{background:var(--theme-bg)!important;color:var(--theme-text)!important;font-family:var(--theme-font)!important}
html[data-theme]:not(.kids-mode) :is(p,a,label,button,input,select,textarea,summary,small,span){font-family:var(--theme-font)!important}
html[data-theme]:not(.kids-mode) body::before{background:radial-gradient(ellipse at 20% 20%,var(--theme-second),transparent 48%),radial-gradient(ellipse at 80% 70%,var(--theme-accent),transparent 50%)!important;opacity:.08!important;animation:var(--theme-motion)!important}
html[data-theme]:not(.kids-mode) :is(h1,h2,h3,h4,.app-title-main,.brand-name){font-family:var(--theme-heading)!important;color:var(--theme-accent)!important}
html[data-theme]:not(.kids-mode) :is(.premium-card,.content-card,.profile-card,.pf-card,.pricing-card,.together-card,.chat-history-card,.arc-event,.kids-card,.kids-hero,.kids-section,.kids-dialog,.modal-content,#questionnaire-box,#search-box,#result-box,#loading-box,.app-release-notice,.match-install-dialog){background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;border-radius:var(--theme-radius)!important}
html[data-theme]:not(.kids-mode) :is(p,li,label,summary,.app-title-sub,.pf-card-sub,.spotlight-desc,.arc-meta,.arc-blurb,.credits-lede,.app-release-notice p){color:var(--theme-muted)!important}
html[data-theme]:not(.kids-mode) :is(input,select,textarea,.crit-chip,.spotlight-chip,.top-ask,.lazy-head){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;font-family:var(--theme-font)!important}
html[data-theme]:not(.kids-mode) input::placeholder,html[data-theme]:not(.kids-mode) textarea::placeholder{color:var(--theme-muted)!important;opacity:1}
html[data-theme]:not(.kids-mode) :is(.gold-btn,.btn-main,.primary-btn,.match-btn,.composer-send,.app-release-apply,.kids-match-btn){background:var(--theme-accent)!important;color:var(--theme-ink)!important;border-color:var(--theme-accent)!important;font-family:var(--theme-font)!important}
html[data-theme]:not(.kids-mode) :is(.app-header,.kids-header,.seo-footer,.app-footer){background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme]:not(.kids-mode) :is(.install-btn,.sound-toggle-btn,.quota-badge,.nav-avatar-link,.spotlight-ask,.theme-actions button){background:var(--theme-panel)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
html[data-theme]:not(.kids-mode) a:not(.gold-btn):not(.kids-match-btn){color:var(--theme-accent)}
html[data-theme]:not(.kids-mode) :is(.app-release-hint,.theme-preview-status){color:var(--theme-accent)!important}
html[data-theme]:not(.kids-mode) :focus-visible{outline:3px solid var(--theme-second)!important;outline-offset:4px}
.theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:.85rem;margin:1.2rem 0}
.theme-choice{min-height:7rem;padding:1rem;text-align:start;border:2px solid var(--theme-border);border-radius:1rem;background:var(--theme-panel);color:var(--theme-text);cursor:pointer;font:inherit}
.theme-choice[aria-pressed="true"]{outline:3px solid var(--theme-accent);outline-offset:2px}
.theme-choice strong,.theme-choice small{display:block;margin-top:.4rem}.theme-choice small{line-height:1.5;font-size:.85rem}
.theme-swatch{display:flex;gap:.3rem}.theme-swatch i{width:1.7rem;height:1.7rem;border-radius:50%;border:1px solid #777}
.theme-actions{display:flex;flex-wrap:wrap;gap:.75rem}.theme-actions button{min-height:48px;padding:.8rem 1rem;border:1px solid;border-radius:.8rem;font:700 1rem var(--theme-font);cursor:pointer}
.theme-preview-status{font-size:1rem;line-height:1.5}
@keyframes themeAurora{to{transform:translate(3%,-2%) scale(1.06)}}@keyframes themeCinema{to{opacity:.035}}
@keyframes themeOcean{to{transform:translateY(4%) scaleX(1.12)}}@keyframes themeSunrise{to{transform:rotate(8deg)}}@keyframes themeArcade{to{transform:translateX(5%)}}
@media(prefers-reduced-motion:reduce){html[data-theme]:not(.kids-mode) *,html[data-theme]:not(.kids-mode) *::before,html[data-theme]:not(.kids-mode) *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html.reduce-motion *,html.reduce-motion *::before,html.reduce-motion *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(forced-colors:active){.theme-choice[aria-pressed="true"]{outline:3px solid Highlight}.theme-swatch i{forced-color-adjust:none}}
