/* VF-APP-01: shared approved midnight/cyan interface finish.
   Opted-in runtime pages only. Layout, game content and authored media stay local. */
html.vf-interface:not([data-vf-theme-scope="sheet"]),html.vf-interface:not([data-vf-theme-scope="sheet"]) body{
 --vf-bg:#080e17;--vf-rail:#0e1724;--vf-surface:#122237;--vf-surface-raised:#193047;
 --vf-line:#344f69;--vf-text:#ecf3f4;--vf-muted:#a9bfce;--vf-gold:#7fe7ed;--vf-teal:#a1e5ef;
 --vf-body-font:'DM Sans',system-ui,'Segoe UI',sans-serif;--vf-display-font:var(--vf-body-font);
 --bg:var(--vf-bg);--rail:var(--vf-rail);--panel:var(--vf-surface);--surface:var(--vf-surface);
 --line:var(--vf-line);--border:var(--vf-line);--text:var(--vf-text);--ink:var(--vf-text);
 --muted:var(--vf-muted);--accent:#7fe7ed;--orange:#7fe7ed;--gold:#7fe7ed;--cyan:#7fe7ed;--mint:#a1e5ef;
 color-scheme:dark;color:var(--vf-text);font-family:var(--vf-body-font)
}
html.vf-interface:not([data-vf-theme-scope="sheet"]){background:#080e17}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body{background:radial-gradient(ellipse at 85% 0,#18364a55,transparent 55%),#080e17}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(h1,h2,h3,h4){font-family:var(--vf-body-font);letter-spacing:-.025em;text-transform:none;color:var(--vf-text);font-weight:600;line-height:1.2}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(a,summary){color:#b2eff3}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button,.button-link,.play-link,.import,a.create){font-family:var(--vf-body-font);border-radius:8px;border-color:#416079;background-color:#142a40;color:#e1f0f8;transition:background-color .16s,border-color .16s,box-shadow .16s}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button,.button-link,.play-link,.import,a.create):not(:disabled):hover{background-color:#1d3c50;border-color:#7fe7ed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button.primary,a.primary,.primary-button,.button-link.primary,button.save,a.create,.empty button){background:#7fe7ed;border-color:#7fe7ed;color:#09232c;font-weight:650;box-shadow:0 4px 22px #7fe7ed14}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button.primary,a.primary,.primary-button,.button-link.primary,button.save,a.create,.empty button):not(:disabled):hover{background:#b1f0eb;color:#09232c}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button.active,button.selected,button[aria-pressed=true],nav a[aria-current=page]){background:#193c4b;border-color:#7fe7ed;color:#e7fcff;box-shadow:inset 2px 0 #7fe7ed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button.active,button.selected,button[aria-pressed=true],.primary) :is(span,small,b,strong){color:inherit}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button:disabled,input:disabled,select:disabled){opacity:.55;cursor:not-allowed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]),select,textarea){font-family:var(--vf-body-font);background:#0c1b2d;color:#ecf3f4;border-color:#496b83;border-radius:7px}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:#7fe7ed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid #7fe7ed;outline-offset:3px}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(dialog,.card,.panel,.record-link,.article-reader,.article-list,.library-tools,.empty,.creator-bridge,.setup,.step,.grid>article,.cards>article,.glass){background-color:#122237;border-color:#344f69;border-radius:12px;color:#ecf3f4}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body dialog{background:#0e1c2e;box-shadow:0 24px 80px #0009;border-color:#52748c}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body dialog::backdrop{background:#050b16c9;backdrop-filter:blur(6px)}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.muted,.card-copy p,.card-copy div,.hero>div>span){color:#b3c8d8}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.brand,.brand>span,.section-head p,.hero>div>p,.card-copy small){color:#a1e5ef;border-color:#416079}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body>header,html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.topbar,.app-bar,.top){background:#0e1724;border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.rail,.layout>aside,.sidebar,.workbench-modes){background-color:#0e1b2d;border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.toolbar,.subnav,.workspace-tabs,.section-head,.panel-head,th,td){border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.notice,.empty,.status-card,.foundry-card){background-color:#13263c;border-color:#416079}
/* Keep error, warning and destructive controls visually distinct. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.error,.danger,button.danger,button[data-action=delete]){color:#ffcabf;border-color:#b56f70}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.warning,.issues,.home-attention){background-color:#30242b;color:#f5d3c8;border-color:#c8917e}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body #toast{background:#142b40;color:#e4f5fa}
/* Character Library: the missed screen, including its real saved-record cards. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters]:not(.creator-walkthrough) .hero{background:linear-gradient(100deg,#102338f5,#10233888),url('../assets/home/characters.png') right center/cover;border-color:#3b5b74;border-radius:15px}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters] .grid .portrait{background:linear-gradient(145deg,#294c67,#102136);border-color:#4d718c;color:#a1e5ef;font:600 23px var(--vf-body-font)}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters] .card-copy h2{font:600 25px/1.2 var(--vf-body-font);overflow-wrap:anywhere}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters] #characters footer>a:first-child{background:#7fe7ed;border-color:#7fe7ed;color:#09232c}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters] .grid footer{border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=characters] .grid>article{background:linear-gradient(145deg,#15283c,#101c2c);box-shadow:0 12px 32px #0003}
/* Workspace chrome; scene stages and image surfaces keep their own content. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=campaign-home] #hub{background:radial-gradient(ellipse at top,#18364a55,transparent 55%),#080e17}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=campaign-home] :is(.panel,#frames){background:#122237;border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=campaign-home] .rail button.selected{background:#193c4b;border-color:#7fe7ed;color:#e7fcff}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=campaign-home] :is(.panel,.workbench-heading) h2,html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=adventure-matrix] :is(#heading h1,.workbench-top h2){font-family:var(--vf-body-font);text-transform:none;letter-spacing:-.025em}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=adventure-matrix] .card{background:linear-gradient(145deg,#15283c,#101c2c)}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=adventure-matrix] :is(nav .selected,#library-filters [aria-pressed=true]){background:#193c4b;color:#e7fcff;border-color:#7fe7ed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=party-journal] :is(.team-dashboard>section,.record-link){background-color:#122237;border-color:#344f69}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=party-journal] :is(.top h1,.section-head h2){font-family:var(--vf-body-font)}
/* OHP reading surfaces retain their document structure. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body .ohp-evaluation{--ohp-accent:#7fe7ed;--ohp-ink:#ecf3f4;background:#101e2e;border-color:#416079}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.ohp-file-header,.ohp-subject,.ohp-body,.ohp-chapter,.ohp-open,.ohp-answers label,.ohp-dossier){background:#122337;border-color:#416079;color:#dbeaf4}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body .ohp-answers label:has(input:checked){background:#193c4b;border-color:#7fe7ed}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.ohp-directive,.ohp-evaluation small,.ohp-evaluation legend){color:#b3c8d8}
/* Launcher is loaded through file: URLs, so all dependencies here are local. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body .sigil{border-color:#7fe7ed;color:#a1e5ef}
html.vf-interface:not([data-vf-theme-scope="sheet"]) body .status-card>div{background:#122237;border-color:#344f69}
/* Authored sheets can override their own colors. Theme controls/swatches are untouched. */
html.vf-interface:not([data-vf-theme-scope="sheet"]) body[data-veilfall-page=campaign-home] .feature strong{font-family:var(--vf-body-font);font-weight:600}
@media(prefers-reduced-motion:reduce){html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(button,a,.card,.panel,dialog){transition:none;animation:none}html.vf-interface:not([data-vf-theme-scope="sheet"]) body dialog::backdrop{backdrop-filter:none}}
@media(max-width:760px){html.vf-interface:not([data-vf-theme-scope="sheet"]) body .grid>article{min-width:0}html.vf-interface:not([data-vf-theme-scope="sheet"]) body :is(.actions,.toolbar,.topbar){flex-wrap:wrap}html.vf-interface:not([data-vf-theme-scope="sheet"]) body .card-copy h2{font-size:22px}}

/* Personalized sheet surface stays controlled by its Appearance settings. */
html.vf-interface[data-vf-theme-scope=sheet] body>header{background:#0e1724;border-color:#344f69;color:#ecf3f4;font-family:system-ui,sans-serif}
html.vf-interface[data-vf-theme-scope=sheet] body>header button{background:#142a40;color:#def4fa;border-color:#416079;border-radius:8px}
