:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1f252d;
  --line: #2a313b;
  --text: #e7ebf0;
  --muted: #8b95a3;
  --accent: #3d8bfd;
  --ok: #2fbf71;
  --warn: #f2c94c;
  --bad: #eb5757;
  --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[hidden] { display: none !important; }
h1, h2 { margin: 0 0 .5rem; font-weight: 650; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
a { color: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 1.25rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.narrow { max-width: 460px; margin: 8vh auto; }
label { display: block; margin: .75rem 0; color: var(--muted); font-size: .9rem; }
label.check { display: flex; gap: .5rem; align-items: center; color: var(--text); }
input[type=text], input[type=password], select {
  width: 100%;
  margin-top: .3rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}
button {
  padding: .55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: #3a4350; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.active { background: var(--bad); border-color: var(--bad); color: #fff; }
.error { color: var(--bad); min-height: 1.2em; }
.hint { color: var(--muted); font-size: .85rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row > input[type=text] { flex: 1; margin: 0; }
.pill {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  background: var(--panel-2);
  color: var(--muted);
}
.pill.ok { background: rgba(47, 191, 113, .15); color: var(--ok); }
.pill.bad { background: rgba(235, 87, 87, .15); color: var(--bad); }

/* --- studio --- */
header.bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
header.bar h1 { margin: 0; }
header.bar .grow { flex: 1; }
.panels { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; margin-top: 1rem; }
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 1rem; }
#strips { display: flex; gap: .75rem; flex-wrap: wrap; align-items: stretch; }
.strip {
  width: 150px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem;
  display: flex; flex-direction: column; gap: .5rem; align-items: stretch;
}
.strip.host { border-color: #2c4a73; }
.strip.off { opacity: .7; border-color: var(--bad); }
.strip .name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.strip .status { font-size: .78rem; color: var(--muted); min-height: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip.off .status { color: var(--bad); }
.strip .meters { display: flex; gap: .6rem; justify-content: center; align-items: stretch; height: 180px; }
.strip canvas { width: 22px; height: 180px; border-radius: 3px; }
.strip .fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px;
  height: 180px;
  accent-color: var(--accent);
}
.strip .fader-val { font-size: .78rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip select.mode { margin: 0; padding: .3rem .4rem; font-size: .75rem; }
.strip .stats { font-size: .7rem; color: var(--muted); min-height: 2.2em; }
.strip .stats.warn { color: var(--warn); }
.strip .buttons { display: flex; gap: .4rem; }
.strip .buttons button { flex: 1; padding: .45rem .3rem; font-size: .85rem; }
.strip .kick { flex: 0 0 auto !important; color: var(--muted); }
.mix { display: flex; gap: 1rem; align-items: center; }
.mix canvas { width: 40px; height: 120px; border-radius: 4px; }
#rec-time { font-variant-numeric: tabular-nums; font-size: 1.4rem; font-weight: 650; }
#rec-files { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .85rem; }

/* --- guest --- */
.guest-meter { width: 100%; height: 22px; }
#live.off .big-meter { opacity: .4; }
.big-meter { display: flex; justify-content: center; margin: 1rem 0; }
.big-meter canvas { width: 60px; height: 160px; border-radius: 4px; }
.banner {
  background: rgba(235, 87, 87, .15);
  border: 1px solid var(--bad);
  color: #ffb3b3;
  padding: .7rem 1rem;
  border-radius: 8px;
  margin: .75rem 0;
  font-weight: 600;
}
#people { list-style: none; padding: 0; margin: .5rem 0; }
#people li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
#people li.muted { color: var(--muted); text-decoration: line-through; }

.toast {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--bad); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
}
