/* Housewarming — a stage running order, seen in a tungsten-lit room.
   One signal colour (cue amber), monospace for anything countable, and a heat
   bar per row so the running order can be read from across the room. */

:root {
  --room: #14100e;
  --riser: #1e1815;
  --riser-2: #272019;
  --rule: #3a2e27;
  --paper: #f5ede3;
  --muted: #a5917e;
  --cue: #ff8a2b;
  --cue-dim: #7a4415;
  --cold: #7fa6c4;
  --alert: #e4576b;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;

  --gap: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* Class-based display rules outrank the UA stylesheet, so [hidden] needs help. */
[hidden] { display: none !important; }

body {
  background: var(--room);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: var(--cue); }

:focus-visible {
  outline: 2px solid var(--cue);
  outline-offset: 2px;
}

/* --- shared vocabulary -------------------------------------------------- */

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.dotted {
  border: 0;
  border-top: 1px dotted var(--rule);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--rule);
  background: var(--riser);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--riser-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.4; cursor: default; }

.btn-cue {
  background: var(--cue);
  border-color: var(--cue);
  color: #1a0d02;
}
.btn-cue:hover { background: #ffa051; }

.btn-danger { border-color: #5c2733; color: #ffb9c4; }

/* The one glowing thing in the room: how hot a track is with the crowd. */
.heat {
  position: relative;
  width: 4px;
  align-self: stretch;
  min-height: 28px;
  background: var(--rule);
  flex: 0 0 4px;
}
.heat::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: calc(var(--fill, 0) * 100%);
  background: var(--cue);
  box-shadow: 0 0 10px rgb(255 138 43 / calc(0.15 + var(--fill, 0) * 0.55));
  transition: height 260ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.heat.cold::after { background: var(--cold); box-shadow: none; }

.warnings { display: grid; gap: 6px; }
.warn {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--alert);
  background: rgb(228 87 107 / 0.08);
  font-size: 14px;
  line-height: 1.45;
}
.warn.info { border-left-color: var(--cue); background: rgb(255 138 43 / 0.08); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  transform: translateX(-50%) translateY(8px);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 480px);
  padding: 12px 16px;
  background: var(--riser-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--cue);
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { border-left-color: var(--alert); }

.hint { font-size: 13px; color: var(--muted); line-height: 1.45; }

.empty {
  padding: 28px 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.cover {
  display: block;
  background: var(--riser-2);
  object-fit: cover;
  aspect-ratio: 1;
}

/* =========================================================================
   HOST — a tablet across the room, glanced at from two metres.
   ========================================================================= */

.host {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
  overflow: hidden;
  font-size: 18px;
}

.host.handoff-page { display: block; height: auto; overflow: visible; }

.handoff {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 32px;
  padding: 32px 24px;
  border-bottom: 1px dotted var(--rule);
}
.handoff-lead { display: grid; gap: 14px; align-content: start; }
.handoff-lead h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.handoff-lead .lede { color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 48ch; }
.handoff-lead .btn.big { min-height: 64px; font-size: 19px; justify-self: start; padding: 0 28px; }

.join-panel {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px;
  background: var(--riser);
  border: 1px solid var(--rule);
}
.join-panel .qr { width: 150px; flex: 0 0 150px; background: #f6f2ff; padding: 8px; }
.join-panel .qr svg { display: block; width: 100%; height: auto; }
.join-panel .url { font-family: var(--mono); font-size: 14px; word-break: break-all; line-height: 1.5; }

.manage { padding: 20px 24px 48px; }
.manage .order-list { overflow: visible; padding: 0; max-height: none; }
.order-row.playing-row { border-bottom: 1px solid var(--rule); }
.order-row.playing-row .pos { color: var(--cue); width: auto; }

@media (max-width: 860px) {
  .handoff { grid-template-columns: 1fr; gap: 24px; }
}

.host-bar {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 12px 20px;
  border-bottom: 1px dotted var(--rule);
}
.host-bar h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.host-bar .spacer { flex: 1; }
.host-bar .btn { min-height: 44px; padding: 0 14px; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  min-height: 0;
}

.deck {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
  padding: 24px;
  min-height: 0;
  border-right: 1px dotted var(--rule);
}

.deck-art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.deck-art img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.deck-art .placeholder {
  display: grid;
  place-items: center;
  width: min(100%, 46vh);
  aspect-ratio: 1;
  background: var(--riser);
  border: 1px dotted var(--rule);
  color: var(--muted);
}

/* Present, playing, and out of the way. Never display:none — some browsers
   stop playback when the iframe is removed from the layout. */
.player-mount {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 168px;
  aspect-ratio: 16 / 9;
  opacity: 0.14;
  filter: saturate(0.4);
  pointer-events: none;
  transition: opacity 200ms ease;
}
.player-mount iframe { width: 100%; height: 100%; border: 0; }
.host.show-video .player-mount {
  opacity: 1;
  filter: none;
  pointer-events: auto;
  width: min(72%, 760px);
  bottom: 24px;
  right: 24px;
}

.now-meta { display: grid; gap: 10px; padding-right: 200px; }
.now-title {
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.now-artist {
  font-size: clamp(17px, 1.6vw, 24px);
  color: var(--muted);
  font-weight: 600;
}
.now-added { font-size: 13px; }
.now-added.flag { color: var(--cue); }

.activity { display: grid; max-height: 58dvh; overflow-y: auto; }
.act-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 14px;
  line-height: 1.45;
}
.act-row .at { flex: none; font-size: 11px; color: var(--muted); }
.act-row .k {
  flex: none;
  min-width: 8ch;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.act-row .k-fallback, .act-row .k-quota { color: var(--cue); }
.act-row .msg { min-width: 0; }
.act-row.bad .msg { color: #ffb9c4; }

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.progress-track {
  position: relative;
  flex: 1;
  height: 3px;
  background: var(--rule);
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--played, 0) * 100%);
  background: var(--cue);
}
.playing .progress-fill { animation: cue-pulse 2.4s ease-in-out infinite; }
@keyframes cue-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.order {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}
.order-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 20px 12px;
}
.order-list {
  overflow-y: auto;
  padding: 0 20px 12px;
  min-height: 0;
}
.order-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dotted var(--rule);
  animation: row-in 160ms ease both;
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(3px); }
}
.order-row .pos {
  width: 2.2ch;
  font-size: 15px;
  color: var(--muted);
  padding-top: 2px;
}
.order-row .body { flex: 1; min-width: 0; display: grid; gap: 3px; align-content: start; }
.order-row .t {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-row .a { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row .meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.order-row .score { font-size: 20px; font-weight: 700; align-self: center; min-width: 3ch; text-align: right; }
.order-row .kill {
  align-self: center;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 20px;
}
.order-row .kill:hover { color: var(--alert); }
.order-row.unresolved .t { color: var(--muted); }

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  color: var(--muted);
}
.badge.bad { border-color: #5c2733; color: #ffb9c4; }
.badge.cue { border-color: var(--cue-dim); color: var(--cue); }

.join {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px dotted var(--rule);
  background: var(--riser);
}
.join .qr { width: 108px; height: 108px; flex: 0 0 108px; background: #f6f2ff; padding: 6px; }
.join .qr svg { display: block; width: 100%; height: 100%; }
.join .url { font-family: var(--mono); font-size: 15px; word-break: break-all; line-height: 1.4; }

.blocker {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgb(20 16 14 / 0.94);
  text-align: center;
}
.blocker.show { display: grid; }
.blocker .inner { display: grid; gap: 18px; justify-items: center; max-width: 520px; }
.blocker h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.blocker p { color: var(--muted); font-size: 17px; line-height: 1.5; }
.blocker .btn { min-height: 68px; padding: 0 40px; font-size: 22px; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  background: rgb(20 16 14 / 0.7);
}
.sheet.show { display: grid; place-items: center; padding: 20px; }
.sheet-panel {
  width: min(560px, 100%);
  max-height: 86dvh;
  overflow-y: auto;
  background: var(--riser);
  border: 1px solid var(--rule);
  padding: 22px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 6px; }
.field input[type="number"],
.field input[type="text"],
.field select {
  min-height: 48px;
  padding: 0 12px;
  background: var(--room);
  border: 1px solid var(--rule);
}
.field.row { grid-template-columns: 1fr auto; align-items: center; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.switch input { width: 22px; height: 22px; accent-color: var(--cue); }

/* =========================================================================
   GUEST — one hand, at a party, possibly after a drink.
   ========================================================================= */

.guest {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
  font-size: 17px;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.g-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--room);
  border-bottom: 1px dotted var(--rule);
  padding: 12px 16px 10px;
  display: grid;
  gap: 10px;
}
.g-head .top { display: flex; align-items: center; gap: 12px; }
.g-head h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-allowance { white-space: nowrap; font-size: 12px; }

.g-invite {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.invite-panel { justify-items: center; text-align: center; }
.invite-panel h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.invite-panel .qr { width: min(74vw, 300px); background: #f6f2ff; padding: 10px; }
.invite-panel .qr svg { display: block; width: 100%; height: auto; }
.invite-panel .url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}
.invite-panel .btn { width: 100%; }

.g-now {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0 2px;
}
.g-now .cover { width: 52px; height: 52px; flex: 0 0 52px; }
.g-now .body { min-width: 0; flex: 1; display: grid; gap: 2px; }
.g-now .t { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-now .a { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-now .skip { flex: 0 0 auto; }
.g-now.paused .cover { opacity: 0.45; }
.g-now.paused .a { color: var(--cue); }

.g-body { padding: 4px 16px 24px; }

.q-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule);
}
.q-row .pos { width: 2.2ch; font-size: 13px; color: var(--muted); padding-top: 3px; }
.q-row .body { flex: 1; min-width: 0; display: grid; gap: 3px; align-content: start; }
.q-row .t { font-weight: 650; font-size: 16px; line-height: 1.25; }
.q-row .a { color: var(--muted); font-size: 14px; }
.q-row .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.q-row .votes { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.vote-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.vote-btn.on.up { color: var(--cue); border-color: var(--cue-dim); }
.vote-btn.on.down { color: var(--cold); border-color: #2f4757; }
.q-row .score { min-width: 2.5ch; text-align: center; font-size: 17px; font-weight: 700; }

.result {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule);
  width: 100%;
  text-align: left;
}
.result .cover { width: 56px; height: 56px; flex: 0 0 56px; }
.result .body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.result .t { font-weight: 650; font-size: 16px; line-height: 1.25; }
.result .a { color: var(--muted); font-size: 14px; }
.result .meta {
  display: flex;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result .meta span { overflow: hidden; text-overflow: ellipsis; }
.result .meta .num { flex: none; }
.result .preview {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--muted);
}
.result .preview.playing { color: var(--cue); border-color: var(--cue-dim); }
.result .add { flex: 0 0 auto; min-height: 46px; padding: 0 16px; }

.g-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--room);
  border-top: 1px dotted var(--rule);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 10px;
}
.g-search { display: none; }
.g-dock.searching .g-search { display: flex; gap: 8px; }
.g-search input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  background: var(--riser);
  border: 1px solid var(--rule);
  font-size: 17px;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.tab {
  min-height: 52px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tab[aria-selected="true"] { background: var(--riser-2); color: var(--paper); }

.nick {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--room);
}
.nick form { display: grid; gap: 16px; width: min(420px, 100%); }
.nick h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.nick p { color: var(--muted); line-height: 1.5; }
.nick input {
  min-height: 58px;
  padding: 0 14px;
  background: var(--riser);
  border: 1px solid var(--rule);
  font-size: 19px;
}
.nick .btn { min-height: 58px; }

/* =========================================================================
   LANDING
   ========================================================================= */

.landing { max-width: 760px; margin: 0 auto; padding: 48px 20px 96px; font-size: 17px; }
.landing header { display: grid; gap: 20px; padding-bottom: 40px; }
.landing h1 {
  font-size: clamp(38px, 8vw, 66px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
}
.landing .lede { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.45; color: var(--muted); max-width: 34ch; }
.landing form { display: grid; gap: 10px; grid-template-columns: 1fr auto; padding: 20px 0 8px; }
.landing form input {
  min-height: 58px;
  padding: 0 16px;
  background: var(--riser);
  border: 1px solid var(--rule);
  font-size: 18px;
}
.landing form .btn { min-height: 58px; }
.landing section { padding: 36px 0 0; display: grid; gap: 14px; }
.landing h2 { font-size: 15px; }
.landing ol.steps { display: grid; gap: 14px; }
.landing ol.steps li { display: flex; gap: 14px; align-items: baseline; line-height: 1.5; }
.landing ol.steps .n { color: var(--cue); font-size: 13px; }
.landing dl { display: grid; gap: 10px; }
.landing dt { font-weight: 650; }
.landing dd { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.landing footer { padding-top: 40px; color: var(--muted); font-size: 14px; }

/* A laptop can read this page but cannot host from it, so the reason why comes
   before anything it might otherwise try to do. */
.landing .warn-note {
  border-left: 3px solid var(--cue);
  background: rgb(255 138 43 / 0.08);
  padding: 14px 16px;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
/* `.landing section` sets `display: grid` and outranks `.join-panel`, so the
   side-by-side layout has to be restated at this specificity. */
.landing .join-panel {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 4px;
  padding: 20px;
}
.landing .join-panel > div { display: grid; gap: 10px; }
.landing .handoff-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.landing .start-here { border-top: 1px solid var(--rule); padding-top: 14px; }
.landing .start-here summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}
.landing .start-here summary::before { content: '+ '; color: var(--cue); }
.landing .start-here[open] summary::before { content: '\2212 '; }
.landing .start-here form { padding-top: 12px; }

@media (max-width: 560px) {
  .landing .join-panel { flex-direction: column; }
  .landing .join-panel .qr { width: min(70vw, 220px); flex: none; }
}

.created { display: grid; gap: 18px; padding: 24px 0; }
.created .panel { background: var(--riser); border: 1px solid var(--rule); padding: 20px; display: grid; gap: 14px; }
.created .qr { width: 190px; background: #f6f2ff; padding: 8px; }
.created .qr svg { display: block; width: 100%; height: auto; }
.created .link { font-family: var(--mono); font-size: 14px; word-break: break-all; line-height: 1.5; }

.soundcheck textarea {
  width: 100%;
  min-height: 240px;
  padding: 14px;
  background: var(--riser);
  border: 1px solid var(--rule);
  color: inherit;
  font: 14px/1.7 var(--mono);
  resize: vertical;
}
.sc-actions { display: flex; align-items: center; gap: 14px; margin: 14px 0 10px; }
.sc-actions .btn { min-height: 54px; }

.sc-results { display: grid; margin: 8px 0 0; }
.sc-row {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule);
}
.sc-row .body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sc-row .t { font-weight: 650; font-size: 16px; }
.sc-row .meta { font-size: 13px; color: var(--muted); }
.sc-row.bad .t { color: #ffb9c4; }
.sc-state {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sc-state.plays { color: #a8e3b4; }
.sc-state.blocked, .sc-state.no-match, .sc-state.not-found { color: #f5a3b5; }

.sc-row.wide { flex-wrap: wrap; }
.sc-candidates { display: grid; gap: 0; width: 100%; margin: 8px 0 2px; padding-left: 2px; }
.sc-cand {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 5.5rem 3rem 5rem;
  gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dotted var(--rule);
}
.sc-cand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-cand .ch { color: var(--paper); }
.sc-cand .tag { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.sc-cand .sc, .sc-cand .res { text-align: right; }
.sc-cand.plays .res { color: #a8e3b4; }
.sc-cand.refused .res, .sc-cand.error .res { color: #f5a3b5; }
.sc-cand.not-tried { opacity: .45; }

@media (max-width: 620px) {
  .sc-cand { grid-template-columns: minmax(0, 1fr) 4rem 4rem; }
  .sc-cand .ttl, .sc-cand .sc { display: none; }
}

.plspike .sc-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.plspike .sc-actions input {
  min-height: 54px;
  padding: 0 14px;
  background: var(--riser);
  border: 1px solid var(--rule);
  color: inherit;
  font: 14px/1.4 var(--mono);
}
.pl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 18px 0; }
.pl-list { display: grid; gap: 0; font-size: 13px; }
.pl-list li {
  padding: 7px 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-list li.now { color: var(--cue); }
.pl-list li.missing { color: #ffb9c4; }
#verdict-box { margin: 16px 0; }
#player-wrap { width: min(100%, 420px); aspect-ratio: 16/9; margin: 16px 0; }
#player-wrap iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 620px) {
  .pl-cols { grid-template-columns: 1fr; gap: 16px; }
}

.pl-real { margin: 20px 0; padding: 16px; background: var(--riser); border: 1px solid var(--rule); display: grid; gap: 10px; justify-items: start; }

.sc-headline { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
#summary { padding: 24px 0 8px; border-top: 1px dotted var(--rule); margin-top: 28px; display: grid; gap: 8px; }

/* Present and playable, but this is a diagnostic, not a video wall. */
#player-mount { position: fixed; right: 12px; bottom: 12px; width: 200px; aspect-ratio: 16/9; opacity: 0.2; }
#player-mount iframe { width: 100%; height: 100%; border: 0; }

.admin { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; font-size: 15px; }
.admin header { display: grid; gap: 10px; padding-bottom: 24px; }
.admin h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; }
.admin .lede { color: var(--muted); line-height: 1.5; max-width: 60ch; }
.admin .stats { display: flex; gap: 32px; padding: 18px 0 28px; border-top: 1px dotted var(--rule); border-bottom: 1px dotted var(--rule); margin-bottom: 24px; }
.admin .stats > div { display: grid; gap: 4px; }
.admin .big { font-size: 26px; font-weight: 700; }
.admin .dim { color: var(--muted); font-size: 12px; }
.admin table { width: 100%; border-collapse: collapse; }
.admin th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 10px 0;
  font-weight: 500;
}
.admin td { padding: 12px 10px 12px 0; border-top: 1px dotted var(--rule); vertical-align: top; font-size: 14px; }
.admin tr.closed { opacity: 0.45; }
.admin .pname { font-weight: 650; display: block; }
.admin .pid { font-size: 11px; color: var(--muted); }
.admin .links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin .links form { display: inline; }
.admin .prune { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.admin .prune .hint { max-width: 52ch; }
.admin .links .btn { min-height: 34px; padding: 0 10px; font-size: 12px; font-weight: 500; }

.gone { display: grid; place-items: center; min-height: 100dvh; padding: 24px; text-align: center; }
.gone .inner { display: grid; gap: 14px; max-width: 440px; }
.gone h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.gone p { color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .deck { border-right: 0; border-bottom: 1px dotted var(--rule); }
}

@media (max-width: 380px) {
  .guest { font-size: 16px; }
  .g-body { padding-left: 12px; padding-right: 12px; }
  .g-dock { padding-left: 12px; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
