:root {
  --bg: #12141c; --panel: #1b1f2b; --line: #2a3042; --text: #e9ecf5; --muted: #9aa3bd;
  --accent: #9146ff; --accent2: #ffb347; --good: #46d37a; --bad: #ff5d6c;
}
@media (prefers-color-scheme: light) { :root { --bg: #f2f3f8; --panel: #fff; --line: #d9dcea; --text: #1a1d29; --muted: #5d6685; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow: hidden; }
#app { display: grid; grid-template-columns: 320px 1fr; grid-template-rows: minmax(0, 1fr); height: 100%; }
#app:not(.with-queue) { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#queue-col { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 16px; overflow-y: auto; transition: opacity .25s; }
#app:not(.with-queue) #queue-col { display: none; }
h1 { margin: 0; font-size: 22px; } h2 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sub { margin: 0 0 14px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.now { font-weight: 650; font-size: 17px; }
#queue-list { list-style: none; margin: 0; padding: 0; }
#queue-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
#queue-list li.you { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
#queue-list li.away { opacity: .55; }
#queue-list .pos { color: var(--muted); width: 2ch; } #queue-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #queue-list .eta { color: var(--muted); font-variant-numeric: tabular-nums; }
#me-box { margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
#me-box .big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.btn { appearance: none; border: 0; background: var(--accent); color: #fff; padding: 9px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
#account { margin-top: 14px; }
/* The picture is laid out absolutely so its own size (e.g. 1920x1080) can never stretch the page: it is scaled down to fit
   the window completely, with black bars on the sides or top/bottom (object-fit: contain). */
#stage { position: relative; background: #000; min-width: 0; min-height: 0; overflow: hidden; }
#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; outline: none; }
#video::-webkit-media-controls { display: none !important; }
#sound { position: absolute; bottom: 14px; right: 14px; margin: 0; }
.hidden { display: none !important; }
#video:not(.live) { opacity: 0; }
#hud { position: absolute; top: 10px; right: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-variant-numeric: tabular-nums; pointer-events: none; }
#hud.warn { background: var(--bad); }
#overlay { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: min(640px, 92%); background: rgba(20,22,32,.85); color: #fff; text-align: center; cursor: pointer; font-size: 15px; padding: 10px 16px; border-radius: 12px; z-index: 4; }
#overlay small { display: block; font-size: 14px; opacity: .8; margin-top: 8px; }
#banner { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); max-width: min(560px, 92%); background: var(--accent2); color: #1a1d29; padding: 14px 18px; border-radius: 12px; font-weight: 650; box-shadow: 0 8px 28px rgba(0,0,0,.4); text-align: center; }
#banner button { margin-left: 8px; }
#offline { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; padding: 8px 14px; border-radius: 8px; }
@media (max-width: 760px) { html, body { overflow: auto; } #app { grid-template-columns: 1fr; grid-template-rows: auto 56vw; height: auto; } #app.with-queue #stage { order: -1; } }

#dbg { position: absolute; top: 8px; left: 8px; margin: 0; padding: 6px 9px; background: rgba(0,0,0,.7); color: #7CFC9A; font: 12px/1.35 ui-monospace, Consolas, monospace; border-radius: 6px; pointer-events: none; z-index: 5; }
#probeBtn { position: absolute; left: 10px; bottom: 10px; margin: 0; z-index: 6; }
#probeOut { position: absolute; left: 10px; bottom: 54px; margin: 0; padding: 6px 9px; background: rgba(0,0,0,.7); color: #ffd66b; font: 12px/1.35 ui-monospace, Consolas, monospace; border-radius: 6px; pointer-events: none; z-index: 6; }
