/* Taraswati-1 — molded-plastic toy UI (90s consumer product) */
:root {
  /* palette (from the quilt reference) */
  --ink: #1b0f2e;
  --ink-2: #2c1a4a;
  --cream: #fff4e0;
  --pink: #ff4fa8;
  --rose: #ff9fd0;
  --red: #ff3d3d;
  --orange: #ff8a1f;
  --yellow: #ffe03a;
  --lime: #c2f03a;
  --green: #2fd36b;
  --teal: #1fc9c3;
  --sky: #3cb6ff;
  --blue: #3a5cff;
  --violet: #8a45ff;
  --lilac: #c79bff;
  --lcd: #c9e86a;
  --lcd-ink: #1f2a0a;

  --text: var(--cream);
  --radius: 26px;
  --f-logo: "Bagel Fat One", "Arial Black", system-ui, sans-serif;
  --f-head: "Fredoka", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  --f-lcd: "VT323", "Courier New", ui-monospace, monospace;
  --rainbow: linear-gradient(100deg, var(--yellow), var(--orange), var(--pink), var(--violet), var(--sky), var(--lime), var(--yellow));
  --hc: 66px;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
html, body { margin: 0; min-height: 100%; color: var(--text); }
body {
  font-family: var(--f-head);
  font-stretch: 105%;
  font-weight: 600;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; font-stretch: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

/* ------------------------------------------------------------- backgrounds */
.bg-static, #lights { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; }
.bg-static { background: var(--ink); overflow: hidden; }
#pixbg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.bg-static::after {                 /* soft shade so the toys read first */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, rgba(27, 15, 46, .08), rgba(27, 15, 46, .42));
}
#lights { z-index: -1; display: none; background: var(--ink); image-rendering: pixelated; }
body.dynamic #lights { display: block; }
body.dynamic .bg-static { display: none; }

/* ------------------------------------------------------------- shared plastic */
.panel {
  --sh: var(--sky); --cap: var(--yellow); --lit: var(--yellow);
  position: relative; isolation: isolate; min-width: 0;
  color: var(--ink);
  border-radius: var(--radius); padding: 16px 16px 16px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--sh) 72%, white) 0%, var(--sh) 26%, var(--sh) 70%, color-mix(in oklab, var(--sh) 82%, var(--ink)) 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, .6),
    inset 0 -7px 0 color-mix(in oklab, var(--sh) 72%, var(--ink)),
    0 7px 0 var(--ink),
    0 16px 26px rgba(27, 15, 46, .45);
}
.panel::before {                    /* glossy reflection streaks on the moulded shell */
  content: ""; position: absolute; inset: 4px 4px 10px; border-radius: 22px; z-index: -1; pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 9%, rgba(255, 255, 255, .42) 9.5% 13%, transparent 13.5% 15.5%, rgba(255, 255, 255, .22) 16% 17.5%, transparent 18%),
    radial-gradient(70% 38% at 30% 0%, rgba(255, 255, 255, .38), transparent 70%);
}
.panel::after {                     /* four little screws */
  content: ""; position: absolute; inset: 7px; z-index: -1; pointer-events: none;
  --scr: radial-gradient(circle at 50% 50%, var(--ink) 0 1px, color-mix(in oklab, var(--sh) 55%, white) 1.5px 3.2px, color-mix(in oklab, var(--sh) 60%, var(--ink)) 3.6px 4.4px, transparent 4.8px);
  background: var(--scr) left top / 10px 10px no-repeat, var(--scr) right top / 10px 10px no-repeat,
    var(--scr) left bottom / 10px 10px no-repeat, var(--scr) right bottom / 10px 10px no-repeat;
}
.panel h2 {
  margin: 0 0 12px; font-family: var(--f-head); font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 9px; color: var(--ink);
  text-shadow: 0 1.5px 0 rgba(255, 255, 255, .55);
}
.panel h2::before {                 /* a candy bead */
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--lit) 40%, color-mix(in oklab, var(--lit) 60%, var(--ink)) 100%);
  box-shadow: 0 0 0 2px var(--ink), 0 2px 0 2px var(--ink);
}
.panel h2 small { margin-left: auto; font-size: 10px; letter-spacing: .04em; font-weight: 500; text-transform: none; opacity: .7; }

/* colourways (shell / knob caps / lit parts) */
.p-lfo    { --sh: var(--sky);    --cap: var(--yellow); --lit: var(--yellow); }
.p-delay  { --sh: var(--pink);   --cap: var(--lime);   --lit: var(--lime); }
.p-pitch  { --sh: var(--orange); --cap: var(--sky);    --lit: var(--sky); }
.p-reverb { --sh: var(--lilac);  --cap: var(--pink);   --lit: var(--yellow); }
.p-dist   { --sh: var(--yellow); --cap: var(--red);    --lit: var(--pink); }
.p-times:nth-of-type(6) { --sh: var(--lime); --cap: var(--violet); --lit: var(--pink); }
.p-times:nth-of-type(7) { --sh: var(--teal); --cap: var(--orange); --lit: var(--yellow); }
.block:nth-of-type(8n+1) { --sh: var(--pink);   --cap: var(--yellow); --lit: var(--lime); }
.block:nth-of-type(8n+2) { --sh: var(--yellow); --cap: var(--violet); --lit: var(--pink); }
.block:nth-of-type(8n+3) { --sh: var(--sky);    --cap: var(--orange); --lit: var(--yellow); }
.block:nth-of-type(8n+4) { --sh: var(--lime);   --cap: var(--pink);   --lit: var(--pink); }
.block:nth-of-type(8n+5) { --sh: var(--orange); --cap: var(--teal);   --lit: var(--lime); }
.block:nth-of-type(8n+6) { --sh: var(--lilac);  --cap: var(--yellow); --lit: var(--yellow); }
.block:nth-of-type(8n+7) { --sh: var(--teal);   --cap: var(--red);    --lit: var(--yellow); }
.block:nth-of-type(8n+8) { --sh: var(--rose);   --cap: var(--blue);   --lit: var(--lime); }

