/*
 * SonicSandbox — DAW UI system
 * ============================
 * Reusable pro-plugin design language for the game pages.
 * Modern flat plugin aesthetic (FabFilter / iZotope / SoundToys family):
 * matte charcoal faceplates, inset display wells, rotary knobs with value
 * arcs, segmented LED meters.
 *
 * A host game sets its identity colour via --accent / --accent2 on <body>;
 * everything below reads those, so the same file dresses every effect.
 *
 *   <body style="--accent:#e8865a; --accent2:#f0a882;">
 *
 * Load AFTER /style.css.
 */

:root {
  --panel-hi:   rgba(255,255,255,0.05);
  --well:       #07080a;
  --well-edge:  rgba(0,0,0,0.6);
  --tgt:        #5b7fff;   /* target reference (blue) */
  --tgt2:       #87a0ff;
  --metal-1:    #20242c;
  --metal-2:    #161922;
  --etch:       rgba(0,0,0,0.55);
}

/* ───────────────────────── Page scaffold ───────────────────────── */
body { background:
  radial-gradient(1200px 600px at 50% -200px, #14161c 0%, transparent 60%),
  var(--bg);
}

.main {
  width: 100%;
  max-width: 1140px;
  padding: 22px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ───────────────────────── Site nav + game bar ─────────────────── */
nav.site-nav {
  width: 100%;
  padding: 14px 32px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.game-bar {
  width: 100%; max-width: 1140px;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.game-bar-left { display: flex; align-items: center; }
.game-bar .brand { display: flex; align-items: center; gap: 11px; }
.game-bar .brand-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(160deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px -2px var(--accent), inset 0 1px 0 rgba(255,255,255,0.25);
}
.game-bar .brand-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px; font-weight: 600;
  color: var(--text); letter-spacing: 0.02em;
}
.game-bar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.score-row { display: flex; align-items: center; gap: 18px; }
.stat { text-align: center; }
.stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 19px; font-weight: 700;
  color: var(--accent2); line-height: 1;
}
.stat-label {
  font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 3px;
}
.vdiv { width: 1px; height: 22px; background: var(--border2); }
.mult-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; color: var(--muted);
  letter-spacing: 0.06em; opacity: 0.75;
}

/* ───────────────────────── Preset / settings strip ─────────────── */
.settings-bar {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 1px 0 var(--panel-hi) inset, 0 14px 40px -28px #000;
}
.settings-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 11px 16px;
}
.settings-row-divider { width: 100%; height: 1px; background: var(--border); }

.label {
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.pill {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
}
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 14px -6px var(--accent);
}
.param-pill-toggle {
  font-size: 11px; padding: 4px 11px; border-radius: 8px;
  border: 1px solid var(--border2); font-weight: 500;
  white-space: nowrap; transition: all 0.15s;
}
.param-pill-toggle.togglable { cursor: pointer; }
.param-pill-toggle.togglable:hover { opacity: 0.85; transform: scale(1.04); }
.custom-hint { font-size: 10px; color: var(--muted); font-style: italic; padding: 0 2px; }

select {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
  padding: 5px 10px;
  border-radius: 7px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px; outline: none; cursor: pointer;
}
select:hover { border-color: var(--accent); }

kbd {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 5px; color: var(--muted);
}

.shortcuts-wrap { position: relative; }
.shortcuts-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--muted);
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 6px 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.shortcuts-btn:hover { border-color: var(--accent); color: var(--text); }
.shortcuts-popover {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--metal-1); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 18px; z-index: 50; min-width: 260px;
  box-shadow: 0 20px 50px -20px #000;
}
.shortcuts-popover.open { display: block; }
.shortcut-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; font-size: 12px; color: var(--muted); padding: 5px 0;
  border-bottom: 0.5px solid var(--border);
}
.shortcut-row:last-child { border-bottom: none; }
.shortcut-keys { display: flex; gap: 4px; flex-shrink: 0; }

/* ───────────────────────── The rig ─────────────────────────────── */
.rig {
  display: grid;
  grid-template-columns: 1fr 304px;
  gap: 16px;
  align-items: start;
}

/* ── The device (one cohesive plugin faceplate) ── */
.device {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 18%),
    linear-gradient(180deg, var(--metal-1) 0%, var(--metal-2) 100%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow:
    0 1px 0 var(--panel-hi) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 30px 70px -34px #000;
  position: relative;
}

/* device top bar */
.device-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}

