:root {
  --night: #07021a;
  --deep: #12052e;
  --panel: rgba(20, 6, 48, 0.62);
  --pink: #ff2bd6;
  --hot: #ff3d7f;
  --cyan: #29f4ff;
  --orange: #ff9a3c;
  --yellow: #ffe45c;
  --violet: #9b5cff;
  --ink: #f6e9ff;
  --dim: #a98fd1;
  --glow-pink: 0 0 6px var(--pink), 0 0 18px rgba(255, 43, 214, 0.7), 0 0 42px rgba(255, 43, 214, 0.35);
  --glow-cyan: 0 0 6px var(--cyan), 0 0 18px rgba(41, 244, 255, 0.6), 0 0 40px rgba(41, 244, 255, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  overflow-x: hidden;
}

#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 2px 3px);
  mix-blend-mode: multiply;
}

/* ---------- header ---------- */
.top {
  position: relative; z-index: 30; /* above the rack, so the account menu opens over the panels */
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 28px 6px;
}
.logo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.logo-main {
  font-family: 'Monoton', cursive; font-size: 46px; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ffe9fb 30%, var(--pink) 55%, #5a12a8 56%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 43, 214, 0.8)) drop-shadow(0 0 30px rgba(155, 92, 255, 0.5));
}
.logo-script {
  font-family: 'Pacifico', cursive; font-size: 34px; color: var(--yellow);
  transform: rotate(-8deg) translate(-10px, 6px); display: inline-block;
  text-shadow: 0 0 6px var(--orange), 0 0 20px var(--hot), 0 0 40px var(--hot);
}
.logo-sub { width: 100%; font-family: 'VT323', monospace; font-size: 17px; color: var(--cyan); text-shadow: var(--glow-cyan); letter-spacing: 0.3em; text-transform: uppercase; margin-top: -4px; }