/* ------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 26px;
  padding: 12px 22px 26px;
  background:
    linear-gradient(112deg, transparent 0 20%, rgba(255, 255, 255, .18) 20.5% 23%, transparent 23.5%),
    linear-gradient(180deg, #a874ff 0%, var(--violet) 30%, #6f2fe0 100%);
  border-bottom: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -6px 0 #5a22c0, 0 6px 0 var(--ink), 0 14px 26px rgba(27, 15, 46, .5);
}
/* the logo: a static ink outline underneath, and on top the sheen text on its own layer
   (no filters on anything that moves, so the sheen repaints only its own pixels) */
.logo {
  --lw: 2px;
  margin: 0; font-family: var(--f-logo); font-weight: 400; font-size: clamp(22px, 3.1vw, 40px);
  letter-spacing: .02em; line-height: 1; white-space: nowrap; display: inline-grid; background: none;
}
.logo > span { grid-area: 1 / 1; }
.logo .lg-sh { color: var(--ink); -webkit-text-stroke: calc(var(--lw) * 2) var(--ink); text-shadow: 0 calc(var(--lw) * 2) 0 var(--ink), 0 calc(var(--lw) * 2) 0 var(--ink); }
.logo .lg-tx {
  background: linear-gradient(100deg, var(--yellow) 0 14%, #fff 17%, var(--lime) 20% 34%, var(--sky) 37% 50%, #fff 53%, var(--rose) 56% 70%, var(--yellow) 73% 86%, #fff 89%, var(--lime) 92% 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s steps(140) infinite;   /* 20 updates a second: a slow sheen does not need 60 */
}
@keyframes sheen { to { background-position: -220% 0; } }
.logo-h { margin: 0; line-height: 0; }
button.logo { border: 0; padding: 4px 2px 8px; cursor: pointer; transition: transform .15s; }
button.logo:hover { transform: rotate(-2deg) scale(1.03); }
button.logo:active { transform: scale(.97); }
button.logo:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 8px; }
.topbar .logo { font-size: clamp(20px, 2.5vw, 36px); }
.tb-left, .tb-right { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; }
.tb-acts { display: flex; align-items: center; gap: 26px; }
.top-right { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; }
body.hide-mods main, body.hide-mods .tunebar { display: none; }
#volSlot { display: flex; align-items: center; gap: 18px; }

/* THE SCREEN — one big backlit LCD; it shows the value of whatever is being touched, and nothing else */
.screen {
  position: relative; width: clamp(200px, 19vw, 290px); height: calc(var(--hc) + 18px); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-family: var(--f-lcd); line-height: .9; color: var(--lcd-ink); white-space: nowrap; text-align: center;
  background: linear-gradient(180deg, #a9c94a, var(--lcd) 34%, #d8f08a);
  border: 3px solid var(--ink); border-radius: 16px; padding: 4px 12px 6px;
  box-shadow: inset 0 5px 0 rgba(31, 42, 10, .22), inset 0 0 0 3px rgba(255, 255, 255, .18), 0 0 0 5px var(--ink-2), 0 5px 0 5px var(--ink), 0 12px 22px rgba(27, 15, 46, .45);
}
.screen::before {                    /* the pixel grid of the glass */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background: repeating-linear-gradient(0deg, rgba(31, 42, 10, .35) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(31, 42, 10, .25) 0 1px, transparent 1px 3px);
}
.screen::after {                     /* a glare across the glass */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, transparent 0 18%, rgba(255, 255, 255, .35) 18.5% 24%, transparent 24.5% 28%, rgba(255, 255, 255, .18) 28.5% 31%, transparent 31.5%);
}
.screen .scr-v { font-size: 46px; letter-spacing: .03em; max-width: 100%; overflow: hidden; text-overflow: clip; }
.screen .scr-s { font-size: 24px; opacity: .72; letter-spacing: .04em; }
.screen .scr-s:empty { display: none; }
.screen.two .scr-v { font-size: 38px; }

/* CALL TARASWATI — a square push key in a dark housing.
   The keycap travels down when pressed, latches lower while the station is on, and then shines like the MIX caps. */
