:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #121212; color: #f5f5f7; }
* { box-sizing: border-box; }
body { margin: 0; font-size: clamp(.875rem, .8rem + .25vw, 1rem); }
a { color: #ffd45b; }
a:focus-visible { outline: 2px solid #ffd45b; outline-offset: 4px; }
.shell { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: 1rem; border-bottom: 1px solid #333333; }
.brand { color: #fff; font-weight: 900; letter-spacing: .06em; font-size: 1.35rem; text-decoration: none; }
.brand span { color: #ffd45b; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.masthead nav a, .station { min-height: 44px; display: flex; align-items: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem); gap: clamp(1rem, 4vw, 3rem); padding-block: 2rem; }
h1 { font-size: clamp(1.85rem, 5vw, 3rem); margin-top: 0; line-height: 1.1; }
h2 { font-size: 1.25rem; }
p { max-width: 65ch; line-height: 1.65; color: #dedee7; }
.station-player { display: block; width: 100%; height: clamp(390px, 62vw, 700px); border: 0; background: #151925; }
.station { border-bottom: 1px solid #333333; padding-inline: .75rem; text-decoration: none; }
.station:hover, .station[aria-current] { background: #242939; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #151925; }
.gallery figcaption { padding-block: .5rem; min-height: 3rem; }
.gallery-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.gallery-controls button { min-height: 44px; padding-inline: .65rem; border: 1px solid #333333; border-radius: .35rem; background: #242939; color: #fff; cursor: pointer; }
.gallery-controls button:focus-visible { outline: 2px solid #ffd45b; outline-offset: 2px; }
footer { border-top: 1px solid #333333; padding-block: 1.5rem; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); background: #101219; padding: .75rem; }
.skip:focus { transform: none; }
@media (max-width: 680px) { .layout { grid-template-columns: 1fr; } }

body { background: #121212; }
.shell { width: 92%; }
.original-hero { position: relative; isolation: isolate; background: #151515; overflow: hidden; }
.original-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.original-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(18, 18, 18, .35), rgba(18, 18, 18, .72));
}
.original-brand { min-height: clamp(270px, 30vw, 460px); display: flex; flex-direction: column; align-items: start; justify-content: center; gap: 1.25rem; }
.original-brand img { display: block; width: min(290px, 65vw); height: auto; }
.original-brand { position: relative; }
.original-app { padding: .35rem .65rem; border: 1px solid #333333; border-radius: .45rem; color: #ffc251; text-transform: uppercase; text-decoration: none; }
.original-apps { display: flex; flex-wrap: wrap; gap: .5rem; }
.original-app-pending { border-color: #333333; color: #eee; }
.original-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem 0; padding: .8rem; background: #151515; border-block: 1px solid #333333; }
.original-nav a { padding: .2rem .85rem; color: #ddd; font-size: .8rem; text-transform: uppercase; text-decoration: none; }
.original-nav a + a { border-left: 1px solid #333333; }
.public-menu { display: contents; }
.mobile-menu-toggle { display: none; }
.management-nav { position: relative; }
.management-nav summary { padding: .2rem .85rem; color: #ddd; font-size: .8rem; text-transform: uppercase; cursor: pointer; }
.management-nav ul { position: absolute; z-index: 2; inset-inline-start: 50%; transform: translateX(-50%); width: max-content; margin: 0; padding: .35rem; list-style: none; background: #151515; border: 1px solid #333333; border-radius: .35rem; }
.management-nav a { display: block; padding-block: .55rem; }
.management-nav a:hover, .management-nav a:focus-visible { background: #303030; color: #fff; }
.management-header { padding-block: 1.5rem; font-weight: 800; }
.management-header img { display: block; max-width: 100%; height: auto; }
.archive-feature { width: min(100%, 32rem); margin: 1.5rem 0; }
.archive-feature img, .archive-portrait { display: block; width: 100%; height: auto; border-radius: .4rem; }
.archive-feature figcaption { margin-top: .5rem; color: #ccc; }
.archive-portrait { aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: .75rem; }
.management-main { padding-block: clamp(2rem, 5vw, 4rem); }
.management-main > p { max-width: 66ch; }
.management-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .85rem; list-style: none; padding: 0; margin-block: 1.75rem; }
.management-grid li { background: #1c1c1c; border: 1px solid #333333; border-radius: .65rem; padding: 1rem; }
.management-grid p { margin: .5rem 0 0; color: #ccc; }
.archive-grid :is(img, video) { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #121212; }
.original-nav [aria-current="page"] { color: #ffc251; }
.original-stations { padding-block: clamp(2rem, 6vw, 5rem); }
.original-stations h2 { margin: 0 0 .75rem; text-transform: uppercase; }
.original-tiles { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .6rem; }
.original-tiles a { position: relative; display: block; overflow: hidden; color: white; background: #333; }
.original-tiles img { width: 100%; height: auto; aspect-ratio:  1 / 1; object-fit: cover; display: block; }
.original-tiles strong { position: absolute; inset: auto 0 0; padding: .6rem .35rem; background: #111d; text-align: center; text-transform: uppercase; font-size: .8rem; }
@media (hover: hover) {
    .original-tiles a:not(:hover):not(:focus-visible) strong { opacity: 0; }
}
.layout { padding-top: 1.5rem; border-top: 1px solid #333333; }
@media (max-width: 850px) { .original-tiles { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 520px) { .original-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .original-hero video { display: none; } }

.layout { grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); align-items: start; }
.station-player {
    width: min(100%, 500px);
    height: auto;
    aspect-ratio: 500 / 365;
    background: transparent;
    color-scheme: light;
}
.gallery figcaption { min-height: 0; }
.original-tiles img { aspect-ratio:  1 / 1; }
@media (max-width: 680px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.history-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    margin-inline: auto;

    padding: clamp(1rem, 2vw, 2rem) 0;
    background: #121212;
    align-items: stretch;
}
.history-copy { text-align: center; }
.history-copy h1, .history-copy h2 {
    font-size: clamp(1.2rem, 1.55vw, 1.75rem);
    text-transform: uppercase;
    letter-spacing: .035em;
}
.history-copy h1 { margin-bottom: 2rem; }
.history-copy h2 { margin-top: 2rem; }
.history-copy p { margin: .8rem auto; color: #fff; }
.history-copy .history-highlight { color: #ffa023; font-weight: 700; }
.history-copy .station-player { margin-inline: auto; }
.history-gallery img { aspect-ratio: 10 / 7; object-position: center; background: #121212; }
@media (max-width: 760px) { .history-layout { grid-template-columns: minmax(0, 1fr); } }

.history-copy audio, .history-copy video { width: 100%; }
.history-copy video { max-height: 70vh; background: #121212; }
.history-copy [hidden] { display: none; }

.history-copy [data-opening-track] {
    margin: .5rem auto 0;
    padding: .7rem .9rem;
    text-align: left;
    background: #202020;
    border-radius: 8px 8px 0 0;
}
.history-copy audio, .history-copy video {
    display: block;
    color-scheme: dark;
    background: #202020;
}
.history-copy audio {
    height: 44px;
    border-radius: 0 0 8px 8px;
}
.history-copy audio::-webkit-media-controls-panel,
.history-copy video::-webkit-media-controls-panel {
    background: linear-gradient(#414141, #202020);
}
.history-copy video { border-radius: 8px 8px 0 0; }
.history-copy [data-home-status] {
    margin: 0;
    max-width: none;
    padding: .5rem .75rem;
    background: #202020;
    text-align: left;
    border-radius: 0 0 8px 8px;
}

.history-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(.8rem, 2vw, 1.5rem);
    border: 1px solid #333333;
    border-radius: 8px;
}
.history-gallery { position: relative; min-width: 0; }
.history-gallery figure { position: absolute; inset: 0; }
.history-gallery img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.history-gallery figure:not([hidden]) { animation: gallery-arrive 1s ease-out both; }
@keyframes gallery-arrive { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .history-gallery figure:not([hidden]) { animation: none; } }
@media (max-width: 760px) {
    .history-gallery { aspect-ratio: 10 / 7; }
}

.history-layout { box-shadow: 0 0 0 100vmax #121212; clip-path: inset(0 -100vmax); }
.history-layout, main:has(.history-layout) + footer { border-top: 0; }
.history-layout { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.history-gallery { overflow: hidden; border-radius: 10px; }
.history-gallery::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 30px 12px #121212;
    pointer-events: none;
}

.history-copy { border-radius: 12px; }
.history-copy [data-opening-track], .history-copy video { border-radius: 12px 12px 0 0; }
.history-copy audio, .history-copy [data-home-status] { border-radius: 0 0 12px 12px; }

/* Keep the opening layout as the sizing reference during video playback. */
.history-copy { position: relative; }
.history-copy:has(video:not([hidden])) > [data-opening-screen][hidden] {
    display: block;
    visibility: hidden;
}
.history-copy video:not([hidden]) {
    position: absolute;
    inset: 0 0 2.5rem;
    height: calc(100% - 2.5rem);
    max-height: none;
    object-fit: contain;
}
.history-copy [data-home-status]:not([hidden]) {
    position: absolute;
    inset: auto 0 0;
    height: 2.5rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.history-gallery { transform: scale(.95); transform-origin: center; }

.history-copy [data-video-backdrop] { display: none; }
.history-copy:has(video:not([hidden])) { overflow: hidden; }
.history-copy:has(video:not([hidden])) [data-video-backdrop] {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: calc(100% - 2.5rem);
    filter: blur(22px) brightness(.55);
    transform: scale(1.12);
    pointer-events: none;
}
.history-copy video:not([hidden]) { background: transparent; }

.history-copy video:not([hidden]), .history-copy:has(video:not([hidden])) [data-video-backdrop] {
    height: calc(100% - 5.25rem);
}
.history-copy [data-video-controls]:not([hidden]) {
    position: absolute;
    inset: auto 0 2.5rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 .5rem;
    background: linear-gradient(#414141, #202020);
}
.history-copy [data-video-controls] input { flex: 1; min-width: 0; accent-color: #ffd45b; }
.history-copy [data-video-controls] button {
    border: 0;
    padding: .45rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.history-copy [data-video-controls] button:focus-visible { outline: 2px solid #ffd45b; }

@media (max-width: 600px) {
    .original-nav > .home-session-notice:not([hidden]) {
        position: static;
        grid-area: 1 / 1;
        justify-self: start;
        align-self: center;
        max-width: calc(100% - 7rem);
    }
    .original-nav > .mobile-menu-toggle { grid-area: 1 / 1; }
    .original-tiles {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: .2rem;
    }
    .original-tiles strong { padding: .15rem 0; font-size: clamp(.35rem, 1.6vw, .6rem); }
    .mobile-menu-toggle:not([hidden]) { display: block; justify-self: end; min-height: 44px; padding: .5rem .75rem; background: #151515; color: #fff; border: 1px solid #333333; border-radius: .35rem; cursor: pointer; }
    .mobile-menu-toggle[aria-expanded="false"]:not([hidden]) + .public-menu { display: none; }
    .public-menu > a { display: block; padding: .75rem; }
    .public-menu > a + a { border-left: 0; }
    .original-nav { display: grid; grid-template-columns: minmax(0, 1fr); }
    .original-nav > a, .management-nav summary { display: block; padding: .75rem; }
    .original-nav > a + a { border-left: 0; }
    .management-nav ul { position: static; transform: none; width: auto; }
    .management-nav a { padding-block: .75rem; overflow-wrap: anywhere; }
    .original-brand { align-items: center; padding-block: 3.5rem 1rem; }
    .original-apps { justify-content: center; text-align: center; }
    .original-apps > * { max-width: 100%; }
    .original-app { display: block; overflow-wrap: anywhere; }
    .history-copy [data-video-controls]:not([hidden]) { gap: .2rem; padding-inline: .25rem; }
    .history-copy [data-video-controls] button { padding-inline: .25rem; }
    .history-copy [data-video-controls] input { width: 0; }
    .management-grid li { min-width: 0; overflow-wrap: anywhere; }
}


.studio-public {
    background: #121212;
    color: #f4eee9;
    color-scheme: dark;
}
.studio-public .original-nav {
    background: linear-gradient(#2a211c, #171311);
    border: 0;
    box-shadow: 0 1px #8b573b;
}
.studio-home .stream-masthead > .original-nav { box-shadow: none; }
.studio-public .management-header img,
.studio-public .original-brand img { width: min(190px, 55vw); }
.studio-public .original-app { border-color: #815439; color: #ffbd8f; }
.studio-public .original-tiles a { border-radius: .55rem; }
.studio-public .original-tiles strong { background: linear-gradient(transparent, #120d0bf2); }
.studio-public footer { border-color: #754e37; }

.studio-public { min-height: 100vh; }

.studio-home .original-hero { background: linear-gradient(#2a211c, #171311); }
.studio-home .original-hero::after { content: none; }
.studio-home .original-brand {
    min-height: 0;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    padding-block: .5rem;
    gap: .5rem 1rem;
}
.studio-home .original-apps { align-items: start; justify-content: center; margin-bottom: .75rem; }
.studio-home .original-app { display: block; }
@media (max-width: 600px) {
    .studio-home .original-brand { justify-content: center; }
}
.studio-home .history-layout {
    padding-block: 1rem;
    background: transparent;
    box-shadow: none;
    clip-path: none;
}
.studio-home .history-copy {
    background: linear-gradient(145deg, #35271f, #191310 72%);
    border: 0;
    box-shadow: inset 0 1px #d1986c66, 0 12px 32px #0008;
}
.studio-home .history-copy audio { color-scheme: dark; }
.studio-home .history-copy [data-video-controls]:not([hidden]) {
    background: linear-gradient(#3a2c24, #201814);
    box-shadow: inset 0 1px #a56a46;
}
.studio-home .history-copy [data-video-controls] input { accent-color: #f3ad79; }
.studio-home .history-copy [data-video-toggle] {
    background: #493022;
    border-radius: 2rem;
    box-shadow: inset 0 0 0 1px #d1986c;
}
.studio-home .original-stations {
    padding: .85rem;
    margin-block: 0 1rem;
    border-radius: .65rem;
    background: linear-gradient(#30221b, #1b1512);
    box-shadow: inset 0 1px #b6785066, 0 8px 20px #0004;
}
.studio-home .original-stations h2 { color: #f3ad79; }
.studio-home footer.shell {
    width: 100%;
    min-height: clamp(5rem, 8vw, 9rem);
    padding: .75rem 1rem;
    border: 0;
    text-align: center;
    background: #121212;
}

.home-chat {
    align-self: stretch;
    padding: 1.25rem;
    border-radius: .65rem;
    background: linear-gradient(145deg, #30251f, #201a17 65%);
    box-shadow: inset 0 1px #ffffff12, 0 8px 20px #0004;
}
.home-chat h2 { margin: 0 0 .65rem; color: #f3ad79; }
.home-chat p { margin: 0; padding: .65rem 0; border-bottom: 1px solid #ffffff12; }
.home-chat a { display: inline-block; margin-top: 1rem; color: #f3ad79; }
.studio-home .history-copy [data-video-toggle] {
    flex: 0 0 44px;
    height: 44px;
    padding: 0;
    color: #fff;
}

.home-listener-desk { display: grid; grid-template-rows: auto 1fr; gap: var(--home-card-gap); min-width: 0; }
.home-shoutbox { display: grid; }
.home-listener-desk :is(.home-now,.home-chat) {
    padding: 0 .95rem .85rem;
    border-radius: .75rem;
    background: radial-gradient(ellipse at 65% 0%, #793d1b70, transparent 42%), linear-gradient(145deg,#2d211a,#161210 70%);
    box-shadow: inset 0 0 0 1px #a869456e, inset 0 2px 0 #ed99534d, 0 8px 20px #0006;
}
.home-listener-desk h2 {
    display: flex; align-items: center; gap: .6rem; margin: 0 0 .75rem;
    padding: .75rem 0 .55rem; border-bottom: 1px solid #c1856033;
    color: #fff4eb; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
}
.home-listener-desk h2 span, .home-chat a span { color: #ff9b45; }
.home-listener-desk h2 small { margin-left: auto; font-size: .65rem; color: #ffd0a7; }
.home-now-track { display: flex; align-items: center; gap: .75rem; overflow-wrap: anywhere; }
.home-now-track img { width: clamp(54px, 6vw, 86px); aspect-ratio: 1; object-fit: contain; border-radius: .5rem; background: #100d0b; padding: .35rem; }
.home-now-track span, .home-now-track small { display: block; margin-top: .2rem; color: #efd3bf; }
.home-now-time { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.home-now-time progress { flex: 1; min-width: 0; height: .35rem; accent-color: #ff963f; }
.home-listener-desk .home-chat a { display: flex; justify-content: space-between; border: 1px solid #ad7955; border-radius: 2rem; padding: .55rem .8rem; color: #fff4eb; }
.studio-home .history-copy [data-video-toggle] {
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, #7a513a, #2c1e17 75%);
    box-shadow: inset 0 0 0 2px #e5a474, inset 0 0 0 5px #38241a, 0 3px 8px #0009;
}

/* Keep the transport outside the picture; media changes never move the bar. */
.studio-home .history-copy { --home-transport-height: 72px; }
.studio-home .history-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-self: stretch;
    padding: 0;
    overflow: hidden;
}
.studio-home .history-copy [data-opening-screen] { padding:clamp(1rem,2vw,1.5rem); }
.studio-home .history-copy [data-opening-track],
.studio-home .history-copy > audio[hidden] { display:none; }
.studio-home .history-copy video:not([hidden]),
.studio-home .history-copy:has(video:not([hidden])) [data-video-backdrop] { inset:0 0 var(--home-transport-height); height:calc(100% - var(--home-transport-height)); }
.studio-home .history-copy [data-video-controls]:not([hidden]) {
  position:relative; inset:auto; grid-area:2 / 1; width:100%; margin:0; height:var(--home-transport-height); z-index:2;
}
.studio-home .history-copy [data-home-status]:not([hidden]) { inset:auto 0 var(--home-transport-height); height:auto; margin:0; background:#18120fe6; }
.home-transport-time { font-size:.8rem; font-variant-numeric:tabular-nums; }
[data-video-mute][data-muted="true"] [data-sound-on],
[data-video-mute][data-muted="false"] [data-sound-off] { display:none; }
[data-video-mute][data-muted="true"] [data-sound-off] { display:inline; }

.studio-home .history-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--station-column-gap);
}
.studio-home .history-copy > [data-opening-screen] {
    grid-area: 1 / 1;
    align-content: safe center;
    overflow-y: auto;
    container-type: inline-size;
}
.studio-home [data-opening-screen] > p { max-width: none; }
@container (min-width: 45rem) {
    .studio-home [data-opening-screen] > p { white-space: nowrap; }
}
.home-shoutbox .station-shouts {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 8rem;
}
.home-shoutbox #station-shouts-list { max-height: none; }
.home-shoutbox .station-interaction-cards > .station-card { padding-block: .65rem; }
.home-shoutbox #station-shouts-list p { padding-block: .35rem; }
.home-shoutbox .station-message-card :is(input, textarea) { color: inherit; }
@media (min-width: 761px) {
    .studio-home .history-layout {
        container-type: inline-size;
    }
    .studio-home .history-copy {
        /* Match the fitted stream iframe: its 16:9 picture plus the control bar and frame. */
        --stream-picture-width: calc((100cqw - var(--station-column-gap)) * 2 / 3 - 2 * var(--station-frame-inset));
        block-size: calc(var(--stream-picture-width) * 9 / 16
            + clamp(48px, var(--stream-picture-width) * .07, 64px)
            + 1.3rem + var(--station-frame-inset));
    }
    .home-listener-desk { contain: size; min-height: 0; overflow-y: auto; }
}
@media (max-width: 760px) {
    .studio-home .history-layout { grid-template-columns: minmax(0, 1fr); }
    .studio-home .history-copy > [data-opening-screen] { min-height: 290px; }
}

.studio-home .history-layout { position: relative; }
.studio-home #main { width: min(92%, 100rem); --home-card-gap: .75rem; }
.studio-home .history-layout { padding-bottom: var(--home-card-gap); }

