#radiance-appearance-button{font:inherit;letter-spacing:normal;white-space:nowrap;min-height:34px;padding:6px 10px;border:1px solid var(--appearance-line,#c4a66a22);border-radius:6px;color:inherit;background:#101715b8;cursor:pointer}
#radiance-appearance-dialog{max-width:min(360px,calc(100vw - 32px));width:360px;padding:22px;border:1px solid var(--appearance-line,#c4a66a22);border-radius:12px;background:#101715!important;color:#f1eee5!important;z-index:10000;box-sizing:border-box}
#radiance-appearance-dialog::backdrop{background:#0008}#radiance-appearance-dialog label{display:block;margin:12px 0 6px;color:inherit}#radiance-appearance-dialog select{width:100%;min-height:44px;background:#202925!important;color:#f1eee5!important;padding:9px;border:1px solid var(--appearance-line,#c4a66a22)}#radiance-appearance-dialog option{background:#101715;color:#f1eee5}.appearance-actions{display:flex;gap:10px;flex-wrap:wrap}.appearance-actions button{min-height:44px;color:#f1eee5;background:#202925;border:1px solid var(--appearance-line,#c4a66a22);padding:8px 12px;border-radius:6px}#radiance-appearance-message{font-size:13px;min-height:20px;margin:12px 0}.appearance-floating{position:fixed;right:14px;top:14px;z-index:1000}
html[data-appearance]:not([data-appearance=classic]){--bg:var(--appearance-bg);--background:var(--appearance-bg);--ink:var(--appearance-ink);--text:var(--appearance-ink);--foreground:var(--appearance-ink);--cream:var(--appearance-ink);--muted:var(--appearance-muted);--lime:var(--appearance-accent);--gold:var(--appearance-accent);--accent:var(--appearance-accent);--primary:var(--appearance-accent);--mint:var(--appearance-accent)}
html[data-appearance]:not([data-appearance=classic]) body{background:var(--appearance-bg)!important;color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) :is(.panel,.glass,.pane,.card,.r-panel,.home-feature-card,.config-window,.setup-window,input,textarea,select,.transcript,.chatspace,.transport,.notice,header,#dmr-dashboard){color:var(--appearance-ink)!important;border-color:var(--appearance-line,#c4a66a22)}
html[data-appearance]:not([data-appearance=classic]) :is(.muted,small,.eyebrow,.empty,.foot,#dmr-speaker,#dmr-talkgroup-name,#dmr-feed-status){color:var(--appearance-muted)!important}
html[data-appearance]:not([data-appearance=classic]) :is(.empty strong,h1,h2,h3,label,summary){color:var(--appearance-ink)}
html[data-appearance]:not([data-appearance=classic]) #radiance-appearance-button{background:var(--appearance-bg);color:var(--appearance-ink)}
html[data-appearance=daylight]{color-scheme:light}html[data-appearance=daylight] :is(.ambient,.welcome-scenery,.space-scene,#radiance-background-embed,#fwarc-radiance-scene){opacity:.16!important}html[data-appearance=daylight] #surface-scene{mix-blend-mode:normal;opacity:.65}html[data-appearance=dusk] :is(.ambient,.welcome-scenery){filter:sepia(.2) brightness(.8)}html[data-appearance=night] :is(.ambient,.welcome-scenery){filter:brightness(.55)}html[data-appearance=deep-space] :is(.ambient,.welcome-scenery,.space-scene,#radiance-background-embed,#fwarc-radiance-scene){filter:brightness(.3) saturate(.65)}html[data-appearance=deep-space] :is(.ambient-light,.aurora-veil){opacity:.1}
/* Signal displays and transport LEDs retain their operational colors. */
html[data-appearance]:not([data-appearance=classic]) :is(.waterfall,.waterfall span,.scale){color:#b7bfb8!important}
#radiance-appearance-button:focus-visible,#radiance-appearance-dialog :focus-visible{outline:2px solid #c4a66a;outline-offset:3px}@media(max-width:700px){#radiance-appearance-button{min-height:44px}.view-controls{flex-wrap:wrap}}

#radiance-appearance-dialog :is(h2,label){color:#f1eee5!important}

html[data-appearance]:not([data-appearance=classic]) :is(button,a,.freq,.notearea,.tools,.heading,.modes,.sdr-meter,.mode-menu,.health b){color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) :is(button.primary,.primary,#dmr-dashboard-quiet){background:var(--appearance-accent)!important;color:var(--appearance-bg)!important}
html[data-appearance]:not([data-appearance=classic]) .view-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
html[data-appearance]:not([data-appearance=classic]) :is(#radiance-appearance-dialog button,#radiance-appearance-dialog h2,#radiance-appearance-dialog label){color:#f1eee5!important}

html[data-appearance=crimson] :is(.ambient,.welcome-scenery,.space-scene,#radiance-background-embed,#fwarc-radiance-scene){filter:sepia(.25) hue-rotate(285deg) brightness(.55)}

html[data-appearance]:not([data-appearance=classic]) :is(#dmr-dashboard-state,#dmr-dashboard-label,.sdr-meter-label,#rx-level){color:var(--appearance-ink)!important}html[data-appearance]:not([data-appearance=classic]) :is(input,textarea)::placeholder{color:var(--appearance-muted)!important;opacity:1}

/* Quiet, translucent outlines belong to the surface, not the signal palette. */
:root{--appearance-line:#c4a66a22;--appearance-control-line:#c4a66a30}
html[data-appearance=daylight]{--appearance-line:#70531b24;--appearance-control-line:#70531b36}
html[data-appearance=ocean]{color-scheme:dark;--appearance-line:#8ecbc924;--appearance-control-line:#8ecbc934}
html[data-appearance=forest]{color-scheme:dark;--appearance-line:#a8c79b24;--appearance-control-line:#a8c79b34}
html[data-appearance=amber]{color-scheme:dark;--appearance-line:#dfb57724;--appearance-control-line:#dfb57734}
html :is(.panel,.glass,.pane,.card,.r-panel,.home-feature-card,.config-window,.setup-window,.transcript,.chatspace,.notice,header,#dmr-dashboard,.notearea,.instrument-section,.help-topic){border-color:var(--appearance-line)!important}
html :is(input,textarea,select,button,.trial-feedback,#radiance-appearance-dialog){border-color:var(--appearance-control-line)!important}
/* Keep dark instrument readouts and operational status colors intact. */
html[data-appearance]:not([data-appearance=classic]) :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea,select){background-color:var(--appearance-bg)!important;color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) option{background:var(--appearance-bg);color:var(--appearance-ink)}
html[data-appearance=daylight] :is(.panel,.glass,.pane,.card,.config-window,.setup-window,.transcript,.chatspace,.help-topic){background:rgba(255,249,233,.90)!important;color:var(--appearance-ink)!important}
html[data-appearance=daylight] :is(header,#dmr-dashboard){background:rgba(242,238,223,.92)!important}
html[data-appearance=daylight] :is(.waterfall,#waterfall){background:#080e12!important}
html[data-appearance=ocean] :is(.ambient,.welcome-scenery,.space-scene){filter:brightness(.55) saturate(.75) hue-rotate(15deg)}
html[data-appearance=forest] :is(.ambient,.welcome-scenery,.space-scene){filter:brightness(.5) saturate(.7)}
html[data-appearance=amber] :is(.ambient,.welcome-scenery,.space-scene){filter:brightness(.5) sepia(.35)}
/* Focus wins over every theme's scenery opacity, including Daylight. */
html body.focus-mode :is(.ambient,.welcome-scenery,.space-scene,.help-scenery,#surface-scene,#radiance-background-embed,#fwarc-radiance-scene,#signal-field,.ambient-light,.aurora-veil,#waterfall-spill){opacity:0!important;visibility:hidden!important;pointer-events:none!important}
html[data-appearance]:not([data-appearance=classic]) body.focus-mode :is(.panel,.glass,.pane,.card,.transcript,.chatspace){background:var(--appearance-bg)!important}
html[data-appearance]:not([data-appearance=classic]){color-scheme:var(--appearance-scheme,dark)}
html[data-appearance]:not([data-appearance=classic]) #operate-voice .voice-text textarea{background:var(--appearance-bg)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-control-line)!important}
html[data-appearance]:not([data-appearance=classic]) :is(#mode-menu,.dmr-picker-panel,.station-setup-dialog,.config-window,#notebook,.trial-feedback){background:var(--appearance-bg)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
html[data-appearance]:not([data-appearance=classic]) :is(#mode-menu,.dmr-picker-panel,.station-setup-dialog) :is(button,label,summary){color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) #mode-menu button[aria-checked=true]{background:color-mix(in srgb,var(--appearance-accent) 14%,var(--appearance-bg))!important}
html[data-appearance]:not([data-appearance=classic]) .station-setup-dialog [role=tab][aria-selected=true]{background:var(--appearance-accent)!important;color:var(--appearance-bg)!important}
html[data-appearance]:not([data-appearance=classic]) .dmr-picker-panel [data-groups] button{background:transparent!important}
/* The appearance picker intentionally keeps its own dark, constant palette. */
#radiance-appearance-dialog{color-scheme:dark}
/* Stateful controls are styled here rather than recolored through inline JS. */
html[data-appearance]:not([data-appearance=classic]) :where(.station-setup-dialog [role=tab],#mode-menu [role=menuitemradio],.dmr-picker-panel [data-groups] button){background:var(--appearance-bg)!important;color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) .station-setup-dialog [role=tab][aria-selected=true]{background:var(--appearance-accent)!important;color:var(--appearance-bg)!important}
html[data-appearance]:not([data-appearance=classic]) #mode-menu [role=menuitemradio][aria-checked=true]{background:color-mix(in srgb,var(--appearance-accent) 14%,var(--appearance-bg))!important;color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) .dmr-picker-panel [data-groups] button[aria-pressed=true]{background:color-mix(in srgb,var(--appearance-accent) 12%,var(--appearance-bg))!important;color:var(--appearance-ink)!important}

/* Mesh actions are accent-filled and bypass inline surface recoloring. */
html[data-appearance]:not([data-appearance=classic]) .mesh-lab-page :is(#lab-connect,#lab-pair){background:var(--appearance-accent)!important;color:var(--appearance-bg)!important}
html[data-appearance=daylight] .mesh-lab-page[data-mesh-shared=true] #connection-badge{color:#196c39}

/* Spectrum and owner-tool cards are not generic .panel elements. */
html[data-appearance]:not([data-appearance=classic]) :is(.spectrum-boundary,.spectrum-filters,.tuning-guide,.band-card,#band-empty,#owner-controls section,#owner-controls article){background:var(--appearance-bg);color:var(--appearance-ink)}
html[data-appearance=daylight] body:has(#owner-controls) [data-voice-update]{background:var(--appearance-bg)!important}
html[data-appearance=daylight] #owner-status[data-error=true]{color:#853719}
html[data-appearance=daylight] .hero-links .action{background:var(--appearance-bg);color:var(--appearance-ink)}

/* Dynamic overlays must change their copy along with their recolored surface. */
html[data-appearance]:not([data-appearance=classic]) :is(.wan-dialog,#club-admin-dialog,#club-report-dialog,#online-radios){background:var(--appearance-bg)!important;color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) :is(.trial-feedback p,.trial-feedback [role=status],.wan-dialog .wan-content,.wan-dialog .wan-heading h2){color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) :is(#online-radio-status,#online-radios .online-badge){color:var(--appearance-muted)!important}

/* Station and Hearing share these reading labels, not the signal LED colors. */
html[data-appearance]:not([data-appearance=classic]) :is(.club-message p,.decode-live,.section-label,.source-journey-heading,.setup-guide){color:var(--appearance-ink)!important}
html[data-appearance]:not([data-appearance=classic]) .source-journey{background:var(--appearance-bg)}
html[data-appearance]:not([data-appearance=classic]) :is(.chatspace .message-placeholder,.tag,.source-journey-heading span,.source-journey>p,.decoder-panel .rx-label,#source-status,#recording-position,#display-current,#waterfall-design-description,#waterfall-selection,#ft8-status){color:var(--appearance-muted)!important}
html[data-appearance=daylight] :is(.beta-error,#source-status.beta-error,#file-check[data-state=error]){color:#853719!important}
html[data-appearance=daylight] #file-check[data-state=ready]{color:#196c39}
html[data-appearance=daylight] .foot{text-shadow:none}

/* Voice Lab helper copy and upload labels follow its light reading panels. */
html[data-appearance]:not([data-appearance=classic]) body:has(#prepare) :is(.title-row span,#filename,#status,.hint,#readiness,#live-status,.diagnostics,.diagnostics dt,details,footer,.flag){color:var(--appearance-muted)}
html[data-appearance]:not([data-appearance=classic]) body:has(#prepare) .upload{background:var(--appearance-bg);color:var(--appearance-ink)}
html[data-appearance]:not([data-appearance=classic]) body:has(#prepare) .diagnostics{background:var(--appearance-bg)}

/* Inline samples need their own light surface rather than a translucent black box. */
html[data-appearance=daylight] code{background:#e7dfc8;color:#25352b}
html[data-appearance]:not([data-appearance=classic]) :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--appearance-accent)!important;outline-offset:3px}
#radiance-appearance-dialog :focus-visible{outline-color:#c4a66a!important}
#radiance-appearance-dialog{max-height:calc(100dvh - 32px);overflow:auto}