@property --mc1 { syntax: '<color>'; inherits: false; initial-value: #ffe03a; }
@property --mc2 { syntax: '<color>'; inherits: false; initial-value: #ff4fa8; }
.auto {
  --cs: 98px; --travel: 6px;
  position: relative; flex: none; width: var(--cs); height: var(--cs); padding: 0; border-radius: 16px; cursor: pointer;
  border: 3px solid var(--ink); color: var(--ink);
  background: radial-gradient(90% 90% at 50% 40%, #3a2560, var(--ink) 75%);
  box-shadow: 0 5px 0 var(--ink), 0 12px 20px rgba(27, 15, 46, .45), inset 0 2px 0 rgba(255, 255, 255, .12);
  overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent;
  font-family: var(--f-head); font-weight: 700;
}
/* the loading sweep runs in the gap between housing and keycap */
.auto .ring { position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; z-index: -1; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from 0deg, transparent 0 55%, var(--pink) 66%, var(--cream) 80%, var(--sky) 88%, var(--lime) 93%, transparent 97%);
  transform: translate(-50%, -50%); }
.auto.calling .ring { animation: orbit 1.25s linear infinite; will-change: transform; }   /* spins only while calling */
@keyframes orbit { to { transform: translate(-50%, -50%) rotate(1turn); } }
.auto .cap {
  position: absolute; left: 6px; right: 6px; top: 5px; bottom: 11px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 4px 5px;
  font-size: 11px; line-height: 1.12; letter-spacing: .06em; text-align: center; white-space: normal;
  background:
    radial-gradient(70% 45% at 32% 16%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fff38a 0%, var(--yellow) 42%, #f2b800 100%);
  box-shadow: 0 var(--travel) 0 #a86f00, 0 calc(var(--travel) + 1px) 0 var(--ink),
    inset 0 2px 0 rgba(255, 255, 255, .8), inset 0 -3px 0 rgba(160, 90, 0, .3);
  transform: translateY(0);
  transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), box-shadow .16s cubic-bezier(.3, 1.6, .5, 1);
}
.auto .txt { display: block; text-shadow: 0 1.5px 0 rgba(255, 255, 255, .6); }
.auto .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; transition: background .3s, box-shadow .3s;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, #7a6a8f 30%, var(--ink-2) 100%); box-shadow: 0 0 0 2px var(--ink); }
.auto:hover .cap { filter: brightness(1.04); }
/* pressed: the cap goes all the way down, its side disappears */
.auto:active .cap, .auto.press .cap {
  transform: translateY(var(--travel)); transition-duration: .05s; transition-timing-function: ease-out;
  box-shadow: 0 0 0 #a86f00, 0 1px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(160, 90, 0, .3), inset 0 3px 8px rgba(120, 60, 0, .35);
}
.auto:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.auto.calling .ring { opacity: 1; }
.auto.calling .txt { animation: tremble 2.4s ease-in-out infinite; }
.auto.calling .dot { background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--pink) 45%, #b0186a 100%); box-shadow: 0 0 0 2px var(--ink), 0 0 12px var(--pink); animation: beat 1.2s ease-in-out infinite; }
@keyframes tremble {
  0%, 100% { transform: translate(0, 0) rotate(0); letter-spacing: .07em; }
  12% { transform: translate(-0.7px, 0.4px) rotate(-0.4deg); } 25% { transform: translate(0.6px, -0.5px) rotate(0.3deg); letter-spacing: .09em; }
  37% { transform: translate(-0.4px, -0.6px) rotate(0.2deg); } 50% { transform: translate(0.8px, 0.3px) rotate(-0.3deg); letter-spacing: .06em; }
  62% { transform: translate(-0.6px, 0.6px) rotate(0.4deg); } 75% { transform: translate(0.4px, -0.4px) rotate(-0.2deg); letter-spacing: .085em; }
  87% { transform: translate(-0.3px, 0.5px) rotate(0.3deg); }
}
.auto.fail .cap { color: var(--cream);
  background: radial-gradient(70% 45% at 32% 16%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #ff8a8a, var(--red) 45%, #c41c2c);
  box-shadow: 0 var(--travel) 0 #7a0e18, 0 calc(var(--travel) + 1px) 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .6); }
.auto.fail .txt { text-shadow: 0 2px 0 var(--ink); }
.auto.fail .dot { background: var(--cream); }
/* ON: latched half-way down, the cap glows through the MIX colour cycle (same colours and timing as the MIX knobs) */
.auto.on { box-shadow: 0 5px 0 var(--ink), 0 0 22px rgba(255, 79, 168, .75), 0 12px 20px rgba(27, 15, 46, .45), inset 0 2px 0 rgba(255, 255, 255, .12); }
.auto.on .cap {
  transform: translateY(calc(var(--travel) - 2px));
  box-shadow: 0 2px 0 #3a2560, 0 3px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .8), inset 0 -3px 0 rgba(27, 15, 46, .25);
}
/* ON: the cap cycles through the MIX colours — four stacked layers that only fade (compositor-only) */
.auto .mc { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 0; opacity: 0; transition: opacity .3s; pointer-events: none; }
.auto .cap > .dot, .auto .cap > .txt { position: relative; z-index: 1; }
.auto.on .mc { opacity: 1; }
.auto .mc i { position: absolute; inset: 0; }
.auto .mc i::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 30% 16%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%); }
.auto .mc i:nth-child(1) { background: radial-gradient(105% 105% at 36% 28%, #fff 0%, #ffe03a 24%, #ff4fa8 68%, #2c1a4a 118%); }
.auto .mc i:nth-child(2) { background: radial-gradient(105% 105% at 36% 28%, #fff 0%, #3cb6ff 24%, #ffe03a 68%, #2c1a4a 118%); opacity: 0; }
.auto .mc i:nth-child(3) { background: radial-gradient(105% 105% at 36% 28%, #fff 0%, #8a45ff 24%, #3cb6ff 68%, #2c1a4a 118%); opacity: 0; }
.auto .mc i:nth-child(4) { background: radial-gradient(105% 105% at 36% 28%, #fff 0%, #ff4fa8 24%, #8a45ff 68%, #2c1a4a 118%); opacity: 0; }
.auto.on .mc i:nth-child(2) { animation: q1 2.2s linear infinite; will-change: opacity; }
.auto.on .mc i:nth-child(3) { animation: q2 2.2s linear infinite; will-change: opacity; }
.auto.on .mc i:nth-child(4) { animation: q3 2.2s linear infinite; will-change: opacity; }
@keyframes q1 { 0% { opacity: 0; } 25%, 75% { opacity: 1; } 75.1%, 100% { opacity: 0; } }
@keyframes q2 { 0%, 25% { opacity: 0; } 50%, 75% { opacity: 1; } 75.1%, 100% { opacity: 0; } }
@keyframes q3 { 0%, 50% { opacity: 0; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes t1 { 0% { opacity: 0; } 33.3%, 66.6% { opacity: 1; } 66.7%, 100% { opacity: 0; } }
@keyframes t2 { 0%, 33.3% { opacity: 0; } 66.6% { opacity: 1; } 100% { opacity: 0; } }
.auto.on .txt { text-shadow: 0 0 3px #fff, 0 0 8px rgba(255, 255, 255, .8), 0 1.5px 0 rgba(255, 255, 255, .9); }
.auto.on .dot { background: radial-gradient(circle at 35% 30%, #fff 0 15%, var(--lime) 50%, #5e8a00); box-shadow: 0 0 0 2px var(--ink), 0 0 12px #fff; animation: beat 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes beat { 50% { transform: scale(0.6); } }

/* VOLUME / SOFTNESS — chunky toy dials */
.vdial { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; user-select: none; -webkit-user-select: none; }
.vd-ring { position: relative; width: var(--hc); height: var(--hc); }
.vd-ring svg { width: 100%; height: 100%; cursor: ns-resize; touch-action: none; outline: none; overflow: visible; }
.vd-trk { fill: none; stroke: var(--ink); stroke-width: 17; stroke-linecap: round; }
.vd-arc { fill: none; stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255, 224, 58, .7)); }
.vd-sh { fill: var(--ink); opacity: .5; }
.vd-cap { fill: var(--cream); stroke: var(--ink); stroke-width: 3; }
.vd-ring svg:focus-visible .vd-cap { stroke: var(--yellow); stroke-width: 4; }
.vd-lab { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; white-space: nowrap;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--cream); text-shadow: 0 1.5px 0 var(--ink); }
.vdial.drag .vd-arc { filter: drop-shadow(0 0 8px rgba(255, 224, 58, 1)); }

/* LIVE BACKGROUND — a slide switch */
.pill-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--cream); background: none; border: 0; padding: 6px;
  text-shadow: 0 1.5px 0 var(--ink); }
.pill-switch .track { width: 54px; height: 30px; border-radius: 999px; background: var(--ink-2); position: relative; transition: background .3s; flex: none;
  border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .35), 0 2px 0 rgba(255, 255, 255, .25); }
.pill-switch .track::after { content: ""; position: absolute; z-index: 1; top: 1px; left: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 15%, var(--cream) 40%, #d9c6a6 100%); box-shadow: 0 0 0 2px var(--ink), 0 2px 0 2px var(--ink);
  transition: left .3s cubic-bezier(.5, 1.6, .4, 1); }
.pill-switch:hover .track::after { background: radial-gradient(circle at 35% 30%, #fff 0 15%, var(--yellow) 50%, #e0a800 100%); }
.pill-switch .track { overflow: hidden; }
.pill-switch .track::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: linear-gradient(100deg, var(--yellow), var(--orange), var(--pink), var(--violet), var(--sky), var(--lime), var(--yellow), var(--orange), var(--pink), var(--violet), var(--sky), var(--lime), var(--yellow)); }
.pill-switch.on .track::before { opacity: 1; animation: slide 4s linear infinite; will-change: transform; }
@keyframes slide { to { transform: translateX(-50%); } }
.pill-switch.on .track::after { left: 25px; }
.pill-switch:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 999px; }
/* AGE sits in line with VOLUME and SOFTNESS, its name underneath like theirs */
.age-sw { position: relative; height: var(--hc); padding: 0; }
.age-sw .lbl { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; white-space: nowrap;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; }
/* AGE is a three-position slide: LITE (left, switch-on) · OFF (middle) · ON (right) */
.age-sw .track { width: 76px; }
.age-sw.pos1 .track::after { left: 24px; }
.age-sw.pos2 .track::after { left: 47px; }
.age-sw .tk { position: absolute; z-index: 0; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--cream); opacity: .35; }
.age-sw .tk:nth-child(1) { left: 12px; } .age-sw .tk:nth-child(2) { left: 35px; } .age-sw .tk:nth-child(3) { left: 58px; }
.age-sw.pos2 .tk { opacity: 0; }

/* round icon buttons */
.info-btn { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--pink) 50%, #c2207a); font-family: var(--f-logo); font-size: 18px; line-height: 1; color: var(--cream);
  box-shadow: 0 3px 0 var(--ink); text-shadow: 0 1.5px 0 var(--ink); transition: transform .12s; }
.info-btn:hover { transform: translateY(-1px) rotate(8deg); }
.info-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ------------------------------------------------------------- rack */
main { padding: 24px 22px 10px; }
.rack > .panel { content-visibility: auto; contain-intrinsic-size: auto 300px; }
.rack { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 16px; }
.p-lfo { grid-column: span 4; } .p-delay { grid-column: span 4; } .p-pitch { grid-column: span 4; }
.p-reverb { grid-column: span 4; } .p-dist { grid-column: span 2; } .p-times { grid-column: span 3; }
/* FX layout: controls left, MIX always on the right */
.fx { display: flex; align-items: stretch; gap: 10px; }
.fx .main { flex: 1; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: flex-start; gap: 8px 4px; min-width: 0; }
.fx .main.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; }
.fx .mixcol { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-left: 12px;
  border-left: 3px dotted color-mix(in oklab, var(--sh) 55%, var(--ink)); }
.segrow { display: flex; align-items: center; justify-content: center; gap: 8px 6px; flex-wrap: wrap; width: 100%; margin: 4px 0 8px; }
.p-delay .segrow .seg button { padding: 5px 8px; }
.p-delay .fx { height: calc(100% - 30px); align-items: center; }
.p-delay .main { align-content: center; }
.dist-col { height: calc(100% - 30px); display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 10px; }
.dist-col .fold-eat { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: flex-start; justify-content: space-around; }
.lfo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lfo-col, .tune {                   /* recessed cream trays */
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 10px; border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--sh) 18%, var(--cream)), color-mix(in oklab, var(--sh) 30%, var(--cream)));
  border: 2.5px solid var(--ink);
  box-shadow: inset 0 4px 0 color-mix(in oklab, var(--sh) 40%, rgba(27, 15, 46, .3)), 0 2px 0 rgba(255, 255, 255, .55);
}
.lfo-col .tag { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink); }
.led { position: relative; width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .5) 0 12%, #5b4a73 35%, var(--ink) 100%); box-shadow: 0 0 0 2px var(--ink); }
/* lit: a glow layer that only changes opacity (blinking LEDs cost no repaint) */
.led::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .06s; will-change: opacity;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--lime) 45%, #6fa000 100%); box-shadow: 0 0 0 2px var(--ink), 0 0 12px var(--lime), 0 0 22px var(--lime); }
.led.pink::after { background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--pink) 45%, #b0186a 100%); box-shadow: 0 0 0 2px var(--ink), 0 0 12px var(--pink), 0 0 22px var(--pink); }
.led.on::after { opacity: 1; }
.caption { font-size: 11px; color: var(--cream); text-align: center; width: 100%; margin-top: 2px; }

/* PITCH · HARMONY: pitch multipliers | HARM + range | STRICT ruling BASE, harmony switch, reference */
.pitch-grid { display: flex; align-items: stretch; gap: 10px; height: calc(100% - 30px); }
.pitch-grid .pcol { display: flex; flex-direction: column; justify-content: space-around; align-items: center; gap: 8px; padding-right: 10px;
  border-right: 3px dotted color-mix(in oklab, var(--sh) 55%, var(--ink)); }
.pitch-grid .harm { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-around; gap: 10px 8px; flex-wrap: wrap; }
.h-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.seg.hrange button { padding: 5px 8px; }
.seg.hcal button { padding: 4px 10px; }
.seg.moons button { padding: 3px 6px 4px; font-size: 17px; line-height: 1; letter-spacing: 0; }
.seg.moons button:not(.on) { color: color-mix(in oklab, var(--cream) 70%, transparent); }
/* STRICT: the ruler — a frame whose button sits on its top edge and governs everything inside it */
.strict-box { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: 14px; padding: 22px 10px 10px;
  border: 2.5px solid var(--ink); border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--sh) 18%, var(--cream)), color-mix(in oklab, var(--sh) 30%, var(--cream)));
  box-shadow: inset 0 4px 0 color-mix(in oklab, var(--sh) 40%, rgba(27, 15, 46, .3)), 0 2px 0 rgba(255, 255, 255, .55); transition: background .3s; }
