:root {
  color-scheme: dark;
  --ink: #f1eee5;
  --muted: #9b998f;
  --line: rgba(241, 238, 229, 0.16);
  --accent: #ef9e47;
  --accent-bright: #ffc278;
  --surface: #0b0b08;
}

* { box-sizing: border-box; }

html { background: var(--surface); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #090907;
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.topbar, main { position: relative; z-index: 2; }

.topbar {
  height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 6, 0.28);
  backdrop-filter: blur(12px);
}

.headphone-note, .eyebrow, .section-heading span, .utility-button, .transport-status, .preset-index {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.13em;
}

.headphone-note { justify-self: start; color: var(--muted); font-size: 10px; }
.headphone-note span { color: var(--accent); }

.icon-button {
  justify-self: end;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}
.icon-button:hover { border-color: var(--accent); transform: rotate(8deg); }

.studio {
  position: relative;
  min-height: calc(100svh - 82px);
  padding: clamp(46px, 6vh, 80px) 4vw 36px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(560px, 1.6fr) minmax(180px, 0.6fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 4vw;
  transition: min-height 420ms cubic-bezier(.22,.8,.26,1), padding 420ms cubic-bezier(.22,.8,.26,1), background 240ms ease;
}

.studio-summary { display: none; }
.studio-toggle { position: absolute; z-index: 4; top: 26px; right: 4vw; display: flex; align-items: center; gap: 18px; padding: 10px 0 10px 14px; border: 0; background: transparent; color: var(--muted); text-align: right; cursor: pointer; }
.studio-toggle-copy { display: flex; flex-direction: column; gap: 5px; }
.studio-toggle-copy b { color: var(--ink); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .14em; }
.studio-toggle-copy small { color: #67655e; font: 400 7px/1 "DM Mono", monospace; letter-spacing: .1em; }
.studio-toggle i { position: relative; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; transition: border-color 180ms ease, transform 300ms cubic-bezier(.22,.8,.26,1); }
.studio-toggle i::before, .studio-toggle i::after { content: ""; position: absolute; top: 14px; left: 9px; width: 10px; height: 1px; background: var(--accent); }
.studio-toggle i::after { transform: rotate(90deg); transition: transform 240ms ease; }
.studio-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.studio-toggle[aria-expanded="true"] i::after { transform: rotate(0); }
.studio-toggle:hover i { border-color: var(--accent); }

.studio.collapsed { min-height: 96px; padding: 16px 4vw; grid-template-columns: minmax(180px, .5fr) 1fr auto; grid-template-rows: 64px; align-items: center; column-gap: 24px; background: rgba(8,8,6,.82); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.studio.collapsed .title-lockup, .studio.collapsed .frequency-readout, .studio.collapsed .mixer-wrap { display: none; }
.studio.collapsed .studio-summary { display: flex; grid-column: 1; flex-direction: column; gap: 7px; }
.studio-summary > span { color: var(--accent); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .14em; }
.studio-summary strong { color: var(--ink); font: 400 12px/1 "DM Mono", monospace; letter-spacing: .08em; }
.studio.collapsed .transport { grid-column: 2; grid-row: 1; min-width: 0; padding: 0; border: 0; }
.studio.collapsed .play-button { width: 48px; height: 48px; flex-basis: 48px; }
.studio.collapsed .play-icon { top: 16px; left: 20px; border-left-width: 12px; border-top-width: 8px; border-bottom-width: 8px; }
.studio.collapsed .pause-icon i { height: 16px; }
.studio.collapsed .transport-status { min-width: 120px; }
.studio.collapsed .studio-toggle { position: static; grid-column: 3; grid-row: 1; }

.title-lockup { max-width: 440px; animation: rise 700ms cubic-bezier(.22,.8,.26,1) both; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 10px; font-weight: 500; }
h1 { margin: 0; max-width: 380px; font-size: clamp(46px, 5.2vw, 82px); line-height: 0.95; letter-spacing: -0.055em; font-weight: 500; }
.dek { max-width: 350px; margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.frequency-readout {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  animation: rise 800ms 80ms cubic-bezier(.22,.8,.26,1) both;
}
.frequency-readout > span { color: var(--muted); font: 400 10px/1 "DM Mono", monospace; letter-spacing: .18em; }
.frequency-readout strong { color: var(--accent-bright); font: 300 clamp(60px, 7vw, 110px)/.95 "DM Mono", monospace; letter-spacing: -.08em; text-shadow: 0 0 50px rgba(239,158,71,.18); }
.frequency-readout strong small { font-size: .18em; letter-spacing: 0; }

.mixer-wrap {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  display: flex;
  gap: 18px;
  padding: 0 0 clamp(35px, 6vh, 80px);
  animation: rise 900ms 140ms cubic-bezier(.22,.8,.26,1) both;
}
.scale-labels { height: 360px; display: flex; flex-direction: column; justify-content: space-between; color: #706f68; font: 9px/1 "DM Mono", monospace; }
.mixer { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(8px, 1.2vw, 20px); }
.channel { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 12px; }
.fader-track {
  position: relative;
  width: 100%;
  max-width: 34px;
  height: 310px;
  border-left: 1px solid rgba(241,238,229,.1);
  border-right: 1px solid rgba(241,238,229,.04);
  background: linear-gradient(to bottom, rgba(239,158,71,.08), rgba(255,255,255,.018));
}
.fader-track::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: rgba(241,238,229,.14); }
.fader {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  z-index: 2;
  width: 310px;
  height: 34px;
  left: 50%;
  top: 50%;
  margin: -17px 0 0 -155px;
  transform: rotate(-90deg);
  background: transparent;
  cursor: ns-resize;
}
.fader::-webkit-slider-runnable-track { height: 1px; background: transparent; }
.fader::-moz-range-track { height: 1px; background: transparent; }
.fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: var(--knob, var(--accent));
  box-shadow: 0 0 0 5px #10100d, 0 0 25px color-mix(in srgb, var(--knob) 35%, transparent);
  transition: box-shadow 180ms ease;
}
.fader::-moz-range-thumb { width: 28px; height: 28px; border: 5px solid #10100d; border-radius: 50%; background: var(--knob, var(--accent)); box-shadow: 0 0 0 1px rgba(255,255,255,.72); }
.fader:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px #10100d, 0 0 0 8px var(--ink); }
.channel-label { color: var(--muted); font: 400 10px/1 "DM Mono", monospace; }
.channel-value { color: #706f68; font: 9px/1 "DM Mono", monospace; }

.transport {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.play-button {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #17110a;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.play-button:hover { transform: scale(1.06); box-shadow: 0 0 42px rgba(239,158,71,.3); }
.play-icon { position: absolute; top: 22px; left: 26px; border-left: 15px solid currentColor; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.pause-icon { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 6px; }
.pause-icon i { width: 4px; height: 20px; background: currentColor; }
body.playing .play-icon { display: none; }
body.playing .pause-icon { display: flex; }
body.playing .play-button { animation: breathe 2.4s ease-in-out infinite; }
.transport-status { min-width: 180px; margin-left: 20px; color: var(--muted); font-size: 9px; }
.meter { height: 20px; margin-top: 8px; display: flex; align-items: end; gap: 3px; }
.meter i { display: block; width: 2px; height: 4px; background: var(--accent); transform-origin: bottom; }
body.playing .meter i { animation: meter 900ms ease-in-out infinite alternate; }
.meter i:nth-child(2n) { animation-delay: -350ms !important; }
.meter i:nth-child(3n) { animation-delay: -600ms !important; }
.utility-button { margin-left: 12px; padding: 12px; border: 0; background: transparent; color: var(--accent); font-size: 18px; cursor: pointer; }
.utility-button:first-of-type { margin-left: auto; }
.utility-button span { margin-left: 6px; color: var(--muted); font-size: 9px; }
.record-button { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); }
.record-button i { width: 8px; height: 8px; border-radius: 50%; background: #e25d49; box-shadow: 0 0 0 3px rgba(226,93,73,.1); }
.record-button:disabled { opacity: .28; cursor: not-allowed; }
body.recording .record-button { color: #ff8b79; }
body.recording .record-button i { animation: recordPulse 1.2s ease-in-out infinite; }

.controls {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  min-height: 460px;
  background: rgba(8,8,6,.93);
  border-top: 1px solid var(--line);
}
.presets-block, .settings-block, .music-block, .spoken-block { padding: 56px 4vw 70px; }
.settings-block { border-left: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.section-heading .eyebrow { margin: 0; }
.section-heading span { color: #64635d; font-size: 9px; }
.section-heading > div:first-child { display: flex; align-items: baseline; gap: 18px; }
.preset-list { border-top: 1px solid var(--line); }
.preset {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: padding 180ms ease, color 180ms ease;
}
.preset:hover, .preset.active { padding-left: 14px; color: var(--accent-bright); }
.preset-index, .preset-meta { color: #64635d; font-size: 9px; }
.preset-name { font-size: 15px; }
.preset-meta { font-family: "DM Mono", monospace; letter-spacing: .08em; }
.preset.active .preset-index { color: var(--accent); }

.range-row { display: block; padding: 18px 0 22px; border-top: 1px solid var(--line); }
.range-row > span { display: flex; justify-content: space-between; align-items: baseline; }
.range-row b { font-size: 13px; font-weight: 500; }
.range-row small { color: var(--accent-bright); font: 400 11px/1 "DM Mono", monospace; }
.range-row input { width: 100%; height: 24px; margin: 14px 0 0; accent-color: var(--accent); cursor: pointer; }
.range-row input::-webkit-slider-runnable-track { height: 1px; background: #4d4b45; }
.range-row input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -7px; border: 2px solid #11110e; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; border: 1px solid var(--line); }
.tone { padding: 13px; border: 0; background: transparent; color: var(--muted); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .16em; cursor: pointer; }
.tone + .tone { border-left: 1px solid var(--line); }
.tone.active { background: var(--accent); color: #17110a; }

.music-block {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(239,158,71,.035), transparent 46%);
}

.spoken-block {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  background: rgba(8,8,6,.96);
}
.spoken-heading { margin-bottom: 30px; }
.spoken-console {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.2fr) minmax(300px, .8fr);
  align-items: center;
  min-height: 112px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spoken-now { display: flex; align-items: center; gap: 22px; padding-right: 3vw; }
.spoken-position { display: grid; grid-template-columns: 38px minmax(150px, 1fr) 38px; align-items: center; gap: 12px; min-height: 72px; padding: 0 3vw; border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: #74716a; font: 400 9px/1 "DM Mono", monospace; transition: opacity 180ms ease; }
.spoken-position.disabled { opacity: .32; }
.spoken-position input { width: 100%; accent-color: var(--accent); }
.spoken-mix { display: grid; gap: 17px; padding-left: 3vw; }
.spoken-mix label { display: grid; grid-template-columns: 58px 1fr 34px; align-items: center; gap: 12px; color: #77746d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .1em; }
.spoken-mix input { width: 100%; accent-color: var(--accent); }
.spoken-mix small { color: var(--accent-bright); }
.silence-inserter { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 18px; min-height: 76px; margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.silence-inserter > div { display: flex; flex-direction: column; gap: 6px; }
.silence-inserter strong { font: 500 9px/1 "DM Mono", monospace; letter-spacing: .13em; }
.silence-inserter span { color: #65635d; font: 400 8px/1.4 "DM Mono", monospace; letter-spacing: .08em; }
.silence-inserter label { display: flex; align-items: center; gap: 10px; color: #77746d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .1em; }
.silence-inserter input { width: 76px; padding: 9px; border: 1px solid var(--line); color: var(--ink); background: #0c0c09; font: 400 10px/1 "DM Mono", monospace; }
.spoken-queue-head, .spoken-queue-item { display: grid; grid-template-columns: 50px minmax(220px, 1fr) 100px 80px 112px; align-items: center; gap: 12px; }
.spoken-queue-head { padding: 38px 12px 12px; color: #55534d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .13em; }
.spoken-queue { border-top: 1px solid var(--line); }
.spoken-queue-item { position: relative; min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--line); transition: background 180ms ease, color 180ms ease; }
.spoken-queue-item:hover { background: rgba(255,255,255,.018); }
.spoken-queue-item.current { color: var(--accent-bright); background: rgba(239,158,71,.035); }
.spoken-queue-item.current::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--accent); }
.spoken-kind, .spoken-time { color: #77746d; font: 400 9px/1 "DM Mono", monospace; letter-spacing: .08em; }
.spoken-kind.silence { color: var(--accent); }
.music-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(180px, .5fr) minmax(260px, .8fr);
  align-items: center;
  min-height: 150px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.track-loader { display: flex; align-items: center; gap: 22px; padding-right: 4vw; }
.now-index { width: 42px; flex: 0 0 auto; color: var(--accent); font: 300 28px/1 "DM Mono", monospace; letter-spacing: -.08em; }
.set-actions { display: flex; align-items: center; gap: 8px; }
.load-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border: 1px solid var(--accent);
  color: var(--accent-bright);
  font: 500 9px/1 "DM Mono", monospace;
  letter-spacing: .13em;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.load-button:hover { background: var(--accent); color: #17110a; }
.load-button span { font-size: 17px; font-weight: 300; }
.set-button {
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 9px/1 "DM Mono", monospace;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}
.set-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-bright); }
.set-button.quiet { color: #6e6c64; }
.set-button:disabled { opacity: .3; cursor: not-allowed; }
.track-copy { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.track-copy strong { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.track-copy span, .key-label, .key-display > span, .match-button small {
  color: #6e6c64;
  font: 400 8px/1.5 "DM Mono", monospace;
  letter-spacing: .1em;
}
.key-display {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  align-content: center;
  column-gap: 16px;
  padding: 0 3vw;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.key-label { grid-column: 1 / -1; }
.key-display strong { align-self: end; color: var(--accent-bright); font: 300 44px/.9 "DM Mono", monospace; letter-spacing: -.08em; transition: opacity 180ms ease, transform 180ms ease; }
.key-display > span:last-child { align-self: end; padding-bottom: 3px; }
.key-display.key-change strong { animation: keyPop 440ms cubic-bezier(.22,.8,.26,1); }
.match-controls { padding-left: 3vw; }
.match-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.match-button:disabled { cursor: not-allowed; opacity: .42; }
.match-button i { position: relative; width: 34px; height: 18px; flex: 0 0 auto; border: 1px solid #55534d; border-radius: 20px; transition: border-color 180ms ease, background 180ms ease; }
.match-button i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #77746c; transition: transform 180ms ease, background 180ms ease; }
.match-button.active i { border-color: var(--accent); background: rgba(239,158,71,.12); }
.match-button.active i::after { transform: translateX(16px); background: var(--accent); }
.match-button span { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.match-button b { font: 500 9px/1 "DM Mono", monospace; letter-spacing: .12em; }
.match-button.level-button { padding: 13px 0 16px; border-top: 1px solid var(--line); }
.relation-picker { margin: 0; }
.relation { padding: 11px; border: 0; background: transparent; color: var(--muted); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .15em; cursor: pointer; }
.relation + .relation { border-left: 1px solid var(--line); }
.relation.active { color: #17110a; background: var(--accent); }
.timeline {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) 42px minmax(140px, .24fr) 118px minmax(150px, .2fr);
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  color: #74716a;
  font: 400 9px/1 "DM Mono", monospace;
  transition: opacity 180ms ease;
}
.timeline.disabled { opacity: .32; }
.timeline > input, .timeline label input { width: 100%; accent-color: var(--accent); cursor: pointer; }
.timeline label { display: flex; align-items: center; gap: 12px; letter-spacing: .1em; }
.timeline label small { min-width: 22px; color: var(--accent-bright); }
.timeline-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px solid var(--line); background: transparent; color: #77746d; font: 500 8px/1 "DM Mono", monospace; letter-spacing: .1em; cursor: pointer; }
.timeline-toggle i { width: 7px; height: 7px; border-radius: 50%; background: #55534d; }
.timeline-toggle.active { color: var(--ink); border-color: rgba(239,158,71,.4); }
.timeline-toggle.active i { background: var(--accent); box-shadow: 0 0 12px rgba(239,158,71,.5); }
.track-eq { display: flex; align-items: center; justify-content: flex-end; gap: 22px; min-height: 82px; margin-top: 18px; padding: 10px 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: opacity 180ms ease; }
.track-eq.disabled { opacity: .32; pointer-events: none; }
.eq-heading { display: flex; min-width: 190px; margin-right: auto; flex-direction: column; gap: 7px; color: var(--ink); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .14em; }
.eq-heading small { color: #5f5d56; font: 400 8px/1.3 "DM Mono", monospace; letter-spacing: .08em; }
.eq-control { position: relative; display: grid; grid-template-columns: 46px 74px; align-items: center; gap: 10px; cursor: ew-resize; }
.eq-control input { position: absolute; inset: 0; z-index: 2; width: 46px; height: 46px; margin: 0; opacity: 0; cursor: ew-resize; }
.eq-dial { --eq-angle: 0deg; position: relative; display: block; width: 44px; height: 44px; border: 1px solid #4d4a43; border-radius: 50%; background: conic-gradient(from 225deg, var(--accent) 0deg calc(135deg + var(--eq-angle)), #25241f calc(135deg + var(--eq-angle)) 270deg, transparent 270deg); transform: rotate(-135deg); transition: box-shadow 150ms ease; }
.eq-dial::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0c0c09; box-shadow: inset 0 0 0 1px #292721; }
.eq-dial b { position: absolute; z-index: 1; top: 4px; left: 50%; width: 1px; height: 11px; background: var(--accent-bright); transform: translateX(-50%) rotate(calc(135deg + var(--eq-angle))); transform-origin: 50% 18px; }
.eq-control:hover .eq-dial { box-shadow: 0 0 18px rgba(239,158,71,.12); }
.eq-control > span { display: flex; flex-direction: column; gap: 6px; color: #77746d; font: 500 8px/1 "DM Mono", monospace; letter-spacing: .13em; }
.eq-control > span small { color: var(--accent-bright); font: 400 9px/1 "DM Mono", monospace; letter-spacing: .02em; }
.adaptive-strip { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) repeat(2, minmax(145px, .72fr)); gap: 0; margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: opacity 180ms ease; }
.adaptive-strip.disabled { opacity: .35; }
.adaptive-toggle { display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 13px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #77746d; text-align: left; cursor: pointer; }
.adaptive-toggle i { width: 8px; height: 8px; flex: 0 0 auto; border: 1px solid #66635d; border-radius: 50%; }
.adaptive-toggle span { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.adaptive-toggle b { color: inherit; font: 500 8px/1 "DM Mono", monospace; letter-spacing: .12em; }
.adaptive-toggle small { overflow: hidden; color: #65635d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.adaptive-toggle.active { color: var(--ink); }
.adaptive-toggle.active i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 12px rgba(239,158,71,.35); }
.adaptive-strip > label { display: flex; align-items: center; gap: 12px; padding: 13px 18px; color: #77746d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .1em; }
.adaptive-strip > label input { min-width: 70px; width: 100%; accent-color: var(--accent); }
.adaptive-strip > label small { min-width: 26px; color: var(--accent-bright); }
.playlist-head, .playlist-track {
  display: grid;
  grid-template-columns: 50px minmax(170px, 1fr) 72px 58px 58px 116px 130px 100px;
  align-items: center;
  gap: 12px;
}
.playlist-head { padding: 38px 12px 12px; color: #55534d; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .13em; }
.playlist { border-top: 1px solid var(--line); }
.playlist-empty { padding: 34px 12px; color: #68665f; font: 400 10px/1.5 "DM Mono", monospace; letter-spacing: .08em; }
.playlist-track {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, color 180ms ease;
}
.playlist-track:hover { background: rgba(255,255,255,.018); }
.playlist-track.current { color: var(--accent-bright); background: rgba(239,158,71,.035); }
.playlist-track.current::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--accent); }
.track-order, .track-key, .track-bpm, .track-time, .track-status { font: 400 9px/1 "DM Mono", monospace; letter-spacing: .08em; }
.track-order, .track-time { color: #66645d; }
.track-bpm { color: #8c8981; }
.track-title-button { overflow: hidden; padding: 8px 0; border: 0; background: transparent; color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.track-title-button:disabled { color: #6b6962; cursor: not-allowed; }
.track-key { color: var(--accent-bright); }
.track-status { color: #706d65; }
.track-status.working { color: var(--accent); animation: statusPulse 1s ease-in-out infinite alternate; }
.track-status.error { color: #ff815d; }
.preset-cue { width: 100%; padding: 7px 24px 7px 8px; border: 1px solid var(--line); border-radius: 0; background: #0c0c09; color: #8a877f; font: 400 8px/1 "DM Mono", monospace; letter-spacing: .06em; cursor: pointer; }
.preset-cue.cued { border-color: rgba(239,158,71,.45); color: var(--accent-bright); }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-action { width: 32px; height: 30px; padding: 0; border: 1px solid transparent; background: transparent; color: #77746d; cursor: pointer; }
.row-action:hover:not(:disabled) { border-color: var(--line); color: var(--accent-bright); }
.row-action:disabled { opacity: .2; cursor: default; }

@keyframes keyPop { 0% { opacity: .3; transform: translateY(7px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes statusPulse { from { opacity: .42; } to { opacity: 1; } }

dialog { width: min(520px, calc(100vw - 32px)); padding: 48px; border: 1px solid rgba(239,158,71,.4); color: var(--ink); background: #11110d; box-shadow: 0 40px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(8px); }
dialog h2 { margin: 0 0 18px; font-size: 36px; font-weight: 500; letter-spacing: -.04em; }
dialog p { color: var(--muted); line-height: 1.65; }
.dialog-close { position: absolute; top: 16px; right: 18px; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.fine-print { padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px rgba(239,158,71,0), 0 0 45px rgba(239,158,71,.34); } }
@keyframes meter { from { transform: scaleY(.25); } to { transform: scaleY(4); } }
@keyframes recordPulse { 50% { opacity: .35; box-shadow: 0 0 0 8px rgba(226,93,73,0); } }

@media (max-width: 980px) {
  .studio { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; }
  .mixer-wrap { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 70px 0 60px; }
  .fader-track { height: 250px; }
  .fader { width: 250px; margin-left: -125px; }
  .transport { grid-row: 3; }
  .studio.collapsed { grid-template-columns: auto 1fr auto; grid-template-rows: 64px; }
  .studio.collapsed .transport { grid-row: 1; }
  .studio.collapsed .record-button span, .studio.collapsed .utility-button:not(.record-button) { display: none; }
}

@media (max-width: 680px) {
  .topbar { height: 64px; padding: 0 18px; }
  .headphone-note { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .studio { min-height: auto; padding: 34px 18px 28px; grid-template-columns: 1fr; }
  .studio-toggle { top: 18px; right: 18px; }
  .studio.collapsed { min-height: 146px; padding: 16px 18px; grid-template-columns: 1fr auto; grid-template-rows: auto 58px; gap: 4px 12px; }
  .studio.collapsed .studio-summary { grid-column: 1; grid-row: 1; }
  .studio.collapsed .studio-toggle { grid-column: 2; grid-row: 1; padding-right: 0; }
  .studio.collapsed .studio-toggle-copy { display: none; }
  .studio.collapsed .transport { grid-column: 1 / -1; grid-row: 2; }
  .studio.collapsed .transport-status { min-width: 70px; }
  .title-lockup { grid-column: 1; }
  .frequency-readout { grid-column: 1; align-items: flex-start; justify-self: start; margin-top: 38px; }
  .frequency-readout strong { font-size: 68px; }
  .mixer-wrap { overflow-x: auto; margin: 0 -18px; padding: 55px 18px 44px; width: calc(100% + 36px); }
  .mixer { min-width: 610px; }
  .fader-track { height: 220px; }
  .fader { width: 220px; margin-left: -110px; }
  .transport-status { min-width: 90px; }
  .utility-button span { display: none; }
  .controls { grid-template-columns: 1fr; }
  .presets-block, .settings-block, .music-block, .spoken-block { padding: 44px 18px 52px; }
  .settings-block { border-left: 0; border-top: 1px solid var(--line); }
  .preset-meta { display: none; }
  .music-block { grid-column: 1; }
  .music-block .section-heading { align-items: flex-start; gap: 22px; flex-direction: column; }
  .set-actions { width: 100%; flex-wrap: wrap; }
  .load-button, .set-button { flex: 1 1 auto; justify-content: center; text-align: center; }
  .music-workspace { grid-template-columns: 1fr; }
  .track-loader { padding: 26px 0; }
  .key-display { min-height: 112px; padding: 24px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .match-controls { padding: 26px 0; }
  .timeline { grid-template-columns: 38px 1fr 38px; }
  .timeline label { grid-column: 1 / -1; padding-top: 8px; }
  .timeline-toggle { grid-column: 1 / -1; }
  .track-eq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .eq-heading { grid-column: 1 / -1; }
  .eq-control { grid-template-columns: 44px 1fr; }
  .adaptive-strip { grid-template-columns: 1fr; }
  .adaptive-toggle { border-right: 0; border-bottom: 1px solid var(--line); }
  .playlist-head { display: none; }
  .playlist { margin-top: 30px; }
  .playlist-track { grid-template-columns: 34px minmax(0, 1fr) 64px; gap: 8px; }
  .track-bpm, .track-time, .track-status { display: none; }
  .preset-cue { grid-column: 2 / -1; }
  .row-actions { grid-column: 2 / -1; justify-content: flex-start; margin-top: -4px; }
  .spoken-heading { align-items: flex-start; gap: 22px; flex-direction: column; }
  .spoken-console { grid-template-columns: 1fr; }
  .spoken-now { padding: 26px 0; }
  .spoken-position { padding: 24px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .spoken-mix { padding: 24px 0; }
  .silence-inserter { grid-template-columns: 1fr auto; }
  .silence-inserter .set-button { grid-column: 1 / -1; }
  .spoken-queue-head { display: none; }
  .spoken-queue { margin-top: 30px; }
  .spoken-queue-item { grid-template-columns: 34px minmax(0, 1fr) 64px; gap: 8px; }
  .spoken-queue-item .spoken-time { display: none; }
  .spoken-queue-item .row-actions { grid-column: 2 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
