:root {
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --condensed: "Barlow Condensed", "Arial Narrow", "Avenir Next Condensed", "Roboto Condensed", sans-serif;
  --readable: "Barlow", "Arial Narrow", "Avenir Next Condensed", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  background: #101113; color: #e5e5e5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; align-items: center; padding: clamp(8px, 1.25vw, 22px); background: radial-gradient(ellipse at 50% 10%, #303134, #17181a 62%, #101113); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [role="slider"]:focus-visible { outline: 2px solid #d8e7f5; outline-offset: 3px; }
[hidden] { display: none !important; }
.rack { width: 100%; max-width: 2200px; margin: auto; border: 1px solid #090a0b; border-radius: 9px; background: #1a1b1e; box-shadow: 0 18px 54px #0008, 0 0 0 1px #51525455; }
.topbar, .footer { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); background: linear-gradient(#303134, #232427 63%, #202124); }
.topbar { height: clamp(55px, 4.4vw, 75px); padding: 0 clamp(14px, 1.65vw, 30px); border-radius: 8px 8px 0 0; border-top: 1px solid #515359; border-bottom: 1px solid #09090b; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; flex-shrink: 0; }
.brand-mark { width: clamp(30px, 2.65vw, 45px); color: #e3e4e1; filter: drop-shadow(0 1px 1px #000); }
.brand h1 { font-size: clamp(18px, 1.55vw, 27px); margin: 0; font-weight: 740; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.brand span { display: block; margin-top: 5px; font: 600 clamp(7px,.56vw,10px)/1 var(--mono); letter-spacing: .17em; color: #b0b4ba; text-transform: uppercase; }
.transport, .actions, .status-group, .outputs { display: flex; align-items: center; }
.transport, .preset-wrap, .bypass { border-radius: 5px; background: linear-gradient(#25272a, #1d1e21); border: 1px solid #141517; box-shadow: inset 0 1px #ffffff0e, 0 1px #ffffff09; }
.transport { height: 34px; overflow: hidden; }
.icon-button { background: transparent; border: 0; display: grid; place-items: center; width: 36px; height: 100%; color: #c3c5c6; }
.icon-button:hover, .bypass:hover, .preset-wrap:hover { background: #333539; color: #fff; }
.transport .icon-button:focus-visible { outline-offset: -3px; }
svg { display: block; }
.icon-button svg, .bypass svg, .preset-wrap svg, .spectrum svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.play { border-right: 1px solid #101113; color: #e9ece8; }
.play-glyph { stroke: none; }
.pause-glyph, .playing .play-glyph { display: none; }
.playing .pause-glyph { display: block; }
.playing { color: #8ce5aa; }
.source { padding: 0 10px; width: clamp(158px, 15vw, 235px); }
.source-line { display: flex; align-items: baseline; gap: 8px; font-size: 11px; line-height: 1.2; }
#source-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#time { margin-left: auto; white-space: nowrap; flex-shrink: 0; color: #aaacb0; font: 9px var(--mono); }
#seek { display: block; width: 100%; height: 9px; margin: 0 0 -4px; }
#open, #demo { border-left: 1px solid #121315; }
.actions { gap: 8px; }
.history { display: flex; gap: 1px; }
.history button { width: 28px; height: 32px; border-radius: 4px; }
.history button:disabled { opacity: .36; cursor: default; background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preset-wrap, .bypass { height: 34px; display: flex; align-items: center; color: #d2d5d7; font-size: 11px; }
.preset-wrap { position: relative; }
.preset-wrap > svg { pointer-events: none; position: absolute; width: 15px; left: 9px; color: #b9babe; }
.preset-wrap .slider-knots { stroke-width: 2.7; }
.preset-wrap > .chevron { left: auto; right: 9px; width: 11px; }
.preset-wrap select { appearance: none; height: 100%; width: 149px; padding: 0 20px 0 31px; color: inherit; background: transparent; border: 0; border-radius: inherit; }
option { color: #e2e5e8; background: #242629; }
.bypass { gap: 7px; padding: 0 12px; }
.bypass[aria-pressed="true"] { color: #f6cc7e; background: #3c3021; }
.display { position: relative; isolation: isolate; overflow: hidden; height: clamp(235px, min(26.1vw, 40svh), 550px); background: linear-gradient(180deg,#17181de8 0%,#1a1b22a6 56%,#191a208a), linear-gradient(90deg,#27222e,#272238 20%,#1b2b38 40%,#1b3029 58%,#333028 77%,#352725 93%,#27272b); box-shadow: inset 0 2px 6px #0007; }
#chart, #points { position: absolute; inset: 0; width: 100%; height: 100%; }
#points { pointer-events: none; }
.point { position: absolute; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; transform: translate(-50%,-50%); display: grid; place-items: center; color: var(--accent); pointer-events: auto; touch-action: none; cursor: grab; z-index: 1; }
.point::before { content: ""; display: block; width: clamp(14px,1.52vw,28px); aspect-ratio: 1; box-sizing: border-box; border: 1.5px solid color-mix(in srgb,var(--accent) 65%,white); border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 79%, #08090c)); box-shadow: 0 0 0 1px #0004, 0 0 15px color-mix(in srgb,var(--accent) 38%,transparent); }
.point span { --gap: clamp(11px,1.2vw,21px); position: absolute; bottom: 50%; margin-bottom: var(--gap); pointer-events: none; font: 600 clamp(18px,1.9vw,33px)/1 var(--condensed); text-shadow: 0 1px 3px #101013,0 0 8px color-mix(in srgb,var(--accent) 25%,transparent); }
.point[data-low-label="true"] span { bottom: auto; top: calc(50% + var(--gap)); }
.point.off { opacity: .55; }
.point.off::before { background: #333437; box-shadow: 0 0 0 1px #0004; }
.point:focus-visible, .point:hover { z-index: 3; }
.point:focus-visible { border-radius: 50%; }
.point:active, .dial:active { cursor: grabbing; }
.readout { position: absolute; z-index: 5; pointer-events: none; padding: 6px 9px; border: 1px solid #595b5f; border-radius: 4px; background: #17181bef; box-shadow: 0 2px 8px #0006; font: 10px var(--mono); white-space: nowrap; }
#bypass-badge { position: absolute; right: 3.5%; top: 5px; color: #f6cc7e; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; pointer-events: none; }
.display.bypassed { background: #1b1c21; }
.point-menu { position: absolute; z-index: 6; display: grid; min-width: 143px; padding: 4px; border: 1px solid #53555b; border-radius: 5px; box-shadow: 0 4px 16px #0008; background: #222428; }
.point-menu button { text-align: left; background: transparent; border: 0; border-radius: 3px; padding: 5px 23px 5px 9px; color: #e4e6e8; font-size: 12px; }
.point-menu button:focus, .point-menu button:hover { outline: 0; background: #3a3d42; }
.point-menu [aria-checked="true"]::after { content: '✓'; position: absolute; right: 10px; color: #a8deb5; }
.point-menu [role="menuitemradio"] + [role="menuitem"] { border-top: 1px solid #46484d; }
#drop-hint { position: fixed; inset: 10px; z-index: 12; pointer-events: none; border: 2px dashed #a3dfb7; background: #14191ce8; border-radius: 8px; display: grid; place-items: center; color: #d9f0df; font-size: clamp(20px,3vw,34px); }
.bank { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-top: 2px solid #111214; border-bottom: 1px solid #0d0e0f; }
.band { --ink: var(--accent); position: relative; isolation: isolate; min-width: 0; text-align: center; padding: clamp(11px,1.16vw,22px) clamp(6px,.84vw,15px) clamp(8px, .8vw, 15px); border-right: 2px solid #111215; box-shadow: inset 1px 1px #ffffff1c, inset -1px 0 #ffffff06; background: linear-gradient(130deg,#ffffff04,#00000008 45%,#0003), radial-gradient(ellipse at 53% 34%, color-mix(in srgb,var(--ink) 13%,transparent), transparent 92%), color-mix(in srgb,var(--ink) 15%,#202127); }
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.17' d='M0 0h120v120H0z'/%3E%3C/svg%3E"); opacity: .20; }
.band:last-child { border-right: 0; }
.band.off { --ink: #97999d; }
.band.off .dial { opacity: .59; }
.band.off .value, .band.off .param-label, .band.off .band-foot { color: #bdc0c6; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.enable { display: flex; align-items: center; gap: clamp(4px,.55vw,12px); font: 600 clamp(20px,2.12vw,38px)/1 var(--condensed); color: var(--ink); user-select: none; cursor: pointer; }
.enable input { margin: 0; appearance: none; position: relative; width: clamp(15px,1.65vw,30px); aspect-ratio: 1; border-radius: 4px; border: 1px solid #11151a; box-shadow: inset 0 1px 1px #ffffff35, 0 1px #ffffff21; background: #292a2d; cursor: pointer; }
.enable input:checked { background: linear-gradient(145deg,var(--ink),color-mix(in srgb,var(--ink) 80%,#0b0b0b)); }
.enable input:checked::after { content: ""; position: absolute; left: 32%; top: 15%; width: 22%; height: 48%; border: solid #25262a; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.shape-wrap { position: relative; display: grid; place-items: center; height: clamp(22px,2.1vw,38px); width: clamp(31px,3.65vw,63px); color: var(--ink); border: 1px solid #ffffff10; border-radius: 5px; background: #17181bc9; box-shadow: inset 0 1px 3px #0005; }
.shape-wrap svg { width: 75%; height: 85%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.shape-wrap select { position: absolute; inset: 0; width: 100%; opacity: 0; }
.shape-wrap:has(select:hover), .shape-wrap:focus-within { outline: 1px solid var(--ink); }
.control { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: clamp(5px, .7vw, 13px); }
.control.major { margin-top: clamp(10px,1.25vw,24px); }
.knob-row { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.param-label { position: absolute; left: 0; font: 500 clamp(11px, 1.14vw, 20px)/1 var(--condensed); color: #c3c5c6; text-shadow: 0 1px #101114; pointer-events: none; }
.dial { --size: clamp(55px,min(5.62vw,9.65svh),124px); width: var(--size); aspect-ratio: 1; position: relative; cursor: ns-resize; touch-action: none; border-radius: 50%; user-select: none; }
.major .dial { --size: clamp(70px,min(7.7vw,13.45svh),168px); }
.dial::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 218deg,#202125,#686a6b 18%,#3a3b3d 38%,#131417 70%,#393a3d 85%,#222325); box-shadow: 0 -1px 1px #ffffff28,0 1px 3px #0008; mask-image: conic-gradient(from 218deg,#000 0deg 284deg,transparent 285deg); }
.dial svg { width: 100%; height: 100%; position: absolute; inset: 0; overflow: visible; }
.dial .track { stroke: #151619; }
.dial .progress { stroke: var(--ink); filter: drop-shadow(0 0 2px color-mix(in srgb,var(--ink) 45%,transparent)); }
.dial circle { fill: none; stroke-width: 5.5; stroke-linecap: round; }
.knob-face { position: absolute; inset: 14%; border-radius: 50%; background: linear-gradient(145deg,#5b5c5f,#343539 42%,#27282b 76%,#212225); border: 1px solid #222327; box-shadow: inset 1px 2px 1px #ffffff2b, inset -1px -2px 2px #0007, 0 3px 4px 1px #000b, 0 0 0 3px #17181a; }
.knob-face::after { content: ""; position: absolute; inset: 5%; border-radius: 50%; background: linear-gradient(155deg,#ffffff06,transparent 63%); }
.needle { position: absolute; inset: 15%; border-radius: 50%; transform: rotate(var(--angle)); }
.needle::before { content: ""; position: absolute; left: 50%; top: 7%; transform: translateX(-50%); height: 20%; width: clamp(2px,.22vw,4px); border-radius: 2px; background: var(--ink); box-shadow: 0 0 3px #0009; }
.value { width: clamp(56px,5.65vw,105px); height: clamp(20px,1.75vw,32px); margin-top: -3%; padding: 0 1px; position: relative; text-align: center; background: linear-gradient(#17181bdd,#1a1b1ee8); border: 1px solid #ffffff1c; box-shadow: inset 0 1px 2px #0004; color: var(--ink); font: 550 clamp(14px,1.37vw,24px)/1 var(--readable); font-variant-numeric: tabular-nums; border-radius: 5px; cursor: text; }
.major .value { width: clamp(68px,7.6vw,140px); }
.value:focus { background: #111216; }
.band-foot { color: var(--ink); font: 500 clamp(14px,1.45vw,26px)/1 var(--condensed); margin-top: clamp(5px,.65vw,12px); text-shadow: 0 1px 2px #070809; }
.footer { min-height: 42px; padding: 7px clamp(12px,1.6vw,30px); justify-content: space-between; border-radius: 0 0 8px 8px; border-top: 1px solid #45464a; font: 11px var(--readable); }
.status-group, .outputs { gap: clamp(9px,1.0vw,17px); }
.spectrum { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #56575a; color: #b6b7ba; background: #191a1d; border-radius: 4px; padding: 3px 8px; font: 600 11px var(--readable); }
.spectrum svg { width: 14px; height: 13px; }
.spectrum[aria-pressed="true"] { color: #c7d8cf; }
.spectrum[aria-pressed="true"] svg { color: #8ccfa7; }
.status, .stereo { font: 9px var(--mono); color: #abafb3; }
.status { display: flex; align-items: center; gap: 6px; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: #85898e; }
.status.live i { background: #88dea4; box-shadow: 0 0 6px #76de9777; }
.stereo { border-right: 1px solid #55565a; padding-right: 13px; }
.out-label { color: #c9cbcd; font-size: 12px; }
input[type="range"] { appearance: none; cursor: pointer; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right,#acb2af var(--pos,0%),#101114 var(--pos,0%)); border-radius: 2px; box-shadow: 0 1px #ffffff18; }
input[type="range"]::-moz-range-track { height: 3px; background: #18191b; }
input[type="range"]::-moz-range-progress { height: 3px; background: #acb2af; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 8px; height: 8px; border-radius: 50%; margin-top: -2.5px; background: #dadcde; }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #dadcde; }
#seek::-webkit-slider-thumb { width: 5px; height: 5px; margin-top: -1px; }
#seek::-moz-range-thumb { width: 5px; height: 5px; }
#trim { width: clamp(52px,6vw,95px); height: 18px; margin: 0; }
#trim-value { min-width: 48px; font: 10px var(--mono); color: #d1d4d4; }
.meter { display: grid; gap: 2px; width: clamp(64px,7.3vw,140px); }
.meter i { display: block; position: relative; overflow: hidden; height: 4px; border-radius: 1px; background: #131517; }
.meter i::before { content:""; position:absolute; inset:0; background: linear-gradient(90deg,#69a787,#a4d99b 71%,#e7c269 83%,#ed705c 97%); clip-path: inset(0 var(--silent,100%) 0 0); }
.meter i::after { content:""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg,transparent 0 4px,#212225 4px 5px); }
.meter i b { position: absolute; z-index: 1; top: 0; bottom: 0; width: 2px; transform: translateX(-100%); background: #fff4d6; }
.meter-scale { display: flex; justify-content: space-between; color: #bec1c5; font: 8px/1 var(--mono); }
#clip { padding: 4px 5px; border: 1px solid #ed9686; border-radius: 3px; color: #220c07; background: #f39783; text-transform: uppercase; font: 650 9px/1 var(--mono); }
#clip:disabled { color: #aaaeb2; background: #222327; border-color: #4a4d51; cursor: default; }

.message { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); width: max-content; z-index: 10; color: #ecebe5; background: #232527; padding: 11px 16px; border: 1px solid #68696a; box-shadow: 0 4px 18px #0008; border-radius: 5px; font-size: 13px; }
@media (max-width: 930px) {
  body { padding: 6px; }
  .band { padding-inline: 5px; }
  .param-label { font-size: 10px; }
  .major .dial { --size: clamp(62px,7.5vw,75px); }
}
@media (max-width: 720px) {
  body { display: block; padding: 5px; }
  .topbar { height: auto; min-height: 80px; gap: 9px; padding: 10px; flex-wrap: wrap; }
  .brand { flex: 1; }
  .transport { order: 3; flex: 1 0 100%; }
  .source { flex: 1; }
  .actions { gap: 5px; }
  .preset-wrap select { width: 140px; }
  .display { height: clamp(215px,35svh,320px); }
  .bank { grid-template-columns: repeat(7,minmax(128px,1fr)); overflow-x: auto; scrollbar-color: #77797e #222326; scrollbar-width: thin; scroll-snap-type: x proximity; }
  .band { padding: 12px 8px 9px; scroll-snap-align: start; }
  .major .dial { --size: 75px; }
  .dial { --size: 58px; }
  .value { height: 21px; font-size: 15px; }
  .param-label { font-size: 12px; }
  .footer { flex-wrap: wrap; gap: 10px; }
  .outputs { margin-left: auto; }
  .stereo { display: none; }
  .point { width: 26px; height: 28px; }
  .point span { font-size: 16px; }
}
@media (max-width: 460px) {
  .brand { gap: 6px; }
  .brand-mark { width: 24px; }
  .brand h1 { font-size: 15px; }
  .brand span { font-size: 6px; }
  .bypass { padding: 0 6px; }
  .bypass svg { width: 13px; }
  .preset-wrap select { width: 125px; padding-left: 23px; font-size: 10px; }
  .preset-wrap > svg { left: 6px; width: 12px; }
  .footer { column-gap: 5px; padding-inline: 8px; }
  .status { display: none; }
  .outputs { gap: 6px; }
  .meter { width: 58px; }
}

.point span, .enable, .value { font-weight: 400; }
@media (min-width: 721px) {
  body { --gutter: clamp(6px, 1.1vw, 22px); padding: var(--gutter); }
  .rack {
    display: grid;
    height: min(calc(100svh - 2 * var(--gutter)), calc(61vw + 52px));
    min-height: 535px;
    grid-template-rows: clamp(48px, 6.4svh, 72px) minmax(0,.44fr) minmax(0,.56fr) clamp(34px,4.5svh,45px);
  }
  .topbar, .display { height: auto; }
  .bank { container-type: size; }
  .band {
    display: grid;
    grid-template-rows: 9% minmax(0,1.34fr) repeat(2,minmax(0,1fr)) 5.5%;
    padding-top: 2.8cqh;
    padding-bottom: 2cqh;
  }
  .band-head { align-self: center; }
  .enable { font-size: clamp(18px,min(2.12vw,7.2cqh),38px); }
  .control, .control.major { margin: 0; justify-content: center; }
  .dial { --size: min(6.1vw,18cqh); }
  .major .dial { --size: min(8.1vw,24.5cqh); }
  .value { height: 5.9cqh; font-size: clamp(13px,min(1.47vw,4.85cqh),27px); margin-top: -.6cqh; }
  .band-foot { align-self: end; font-size: min(1.55vw,5.5cqh); margin: 0; }
  .footer { min-height: 0; }
}

@media (min-width: 721px) and (max-width: 880px) {
  .topbar { gap: 8px; padding-inline: 10px; }
  .preset-wrap select { width: 124px; }
  .actions { gap: 4px; }
}
@media (max-width: 460px) {
  .history button { width: 22px; }
  .actions { gap: 3px; }
  .brand span { letter-spacing: .08em; }
}
@media (max-width: 365px) {
  .brand-mark, .bypass svg { display: none; }
}