/* analog gain-reduction needle meters */
.gr-needles { display: flex; flex-direction: column; gap: 9px; }
.gr-needles-head { display: flex; align-items: center; gap: 12px; }
.gr-cap-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted);
}
.vu-row { display: flex; gap: 12px; }
.vu-row-rack { justify-content: center; gap: 14px; }
.meter-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vu-unit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.vu-unit.target-gr-hidden { opacity: 0; pointer-events: none; }
.vu {
  width: 110px; padding: 8px 8px 4px;
  background:
    radial-gradient(120% 90% at 50% 16%, rgba(255,255,255,0.045), transparent 62%),
    var(--well);
  border: 1px solid var(--well-edge); border-radius: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.03);
}
.vu-svg { width: 100%; height: auto; display: block; }
.vu-lbl { fill: rgba(255,255,255,0.4); font-family: 'IBM Plex Mono', monospace; font-size: 7px; }
.vu-foot { display: flex; align-items: baseline; gap: 6px; }
.device-id { display: flex; align-items: baseline; gap: 10px; }
.device-id-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  align-self: center;
}
.device-id-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--text);
}
.device-id-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; color: var(--muted);
  text-transform: uppercase;
}

/* monitor switch (Target / Dry / Yours) */
.monitor { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.monitor-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.monitor-switch {
  display: flex; gap: 6px;
  background: var(--well);
  border: 1px solid var(--well-edge);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5) inset;
}
.mon-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px;
  background: transparent; border: 1px solid transparent;
  border-radius: 9px; padding: 10px 26px; min-width: 110px;
  cursor: pointer; transition: all 0.15s; color: var(--muted);
}
.mon-btn .listen-btn-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}
.mon-btn.target-btn { color: var(--tgt2); }
.mon-btn.user-btn   { color: var(--accent2); }
.mon-btn:hover:not(:disabled) { background: rgba(255,255,255,0.04); }
.mon-btn.target-btn.active { background: rgba(91,127,255,0.16); border-color: rgba(91,127,255,0.55); box-shadow: 0 0 14px -4px var(--tgt); }
.mon-btn.dry-btn.active    { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.28); color: var(--text); }
.mon-btn.user-btn.active   { background: color-mix(in srgb, var(--accent) 17%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 14px -4px var(--accent); }
.mon-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.listen-bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.listen-bar { width: 3.5px; border-radius: 2px; background: currentColor; opacity: 0.3; transition: opacity 0.15s; flex-shrink: 0; }
.mon-btn.active .listen-bar, .listen-btn.active .listen-bar { opacity: 1; }
.listen-bar:nth-child(1) { height: 7px;  animation-delay: 0s; }
.listen-bar:nth-child(2) { height: 14px; animation-delay: 0.12s; }
.listen-bar:nth-child(3) { height: 18px; animation-delay: 0.06s; }
.listen-bar:nth-child(4) { height: 11px; animation-delay: 0.18s; }
.listen-bar:nth-child(5) { height: 8px;  animation-delay: 0.09s; }
.mon-btn.active .listen-bar, .listen-btn.active .listen-bar { animation: barBounce 0.75s ease-in-out infinite; }
@keyframes barBounce { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(0.3); } }

/* ── Display well (transfer + scope + GR) ── */
.display-well {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,0.025), transparent 55%),
    var(--well);
  border: 1px solid var(--well-edge);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.55) inset, 0 1px 0 rgba(255,255,255,0.03);
}
.display-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.display-head { display: flex; align-items: center; justify-content: space-between; }
.display-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.hero-canvas {
  display: block; width: 100%; height: 248px;
  border-radius: 8px; background: #060708;
}
.transfer-compare { display: flex; gap: 14px; opacity: 0.3; transition: opacity 0.4s ease; }
.transfer-compare.revealed { opacity: 1; }
.tc-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.tc-dot { width: 12px; height: 3px; border-radius: 2px; }

.scope-row { display: flex; align-items: center; gap: 10px; }
.scope-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); width: 38px; flex-shrink: 0;
}
#levelCanvas {
  flex: 1; height: 44px; border-radius: 7px; background: #060708;
  border: 1px solid rgba(255,255,255,0.04);
  transition: opacity 0.2s; min-width: 0;
}
#levelCanvas.waveform-hidden { opacity: 0.05; }
.waveform-hide-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; color: var(--muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border2);
  border-radius: 6px; padding: 4px 8px; cursor: pointer; transition: all 0.15s;
  flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.06em;
}
.waveform-hide-btn:hover { color: var(--text); border-color: var(--accent); }

