/* ShowComms — shared tokens and components.
   OLED: true black (no light backstage, saves battery), white text,
   and colour only where it means something: channels and cue lights. */
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap;
  src: url(/fonts/dm-sans/files/dm-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap;
  src: url(/fonts/dm-sans/files/dm-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap;
  src: url(/fonts/dm-sans/files/dm-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap;
  src: url(/fonts/dm-sans/files/dm-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap;
  src: url(/fonts/dm-mono/files/dm-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap;
  src: url(/fonts/dm-mono/files/dm-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --velour: #000000;   /* page: true black */
  --flat: #101010;     /* raised surfaces */
  --flat-2: #1a1a1a;   /* controls */
  --seam: #262626;     /* borders */
  --seam-2: #363636;   /* control borders */
  --chalk: #f7f7f7;    /* text */
  --dust: #9a9a9a;     /* secondary text */
  --go: #34d399;       /* connected / go */
  --standby: #fbbf24;  /* cue / attention */
  --alert: #fb7185;    /* call / problem */
  --radius-s: 10px; --radius-m: 16px; --radius-l: 22px;
  --ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", monospace;
  --label: var(--ui);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--velour); color: var(--chalk); font: 16px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
a { color: var(--chalk); }
.mono, time { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Channel label: a colour dot and the name. --c is the channel colour. */
.tape {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
}
.tape::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #888); flex: none; }
.tape.small { font-size: 12px; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px;
  color: color-mix(in srgb, var(--c, #888) 70%, white); background: color-mix(in srgb, var(--c, #888) 16%, transparent); }
.tape.small::before { width: 7px; height: 7px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: var(--radius-s);
  background: var(--flat); border: 1px solid var(--seam-2); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: #4a4a4a; }
.btn.primary { background: var(--chalk); border-color: var(--chalk); color: #000; }
.btn.warn { color: var(--standby); }
.btn.danger { color: var(--alert); }
.btn.quiet { background: none; border-color: transparent; color: var(--dust); }
.btn.quiet:hover { color: var(--chalk); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: var(--flat-2); border: 1px solid var(--seam-2);
  position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--dust); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--go); border-color: var(--go); }
.switch input:checked + .track::after { transform: translateX(18px); background: #000; }
.switch input:focus-visible + .track { outline: 2px solid var(--chalk); outline-offset: 2px; }

input[type=range] { accent-color: var(--c, var(--chalk)); width: 100%; }
.field { background: var(--flat); border: 1px solid var(--seam-2); border-radius: var(--radius-s); padding: 8px 10px; min-width: 0; }
.field::placeholder { color: #6b6b6b; }
select.field { padding-right: 28px; }

.cue-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a4a4a; flex: none; display: inline-block; }
.cue-dot.go { background: var(--go); }
.cue-dot.standby { background: var(--standby); }
.cue-dot.alert { background: var(--alert); }

/* sheets (bottom on phones, centered on wide screens) */
dialog.sheet { border: 1px solid var(--seam); padding: 0; background: var(--flat); color: var(--chalk); width: min(560px, 100%); max-height: 88dvh;
  border-radius: var(--radius-l) var(--radius-l) 0 0; margin: auto auto 0; }
dialog.sheet::backdrop { background: #000c; }
@media (min-width: 700px) { dialog.sheet { border-radius: var(--radius-l); margin: auto; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; position: sticky; top: 0; background: var(--flat); }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.sheet-body { padding: 4px 20px 24px; }

.meter { height: 6px; border-radius: 3px; background: var(--flat-2); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--go) 70%, var(--standby) 90%, var(--alert)); transition: width 60ms linear; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
