/* Opt-in staging theme. Existing playback and navigation hooks stay intact. */
.midnight-preview {
    color-scheme: light;
    --bg: #f5f7f2;
    --bg-soft: #edf3ec;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-alt: #f0f5ef;
    --text: #17382d;
    --muted: #55685d;
    --accent: #176b46;
    --accent-2: #176b46;
    --line: #d9e3d8;
    --line-strong: #99b3a1;
    --shadow: 0 8px 32px #17382d08;
    --button-ink: #ffffff;
    --button-start: #176b46;
    --button-end: #176b46;
    --radius-xl: 24px;
    --radius-lg: 18px;
    background: radial-gradient(ellipse at 85% 0, #e6efdf 0, transparent 48%), #f5f7f2;
    background-attachment: scroll;
}
.midnight-preview::before, .midnight-preview::after { display: none; }
.midnight-preview .app-shell { width: calc(100% - 24px); margin-inline: auto; }
.midnight-preview .site-header { background: transparent; border-color: var(--line); box-shadow: none; }
.midnight-preview .section-card { background: #ffffff; border-color: var(--line); box-shadow: var(--shadow); }
.midnight-preview .page-header { background: linear-gradient(125deg, #ffffff, #eaf2e6); border: 1px solid var(--line); padding: clamp(20px, 3vw, 40px); border-radius: 24px; }
.midnight-preview .page-title { max-width: 20ch; font-size: clamp(1.8rem, 3.4vw, 3.5rem); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.midnight-preview .eyebrow { color: var(--accent); letter-spacing: .12em; }
.midnight-preview .eyebrow { background: #e6f0e8; border-color: #c4d9c9; }
.midnight-preview .section-title { letter-spacing: -.025em; }
.midnight-preview .section-copy { max-width: 66ch; line-height: 1.6; }
.midnight-preview .button-primary { background: #176b46; color: #ffffff; border-color: #176b46; box-shadow: none; font-weight: 700; }
.midnight-preview .button-primary:hover { background: #105236; border-color: #105236; }
.midnight-preview .button-ghost { background: #f0f5ef; border-color: #c5d5c8; color: var(--text); }
.midnight-preview .button-ghost:hover { background: #e2ede1; }
.midnight-preview .field-input, .midnight-preview .field-select, .midnight-preview .header-search-input { background: #ffffff; color: var(--text); border-color: #99b3a1; }
.midnight-preview .teaser-card.home-station-card { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 4px 16px #17382d05; transition: background-color .16s, border-color .16s; }
.midnight-preview .home-station-card:hover { background: #f3f8f0; border-color: #8eaf97; }
.midnight-preview .home-station-card .station-logo { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; }
.midnight-preview .home-station-card .teaser-title { font-size: .95rem; }
.midnight-preview .home-station-play { border-radius: 10px; }
.midnight-preview .live-radio-grid { max-height: none; overflow: visible; }
.midnight-preview .live-radio-item { background: #f5f8f2; border-color: var(--line); }
.midnight-preview .sticky-player { background: #e6f0e8; border-color: #648a70; border-top: 3px solid #176b46; box-shadow: 0 -8px 32px #17382d30; }
.midnight-preview .sticky-player-meta, .midnight-preview .sticky-player-actions { min-width: 0; }
.midnight-preview .sticky-player .now-playing-track { overflow-wrap: anywhere; }
.midnight-preview .listening-nav { background: #ffffff; border-color: var(--line); }
.midnight-preview :is(a, button, input, select, summary):focus-visible { outline: 3px solid #176b46; outline-offset: 3px; }
/* Legacy controls and overlays use explicit dark colors instead of tokens. */
.midnight-preview :is(.nav-shell, .filter-form, .footer-shell, .detail-card, .teaser-card, .search-suggestions, .locale-menu-list, .player-track-panel, .sleep-panel, .library-feedback, .cookie-consent) { background: #ffffff; color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.midnight-preview :is(.live-radio-copy strong, .live-radio-country, .sticky-player-kicker) { color: var(--muted); }
.midnight-preview :is(.field-input, .field-textarea, .header-search-input)::placeholder { color: #65776b; opacity: 1; }
.midnight-preview .field-textarea { background: #ffffff; color: var(--text); border-color: var(--line-strong); }
.midnight-preview :is(.nav-link.is-active, .listening-nav a[aria-current], .locale-menu-item.is-active, .search-suggestion-item:hover) { background: #e5f0e5; color: #155d3d; }
.midnight-preview :is(.nav-link, .locale-menu-trigger, .search-suggestion-item) { border-color: var(--line); }
.midnight-preview .sticky-player.is-enhanced.is-expanded { background: #e6f0e8; }
.player-favorite { min-width: 44px; min-height: 44px; padding: 10px; flex-shrink: 0; }
.player-favorite svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.player-favorite.is-active svg { fill: currentColor; }
.midnight-preview .player-favorite { background: #ffffff; color: #176b46; border-color: #648a70; }
.midnight-preview .player-favorite.is-active { background: #d2e7d8; color: #105236; }
.midnight-preview .station-logo-fallback { background: #e6f0e8; color: #176b46; }
.midnight-preview .home-editorial .detail-copy p { color: var(--muted); }
.midnight-preview .detail-summary,
.midnight-preview .detail-copy,
.midnight-preview .content-body { color: var(--text); }
.midnight-preview .content-body a { color: #176b46; }
.midnight-preview .content-body a:hover { color: #105236; }
.sticky-player .player-window-actions { display: flex; gap: 2px; position: absolute; top: 6px; right: 6px; z-index: 2; }
.sticky-player .player-window-actions .button { width: 44px; min-width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: inherit; border-radius: 10px; }
.player-window-actions svg, .sleep-timer summary svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sticky-player .sleep-timer > summary { width: 44px; min-height: 44px; padding: 10px; display: flex; align-items: center; justify-content: center; list-style: none; position: relative; box-sizing: border-box; }
.sticky-player .sleep-timer > summary::-webkit-details-marker { display: none; }
.sticky-player [data-sleep-remaining]:not(:empty) { position: absolute; bottom: -3px; right: 0; background: #176b46; color: white; border-radius: 6px; padding: 1px 3px; font-size: 10px; line-height: 1.2; }
.sticky-player.is-enhanced:not(.is-expanded) { padding-top: 52px; }
.sticky-player.is-enhanced.is-expanded { padding-top: 64px; }
@media (min-width: 768px) {
    .sticky-player.is-enhanced:not(.is-expanded) .radio-controls { position: absolute; top: 6px; left: 12px; grid-column: auto; grid-row: auto; }
}
@media (max-width: 767px) {
    .sticky-player.is-enhanced:not(.is-expanded) { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 8px 10px 10px; gap: 6px 8px; }
    .sticky-player.is-enhanced:not(.is-expanded) .sticky-player-actions { display: contents; }
    .sticky-player.is-enhanced:not(.is-expanded) .radio-controls { grid-column: 1; grid-row: 1; gap: 2px; }
    .sticky-player.is-enhanced:not(.is-expanded) .radio-controls button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 8px; }
    .sticky-player.is-enhanced:not(.is-expanded) .player-window-actions { position: static; grid-column: 2; grid-row: 1; justify-content: flex-end; }
    .sticky-player.is-enhanced:not(.is-expanded) .sticky-player-meta { grid-column: 1; grid-row: 2; align-self: center; }
    .sticky-player.is-enhanced:not(.is-expanded) .sticky-player-buttons { grid-column: 2; grid-row: 2; gap: 4px; flex-wrap: nowrap; align-self: center; }
    .sticky-player.is-enhanced:not(.is-expanded) :is([data-sticky-player-copy], .player-queue, [data-player-track-actions], [data-sticky-player-open]) { display: none; }
    .sticky-player.is-enhanced:not(.is-expanded) [data-sticky-player-title] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .sticky-player.is-enhanced:not(.is-expanded) .now-playing-track { margin: 0; padding: 0; border: 0; background: none; }
    .sticky-player.is-enhanced:not(.is-expanded) .now-playing-track-title { -webkit-line-clamp: 1; font-size: 12px; }
    .sticky-player .sleep-panel { position: absolute; bottom: calc(100% + 8px); right: 0; width: min(300px, calc(100vw - 48px)); max-height: 55dvh; overflow: auto; }
    .sticky-player.is-expanded .sleep-panel { position: static; width: 100%; }
}
.midnight-preview .category-editorial-column h3 { color: var(--text); }
.midnight-preview .category-editorial-column p,
.midnight-preview .category-editorial-label,
.midnight-preview .category-editorial-toggle { color: var(--muted); }
.midnight-preview .category-editorial-links a { color: #176b46; text-decoration-color: #176b4680; }
.midnight-preview .category-editorial-links a:hover { color: #105236; text-decoration-color: currentColor; }
.midnight-preview .category-editorial-summary:focus-visible,
.midnight-preview .category-pagination .button:focus-visible { outline-color: #176b46; }
@media (min-width: 1200px) {
    .midnight-preview .app-shell { width: 100%; margin-inline: 0; padding-inline: 248px 24px; }
    .midnight-preview .site-header, .midnight-preview .nav-shell { backdrop-filter: none; }
    .midnight-preview .nav-shell { grid-template-columns: minmax(0, 1fr) auto; }
    .midnight-preview .header-search { grid-column: 1; grid-row: 1; }
    .midnight-preview .locale-menu { grid-column: 2; }
    .midnight-preview .account-nav { grid-column: 2; }
    .midnight-preview .primary-nav { position: fixed; inset-block: 0; inset-inline-start: 0; width: 224px; padding: 112px 16px 180px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; background: #ffffff; border-inline-end: 1px solid var(--line); overflow-y: auto; z-index: 20; }
    .midnight-preview .primary-nav .nav-link { min-height: 48px; display: flex; align-items: center; padding: 12px 16px; border-radius: 12px; white-space: normal; }
    .midnight-preview .primary-nav .nav-link.is-active { background: #e5f0e5; color: #155d3d; }
    .midnight-preview .site-brand { position: fixed; inset-inline-start: 20px; inset-block-start: 28px; z-index: 21; max-width: 190px; }
    .midnight-preview .site-brand-tagline { display: none; }
    .midnight-preview .home-station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .midnight-preview .home-station-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .midnight-preview .page-header { padding: 20px 16px; border-radius: 18px; }
    .midnight-preview .section-card { border-radius: 18px; }
    .midnight-preview .home-station-grid { gap: 10px; }
    .midnight-preview .home-station-card .teaser-title { font-size: .875rem; }
    .midnight-preview .home-station-facts { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .midnight-preview .teaser-card.home-station-card { transition: none; }
}
