/* Shared controls and night reading; never filter or recolor actual media. */
.review-control{font:inherit;font-size:13px;line-height:1.4;min-height:44px;padding:10px 16px;border:1px solid #aaa;border-radius:6px;cursor:pointer;background:#f6f6f4;color:#292929;letter-spacing:0}
.review-control:focus-visible{outline:2px solid #568c9a;outline-offset:3px}
#review-theme{flex-shrink:0;margin-left:auto;white-space:nowrap}
.sitebar{flex-wrap:wrap}.sitebar>span{margin-left:auto}
.review-download{display:block;margin:12px 0 22px}
#review-download-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-height:90vh;overflow:auto;padding:26px;border:1px solid #aaa;border-radius:10px;background:#f6f6f4;color:#292929}
#review-download-dialog h2{margin:0 0 12px;font-size:23px}
#review-download-name{font-size:13px;overflow-wrap:anywhere;color:#666}
#review-download-dialog label{display:block;margin:20px 0 8px}
#review-download-password{box-sizing:border-box;width:100%;min-height:46px;padding:10px;font:inherit;border:1px solid #aaa;border-radius:5px}
#review-download-error{min-height:1.5em;color:#a23232;font-size:14px}
.review-dialog-actions{display:flex;justify-content:flex-end;gap:12px}
html[data-theme="dark"]{color-scheme:dark;--bg:#181a1c;--panel:#222528;--line:#45494d;--text:#d8d8d3;--muted:#aaaead;--gold:#d5d2c5;background:var(--bg)}
html[data-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-theme="dark"] :is(.screenplay,.shot,.asset-card,.generation-segment,.sound-character,dialog,#generation-zoom,#review-download-dialog){background:#222528!important;color:#d8d8d3!important;border-color:#45494d!important}
html[data-theme="dark"] :is(.frame,.cover,.connection,.watch-note,.management,.empty-stage,.generation-notice,.generation-image,.generation-prompt,.sound-notice,.sound-missing,pre,textarea,input,select,button,.filebutton,.cover>span){background-color:#2a2e31!important;color:#d8d8d3!important;border-color:#50565a!important}
html[data-theme="dark"] :is(button:hover,.filebutton:hover){background-color:#363c40!important}
html[data-theme="dark"] :is(.imagebutton,.generation-image){background-color:#202326!important}
html[data-theme="dark"] :is(.sitebar a,h1,h2,h3,summary,.shotnav a,.next-stage){color:#deded8}
html[data-theme="dark"] :is(.muted,.sitebar span,.back,.section-label,.film-card>p,.film-card-meta,.sitefooter,.sitefooter a,h4,.generation-segment h3,.generation-segment small,.generation-references figcaption span,.generation-results p,.sound-text-label,.sound-status,.scene-cast,.scene-boards-grid figcaption span,.reading-hint,#review-download-name){color:#aaaead!important}
html[data-theme="dark"] :is(.screenplay .scene-heading,.screenplay .script-section,.screenplay .script-subheading,.screenplay h3:not(.scene-heading),.screenplay h4){color:#a5c7bf!important}
html[data-theme="dark"] :is(.screenplay[data-reading-mode="color"] .dialogue,.legend-dialogue){color:#9fc4df}
html[data-theme="dark"] :is(.screenplay[data-reading-mode="color"] .annotation,.legend-annotation,.scene-boards-status){color:#d3b78f}
html[data-theme="dark"] .screenplay[data-reading-mode="mono"] :is(.scene-heading,.scene-cast,.script-section,.script-subheading,h3,h4){color:inherit!important}
html[data-theme="dark"] :is(.reading-nav,.stage-nav){background:#101214;border-color:#45494d}
html[data-theme="dark"] :is(.reading-toggle button[aria-pressed="true"],#review-theme[aria-pressed="true"]){background:#3c484c!important;color:#e0e8e7!important}
html[data-theme="dark"] #review-download-error{color:#efa7a0}
html[data-theme="dark"] :is(.generation-segment h2,.scene-boards,.sound-sample,.shothead,.shotnav,.section-label,.sitebar,.sitefooter){border-color:#45494d}
@media(max-width:600px){#review-theme{padding:8px 12px;font-size:12px}.sitebar{gap:10px}}
