/* Shared receiver controls: one compact transport, existing controls in native top-layer popovers. */
html:not([data-mini=true]) body #radio-app>.app-heading{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:0!important;padding:12px 16px!important;min-height:68px;flex:none}
html:not([data-mini=true]) body #radio-app>.app-heading .player-brand{margin:0 auto 0 0!important;flex:1;min-width:0;font-size:27px!important}
html:not([data-mini=true]) body #radio-app>.app-heading .brand-play{display:none}
html:not([data-mini=true]) body #radio-app>.app-heading>.icon-button{order:initial!important;width:44px!important;min-width:44px!important;height:44px!important;margin:0;padding:11px;border-radius:10px}
html:not([data-mini=true]) body #radio-app>.app-heading>#open-menu,html:not([data-mini=true]) body #radio-app>.app-heading>#expand-mini{display:none!important}
html:not([data-mini=true]) body #radio-app .player-controls{padding:12px 20px 18px!important;flex:none;min-height:0;background:var(--bg);border-top:0}
html:not([data-mini=true]) body #radio-app .now-playing{position:relative;display:grid!important;grid-template-columns:44px minmax(44px,1fr) minmax(56px,1.2fr) minmax(44px,1fr) 44px!important;gap:6px!important;align-items:center!important;margin:0!important;min-height:56px}
html:not([data-mini=true]) body #radio-app .now-playing>.current-info,html:not([data-mini=true]) body #radio-app .now-playing>.current-mark{display:none!important}
html:not([data-mini=true]) body #radio-app #previous-station{grid-column:2;grid-row:1}
html:not([data-mini=true]) body #radio-app #toggle-play{grid-column:3;grid-row:1}
html:not([data-mini=true]) body #radio-app #next-station{grid-column:4;grid-row:1}
html:not([data-mini=true]) body #radio-app :is(#previous-station,#toggle-play,#next-station){display:flex!important;align-items:center;justify-content:center;height:56px!important;min-height:56px!important;max-height:56px!important;width:100%!important;min-width:0!important;margin:0!important;transform:none!important;box-sizing:border-box;align-self:center}
html:not([data-mini=true]) body #radio-app :is(#previous-station,#toggle-play,#next-station) svg{width:23px;height:23px}
html:not([data-mini=true]) body #radio-app #player-volume-toggle{grid-column:5;grid-row:1;display:flex;flex-direction:column;gap:2px;width:44px;min-width:44px;height:56px;padding:4px;font-size:10px;background:transparent;color:var(--ink);border:0;box-shadow:none}
html:not([data-mini=true]) body #radio-app #player-volume-toggle[hidden]{display:none!important}
html:not([data-mini=true]) body #radio-app .player-utility,html:not([data-mini=true]) body #radio-app>.player-controls>.volume-help{display:none!important}
html:not([data-mini=true]) body #radio-app .player-secondary-panel{position:fixed;inset:var(--secondary-top,80px) auto var(--secondary-bottom,auto) var(--secondary-left,12px);width:var(--secondary-width,320px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 110px);overflow:auto;margin:0;padding:12px;box-sizing:border-box;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--ink);box-shadow:0 12px 40px #0003;opacity:0;transform:translateY(var(--support-popover-rise,8px));transition:opacity var(--support-window-duration,360ms) var(--support-window-ease,cubic-bezier(.16,1,.3,1)),transform var(--support-window-duration,360ms) var(--support-window-ease,cubic-bezier(.16,1,.3,1)),display var(--support-window-duration,360ms) allow-discrete,overlay var(--support-window-duration,360ms) allow-discrete}
html:not([data-mini=true]) body #radio-app .player-secondary-panel:popover-open{display:flex;flex-direction:column;gap:4px;opacity:1;transform:none}
@starting-style{html:not([data-mini=true]) body #radio-app .player-secondary-panel:popover-open{opacity:0;transform:translateY(var(--support-popover-rise,8px))}}
html:not([data-mini=true]) body #radio-app .player-secondary-panel :is(button:not(.theme-set-action),.recorded-speed){display:flex!important;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:44px;height:auto!important;padding:10px 12px!important;margin:0;border:0;border-radius:8px;box-shadow:none;background:transparent;color:inherit;font-size:15px;font-weight:400;line-height:1.4;white-space:normal;text-align:left}
html:not([data-mini=true]) body #radio-app .player-secondary-panel button:not(.theme-set-action):hover{background:var(--surface)}
html:not([data-mini=true]) body #radio-app .player-secondary-panel button:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.player-secondary-panel svg{width:22px;height:22px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6}
#player-more-panel #share-player>span:not(.secondary-label){display:none}
html:not([data-mini=true]) body #radio-app .recorded-secondary{display:flex;flex-direction:column;border-bottom:1px solid var(--line);padding-bottom:6px;margin-bottom:4px}
html:not([data-mini=true]) body #radio-app .recorded-secondary[hidden]{display:none!important}
.recorded-speed select{margin-left:auto;padding:6px 12px;font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:6px;min-height:40px}
html:not([data-mini=true]) body #radio-app .player-volume-panel .volume-row{display:flex!important;align-items:center;width:100%;padding:0!important;margin:0!important;gap:12px;min-height:44px}
html:not([data-mini=true]) body #radio-app .player-volume-panel .volume-row #mute{width:44px;min-width:44px;padding:10px!important}
.player-volume-panel input{min-width:0;flex:1}.player-volume-panel output{font-size:13px;flex:none}.player-volume-panel .volume-help{margin:4px 8px;font-size:13px}
html:not([data-mini=true]) body #radio-app .recorded-controls{display:block!important;grid-template-columns:none!important;padding:0 0 10px!important;background:transparent;border:0;margin:0}
html:not([data-mini=true]) body #radio-app .recorded-controls[hidden]{display:none!important}
.recorded-timeline{display:flex;align-items:center;gap:8px;min-height:48px}
html:not([data-mini=true]) body #radio-app .recorded-timeline button{flex:none;min-width:44px;min-height:44px;padding:4px;background:transparent;color:var(--ink);font-size:13px;border:0;box-shadow:none}
.recorded-seek-track{flex:1;min-width:0}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input{width:100%;height:24px!important;margin:0;display:block;accent-color:var(--ink);cursor:pointer}
html:not([data-mini=true]) body #radio-app .recorded-times{display:flex;justify-content:space-between;font-size:11px;line-height:14px;font-variant-numeric:tabular-nums;color:var(--muted)}
html:not([data-mini=true]) body #radio-app .recorded-timeline button:disabled{opacity:.4;cursor:default}
/* LCD needs a bounded number row; a flex minimum must never let digits collide with the title. */
html[data-theme=lcd] .lcd-clock{flex:1 1 100px;min-height:56px;max-height:150px;line-height:1;font-size:clamp(32px,min(22cqw,17cqh),92px);padding-block:8px;box-sizing:border-box}
html[data-theme=lcd] .lcd-screen h2[data-edition-name]{margin:12px 0 0!important;line-height:1.45!important;font-size:clamp(15px,5.6cqw,22px)!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:0;flex:none}
html[data-theme=lcd] .lcd-screen h2 .station-name-action{white-space:normal;line-height:inherit;display:inherit;font:inherit;max-height:2.9em;overflow:hidden;text-align:left}
html[data-theme=lcd] .lcd-screen p{flex:none;margin-bottom:8px;font-size:13px}
html[data-theme=lcd] .lcd-spectrum{margin-top:auto;flex:0 0 clamp(24px,8cqh,50px)}
@media(max-width:360px){html:not([data-mini=true]) body #radio-app>.app-heading{padding-inline:8px!important}html:not([data-mini=true]) body #radio-app>.app-heading>.icon-button{width:44px!important;min-width:44px!important;padding:12px}html:not([data-mini=true]) body #radio-app .player-controls{padding-inline:12px!important}html:not([data-mini=true]) body #radio-app .now-playing{gap:4px!important;grid-template-columns:36px minmax(40px,1fr) minmax(48px,1.1fr) minmax(40px,1fr) 36px!important}html:not([data-mini=true]) body #radio-app #player-volume-toggle{min-width:36px;width:36px}html:not([data-mini=true]) body #radio-app>.app-heading .player-brand{font-size:22px!important}}
@media(prefers-reduced-motion:reduce){html:not([data-mini=true]) body #radio-app .player-secondary-panel{transition:none;transform:none}}
html:not([data-mini=true]) body #radio-app .player-secondary-panel [hidden]{display:none!important}
/* The classic two skins have no separate station readout in live mode. */
html[data-media=live]:is([data-theme=krapp],[data-theme=graphite]) body #radio-app .now-playing>.current-info{display:block!important;grid-column:1/-1;grid-row:1;min-width:0;padding-bottom:8px}
html[data-media=live]:is([data-theme=krapp],[data-theme=graphite]) body #radio-app .now-playing>:is(#previous-station,#toggle-play,#next-station,#player-volume-toggle){grid-row:2}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input{appearance:none;-webkit-appearance:none;background:transparent;border:0;border-radius:0;padding:0;box-shadow:none;height:30px!important}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input::-webkit-slider-runnable-track{height:3px;border:0;border-radius:3px;box-shadow:none;background:linear-gradient(to right,var(--ink) var(--seek-progress,0%),color-mix(in srgb,var(--ink) 22%,transparent) var(--seek-progress,0%))}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:15px;height:15px;margin-top:-6px;border:0;border-radius:50%;background:var(--ink);box-shadow:none}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input::-moz-range-track{height:3px;background:color-mix(in srgb,var(--ink) 22%,transparent);border:0;border-radius:3px}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input::-moz-range-progress{height:3px;background:var(--ink)}
html:not([data-mini=true]) body #radio-app .recorded-seek-track input::-moz-range-thumb{width:15px;height:15px;border:0;border-radius:50%;background:var(--ink)}
.recorded-feedback{font-size:13px;line-height:1.4;margin:4px 12px;color:var(--error,var(--ink))}

.player-secondary-panel .recorded-speed .support-select{margin-left:auto;width:108px;flex:none}
.player-secondary-panel .recorded-speed .support-select select{margin:0;padding:8px 42px 8px 12px;min-height:44px;appearance:none;-webkit-appearance:none;border-radius:6px}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]{appearance:none;-webkit-appearance:none;background:transparent;border:0;border-radius:0;padding:0;height:32px;box-shadow:none}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]::-webkit-slider-runnable-track{height:3px;border:0;border-radius:3px;box-shadow:none;background:linear-gradient(to right,var(--ink) var(--range-progress,0%),color-mix(in srgb,var(--ink) 22%,transparent) var(--range-progress,0%))}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;margin-top:-6.5px;border:0;border-radius:50%;background:var(--ink);box-shadow:none}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]::-moz-range-track{height:3px;background:color-mix(in srgb,var(--ink) 22%,transparent);border:0;border-radius:3px}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]::-moz-range-progress{height:3px;background:var(--ink)}
html:not([data-mini=true]) body #radio-app .player-volume-panel input[type=range]::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:var(--ink)}

