:root {
  --bg: #0d0b14;
  --panel: #17141f;
  --panel2: #201c2b;
  --line: #2e2940;
  --text: #f1edf7;
  --dim: #a59fb3;
  --accent: #ff7a59;
  --accent2: #8f7bff;
  --ok: #4fd1a5;
  --warn: #ffcf5a;
  --bad: #ff5a6e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
body { min-height: 100dvh; }
h1 { font-size: 1.6rem; margin: 0 0 .2rem; letter-spacing: .02em; }
h2 { font-size: 1rem; margin: 0 0 .6rem; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
a { color: var(--accent2); }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }
.muted-text { color: var(--dim); font-size: .9rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }

input[type=text], input[type=password], input[type=number], textarea, select {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; min-width: 0;
}
textarea { width: 100%; resize: vertical; min-height: 64px; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--dim); }

button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font: inherit; cursor: pointer; touch-action: manipulation; user-select: none;
}
button:hover { border-color: var(--accent2); }
button.primary { background: var(--accent); border-color: var(--accent); color: #1a0d08; font-weight: 700; }
button.big { padding: 16px 22px; font-size: 1.15rem; border-radius: 14px; }
button.on { background: var(--accent2); border-color: var(--accent2); color: #0d0b14; font-weight: 700; }
button.on small, button.on .muted-text { color: #0d0b14b0; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.small { padding: 5px 9px; font-size: .85rem; border-radius: 8px; }
button:disabled { opacity: .4; cursor: default; }

.status { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }
.dot.ok { background: var(--ok); }

/* deelnemer */
.mode-card { text-align: center; padding: 22px 16px; }
.mode-title { font-size: 1.9rem; font-weight: 800; }
.mode-sub { color: var(--dim); margin-top: 4px; }
.mode-groep .mode-title { color: #7fd0ff; }
.mode-fluister .mode-title { color: #c79bff; }
.mode-stilte .mode-title { color: #c9c4d4; }
canvas.ring { width: 100%; height: 340px; display: block; }
.meter { height: 8px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn), var(--accent)); transition: width .1s; }

.instr-badge { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: #fff2; font-weight: 600; }
.instr-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.overlay { position: fixed; inset: 0; background: #0d0b14ee; display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 10; }
.overlay .msg { font-size: clamp(1.6rem, 6vw, 3rem); font-weight: 800; text-align: center; max-width: 900px; }
.overlay .hint { color: var(--dim); text-align: center; margin-top: 18px; }

.qr { background: #fff; padding: 8px; border-radius: 10px; width: 180px; height: 180px; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }

/* regie */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } canvas.ring { height: 280px; } }
.modes button { flex: 1 1 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--dim); font-weight: 600; font-size: .8rem; text-transform: uppercase; }
td .meter { width: 80px; }
.tag { font-size: .75rem; padding: 2px 7px; border-radius: 6px; background: var(--panel2); color: var(--dim); }
.tag.dev { background: #ff7a5933; color: var(--accent); }
.talk { width: 100%; padding: 22px; font-size: 1.2rem; font-weight: 700; }
.talk.live { background: var(--bad); border-color: var(--bad); color: #fff; }
.rec.live { background: var(--bad); border-color: var(--bad); color: #fff; }
