/* Header tracks size to the controls, including the injected Appearance button. */
body>header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;min-width:0;padding:10px 16px}
body>header>.brand-stack{display:grid;grid-template-columns:58px max-content;grid-template-rows:auto auto;gap:4px 10px;flex:0 1 auto;min-width:0;max-width:100%;align-items:center}
body>header .brand{display:contents}
body>header #radiance-globe{grid-column:1;grid-row:1/3;width:58px;height:58px}
body>header .wordmark{grid-column:2;grid-row:1;justify-self:start;align-self:end;font-size:15px;padding:0;line-height:1.4}
body>header .brand-stack .view-controls{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;justify-self:start;align-items:center;gap:4px;margin:0;padding:0;white-space:normal;max-width:100%;border-radius:8px}
body>header .view-controls button,body>header #radiance-appearance-button{font:12px/1.3 system-ui;min-height:36px;padding:6px 9px;white-space:nowrap}
body>header>nav{display:flex;flex-wrap:wrap;flex:1 1 400px;align-items:center;justify-content:center;gap:6px;min-width:0;max-width:100%;margin:0;align-self:center}
body>header>nav :is(button,.nav-link){min-width:0;min-height:36px;margin:0!important;padding:7px 10px;font:600 12px/1.4 system-ui;white-space:nowrap}
body>header>.transport{flex:0 1 390px;justify-content:flex-end;min-width:0;max-width:100%;margin:0;gap:7px 12px;padding:8px 10px}
.feedback-invite{min-width:0;max-width:100%;text-align:center;overflow-wrap:anywhere}
@media(max-width:1200px){body>header>nav{flex:1 1 330px}body>header>.transport{flex:1 1 100%;justify-content:center}}
@media(max-width:900px){body>header{align-items:flex-start}body>header>.brand-stack{flex-basis:100%}body>header>nav{flex-basis:100%;justify-content:flex-start}body>header>.transport{justify-content:flex-start}.workspace{grid-template-columns:minmax(0,1fr);padding:12px;gap:12px}.workspace>.decoder-panel{grid-row:1;min-width:0}.workspace>.station-column{grid-row:2;min-width:0}.workspace>.chat{grid-row:3;grid-column:1;min-width:0}.chat{min-height:350px}}
@media(max-width:420px){body>header{padding:10px 12px}body>header>.brand-stack{grid-template-columns:42px minmax(0,1fr);gap:6px 8px}body>header #radiance-globe{width:42px;height:48px}body>header .view-controls button,body>header #radiance-appearance-button{min-height:40px;padding:6px 8px}body>header>nav :is(button,.nav-link){min-height:40px}}
/* One shared treatment for every header action, independent of theme. */
body>header :is(nav .nav-link,nav button,.view-controls button,#radiance-appearance-button){
 font:600 12px/1.4 system-ui,sans-serif!important;letter-spacing:normal!important;
 color:var(--appearance-ink,var(--ink,#f1eee5))!important;background:transparent!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;text-shadow:none!important;
 padding:7px 10px!important;min-height:36px;margin:0!important;text-decoration:none;
 transform:none!important;transition:color 150ms ease;
}
body>header :is(nav .nav-link,nav button,.view-controls button,#radiance-appearance-button):hover{text-decoration:underline;text-underline-offset:4px}
body>header :is(nav .nav-link,nav button,.view-controls button,#radiance-appearance-button):focus-visible{outline:2px solid var(--appearance-accent,#c4a66a)!important;outline-offset:2px}
@media(max-width:420px){body>header :is(nav .nav-link,nav button,.view-controls button,#radiance-appearance-button){min-height:40px}}
/* The talkgroup monitor is a horizontal instrument below the header. */
body>#dmr-dashboard{position:relative;z-index:20;display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;margin:0 16px 8px;padding:6px 12px;border-radius:8px;min-height:42px}
body>#dmr-dashboard #dmr-picker{width:auto;flex:0 0 auto}
body>#dmr-dashboard #dmr-dashboard-configure{flex:0 0 auto}
body>#dmr-dashboard :is(#dmr-talkgroup-name,#dmr-speaker,#dmr-feed-status){width:auto;flex:0 1 auto;max-width:280px;min-width:0}
body>#dmr-dashboard #dmr-speaker{flex:1 1 160px}
body>#dmr-dashboard #dmr-picker .dmr-picker-panel{position:absolute;top:calc(100% + 8px);left:0;width:min(400px,calc(100vw - 56px));padding:12px;background:var(--appearance-bg,#101715);color:var(--appearance-ink,#f1eee5);border:1px solid #c4a66a88;border-radius:8px;box-shadow:0 12px 30px #0007;z-index:50}
.chat>.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px}
.chat-heading h2{margin:0}.chat-actions{position:relative;margin:0}.chat-actions>summary{font:700 20px/1 system-ui;list-style:none;padding:4px 10px;min-height:30px}.chat-actions>summary::-webkit-details-marker{display:none}
.chat-actions>div{position:absolute;right:0;top:100%;z-index:30;display:grid;gap:5px;min-width:120px;padding:8px;border:1px solid #c4a66a66;border-radius:8px;background:var(--appearance-bg,#101715);color:var(--appearance-ink,#f1eee5)}
.chat-actions button{font:12px system-ui;text-align:left;margin:0;min-height:34px;padding:6px 10px}.chat #chatstatus:empty{display:none}.chat .chat-compose #send{margin-top:6px}
@media(max-width:600px){body>#dmr-dashboard{margin:0 12px 8px;gap:6px 10px}body>#dmr-dashboard :is(#dmr-dashboard-configure,#dmr-dashboard-quiet,#dmr-dashboard-stop){flex:0 0 auto}body>#dmr-dashboard #dmr-speaker{flex-basis:100%}}
body>#dmr-dashboard #dmr-dashboard-quiet{margin-left:auto}
body>#dmr-dashboard #dmr-dashboard-play{margin-left:auto;background:var(--appearance-accent,#c4a66a);color:var(--appearance-bg,#101715);font-weight:650}
body>#dmr-dashboard #dmr-dashboard-quiet{margin-left:0}
#dmr-inline-player{width:100%;flex:1 1 100%;padding-top:8px;border-top:1px solid #c4a66a55}
#dmr-inline-player iframe{display:block;width:100%;height:320px;border:0;border-radius:6px;background:#101715}
#dmr-inline-player .heading{margin-bottom:6px}#dmr-inline-player small{font:12px/1.4 system-ui}
/* Internet shares Signal's column instead of consuming another transport slot. */
body>header>.transport{display:grid;grid-template-columns:repeat(6,max-content);grid-template-rows:auto auto;align-items:center;justify-content:end;column-gap:12px;row-gap:4px}
body>header>.transport>span{grid-row:1/3}
body>header>.transport>span:nth-child(1){grid-column:1;grid-row:2}
body>header>.transport>span:nth-child(2){grid-column:1;grid-row:1}
body>header>.transport>span:nth-child(3){grid-column:2}
body>header>.transport>span:nth-child(4){grid-column:3}
body>header>.transport>span:nth-child(5){grid-column:4}
body>header>.transport>span:nth-child(6){grid-column:5}
body>header>.transport>span:nth-child(7){grid-column:6}
@media(max-width:1200px){body>header>.transport{justify-content:start}}
@media(max-width:480px){body>header>.transport{grid-template-columns:repeat(4,max-content);column-gap:10px}body>header>.transport>span:nth-child(3){grid-row:1;grid-column:2}body>header>.transport>span:nth-child(4){grid-row:1;grid-column:3/5}body>header>.transport>span:nth-child(5){grid-row:2;grid-column:2}body>header>.transport>span:nth-child(6){grid-row:2;grid-column:3}body>header>.transport>span:nth-child(7){grid-row:2;grid-column:4}}
body>header>.transport>span{font:500 11px/1.4 system-ui,sans-serif!important;letter-spacing:normal;display:inline-flex;align-items:center;gap:0}
body>header>.transport>span:nth-child(1),body>header>.transport>span:nth-child(2){justify-self:start}
body>header>.transport>span>.capability-unavailable{font:inherit!important;letter-spacing:inherit}
/* Size the transport container to its actual contents; never align tracks outside it. */
body>header>.transport{flex:0 1 auto;width:max-content;max-width:100%;justify-content:start;padding:10px 16px;column-gap:10px}
body>header>.transport>span{color:var(--appearance-ink,var(--ink,#f1eee5))}
body>header>.transport>span>.capability-unavailable{color:inherit!important}
body>header>.transport{border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0}

/* A visible, quiet outline identifies the note entry field in every theme. */
html body .decoder-panel #note{border:1px solid var(--appearance-muted,#c9d2c4)!important;border-radius:5px;background:var(--appearance-bg,#101715);min-height:34px}
body[data-voice-translation=true] .decoder-commandbar :is(.decoder-toolbar,#recording-controls,#file-check),body[data-voice-translation=true] #transcript{display:none!important}
body[data-voice-translation=true] #mode-picker{width:auto;min-width:145px}
#operate-voice{margin:0 12px 8px;min-height:180px;flex:1 1 0;overflow:hidden;display:flex;flex-direction:column}
#operate-voice[hidden]{display:none}
.voice-languages,.voice-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.voice-languages label{flex:1;min-width:130px;margin:4px 0;font-size:12px}.voice-languages select{font-size:12px;padding:6px}.voice-actions{margin:8px 0}.voice-actions input{flex:1;min-width:140px;font-size:11px}.voice-text{display:grid;grid-template-columns:1fr 1fr;gap:8px}.voice-text label{font-size:12px;margin:5px 0}.voice-text textarea{min-height:100px;height:130px;background:#080e0b!important;color:#f1eee5!important;border:1px solid #c4a66a55;resize:vertical;font:13px/1.6 system-ui}.voice-text textarea:focus-visible{outline:2px solid #c4a66a}#voice-status{display:block;font:11px/1.5 system-ui}
@media(max-width:600px){.voice-text{grid-template-columns:1fr}}
/* Keep translation settings visible while each transcript scrolls independently. */
#operate-voice .voice-languages{flex:none;gap:8px}
#operate-voice .voice-languages label{min-width:0;margin:0;font-size:11px}
#operate-voice .voice-languages select{margin:2px 0 0;padding:4px 6px}
#operate-voice .voice-actions{flex:none;gap:6px;margin:5px 0}
#operate-voice .voice-actions button{padding:4px 8px;min-height:26px}
#operate-voice #voice-status{flex:none;margin:0 0 4px;overflow-wrap:anywhere}
#operate-voice .voice-text{flex:1 1 0;min-height:0;grid-template-rows:minmax(0,1fr)}
#operate-voice .voice-text label,#operate-voice .voice-heard-text{display:flex;flex-direction:column;min-height:0;min-width:0;margin:0;font-size:11px}
#operate-voice .voice-text textarea{flex:1 1 0;min-height:0;height:0;max-height:none;resize:none;overflow:auto;margin:3px 0 0;padding:5px 7px;font:12px/1.5 system-ui}
@media(max-width:1100px){#operate-voice{flex:none;height:300px}}
@media(max-width:600px){#operate-voice .voice-text{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr))}#operate-voice .voice-actions input{min-width:0;flex-basis:100%}}

/* Navigation leads the page and stays centered independently of side controls. */
body>header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 16px}
body>header>nav{grid-column:1/-1;grid-row:1;justify-self:center;justify-content:center;align-self:start;width:100%;margin:0}
body>header>.brand-stack{grid-column:1;grid-row:2;justify-self:start}
body>header>.transport{grid-column:2;grid-row:2;justify-self:end}
@media(max-width:700px){body>header>.brand-stack{grid-column:1/-1;grid-row:2}body>header>.transport{grid-column:1/-1;grid-row:3;justify-self:center}}
/* Seven transports in two compact rows, four above three. */
body>header>.transport{grid-template-columns:repeat(4,max-content);grid-template-rows:auto auto;gap:4px 12px}
body>header>.transport>span:nth-child(n){grid-column:auto;grid-row:auto;justify-self:start}
@media(max-width:480px){body>header>.transport{column-gap:6px;padding:4px 6px}}
/* Keep the notice in navigation and recover space for the instruments. */
body>header{padding-top:6px;padding-bottom:6px}
body>header>.transport{padding-top:4px;padding-bottom:4px}
@media(min-width:1101px) and (min-height:560px){
 .decoder-panel #transcript{min-height:60px}
 .decoder-panel #waterfall[data-design]{height:clamp(90px,18dvh,150px)}
}
.station-setup-dialog{background:var(--appearance-bg,#101715)!important;color:var(--appearance-ink,#f4f0e8)!important}
.station-setup-dialog>.station-setup{display:block}
.station-setup-dialog .source-journey-actions{flex-direction:row;flex-wrap:wrap}
.station-setup-dialog .source-journey-heading span{display:none}
.station-setup-dialog .station-save-row{display:none}
.station-setup-dialog input,.station-setup-dialog select{font-size:14px}
.station-setup-dialog [role=tabpanel]{min-width:0}
.station-setup-dialog [role=tab]{font-size:14px}
.station-setup-dialog #dmr-setup-picker{margin:12px 0}
.station-setup-dialog .dmr-picker-panel{position:static;width:100%;max-width:100%;padding:12px;background:var(--appearance-bg,#101715);border:1px solid #789c8066;border-radius:8px}
.station-setup-dialog [data-groups]{max-height:280px;overflow:auto;display:grid;gap:4px}
.station-setup-dialog [data-groups] button{text-align:left;display:flex;align-items:center;gap:8px}
.station-setup-dialog .dmr-picker-panel input[type=checkbox]{width:auto}
.station-setup-dialog .tg-dot{display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#7a8585}
.station-setup-dialog .tg-dot.active{background:#80d789;box-shadow:0 0 6px #80d78988}
.setup-save-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px}
.setup-save-actions [role=status]{font-size:13px}
.dmr-talkgroup-picker [data-groups] button[aria-pressed=true]{outline:1px solid var(--appearance-accent,#c4a66a);outline-offset:-2px}
/* RTL controls share requested values; only bridge status confirms hardware tuning. */
.rtl-controls{min-width:0;margin:6px 0;padding:7px 0;border-block:1px solid #c4a66a30}
.rtl-tune-row,.rtl-monitor-row{display:flex;align-items:end;flex-wrap:wrap;gap:5px 7px;min-width:0}
.rtl-controls label{display:grid;gap:3px;margin:0;font:11px/1.3 system-ui;color:inherit;min-width:0}
.rtl-controls input[type=number]{width:116px;max-width:100%;margin:0;padding:5px 6px;font:12px/1.3 system-ui}
.rtl-controls select{width:auto;max-width:100%;min-width:62px;margin:0;padding:5px 6px;font:12px/1.3 system-ui}
.rtl-controls button{min-height:30px!important;padding:5px 8px!important;font:12px/1.3 system-ui!important;white-space:nowrap}
.rtl-step-buttons{display:flex;gap:4px}.rtl-step-buttons button{min-width:30px}
.rtl-monitor-row{align-items:center;margin-top:7px}.rtl-monitor-row>label:first-child{display:flex;align-items:center;gap:7px;flex:1 1 130px}
.rtl-controls input[type=range]{width:95px;max-width:100%;padding:0;margin:0;flex:1;min-width:55px}
.rtl-controls .rtl-mute{display:flex;align-items:center;gap:4px}.rtl-controls .rtl-mute input{width:auto;margin:0}
.rtl-control-status{display:block;margin-top:5px;font:10px/1.4 system-ui;overflow-wrap:anywhere;color:var(--appearance-muted,#b7bfb8)}
.rtl-control-status:empty,#wfstatus:empty{display:none}
.waterfall-section .rtl-controls{padding:6px 0;margin:4px 0}.waterfall-section .rtl-control-status{font-size:10px}
@media(max-width:600px){.rtl-controls button{min-height:36px!important}.rtl-controls input[type=number],.rtl-controls select{min-height:36px}.rtl-controls input[type=range]{min-height:30px}}
.radio-health .rtl-tune-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.radio-health .rtl-tune-row>label:first-child{grid-column:1/3}.radio-health .rtl-controls input[type=number]{width:100%}
.radio-health .rtl-controls select{width:100%;min-width:0;padding-inline:3px;font-size:11px}
.radio-health .rtl-step-buttons{gap:3px;align-self:end}.radio-health .rtl-step-buttons button{flex:1;min-width:0;padding-inline:3px!important}
.radio-health .rtl-monitor-row>label:first-child{flex:1 1 85px}.radio-health .rtl-controls input[type=range]{width:60px}

/* Preferences belong to the header, not another strip above the decoder. */
body>header{grid-template-columns:max-content minmax(0,max-content) max-content;grid-template-rows:auto auto;justify-content:center;gap:2px;padding:5px 16px}
body>header>.brand-stack{grid-column:1;grid-row:1;display:flex;align-items:center;gap:7px;max-width:none}
body>header .brand{display:flex;align-items:center;gap:7px}
/* Match the renderer’s 120 × 100 viewport with uniform scaling. Reset the legacy flex-basis. */
body>header #radiance-globe{width:43.2px;height:36px;aspect-ratio:6/5;flex:0 0 auto;object-fit:contain}
body>header .wordmark{font-size:13px;letter-spacing:3px;align-self:center}
body>header>nav{grid-column:2;grid-row:1;width:auto;justify-self:center;align-self:center;gap:2px}
body>header>.view-controls{grid-column:3;grid-row:1;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:2px;margin:0;padding:0;justify-self:end;min-width:0}
body>header>.transport{grid-column:1/-1;grid-row:2;justify-self:center;grid-template-columns:repeat(7,max-content);grid-template-rows:auto;padding:2px 6px;gap:4px 14px}
@media(max-width:1050px){
 body>header{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px}
 body>header>.brand-stack{grid-column:1;grid-row:1;order:0;flex:0 0 auto}
 body>header>.view-controls{grid-column:2;grid-row:1;order:1;flex:0 0 auto}
 body>header>nav{grid-column:1/-1;grid-row:2;justify-self:center;justify-content:center;order:2;flex:1 1 100%}
 body>header>.transport{grid-column:1/-1;grid-row:3;order:3;flex:1 1 100%;justify-content:center}
}
@media(max-width:600px){
 body>header{padding:4px 10px}
 body>header>.brand-stack{grid-column:1;grid-row:1;justify-self:start}
 body>header #radiance-globe{width:36px;height:30px}
 body>header .brand{gap:4px}
 body>header .wordmark{font-size:11px;letter-spacing:1px}
 body>header>.view-controls{grid-column:2;grid-row:1;justify-self:center}
 body>header>nav{grid-row:2}
 body>header>.transport{grid-row:3;grid-template-columns:repeat(4,max-content);gap:4px 10px}
 body>header>.view-controls button,body>header>.view-controls #radiance-appearance-button{min-height:44px!important;font-size:11px!important;padding:5px 6px!important}
}

@media(max-width:350px){
 body>header>.brand-stack{grid-column:1/-1;grid-row:1;justify-self:center;flex-basis:100%;justify-content:center}
 body>header>.view-controls{grid-column:1/-1;grid-row:2;justify-self:center}
 body>header>nav{grid-row:3}
 body>header>.transport{grid-row:4}
}
/* Wide consoles use one header row; never reserve a transport-only second row. */
@media(min-width:1200px){
 body>header{grid-template-columns:max-content minmax(0,max-content) max-content max-content;grid-template-rows:auto;column-gap:2px}
 body>header>.brand-stack{grid-column:1;grid-row:1}
 body>header>nav{grid-column:2;grid-row:1}
 body>header>.view-controls{grid-column:3;grid-row:1}
 body>header>.transport{grid-column:4;grid-row:1;grid-template-columns:repeat(4,max-content);grid-template-rows:auto auto;gap:3px 8px;padding:2px 0}
}

/* Stable instrument titles; the small badge follows decoding, not RF demodulation. */
.decoder-heading .decoder-title-group{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.station-column #station-title,.decoder-heading #decoder-title,.chat>.chat-heading h2{font:650 17px/1.3 system-ui,sans-serif;letter-spacing:.3px;text-transform:none;margin:0;color:var(--ink,#f1eee5)}
#decoder-mode-badge{display:inline-block;font:650 10px/1.3 system-ui,sans-serif;letter-spacing:.3px;padding:3px 6px;border:1px solid var(--accent,#c4a66a);border-radius:5px;color:var(--accent,#c4a66a);background:transparent;white-space:nowrap}

/* Three existing work areas, one quiet boundary treatment; no added panels. */
.workspace>.station-column>.panel,.workspace>.decoder-panel,.workspace>.chat{border:1px solid color-mix(in srgb,var(--accent,#c4a66a) 42%,transparent)}

/* Keep transcript heading, file picker and live status on one compact row. */
#operate-voice .voice-actions .voice-heard-label{flex:none;min-width:0;margin:0;font-size:11px}
#operate-voice .voice-actions #voice-status{flex:0 1 auto;margin:0;min-width:0}
#operate-voice .voice-actions input{min-width:0;max-width:230px}
#operate-voice .voice-heard-text textarea{width:100%}

/* Setup and receive-mode controls share the same accent lettering. */
.station-column .station-setup-launcher,.decoder-panel #mode-picker{font:650 12px/1.3 system-ui,sans-serif;letter-spacing:.3px;text-transform:none;color:var(--appearance-accent,var(--accent,#c4a66a))!important;background:transparent!important;border:0;border-radius:5px;padding:4px 8px;min-height:27px}
#station-setup-title{font:650 17px/1.3 system-ui,sans-serif;letter-spacing:.3px;text-transform:none;color:var(--appearance-accent,var(--accent,#c4a66a))}

/* The active workspace label is a location indicator, never a reconnect action. */
body>header nav .nav-current,body>header nav .nav-current:hover{cursor:default;color:var(--appearance-accent,#c4a66a);text-decoration:none;border-color:transparent}
