:root {
  --accent: #e11d2e;
  --accent-bright: #ff3347;
  --bg: #06070a;
  --ink: #f6f5f2;
  --muted: rgba(246, 245, 242, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(12, 14, 19, 0.62);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Impact", "Arial Narrow", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

.stage {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(225, 29, 46, 0.08), transparent 55%),
    #000;
  overflow: hidden;
}

.player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  opacity: 0;
  transition: opacity 0.45s ease;
}
body.has-video .player { opacity: 1; }

.stage-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 20%, transparent 66%, rgba(0, 0, 0, 0.62) 100%),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 2;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.08;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------- Standby ---------- */
.standby {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(225, 29, 46, 0.14), transparent 55%),
    linear-gradient(160deg, #0a0c11, #030405 70%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
body.has-video .standby { opacity: 0; visibility: hidden; pointer-events: none; }
.standby-grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.standby-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  transform: translateY(-4vh);
}
.standby-logo {
  width: clamp(64px, 8vw, 108px);
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(225, 29, 46, 0.4));
  margin-bottom: 26px;
}
.standby-kicker {
  font-family: var(--font-display);
  font-size: clamp(10px, 0.8vw, 13px);
  letter-spacing: 0.38em;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 14px;
}
.standby-name {
  margin: 0;
  font-size: clamp(32px, 5vw, 74px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.08;
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
}
.standby-slogan {
  margin: 16px 0 0;
  font-size: clamp(13px, 1.2vw, 18px);
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
}
.standby-status {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(225, 29, 46, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
.standby-next {
  margin-top: 18px;
  min-height: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
}
.standby-next strong { color: rgba(255, 255, 255, 0.82); font-weight: 600; }
.testcard {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  display: flex;
  opacity: 0.9;
  z-index: 3;
}
.testcard span { flex: 1; }
.testcard span:nth-child(1) { background: #b7b7b7; }
.testcard span:nth-child(2) { background: #c8c21f; }
.testcard span:nth-child(3) { background: #24b3a8; }
.testcard span:nth-child(4) { background: #2c9c46; }
.testcard span:nth-child(5) { background: #b73a9e; }
.testcard span:nth-child(6) { background: #b63838; }
.testcard span:nth-child(7) { background: #2d4bb5; }

/* ---------- Fallback ---------- */
.fallback {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(4, 5, 7, 0.86);
  backdrop-filter: blur(12px);
}
.fallback[hidden] { display: none; }
.fallback-card {
  width: min(92vw, 460px);
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
}
.fallback-icon { color: var(--accent-bright); width: 46px; margin: 0 auto 16px; }
.fallback-card h2 { margin: 0 0 10px; font-size: 21px; }
.fallback-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); }

/* ---------- Packaging ---------- */
.packaging-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.packaging-off .packaging-layer { opacity: 0; visibility: hidden; }

.bug {
  position: absolute;
  top: calc(26px + var(--safe-top));
  left: 32px;
  display: flex;
  align-items: center;
  gap: 13px;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
}
.bug-logo-wrap {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}
.bug-logo { width: 100%; height: 100%; object-fit: contain; }
.bug-logo[hidden] { display: none; }
.bug-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), #7e0b17);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.bug-copy { display: flex; flex-direction: column; gap: 5px; }
.bug-line { display: flex; align-items: center; gap: 8px; }
.bug-channel {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--accent);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(225, 29, 46, 0.5);
}
.live-pill i { width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.bug-station {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.top-right {
  position: absolute;
  top: calc(30px + var(--safe-top));
  right: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hd-pill {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
}
.clock { text-align: right; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.clock-time {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.58);
}

.lower-third {
  position: absolute;
  left: 34px;
  bottom: 148px;
  display: flex;
  min-width: min(480px, 58vw);
  max-width: min(720px, 72vw);
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}
.lower-third.show { opacity: 1; transform: translateY(0); }
.lt-mark {
  width: 5px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 26px rgba(225, 29, 46, 0.55);
}
.lt-copy {
  flex: 1;
  padding: 14px 22px 15px;
  background: linear-gradient(100deg, rgba(8, 10, 14, 0.9), rgba(8, 10, 14, 0.64));
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.lt-top {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
}
.lt-now { color: var(--accent-bright); }
.lt-title {
  margin-top: 6px;
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.22;
}
.lt-meta {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.52);
  font-variant-numeric: tabular-nums;
}

.next-up {
  position: absolute;
  right: 34px;
  bottom: 150px;
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 330px;
  opacity: 0.94;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.48));
}
.next-label {
  display: grid; place-items: center;
  padding: 0 11px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
  writing-mode: vertical-rl;
  text-orientation: upright;
  backdrop-filter: blur(10px);
}
.next-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 14px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 6px 6px 0;
  backdrop-filter: blur(14px);
}
.next-copy strong {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
}
.next-copy span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38px;
  display: flex;
  align-items: stretch;
  background: rgba(5, 6, 9, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.ticker-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  background: linear-gradient(90deg, var(--accent), #a50f1e);
  font-size: 11px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.ticker-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.ticker-window { position: relative; flex: 1; overflow: hidden; }
.ticker-track {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.74);
}
.ticker-track span { padding-right: 80px; }
.ticker-track span::after { content: "●"; margin-left: 80px; color: var(--accent-bright); font-size: 6px; vertical-align: middle; }

.progress-track {
  position: absolute;
  left: 0; right: 0; bottom: 38px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  box-shadow: 0 0 12px rgba(225, 29, 46, 0.7);
  transition: width 1s linear;
}

/* ---------- Switch overlay ---------- */
.switch-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
  pointer-events: none;
}
.switch-overlay.active { opacity: 1; visibility: visible; }
.packaging-off .switch-overlay { display: none; }
.switch-noise {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: repeating-radial-gradient(circle at 17% 32%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px 4px);
  animation: noise-shift 0.18s steps(2) infinite;
}
.switch-copy { position: relative; text-align: center; }
.switch-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.55em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
  padding-left: 0.55em;
}
.switch-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(100px, 18vw, 240px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 60px rgba(225, 29, 46, 0.45);
  font-variant-numeric: tabular-nums;
}
.switch-name {
  display: inline-block;
  margin-top: 18px;
  font-size: 17px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.82);
}

.osd {
  position: absolute;
  top: calc(8vh + var(--safe-top));
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 26;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}
.osd.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.osd span { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.55); }
.osd strong { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.06em; line-height: 1; }

/* ---------- Controls ---------- */
.controls {
  position: absolute;
  left: 0; right: 0; bottom: 38px;
  z-index: 24;
  padding: 60px 28px 18px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.controls-visible .controls { opacity: 1; visibility: visible; }
.controls-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.controls-left, .controls-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-pause, .icon-muted { display: none; }
body.is-paused .icon-play { display: none; }
body.is-paused .icon-pause { display: block; }
body.is-muted .icon-volume { display: none; }
body.is-muted .icon-muted { display: block; }
.text-btn {
  display: flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; cursor: pointer;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 0.2s, border-color 0.2s;
}
.text-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); }
.keycap {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--font-display);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.66);
}
.now-playing {
  display: flex; flex-direction: column; gap: 3px;
  margin-left: 8px;
  min-width: 0;
}
.ctrl-channel {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
}
.ctrl-program {
  max-width: 44vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.sound-hint {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(6, 7, 10, 0.7);
  backdrop-filter: blur(14px);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.sound-hint.show { opacity: 1; visibility: visible; }
.sound-wave { display: flex; align-items: center; gap: 2px; height: 12px; }
.sound-wave i { width: 2px; height: 100%; border-radius: 2px; background: var(--accent-bright); animation: wave 0.9s ease-in-out infinite; }
.sound-wave i:nth-child(2) { animation-delay: 0.15s; height: 70%; }
.sound-wave i:nth-child(3) { animation-delay: 0.3s; height: 45%; }

/* ---------- Drawer ---------- */
.drawer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 26px 34px calc(22px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.96), rgba(5, 6, 9, 0.99));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -40px 120px rgba(0, 0, 0, 0.72);
  transform: translateY(102%);
  visibility: hidden;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s;
}
.drawer.open { transform: translateY(0); visibility: visible; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.eyebrow { font-family: var(--font-display); font-size: 9px; letter-spacing: 0.36em; color: var(--accent-bright); }
.drawer-head h2, .help-card h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: 0.04em; }
.channel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.channel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.channel-card:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.channel-card.active { border-color: var(--accent); background: linear-gradient(150deg, rgba(225, 29, 46, 0.2), rgba(255, 255, 255, 0.04)); }
.channel-card.active::after {
  content: ""; position: absolute; right: 12px; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(225, 29, 46, 0.14);
}
.channel-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.channel-num { font-family: var(--font-display); font-size: 28px; line-height: 1; color: rgba(255, 255, 255, 0.82); }
.channel-logo {
  width: 42px; height: 42px; object-fit: contain; border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}
