/* Escape Night — "dossier noir" theme: candle-lit mansion, parchment, brass, typewriter. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800; font-display: swap;
}
:root {
  --bg: #0d0a09;
  --bg-2: #17110f;
  --wall: #1f1714;
  --paper: #efe3c8;
  --paper-2: #e2d2ae;
  --ink: #2a1d14;
  --ink-soft: #5b4636;
  --brass: #c9a24a;
  --brass-2: #f1cf7a;
  --blood: #9e1b1b;
  --blood-2: #d43a3a;
  --green: #3fa66b;
  --text: #f2e8d8;
  --muted: #b3a491;
  --line: rgba(201, 162, 74, .35);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  color: var(--text); font-family: var(--serif); font-size: 17px; line-height: 1.45;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(201,162,74,.18), transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(158,27,27,.18), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 60px),
    var(--bg);
  background-attachment: fixed;
  overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; -webkit-user-select: none; user-select: none; cursor: pointer; }
input, select, textarea { font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brass-2); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 14px; }
body.terminal .wrap { max-width: 1280px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(13,10,9,.97), rgba(13,10,9,.88));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.brand { font-variant: small-caps; letter-spacing: .08em; color: var(--brass-2); font-size: .95rem; line-height: 1.1; flex: 1; min-width: 0; }
.brand small { display: block; color: var(--muted); font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; font-variant: normal; }
.timer {
  font-family: var(--mono); font-weight: 700; font-size: 1.35rem; letter-spacing: .04em;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: #000;
  color: var(--brass-2); min-width: 92px; text-align: center;
}
.timer.low { color: var(--blood-2); border-color: var(--blood); animation: pulse 1s infinite; }
.timer.paused { color: var(--muted); }
.who {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: var(--bg-2);
}
.progressbar { height: 3px; background: rgba(255,255,255,.06); }
.progressbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blood), var(--brass)); transition: width .6s; }

/* ---------- headings / act ---------- */
.kicker { font-family: var(--mono); font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: var(--brass); margin: 0; }
h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.act-head { padding: 18px 0 6px; display: flex; gap: 10px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.teamline { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.teamline b { color: var(--text); }

/* ---------- cards ---------- */
.stack { display: grid; gap: 14px; padding: 8px 0 120px; }
body.terminal .stack.puzzles { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); align-items: start; }
.card {
  background: linear-gradient(180deg, var(--wall), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
}
.card.solved { opacity: .55; }
.card.flash-ok { animation: okflash 1s; }
.card.shake { animation: shake .45s; }
.card .card-title { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.card .card-title .seal {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #d84a4a, var(--blood) 60%, #5c0d0d);
  color: #ffd9d0; font-size: .9rem; box-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.card.solved .seal { background: radial-gradient(circle at 35% 30%, #6fd09a, var(--green) 60%, #1d5a37); }
.badge {
  display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--brass-2);
}
.badge.red { color: #ffb3b3; border-color: var(--blood); }

/* ---------- content blocks ---------- */
.blocks { display: grid; gap: 12px; }
.b-text p { margin: 0 0 .6em; }
.b-text p:last-child { margin-bottom: 0; }
.b-doc {
  background: linear-gradient(180deg, var(--paper), var(--paper-2)); color: var(--ink);
  border-radius: 6px; padding: 16px 16px 18px; position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,.5); font-family: var(--serif);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.25), transparent 30%),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(90,60,30,.08) 27px 28px);
}
.b-doc h4 { margin: 0 0 8px; font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.b-doc .doc-body { font-family: var(--mono); font-size: .86rem; line-height: 1.55; white-space: pre-wrap; }
.b-doc .stamp {
  position: absolute; right: 12px; top: 10px; transform: rotate(8deg);
  border: 3px double var(--blood); color: var(--blood); padding: 2px 8px; font-family: var(--mono);
  font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8;
}
.b-quote { border-left: 3px solid var(--brass); padding: 4px 0 4px 12px; font-style: italic; color: #e9dcc6; }
.b-quote cite { display: block; font-style: normal; font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 4px; }
.b-note {
  background: rgba(201,162,74,.1); border: 1px dashed var(--brass); border-radius: 10px; padding: 10px 12px;
  font-family: var(--mono); font-size: .84rem;
}
.b-note::before { content: '☞ '; color: var(--brass-2); }
.b-warn { background: rgba(158,27,27,.15); border: 1px solid var(--blood); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.b-image figure { margin: 0; }
.b-image img { border-radius: 8px; border: 1px solid var(--line); width: 100%; cursor: zoom-in; background: #000; }
.b-image figcaption { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 5px; }
.b-list ul { margin: 0; padding-left: 1.2em; }
.b-table table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .8rem; }
.b-table th, .b-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.b-table th { color: var(--brass); font-weight: 600; text-transform: uppercase; font-size: .68rem; letter-spacing: .1em; }
.b-audio { display: flex; align-items: center; gap: 12px; background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.b-audio .lbl { font-family: var(--mono); font-size: .8rem; flex: 1; }
.b-audio .bar { height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.b-audio .bar i { display: block; height: 100%; width: 0; background: var(--brass); }

/* ---------- buttons & inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--brass); background: linear-gradient(180deg, #2a1f17, #1a130f);
  color: var(--brass-2); border-radius: 12px; padding: 13px 16px; min-height: 48px;
  font-family: var(--mono); font-size: .86rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.07); transition: transform .06s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.btn.primary { background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #1b130b; border-color: #f7dc95; }
.btn.danger { border-color: var(--blood-2); color: #ffc9c9; background: linear-gradient(180deg, #4a1212, #2a0a0a); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: .74rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; padding: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 140px; }
.field {
  width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: #000;
  color: var(--text); padding: 12px 14px; font-family: var(--mono); font-size: 1.05rem; letter-spacing: .12em;
  text-transform: uppercase;
}
.field:focus { outline: none; border-color: var(--brass-2); box-shadow: 0 0 0 3px rgba(201,162,74,.25); }
select.field { text-transform: none; letter-spacing: 0; font-size: 16px; }
.widget { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.feedback { font-family: var(--mono); font-size: .86rem; min-height: 1.2em; }
.feedback.ok { color: #8fe0b0; }
.feedback.bad { color: #ff9b9b; }
.feedback:empty { display: none; }
.hints { display: grid; gap: 8px; margin-top: 12px; }
.hint-item { background: rgba(63,166,107,.1); border: 1px solid rgba(63,166,107,.5); border-radius: 10px; padding: 9px 12px; font-size: .92rem; }
.hint-item::before { content: '💡 '; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }

/* ---------- morse ---------- */
.morse-display { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 88px; }
.morse-symbols { font-family: var(--mono); font-size: 1.3rem; letter-spacing: .12em; word-break: break-all; color: var(--brass-2); min-height: 1.4em; }
.morse-text { font-family: var(--mono); font-size: 1.05rem; color: var(--text); margin-top: 6px; letter-spacing: .2em; }
.morse-key {
  width: 100%; height: 120px; border-radius: 18px; border: 2px solid var(--brass);
  background: radial-gradient(circle at 50% 35%, #3a2b1f, #120d09);
  font-family: var(--mono); font-weight: 800; letter-spacing: .3em; color: var(--brass-2); font-size: 1rem;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.morse-key.down { background: radial-gradient(circle at 50% 35%, var(--brass-2), var(--brass)); color: #1b130b; }
.morse-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ---------- sequence ---------- */
.seq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.seq-btn { aspect-ratio: 1; border-radius: 14px; border: 2px solid rgba(255,255,255,.15); font-size: 1.6rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.seq-btn:active { transform: scale(.94); filter: brightness(1.4); }
.seq-out { display: flex; gap: 6px; flex-wrap: wrap; min-height: 40px; align-items: center; }
.seq-chip { min-width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; border: 1px solid rgba(255,255,255,.2); padding: 0 6px; }

/* ---------- choice / accuse ---------- */
.opt-grid { display: grid; gap: 8px; }
.opt { text-align: left; border: 1px solid var(--line); background: #000; border-radius: 12px; padding: 12px 14px; min-height: 48px; font-size: 1rem; }
.opt.sel { border-color: var(--brass-2); background: rgba(201,162,74,.15); box-shadow: inset 0 0 0 1px var(--brass-2); }
.accuse-field + .accuse-field { margin-top: 10px; }
.accuse-field .lbl { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }

/* ---------- dual axis ---------- */
.axis-board { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #050403; }
.axis-board img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.axis-board .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(201,162,74,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(201,162,74,.18) 1px, transparent 1px); background-size: 10% 10%; }
.axis-board .cross { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; transition: left .08s linear, top .08s linear; }
.axis-board .cross::before, .axis-board .cross::after { content: ''; position: absolute; background: var(--blood-2); box-shadow: 0 0 8px var(--blood-2); }
.axis-board .cross::before { left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.axis-board .cross::after { top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; }
.axis-board .cross .ring { position: absolute; inset: 8px; border: 2px solid var(--blood-2); border-radius: 50%; }
.axis-board .lock { position: absolute; left: 10px; bottom: 10px; right: 10px; height: 6px; background: rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; }
.axis-board .lock i { display: block; height: 100%; width: 0; background: var(--green); }
.axis-board .coords { position: absolute; right: 10px; top: 8px; font-family: var(--mono); font-size: .8rem; background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 6px; color: var(--brass-2); }
.axis-ctrl { display: grid; gap: 8px; }
.axis-ctrl .lbl { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.axis-ctrl .ctrl-row { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; align-items: center; }
input[type=range].dial { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; touch-action: none; }
input[type=range].dial::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #3a2b1f, var(--brass)); }
input[type=range].dial::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c9, var(--brass)); border: 2px solid #1b130b; }
input[type=range].dial::-moz-range-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #3a2b1f, var(--brass)); }
input[type=range].dial::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: var(--brass-2); border: 2px solid #1b130b; }
.keys-hint { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.keys-hint kbd { border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--text); background: #000; }

/* ---------- sync hold ---------- */
.hold-wrap { display: grid; place-items: center; gap: 12px; padding: 6px 0; }
.hold-btn {
  width: 180px; height: 180px; border-radius: 50%; border: 3px solid var(--blood-2);
  background: radial-gradient(circle at 40% 30%, #6b1a1a, #2a0808); color: #ffd0d0;
  font-family: var(--mono); font-weight: 800; letter-spacing: .12em; font-size: .95rem;
  touch-action: none; -webkit-touch-callout: none; box-shadow: 0 0 0 8px rgba(158,27,27,.15), 0 10px 30px #000;
}
.hold-btn.down { background: radial-gradient(circle at 40% 30%, #ff6b6b, var(--blood)); color: #fff; box-shadow: 0 0 0 14px rgba(212,58,58,.35), 0 0 40px var(--blood-2); }
.holders { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.holder { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.holder.on { border-color: var(--green); color: #b7f5cf; background: rgba(63,166,107,.18); }
.meter { width: 100%; height: 10px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass), var(--green)); transition: width .15s linear; }

/* ---------- audio splice ---------- */
.tape { min-height: 64px; border-radius: 12px; border: 1px dashed var(--brass); padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: repeating-linear-gradient(90deg, #0b0806 0 10px, #120d09 10px 20px); }
.tape:empty::before { content: 'Tik fragmenten aan om ze op de band te zetten'; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.seg { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; border: 1px solid var(--line); background: #000; padding: 6px 8px; min-height: 44px; }
.seg .glyph { font-family: var(--mono); font-weight: 800; color: var(--brass-2); min-width: 26px; text-align: center; font-size: 1.1rem; }
.seg button { border: 0; background: rgba(255,255,255,.08); border-radius: 8px; width: 36px; height: 36px; color: var(--text); }
.seg.used { opacity: .35; }
.seg-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.seg.playing { border-color: var(--brass-2); box-shadow: 0 0 12px rgba(241,207,122,.5); }

/* ---------- scanner ---------- */
.scanner { position: relative; width: 100%; aspect-ratio: 1; max-width: 420px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 14%; border: 2px solid var(--brass-2); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner .laser { position: absolute; left: 14%; right: 14%; height: 2px; background: var(--blood-2); box-shadow: 0 0 10px var(--blood-2); animation: laser 1.6s ease-in-out infinite; }
.scanner.iris .frame { border-radius: 50%; inset: 18%; border-color: #6fd0ff; box-shadow: 0 0 0 999px rgba(0,10,20,.55), 0 0 30px #6fd0ff inset; }
.scanner.iris .laser { background: #6fd0ff; box-shadow: 0 0 12px #6fd0ff; }
.scanner .scan-label { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: #fff; text-shadow: 0 1px 3px #000; }

/* ---------- photo ---------- */
.photo-prev { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--brass-2); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(5,3,2,.88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.overlay .panel { width: 100%; max-width: 620px; max-height: 88dvh; overflow: auto; background: linear-gradient(180deg, var(--wall), var(--bg)); border: 1px solid var(--brass); border-radius: 18px; padding: 22px 18px calc(18px + var(--safe-b)); box-shadow: 0 30px 80px #000; }
.overlay .panel h1 { margin: 6px 0 12px; color: var(--brass-2); }
.drink-ov { background: radial-gradient(circle, rgba(158,27,27,.85), rgba(10,0,0,.96)); }
.drink-card { text-align: center; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.drink-card .big { font-size: clamp(3.2rem, 18vw, 6rem); font-weight: 900; font-family: var(--mono); color: #fff; text-shadow: 0 0 30px var(--blood-2); letter-spacing: .05em; }
.drink-card .emoji { font-size: 5rem; line-height: 1; }
.drink-card .names { font-family: var(--mono); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .15em; color: #ffd9d0; margin-top: 8px; }
.drink-card .why { color: #f4c7c7; margin-top: 6px; font-size: .95rem; }
.toast { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 70; background: #0d1f14; border: 1px solid var(--green); color: #c9f7da; padding: 12px 18px; border-radius: 12px; font-family: var(--mono); font-size: .86rem; box-shadow: 0 10px 30px #000; max-width: 92vw; animation: toastin .3s; }
.toast.bad { background: #2a0a0a; border-color: var(--blood-2); color: #ffd0d0; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.95); display: grid; place-items: center; padding: 10px; }
.lightbox img { max-height: 96dvh; width: auto; max-width: 100%; touch-action: pinch-zoom; }

/* ---------- lobby ---------- */
.hero { text-align: center; padding: 48px 0 18px; }
.hero .crest { font-size: 3rem; filter: drop-shadow(0 0 18px rgba(201,162,74,.5)); }
.hero h1 { color: var(--brass-2); letter-spacing: .02em; }
.pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pick .btn { min-height: 76px; font-size: 1rem; }
.pick .btn.wide { grid-column: span 2; }
.status-line { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-align: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.check:last-child { border-bottom: 0; }
.check .num { font-family: var(--mono); color: var(--brass); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: 1.5rem; color: var(--brass-2); }
.stat span { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.conn { position: fixed; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 30; font-family: var(--mono); font-size: .64rem; color: var(--muted); background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 999px; }
.conn.off { color: #ff9b9b; }

@keyframes pulse { 50% { opacity: .55; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes laser { 0%, 100% { top: 16%; } 50% { top: 84%; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes okflash { 0% { box-shadow: 0 0 0 0 rgba(63,166,107,.9); } 100% { box-shadow: 0 0 0 24px rgba(63,166,107,0); } }
@keyframes toastin { from { transform: translate(-50%, 20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- piano ---------- */
.piano { display: flex; gap: 4px; padding: 10px; background: #000; border-radius: 12px; border: 1px solid var(--line); overflow-x: auto; }
.pkey { flex: 1; min-width: 40px; height: 150px; border-radius: 0 0 8px 8px; border: 1px solid #555; background: linear-gradient(180deg, #fffaf0, #e8dcc4); color: #1b130b; font-family: var(--mono); font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; }
.pkey:active { background: linear-gradient(180deg, #f1cf7a, #c9a24a); }
