/* Black broadcast console. Native CSS retained for old-TV compatibility;
   no framework, external icon/font request, or media-control override. */
:root {
  --background: #070a0e;
  --surface: #101b27;
  --focus: #8ccaff;
  --ink: #ffffff;
  --muted: #86a8c4;
  --gap: 16px;
}
html, body { background: #070a0e; }
body { color: #ffffff; }
.gallery {
  max-width: 1680px;
  width: 100%;
  padding: 32px;
  grid-template-rows: minmax(0, 1.65fr) minmax(0, 1fr);
  grid-gap: 22px;
  gap: 22px;
}
.tv-grid { grid-gap: 18px; gap: 18px; }
.channel {
  display: block;
  border: 1px solid #2b83bd;
  border-radius: 22px;
  background: #005da3;
  color: #ffffff;
  text-align: left;
  isolation: isolate;
  transition: border-color .18s, background-color .18s;
}
.channel-2321 { border-color: #f57836; background: #e95610; color: #ffffff; }
.channel::before {
  /* Keep the requested solid brand color, without the old green tint. */
  display: none;
}
.channel-art {
  position: absolute;
  top: -18%; right: -28%; width: 90%; height: 140%;
  border: 1px solid #ffffff1a;
  border-radius: 50%;
  pointer-events: none;
}
.channel-art::before { content:''; position:absolute; top:14%; left:14%; width:72%; height:72%; border:1px solid #ffffff1a; border-radius:50%; }
.channel-icon { position:absolute; left:9%; bottom:17%; width:20%; max-width:100px; }
.tv-symbol { display:block; width:100%; height:auto; }
.channel-name {
  position:absolute;
  top:12%; right:13%;
  height:76%; width:40%;
  font-size:48px;
  font-size:clamp(28px,5.8vh,58px);
  line-height:1.65;
  text-align:left;
  overflow:hidden;
  letter-spacing:0;
  padding-left:6px;
}
.channel:hover { filter:none; background:#00528f; border-color:#71b7e3; }
.channel-2321:hover { background:#d84908; border-color:#ffac7b; }
.channel.remote-focus, .channel:focus { border-color:#8ccaff; }
.channel:focus-visible, .radio-item:focus-visible, .icon-button:focus-visible,
.remote-focus, .webview-legacy .channel:focus, .webview-legacy .radio-item:focus,
.webview-legacy .remote-focus, .webview-legacy .icon-button:focus {
  outline:3px solid #8ccaff;
  outline-offset:4px;
}
.audio-list-container { min-height:0; }
.radio-grid { grid-gap:12px; gap:12px; grid-template-columns:repeat(10,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); }
.radio-item {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:16px 10px 12px;
  border:1px solid #233b52;
  border-radius:16px;
  background:#101b27;
  grid-gap:0;
  gap:0;
  transition:background-color .18s, border-color .18s;
}
.radio-item::after { display:none !important; }
.radio-symbol { display:flex; align-items:center; justify-content:center; flex:0 0 26px; width:26px; height:26px; margin-bottom:10px; color:#86a8c4; pointer-events:none; }
.radio-symbol svg { display:block; width:26px; height:26px; }
.radio-symbol .radio-loader, .radio-symbol .radio-dot, .radio-symbol .radio-error { display:none; }
.radio-mn { height:calc(100% - 36px); flex:1 1 0%; min-height:0; max-width:100%; font-size:24px; font-size:clamp(17px,2.8vh,29px); line-height:1.45; padding:0 4px 0 10px; }
.radio-item:hover { background:#162d42; border-color:#397cac; }
.radio-item.active { background:#0c2d49; border-color:#327fba; }
.radio-item:focus-visible, .radio-item.remote-focus,
.webview-legacy .radio-item:focus, .webview-legacy .radio-item.remote-focus { background:#10395a; border-color:#8ccaff; }
.radio-item.is-loading .radio-icon,
.radio-item.is-playing .radio-icon,
.radio-item.is-error .radio-icon { display:none; }
.radio-item.is-loading .radio-loader { display:block; width:20px; height:20px; border:2px solid #8ccaff33; border-top-color:#8ccaff; border-radius:50%; animation:radio-orbit .8s linear infinite; }
.radio-item.is-playing .radio-dot { display:block; width:8px; height:8px; border-radius:50%; background:#8ccaff; box-shadow:0 0 16px #005da360; }
.radio-item.is-error .radio-error { display:block; color:#ff766c; }
.radio-item.is-error { border-color:#653631; background:#231614; }
.icon-button { background:#070a0edc; border-color:#86a8c4; }
.icon-button:hover { background:#10395a; }
.loading-indicator { border-color:#8ccaff33; border-top-color:#8ccaff; }
@keyframes radio-orbit { to { transform:rotate(360deg); } }

@media (min-width:1800px) { .gallery { padding:44px 32px; grid-gap:26px; gap:26px; } }
@media (orientation:portrait) {
  .gallery { padding:18px; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1.1fr) minmax(0,1fr); grid-gap:18px; gap:18px; }
  .tv-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); grid-gap:12px; gap:12px; }
  .channel { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:24px 10px 20px; border-radius:18px; }
  .channel-icon { position:relative; left:auto; bottom:auto; flex:0 0 56px; width:56px; height:56px; max-width:none; margin-bottom:20px; }
  .channel-name { position:relative; top:auto; right:auto; width:auto; max-width:100%; height:calc(100% - 76px); min-height:0; flex:1 1 0%; align-self:center; padding:0 4px 0 10px; font-size:30px; font-size:clamp(23px,3.6vh,36px); line-height:1.45; }
  .radio-grid { grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); grid-gap:8px; gap:8px; }
  .radio-item { padding:13px 2px 10px; border-radius:12px; }
  .radio-symbol { flex-basis:22px; width:22px; height:22px; margin-bottom:10px; }
  .radio-symbol svg { width:22px; height:22px; }
  .radio-mn { height:calc(100% - 32px); font-size:21px; font-size:clamp(17px,2.8vh,24px); padding:0 2px 0 8px; }
}
@media (orientation:landscape) and (max-height:600px) {
  .gallery { padding:18px; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); grid-gap:18px; gap:18px; }
  .tv-grid { grid-template-columns:minmax(0,1fr); grid-template-rows:repeat(2,minmax(0,1fr)); grid-gap:12px; gap:12px; }
  .channel { border-radius:16px; }
  .channel-name { top:12%; height:76%; right:13%; width:40%; font-size:24px; font-size:clamp(18px,4.4vh,28px); line-height:1.5; }
  .channel-icon { left:10%; bottom:17%; width:17%; max-width:58px; }
  .radio-grid { grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); grid-gap:8px; gap:8px; }
  .radio-item { padding:10px 2px 6px; border-radius:10px; }
  .radio-symbol { flex-basis:20px; width:20px; height:20px; margin-bottom:8px; }
  .radio-symbol svg { width:20px; height:20px; }
  .radio-mn { height:calc(100% - 28px); font-size:18px; font-size:clamp(12px,4vh,20px); padding:0 1px 0 7px; }
}
@media (max-width:360px) and (orientation:portrait) { .gallery { padding:14px; grid-gap:14px; gap:14px; } .radio-grid { grid-gap:6px; gap:6px; } }
@media (prefers-reduced-motion:reduce) {
  .channel, .radio-item { transition:none; }
  .radio-item.is-loading .radio-loader { animation-duration:2s; }
}
/* Narrow fallback for engines older than CSS Grid; preserve D-pad order. */
@supports not (display:grid) {
  .gallery, .tv-grid, .radio-grid { gap:0; grid-gap:0; }
  .gallery { flex-direction:column; }
  .tv-grid { flex:1.65 1 0%; flex-direction:row; margin:0 0 22px; }
  .channel { width:0; height:100%; }
  .channel + .channel { margin:0 0 0 18px; }
  .radio-item { width:calc(10% - 10.8px); height:100%; margin:0 12px 0 0; }
  .radio-item:nth-child(5n) { margin-right:12px; }
  .radio-item:nth-child(10n) { margin-right:0; }
  .radio-item:nth-child(-n+5) { margin-bottom:0; }
  @media (orientation:portrait) {
    .tv-grid { flex:1.1 1 0%; flex-direction:row; margin:0 0 18px; }
    .channel { width:0; height:100%; }
    .channel + .channel { margin:0 0 0 12px; }
    .radio-item { width:calc(20% - 6.4px); height:calc(50% - 4px); margin:0 8px 0 0; }
    .radio-item:nth-child(5n) { margin-right:0; }
    .radio-item:nth-child(-n+5) { margin-bottom:8px; }
  }
  @media (orientation:landscape) and (max-height:600px) {
    .gallery { flex-direction:row; }
    .tv-grid { flex:1.1 1 0%; flex-direction:column; margin:0 18px 0 0; }
    .channel { width:100%; height:0; }
    .channel + .channel { margin:12px 0 0; }
    .radio-item { width:calc(20% - 6.4px); height:calc(50% - 4px); margin:0 8px 0 0; }
    .radio-item:nth-child(n) { margin-bottom:0; margin-right:8px; }
    .radio-item:nth-child(5n) { margin-right:0; }
    .radio-item:nth-child(-n+5) { margin-bottom:8px; }
  }
}