.channel-logo-fallback {
  width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  background: linear-gradient(145deg, var(--accent), #6f0a15);
}
.channel-card-name { font-size: 14px; font-weight: 600; letter-spacing: 0.03em; }
.channel-card-now { font-size: 11px; color: rgba(255, 255, 255, 0.46); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-foot {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px; color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.06em;
}

/* ---------- Help ---------- */
.help-panel {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.help-panel.open { opacity: 1; visibility: visible; }
.help-card {
  width: min(92vw, 460px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(160deg, #12151c, #08090d);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 24px; }
.help-grid > div {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.help-grid .keycap { min-width: 38px; }

/* ---------- Toast / boot ---------- */
.toast {
  position: absolute;
  left: 50%;
  top: calc(7vh + var(--safe-top));
  transform: translate(-50%, -8px);
  z-index: 70;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.boot {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #040507;
  transition: opacity 0.8s ease, visibility 0.8s;
}
body.booted .boot { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-glow {
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 46, 0.16), transparent 65%);
  filter: blur(20px);
}
.boot-logo { position: relative; width: 82px; height: 82px; margin-bottom: 24px; animation: boot-in 1s ease both; }
.boot-name {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.28em;
  animation: boot-in 1s 0.12s ease both;
}
.boot-line {
  position: relative;
  width: 180px; height: 2px;
  margin: 26px 0 14px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: boot-in 1s 0.2s ease both;
}
.boot-line span {
  display: block; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  animation: boot-load 1.4s ease-in-out infinite;
}
.boot-status {
  position: relative;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.36);
  animation: boot-in 1s 0.3s ease both;
}
.noscript {
  position: absolute; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: #08090c; color: #fff;
}

/* ---------- Motion ---------- */
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 1%); }
  100% { transform: translate(-1%, -1%); }
}
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes boot-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes boot-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

@media (max-width: 900px) {
  .bug { left: 18px; top: calc(16px + var(--safe-top)); gap: 9px; }
  .bug-logo-wrap { width: 42px; height: 42px; border-radius: 9px; }
  .bug-channel { font-size: 14px; }
  .bug-station { display: none; }
  .top-right { right: 18px; top: calc(18px + var(--safe-top)); gap: 10px; }
  .clock-time { font-size: 20px; }
  .clock-date { font-size: 9px; }
  .hd-pill { display: none; }
  .lower-third { left: 18px; bottom: 132px; min-width: 0; max-width: calc(100vw - 36px); }
  .lt-copy { padding: 11px 16px 12px; }
  .lt-title { font-size: 20px; }
  .next-up { display: none; }
  .ticker { height: 34px; }
  .ticker-brand { padding: 0 12px; font-size: 10px; }
  .progress-track { bottom: 34px; }
  .controls { bottom: 34px; padding: 46px 12px 8px; }
  .controls-inner { gap: 6px; }
  .ctrl-program { max-width: 36vw; }
  .controls-right .text-btn .keycap { display: none; }
  .controls-right .text-btn { padding: 0 10px; }
  .sound-hint { bottom: 84px; }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer { padding: 20px 18px calc(16px + var(--safe-bottom)); max-height: 78vh; }
  .drawer-foot { flex-direction: column; gap: 6px; }
  .help-grid { grid-template-columns: 1fr; }
  .switch-copy strong { font-size: 120px; }
  .standby-inner { transform: translateY(-2vh); }
  .standby-name { font-size: clamp(30px, 9vw, 46px); }
  .standby-kicker { letter-spacing: 0.24em; }
}

@media (max-width: 560px) {
  .now-playing { max-width: 40vw; }
  .ctrl-channel { font-size: 9px; }
  .ctrl-program { max-width: 40vw; font-size: 11px; }
  .controls-left .icon-btn, .controls-right .icon-btn { width: 38px; height: 38px; }
  .lt-top { font-size: 9px; }
  .lt-meta { font-size: 10px; }
  .standby-status { font-size: 11px; }
  .ticker-track { font-size: 11px; animation-duration: 24s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ticker-track { animation: none; }
}
