/* Paired UI surfaces: foreground and background always change together.
   Authored slides (.forest/.ivory/.midnight) retain their independent palettes. */
:root{--surface:#fff;--surface-soft:#f6f8ef;--surface-accent:#edf3e4;--accent-ink:#34562a;--hint:#58665e;--placeholder:#58665e}
html[data-theme=dark]{--surface:#1c2b22;--surface-soft:#203328;--surface-accent:#263d2e;--accent-ink:#cee5b7;--hint:#b3c0b3;--placeholder:#b3c0b3}
:is(.prompter,.question-edit,.formbox,.panel,.talkcard,.table-scroll,.guide-lesson,.guide-link-grid article,.guide-checks>div,.guide-faq details){background:var(--surface);color:var(--ink)}
:is(.toggle-row,.engagement-review,.transition-cue,.pill,.thumb.selected,.rate-preview,.private-cues,.admin-filters,.admin-notice,.ai-preparation){background:var(--surface-accent);color:var(--ink)}
.panel.style-note,.notebox textarea{background:var(--surface-soft);color:var(--ink)}
:is(.live-flow,.live-connection,.toggle-row small,.private-cues small,.admin-stats article>span,.admin-table small,.ai-summary,.feature-num,.micro,.guide-section-title p,.guide-lesson-heading p,.guide-video-meta,.guide-transcript p,.guide-steps p,.guide-online>p,.guide-link-grid p,.guide-faq p){color:var(--hint)}
:is(.published-answers p,.answer-confirmation){background:var(--surface-accent);color:var(--accent-ink);border-color:var(--line)}
.join-address{color:var(--green)}
.admin-table th{background:var(--surface-accent);color:var(--ink)}
.admin-table details summary{color:var(--green)}
input::placeholder,textarea::placeholder{color:var(--placeholder);opacity:1}
.password-toggle{color:var(--muted)}
html[data-theme=dark] .password-toggle{color:var(--muted)}
html[data-theme=dark] :is(.prompter,.question-edit){background:var(--surface);color:var(--ink)}
html[data-theme=dark] :is(.toggle-row,.engagement-review,.transition-cue,.pill,.thumb.selected){background:var(--surface-accent);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.live-flow,.live-connection,.toggle-row small,.private-cues small,.admin-stats article>span,.guide-section-title p,.guide-lesson-heading p,.guide-video-meta,.guide-transcript p,.guide-steps p,.guide-online>p,.guide-link-grid p,.guide-faq p){color:var(--hint)}
html[data-theme=dark] :is(.published-answers p,.answer-confirmation){background:var(--surface-accent);color:var(--accent-ink);border-color:var(--line)}
html[data-theme=dark] .panel.style-note,html[data-theme=dark] .notebox textarea{background:var(--surface-soft);color:var(--ink)}
html[data-theme=dark] .admin-table th{background:var(--surface-accent);color:var(--ink)}
html[data-theme=dark] :is(.admin-table details summary,.join-address,.guide-checks span){color:#c0dcaa}
html[data-theme=dark] .stepitem.active span{background:#a9cb91;color:#15271a}
html[data-theme=dark] .selection-warning{background:#44391f;color:#f4ddb1}
html[data-theme=dark] :is(.poll-track,.audience-options>div){background:var(--surface-accent);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .poll-track>div{background:#a9cb91}
html[data-theme=dark] .participant-options label:has(input:checked){background:var(--surface-accent);color:var(--ink);border-color:#a9cb91}
html[data-theme=dark] .live-projector{background:var(--paper);color:var(--ink)}
/* QR codes remain black on white for reliable scanning in either interface mode. */
.qr-box{background:#fff;color:#202c29}
html[data-theme=dark] .language-switch{background:var(--surface-accent);border-color:var(--line)}
html[data-theme=dark] .language-switch button{color:var(--ink)}
html[data-theme=dark] .language-switch button.selected{background:#a9cb91;color:#15271a}
html[data-theme=dark] .language-switch button:hover:not(.selected){background:#344d3b}
html[data-theme=dark] .audience-chip{color:var(--ink)}
/* The landing mock-up depicts a light slide editor; its neutral text stays dark. */
html[data-theme=dark] .hero-art :is(.mocknote,.mocknote p,.mocknote .micro,.mockrail div,.float-label,.float-label .micro){color:#58665e}
@media print{.paper{color:#202c29;background:#fff}}

.language-flag{flex:none;display:block;border-radius:2px;box-shadow:0 0 0 1px #7d8b7d45;overflow:hidden}
html[data-theme=dark] .btn.lime{background:var(--lime);border-color:var(--lime);color:#172a1a}
html[data-theme=dark] :is(.landing-page .eyebrow,.landing-proofline>span,.landing-live-title,.landing-footer p,.landing-footer a,.landing-footer button,.admin-badge){color:var(--hint)}
html[data-theme=dark] :is(.landing-attendee b,.landing-faq summary>span){color:#c0dcaa}
.slide.ivory .slidefooter{opacity:.8}
.landing-hero-copy>p:not(.landing-lead){color:var(--hint)}
.landing-step-number{color:#6f825d}
.landing-faq summary>span{color:#526e3b}
.landing-final-cta>.eyebrow{color:var(--hint)}
.guide-chapters span,.guide-checks span{color:#506d3b}
html[data-theme=dark] .landing-step-number{color:#b4c99f}
html[data-theme=dark] .guide-chapters span{color:var(--ink)}
html[data-theme=dark] .landing-attendee span{color:var(--hint)}
html[data-theme=dark] .landing-footer nav>b{color:var(--ink)}
html[data-theme=dark] .landing-footer-note span{color:var(--hint)}

/* Account library and unified audience experience. */
.storage-tools{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:20px;margin:20px 0 28px}
.storage-tools>p{max-width:80ch;font-size:15px;line-height:1.8;color:var(--muted)}
.sync-conflict{padding:18px;margin-top:16px;border:2px solid var(--selected-border);border-radius:10px;background:var(--surface-accent);color:var(--ink)}
.cloud-trash{margin-top:20px}.cloud-trash summary{cursor:pointer;font-weight:700;padding:12px 0}.cloud-trash .toolbar{padding:12px 0;border-top:1px solid var(--line)}
.storage-status[data-state=warning]{background:var(--surface-accent);border:1px solid var(--selected-border);color:var(--ink)}
.audience-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px max(24px,calc((100vw - 1320px)/2));flex-wrap:wrap}
.unified-audience{max-width:1160px;margin:0 auto;padding:28px 24px 60px}.unified-audience .formbox{max-width:720px;margin:24px auto}.unified-audience .formbox h1{font-size:clamp(28px,4vw,42px);line-height:1.4}
.audience-session-heading{display:flex;gap:16px;align-items:center;justify-content:space-between;font-weight:700;line-height:1.8}
.audience-connection-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0 20px;font-size:14px;color:var(--muted)}
.audience-connection-bar .live-connection{padding:0;margin:0;text-align:start;color:var(--muted)}
.live-connection[data-connection=offline]{color:var(--ink);font-weight:700}.audience-slide{width:100%;margin:12px 0 24px}.audience-slide .slide{min-height:420px;aspect-ratio:16/9;overflow-wrap:anywhere}
.audience-activity h2{font-size:clamp(24px,3vw,36px);line-height:1.7}.audience-pause{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:20px;text-align:center;padding:80px 30px;margin-top:20px}
.audience-welcome p{line-height:1.9}.audience-welcome .btn{margin-top:18px}.projector-connection{position:fixed;bottom:8px;inset-inline-start:10px;background:#15271a;color:#e8eee6;padding:5px 10px;border-radius:5px;font-size:12px;z-index:100}
@media(max-width:600px){.unified-audience{padding:20px 15px 40px}.audience-header{padding:16px}.audience-header .language-switch button{padding:8px 10px}.audience-slide .slide{aspect-ratio:auto;min-height:330px;padding:28px 22px}.audience-slide .slide h2{font-size:clamp(26px,8vw,40px)}.audience-slide .slide li{font-size:20px}.audience-slide .slidefooter{margin-top:30px}.audience-connection-bar{align-items:flex-start}.unified-audience .formbox{padding:24px}.audience-session-heading{align-items:flex-start}.storage-tools .actions{flex-wrap:wrap}}
