:root {
  --bg: #0e0f12;
  --panel: #17191e;
  --panel-2: #1e2128;
  --line: #2a2e37;
  --text: #eceef2;
  --muted: #9aa1ad;
  --faint: #6b7280;
  --accent: #ff4d3d;      /* on-air red */
  --accent-2: #ffb020;    /* cue amber */
  --ok: #34c77b;
  --blue: #4c8dff;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f0f2f5; --line: #dde1e7;
  --text: #15171c; --muted: #5b6270; --faint: #8a919d; --shadow: 0 1px 2px rgba(0,0,0,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px;
  cursor: pointer; transition: background .12s, border-color .12s, transform .05s;
}
button:hover { border-color: #3a3f4b; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.danger { color: var(--accent); }
button.ghost { background: transparent; }
button.small { padding: 3px 8px; font-size: 13px; border-radius: 6px; }
input[type=text], input[type=password], input[type=url], input[type=search], select {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel > header h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0; color: var(--muted); font-weight: 600; flex: 1; }
.panel > .body { padding: 12px 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.bad { background: var(--accent); }
.dot.warn { background: var(--accent-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--muted); background: var(--panel-2); }
.onair { background: #3a1210; color: #ffd6d1; border-color: #6b1d17; }
.onair .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border-radius: 4px; padding: 1px 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.kind.music { color: #9cc2ff; } .kind.talk { color: #f5c17a; } .kind.id { color: #c6a4ff; } .kind.sfx { color: #7fe0b0; }
.toast-wrap { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: var(--panel-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { border-color: #6b1d17; color: #ffd6d1; }
.meter { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--ok) 0 65%, var(--accent-2) 65% 85%, var(--accent) 85%); transition: width .08s linear; }
.banner { padding: 8px 14px; background: #3a2a0c; color: #ffe1a6; border-bottom: 1px solid #6b4c12; font-size: 14px; display: none; }
.banner.show { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f0f2f5; --line: #dde1e7;
    --text: #15171c; --muted: #5b6270; --faint: #8a919d; --shadow: 0 1px 2px rgba(0,0,0,.06);
    color-scheme: light;
  }
  :root:not([data-theme="dark"]) .onair { background: #ffe3e0; color: #8a1a10; border-color: #ffb3aa; }
  :root:not([data-theme="dark"]) .banner { background: #fff4dc; color: #6b4c12; border-color: #f2d48a; }
}
