/* DØKI deck – design tokens */
:root {
  --bg: #08080a;
  --chassis-top: #25262a;
  --chassis-mid: #1a1b1e;
  --chassis-bottom: #151619;
  --edge: #36383e;
  --key-top: #2e3035;
  --key-bottom: #1f2125;
  --key-edge: #3c3f45;
  --key-shadow: 0 2px 0 #0a0a0b, inset 0 1px 0 #4a4d54;
  --ink: #eef2f7;
  --text: #c9ced6;
  --muted: #8a929c;
  --screen: #04060a;
  --screen-bar: #0d1117;
  --screen-line: #1d232b;
  --screen-muted: #8a96a3;
  --amber: #ffb020;
  --blue: #3fa9ff;
  --green: #3fd27a;
  --pink: #ff5fa2;
  --red: #ff3b3b;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --press: transform 160ms var(--ease-out), filter 160ms ease, box-shadow 160ms ease, color 160ms ease, border-color 160ms ease;
  --f-hw: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-screen: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 35%, #1a1b1e 0%, var(--bg) 70%);
  color: var(--text);
  font-family: var(--f-hw);
}
h1, h2, p { margin: 0; }
a { color: var(--amber); }

button, a, [role="slider"], .key, .pad, .track, .tab {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
button, a.key { transition: var(--press); }
button:active, a.key:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  button:hover, a.key:hover { filter: brightness(1.15); }
}