.hidden-offscreen { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* ── Gain-reduction meters (vertical LED ladders) ── */
.gr-meters { display: flex; flex-direction: column; gap: 10px; }
.gr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.gr-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); line-height: 1.3;
}
.makeup-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--amber);
  border-radius: 6px; padding: 3px 7px; white-space: nowrap; align-self: flex-start;
}
.makeup-badge.hidden-panel { filter: blur(8px); opacity: 0; }
.gr-ladders { display: flex; gap: 10px; flex: 1; justify-content: center; }
.gr-col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.gr-col.target-gr-hidden { opacity: 0; pointer-events: none; }
.gr-track {
  position: relative; width: 26px; height: 200px;
  background: #050608; border: 1px solid rgba(0,0,0,0.6);
  border-radius: 5px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6) inset;
}
.gr-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  transition: height 0.06s linear;
}
.gr-fill.target-fill { background: linear-gradient(to top, #3a5bd0, var(--tgt2)); }
.gr-fill.user-fill   { background: linear-gradient(to top, #c75a2e, var(--accent2)); }
/* LED segmentation overlay */
.gr-track::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to top, transparent 0 7px, rgba(0,0,0,0.85) 7px 9px);
}
.gr-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
}
.gr-name.target-c { color: var(--tgt2); }
.gr-name.user-c   { color: var(--accent2); }
.meter-db {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: var(--text);
}

/* ── Decks (rows of knobs) ── */
.deck {
  background: linear-gradient(180deg, rgba(255,255,255,0.018), transparent);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 12px 16px 14px;
}
.deck-target { padding-top: 10px; padding-bottom: 10px; }
.deck-label {
  display: flex; align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.deck-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; }
.deck-user .deck-label { color: var(--accent2); }
.deck-target .deck-label { color: var(--tgt2); }

.knob-grid { display: flex; justify-content: space-between; gap: 6px; }
.knob-cell {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 1; min-width: 0; border-radius: 10px;
  padding: 6px 4px; transition: background 0.15s;
}
.deck-user .knob-cell:hover { background: rgba(255,255,255,0.025); }
.knob-cell.locked { opacity: 0.32; pointer-events: none; }
.knob-cell.hidden-target .knob-wrap { filter: blur(24px); opacity: 0.3; pointer-events: none; transform: scale(0.92); }
.knob-cell.hidden-target .knob-val  { filter: none; opacity: 0.45; }

.knob-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.knob-wrap { position: relative; cursor: grab; touch-action: none; }
.knob-wrap:active { cursor: grabbing; }
.knob-svg { width: 100%; height: 100%; display: block; }
.knob-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; font-weight: 500; color: var(--text);
  text-align: center; min-height: 16px;
}

/* user deck = hero, target deck = reference (smaller) */
.deck-user   .knob-wrap { width: 78px; height: 78px; }
.deck-target .knob-wrap { width: 50px; height: 50px; }
.deck-target .knob-val  { font-size: 10px; }
.deck-target .knob-label { font-size: 8px; }

/* ───────────────────────── Side rack ───────────────────────────── */
.rack { display: flex; flex-direction: column; gap: 14px; }
.rack-panel {
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 1px 0 var(--panel-hi) inset;
}
.rack-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}

.source-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 9px; font-size: 13px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border2);
  color: var(--text); cursor: pointer; transition: all 0.15s;
}
.source-pill:hover { border-color: var(--accent); }
.source-pill.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  color: var(--accent2);
}
.source-pill input[type=file] { display: none; }

/* transport */
.transport-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button {
  border: none; border-radius: 9px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 10px 14px; transition: all 0.15s;
}
.btn-secondary {
  background: rgba(255,255,255,0.03); color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent2); }
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-secondary.paused { background: rgba(244,91,105,0.1); border-color: var(--red); color: var(--red); }

