/* ============================================================
   Piano Trainer — donker thema met neon-accenten
   ============================================================ */

:root {
  --bg: #05070F;
  --bg-2: #0A1020;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #0D1424;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #E8EEF9;
  --text-dim: #8E9DB8;
  --text-faint: #5D6B85;
  --accent: #2FB8FF;
  --accent-2: #A96BFF;
  --good: #35E08A;
  --warn: #FFC53D;
  --bad: #FF5B72;
  --radius: 14px;
  --radius-sm: 9px;
  --drawer-w: 380px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
kbd {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
}

/* ---------- Layout ---------- */

.app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr auto;
  grid-template-areas: "top top" "stage drawer" "bottom drawer";
  height: 100dvh;
}

.topbar {
  grid-area: top;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.95), rgba(8, 12, 24, 0.85));
  border-bottom: 1px solid var(--line);
  z-index: 6;
}

.stage { grid-area: stage; position: relative; min-height: 0; min-width: 0; }
.transport { grid-area: bottom; z-index: 5; }

/* ---------- Topbar ---------- */

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(47, 184, 255, 0.4);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px 6px 5px;
  background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 5px);
  border-radius: 2px; opacity: 0.85;
}
.brand-text { font-size: 15px; letter-spacing: -0.02em; color: var(--text-dim); }
.brand-text strong { color: var(--text); font-weight: 700; }

.song-info { flex: 1; min-width: 0; }
.song-title {
  font-size: 15px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.song-meta { font-size: 12px; color: var(--text-faint); margin-top: 1px; }

.mode-switch {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  border-radius: 11px; flex-shrink: 0;
}
.mode-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 550;
  color: var(--text-dim); transition: background .15s, color .15s;
}
.mode-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.mode-btn.is-active {
  background: linear-gradient(145deg, var(--accent), #1E86D9);
  color: #04121C; box-shadow: 0 2px 12px rgba(47, 184, 255, 0.35);
}

.topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  font-size: 13px; color: var(--text-dim); transition: all .15s;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); }
.icon-btn.is-primary { color: var(--text); }
.icon-btn.is-on { color: var(--good); border-color: rgba(53, 224, 138, 0.5); background: rgba(53, 224, 138, 0.1); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Canvas & overlays ---------- */

#canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(4, 7, 14, 0.78); backdrop-filter: blur(10px); z-index: 4;
}
.overlay[hidden] { display: none; }
.overlay-card {
  text-align: center; padding: 34px 40px; max-width: 480px;
  background: linear-gradient(160deg, rgba(20, 30, 52, 0.9), rgba(10, 16, 32, 0.9));
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.overlay-card h1 { font-size: 26px; margin-bottom: 8px; }
.overlay-card p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 0 0 22px; }

.big-btn {
  padding: 13px 40px; border-radius: 12px; font-size: 16px; font-weight: 650;
  color: #04121C; background: linear-gradient(145deg, #66D9FF, var(--accent));
  box-shadow: 0 8px 28px rgba(47, 184, 255, 0.35); transition: transform .12s, box-shadow .12s;
}
.big-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(47, 184, 255, 0.45); }
.big-btn:active { transform: translateY(0); }

.ghost-btn {
  padding: 13px 24px; border-radius: 12px; font-size: 15px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.ghost-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.overlay-actions { display: flex; gap: 10px; justify-content: center; }
.keyhint {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center;
  margin-top: 24px; font-size: 12px; color: var(--text-faint);
}
.keyhint span { display: flex; align-items: center; gap: 6px; }

.result-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px;
}
.result-grid div { display: flex; flex-direction: column; gap: 3px; }
.result-grid span { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-grid label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }

.countdown {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 3;
}
/* Zonder deze regel wint 'display: grid' van het [hidden]-gedrag van de browser
   en blijft het laatste cijfer na het aftellen in beeld staan. */
.countdown[hidden] { display: none; }
.countdown span {
  font-size: 120px; font-weight: 800; color: var(--accent);
  text-shadow: 0 0 60px rgba(47, 184, 255, 0.6);
  animation: pop .55s ease-out forwards;
}
@keyframes pop {
  0% { transform: scale(1.6); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0; }
}

