/* Shared controls remain reachable on touchscreens and directional remotes. */
body.compactRadio .radioToolbar{flex-wrap:wrap;gap:8px!important;min-height:54px;height:auto!important;padding-block:6px!important;}
#referenceSettings{max-width:min(720px,calc(100vw - 24px))!important;max-height:calc(100dvh - 24px)!important;overflow-y:auto!important;overscroll-behavior:contain;scroll-padding-block:100px 24px;}
#referenceSettings .refSettingsHeader{position:sticky;top:-1px;z-index:5;background:#12252e;padding-block:12px;}
#referenceSettings .themeLighting{min-width:0;}
#referenceSettings #cabinetThemePicker{grid-template-columns:repeat(auto-fit,minmax(112px,1fr));}
#referenceSettings #cabinetThemePicker button{min-height:64px;touch-action:manipulation;}
#cabinetThemePicker button[aria-pressed=true]{outline:2px solid #e1f4cf;outline-offset:1px;}
.platformHint{grid-column:1/-1;font:13px/1.5 system-ui;color:#c4d8d0;margin:6px 0 16px;}
.platformScreenChoice{display:block;margin:12px 0;}
.platformScreenChoice select{display:block;width:100%;min-height:44px;margin-top:7px;}
.remoteNavigation :is(button,a,input,select,[tabindex]):focus{outline:3px solid #f8dd83!important;outline-offset:3px!important;box-shadow:0 0 0 6px #101a23!important;}
body.radioTV #referenceSettings{max-width:min(1000px,calc(100vw - 80px))!important;font-size:20px;}
body.radioTV #referenceSettings :is(button,select,input){font-size:18px!important;min-height:56px;}
body.radioTV #referenceSettings #cabinetThemePicker{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
body.radioTV #referenceSettings #cabinetThemePicker button{min-height:82px;font-size:19px!important;}
body.radioTV .radioToolbar :is(a,button){font-size:18px!important;min-height:54px!important;}
@media(max-width:700px){
 body.compactRadio .radioToolbar{justify-content:space-between!important;padding-inline:8px!important;}
 #toolbarSettings{font-size:12px;min-height:44px;padding:7px 9px;}
 body.compactRadio .radioToolbar #radioHomeLink{flex:1 1 44%;font-size:12px!important;}
 body.compactRadio .radioToolbar #christmasMusic{order:3;flex:1 1 100%;}
 body.compactRadio .radioToolbar #retroFullscreen{font-size:12px!important;padding-inline:8px!important;}
 #referenceSettings{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:14px!important;box-sizing:border-box;}
 #referenceSettings .refSettingsBody{padding:0!important;min-width:0;}
 #referenceSettings #cabinetThemePicker{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #referenceSettings .lightingControls{grid-template-columns:1fr!important;}
 body.radioTV #referenceSettings{font-size:16px;}
}
@media(prefers-reduced-motion:reduce){#referenceSettings{scroll-behavior:auto!important;}}

/* Keep scrolled settings beneath the close button on every viewport. */
body #referenceSettings{padding:0!important;}
body #referenceSettings .refSettingsHeader{top:0;margin:0;padding:16px!important;}
body #referenceSettings .refSettingsBody{padding:0 16px 20px!important;}

.radioVisits{display:flex;align-items:center;gap:12px;padding:7px 16px;min-height:42px;box-sizing:border-box;border:1px solid #54754a;border-radius:6px;background:linear-gradient(#102d16,#06160b);box-shadow:inset 0 2px 6px #0008,0 0 8px #7fb75c16;color:#bce79b;white-space:nowrap;}
.radioVisits span{font:650 10px/1.2 system-ui;letter-spacing:.15em;}
.radioVisits strong{font:700 23px/1.1 ui-monospace,monospace;letter-spacing:.08em;text-shadow:0 0 7px #a8e67a60;font-variant-numeric:tabular-nums;}
body.radioTV .radioVisits strong{font-size:28px;}
@media(max-width:700px){.radioVisits{min-height:44px;padding:6px 10px;gap:7px;}.radioVisits strong{font-size:20px;}.radioVisits span{font-size:9px;}body.compactRadio .radioToolbar #radioHomeLink{flex:1 1 auto!important;}body.compactRadio .radioToolbar{gap:6px!important;}}

/* The cabinet nameplate replaces the external navigation bar. */
body.compactRadio.retroMode .radioToolbar{display:none!important;}
body.compactRadio.retroMode .radioStage{height:100dvh!important;max-height:none!important;}
.cabinetHome{position:absolute;left:29.5%;top:15%;width:41%;height:6.5%;z-index:6;border-radius:.25cqw;text-decoration:none;cursor:pointer;}
.cabinetHome span,.cabinetHome small{display:none;}
.cabinetHome:hover{background:#d9ecdf0a;}
.cabinetHome:focus-visible{outline:3px solid #f2dda0;outline-offset:2px;background:#e3ffe215;}
.menuFullscreen{margin:0;}
#referenceSettings #retroFullscreen{position:static!important;display:inline-flex!important;align-items:center;justify-content:center;min-height:44px!important;width:auto!important;padding:10px 16px!important;font:650 15px system-ui!important;border:1px solid #789698;border-radius:7px;background:#1d353c;color:#eaf6ef;}
body.compactRadio #receiver .displayDateVisits{display:inline-flex;gap:.65cqw;align-items:center;white-space:nowrap;}
body.compactRadio #receiver .radioVisits{display:inline-flex;gap:.3cqw;min-height:0!important;padding:0!important;border:0!important;border-left:1px solid #b2df8d44!important;padding-left:.6cqw!important;border-radius:0;background:none;box-shadow:none;color:#c5e7a2;}
body.compactRadio #receiver .radioVisits span{font:650 .61cqw/1 system-ui;letter-spacing:.04em;}
body.compactRadio #receiver .radioVisits strong{font:700 .82cqw/1 monospace;letter-spacing:.025em;text-shadow:0 0 .3cqw #b4e98b44;}
body[data-cabinet=christmas] .christmasGreeting{top:auto;bottom:.55cqw;right:1cqw;font-size:.65cqw;}
@media(max-width:700px),(max-width:1000px) and (pointer:coarse){
 body.compactRadio.retroMode .radioStage{height:auto!important;}
 body.compactRadio.retroMode #receiver .refStation .tunerLabels{padding-right:0!important;height:auto!important;min-height:60px!important;}
 body.compactRadio.retroMode #receiver .refStation .displayDateTime{width:100%;gap:7px;}
 body.compactRadio.retroMode #receiver .displayDateVisits{gap:10px;flex-wrap:wrap;}
 body.compactRadio.retroMode #receiver .radioVisits{gap:5px;padding-left:9px!important;}
 body.compactRadio.retroMode #receiver .radioVisits span{font-size:10px;}
 body.compactRadio.retroMode #receiver .radioVisits strong{font-size:14px;}
 body.compactRadio.retroMode .cabinetHome{position:relative;inset:auto;grid-area:hero;align-self:start;justify-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-height:48px;margin:5px 0;background:linear-gradient(#606762,#303833);border:1px solid #a2a99e;border-radius:5px;color:#edf2e7;text-shadow:0 1px #000;text-decoration:none;}
 body.compactRadio.retroMode .cabinetHome span{display:block;font:750 15px/1.2 system-ui;letter-spacing:.12em;}
 body.compactRadio.retroMode .cabinetHome small{display:block;font:600 8px/1.2 system-ui;letter-spacing:.13em;}
 body.compactRadio.retroMode .mobileCabinet{margin-top:60px!important;}
}