.strict-box > .tg.ruler { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.strict-box > .tg.ruler.on, .strict-box > .tg.ruler:active { top: 2px; }
.strict-box .sb-in { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.strict-box.off { background: color-mix(in oklab, var(--cream) 55%, transparent); }
/* moon phases: always the monochrome text glyph */
.moon { font-family: "Noto Emoji", "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif; font-variant-emoji: text; font-weight: 400; }
/* switched-off controls lose their colour (they still answer) */
.seg.idle, .tg.idle { opacity: .45; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.seg, .tg { transition: opacity .3s, filter .3s; }
.tg:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }

/* BASE: an endless knob — a closed groove, no scale; the note goes to the screen */
.knob.endless .trk-o { fill: none; stroke: var(--ink); stroke-width: 13; }

/* AND / OR: vertical lever switch, up = AND, down = OR */
.lever { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.lever .lv-t { font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--ink); opacity: .5; transition: opacity .15s; line-height: 1; }
.lever.on .lv-t:first-child, .lever:not(.on) .lv-t:last-child { opacity: 1; }
.lever .lv-slot { position: relative; width: 18px; height: 34px; border-radius: 999px; background: var(--ink); box-shadow: 0 2px 0 rgba(255, 255, 255, .45); }
.lever .lv-slot i { position: absolute; left: 2px; top: 18px; width: 14px; height: 14px; border-radius: 50%; transition: top .12s;
  background: radial-gradient(70% 60% at 35% 25%, #fff, rgba(255, 255, 255, 0) 70%), var(--lit); box-shadow: 0 0 10px color-mix(in oklab, var(--lit) 80%, transparent); }
.lever.on .lv-slot i { top: 2px; }
.lever:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------------------------------------- knobs: glossy vinyl balls in a lit groove */
.knob { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 70px; user-select: none; -webkit-user-select: none; }
.knob.s { width: 56px; } .knob.l { width: 84px; }
.knob svg { width: 52px; height: 52px; cursor: ns-resize; touch-action: none; overflow: visible; outline: none; }
.knob.s svg { width: 44px; height: 44px; } .knob.l svg { width: 68px; height: 68px; }
.knob .trk { fill: none; stroke: var(--ink); stroke-width: 13; stroke-linecap: round; }
.knob .arc { fill: none; stroke: var(--lit); stroke-width: 6.5; stroke-linecap: round; transition: stroke-width .15s; }
.knob .arcg { fill: none; stroke: var(--lit); stroke-width: 12; stroke-linecap: round; opacity: .35; }   /* the glow, without a filter */
.knob .kshadow { fill: var(--ink); opacity: .45; }
.knob .cap { fill: var(--cap); stroke: var(--ink); stroke-width: 3; }
.knob .ptr { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.knob .ptr-hi { stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-linecap: round; }
.knob .ghost { fill: var(--pink); stroke: var(--ink); stroke-width: 2.5; opacity: 0; transition: opacity .2s; }
.knob.mod .ghost { opacity: 1; }
.knob svg:hover .arc, .knob svg:focus-visible .arc, .knob.drag .arc { stroke-width: 8.5; }
.knob svg:focus-visible .cap { stroke: var(--cream); stroke-width: 4; }
.knob svg:hover .cap { filter: brightness(1.08); }
.knob .lab { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--ink); text-transform: uppercase; text-align: center; white-space: nowrap; line-height: 1.1; }
.knob .lab b { font-weight: 700; }
/* MIX knobs: cap colour cycle and glow are HTML layers under the SVG that only fade */
.kbox { position: relative; line-height: 0; }
.kbox > svg { position: relative; z-index: 1; }
.knob.mix .cap { fill: none; } .knob.mix .kshadow { display: none; }
.mx { position: absolute; inset: 0; pointer-events: none; }
.mx b { position: absolute; border-radius: 50%; }
.mx .sh { left: 22%; top: 27%; width: 56%; height: 56%; background: var(--ink); opacity: .45; }
.mx .c { left: 22%; top: 22%; width: 56%; height: 56%; }
.mx .c0 { background: radial-gradient(80% 80% at 38% 32%, #fff 0%, #ffe03a 30%, #ff4fa8 75%, #2c1a4a 100%); }
.mx .c1 { background: radial-gradient(80% 80% at 38% 32%, #fff 0%, #3cb6ff 30%, #ffe03a 75%, #2c1a4a 100%); opacity: 0; animation: q1 2.2s linear infinite; will-change: opacity; }
.mx .c2 { background: radial-gradient(80% 80% at 38% 32%, #fff 0%, #8a45ff 30%, #3cb6ff 75%, #2c1a4a 100%); opacity: 0; animation: q2 2.2s linear infinite; will-change: opacity; }
.mx .c3 { background: radial-gradient(80% 80% at 38% 32%, #fff 0%, #ff4fa8 30%, #8a45ff 75%, #2c1a4a 100%); opacity: 0; animation: q3 2.2s linear infinite; will-change: opacity; }
.mx .g { inset: -9%; }
.mx .g0 { background: radial-gradient(closest-side, rgba(255, 224, 58, .75) 78%, rgba(255, 224, 58, 0) 100%); }
.mx .g1 { background: radial-gradient(closest-side, rgba(60, 182, 255, .75) 78%, rgba(60, 182, 255, 0) 100%); opacity: 0; animation: t1 2.2s linear infinite; will-change: opacity; }
.mx .g2 { background: radial-gradient(closest-side, rgba(255, 79, 168, .8) 78%, rgba(255, 79, 168, 0) 100%); opacity: 0; animation: t2 2.2s linear infinite; will-change: opacity; }
.knob.mix.idle .mx b { animation: none; }
.knob.mix.idle .mx .g { display: none; }
.knob.mix .lab { font-size: 11px; }
.knob.idle { opacity: 0.4; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.knob.idle .arcg { display: none; }
/* a control Taraswati is moving: a pulsing ring (a layer that only fades — no repaint) */
.auto-touch { position: relative; }
.auto-touch::after { content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; z-index: 2;
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 5.5px var(--ink), 0 0 22px 4px rgba(255, 79, 168, .7);
  animation: touched 1.2s ease-in-out infinite alternate; will-change: opacity; }
@keyframes touched { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------- segmented + toggles (rubber buttons) */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; gap: 2px; background: var(--ink);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .45); }
.seg button { border: 0; background: none; cursor: pointer; padding: 5px 10px; border-radius: 999px; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; color: color-mix(in oklab, var(--cream) 78%, transparent); transition: background .15s, color .15s, transform .1s; white-space: nowrap; }
.seg button:hover { color: var(--cream); background: rgba(255, 255, 255, .1); }
.seg button:active { transform: scale(.94); }
.seg button.on { color: var(--ink);
  background: radial-gradient(70% 60% at 35% 20%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), var(--lit);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2), 0 0 12px color-mix(in oklab, var(--lit) 80%, transparent); }
.seg.tiny button { padding: 4px 7px; font-size: 11px; letter-spacing: 0; min-width: 22px; }
/* the LFO choosing buttons: a 2 × 2 square */
.seg.quad { display: inline-grid; grid-template-columns: repeat(2, 1fr); border-radius: 12px; gap: 2px; }
.seg.quad button { border-radius: 8px; min-width: 24px; padding: 5px 0; }
.tg { border: 2.5px solid var(--ink); cursor: pointer; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink); background: linear-gradient(180deg, #fff, var(--cream) 50%, #e6d6ba);
  box-shadow: 0 3px 0 var(--ink); transition: transform .1s, box-shadow .1s, background .2s; position: relative; top: 0; }
.tg:hover { background: linear-gradient(180deg, #fff, #fffaf0 50%, #efe0c4); }
.tg:active { top: 2px; box-shadow: 0 1px 0 var(--ink); }
.tg.on { top: 2px; box-shadow: 0 1px 0 var(--ink), 0 0 16px color-mix(in oklab, var(--pink) 85%, transparent);
  background: radial-gradient(70% 60% at 35% 20%, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%), var(--pink); }
.tg.acid.on { background: radial-gradient(70% 60% at 35% 20%, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%), var(--lit);
  box-shadow: 0 1px 0 var(--ink), 0 0 16px color-mix(in oklab, var(--lit) 85%, transparent); }
.tg.send { padding: 4px 8px; }
.tg.send.on { background: radial-gradient(70% 60% at 35% 20%, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%), var(--lime);
  box-shadow: 0 1px 0 var(--ink), 0 0 14px rgba(194, 240, 58, .8); }
.tg.sm { padding: 4px 9px; }
.tg.wide { padding: 4px 9px; font-size: 9.5px; letter-spacing: .14em; }
/* QUART is red */
.tg.lead.on { color: var(--cream); text-shadow: 0 1px 0 var(--ink);
  background: radial-gradient(70% 60% at 35% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%), var(--red);
  box-shadow: 0 1px 0 var(--ink), 0 0 18px rgba(255, 61, 61, .9); }

/* ------------------------------------------------------------- oscillators */
.tunebar { padding: 6px 22px 30px; }
.tb-head { display: flex; align-items: baseline; gap: 14px; padding: 8px 4px 14px; }
.tb-head h2 { margin: 0; font-family: var(--f-head); font-size: 14px; font-weight: 700; letter-spacing: .16em; color: var(--cream);
  background: var(--ink); padding: 7px 16px 7px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 0 0 3px var(--cream), 0 4px 0 3px var(--ink); }
.tb-head h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 15%, var(--pink) 50%, #b0186a); }
.scroller { display: flex; gap: 16px; overflow-x: auto; padding: 6px 6px 22px; scroll-snap-type: x proximity; scrollbar-width: auto; scrollbar-color: var(--pink) var(--ink); }
.scroller::-webkit-scrollbar { height: 16px; }
.scroller::-webkit-scrollbar-track { background: var(--ink); border-radius: 99px; }
.scroller::-webkit-scrollbar-thumb { border-radius: 99px; border: 3px solid var(--ink);
  background: radial-gradient(60% 50% at 50% 25%, rgba(255, 255, 255, .7), transparent 70%), var(--pink); }
.block { flex: 0 0 auto; scroll-snap-align: start; padding: 14px 12px 16px; width: 300px;
  content-visibility: auto; contain-intrinsic-size: auto 300px auto 640px; }   /* blocks scrolled out of view are not drawn */
.block.single { width: 176px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; padding: 0 6px; }
.block-head .name { font-family: var(--f-logo); font-size: 24px; line-height: 1; letter-spacing: .02em; color: var(--cream);
  -webkit-text-stroke: 0; text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 1.5px 1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 0 4px 0 var(--ink); }
.block-head .rm { border: 2.5px solid var(--ink); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-family: var(--f-logo); font-size: 15px; line-height: 1; color: var(--cream);
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--red) 50%, #b01a2a); box-shadow: 0 2px 0 var(--ink); text-shadow: 0 1px 0 var(--ink); padding: 0; }
.block-head .rm:hover { filter: brightness(1.1); }
.block-head .rm:active { transform: translateY(2px); box-shadow: none; }
.block-head .head-r { display: flex; align-items: center; gap: 8px; }
.block-ctl { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.block-knobs { display: flex; justify-content: space-around; margin: 8px 0 10px; }
.tunes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.block.single .tunes { grid-template-columns: 1fr; }
.tune { gap: 7px; padding: 8px 5px 10px; min-width: 0; }
.tune .lsn { display: flex; gap: 5px; }
.tune .lfo-row { display: flex; align-items: center; justify-content: center; gap: 4px; }
.tune .lfo-row .seg.quad { margin-bottom: 14px; }
/* above the key: how the note is played — HOLD and FAST */
.tune .note-ctl { display: flex; align-items: center; justify-content: center; gap: 4px; }
.tune .note-ctl .tg { margin-bottom: 14px; }
/* jelly key: a fat gummy button that lights up in the colour of its pitch */
.key {
  width: 100%; max-width: 110px; height: 50px; cursor: pointer; border-radius: 18px; position: relative; top: 0;
  font-family: var(--f-logo); font-size: 22px; line-height: 1; color: var(--ink);
  border: 3px solid var(--ink);
  background:
    radial-gradient(70% 45% at 40% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, #fff, var(--cream) 45%, #dccbb0);
  box-shadow: 0 5px 0 var(--ink), inset 0 -5px 0 rgba(27, 15, 46, .14);
  text-shadow: 0 1.5px 0 #fff;
  transition: top .08s;                /* no colour/glow transitions: the glow follows the pitch without repainting for 0.2 s */
}
.key:hover { background: radial-gradient(70% 45% at 40% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 72%), linear-gradient(180deg, #fff, #fffaf0 45%, #e8d8bc); }
.key:active { top: 3px; box-shadow: 0 2px 0 var(--ink), inset 0 -3px 0 rgba(27, 15, 46, .14); }
.key:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.key.on {
  top: 3px; color: var(--ink); text-shadow: 0 0 6px #fff, 0 1px 0 #fff;
  background:
    radial-gradient(70% 45% at 40% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 72%),
    radial-gradient(120% 120% at 50% 60%, #fff 0%, var(--kc, var(--lime)) 38%, color-mix(in srgb, var(--kc, var(--lime)) 62%, #000) 100%);
  box-shadow: 0 2px 0 var(--ink), 0 0 22px var(--kc, var(--lime)), 0 0 60px color-mix(in srgb, var(--kc, var(--lime)) 55%, transparent),
    inset 0 0 14px rgba(255, 255, 255, .6);
}
.add-card { flex: 0 0 auto; width: 150px; border-radius: var(--radius); cursor: pointer; color: var(--ink);
  border: 3px dashed var(--ink); background: color-mix(in oklab, var(--cream) 94%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; transition: transform .15s, background .2s; min-height: 200px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .4); }
.add-card .plus { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; font-family: var(--f-logo); font-size: 44px; line-height: 1;
  color: var(--cream); border: 3px solid var(--ink); text-shadow: 0 2px 0 var(--ink); padding-bottom: 4px;
  background: radial-gradient(circle at 35% 28%, #fff 0 10%, var(--green) 50%, #148a3f); box-shadow: 0 5px 0 var(--ink); }
.add-card:hover { background: var(--cream); transform: translateY(-3px) rotate(-1deg); }
.add-card:active .plus { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.add-card[disabled] { opacity: .45; cursor: default; transform: none; filter: grayscale(1); }

/* ------------------------------------------------------------- overlay + modal */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center;
  background: radial-gradient(80vmax 60vmax at 50% 45%, rgba(138, 69, 255, .55), rgba(27, 15, 46, .88) 70%); transition: opacity .6s; }
.overlay.gone { opacity: 0; pointer-events: none; }
.overlay .logo { --lw: 4px; font-size: clamp(38px, 9vw, 120px); padding: 0 .1em .12em; }
.overlay > div { display: flex; flex-direction: column; align-items: center;}
.enter { margin-top: 34px; padding: 18px 50px; border-radius: 999px; cursor: pointer; color: var(--ink); position: relative; top: 0;
  font-family: var(--f-head); font-weight: 700; font-size: 18px; letter-spacing: .3em;
  border: 3px solid var(--ink);
  background: radial-gradient(60% 50% at 30% 18%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #fff38a, var(--yellow) 40%, #f2b800);
  box-shadow: 0 7px 0 var(--ink), 0 0 40px rgba(255, 224, 58, .45); transition: top .1s, box-shadow .1s; }
.enter:hover { box-shadow: 0 7px 0 var(--ink), 0 0 60px rgba(255, 224, 58, .7), 0 0 90px rgba(255, 79, 168, .45); }
.enter:active { top: 5px; box-shadow: 0 2px 0 var(--ink); }
.modal { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(27, 15, 46, .6); }
.modal.open { display: grid; }
.modal .card { --sh: var(--cream); --lit: var(--pink); width: min(440px, 92vw); padding: 0; font-size: 13px; }
.modal .close { position: absolute; top: 14px; right: 14px; }
.info-stack { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 26px; padding: 48px 24px; line-height: 1.4; }
.info-line { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.info-line .muted { color: var(--ink); opacity: .7; font-size: 12px; letter-spacing: .08em; }
.info-line .mail { color: var(--ink); font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--ink); }
.info-line .mail:hover { border-color: var(--pink); color: #c2207a; }
.info-stack .manual-btn { margin: 0; }
.made-by { display: block; margin: 0; padding-left: .02em; font-family: var(--f-logo); font-size: 30px; letter-spacing: .02em;
  border: 0 !important; text-decoration: none;
  animation: vibe 2.2s ease-in-out infinite !important; }
/* same colour cycle and timing as the MIX knob caps */
@keyframes vibe {
  0%, 100% { color: var(--yellow); text-shadow: 0 2px 0 var(--ink), 0 0 16px rgba(255, 224, 58, .6); }
  25% { color: var(--sky); text-shadow: 0 2px 0 var(--ink), 0 0 16px rgba(60, 182, 255, .6); }
  50% { color: var(--violet); text-shadow: 0 2px 0 var(--ink), 0 0 16px rgba(138, 69, 255, .6); }
  75% { color: var(--pink); text-shadow: 0 2px 0 var(--ink), 0 0 16px rgba(255, 79, 168, .6); }
}
.made-by { color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); }
.made-by:hover { filter: brightness(1.15); }
.manual-btn { display: inline-block; margin-top: 6px; padding: 11px 28px; border-radius: 999px; text-decoration: none; color: var(--ink) !important; position: relative; top: 0;
  border: 3px solid var(--ink) !important; font-weight: 700; font-size: 12px; letter-spacing: .2em;
  background: radial-gradient(60% 50% at 30% 18%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), var(--lime);
  box-shadow: 0 5px 0 var(--ink); transition: top .1s, box-shadow .1s, filter .2s; }
.manual-btn:nth-of-type(2) { background: radial-gradient(60% 50% at 30% 18%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%), var(--sky); }
.manual-btn:hover { filter: brightness(1.06); top: -1px; box-shadow: 0 6px 0 var(--ink); }
.manual-btn:active { top: 4px; box-shadow: 0 1px 0 var(--ink); }

/* ------------------------------------------------------------- RANDOM: a gumball globe drawn on a canvas */
.rand-btn { position: relative; flex: none; width: var(--hc); height: var(--hc); padding: 0; border-radius: 50%; cursor: pointer; border: 0; background: transparent;
  box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink), 0 10px 18px rgba(27, 15, 46, .5); transition: transform .2s, box-shadow .2s; }
.rand-btn canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 50%; }
.rand-btn:hover { transform: scale(1.06) rotate(-4deg); box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink), 0 0 26px rgba(255, 79, 168, .7); }
.rand-btn:active { transform: scale(.94) translateY(3px); box-shadow: 0 0 0 3px var(--ink), 0 2px 0 3px var(--ink); }
.rand-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .p-lfo { grid-column: span 12; } .p-delay { grid-column: span 8; } .p-pitch { grid-column: span 4; }
  .p-reverb { grid-column: span 7; } .p-dist { grid-column: span 5; } .p-times { grid-column: span 6; }
}
@media (max-width: 1400px) {
  .topbar { gap: 18px; }
  .tb-left, .tb-right, .tb-acts { gap: 16px; }
  #volSlot { gap: 14px; }
}
@media (max-width: 1240px) {                 /* not enough width for one line: logo + switches on top, the controls below */
  .topbar { grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); row-gap: 14px; column-gap: 26px;
    grid-template-areas: "logo logo . tog tog" ". acts scr vol ."; }
  .tb-left, .tb-right { display: contents; }
  .logo-h { grid-area: logo; } .tb-acts { grid-area: acts; } .screen { grid-area: scr; } #volSlot { grid-area: vol; }
  .top-right { grid-area: tog; justify-self: end; flex-direction: row; gap: 14px; }
}
@media (max-width: 760px) {
  :root { --hc: 52px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px 26px; column-gap: 12px; row-gap: 10px;
    grid-template-areas: "logo tog" "scr scr" "acts vol"; }
  .topbar .logo { font-size: 20px; }
  .top-right { flex-direction: column; gap: 6px; align-items: flex-start; }
  .pill-switch { font-size: 8.5px; letter-spacing: .08em; gap: 6px; max-width: 130px; text-align: left; line-height: 1.25; }
  .screen { width: 100%; height: 64px; margin-bottom: 6px; }
  .screen .scr-v { font-size: 38px; } .screen.two .scr-v { font-size: 32px; } .screen .scr-s { font-size: 20px; }
  .tb-acts { gap: 12px; }
  #volSlot { flex: none; gap: 12px; justify-self: end; }
  .age-sw .lbl { font-size: 8px; letter-spacing: .1em; }
  .topbar .auto { --cs: 82px; --travel: 5px; border-radius: 14px; }
  .topbar .auto .cap { font-size: 9.5px; gap: 4px; letter-spacing: .04em; border-radius: 9px; padding: 3px 3px; }
  .topbar .auto .dot { width: 9px; height: 9px; }
  .vd-lab { font-size: 8px; letter-spacing: .1em; }
  main, .tunebar { padding-left: 12px; padding-right: 12px; }
  .rack { grid-template-columns: 1fr; }
  .rack > .panel { grid-column: 1 / -1; }
  .lfo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .logo .lg-tx, .enter, .auto.calling .txt, .pill-switch.on .track::before, .auto.on .mc i, .mx b, .auto-touch::after { animation: none !important; }
}