.wait-hint {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; border-radius: 100px; z-index: 3;
  background: rgba(255, 197, 61, 0.14); border: 1px solid rgba(255, 197, 61, 0.4);
  color: #FFE08A; font-size: 14px; backdrop-filter: blur(8px);
}
.wait-hint[hidden] { display: none; }
.wait-hint strong { color: #fff; font-family: var(--mono); }
.wait-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--warn);
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.toast-stack {
  position: absolute; right: 16px; top: 16px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 10px; font-size: 13px; max-width: 340px;
  background: rgba(15, 24, 42, 0.95); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: slideIn .25s ease-out;
}
.toast.is-error { border-color: rgba(255, 91, 114, 0.5); color: #FFC2CB; }
.toast.is-ok { border-color: rgba(53, 224, 138, 0.5); color: #A9F5CE; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ---------- Transport ---------- */

.transport {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 11px 18px;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.9), rgba(5, 7, 15, 1));
  border-top: 1px solid var(--line);
}
.transport-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 320px; }
.transport-side { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.round-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--panel); color: var(--text-dim);
  transition: all .15s;
}
.round-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn.is-play {
  width: 46px; height: 46px; border: none; color: #04121C;
  background: linear-gradient(145deg, #66D9FF, var(--accent));
  box-shadow: 0 5px 20px rgba(47, 184, 255, 0.35);
}
.round-btn.is-play svg { width: 22px; height: 22px; }

/* Het hidden-attribuut werkt niet op een inline <svg>, dus wisselen we met een
   klasse op de knop zelf. */
.ico-pause { display: none; }
.round-btn.is-playing .ico-play { display: none; }
.round-btn.is-playing .ico-pause { display: block; }

.time {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  font-variant-numeric: tabular-nums; min-width: 38px;
}

.scrub { flex: 1; padding: 10px 0; cursor: pointer; min-width: 100px; }
.scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.scrub-track {
  position: relative; height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}
.scrub-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.scrub-loop {
  position: absolute; top: -2px; bottom: -2px; border-radius: 3px;
  background: rgba(255, 197, 61, 0.25); border-left: 2px solid var(--warn); border-right: 2px solid var(--warn);
}
.scrub-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
  margin: -6px 0 0 -6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 10px rgba(47, 184, 255, 0.8); pointer-events: none;
}

.chip-btn {
  padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-faint); background: var(--panel);
}
.chip-btn:hover { color: var(--text); }
.chip-btn.is-on { color: var(--warn); border-color: rgba(255, 197, 61, 0.5); background: rgba(255, 197, 61, 0.12); }

.slider-group { display: flex; align-items: center; gap: 9px; }
.slider-label { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.slider-group output {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  min-width: 46px; text-align: right; font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px; width: 116px;
  background: rgba(255, 255, 255, 0.13); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(47, 184, 255, 0.6); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(47, 184, 255, 0.6); cursor: pointer;
}

.hud { display: flex; gap: 18px; }
.hud-item { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.hud-item span {
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: color .2s;
}
.hud-item label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .07em; }
.hud-item.pulse span { color: var(--good); }

/* ---------- Drawer ---------- */

.drawer {
  grid-area: drawer;
  width: var(--drawer-w); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0B1222, #070B16);
  border-left: 1px solid var(--line);
  transition: margin-right .28s cubic-bezier(.4, 0, .2, 1);
  z-index: 7;
}
.drawer:not(.is-open) { margin-right: calc(-1 * var(--drawer-w)); }

.drawer-tabs { display: flex; padding: 10px 12px 0; gap: 4px; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; padding: 10px 6px; font-size: 13px; font-weight: 550;
  color: var(--text-faint); border-bottom: 2px solid transparent; transition: all .15s;
}
.tab:hover { color: var(--text-dim); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.drawer-body::-webkit-scrollbar { width: 9px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 5px; }

.panel { display: none; padding: 18px 16px 40px; }
.panel.is-active { display: block; }
.panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 10px; }
.panel h2.mt { margin-top: 26px; }
.hint { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; margin: 0 0 12px; }

.link-btn { float: right; font-size: 11px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.link-btn:hover { text-decoration: underline; }

.song-list { display: flex; flex-direction: column; gap: 6px; }
.song-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--radius-sm); text-align: left;
  border: 1px solid transparent; background: var(--panel); transition: all .14s;
}
.song-item:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--line); }
.song-item.is-active { border-color: var(--accent); background: rgba(47, 184, 255, 0.1); }
.song-item-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px;
  background: linear-gradient(145deg, rgba(47, 184, 255, .25), rgba(169, 107, 255, .25));
}
.song-item-body { flex: 1; min-width: 0; }
.song-item-title { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-item-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.song-del {
  opacity: 0; padding: 4px 7px; border-radius: 6px; font-size: 15px; line-height: 1;
  color: var(--text-faint); transition: all .14s;
}
.song-item:hover .song-del { opacity: 1; }
.song-del:hover { color: var(--bad); background: rgba(255, 91, 114, 0.14); }
.empty { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; margin: 4px 0; }

.field-row { display: flex; gap: 8px; }
.field-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3);
}
.field-row input:focus { outline: none; border-color: var(--accent); background: rgba(0, 0, 0, 0.45); }
.solid-btn {
  padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  color: #04121C; background: linear-gradient(145deg, #66D9FF, var(--accent)); white-space: nowrap;
}
.solid-btn:hover { filter: brightness(1.08); }
.solid-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px dashed rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.02);
  color: var(--text-faint); text-align: center; transition: all .16s;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--accent); background: rgba(47, 184, 255, 0.07); color: var(--text-dim);
}
.dropzone svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropzone p { margin: 0; font-size: 13px; line-height: 1.5; }
.dropzone span { font-size: 11.5px; opacity: .7; }

/* ---------- Bijstellen van een geimporteerd nummer ---------- */