/* Deck uses the same transport/volume surface; cards retain their swipe and selection gestures. */
html:not([data-mini=true]) body #radio-app .deck-controls,html:not([data-mini=true]) body #radio-app .deck-volume{display:none!important}
/* Keep skin typography stronger than the legacy generic podcast heading rule. */
html[data-theme=lcd] #radio-app #edition-display .lcd-screen h2[data-edition-name]{display:block!important;font-size:clamp(15px,5.6cqw,22px)!important;line-height:1.45!important;overflow:visible;max-height:none}
html[data-theme=lcd] #radio-app #edition-display .lcd-screen h2 .station-name-action{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;font:inherit;line-height:1.45!important;max-height:none;min-height:44px;overflow:hidden;white-space:normal}
/* Bold's animated meter belongs inside the display, above the transport. */
html[data-theme=bold] #radio-app #bold-display{overflow:hidden;isolation:isolate}
html[data-theme=bold] #radio-app .bold-spectrum{flex-shrink:1;min-height:24px;max-height:112px}
html[data-theme=bold] #radio-app .bold-bottom{flex-shrink:0}
html[data-theme=bold] #radio-app>.player-controls{display:block!important;position:relative;z-index:1;background:var(--bg)}
html[data-theme=bold] #radio-app #bold-name{min-height:0;flex:0 1 auto;overflow:hidden;max-width:100%;width:100%}
html[data-theme=bold] #radio-app #bold-name[data-long-title=true],html[data-theme=bold][data-media=recorded] #radio-app #bold-name{font-size:clamp(28px,8.5cqw,46px)!important;line-height:1.08!important;padding:16px 0}
html[data-theme=bold] #radio-app #bold-name[data-long-title=true] span,html[data-theme=bold][data-media=recorded] #radio-app #bold-name span{display:inline}
html[data-theme=bold] #radio-app #bold-name[data-long-title=true] span+span::before,html[data-theme=bold][data-media=recorded] #radio-app #bold-name span+span::before{content:' '}
html[data-theme=bold] #radio-app #bold-name .station-name-action{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;min-height:44px;overflow:hidden;white-space:normal;line-height:inherit}

