:root {
  --bg: #05070d;
  --panel: #0c1220;
  --ink: #e8eef7;
  --muted: #8b9bb4;
  --gold: #d4a017;
  --cyan: #7dd3fc;
  --ok: #34d399;
  --line: #1e293b;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { display: flex; flex-direction: column; overflow: hidden; }
a { color: var(--cyan); }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .45rem 1.1rem; border-bottom: 1px solid var(--gold);
  background: #080d18; z-index: 20; flex-wrap: wrap; flex: none;
}
.brand { color: var(--gold); text-decoration: none; font-weight: 700; }
.top nav { display: flex; flex-wrap: wrap; gap: .7rem; font-size: .86rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a[aria-current="page"], .top nav a:hover { color: var(--ink); }
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .player-box { max-height: 38vh; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
}
.screen {
  background: #080d18;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.player-box {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: calc(100% - 5.4rem);
  background: #000;
  overflow: hidden;
}
.player-box video, .player-box audio, .player-box iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: #000; border: 0;
  object-fit: contain;
}
.hud {
  flex: none;
  padding: .4rem .85rem .5rem; background: #080d18; border-top: 1px solid var(--line);
}
.now { font-family: var(--display); font-size: 1.25rem; color: var(--gold); margin: 0 0 .2rem; }
.status { font-family: var(--mono); font-size: .72rem; color: var(--muted); min-height: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.btn {
  background: var(--gold); color: #111; border: 0; font-weight: 700; padding: .45rem .7rem;
  border-radius: 8px; cursor: pointer; font-size: .78rem; text-decoration: none; display: inline-block;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.side {
  background: var(--panel); border-left: 1px solid var(--line);
  padding: .75rem .85rem; height: 100%; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
h1 { font-family: var(--display); font-size: 1.35rem; color: var(--gold); margin: 0 0 .35rem; }
.kicker { font-family: var(--mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #e8a54b; margin: 0 0 .35rem; }
.note { font-size: .8rem; color: var(--muted); line-height: 1.4; flex: none; }
#q { flex: none; }
input[type="search"], input[type="url"] {
  width: 100%; background: #0a101c; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .6rem; font: inherit; margin: .35rem 0;
}
.tabs {
  display: flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0 .15rem; flex: none;
}
.tab {
  font-family: var(--font); font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line); background: #0a101c; color: var(--muted);
  border-radius: 8px; padding: .32rem .62rem; cursor: pointer;
}
.tab.on { border-color: var(--gold); color: var(--gold); background: #1a1408; }
.chips {
  display: flex; flex-wrap: wrap; gap: .3rem; margin: .35rem 0 .45rem;
  flex: none; max-height: 16vh; overflow-y: auto;
}
.idle {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: var(--display); font-size: 1.35rem;
  pointer-events: none; background: #000; z-index: 2;
}
.idle[hidden] { display: none; }
.player-box:fullscreen, .player-box:-webkit-full-screen { max-height: 100%; aspect-ratio: auto; }
.chip {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .04em;
  border: 1px solid var(--line); background: #0a101c; color: var(--muted);
  border-radius: 999px; padding: .28rem .55rem; cursor: pointer;
}
.chip.on { border-color: var(--gold); color: var(--gold); }
.list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; }
.list li {
  display: flex; gap: .5rem; align-items: center;
  border-bottom: 1px solid var(--line); padding: .42rem .1rem; cursor: pointer; font-size: .84rem;
}
.list li:hover { color: var(--gold); }
.list li.on { color: var(--gold); background: #1a1408; }
.list li.dead { opacity: .45; }
.num { font-family: var(--mono); font-size: .68rem; color: var(--muted); width: 2rem; flex: none; }
.donate { display: flex; flex-wrap: wrap; gap: .4rem; margin: .55rem 0 0; flex: none; }
.add { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); flex: none; }
.add summary { cursor: pointer; color: var(--muted); font-size: .8rem; }
.foot {
  flex: none;
  border-top: 1px solid var(--line);
  padding: .45rem 1.1rem .55rem;
  font-size: .7rem;
  color: var(--muted);
  line-height: 1.4;
  max-height: 4.6rem;
  overflow-y: auto;
}
.foot code { font-size: .7rem; }
