/* Co-Op Operator's dark look: black page, panels a step above it, controls
   in solid black, a coloured line along the top of every box, lamps for what
   is on. Values read out of coop-operator/index.html's dark block. */
:root {
  --ground: #0a0a0a;
  --panel: #181818;
  --btn-bg: #000000;
  --inset: #0d0d0d;
  --cell: #1c1c1c;
  --cell-hi: #282828;
  --ink: #dcdcdc;
  --muted: #a0a0a0;
  --line: #3d3d3d;
  --line-hard: #949494;
  --lit-bg: #ffffff; --lit-ink: #0a0a0a;
  --a: #5cbcff;
  --b: #ea546f;
  --f-mono: "Silkscreen", ui-monospace, monospace;
  --f-sans: "Pixelify Sans", "Silkscreen", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.35 var(--f-sans); }
button, input { font: inherit; color: inherit; }

header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
}
h1 { font: 700 24px/1 var(--f-mono); margin: 0; letter-spacing: 1px; }
.roster {
  margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 4px 12px; font: 12px/1.2 var(--f-mono); min-width: 0;
}
.roster span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.roster i { width: 8px; height: 8px; display: inline-block; background: currentColor; }

.wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px;
  padding: 12px 16px 24px; max-width: 1400px; margin: 0 auto;
}
main { min-width: 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line-hard)); }

.screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; --c: var(--line-hard); }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer iframe, .layer > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fake { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  font: 14px var(--f-mono); color: #000; }
.tap {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 14px 22px; background: var(--lit-bg); color: var(--lit-ink);
  border: 0; font: 700 16px var(--f-mono); cursor: pointer;
}
.tap[hidden] { display: none; }

.mixer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .7fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.deck, .fader { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dhead { display: flex; align-items: center; justify-content: space-between; font: 700 13px var(--f-mono); }
.lamp { width: 10px; height: 10px; border: 1px solid var(--line-hard); background: transparent; }
.lamp.on { background: var(--c); border-color: var(--c); box-shadow: 0 0 8px var(--c); }

.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--inset); border: 1px solid var(--line); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.thumb.has img { display: block; }
.thumb .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 12px var(--f-mono); color: var(--muted); }
.thumb.has .empty { display: none; }
.title { font-size: 14px; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; }

.lbl { font: 11px var(--f-mono); color: var(--muted); margin-bottom: -4px; }
.linkrow, .say { display: flex; gap: 6px; min-width: 0; }
input:not([type]), input[type="text"] {
  flex: 1; min-width: 0; height: 32px; padding: 0 8px;
  background: var(--inset); border: 1px solid var(--line); color: var(--ink); border-radius: 0;
}
input:not([type]):focus { outline: none; border-color: var(--c, var(--line-hard)); }
button {
  height: 32px; padding: 0 10px; flex: none;
  background: var(--btn-bg); border: 1px solid var(--line); border-radius: 0;
  font: 700 12px var(--f-mono); cursor: pointer; white-space: nowrap;
}
button:hover { background: var(--cell-hi); }
button:disabled { color: var(--muted); cursor: default; background: var(--btn-bg); }
.ctl { display: flex; align-items: center; gap: 10px; }
.play { width: 74px; }
.play.on { border-color: var(--c); }
.time { font: 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.by { font: 11px var(--f-mono); color: var(--muted); min-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fader { justify-content: center; }
.ab { display: flex; justify-content: space-between; font: 700 16px var(--f-mono); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: var(--inset); border: 1px solid var(--line); }
input[type="range"]::-moz-range-track { height: 8px; background: var(--inset); border: 1px solid var(--line); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 36px; margin-top: -15px;
  background: var(--lit-bg); border: 0;
}
input[type="range"]::-moz-range-thumb { width: 22px; height: 36px; background: var(--lit-bg); border: 0; border-radius: 0; }

.chat { position: relative; min-height: 420px; }
.chatin { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px; gap: 8px; }
.lines { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  background: var(--inset); border: 1px solid var(--line); padding: 8px; }
.line { overflow-wrap: anywhere; text-align: left; }
.line b { font: 700 12px var(--f-mono); margin-right: 6px; }

.join { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.join[hidden] { display: none; }
.joinbox { width: 100%; max-width: 320px; padding: 18px; display: flex; flex-direction: column; gap: 10px; --c: var(--a); }
.joinbox h1 { margin-bottom: 4px; }

@media (max-width: 960px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .chat { min-height: 0; height: 380px; }
}
@media (max-width: 680px) {
  .mixer { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 10px 16px 20px; gap: 10px; }
}