/* Clamp the text span rather than the native button's anonymous inner box. */
html[data-theme=lcd] #radio-app #edition-display .lcd-screen h2 .station-name-action{display:block!important}
html[data-theme=lcd] #radio-app #edition-display .lcd-screen h2 .station-name-copy{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font:inherit;line-height:inherit}
html[data-theme=bold] #radio-app #bold-name .station-name-action{display:block}
html[data-theme=bold] #radio-app #bold-name .station-name-action>.station-name-copy{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;line-height:inherit}

#player-more-panel :is(.share-status,.share-fallback){margin:8px 12px;font:inherit;color:inherit}
#player-more-panel .share-fallback input{display:block;width:100%;min-width:0;box-sizing:border-box;min-height:44px;margin-top:8px;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font:inherit}

.recorded-date{display:block;font-size:14px;line-height:1.4;color:var(--muted);margin:0 0 6px;font-variant-numeric:tabular-nums}

/* One volume surface for every theme; centred inside the receiver. */
html:not([data-mini=true]) body #radio-app .player-volume-panel{transform:translateY(calc(-50% + var(--support-popover-rise,8px)))}
html:not([data-mini=true]) body #radio-app .player-volume-panel:popover-open{transform:translateY(-50%)}
@starting-style{html:not([data-mini=true]) body #radio-app .player-volume-panel:popover-open{opacity:0;transform:translateY(calc(-50% + var(--support-popover-rise,8px)))}}
@media(prefers-reduced-motion:reduce){html:not([data-mini=true]) body #radio-app .player-volume-panel{transition:none}}

/* Keep the receiver distinct from its window, including embedded modal windows. */
html:not([data-mini=true]) body[data-view=player],html:not([data-mini=true]) body[data-view=player] #player-page{background:#000!important}
@media(min-width:601px){
 html:not(.is-fullscreen):not([data-mini=true]) body[data-view=player] #player-page{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:100dvh;padding:32px 0 calc(32px + var(--install-space,0px))!important}
 html:not(.is-fullscreen):not([data-mini=true]) body[data-view=player] #player-page #radio-app{--receiver-height:min(880px,calc(100dvh - 64px - var(--install-space,0px)));height:var(--receiver-height)!important;min-height:min(360px,var(--receiver-height))!important;max-height:var(--receiver-height)!important;margin:0 auto!important}
}

/* Phones always use the viewport, including the portal iframe. */
@media(max-width:600px){
 html:not([data-mini=true]) body[data-view=player] #player-page{width:100%;min-height:100dvh;padding:0!important;margin:0!important}
 html:not([data-mini=true]) body[data-view=player] #player-page #radio-app{width:100%!important;max-width:none!important;height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important}
}

/* Only the active panel scrolls; the settings heading stays reachable. */
#preferences-dialog{overflow:clip}
#preferences-dialog>.dialog-header,#preferences-dialog>.settings-tabs{flex-shrink:0}

/* One visibility gate for every player skin, including pseudo-element loops. */
html[data-player-visible="false"] #radio-app,html[data-player-visible="false"] #radio-app::before,html[data-player-visible="false"] #radio-app::after,html[data-player-visible="false"] #radio-app *,html[data-player-visible="false"] #radio-app *::before,html[data-player-visible="false"] #radio-app *::after{animation-play-state:paused!important;transition:none!important}

/* The full receiver Close shares the portal burger's viewport corner. */
@media(max-width:700px){html:not([data-mini=true]) body #radio-app>.app-heading{height:76px!important;min-height:76px!important;padding:0 15.5px!important}}
@media(max-width:360px){html:not([data-mini=true]) body #radio-app>.app-heading{padding-inline:11.5px!important}}
