:root {
  --bg: #0e0e10;
  --panel: #18181b;
  --panel2: #212126;
  --raised: #2a2a30;
  --raised-hover: #34343b;
  --well: #0a0a0c;
  --text: #f2f2f2;
  --muted: #9d9da6;
  --faint: #6c6c75;
  --line: #2a2a2f;
  --line-soft: #222227;
  --orange: #cc4b0a;
  --orange-hover: #e0540b;
  --orange-soft: rgba(204, 75, 10, .16);
  --red: #e0262d;
  --red-soft: rgba(224, 38, 45, .16);
  --amber: #e6a417;
  --amber-soft: rgba(230, 164, 23, .14);
  --ok: #3fae6a;
  --ok-soft: rgba(63, 174, 106, .14);
  --r: 12px;
  --r-sm: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
a { color: var(--text); }
h1 { margin: 0; font-size: 1.25rem; letter-spacing: .01em; }
h2 { margin: 0; font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h3 { margin: 0 0 2px; font-size: .9rem; color: var(--text); font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small-text { font-size: .85rem; }
.note { color: var(--muted); font-size: .82rem; }
.hint { min-height: 0; color: #ffcf8a; font-size: .85rem; }
.hint:empty { display: none; }
[hidden], .tab[hidden] { display: none !important; }
kbd { font: 600 .68rem/1 var(--mono); color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; padding: 3px 4px; margin-left: 8px; vertical-align: 1px; }

/* ---------------------------------------------------------------- buttons and fields */
button { font: inherit; font-weight: 600; border: 0; border-radius: var(--r-sm); padding: 10px 16px; min-height: 42px; cursor: pointer; color: #fff; background: var(--raised); transition: background .15s ease-out, box-shadow .15s ease-out, color .15s ease-out; }
button:hover { background: var(--raised-hover); }
button:disabled { opacity: .45; cursor: default; }
button:disabled:hover { background: var(--raised); }
button.small { padding: 7px 12px; min-height: 36px; font-weight: 500; font-size: .88rem; }
button.small[aria-pressed="true"] { background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange); color: #fff; }
.go { background: var(--orange); padding: 10px 26px; font-size: 1rem; }
.go:hover { background: var(--orange-hover); }
.go[data-working] { background: #8a3607; }
.stop { background: transparent; box-shadow: inset 0 0 0 1px var(--red); color: #ffb3b5; }
.stop:hover { background: var(--red); color: #fff; }
.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-weight: 500; }
.ghost:hover { background: var(--panel2); color: var(--text); }
.btn { display: inline-block; font-weight: 500; border-radius: var(--r-sm); padding: 8px 12px; background: var(--raised); cursor: pointer; font-size: .88rem; }
.btn:hover { background: var(--raised-hover); }
.lnk { background: none; border: 0; color: var(--muted); padding: 2px 4px; min-height: 0; font-weight: 500; text-decoration: underline; font-size: inherit; }
.lnk:hover { background: none; color: var(--text); }

label { display: grid; gap: 5px; color: var(--muted); font-size: .84rem; }
label.check { grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: var(--text); font-size: .9rem; }
label.inline { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .9rem; }
label.inline select { width: auto; min-height: 34px; padding: 4px 8px; }
select, input:not([type]), input[type="text"], input[type="number"], input[type="password"], input[type="search"] { font: inherit; color: var(--text); background: var(--well); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; min-height: 40px; width: 100%; }
select:hover, input[type="text"]:hover, input[type="search"]:hover { border-color: #3a3a41; }
input.num { width: 72px; display: inline-block; min-height: 34px; padding: 4px 8px; }
input[type="range"] { width: 100%; accent-color: var(--orange); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); margin: 0; }
.range-out { display: flex; align-items: center; gap: 10px; }
.range-out span { min-width: 4.5em; font-size: .82rem; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.two > label { flex: 1 1 140px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; align-content: start; }
legend { color: var(--text); font-size: .9rem; font-weight: 600; padding: 0 6px; }
.swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); display: inline-block; background: #0b0 }
.help { color: var(--muted); font-size: .84rem; }
.help summary { cursor: pointer; color: var(--text); }
.help p { margin: 8px 0 0; }

/* ---------------------------------------------------------------- frame */
.booth { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; }
.top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { border-radius: 7px; flex: none; }
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; line-height: 1.2; }
.brand-name span { color: var(--orange-hover); font-weight: 600; }
.top .sub { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.adminlink { color: var(--muted); font-size: .8rem; margin-left: 6px; }

.sched { flex: 1; display: flex; gap: 22px; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.sched .slot-item { min-width: 0; }
.sched .k { display: block; font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sched .v { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched .v b { font-weight: 600; }
.sched .v span { color: var(--muted); }
.sched.locked .v { color: #ffcf8a; }
.sched .mine .v b { color: var(--orange-hover); }

.state { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 650; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.state .onair { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #fff; font-weight: 600; }
[data-state="connecting"] .state, [data-state="reconnecting"] .state { color: #ffd88a; box-shadow: inset 0 0 0 1px rgba(230,164,23,.45); background: var(--amber-soft); }
[data-state="connecting"] .state .dot, [data-state="reconnecting"] .state .dot { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
[data-state="live"] .state { background: var(--red); color: #fff; box-shadow: 0 0 0 1px var(--red), 0 0 18px rgba(224,38,45,.35); }
[data-state="live"] .state .dot { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
[data-state="waiting"] .state { color: #b7f0cb; background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(63,174,106,.5); }
[data-state="waiting"] .state .dot { background: var(--ok); }
@keyframes pulse { 50% { opacity: .35; } }

.transport { display: flex; align-items: center; gap: 10px; }
.transport form { margin: 0; }

.status { min-height: 1.4em; }
.status.bad { color: #ff8a8a; }
.status.good { color: #8fe0ad; }
.booth > .status { padding: 9px 18px; font-size: .9rem; border-bottom: 1px solid var(--line-soft); background: var(--bg); color: var(--muted); min-height: 38px; }
.booth > .status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-right: 10px; vertical-align: 2px; }
.booth > .status.bad { color: #ffb0b0; background: rgba(224,38,45,.09); }
.booth > .status.bad::before { background: var(--red); }
.booth > .status.good { color: #a8e9c0; background: rgba(63,174,106,.08); }
.booth > .status.good::before { background: var(--ok); }

.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; width: 100%; max-width: 1920px; margin: 0 auto; align-items: start; }
.work { display: grid; gap: 16px; min-width: 0; }

/* ---------------------------------------------------------------- program monitor and vision mixer */
.vision { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.screen { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .3s ease-out; width: 100%; }
.screen canvas { width: 100%; height: 100%; display: block; }
.screen.picking { cursor: crosshair; }
.tag { position: absolute; left: 12px; top: 12px; font: 700 .7rem/1 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 5px; background: rgba(14,14,16,.78); color: var(--muted); backdrop-filter: blur(4px); }
[data-state="live"] .screen { box-shadow: 0 0 0 2px var(--red); }
[data-state="live"] .tag { background: var(--red); color: #fff; }
.screen-note { position: absolute; left: 12px; bottom: 12px; right: 12px; width: fit-content; background: rgba(14,14,16,.8); padding: 6px 10px; border-radius: 6px; font-size: .82rem; color: var(--muted); backdrop-filter: blur(4px); }

.switcher { display: grid; gap: 14px; align-content: start; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sw-group { display: grid; gap: 8px; align-content: start; }
.sw-label { font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sw-takes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sw-takes button { min-height: 52px; padding: 8px 6px; display: flex; align-items: center; justify-content: center; }
button.src[aria-pressed="true"] { background: var(--orange); box-shadow: none; }
button.src[aria-pressed="true"] kbd { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(0,0,0,.15); }
button.src.preview { box-shadow: inset 0 0 0 2px var(--ok); }
.sw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sw-scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sw-scenes button { padding: 7px 8px; }

/* ---------------------------------------------------------------- work panel and tabs */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: transparent; border-radius: 0; color: var(--muted); font-weight: 500; padding: 13px 14px; min-height: 46px; font-size: .9rem; white-space: nowrap; }
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); }
.tab { padding: 18px; display: grid; gap: 16px; align-content: start; }
.lede { color: var(--muted); font-size: .88rem; max-width: 75ch; }
.cols { display: grid; gap: 18px 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.col { display: grid; gap: 12px; align-content: start; min-width: 0; }

/* ---------------------------------------------------------------- right rail */
.rail { display: grid; gap: 12px; align-content: start; align-items: start; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; display: grid; gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.badge { font-size: .7rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; background: var(--panel2); color: var(--muted); }

/* now playing */
.np { grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; }
.np > .card-head, .np > .dk-lib, .np > .deck-log { grid-column: 1 / -1; }
.np-art { grid-row: span 2; width: 56px; height: 56px; border-radius: 10px; background: var(--panel2); display: grid; place-items: center; align-self: start; }
.np .dk-title { align-self: end; font-size: 1.12rem; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.np .dk-artist { color: var(--muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -8px; }
.np[data-src="none"] .dk-title { font-size: 1rem; color: var(--muted); font-weight: 500; }
.np[data-src="none"] .dk-artist { white-space: normal; font-size: .84rem; color: var(--faint); }
.np[data-src="lib"] .badge { background: var(--orange-soft); color: #ffb48a; }
.np[data-src="deck"] .badge { background: var(--ok-soft); color: #a8e9c0; }
.np[data-src="ready"] .badge { background: var(--panel2); color: var(--text); }
.eq { display: flex; align-items: end; gap: 3px; height: 20px; }
.eq i { width: 4px; height: 6px; border-radius: 2px; background: var(--faint); }
.np.playing .eq i { background: var(--orange-hover); animation: eq 1.1s ease-in-out infinite; }
.np.playing .eq i:nth-child(2) { animation-delay: -.4s; animation-duration: .9s; }
.np.playing .eq i:nth-child(3) { animation-delay: -.7s; animation-duration: 1.3s; }
.np.playing .eq i:nth-child(4) { animation-delay: -.2s; animation-duration: 1s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }
.dk-lib { display: grid; gap: 8px; }
.np:not([data-src="lib"]) .dk-prog, .np:not([data-src="lib"]) .dk-times { display: none; }
.dk-prog { height: 6px; background: var(--well); border-radius: 3px; overflow: hidden; cursor: pointer; }
.dk-prog i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 3px; }
.dk-times { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--muted); margin-top: -2px; }
.dk-time { font-weight: 600; color: var(--text); }
.dk-time.soon { color: #ffcf8a; }
.dk-ctl { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; }
.dk-ctl .play { background: var(--orange); }
.dk-ctl .play:hover { background: var(--orange-hover); }
.dk-ctl .play:disabled { background: var(--raised); }
.dk-ctl .play kbd { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(0,0,0,.15); }
.upnext { display: grid; gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.upnext:empty { display: none; }
.upnext .k { font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; display: flex; justify-content: space-between; }
.upnext .k button { font-size: .75rem; text-transform: none; letter-spacing: 0; }
.upnext .u { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; font-size: .84rem; padding: 3px 0; }
.upnext .u span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext .u em { font-style: normal; color: var(--muted); }
.upnext .u .len { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.deck-log { display: grid; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 12px; margin: 0; }
.deck-log label { font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.deck-log input { flex: 1 1 160px; width: auto; }
.np[data-src="lib"] .deck-log .note, .np[data-src="ready"] .deck-log .note { display: none; }

/* mic and meters */
.mic { background: var(--raised); min-height: 50px; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 4px; }
.mic::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 8px; }
.mic[aria-pressed="true"] { background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber); color: #ffd88a; }
.mic[aria-pressed="true"]::before { background: var(--amber); }
.talk { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; color: var(--faint); background: var(--panel2); transition: background .1s, color .1s, box-shadow .1s; }
.talk.on { background: var(--red); color: #fff; box-shadow: 0 0 12px rgba(224,38,45,.5); }
.meters { display: grid; gap: 7px; }
.meter { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
.bar-bg { position: relative; height: 10px; background: var(--well); border-radius: 3px; overflow: hidden; }
.bar-bg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 4px, var(--panel) 4px 5px); pointer-events: none; }
.bar-fg { height: 100%; width: 100%; background: linear-gradient(90deg, var(--ok) 0 70%, var(--amber) 70% 90%, var(--red) 90%); clip-path: inset(0 calc(100% - var(--w, 0%)) 0 0); }
.scale { display: grid; grid-template-columns: 44px repeat(5, 1fr); gap: 0 8px; font: .62rem/1 var(--mono); color: var(--faint); margin-top: -2px; }
.scale span:not(:first-child) { text-align: right; }

/* jingles */
.carts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.cart { position: relative; text-align: left; padding: 8px 10px; min-height: 50px; font-size: .84rem; font-weight: 500; display: grid; gap: 1px; overflow: hidden; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
.cart span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart small { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.cart.playing { background: var(--orange); box-shadow: none; }
.cart.playing small { color: #fff; }
.cart.playing::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: #fff; }

/* link */
.stats { margin: 0; display: grid; gap: 6px; }
.stats > div { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: 10px; font-size: .86rem; }
.stats dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stats dt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.stats [data-good] dt::before { background: var(--ok); }
.stats [data-bad] dt::before { background: var(--red); }
.stats [data-bad] dd { color: #ffb0b0; }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- playlist and library */
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.opts { justify-content: space-between; }
.pl, .lib { display: grid; gap: 1px; align-content: start; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; background: var(--well); }
.pl { min-height: 120px; }
.pl.drop-here, .pl .drop-before { box-shadow: inset 0 2px 0 var(--orange); }
.pl .drop-after { box-shadow: inset 0 -2px 0 var(--orange); }
.song { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: .86rem; user-select: none; min-height: 40px; }
.song:hover { background: var(--panel2); }
.song.dragging { opacity: .5; }
.song.next { background: rgba(63,174,106,.07); box-shadow: inset 3px 0 0 var(--ok); }
.song.pending { opacity: .6; }
.song .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .t span { color: var(--muted); }
.song .len { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.song .acts { display: flex; gap: 4px; }
.song .acts button { min-height: 30px; min-width: 32px; padding: 4px 8px; font-size: .85rem; border-radius: 6px; background: var(--panel2); }
.song .acts button:hover { background: var(--raised-hover); }
.song .acts button[aria-pressed="true"] { background: var(--orange); }
.song.dir { cursor: pointer; color: var(--text); }
.song.dir .t::before { content: "▸ "; color: var(--muted); }
.pl .song { cursor: grab; }
.pl .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .75rem; margin-right: 6px; }
.lib-find select { flex: 0 1 190px; width: auto; }
.lib-find input { flex: 1 1 180px; width: auto; }
.empty { color: var(--muted); font-size: .85rem; padding: 12px; line-height: 1.5; }

/* ---------------------------------------------------------------- uploads, phone */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.item { background: var(--panel2); border-radius: var(--r-sm); overflow: hidden; display: grid; gap: 6px; padding-bottom: 8px; font-size: .8rem; }
.item .thumb { aspect-ratio: 16 / 9; background: var(--well); display: grid; place-items: center; overflow: hidden; }
.item .thumb img, .item .thumb video { width: 100%; height: 100%; object-fit: contain; }
.item .name { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .acts { display: flex; gap: 4px; padding: 0 8px; flex-wrap: wrap; }
.item .acts button { min-height: 28px; padding: 4px 8px; font-size: .75rem; border-radius: 6px; }
.item .acts select { min-height: 28px; padding: 2px 6px; font-size: .75rem; width: auto; }
.item.shown { box-shadow: inset 0 0 0 2px var(--orange); }
.phone-pane { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.phone-pane .phone-preview { grid-column: 1 / -1; max-width: 480px; }
.code { font: 700 1.6rem/1 var(--mono); letter-spacing: .15em; }
.phone-preview { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-sm); object-fit: cover; }
#qr { background: #fff; padding: 8px; border-radius: var(--r-sm); width: 200px; height: 200px; image-rendering: pixelated; }

/* ---------------------------------------------------------------- admin page */
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 20px; }
.admin section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.admin h2 { margin: 0; font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.admin table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin td, .admin th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin th { color: var(--muted); font-weight: 500; border: 0; }
.admin .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.admin .link { font: .85rem var(--mono); word-break: break-all; background: var(--well); padding: 8px 10px; border-radius: 6px; }
.admin .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.admin .thumbs .item { padding-bottom: 6px; }
.slot { color: var(--muted); font-size: .9rem; flex: 1; }

/* ---------------------------------------------------------------- sign in and invite pages */
body.plain { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.card h1 { margin: 0 0 6px; font-size: 1.4rem; }
body.plain .card { width: 100%; max-width: 420px; padding: 28px 24px; display: block; }
.card .sub { margin: 0 0 18px; color: var(--muted); }
.form { display: grid; gap: 12px; }
.form button { margin-top: 4px; }
.foot { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- layouts */
@media (min-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) 360px; }
  .rail { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: thin; }
}
@media (min-width: 1200px) {
  /* camera buttons sit beside the picture, like a vision mixer */
  .vision { grid-template-columns: minmax(0, 1fr) 236px; align-items: start; }
  .sw-row button, .sw-scenes button { padding: 7px 6px; font-size: .84rem; }
  .switcher { grid-template-columns: 1fr; }
  .sw-takes { grid-template-columns: 1fr 1fr; }
  .sw-takes button { min-height: 56px; }
  .sw-scenes { grid-template-columns: 1fr 1fr; }
  /* keep the picture short enough that the tabs show below it */
  .screen { width: min(100%, calc((100vh - 330px) * 16 / 9)); justify-self: end; }
}
@media (max-width: 1359px) {
  .sw-row kbd, .sw-scenes kbd { display: none; }
}
@media (min-width: 1360px) {
  .stage { grid-template-columns: minmax(0, 1fr) 380px; }
  .vision { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (min-width: 1700px) {
  .vision { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1099px) {
  /* one column: picture, then the on-air cards, then the tabs */
  .work { display: contents; }
  .vision { order: 1; }
  .rail { order: 2; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .panel { order: 3; }
}
@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 10px 14px; }
  .sched { order: 5; flex-basis: 100%; border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 8px; }
  .transport { margin-left: auto; }
}
@media (max-width: 600px) {
  .stage { padding: 10px; gap: 10px; }
  .top { padding: 10px 12px; }
  .brand > div { display: none; }
  .state { padding: 6px 10px; }
  .signout { display: none; }
  .go { padding: 10px 16px; }
  .sched { gap: 14px; }
  .sw-scenes { grid-template-columns: 1fr 1fr; }
  kbd { display: none; }
  .tab { padding: 14px; }
  .phone-pane { grid-template-columns: 1fr; }
  .booth > .status { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  button, .bar-fg, .talk, .screen { transition: none; }
  .np.playing .eq i, .state .dot { animation: none; }
  .np.playing .eq i { height: 14px; }
}