.btn-check {
  width: 100%;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #1a0f08; font-weight: 700; font-size: 14px;
  letter-spacing: 0.02em; padding: 13px;
  box-shadow: 0 6px 20px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-check:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-check:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* parameter ranges */
.ranges-toggle-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border2);
  border-radius: 10px; color: var(--muted);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 14px; cursor: pointer; transition: all 0.15s; width: 100%;
}
.ranges-toggle-btn:hover { border-color: var(--accent); color: var(--text); }
.ranges-toggle-btn .rt-arrow { font-size: 9px; transition: transform 0.2s; }
.ranges-toggle-btn.open .rt-arrow { transform: rotate(90deg); }
.ranges-panel {
  display: none; flex-direction: column;
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.ranges-panel.open { display: flex; }
.range-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
}
.range-row:last-child { border-bottom: none; }
.range-param-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); width: 58px; flex-shrink: 0;
}
.range-input {
  width: 60px; background: var(--well); color: var(--text);
  border: 1px solid var(--border2); border-radius: 6px;
  padding: 4px 7px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; outline: none;
}
.range-input:focus { border-color: var(--accent); }
.range-sep { font-size: 11px; color: var(--muted); }
.range-unit { font-size: 11px; color: var(--muted); min-width: 20px; }
.range-reset {
  margin-left: auto; font-size: 10px; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.range-reset:hover { color: var(--text); }

/* ───────────────────────── Result bar ──────────────────────────── */
.result-bar {
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px;
  display: none; flex-direction: column; gap: 13px;
  transition: border-color 0.5s ease;
  box-shadow: 0 1px 0 var(--panel-hi) inset;
}
.result-bar.visible { display: flex; }
.result-bar.score-good { border-color: rgba(62,207,142,0.55); }
.result-bar.score-ok   { border-color: rgba(245,158,11,0.55); }
.result-bar.score-bad  { border-color: rgba(244,91,105,0.55); }
.result-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.result-big { font-family: 'IBM Plex Mono', monospace; font-size: 50px; font-weight: 700; line-height: 1; }
.result-denom { color: var(--muted); font-size: 16px; }
.result-pts { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: var(--accent2); margin-top: 5px; opacity: 0.9; }
.result-msg { font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.acc-track { height: 6px; background: var(--well); border-radius: 3px; overflow: hidden; flex: 1; min-width: 200px; }
.acc-fill { height: 100%; border-radius: 3px; width: 0; transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
.param-results { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-chip {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; font-size: 12px; color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}
.pr-chip .good { color: var(--green); }
.pr-chip .bad  { color: var(--red); }

/* ───────────────────────── Toast ───────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--metal-1); border: 1px solid var(--border2);
  border-radius: 10px; padding: 10px 16px; font-size: 13px; color: var(--text);
  opacity: 0; transition: all 0.2s; pointer-events: none; z-index: 999; white-space: nowrap;
  box-shadow: 0 16px 40px -16px #000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ───────────────────────── Help ────────────────────────────────── */
.help-toggle {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border);
  border-radius: 10px; color: var(--muted);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px;
  padding: 10px 16px; cursor: pointer; transition: all 0.15s;
  margin-top: 4px; margin-left: 24px; width: fit-content;
}
.help-toggle:hover { border-color: var(--border2); color: var(--text); }
.help-toggle .toggle-arrow { font-size: 10px; transition: transform 0.2s; display: inline-block; }
.help-toggle.open .toggle-arrow { transform: rotate(90deg); }
.help-section {
  display: none; width: calc(100% - 48px); max-width: 1140px;
  margin: 0 24px;
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 32px; gap: 28px; flex-direction: column;
}
.help-section.visible { display: flex; }
.help-section h2 { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 0.02em; margin-bottom: 2px; }
.help-section p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.help-section p strong { color: var(--text); font-weight: 500; }
.help-block { display: flex; flex-direction: column; gap: 8px; }
.help-divider { border: none; border-top: 1px solid var(--border); }

.forgot-pw-link {
  display: block; width: 100%; text-align: center;
  margin-top: 12px; font-size: 12px; color: var(--muted);
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.forgot-pw-link:hover { color: var(--text); }

/* ───────────────────────── Responsive ──────────────────────────── */
@media (max-width: 940px) {
  .rig { grid-template-columns: 1fr; }
  .rack { flex-direction: row; flex-wrap: wrap; }
  .rack-panel, .ranges-toggle-btn { flex: 1; min-width: 220px; }
}
@media (max-width: 720px) {
  .display-well { grid-template-columns: 1fr; }
  .gr-ladders { justify-content: flex-start; }
  .gr-track { height: 120px; }
  .deck-user .knob-wrap { width: 62px; height: 62px; }
  .device-top { gap: 10px; }
}
@media (max-width: 600px) {
  nav.site-nav { padding: 12px 16px; }
  .game-bar { padding: 8px 16px; }
  .stat-val { font-size: 15px; }
  .score-row { gap: 10px; }
}
