/* Compact broadcast workspace. Embedded videos retain their native controls and dimensions. */
:root {
  color-scheme: dark;
  --bg: #111113;
  --sidebar: #151517;
  --surface: #19191c;
  --surface-raised: #222225;
  --surface-hover: #29292d;
  --line: #2b2b2e;
  --line-strong: #414145;
  --text: #f2e7d3;
  --muted: #a5a3a0;
  --subtle: #737373;
  --red: #be2517;
  --red-bright: #ef6355;
  --green: #a5c8a0;
  --sidebar-width: 184px;
  --dock-height: 40px;
  --wall-chrome: 162px;
  --radius: 4px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scrollbar-color: #48484c var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 12px; line-height: 1.5; }
button, input, select { font: inherit; border-radius: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; background: none; }
button:disabled { cursor: not-allowed; opacity: .38; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; flex-shrink: 0; }
button svg, .icon-btn svg, .icon svg, .nav-icon svg, [data-icon] > svg { width: 15px; height: 15px; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; border-radius: 6px; background: var(--text); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.live-dot { display: inline-block; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--red-bright); }

.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 0 8px; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand { min-height: 58px; display: flex; align-items: center; gap: 6px; padding: 0 5px; }
.brand-mark { width: 27px; height: 27px; color: var(--red); }
.wordmark { font-size: 20px; font-weight: 750; letter-spacing: -.9px; line-height: 1.1; }
.wordmark-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 6px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; }
.sidebar-label { margin: 16px 7px 6px; color: var(--subtle); font-size: 7px; font-weight: 650; letter-spacing: 1.25px; text-transform: uppercase; }
.sidebar-label:first-of-type { margin-top: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 7px; min-height: 29px; width: 100%; padding: 5px 7px; border: 0; border-radius: 4px; color: var(--muted); text-align: left; font-size: 10px; font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { color: var(--text); background: #202023; }
.nav-item[aria-current="page"] { background: #292321; color: var(--text); }
.nav-item[aria-current="page"]::before { position: absolute; inset: 7px auto 7px -8px; content: ""; width: 2px; border-radius: 0 1px 1px 0; background: var(--red-bright); }
.nav-item[aria-current="page"] .nav-icon { color: var(--red-bright); }
.nav-icon { width: 15px; display: flex; justify-content: center; color: #88888a; font-size: 12px; line-height: 1; flex: none; }
.nav-icon svg { width: 14px; height: 14px; }
.nav-count { margin-left: auto; color: #7e7c79; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; font-variant-numeric: tabular-nums; }
.nav-item[aria-current="page"] .nav-count { color: #c1ada4; }
.country-nav { min-height: 0; overflow-y: auto; padding-bottom: 8px; scrollbar-width: thin; }
.country-nav .nav-item { min-height: 25px; padding-top: 3px; padding-bottom: 3px; }
.sidebar-bottom { margin-top: auto; flex-shrink: 0; padding: 9px 6px; border-top: 1px solid var(--line); }
.network-note { display: flex; gap: 5px; align-items: center; color: var(--subtle); font-size: 8px; line-height: 1.7; }
.network-note .live-dot { width: 4px; height: 4px; background: var(--green); }
.sidebar-bottom p, .sidebar-bottom small { display: none; }
.sidebar-bottom .btn-quiet { min-height: 24px; padding: 3px 0; border: 0; color: #a09a94; font-size: 9px; }
.sidebar-bottom .btn-quiet svg { width: 12px; height: 12px; }

.workspace { min-height: 100dvh; margin-left: var(--sidebar-width); padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom)); }
.topbar { min-height: 54px; height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #151517; }
.breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted); font-size: 9px; white-space: nowrap; }
.breadcrumb strong, #breadcrumb { color: var(--text); font-weight: 500; }
.breadcrumb svg { width: 13px; height: 13px; color: var(--subtle); }
.breadcrumb > span[aria-hidden], .breadcrumb-divider { color: #49494c; }
.topbar-actions { display: flex; align-items: center; gap: 5px; }
.icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; border: 1px solid transparent; border-radius: 4px; color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--red-bright); background: #30211f; }
.mobile-menu, .sidebar-close { display: none; }
.search-trigger { display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 9px; }
.search-trigger:hover { background: var(--surface); border-color: var(--line-strong); }
.search-trigger svg { width: 12px; height: 12px; }
.keycap, kbd { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 3px; background: #202023; color: var(--muted); font-family: inherit; font-size: 9px; line-height: 1; }
.search-trigger kbd { margin-left: 12px; height: 17px; min-width: 17px; border-color: var(--line); font-size: 9px; }
.world-clocks, .page-heading { display: none; }
.main { max-width: 2800px; margin: 0 auto; padding: 6px 8px; }
.eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 7px; color: #a4a09a; font-size: 8px; font-weight: 600; letter-spacing: 1.8px; line-height: 1.4; text-transform: uppercase; }
h1 { margin: 0; color: var(--text); font-size: 24px; font-weight: 500; letter-spacing: -1px; }
.toolbar { min-height: 38px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; margin: 0 0 4px; padding: 1px 2px 3px; }
.category-tabs { display: flex; align-items: center; gap: 2px; }
.tab { min-height: 26px; padding: 4px 9px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
.tab:hover { background: var(--surface-raised); color: var(--text); }
.tab[aria-pressed="true"] { background: var(--surface-raised); border-color: #39393c; color: var(--text); }
.grid-controls { display: flex; align-items: center; gap: 8px; }
.grid-controls > span, .density-label { color: var(--subtle); font-size: 8px; letter-spacing: 1px; }
.density-control { display: inline-flex; gap: 1px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; }
.density-control button { display: flex; align-items: center; justify-content: center; min-width: 26px; min-height: 22px; padding: 1px 5px; border: 0; border-radius: 2px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.density-control button:hover { background: var(--surface-hover); color: var(--text); }
.density-control button[aria-pressed="true"] { background: #48413a; color: #fff5e5; }
.btn, button.btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text); font-size: 10px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn svg { width: 13px; height: 13px; }
.btn:hover { border-color: #606064; background: var(--surface-hover); }
.btn-primary { border-color: #ca3528; background: var(--red); color: #fff7ec; }
.btn-primary:hover { border-color: #df4335; background: #ce3022; }
.btn-quiet { border-color: var(--line); color: var(--muted); }
.btn-quiet:hover { color: var(--text); }

/* Grid rows fit the display when possible and scroll rather than shrink native players. */
.wall { --preferred-columns: 6; display: grid; grid-template-columns: repeat(var(--grid-columns, var(--preferred-columns)), minmax(202px, 1fr)); grid-auto-rows: minmax(230px, 1fr); height: max(calc(100dvh - var(--wall-chrome) - env(safe-area-inset-bottom)), calc(var(--grid-rows, 4) * 230px + (var(--grid-rows, 4) - 1) * 6px)); align-items: stretch; gap: 6px; }
.wall[data-size="4"] { --preferred-columns: 2; }
.wall[data-size="6"], .wall[data-size="9"] { --preferred-columns: 3; }
.wall[data-size="12"], .wall[data-size="16"] { --preferred-columns: 4; }
.wall[data-size="20"] { --preferred-columns: 5; }
/* Smaller collections retain natural broadcast proportions instead of filling empty rows. */
.wall:is([data-count="0"], [data-count="1"], [data-count="2"], [data-count="3"], [data-count="4"], [data-count="5"], [data-count="6"], [data-count="7"], [data-count="8"], [data-count="9"], [data-count="10"], [data-count="11"], [data-count="12"]) { height: auto; grid-auto-rows: auto; align-items: start; }
.wall:is([data-count="1"], [data-count="2"], [data-count="3"], [data-count="4"], [data-count="5"], [data-count="6"], [data-count="7"], [data-count="8"], [data-count="9"], [data-count="10"], [data-count="11"], [data-count="12"]) .tile-media { flex: none; width: 100%; aspect-ratio: 16 / 9; }
.wall[data-count="1"] { max-width: 840px; }
.tile { display: flex; flex-direction: column; min-width: 0; min-height: 230px; overflow: hidden; border: 1px solid #323235; border-radius: var(--radius); background: var(--surface); transition: border-color .16s, box-shadow .16s; }
.tile:hover { border-color: #797069; }
.tile.listening { border-color: var(--red-bright); box-shadow: 0 0 0 1px #ef63552e; }
.tile-media { position: relative; flex: 1 0 200px; min-width: 200px; min-height: 200px; overflow: hidden; background: #09090b; }
.thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-host, .player-host iframe, .tile-media > iframe { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 200px; min-height: 200px; border: 0; }
.player-host:empty { pointer-events: none; }
.preview-play { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 12px; border: 0; background: #0003; color: #fff; }
.preview-play > svg { width: 35px; height: 35px; padding: 9px; border: 1px solid #ffffff70; border-radius: 50%; background: #131315b8; transition: background .15s, transform .15s; }
.preview-play:hover { background: #0001; }
.preview-play:hover > svg { transform: scale(1.08); background: var(--red); border-color: #ffffffa0; }
.preview-play > span { padding: 3px 7px; border-radius: 3px; background: #151517e6; font-size: 9px; font-weight: 500; }
.player-message { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; color: var(--muted); background: #171719; text-align: center; font-size: 10px; }
.player-message > svg { width: 22px; height: 22px; color: var(--subtle); }
.player-message strong { color: #d0c9bd; font-size: 11px; font-weight: 500; }
.player-message p { max-width: 260px; margin: 0; font-size: 9px; line-height: 1.6; }
.player-message .btn { min-height: 25px; margin-top: 2px; font-size: 9px; }
.tile-caption { display: flex; align-items: center; gap: 4px; flex: 0 0 28px; height: 28px; min-width: 0; padding: 0 3px 0 6px; border-top: 1px solid var(--line); background: #1c1b1e; }
.channel-open { display: block; align-items: center; gap: 5px; flex: 1; min-width: 0; height: 15px; overflow: hidden; padding: 0; border: 0; color: #e8dfce; font-size: 10px; font-weight: 550; line-height: 1; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.channel-open > strong, .channel-open > span:not(.compact-flag):not(.live-dot), .channel-open > .channel-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.channel-open:hover { color: #fffaf0; }
.compact-flag { flex: none; font-size: 10px; line-height: 1; }
.caption-actions { display: flex; align-items: center; gap: 1px; flex: none; }
.caption-actions .icon-btn, .caption-actions .listen-btn, .caption-actions .favorite-btn, .caption-actions .expandbtn { display: inline-flex; align-items: center; justify-content: center; width: 21px; min-width: 21px; height: 21px; min-height: 21px; padding: 0; border: 0; border-radius: 2px; color: var(--muted); }
.caption-actions svg { width: 12px; height: 12px; }
.caption-actions button:hover { background: #393339; color: var(--text); }
.caption-actions .listen-btn[aria-pressed="true"], .caption-actions .favorite-btn[aria-pressed="true"] { color: var(--red-bright); background: #342321; }
.favorite-btn[aria-pressed="true"] svg { fill: #bd6a4640; }
.stream-state { display: inline-flex; align-items: center; gap: 4px; flex: none; color: #99938e; font-size: 7px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; }
.stream-state::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #868078; }
.stream-state[data-state="playing"] { color: #a8c5a7; }
.stream-state[data-state="playing"]::before { background: #93b58d; }
.stream-state[data-state="error"] { color: #c79f74; }
.stream-state[data-state="error"]::before { background: #c79f74; }
.stream-state[data-state="paused"] { color: #a3a1a0; }
.tile.unavailable { border-color: #373330; }
.tile-topline { display: flex; align-items: center; justify-content: space-between; min-height: 18px; padding: 2px 6px; font-size: 8px; }
.channel-number { color: var(--subtle); font-size: 8px; font-variant-numeric: tabular-nums; }
.wall-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; margin-top: 4px; color: #898580; font-size: 9px; }
.wall-footer p { margin: 0; }
.pagination { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pagination .icon-btn { width: 22px; height: 22px; border-color: var(--line); }
.pagination button svg { width: 12px; height: 12px; }
.channel-avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; overflow: hidden; border: 1px solid #44413c; border-radius: 5px; background: #e9e1d3; color: #232323; font-size: 10px; font-weight: 800; letter-spacing: -.4px; text-align: center; }
.channel-avatar img { width: 100%; height: 100%; object-fit: contain; }
.channel-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #969390; font-size: 9px; line-height: 1.2; }
.channel-meta .flag { font-size: 10px; }
.channel-meta .separator { color: #555458; }

.audio-dock { position: fixed; z-index: 20; inset: auto 0 0 var(--sidebar-width); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--dock-height); padding: 3px 12px calc(3px + env(safe-area-inset-bottom)); border-top: 1px solid #373330; background: #1a191bf5; box-shadow: 0 -5px 18px #0002; }
.audio-identity { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.audio-icon { display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; flex: none; border: 1px solid #49322a; border-radius: 4px; background: #2b201d; color: var(--red-bright); }
.audio-icon svg { width: 14px; height: 14px; }
.audio-copy { min-width: 0; }
.audio-copy strong { display: block; max-width: 220px; overflow: hidden; color: var(--text); font-size: 10px; font-weight: 500; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.audio-copy small { display: block; color: #96908a; font-size: 6px; letter-spacing: 1.1px; line-height: 1.4; }
.audio-copy > span { display: none; }
.dock-divider { width: 1px; height: 18px; margin: 0 5px; background: var(--line-strong); }
.audio-controls { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.audio-controls .icon-btn { width: 27px; height: 27px; }
.audio-controls > .icon-btn:first-child { border: 1px solid var(--line-strong); color: var(--text); }
.volume-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.volume-control input[type="range"] { width: 92px; height: 3px; margin: 0; accent-color: var(--text); cursor: pointer; }
.volume-control output { width: 26px; text-align: right; }
.audio-tip { color: #858180; font-size: 7px; line-height: 1.5; letter-spacing: .7px; white-space: nowrap; }
.audio-tip br { display: none; }
.audio-tip kbd { height: 16px; min-width: 16px; margin: 0 3px; padding: 0 3px; font-size: 8px; }

/* Search is a station directory, with room for clear availability labels. */
dialog { padding: 0; color: var(--text); background: #1a1a1d; border: 1px solid #424044; border-radius: 10px; box-shadow: 0 24px 90px #0009; }
dialog::backdrop { background: #050507bb; backdrop-filter: blur(4px); }
.directory { width: min(720px, calc(100vw - 40px)); max-height: min(760px, calc(100dvh - 80px)); overflow: auto; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 25px 18px; }
.dialog-heading h2 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.6px; }
.dialog-heading p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.dialog-heading .icon-btn { margin: -5px -7px 0 0; }
.search-field { display: flex; align-items: center; gap: 11px; margin: 0 25px; padding: 0 13px; border: 1px solid #464448; border-radius: 6px; background: #121214; }
.search-field:focus-within { border-color: #b3a28f; }
.search-field svg { width: 17px; height: 17px; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; height: 43px; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 12px; }
.search-field input::placeholder { color: #777477; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.directory-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 13px 25px 17px; border-bottom: 1px solid var(--line); }
.directory-filters select { max-width: 100%; min-height: 32px; padding: 5px 25px 5px 10px; border: 1px solid #39393e; border-radius: 5px; background: #222226; color: var(--muted); font-size: 10px; }
.directory-filters > span, .directory-filters > small { margin-left: auto; color: var(--subtle); font-size: 10px; }
.directory-list { min-height: 160px; max-height: 440px; overflow-y: auto; padding: 6px 13px 13px; overscroll-behavior: contain; }
.directory-row { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-bottom: 1px solid var(--line); }
.directory-row:last-child { border-bottom: 0; }
.directory-row .channel-avatar { width: 36px; height: 36px; }
.directory-info { flex: 1; min-width: 0; }
.directory-info strong, .directory-info h3 { display: block; margin: 0; color: var(--text); font-size: 12px; font-weight: 500; }
.directory-info p, .directory-info small, .directory-info > span { display: block; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.directory-info .channel-meta { margin-top: 5px; }
.directory-actions { display: flex; align-items: center; gap: 8px; }
.directory-actions .btn { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.directory-actions .icon-btn { width: 30px; height: 30px; }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 220px; padding: 28px 24px; border: 1px dashed #39373a; border-radius: 8px; color: var(--muted); text-align: center; }
.empty-state svg { width: 28px; height: 28px; color: var(--subtle); }
.empty-state h2, .empty-state h3 { margin: 0; color: var(--text); font-size: 20px; font-weight: 500; letter-spacing: -.4px; }
.empty-state p { max-width: 370px; margin: 0; font-size: 12px; }
.directory-list .empty-state { min-height: 220px; margin: 12px; border: 0; }
.source-note { margin: 24px 0 0; color: #777477; font-size: 9px; line-height: 1.6; }
.shortcuts > p { margin: 0 25px 12px; color: var(--muted); font-size: 11px; }
.shortcuts { width: min(420px, calc(100vw - 40px)); padding-bottom: 20px; }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 25px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row kbd { min-width: 25px; height: 24px; color: var(--text); }
.toast { position: fixed; z-index: 100; left: calc(50% + var(--sidebar-width) / 2); bottom: calc(var(--dock-height) + 18px + env(safe-area-inset-bottom)); max-width: calc(100vw - 40px); padding: 10px 16px; transform: translateX(-50%); border: 1px solid #625349; border-radius: 6px; background: #302a25; color: var(--text); box-shadow: 0 5px 24px #0005; font-size: 12px; text-align: center; }


/* Enlarged viewing keeps every control outside the broadcaster's video. */
.viewer { width: min(1050px, calc(100vw - 64px)); max-width: none; max-height: calc(100dvh - 48px); overflow: auto; border-color: #55504b; border-radius: 7px; background: #111113; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: #030305d9; backdrop-filter: blur(8px); }
.viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; min-height: 57px; padding: 9px 13px 9px 16px; border-bottom: 1px solid #363235; background: #1b191c; }
.viewer-header > div:first-child { min-width: 0; }
.viewer-header small { display: block; overflow: hidden; color: #aaa098; font-size: 8px; line-height: 1.4; letter-spacing: 1px; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.viewer-header h2 { overflow: hidden; margin: 2px 0 0; color: var(--text); font-size: 17px; font-weight: 550; letter-spacing: -.4px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.viewer-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; flex: none; }
.viewer-tools .icon-btn { width: 32px; height: 32px; }
.viewer-tools .btn { min-height: 29px; margin: 0 3px; }
.viewer-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; min-width: 200px; min-height: 200px; flex: 1 0 auto; background: #050506; }
.viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; min-height: 31px; padding: 6px 16px; border-top: 1px solid var(--line); background: #19181a; color: var(--muted); font-size: 9px; }
.viewer-footer a { display: inline-flex; align-items: center; gap: 5px; flex: none; color: #c9b4a4; }
.viewer-footer a svg { width: 11px; height: 11px; }
.viewer-footer a:hover { color: var(--text); text-decoration: underline; }
.viewer[data-size="wide"] { width: calc(100vw - 32px); height: calc(100dvh - 32px); max-height: none; }
.viewer[data-size="wide"] .viewer-stage { flex: 1 1 auto; aspect-ratio: auto; }
.viewer:fullscreen { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
.viewer:fullscreen .viewer-stage { flex: 1 1 auto; aspect-ratio: auto; }
.viewer-stage:fullscreen { aspect-ratio: auto; background: #000; }
.source-note { display: none; }

body.cinema { --wall-chrome: 120px; }
body.cinema .sidebar, body.cinema .topbar { display: none; }
body.cinema .workspace { margin-left: 0; }
body.cinema .audio-dock { left: 0; }
body.cinema .main { max-width: none; }
body.cinema .toast { left: 50%; }

/* A focused monitor: collection identity, clear source types, and visible recovery. */
.view-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.view-identity h1 { font-size:18px; font-weight:620; letter-spacing:-.5px; line-height:1.25; }
.view-identity p { margin:2px 0 0; color:var(--muted); font-size:10px; line-height:1.2; }
.view-tag { padding:3px 6px; border:1px solid #47403a; border-radius:3px; color:#c1b6a8; font:8px/1.2 "SFMono-Regular",Consolas,monospace; letter-spacing:.8px; }
.utc-clock { margin-right:10px; color:#bbb1a6; font:10px/1.5 "SFMono-Regular",Consolas,monospace; font-variant-numeric:tabular-nums; }
.nav-item small { display:block; margin-top:2px; color:#827d77; font-size:8px; font-weight:400; }
#worldNav { min-height:42px; }
.nav-item[aria-current="page"] { background:linear-gradient(90deg,#372722,#232021); }
.country-search { display:flex; align-items:center; gap:7px; padding:6px 8px; margin:0 3px 7px; border:1px solid var(--line); border-radius:4px; color:var(--subtle); background:#111113; }
.country-search svg { width:12px; height:12px; }
.country-search input { width:100%; min-width:0; outline:0; border:0; background:none; color:var(--text); font-size:10px; }
.country-search:focus-within { border-color:#756b60; }
.nav-empty { padding:10px; color:var(--muted); font-size:10px; }
.category-tabs { border:1px solid var(--line); padding:2px; border-radius:5px; background:#151517; }
.tab { display:inline-flex; align-items:center; gap:6px; }
.tab > span:last-child:not(.category-dot) { font:9px "SFMono-Regular",Consolas,monospace; color:#8a857e; }
.category-dot { width:5px; height:5px; border-radius:1px; }
.category-dot.news { background:#af6257; }.category-dot.business { background:#c3a06c; }
.tab[data-category="economy"][aria-pressed="true"] { color:#e7c591; border-color:#675237; background:#31291f; }
.caption-identity { flex:1; min-width:0; overflow:hidden; padding:3px 0; }
.caption-meta { display:flex; align-items:center; gap:6px; white-space:nowrap; line-height:1.15; }
.category-label { font-size:6px; font-weight:650; letter-spacing:.75px; color:#b5a59e; }
.category-label.business { color:#d1b483; }
.caption-meta .stream-state { font-size:6px; letter-spacing:.3px; }
.caption-meta .stream-state::before { width:3px; height:3px; }
.caption-actions .icon-btn { height:25px; width:23px; min-width:23px; }
.tile.unavailable .retry-btn { color:#e4b77b; background:#362a1f; border:1px solid #6b5132; }
.tile.unavailable .stream-state { color:#e4b77b; }
.tile.listening { border-color:#b97054; box-shadow:0 0 0 1px #b9705433; }
.wall-health { display:flex; align-items:center; gap:6px; color:#a9a39c; font-size:10px; font-variant-numeric:tabular-nums; }
.health-dot { width:5px; height:5px; border-radius:50%; background:#8ea886; }.health-dot.warning { background:#d5aa70; }
#goLiveBtn { min-width:109px; }
#playWallBtn { border:1px solid var(--line-strong); }
.wall-footer > span { margin-right:auto; }
.wall-footer .btn-quiet { padding:2px 5px; min-height:23px; border-color:transparent; font-size:9px; }
#repairFailedBtn { color:#e4b77b; }
.source-panel { margin-top:16px; padding:18px; border:1px solid var(--line); border-radius:6px; background:#181719; }
.source-panel h2 { margin:0; font-size:14px; font-weight:550; }
.source-panel p { margin:4px 0 14px; color:var(--muted); font-size:11px; }
.source-links { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.source-links a { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:12px; border:1px solid #3a3532; border-radius:4px; background:#201e1e; }
.source-links a:hover { border-color:#87745f; }.source-links strong { display:block; font-size:12px; font-weight:550; }
.source-links small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }.source-links svg { width:15px; height:15px; color:#b2a28e; }
@media (max-width:1100px) { .utc-clock { display:none; } .view-tag { display:none; } .wall-health { font-size:9px; } }
@media (max-width:800px) { .view-identity { gap:7px; }.view-identity h1 { font-size:16px; }.view-identity p { font-size:9px; }.country-search input { font-size:13px; } }
@media (max-width:639px) { .wall-health { display:none; }.view-identity p { max-width:210px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.topbar-actions > #shareBtn { display:none; }.search-trigger kbd { display:none; }.source-panel { padding:13px; }.source-links { grid-template-columns:1fr; }.wall-footer { flex-wrap:wrap; }.wall-footer > span { flex-basis:100%; max-width:none !important; } }

@media (max-width: 1599px) {
  .wall[data-size="24"] { --preferred-columns: 5; }
  .audio-tip { display: none; }
}
@media (max-width: 1240px) {
  .wall[data-size="20"], .wall[data-size="24"] { --preferred-columns: 4; }
  .grid-controls > span, .density-label { display: none; }
}
@media (max-width: 1030px) {
  .wall[data-size="12"], .wall[data-size="16"], .wall[data-size="20"], .wall[data-size="24"] { --preferred-columns: 3; }
  .toolbar { gap: 5px; }
  .tab { padding-left: 7px; padding-right: 7px; font-size: 9px; }
  .density-control button { min-width: 23px; padding-left: 4px; padding-right: 4px; }
  .grid-controls { gap: 5px; }
  .grid-controls .btn { padding-left: 7px; padding-right: 7px; }
}
@media (max-width: 800px) {
  :root { --wall-chrome: 162px; }
  .sidebar { width: 210px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 16px 0 80px #0000; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open::before { content: ""; position: fixed; z-index: 29; inset: 0; background: #0009; }
  body.sidebar-open .sidebar, .sidebar.is-open { transform: translateX(0); box-shadow: 16px 0 80px #0008; }
  .sidebar-close { position: absolute; top: 13px; right: 8px; display: inline-flex; width: 30px; height: 30px; }
  .sidebar .brand { padding-left: 8px; }
  .nav-item { min-height: 34px; font-size: 12px; }
  .country-nav .nav-item { min-height: 31px; padding-top: 6px; padding-bottom: 6px; }
  .sidebar-label { font-size: 8px; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-flex; margin-left: -5px; }
  .topbar { gap: 10px; padding: 0 8px; }
  .breadcrumb { margin-right: auto; gap: 7px; }
  .topbar-actions { gap: 3px; }
  .audio-dock { left: 0; }
  .toast { left: 50%; }
  .wall { height: auto; grid-auto-rows: auto; }
  .tile-media { aspect-ratio: 16 / 9; flex-basis: auto; }
  .tile-caption { flex-basis: 36px; height: 36px; }
  .channel-open { height: 17px; font-size: 11px; }
  .caption-actions .icon-btn, .caption-actions .listen-btn, .caption-actions .favorite-btn, .caption-actions .expandbtn { width: 26px; min-width: 26px; height: 26px; min-height: 26px; }
  .caption-actions svg { width: 13px; height: 13px; }
  .viewer { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .viewer-header { gap: 10px; padding: 9px 10px; }
  .viewer-header h2 { font-size: 15px; }
  .viewer-tools { gap: 1px; }
  .viewer-tools .icon-btn { width: 29px; height: 29px; }
  .viewer-tools .btn { margin: 0; padding: 5px 7px; font-size: 9px; }
}
@media (max-width: 639px) {
  .wall, .wall[data-size] { --preferred-columns: 2; }
  .breadcrumb > span:nth-child(3), .breadcrumb-divider { display: none; }
  .search-trigger { width: 28px; justify-content: center; padding: 0; border-color: transparent; }
  .search-trigger > span:not([data-icon]), .search-trigger kbd { display: none; }
  .search-trigger svg { width: 15px; height: 15px; }
  .toolbar { gap: 6px; padding: 1px 0 5px; }
  .category-tabs { flex: 1 0 100%; }
  .tab { min-height: 29px; padding: 5px 10px; font-size: 10px; }
  .grid-controls { width: 100%; justify-content: space-between; }
  .density-control { flex: 1; }
  .density-control button { flex: 1; min-height: 26px; }
  .grid-controls .btn { min-height: 32px; padding: 5px 10px; }
  .audio-dock { gap: 7px; padding-left: 8px; padding-right: 8px; }
  .audio-identity { gap: 6px; min-width: 0; }
  .audio-copy strong { max-width: 120px; }
  .audio-icon { width: 25px; height: 25px; }
  .audio-controls { gap: 3px; }
  .dock-divider { margin: 0 2px; }
  .volume-control { gap: 0; }
  .volume-control input[type="range"] { width: 58px; }
  .volume-control output { display: none; }
  .wall-footer { gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 8px; }
  .wall-footer > span { max-width: 70%; }
  .pagination { gap: 5px; }
  .directory { width: calc(100vw - 20px); max-height: calc(100dvh - 30px); }
  .dialog-heading { padding: 19px 17px 15px; }
  .dialog-heading h2 { font-size: 20px; }
  .search-field { margin: 0 17px; }
  .search-field input { font-size: 16px; }
  .directory-filters { padding: 11px 17px 14px; }
  .directory-filters select { font-size: 12px; }
  .directory-list { max-height: calc(100dvh - 270px); padding: 5px 8px 8px; }
  .directory-row { gap: 9px; padding: 12px 9px; }
  .directory-row .channel-avatar { width: 30px; height: 30px; font-size: 9px; }
  .directory-actions { gap: 2px; }
  .directory-actions .btn { min-height: 32px; padding: 5px 8px; }
  .directory-info strong { font-size: 11px; }
  .directory-info p, .directory-info small, .directory-info > span { font-size: 9px; }
  .viewer { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .viewer-header { position: relative; flex-wrap: wrap; gap: 8px; }
  .viewer-header > div:first-child { flex: 1 0 calc(100% - 10px); padding-right: 35px; }
  .viewer-tools { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 3px; }
  .viewer-tools .icon-btn { width: 32px; height: 32px; }
  .viewer-tools > :nth-child(2) { margin-right: auto; }
  #closeViewer { position: absolute; top: 10px; right: 10px; }
  .viewer-footer { gap: 10px; padding: 6px 10px; font-size: 8px; }
  .viewer[data-size="wide"] { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
}
@media (max-width: 425px) {
  .wall, .wall[data-size] { --preferred-columns: 1; }
  .main { padding-left: 6px; padding-right: 6px; }
  .tile-caption { padding-left: 8px; }
  .audio-icon { display: none; }
  .audio-copy strong { max-width: 112px; }
  .viewer-tools .icon-btn { width: 29px; height: 30px; }
  .viewer-tools .btn { min-height: 30px; padding-left: 6px; padding-right: 6px; }
  .directory-filters { gap: 7px; }
  .directory-filters > span, .directory-filters > small { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