/* ---------- Stage & chassis ---------- */
.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.deck {
  position: relative;
  width: 1180px;
  background: linear-gradient(180deg, var(--chassis-top) 0%, var(--chassis-mid) 55%, var(--chassis-bottom) 100%);
  border: 1px solid var(--edge);
  border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0,0,0,0.75), 0 2px 0 #0a0a0b, inset 0 1px 0 #44464c, inset 0 -2px 0 #0d0e10;
  padding: 20px 34px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  isolation: isolate;
}
.deck::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  pointer-events: none;
  z-index: -1;
}
.screw { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6a6d74, #1c1d20); box-shadow: inset 0 0 0 1px #0d0e10; }
.screw.tl { top: 12px; left: 12px; } .screw.tr { top: 12px; right: 12px; }
.screw.bl { bottom: 12px; left: 12px; } .screw.br { bottom: 12px; right: 12px; }

.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em; color: var(--muted);
  border-bottom: 1px solid #34363b; padding-bottom: 3px;
}
.led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #3a3d42; }
.led-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.led-blue { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.led-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.led.is-off { background: #2c2e33; box-shadow: none; }

/* ---------- Top bar ---------- */
.deck-top { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 16px; }
.brand { font-size: 32px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink); text-shadow: 0 1px 0 #000; }
.brand-sub { font-size: 14px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); margin-left: 10px; }
.vent { width: 260px; height: 12px; border-radius: 6px; background: repeating-linear-gradient(90deg, #0b0c0e 0 6px, transparent 6px 10px); box-shadow: inset 0 1px 2px #000; }
.power { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); }

/* ---------- Main row ---------- */
.deck-main { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; gap: 22px; height: 352px; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.key {
  height: 30px; border-radius: 5px; padding: 0 6px;
  background: linear-gradient(180deg, var(--key-top), var(--key-bottom));
  border: 1px solid var(--key-edge); box-shadow: var(--key-shadow);
  color: var(--text); font-family: var(--f-hw); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.key.is-on, .key[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px rgba(255,176,32,0.45), var(--key-shadow); }
#sync[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); box-shadow: 0 0 10px rgba(63,169,255,0.5), var(--key-shadow); }
.range-row .key[aria-pressed="true"] { color: var(--green); border-color: var(--green); box-shadow: var(--key-shadow); }
.key-link { height: 46px; justify-content: flex-start; gap: 10px; padding: 0 12px; font-size: 16px; font-weight: 600; letter-spacing: 0.08em; color: #d5dae1; }
.key-link.is-empty { opacity: 0.55; cursor: default; }
.key-pill { border-radius: 15px; }
.key-sm { height: 26px; font-size: 11px; padding: 0; }

.usb { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.usb-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); }
.usb-slot { height: 22px; border-radius: 3px; background: #050506; border: 1px solid var(--key-edge); box-shadow: inset 0 2px 4px #000; display: flex; align-items: center; justify-content: center; }
.usb-slot span { width: 70px; height: 6px; border-radius: 1px; background: #1c1d20; box-shadow: inset 0 0 0 1px #2c2e33; }

.knob-row { display: flex; align-items: center; gap: 12px; }
.knob { width: 72px; height: 72px; border-radius: 50%; border: none; padding: 0; background: repeating-conic-gradient(#4a4d54 0deg 4deg, #26282c 4deg 8deg); box-shadow: 0 4px 10px rgba(0,0,0,0.6), 0 0 0 2px #0d0e10; display: flex; align-items: center; justify-content: center; }
.knob-cap { position: relative; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #6a6d74, #2c2e33 70%); box-shadow: inset 0 1px 0 #8a8e96; transition: transform 180ms var(--ease-out); }
.knob-mark { position: absolute; top: 5px; left: 50%; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.hint { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); line-height: 1.5; }

/* ---------- Screen ---------- */
.bezel { position: relative; background: #0a0a0b; border-radius: 10px; padding: 8px; box-shadow: 0 0 0 1px #3a3c42, inset 0 2px 6px #000, 0 1px 0 #44464c; min-width: 0; }
.screen { position: relative; height: 100%; background: var(--screen); border-radius: 4px; font-family: var(--f-screen); color: #e8eef5; display: flex; flex-direction: column; overflow: hidden; }
.glare { position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.015) 28%, transparent 45%); pointer-events: none; }
.screen-top { height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; background: var(--screen-bar); border-bottom: 1px solid var(--screen-line); padding-right: 10px; gap: 10px; }
.tabs { display: flex; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 28px; border: none; border-right: 1px solid var(--screen-line); background: transparent; color: var(--screen-muted); font-family: var(--f-screen); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; padding: 0 14px; white-space: nowrap; }
.tab:active { transform: none; }
.tab[aria-selected="true"] { color: #0a0a0b; }
.tab.c-amber[aria-selected="true"] { background: var(--amber); }
.tab.c-blue[aria-selected="true"] { background: var(--blue); }
.tab.c-green[aria-selected="true"] { background: var(--green); }
.tab.c-pink[aria-selected="true"] { background: var(--pink); }
.screen-status { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.08em; color: var(--screen-muted); white-space: nowrap; }
.status { font-weight: 700; }
.status.is-playing { color: var(--green); }
.screen-body { flex: 1; padding: 8px 14px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a313b transparent; }
.screen-foot { height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--screen-bar); border-top: 1px solid var(--screen-line); padding: 0 12px; font-size: 11px; letter-spacing: 0.06em; color: var(--screen-muted); white-space: nowrap; overflow: hidden; }
.screen-foot b { color: #e8eef5; }
.screen-foot b.is-zero { color: var(--green); }
.screen-foot b.amber, .screen-foot b.is-on { color: var(--amber); }
.muted { color: var(--screen-muted); }
.xs { font-size: 10px; letter-spacing: 0.1em; }

.panel { display: flex; flex-direction: column; gap: 6px; }
.panel[hidden] { display: none; }
.now { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 26px; }
.now-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.now-title strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-title .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 10px; font-weight: 700; background: #e8eef5; color: var(--screen); border-radius: 2px; padding: 2px 5px; }
.now-time { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.big { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
#remain { font-variant-numeric: tabular-nums; }

.wave-zoom { position: relative; height: 62px; background: #070a0f; border-top: 1px solid #141a21; border-bottom: 1px solid #141a21; }
.wave-zoom canvas, .wave-over canvas { display: block; width: 100%; height: 100%; }
.playhead { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--red); box-shadow: 0 0 6px var(--red); }
.playhead::before { content: ""; position: absolute; top: 0; left: -4px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--red); }
.wave-over { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.embed-slot { height: 120px; background: #070a0f; border: 1px solid #141a21; }
.embed-slot iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-slot .embed-empty { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--screen-muted); padding: 0 16px; text-align: center; }
.deck[data-mode="embed"] .wave-zoom, .deck[data-mode="embed"] .wave-over { display: none; }

.track-head, .track { display: grid; grid-template-columns: 44px minmax(0, 1fr) 220px 80px; align-items: center; padding: 0 8px; }
.track-head { font-size: 10px; color: var(--screen-muted); letter-spacing: 0.12em; border-top: 1px solid #141a21; padding-top: 4px; }
.tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.track { width: 100%; height: 26px; border: none; border-radius: 2px; background: transparent; color: #e8eef5; font-family: var(--f-screen); font-size: 12px; text-align: left; }
.track:active { transform: none; }
.track > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-genre, .track .t-len { color: var(--screen-muted); }
.track.is-sel { background: var(--amber); color: #0a0a0b; }
.track.is-sel .t-genre, .track.is-sel .t-len { color: #0a0a0b; }
.tracks .empty { font-size: 12px; color: var(--screen-muted); padding: 8px; }

.booking { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.booking label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--screen-muted); letter-spacing: 0.1em; }
.booking input, .booking select, .booking textarea { height: 32px; background: var(--screen-bar); border: 1px solid #2a313b; border-radius: 3px; color: #e8eef5; padding: 0 8px; font-family: var(--f-screen); font-size: 13px; color-scheme: dark; }
.booking textarea { height: 56px; padding: 6px 8px; resize: none; }
.booking input:focus-visible, .booking select:focus-visible, .booking textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.form-status { font-size: 12px; color: var(--screen-muted); }
.form-status.ok { color: var(--green); }
.form-status.err { color: #ff8a8a; }
.send { height: 32px; border: none; border-radius: 3px; background: var(--blue); color: #04060a; font-family: var(--f-screen); font-size: 13px; font-weight: 700; padding: 0 18px; box-shadow: 0 0 14px rgba(63,169,255,0.35); white-space: nowrap; }
.send[disabled] { opacity: 0.6; cursor: progress; }

.refs { width: 100%; border-collapse: collapse; font-size: 13px; }
.refs th { text-align: left; font-size: 10px; font-weight: 400; color: var(--screen-muted); letter-spacing: 0.12em; padding: 0 8px 6px; border-bottom: 1px solid var(--screen-line); }
.refs td { height: 34px; padding: 0 8px; border-bottom: 1px solid #141a21; }
.r-year { color: var(--green); font-weight: 700; width: 90px; }

.bio { display: flex; gap: 18px; }
.bio-photo { width: 190px; height: 248px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.bio-photo.is-empty { border: 1px dashed #2a313b; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--screen-muted); }
.bio-text { display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }
.bio-text h2 { font-size: 26px; }
.bio-style { font-size: 12px; color: var(--pink); letter-spacing: 0.1em; }
.bio-text p:not(.bio-style) { font-size: 13px; line-height: 1.6; color: #c9d1db; }

/* ---------- Bottom row ---------- */
.deck-bottom { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 6px; gap: 16px; }
.grp { display: flex; gap: 18px; align-items: flex-end; }
.loop-cluster { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; width: 124px; }
.key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.loop-cluster .label + .key-grid + .label { margin-top: 6px; }
.transport { display: flex; flex-direction: column; gap: 20px; align-items: center; padding-bottom: 4px; }
.round { width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #34363b, #1d1e21 70%); border: 3px solid; box-shadow: 0 3px 0 #0a0a0b, inset 0 1px 0 #4a4d54; display: flex; align-items: center; justify-content: center; }
.round.cue { border-color: var(--amber); color: var(--amber); font-family: var(--f-hw); font-size: 21px; font-weight: 700; letter-spacing: 0.08em; box-shadow: 0 0 16px rgba(255,176,32,0.45), 0 3px 0 #0a0a0b, inset 0 1px 0 #4a4d54; }
.round.play { border-color: #2f6e48; color: #2f6e48; }
.round.play .i-pause { display: none; }
.deck.is-playing .round.play { border-color: var(--green); color: var(--green); box-shadow: 0 0 18px rgba(63,210,122,0.55), 0 3px 0 #0a0a0b, inset 0 1px 0 #4a4d54; }
.deck.is-playing .round.play .i-play { display: none; }
.deck.is-playing .round.play .i-pause { display: block; }
.deck[data-mode="embed"] .round, .deck[data-mode="embed"] .loop-cluster .key, .deck[data-mode="embed"] .fader { opacity: 0.45; }

.grp-center { flex-direction: column; align-items: center; gap: 10px; }
.label-center { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; color: var(--muted); }
.pads { display: flex; gap: 10px; }
.pad { position: relative; width: 144px; height: 50px; border-radius: 7px; background: linear-gradient(180deg, var(--key-top), var(--key-bottom)); border: 1px solid var(--key-edge); box-shadow: 0 3px 0 #0a0a0b, inset 0 1px 0 #4a4d54; color: #9aa1ab; font-size: 17px; font-weight: 700; letter-spacing: 0.06em; display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 0; overflow: hidden; }
.pad-led { position: absolute; top: 0; left: 0; right: 0; height: 5px; opacity: 0.28; transition: opacity 160ms ease, box-shadow 160ms ease; }
.pad.c-amber .pad-led { background: var(--amber); } .pad.c-blue .pad-led { background: var(--blue); }
.pad.c-green .pad-led { background: var(--green); } .pad.c-pink .pad-led { background: var(--pink); }
.pad.is-on { color: #fff; }
.pad.is-on .pad-led { opacity: 1; box-shadow: 0 0 14px currentColor; }
.pad.c-amber.is-on .pad-led { box-shadow: 0 0 14px var(--amber); } .pad.c-blue.is-on .pad-led { box-shadow: 0 0 14px var(--blue); }
.pad.c-green.is-on .pad-led { box-shadow: 0 0 14px var(--green); } .pad.c-pink.is-on .pad-led { box-shadow: 0 0 14px var(--pink); }

.jog-wrap { --jog: 240px; position: relative; width: calc(var(--jog) + 28px); height: calc(var(--jog) + 28px); display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; inset: 0; }
.ring span { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #2a2c30; }
.ring span.on { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.jog { position: relative; width: var(--jog); height: var(--jog); border-radius: 50%; border: none; padding: 0; background: repeating-conic-gradient(#2c2e33 0deg 5deg, #17181b 5deg 10deg); box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 0 3px #0d0e10, 0 0 0 5px #34363b; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.jog:active { transform: scale(0.99); cursor: grabbing; }
.jog-chrome { width: 85%; height: 85%; border-radius: 50%; background: conic-gradient(from 20deg, #9ea3ab, #4c5057, #c8ccd2, #4c5057, #9ea3ab, #3e4147, #c8ccd2, #4c5057, #9ea3ab); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px #0d0e10; }
.platter { position: relative; width: 94%; height: 94%; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, #121316 0 2px, #1b1c20 3px, #121316 4px); box-shadow: inset 0 0 18px #000; display: flex; align-items: center; justify-content: center; will-change: transform; }
.platter-mark { position: absolute; top: 4%; left: 50%; width: 4px; height: 12%; margin-left: -2px; border-radius: 2px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.jog-center { --p: 0deg; width: 52%; height: 52%; border-radius: 50%; background: conic-gradient(var(--amber) 0deg var(--p), #1d232b var(--p) 360deg); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(255,176,32,0.25); }
.jog-center-in { width: 86%; height: 86%; border-radius: 50%; background: var(--screen); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.jog-brand { font-size: 19px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink); }
.jog-time { font-family: var(--f-screen); font-size: 10px; color: var(--amber); font-variant-numeric: tabular-nums; }
.jog-glare { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(140deg, rgba(255,255,255,0.08), transparent 45%); pointer-events: none; }

.grp-tempo { gap: 16px; }
.tempo-keys { width: 116px; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.range-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.reset { display: flex; align-items: center; gap: 8px; margin-top: 6px; background: none; border: none; padding: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; line-height: 1.3; text-align: left; }
.reset-cap { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #4a4d54, #1d1e21); border: 1px solid #0d0e10; box-shadow: 0 2px 0 #0a0a0b; flex-shrink: 0; }
.deck.tempo-zero .reset-cap { box-shadow: 0 2px 0 #0a0a0b, 0 0 0 2px rgba(63,210,122,0.6); }

.fader-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 80px; }
.fader-val { font-family: var(--f-screen); font-size: 12px; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.fader-val.is-zero { color: var(--green); }
.fader { --h: 260px; position: relative; width: 70px; height: var(--h); display: flex; justify-content: center; touch-action: none; cursor: grab; border-radius: 6px; }
.fader.is-drag { cursor: grabbing; }
.fader[aria-disabled="true"] { cursor: not-allowed; }
.fader-scale { position: absolute; top: 0; bottom: 0; width: 12px; background: repeating-linear-gradient(180deg, #5c6068 0 1px, transparent 1px 13px); }
.fader-scale.l { left: 4px; } .fader-scale.r { right: 4px; }
.fader-zero { position: absolute; top: calc(50% - 1px); left: 0; right: 0; height: 2px; background: var(--green); opacity: 0.45; }
.deck.tempo-zero .fader-zero { opacity: 1; box-shadow: 0 0 6px var(--green); }
.fader-track { width: 10px; height: 100%; border-radius: 5px; background: #050506; box-shadow: inset 0 1px 3px #000, 0 1px 0 #34363b; }
.fader-handle { position: absolute; left: 50%; top: 0; width: 56px; height: 28px; margin-left: -28px; border-radius: 4px; background: linear-gradient(180deg, #5a5d64, #2c2e33 45%, #3a3d42); border: 1px solid #1a1b1e; box-shadow: 0 4px 8px rgba(0,0,0,0.6); pointer-events: none; transition: transform 180ms var(--ease-out); will-change: transform; }
.fader.is-drag .fader-handle { transition: none; }
.fader-handle span { position: absolute; left: 6px; right: 6px; top: 13px; height: 2px; background: var(--ink); }
.deck.tempo-zero .fader-handle span { background: var(--green); }
.fader-hint { font-size: 12px; font-weight: 600; color: var(--muted); }

.stage-foot { width: min(1180px, 100%); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; letter-spacing: 0.1em; color: var(--muted); }
.noscript { text-align: center; color: var(--muted); padding: 12px; }

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

/* ---------- Narrower screens: same deck, stacked ---------- */
@media (max-width: 1239px) {
  .stage { justify-content: flex-start; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .deck {
    width: min(720px, 100%);
    padding: 18px 18px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "screen screen"
      "center center"
      "transport transport"
      "tempo tempo"
      "left right";
    gap: 18px 14px;
  }
  .deck-main, .deck-bottom { display: contents; }
  .deck-top { grid-area: top; }
  .bezel { grid-area: screen; height: 400px; }
  .col-left { grid-area: left; }
  .col-right { grid-area: right; }
  .grp-center { grid-area: center; }
  .grp-transport { grid-area: transport; justify-content: space-between; }
  .grp-tempo { grid-area: tempo; justify-content: space-between; }
  .vent { display: none; }
  .usb { display: none; }
  .knob-row { order: 0; }
  .transport { flex-direction: row; }
  .pads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .pad { width: auto; }
  .jog-wrap { --jog: min(68vw, 300px); }
  .tempo-keys { width: auto; flex: 1; }
  .range-row { max-width: 200px; }
}

@media (max-width: 560px) {
  .deck { border-radius: 16px; gap: 16px 10px; padding: 16px 12px 20px; }
  .brand { font-size: 26px; }
  .brand-sub { display: none; }
  .bezel { height: 430px; padding: 6px; }
  .screen-status .path { display: none; }
  .screen-foot span:nth-child(4), .screen-foot span:nth-child(6) { display: none; }
  .track-head, .track { grid-template-columns: 34px minmax(0, 1fr) 64px; }
  .track-head span:nth-child(3), .track .t-genre { display: none; }
  .now { flex-wrap: wrap; }
  .grid2 { grid-template-columns: 1fr; }
  .bio { flex-direction: column; }
  .bio-photo { width: 100%; height: 220px; }
  .grp-transport { flex-direction: column-reverse; align-items: stretch; }
  .transport { justify-content: center; gap: 28px; }
  .loop-cluster { width: 100%; }
  .loop-cluster .key-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .key { height: 40px; font-size: 13px; }
  .key-sm { height: 34px; }
  .key-link { height: 44px; font-size: 15px; padding: 0 10px; }
  .fader { --h: 220px; }
}

@media (pointer: coarse) {
  .booking input, .booking select, .booking textarea { font-size: 16px; height: 40px; }
  .booking textarea { height: 80px; }
  .track { height: 36px; font-size: 13px; }
}