.tune-summary {
  padding: 12px 14px; border-radius: var(--radius); margin-bottom: 18px;
  background: rgba(47, 184, 255, 0.07); border: 1px solid rgba(47, 184, 255, 0.25);
  font-size: 12.5px; line-height: 1.6; color: var(--text-dim);
}
.tune-summary strong { color: var(--text); }
.tune-summary .tune-key {
  display: inline-block; padding: 1px 7px; border-radius: 5px; margin-left: 2px;
  background: rgba(169, 107, 255, .22); color: #DFC5FF; font-weight: 650;
}

/* ---------- Sporenkiezer voor MIDI-uploads ---------- */

.track-picker {
  margin-top: 18px; padding: 14px; border-radius: var(--radius);
  background: rgba(47, 184, 255, 0.06); border: 1px solid rgba(47, 184, 255, 0.28);
}
.track-picker[hidden] { display: none; }
.track-picker h2 { color: var(--accent); margin-bottom: 8px; }

.track-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.track-row {
  display: flex; flex-direction: column; gap: 0; padding: 9px 11px;
  border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(0, 0, 0, 0.25); border: 1px solid transparent; transition: all .14s;
}
.track-row:hover { background: rgba(0, 0, 0, 0.4); }
.track-row.is-on { border-color: rgba(47, 184, 255, 0.45); background: rgba(47, 184, 255, 0.1); }
.track-row.is-drums { opacity: .5; }

.track-main { display: flex; align-items: center; gap: 10px; }
.track-row input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer;
}
.track-body { flex: 1; min-width: 0; }
.track-name {
  font-size: 12.5px; font-weight: 550; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.track-sub { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.track-tag {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 6px; border-radius: 5px; flex-shrink: 0;
}
.track-tag.melody { background: rgba(47, 184, 255, .2); color: #9BE5FF; }
.track-tag.bass { background: rgba(169, 107, 255, .2); color: #DFC5FF; }
.track-tag.drums { background: rgba(255, 255, 255, .08); color: var(--text-faint); }

/* Rolkeuze op een eigen regel: naast de spoornaam werd hij over het hoofd gezien. */
.track-role {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; padding-top: 8px; padding-left: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px; color: var(--text-faint);
}
.track-role[hidden] { display: none; }
.track-hand {
  flex: 1; min-width: 0; padding: 5px 8px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); color: var(--text-dim);
  cursor: pointer;
}
.track-hand:disabled { opacity: .35; }
.track-hand.is-left { color: #DFC5FF; border-color: rgba(169, 107, 255, .5); }
.track-hand.is-right { color: #9BE5FF; border-color: rgba(47, 184, 255, .5); }

.track-actions { display: flex; gap: 8px; margin-top: 12px; }
.ghost-btn.small { padding: 10px 16px; font-size: 13px; border-radius: var(--radius-sm); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt-grid label, .row-field {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.opt-grid label.span2, .opt-grid .span2 { grid-column: span 2; }
.opt-grid small, .row-field small { color: var(--text-faint); font-size: 11px; }
select, .row-field select {
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--text);
}
select:focus { outline: none; border-color: var(--accent); }
.row-field { margin-bottom: 12px; }
.row-field input[type="range"] { width: 100%; }

.check-field {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  font-size: 13px; color: var(--text-dim); cursor: pointer;
}
.check-field input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.shortcuts { list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--text-faint); }
.shortcuts li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }

.notice {
  padding: 10px 13px; border-radius: var(--radius-sm); margin-bottom: 16px;
  font-size: 12.5px; line-height: 1.5;
  background: rgba(255, 197, 61, 0.1); border: 1px solid rgba(255, 197, 61, 0.3); color: #FFE0A0;
}
.notice[hidden] { display: none; }

.jobs { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.job {
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
}
.job-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.job-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.job-pct { font-family: var(--mono); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.job-msg { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; line-height: 1.45; }
.job-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); margin-top: 8px; overflow: hidden; }
.job-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s; }
.job.is-error { border-color: rgba(255, 91, 114, 0.4); }
.job.is-error .job-msg { color: #FFB3BE; }
.job.is-done { border-color: rgba(53, 224, 138, 0.35); }

.drawer-scrim { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  :root { --drawer-w: 340px; }
  .brand-text, .btn-label { display: none; }
  .transport-side { gap: 14px; }
  input[type="range"] { width: 92px; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "top" "stage" "bottom"; }
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 92vw);
    box-shadow: var(--shadow);
  }
  .drawer-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 6; }
  .drawer-scrim[hidden] { display: none; }
  .mode-btn { padding: 6px 10px; font-size: 12px; }
  .transport { gap: 12px; padding: 9px 12px; }
  .transport-main { min-width: 100%; }
  .transport-side { width: 100%; justify-content: space-between; }
  .hud { gap: 14px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .overlay-card { padding: 26px 24px; margin: 16px; }
}

/* Vier modusknoppen passen niet meer naast brand + acties: eigen regel eronder. */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; gap: 12px; }
  .mode-switch { order: 4; flex-basis: 100%; }
  .mode-switch .mode-btn { flex: 1; }
}

@media (max-width: 560px) {
  .slider-group:nth-child(2) { display: none; }
  .song-info { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
