/* Watch Party — interface styles
   Neutral darks, one warm accent for the playhead and focus, red only for "on air". */

:root {
  --bg: #0d0d0e;
  --panel: #141415;
  --raised: #1c1c1e;
  --hover: #252528;
  --line: #262629;
  --line-2: #333337;
  --text: #e7e6e3;
  --text-2: #a09f9b;
  --text-3: #6d6c69;
  --accent: #d99e3a;
  --accent-ink: #18120a;
  --live: #e5484d;
  --ok: #4fa463;
  --warn: #d99e3a;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.45 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
.mono, code { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
[hidden] { display: none !important; }
.error { color: #ff8a8a; margin: 8px 0 0; }
.warn { color: var(--warn); margin: 8px 0 0; font-size: 12px; }

/* ── Controls ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r);
  background: var(--raised); border: 1px solid var(--line-2);
  color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--hover); border-color: #3e3e43; }
.btn:active { background: #2d2d31; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: #e3a948; border-color: #e3a948; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.mini, select.mini { height: 24px; padding: 0 8px; font-size: 12px; }
select.mini { width: auto; max-width: 220px; }
.btn.wide { min-width: 84px; }
.btn:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

input:not([type=range]):not([type=checkbox]), select {
  height: 30px; width: 100%; padding: 0 9px; border-radius: var(--r);
  background: #0f0f10; border: 1px solid var(--line-2); color: var(--text); outline: none;
}
input:not([type=range]):not([type=checkbox]):focus, select:focus { border-color: var(--accent); }
select { padding-right: 4px; }
input[type=checkbox] { accent-color: var(--accent); }
label { display: block; margin: 12px 0 5px; font-size: 12px; color: var(--text-2); }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-size: 12px; text-transform: none; letter-spacing: 0; }
label.check select { width: auto; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; cursor: pointer; }
.link:hover { text-decoration-color: var(--text-2); }

input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 18px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: #3a3a3e; border-radius: 2px; }
input[type=range]::-moz-range-track { height: 3px; background: #3a3a3e; border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--text); border: 0; }

.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* Status lamp + label, broadcast style */
.tally { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.tally i { width: 8px; height: 8px; border-radius: 1px; background: #4a4a4e; }
[data-mode=play] .tally i, .tally[data-mode=play] i { background: var(--live); box-shadow: 0 0 6px rgba(229, 72, 77, .55); }
[data-mode=play] .tally, .tally[data-mode=play] { color: var(--text); }
[data-mode=hold] .tally i, [data-mode=countdown] .tally i, [data-mode=pause] .tally i,
.tally[data-mode=hold] i, .tally[data-mode=countdown] i, .tally[data-mode=pause] i { background: var(--warn); }

.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.panel-label, .menu-label {
  font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2);
}

/* ── Lobby / sign-in card ─────────────────────────────────── */
.lobby {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 8, 9, .84);
}
.lobby.gone { opacity: 0; pointer-events: none; transition: opacity .25s; }
.card {
  width: 100%; max-width: 440px; padding: 22px 24px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-title { margin: 10px 0 16px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.fine { margin: 14px 0 0; color: var(--text-3); font-size: 12px; }
.slate-rows {
  display: grid; grid-template-columns: 92px 1fr; margin: 0; border-top: 1px solid var(--line);
}
.slate-rows dt, .slate-rows dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 36px; display: flex; align-items: center; }
.slate-rows dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.slate-rows dd select { height: 28px; }
.slate-rows .good { color: var(--text); }
.slate-rows .good::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--ok); margin-right: 8px; display: inline-block; }
.slate-rows .bad { color: #ff9a9a; }
.slate-rows .bad::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--live); margin-right: 8px; display: inline-block; }

/* ── Viewer layout ───────────────────────────────────────── */
.viewer {
  overflow: hidden; background: #000;
  font-size: clamp(13px, .42vw + 6px, 19px);
}
.app { display: flex; height: 100%; }
.stage { position: relative; flex: 1; min-width: 0; background: #000; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

.chrome { position: absolute; left: 0; right: 0; z-index: 5; transition: opacity .35s ease; }
.chrome.top {
  top: 0; display: flex; align-items: center; gap: 14px; height: 3.2em; padding: 0 1.1em;
  background: rgba(12, 12, 13, .86); border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { color: var(--text-2); white-space: nowrap; }
.count { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .92em; }

.chrome.bottom { bottom: 0; background: rgba(12, 12, 13, .86); border-top: 1px solid rgba(255, 255, 255, .05); }
.progress { position: relative; height: 3px; background: rgba(255, 255, 255, .1); }
.progress .buf { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .22); }
.progress .played { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.bar { display: flex; align-items: center; gap: 2px; height: 3.4em; padding: 0 .7em 0 1.1em; }
.tc { font-size: 1em; color: var(--text); }
.tc-dur { font-size: 1em; color: var(--text-3); margin-left: .45em; }
.bar-flash { margin-left: 1.4em; padding-left: 1.1em; border-left: 1px solid var(--line-2); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.tb {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 2.5em; min-width: 2.6em; padding: 0 .6em; border: 0; border-radius: var(--r);
  background: transparent; color: var(--text-2); cursor: pointer;
}
.tb .ic { width: 1.35em; height: 1.35em; }
.tb:hover, .tb[aria-expanded=true] { background: rgba(255, 255, 255, .08); color: var(--text); }
.tb.labelled { padding: 0 .55em 0 .65em; }
.tb .caret { width: 1em; height: 1em; margin-left: -2px; }
.tb.small { height: 26px; min-width: 26px; padding: 0 7px; font-size: 12px; }
.tb.small .ic { width: 16px; height: 16px; }
.vol { display: inline-flex; align-items: center; }
.vol input { width: 6.5em; margin-right: .5em; }
.badge {
  position: absolute; top: .25em; right: .2em; min-width: 1.45em; height: 1.45em; padding: 0 .3em;
  display: grid; place-items: center; border-radius: 2px;
  background: var(--accent); color: var(--accent-ink); font-size: .72em; font-weight: 700;
}
body.chat-panel #chatBtn { color: var(--text); }

/* Idle: chrome fades away during playback, cursor hides */
body.idle .chrome, body.idle .chat-overlay.lift { opacity: 0; pointer-events: none; }
body.idle .stage { cursor: none; }

/* Overlays on the picture */
.notes {
  position: absolute; top: 4em; left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: min(90%, 760px);
  display: flex; flex-direction: column; align-items: center; gap: .5em; pointer-events: none;
}
.notice {
  padding: .55em 1em; background: rgba(12, 12, 13, .92); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: var(--r); font-size: 1em; pointer-events: auto;
}
body.idle .notes { top: 1.2em; }
.yt-msg { display: flex; align-items: center; gap: 1em; border-left-color: var(--live); }
.yt-msg[hidden] { display: none; }
.yt-msg .btn { flex: none; height: 2.2em; }
.hold {
  position: absolute; top: 4em; right: 1.1em; z-index: 6; padding: .45em .8em;
  background: rgba(12, 12, 13, .9); border: 1px solid var(--line-2); border-radius: var(--r);
  font-family: var(--mono); font-size: .92em; color: var(--text-2);
}
.spinner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; padding: .6em 1em;
  background: rgba(12, 12, 13, .9); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text-2);
}
.spinner .ring { width: 15px; height: 15px; border: 2px solid #3b3b40; border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.slate {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .62); text-align: center; padding: 2em;
}
.slate-label { font-size: .85em; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.slate-time { font-size: clamp(42px, 7vw, 132px); font-weight: 300; line-height: 1.1; margin: .12em 0 .1em; color: var(--text); }
.slate-time:empty { display: none; }
.slate-sub { color: var(--text-2); font-size: 1em; }
.slate .btn { margin-top: 1.2em; height: 2.6em; padding: 0 1.4em; }
body[data-mode=play] .slate:not(.force) { display: none; }

.info {
  position: absolute; left: 1.1em; top: 4em; z-index: 7; margin: 0; padding: .7em .9em;
  background: rgba(10, 10, 11, .92); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: .85em; line-height: 1.6; color: var(--text-2); white-space: pre;
}
.shortcuts {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; min-width: 300px;
  padding: 1em 1.2em; background: var(--raised); border: 1px solid var(--line-2); border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.shortcuts dl { display: grid; grid-template-columns: auto 1fr; gap: .45em 1.2em; margin: .8em 0 0; }
.shortcuts dt { font-family: var(--mono); color: var(--text); padding: 0 .4em; border: 1px solid var(--line-2); border-radius: 2px; text-align: center; min-width: 2.2em; }
.shortcuts dd { margin: 0; color: var(--text-2); }

/* Menus */
.menu {
  position: absolute; z-index: 9; bottom: 4.2em; min-width: 220px; padding: 6px 0;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 4px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .6); font-size: .95em;
}
.menu .menu-label { padding: 8px 14px 4px; font-size: .78em; color: var(--text-3); }
.menu .item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 2.4em; padding: 0 14px 0 12px;
  border: 0; background: none; color: var(--text); text-align: left; cursor: pointer;
}
.menu .item:hover, .menu .item:focus-visible { background: var(--hover); outline: none; }
.menu .item .chk { width: 14px; color: var(--accent); font-weight: 700; text-align: center; }
.menu .item .aside { margin-left: auto; color: var(--text-3); font-family: var(--mono); font-size: .85em; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }

/* ── YouTube programs ────────────────────────────────────
   YouTube's player may not be covered by anything, so in YouTube mode the picture sits in its own
   box and the bars, notices and panels take space around it. relayout() in sync.js sets --yt-*. */
.ytbox { position: absolute; z-index: 1; inset: var(--yt-t, 0) var(--yt-r, 0) var(--yt-b, 0) var(--yt-l, 0); background: #000; visibility: hidden; }
.ytbox iframe { display: block; width: 100%; height: 100%; border: 0; }
body:not(.yt) .ytbox { display: none; }
body.yt .stage > video { display: none; }
body.yt-show .ytbox { visibility: visible; }
body.yt .spinner, body.yt .hold, body.yt .chat-overlay, body.yt #chatToOverlay, body.yt #audioBtn { display: none !important; }
body.yt .chrome { transition: opacity .3s ease .12s; }   /* bars fade in once the picture has made room */
body.yt.idle .chrome { transition-delay: 0s; }
body.yt.idle .ytbox iframe { pointer-events: none; }   /* bars hidden: the first mouse move or tap reaches the page and wakes them */
body.yt .info, body.yt .shortcuts { top: 3.6em; left: .6em; transform: none; }
body.yt .shortcuts { min-width: 0; width: 19em; box-shadow: none; }

/* ── Chat (shared) ───────────────────────────────────────── */
.chat {
  position: relative; width: 22em; max-width: 380px; min-width: 280px; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); font-size: clamp(13px, .5vw + 4px, 18px);
}
body:not(.chat-panel) .chat { display: none; }
.chat-head { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 8px 0 10px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.msg {
  position: relative; display: grid; grid-template-columns: 4.6em 1fr; gap: 0 4px;
  padding: 3px 12px 3px 6px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere;
}
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg .stamp { font-family: var(--mono); font-size: .78em; color: var(--text-3); text-align: right; padding: .22em 6px 0 0; white-space: nowrap; }
.msg .body { min-width: 0; }
.msg .who { font-weight: 600; margin-right: 6px; }
.msg .tag {
  display: inline-block; margin-right: 6px; padding: 0 4px; border: 1px solid rgba(217, 158, 58, .55); border-radius: 2px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: var(--accent); vertical-align: 1px;
}
.msg.host .who { color: var(--accent) !important; }
.msg.mention { background: rgba(217, 158, 58, .08); box-shadow: inset 2px 0 0 var(--accent); }
.msg.pending { opacity: .5; }
.msg.failed .txt { color: #ff9a9a; }
.msg.sys { display: flex; justify-content: center; padding: 8px 12px; color: var(--text-3); font-size: .8em; letter-spacing: .08em; text-transform: uppercase; }
.msg.sys::before, .msg.sys::after { content: ""; flex: 1; border-top: 1px solid var(--line); margin: .65em 10px 0; }
.msg.enter { animation: enter .16s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(3px); } }
.msg .acts { position: absolute; right: 8px; top: 2px; display: none; gap: 4px; }
.msg:hover .acts { display: flex; }
.msg .acts button { height: 20px; padding: 0 6px; font-size: 11px; border-radius: 2px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text-2); cursor: pointer; }
.msg .acts button:hover { color: var(--text); border-color: #45454a; }
.msg .acts button.danger:hover { color: #ff8a8a; }

.newpill {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 2;
  height: 26px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--raised); color: var(--text); font-size: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.chat-off { padding: 10px 14px; color: var(--text-2); border-top: 1px solid var(--line); font-size: 12.5px; }
.composer { padding: 10px 12px 10px; border-top: 1px solid var(--line); }
.input-row { display: flex; gap: 6px; }
.input-row input { height: 34px !important; }
.input-row .btn { height: 34px; }
.composer-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: 11.5px; color: var(--text-3); }
.composer-meta .link { color: var(--text-2); }
#charCount.near { color: var(--warn); }

/* Chat over the video (TV friendly) */
.chat-overlay {
  position: absolute; left: 1.1em; bottom: 4.6em; z-index: 5; width: min(46%, 34em);
  display: flex; flex-direction: column; align-items: flex-start; gap: .35em; pointer-events: none;
  font-size: clamp(14px, 1.05vw, 26px); transition: bottom .35s ease;
}
body.idle .chat-overlay { bottom: 1.2em; }
.chat-overlay .line {
  max-width: 100%; padding: .28em .6em; background: rgba(8, 8, 9, .72); border-radius: 2px; line-height: 1.35;
  overflow-wrap: anywhere; animation: enter .18s ease-out; transition: opacity .6s;
}
.chat-overlay .line b { font-weight: 600; margin-right: .45em; }
.chat-overlay .line.sys { color: var(--text-2); font-size: .85em; letter-spacing: .06em; text-transform: uppercase; }
.chat-overlay .line.out { opacity: 0; }

/* ── Host booth ──────────────────────────────────────────── */
.admin { min-height: 100%; }
.booth-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px;
  background: #101011; border-bottom: 1px solid var(--line);
}
.booth-head .brand-sub { color: var(--text-3); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.booth-head .count { margin-right: 6px; }
.onair {
  min-width: 150px; height: 30px; padding: 0 14px; display: grid; place-items: center; border-radius: 2px;
  border: 1px solid var(--line-2); background: #18181a; color: var(--text-3);
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.onair[data-mode=play] { background: var(--live); border-color: var(--live); color: #fff; box-shadow: 0 0 18px rgba(229, 72, 77, .35); }
.onair[data-mode=hold], .onair[data-mode=countdown], .onair[data-mode=pause] { border-color: rgba(217, 158, 58, .6); color: var(--accent); }

.booth { display: grid; grid-template-columns: minmax(270px, 320px) minmax(420px, 1fr) minmax(300px, 380px); gap: 12px; padding: 12px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.panel > .panel-label { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 4px 12px 12px; }
.panel-body > label:first-child { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.row input { flex: 1; min-width: 0; }
.row input.narrow { flex: 0 0 76px; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv .def { color: var(--text-3); }

.program .monitor { position: relative; background: #000; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); }
.program .monitor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.program .monitor .ytbox { inset: 0; visibility: visible; }
body.yt .program .monitor video, body.yt .mon-status { display: none; }
.mon-status { position: absolute; left: 10px; top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-2); text-shadow: 0 1px 2px #000; }
.timeline { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px 4px; }
.tc-big { font-size: 28px; font-weight: 400; color: var(--text); }
.timeline .tc-dur { font-size: 14px; }
.chip { padding: 3px 9px; border-radius: 2px; background: #1e1e21; border: 1px solid var(--line-2); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.chip[data-mode=play] { color: #ffb1b3; border-color: rgba(229, 72, 77, .5); }
.chip[data-mode=hold], .chip[data-mode=pause], .chip[data-mode=countdown] { color: var(--accent); border-color: rgba(217, 158, 58, .5); }
.scrub { position: relative; margin: 6px 14px 2px; height: 22px; }
.scrub-track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; background: #2a2a2d; border-radius: 2px; overflow: hidden; }
.scrub-buf { position: absolute; inset: 0 auto 0 0; width: 0; background: #47474c; }
.scrub-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.scrub input { position: absolute; inset: 0; width: 100%; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.scrub-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 2px 6px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 2px; font-size: 11px; pointer-events: none; }
.transport { display: flex; align-items: center; gap: 6px; padding: 10px 14px 4px; }
.hint { margin: 6px 14px 12px; }

.aud-big { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 6px; }
.aud-big .mono { font-size: 30px; }
table.stats { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.stats td { padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
table.stats td:last-child { text-align: right; font-family: var(--mono); color: var(--text); }
table.stats td.bad { color: #ff8a8a; font-weight: 600; }
.dist-label { margin: 12px 0 5px; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; }
.dist { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.dist .d { display: grid; grid-template-columns: 7.5em 1fr 2.5em; align-items: center; gap: 8px; }
.dist .d span:first-child { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist .d .bar-bg { height: 6px; background: #232326; border-radius: 1px; overflow: hidden; }
.dist .d .bar-bg i { display: block; height: 100%; background: #6b6b70; }
.dist .d span:last-child { text-align: right; font-family: var(--mono); color: var(--text); }
.dist .empty { color: var(--text-3); }

.chat-admin { display: flex; flex-direction: column; height: 520px; position: relative; }
.chat-admin .msgs { font-size: 13px; }
.chat-admin .newpill { bottom: 64px; }
.muted-list { padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.muted-list .m { display: flex; align-items: center; gap: 8px; margin-top: 4px; }

/* ── Small screens / phones ─────────────────────────────── */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .stage { flex: none; height: 56.25vw; min-height: 200px; }
  body:not(.chat-panel) .stage { flex: 1; height: auto; }
  .chat { width: auto; max-width: none; min-width: 0; flex: 1; border-left: 0; border-top: 1px solid var(--line); }
  .vol input, .brand-sub, #audioLabel { display: none; }
  .chrome.top { height: 2.8em; }
  .bar { height: 3em; }
  .notes, .hold, .info { top: 3.4em; }
  body.yt.chat-panel .stage { height: calc(56.25vw + 5.8em + 3px); }   /* room for both bars around a full-width picture */
}
@media (max-width: 1100px) {
  .booth { grid-template-columns: 1fr 1fr; }
  .booth .center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 700px) {
  .booth { grid-template-columns: 1fr; }
}