.modes { display: flex; gap: 0; border: 1px solid var(--pink); border-radius: 999px; box-shadow: var(--glow-pink); padding: 3px; background: rgba(10, 2, 30, 0.7); }
.mode-btn {
  font: 700 13px 'Orbitron', sans-serif; letter-spacing: 0.2em; color: var(--dim);
  background: transparent; border: 0; padding: 10px 26px; border-radius: 999px; cursor: pointer; transition: all 0.2s;
}
.mode-btn.active { color: #12002a; background: linear-gradient(90deg, var(--pink), var(--orange)); box-shadow: 0 0 18px var(--pink); }

.top-right { display: flex; align-items: center; gap: 16px; }
.leds { display: flex; gap: 14px; }
.led { font-size: 10px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.led::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #3a1d55; box-shadow: inset 0 0 3px #000; }
.led.on { color: var(--ink); }
.led.on::before { background: #4dff9a; box-shadow: 0 0 6px #4dff9a, 0 0 14px #4dff9a; }
.led.off::before { background: #ff3d5a; box-shadow: 0 0 6px #ff3d5a; }

/* ---------- layout ---------- */
.rack {
  position: relative; z-index: 2;
  display: grid; gap: 16px; padding: 12px 28px 34px;
  grid-template-columns: minmax(280px, 330px) minmax(420px, 1fr) minmax(280px, 330px);
  grid-template-areas: 'band stage fx' 'booth booth booth';
  align-items: start;
}
.band { grid-area: band; }
.stage { grid-area: stage; }
.fxbox { grid-area: fx; }
.booth { grid-area: booth; }

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 43, 214, 0.55);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(41, 244, 255, 0.12) inset, 0 0 24px rgba(255, 43, 214, 0.25), 0 20px 60px rgba(0, 0, 0, 0.5);
}
.panel-title {
  margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline;
  font-size: 15px; font-weight: 900; letter-spacing: 0.25em; color: var(--pink); text-shadow: var(--glow-pink);
}
.panel-title small { font-family: 'VT323', monospace; font-size: 15px; letter-spacing: 0.12em; color: var(--cyan); text-shadow: var(--glow-cyan); font-weight: 400; }

body[data-mode='live'] .track-only { display: none !important; }
body[data-mode='track'] .live-only { display: none !important; }

/* ---------- controls ---------- */
.btn {
  font: 700 12px 'Orbitron', sans-serif; letter-spacing: 0.16em; color: var(--cyan);
  background: rgba(8, 2, 26, 0.75); border: 1px solid var(--cyan); border-radius: 8px;
  padding: 10px 16px; cursor: pointer; text-shadow: 0 0 6px var(--cyan);
  box-shadow: 0 0 10px rgba(41, 244, 255, 0.35), inset 0 0 10px rgba(41, 244, 255, 0.1);
  transition: transform 0.08s, box-shadow 0.2s, background 0.2s; white-space: nowrap;
}
.btn:hover { box-shadow: var(--glow-cyan), inset 0 0 14px rgba(41, 244, 255, 0.25); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: wait; }
.btn.small { padding: 6px 12px; }
.btn.big { font-size: 15px; padding: 14px 30px; }
.btn.play { color: #160026; background: linear-gradient(90deg, var(--pink), var(--orange)); border-color: transparent; text-shadow: none; box-shadow: var(--glow-pink); }
.btn.play.on { background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: var(--glow-cyan); }
.btn.rec { color: var(--hot); border-color: var(--hot); text-shadow: 0 0 6px var(--hot); box-shadow: 0 0 10px rgba(255, 61, 127, 0.4); }
.btn.rec.on { background: var(--hot); color: #fff; animation: pulse 1s infinite; }
.btn[aria-pressed='true'], .btn.on { background: rgba(41, 244, 255, 0.2); }
.btn.busy { animation: pulse 0.9s infinite; }
.btn.file { display: inline-flex; align-items: center; }
@keyframes pulse { 50% { opacity: 0.55; } }

input, textarea, select {
  font: 20px 'VT323', monospace; color: var(--ink); background: rgba(5, 0, 20, 0.75);
  border: 1px solid rgba(155, 92, 255, 0.7); border-radius: 8px; padding: 6px 10px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
textarea { width: 100%; resize: vertical; line-height: 1.05; font-size: 18px; }
select { font-size: 17px; padding: 3px 6px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.select-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--dim); font-size: 10px; letter-spacing: 0.18em; }
.select-row select { flex: 1; }
.select-row.compact { margin: 0; }
.select-row.compact select { flex: none; }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.toggle { display: inline-flex; cursor: pointer; }
.toggle input { display: none; }
.toggle span {
  font-size: 10px; letter-spacing: 0.14em; padding: 6px 10px; border-radius: 6px; color: var(--dim);
  border: 1px solid rgba(155, 92, 255, 0.6); transition: all 0.2s;
}
.toggle input:checked + span { color: #14001f; background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 12px var(--orange); }

/* ---------- prompt mixer ---------- */
.prompt-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.prompt {
  position: relative; border: 1px solid rgba(41, 244, 255, 0.45); border-radius: 10px; padding: 8px 10px 10px;
  background: linear-gradient(90deg, rgba(41, 244, 255, 0.10), rgba(255, 43, 214, 0.06));
}
.prompt.filtered { border-color: #ff3d5a; box-shadow: 0 0 12px #ff3d5a; }
.prompt textarea { border: 0; background: transparent; padding: 0 16px 0 0; resize: none; overflow: hidden; font-size: 17px; color: var(--ink); min-height: 2.2em; box-shadow: none !important; }
.prompt .weight { display: flex; align-items: center; gap: 8px; }
.prompt .weight output { font: 17px 'VT323', monospace; color: var(--yellow); width: 34px; text-align: right; }
.prompt .x { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 14px; }
.prompt .x:hover { color: var(--hot); }
.add-prompt { display: flex; gap: 6px; margin-top: 10px; }
.add-prompt input { flex: 1; min-width: 0; font-size: 17px; }

input[type='range'] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 4px; padding: 0; border: 0;
  background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: 4px; box-shadow: none !important;
}
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--pink); cursor: pointer; }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--pink); }

/* ---------- knobs ---------- */
.knob-row { display: flex; flex-wrap: wrap; gap: 6px 4px; justify-content: space-around; margin-top: 14px; }
.knob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 4px; }
.fx-group { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(155, 92, 255, 0.35); }
.fx-group-title { font-size: 9px; letter-spacing: 0.35em; color: var(--cyan); text-shadow: 0 0 6px var(--cyan); margin: 0 0 6px; }
.fx-group .knob svg { width: 54px; height: 54px; }
.fx-group .knob.hero svg { width: 86px; height: 86px; }
.knob { display: flex; flex-direction: column; align-items: center; gap: 2px; user-select: none; touch-action: none; }
.knob svg { width: 64px; height: 64px; cursor: ns-resize; overflow: visible; }
.knob.hero svg { width: 92px; height: 92px; }
.knob .track { fill: none; stroke: rgba(155, 92, 255, 0.25); stroke-width: 5; stroke-linecap: round; }
.knob .arc { fill: none; stroke: url(#knobGrad); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--pink)); }
.knob .cap { fill: #12042b; stroke: rgba(41, 244, 255, 0.6); stroke-width: 1; }
.knob .needle { stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--cyan)); }
.knob .k-label { font-size: 9px; letter-spacing: 0.16em; color: var(--dim); }
.knob .k-val { font: 18px 'VT323', monospace; color: var(--yellow); text-shadow: 0 0 6px var(--orange); line-height: 1; }
.knob.flash .k-val { color: var(--cyan); text-shadow: var(--glow-cyan); }
.knob-grid .knob.hero { grid-column: 1 / -1; }

.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; }
.presets .btn.mine { color: var(--yellow); border-color: var(--yellow); text-shadow: 0 0 6px var(--orange); box-shadow: 0 0 8px rgba(255, 154, 60, 0.35); }
.presets .btn {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 9px; letter-spacing: 0.08em; padding: 9px 6px;
  color: var(--pink); border-color: var(--pink); text-shadow: 0 0 6px var(--pink); box-shadow: 0 0 8px rgba(255, 43, 214, 0.3);
}
.fxbox .preset-bar { margin-top: 6px; }
#save-fx { flex: 1; font-size: 9px; letter-spacing: 0.12em; padding: 9px 6px; border-style: dashed; }

