:root {
  color-scheme: dark;
  --ink: #070908;
  --panel: #0e1210;
  --paper: #f4f6f0;
  --white: #f7faf4;
  --muted: #9da69f;
  --line: rgba(255,255,255,.15);
  --acid: #b7ff38;
  --coral: #ff5e4d;
  --cyan: #5de1ea;
  --yellow: #ffd85a;
  --mono: "Cascadia Mono", Consolas, monospace;
  --sans: Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
html { background: var(--ink); }
body { margin: 0; min-width: 320px; overflow: hidden; background: var(--ink); color: var(--white); font-family: var(--sans); letter-spacing: 0; }
button, a { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; background: var(--acid); color: var(--ink); }
.skip-link:focus { transform: none; }

.app-header { position: fixed; inset: 0 0 auto; z-index: 30; height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7,9,8,.88); backdrop-filter: blur(18px); }
.brand { width: max-content; display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--acid); color: var(--ink); font: 900 10px var(--mono); }
.brand strong, .season-link { font: 900 10px var(--mono); }
.feed-tabs { height: 100%; display: flex; align-items: stretch; }
.feed-tabs button { position: relative; min-width: 112px; padding: 0 16px; background: transparent; color: #a8b0a9; cursor: pointer; font: 800 9px var(--mono); }
.feed-tabs button[aria-selected="true"] { color: var(--white); }
.feed-tabs button[aria-selected="true"]::after { content: ""; position: absolute; right: 18px; bottom: -1px; left: 18px; height: 3px; background: var(--acid); }
.season-link { justify-self: end; color: var(--acid); text-decoration: none; }

.live-shell { height: 100svh; display: grid; grid-template-columns: minmax(210px, .72fr) minmax(360px, 560px) minmax(280px, 1fr); gap: 0; padding-top: 66px; }
.room-dock, .stage-panel { min-width: 0; background: var(--panel); }
.room-dock { display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 34px 24px 22px; }
.room-dock header p, .kicker { margin: 0 0 9px; color: var(--acid); font: 900 9px var(--mono); }
.room-dock h1 { margin: 0; font-size: 28px; line-height: 1; }
.room-list { display: grid; gap: 8px; margin-top: 30px; overflow-y: auto; scrollbar-width: thin; }
.room-button { width: 100%; min-height: 74px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid transparent; background: transparent; color: var(--white); text-align: left; cursor: pointer; }
.room-button:hover, .room-button[aria-current="true"] { border-color: var(--line); background: #171d19; }
.room-button[aria-current="true"] { border-left: 3px solid var(--acid); }
.room-avatar { width: 42px; aspect-ratio: 1; display: grid; place-items: center; background: #252c27; color: var(--acid); font: 900 10px var(--mono); }
.room-button strong, .room-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-button strong { font-size: 12px; }
.room-button small { margin-top: 5px; color: var(--muted); font: 8px var(--mono); }
.room-dot { width: 7px; height: 7px; background: #59615b; }
.room-dot.is-live { background: var(--coral); box-shadow: 0 0 12px rgba(255,94,77,.8); }
.room-dock > footer { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.room-dock > footer span { color: var(--acid); font: 900 30px var(--mono); }
.room-dock > footer p { max-width: 120px; margin: 0; color: var(--muted); font: 8px/1.4 var(--mono); text-transform: uppercase; }

.stream-feed { height: calc(100svh - 66px); overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; background: #020302; scrollbar-width: none; }
.stream-feed::-webkit-scrollbar { display: none; }
.stream-slide { position: relative; isolation: isolate; width: 100%; height: calc(100svh - 66px); min-height: 560px; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #090c0a; }
.stream-media, .stream-shade { position: absolute; inset: 0; }
.stream-media { z-index: -3; background: #0b0e0c center / cover no-repeat; }
.stream-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(8,12,9,.22), rgba(8,12,9,.72)); }
.stream-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stream-shade { z-index: -1; background: linear-gradient(to bottom, rgba(4,6,5,.18) 15%, transparent 42%, rgba(4,6,5,.88) 91%); pointer-events: none; }
.stream-status { position: absolute; top: 22px; left: 22px; display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 10px; border: 1px solid rgba(255,255,255,.24); background: rgba(8,11,9,.72); backdrop-filter: blur(8px); font: 900 8px var(--mono); }
.stream-status i { width: 7px; height: 7px; background: #6c746e; }
.stream-status.is-live { border-color: rgba(255,94,77,.7); background: var(--coral); }
.stream-status.is-live i { background: #fff; animation: pulse 1.3s infinite; }
.stream-status.is-error { border-color: var(--yellow); color: var(--yellow); }
.stream-copy { position: absolute; right: 72px; bottom: 35px; left: 26px; }
.stream-host { margin: 0 0 12px; color: var(--acid); font: 900 9px var(--mono); text-transform: uppercase; }
.stream-copy h2 { max-width: 440px; margin: 0; font-size: clamp(30px, 3.6vw, 48px); line-height: .98; letter-spacing: 0; overflow-wrap: anywhere; text-wrap: balance; }
.stream-description { max-width: 450px; margin: 14px 0 0; color: #d4dad4; font-size: 13px; line-height: 1.55; }
.stream-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.stream-tags span { min-height: 25px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid rgba(255,255,255,.26); background: rgba(5,8,6,.54); font: 800 7px var(--mono); }
.stream-actions { display: flex; gap: 9px; margin-top: 20px; }
.stream-actions a, .stream-actions button { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 0 13px; background: var(--acid); color: var(--ink); text-decoration: none; cursor: pointer; }
.stream-actions button { background: rgba(8,11,9,.68); color: var(--white); border: 1px solid rgba(255,255,255,.28); }
.stream-actions span { font: 900 18px var(--mono); }
.stream-actions b { font: 900 8px var(--mono); }
.swipe-cue { position: absolute; right: 15px; bottom: 35px; display: grid; justify-items: center; gap: 6px; color: #cbd1cc; }
.swipe-cue span { font: 18px var(--mono); animation: nudge 1.6s infinite; }
.swipe-cue b { writing-mode: vertical-rl; font: 800 7px var(--mono); }
.stream-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); font: 800 9px var(--mono); }
.stream-loading i { width: 24px; height: 24px; border: 2px solid #39403b; border-top-color: var(--acid); border-radius: 50%; animation: spin .8s linear infinite; }

.stage-panel { display: grid; grid-template-rows: auto 1fr auto; border-left: 1px solid var(--line); overflow: hidden; }
.stage-manifest { padding: 34px 30px 28px; border-bottom: 1px solid var(--line); }
.stage-manifest h2 { max-width: 430px; margin: 0; font-size: 26px; line-height: 1.08; text-wrap: balance; }
.manifest-actions { display: grid; margin-top: 25px; border-top: 1px solid var(--line); }
.manifest-actions a { min-height: 56px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--white); text-decoration: none; }
.manifest-actions a:hover b { color: var(--acid); }
.manifest-actions span { color: var(--muted); font: 8px var(--mono); }
.manifest-actions b { font-size: 12px; }
.event-pulse { min-height: 0; display: flex; flex-direction: column; padding: 26px 30px; }
.event-pulse header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.event-pulse h2 { margin: 0; color: var(--muted); font: 900 8px var(--mono); }
.event-pulse header i { width: 7px; height: 7px; background: var(--acid); box-shadow: 0 0 12px rgba(183,255,56,.7); animation: pulse 1.5s infinite; }
.event-pulse ol { min-height: 0; margin: 18px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.event-pulse li { display: grid; grid-template-columns: 55px 1fr; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); color: #cbd1cc; font-size: 10px; line-height: 1.45; }
.event-pulse li time { color: var(--acid); font: 8px var(--mono); }
.event-pulse li strong { display: block; margin-bottom: 3px; color: var(--white); font-size: 10px; }
.truth-line { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 30px; border-top: 1px solid var(--line); color: #747d76; font: 700 7px var(--mono); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .32; } }
@keyframes nudge { 50% { transform: translateY(6px); } }

@media (max-width: 1080px) {
  .live-shell { grid-template-columns: 190px minmax(360px, 1fr) 280px; }
  .stage-manifest, .event-pulse { padding-right: 22px; padding-left: 22px; }
  .feed-tabs button { min-width: 92px; padding: 0 10px; }
}

@media (max-width: 840px) {
  .app-header { height: 58px; grid-template-columns: auto 1fr; gap: 8px; padding: 0 14px; }
  .brand strong { display: none; }
  .brand span { width: 34px; height: 34px; }
  .feed-tabs { width: 100%; justify-self: end; justify-content: flex-end; }
  .feed-tabs button { min-width: 0; padding: 0 8px; white-space: nowrap; }
  .season-link { display: none; }
  .live-shell { display: block; height: 100svh; padding-top: 58px; }
  .room-dock, .stage-panel { display: none; }
  .stream-feed, .stream-slide { height: calc(100svh - 58px); }
  .stream-slide { min-height: 500px; }
  .stream-media::after { background: linear-gradient(90deg, rgba(8,12,9,.12), rgba(8,12,9,.28)); }
  .stream-copy { right: 62px; bottom: max(24px,env(safe-area-inset-bottom)); left: 18px; }
  .stream-copy h2 { font-size: clamp(32px, 10vw, 46px); }
  .stream-description { max-width: 92%; font-size: 12px; }
  .stream-status { top: 18px; left: 18px; }
  .swipe-cue { right: 13px; bottom: max(25px,env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .feed-tabs button { padding: 0 8px; font-size: 8px; }
  .stream-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .stream-tags span:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; }
}