/* ---------- stage ---------- */
.screen {
  position: relative; border-radius: 12px; overflow: hidden; height: 260px;
  border: 1px solid rgba(41, 244, 255, 0.6); box-shadow: var(--glow-cyan);
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 43, 214, 0.35), transparent 60%), #05000f;
}
#viz { width: 100%; height: 100%; display: block; }
.readout { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.readout div { display: flex; flex-direction: column; align-items: center; }
.readout b { font: 34px 'VT323', monospace; color: var(--yellow); text-shadow: 0 0 8px var(--orange), 0 0 20px var(--hot); line-height: 0.9; }
.readout small { font-size: 8px; color: var(--cyan); letter-spacing: 0.2em; }
.now {
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 20px 'VT323', monospace;
  color: var(--ink); text-shadow: var(--glow-pink); letter-spacing: 0.15em; pointer-events: none; padding: 0 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.waveform-wrap { margin-top: 12px; }
#wave { width: 100%; height: 74px; display: block; border-radius: 8px; border: 1px solid rgba(155, 92, 255, 0.5); background: rgba(5, 0, 20, 0.7); cursor: pointer; }
.versions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.versions button { font: 16px 'VT323', monospace; color: var(--dim); background: transparent; border: 1px solid rgba(155, 92, 255, 0.5); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.versions button.active { color: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px var(--orange); }

.transport { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 10px; }

.pads { display: flex; gap: 8px; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.pad {
  flex: 1; min-width: 78px; max-width: 130px; height: 66px; border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(160deg, rgba(255, 43, 214, 0.22), rgba(41, 12, 90, 0.7));
  border: 1px solid var(--pink); color: var(--ink); font-family: 'Orbitron', sans-serif;
  box-shadow: 0 0 10px rgba(255, 43, 214, 0.4), inset 0 -8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.05s, box-shadow 0.1s; touch-action: none;
}
.pad b { font-size: 13px; letter-spacing: 0.2em; }
.pad small { font: 14px 'VT323', monospace; color: var(--cyan); }
.pad.hit, .pad:active { transform: translateY(2px) scale(0.98); background: linear-gradient(160deg, var(--pink), var(--violet)); box-shadow: var(--glow-pink); }
#chop-len { align-self: center; }

.producer { margin-top: 16px; border-top: 1px dashed rgba(255, 43, 214, 0.4); padding-top: 14px; }
.producer-label { font-size: 11px; font-weight: 900; letter-spacing: 0.3em; color: var(--yellow); text-shadow: 0 0 8px var(--orange); margin-bottom: 8px; }
.producer-row { display: flex; gap: 8px; }
.producer-row input { flex: 1; min-width: 0; font-size: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: 16px 'VT323', monospace; color: var(--cyan); background: rgba(41, 244, 255, 0.07); border: 1px solid rgba(41, 244, 255, 0.4); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.chip:hover { background: rgba(41, 244, 255, 0.2); }
.log { margin-top: 10px; max-height: 120px; overflow-y: auto; font: 17px 'VT323', monospace; display: flex; flex-direction: column-reverse; gap: 2px; }
.log .you { color: var(--dim); }
.log .ai { color: var(--yellow); text-shadow: 0 0 6px rgba(255, 154, 60, 0.6); }
.log .err { color: #ff6b81; }

/* ---------- plan ---------- */
.plan { margin-top: 12px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.plan.empty { font: 18px 'VT323', monospace; color: var(--dim); }
.plan h3 { font-family: 'Pacifico', cursive; font-weight: 400; font-size: 24px; margin: 0 0 4px; color: var(--yellow); text-shadow: 0 0 8px var(--orange), 0 0 22px var(--hot); }
.plan .meta { font: 17px 'VT323', monospace; color: var(--cyan); margin-bottom: 8px; }
.plan .styles { font: 16px 'VT323', monospace; color: var(--dim); margin-bottom: 10px; }
.section { border-left: 2px solid var(--pink); padding: 4px 0 6px 10px; margin-bottom: 10px; }
.section header { display: flex; justify-content: space-between; font-size: 11px; color: var(--pink); letter-spacing: 0.18em; }
.section header input { width: 52px; font-size: 16px; padding: 0 4px; }
.section .s-styles { font: 15px 'VT323', monospace; color: var(--cyan); }
.section textarea { font-size: 17px; margin-top: 4px; min-height: 2.4em; }

/* ---------- booth ---------- */
.booth-body { display: grid; grid-template-columns: 170px minmax(260px, 1fr) minmax(300px, 520px); gap: 16px; align-items: start; }
.booth-io { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.booth-io .btn { width: 100%; text-align: center; justify-content: center; }
.vox-name { font: 16px 'VT323', monospace; color: var(--dim); word-break: break-all; }
.lanes { display: flex; flex-direction: column; gap: 6px; min-height: 120px; border-radius: 10px; border: 1px dashed rgba(41, 244, 255, 0.45); padding: 8px; background: rgba(5, 0, 20, 0.55); }
.booth.drag .lanes { border-style: solid; box-shadow: var(--glow-cyan); }
.lanes-empty { font: 18px 'VT323', monospace; color: var(--dim); margin: auto; text-align: center; padding: 10px; }
.lane { display: grid; grid-template-columns: 44px minmax(60px, 160px) 1fr auto auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; border: 1px solid rgba(155, 92, 255, 0.35); cursor: pointer; }
.lane.selected { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 154, 60, 0.45); }
.lane.muted { opacity: 0.55; }
.lane-name { font: 17px 'VT323', monospace; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-wave { width: 100%; height: 34px; display: block; }
.lane-on, .lane-flag { font: 700 9px 'Orbitron', sans-serif; letter-spacing: 0.1em; color: var(--dim); background: transparent; border: 1px solid rgba(155, 92, 255, 0.55); border-radius: 5px; padding: 5px 6px; cursor: pointer; }
.lane-on.on { color: #14001f; background: #4dff9a; border-color: #4dff9a; box-shadow: 0 0 8px #4dff9a; }
.lane-flag.on { color: #14001f; background: var(--yellow); border-color: var(--yellow); }
.lane-flag.x:hover { color: var(--hot); border-color: var(--hot); }
.lane-edit.disabled { opacity: 0.45; pointer-events: none; }
.lane-edit-name { font: 18px 'VT323', monospace; color: var(--yellow); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booth .knob-row { margin-top: 0; }
.booth .knob svg { width: 52px; height: 52px; }
#mic.on { background: var(--hot); color: #fff; border-color: var(--hot); animation: pulse 1s infinite; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(30px); z-index: 60;
  font: 20px 'VT323', monospace; background: rgba(10, 0, 30, 0.92); color: var(--ink);
  border: 1px solid var(--pink); border-radius: 10px; padding: 10px 18px; box-shadow: var(--glow-pink);
  opacity: 0; transition: all 0.3s; pointer-events: none; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 6px; box-shadow: 0 0 6px var(--pink); }

/* ---------- presets, song head, mix ---------- */
.preset-bar { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.preset-bar select { flex: 1; min-width: 0; }
.song-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.song-title { font-family: 'Pacifico', cursive; font-size: 20px; color: var(--yellow); text-shadow: 0 0 8px var(--orange), 0 0 20px var(--hot); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.versions button.dl { color: var(--cyan); border-color: rgba(41, 244, 255, 0.5); }
.versions button.armed, .row-btn.armed { color: #fff !important; background: var(--hot) !important; border-color: var(--hot) !important; }
.mix-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.knob-row.inline { margin: 0; gap: 8px; flex-wrap: nowrap; }
.knob-row.inline .knob svg { width: 44px; height: 44px; }
.mix-row.no-stems .knob-row.inline { opacity: 0.4; pointer-events: none; }
.stem-state { font: 16px 'VT323', monospace; color: var(--dim); }

/* ---------- account ---------- */
.account { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pink); background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; font: 900 15px 'Orbitron', sans-serif; cursor: pointer; box-shadow: var(--glow-pink); }
.account-menu { position: absolute; right: 0; top: 46px; z-index: 40; min-width: 240px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: rgba(12, 3, 34, 0.96); border: 1px solid var(--pink); border-radius: 10px; box-shadow: var(--glow-pink); }
.account-menu .who { font: 18px 'VT323', monospace; color: var(--ink); word-break: break-all; }
.account-menu .saved { font: 16px 'VT323', monospace; color: var(--cyan); }

/* ---------- sign-in gate ---------- */
.gate { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at 50% 70%, rgba(255, 43, 214, 0.15), rgba(7, 2, 26, 0.55)); }
body.signed-out .gate { display: flex; }
body.signed-out .top, body.signed-out .rack { filter: blur(6px) brightness(0.6); pointer-events: none; user-select: none; }
.gate-card { width: min(440px, 100%); padding: 26px; display: flex; flex-direction: column; gap: 16px; background: rgba(14, 4, 38, 0.88); border: 1px solid var(--pink); border-radius: 16px; box-shadow: var(--glow-pink), 0 30px 80px rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); }
.logo.big { justify-content: center; text-align: center; }
.logo.big .logo-main { font-size: 44px; }
.gate-tabs { display: flex; border: 1px solid var(--pink); border-radius: 999px; padding: 3px; }
.gate-tabs button { flex: 1; font: 700 11px 'Orbitron', sans-serif; letter-spacing: 0.16em; color: var(--dim); background: transparent; border: 0; padding: 9px; border-radius: 999px; cursor: pointer; }
.gate-tabs button.active { color: #12002a; background: linear-gradient(90deg, var(--pink), var(--orange)); }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input { font-size: 22px; }
.gate:not(.signing-up) .up-only { display: none; }
.auth-err { font: 18px 'VT323', monospace; color: #ff6b81; min-height: 1em; }
.btn.google { width: 100%; color: var(--ink); border-color: var(--ink); text-shadow: none; }

/* ---------- the crate ---------- */
.crate { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(460px, 100vw); display: flex; flex-direction: column; padding: 16px; background: rgba(10, 2, 30, 0.95); border-left: 1px solid var(--pink); box-shadow: -10px 0 50px rgba(255, 43, 214, 0.3); transform: translateX(105%); transition: transform 0.28s ease; backdrop-filter: blur(10px); }
.crate.open { transform: none; }
.crate > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.crate > header .panel-title { flex: 1; }
.crate .x { background: none; border: 0; color: var(--dim); font-size: 18px; cursor: pointer; }
.crate-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.crate-tabs button, .crate-filters button { font: 700 10px 'Orbitron', sans-serif; letter-spacing: 0.14em; color: var(--dim); background: transparent; border: 1px solid rgba(155, 92, 255, 0.55); border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.crate-tabs button.active, .crate-filters button.active { color: #14001f; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.crate-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.crate-body { flex: 1; overflow-y: auto; }
.crate-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.crate-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(155, 92, 255, 0.4); background: rgba(41, 244, 255, 0.04); }
.crate-row.active { border-color: var(--yellow); }
.crate-main { flex: 1; min-width: 0; cursor: pointer; }
.crate-title { font: 20px 'VT323', monospace; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crate-main:hover .crate-title { color: var(--yellow); }
.crate-meta { font: 15px 'VT323', monospace; color: var(--dim); }
.crate-empty { font: 18px 'VT323', monospace; color: var(--dim); padding: 12px 0; }
.row-btn { font: 700 10px 'Orbitron', sans-serif; color: var(--cyan); background: transparent; border: 1px solid rgba(41, 244, 255, 0.5); border-radius: 6px; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.row-btn:hover { box-shadow: 0 0 8px var(--cyan); }

/* ---------- ask ---------- */
.ask { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(5, 0, 15, 0.6); padding: 16px; }
.ask[hidden] { display: none; }
.ask-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 18px; background: rgba(14, 4, 38, 0.96); border: 1px solid var(--cyan); border-radius: 12px; box-shadow: var(--glow-cyan); }
.ask-card label { font-size: 11px; letter-spacing: 0.2em; color: var(--cyan); }
.row.end { justify-content: flex-end; margin: 0; }

@media (max-width: 1180px) {
  .rack { grid-template-columns: 1fr 1fr; grid-template-areas: 'stage stage' 'band fx' 'booth booth'; }
  .booth-body { grid-template-columns: 1fr; }
  .booth-io { flex-direction: row; flex-wrap: wrap; }
  .booth-io .btn { width: auto; }
}
@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; padding: 14px 16px 4px; gap: 10px; }
  .top-right { width: 100%; justify-content: space-between; }
  .leds { display: none; }
  .lane { grid-template-columns: 40px 1fr auto auto auto; }
  .lane-wave { display: none; }
  .rack { grid-template-columns: 1fr; grid-template-areas: 'stage' 'band' 'fx' 'booth'; padding: 10px 16px 30px; }
  .logo-main { font-size: 34px; }
  .knob-grid { grid-template-columns: repeat(3, 1fr); }
  .readout b { font-size: 26px; }
}
