:root {
  color-scheme: dark;
  font-family: "Space Grotesk", system-ui, sans-serif;
  --display: "Anton", Impact, sans-serif;
  --marker: "Permanent Marker", cursive;
  --mono: "JetBrains Mono", monospace;
  --pink: #ff2e88;
  --yellow: #ffe600;
  --red: #ff2b2b;
  --lime: #b6ff3c;
  --cyan: #36e6ff;
  --paper: #f7f0e4;
  --ink: #090b0e;
  background: var(--ink);
  color: #f5f6f7;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
/* `.select-screen`/`.synth-screen` set display:flex, which has the same specificity as the UA
   `[hidden]` rule and would win — so hidden screens would still show, stacked. Force hidden to win. */
[hidden] { display: none !important; }
body {
  position: relative; margin: 0; overflow-x: hidden;
  min-height: 100dvh;
  display: flex; flex-direction: column;   /* footer rides the bottom even on short screens */
  background:
    radial-gradient(ellipse at 50% -10%, #2a1140 0, #140a22 40%, #07060c 100%);
  -webkit-tap-highlight-color: transparent;
}
/* faint grid floor, like a retro game stage */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(transparent 96%, rgba(255,46,136,.18) 100%),
    linear-gradient(90deg, transparent 96%, rgba(54,230,255,.10) 100%);
  background-size: 46px 46px, 46px 46px;
  mask-image: linear-gradient(to bottom, transparent 40%, #000 100%);
  opacity: .5;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd {
  display: inline-block; min-width: 1.1em; padding: 1px 5px; border: 2px solid #000;
  border-radius: 4px; background: var(--paper); color: #000; box-shadow: 2px 2px 0 #000;
  font-family: var(--mono); font-size: .8em; font-weight: 700; text-align: center;
}

/* CRT scanline + flicker overlay */
.scanlines {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.22) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply; opacity: .55;
}
.scanlines::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0,0,0,.5) 100%);
}

/* ---------------- top bar ---------------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 4px solid #fff; background: #100c18; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(4px 4px 0 var(--pink)); transform: rotate(-4deg); }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-family: var(--display); font-size: 1.3rem; letter-spacing: .06em; }
.brand small { margin-top: 3px; color: var(--cyan); font-family: var(--mono); font-size: .55rem; letter-spacing: .2em; }
.badge { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 3px solid #000; color: #000; background: var(--paper); box-shadow: 3px 3px 0 var(--pink); font-family: var(--mono); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #ff515b; box-shadow: 0 0 10px #ff515b; }
.badge.online { background: var(--lime); }
.badge.online i { background: #1f8f12; box-shadow: 0 0 12px var(--lime); }
.rig-link { display: inline-flex; align-items: center; padding: 8px 12px; border: 3px solid #000; background: var(--pink); color: #fff; font-family: var(--display); font-size: .8rem; letter-spacing: .05em; text-decoration: none; box-shadow: 3px 3px 0 var(--cyan); }
.app-cta { background: #000; color: var(--cyan); box-shadow: 3px 3px 0 var(--pink); }
.app-cta:hover { background: var(--cyan); color: #000; }

/* ======================================================================
   SELECT SCREEN
   ====================================================================== */
.select-screen { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 18px 16px 40px; text-align: center; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- shared arcade coin slot + credits counter (easter egg) ---- */
.coinbox { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* the on-screen digital attract prompt (what the cabinet's screen shows) */
.insert-coin {
  font-family: var(--mono); font-size: .82rem; font-weight: 700; letter-spacing: .3em; padding-left: .3em;
  color: var(--yellow); text-shadow: 0 0 8px rgba(255,230,0,.7);
  animation: blink 1.05s steps(2) infinite;
}
.insert-coin.flash { animation: none; color: #fff; text-shadow: 0 0 14px #fff, 0 0 4px var(--yellow); }

/* the real coin slot — tucked at the bottom of the cabinet. Peeks up from the edge, rises on hover. */
.coin-door {
  position: fixed; left: 50%; bottom: -30px; transform: translateX(-50%);
  width: 116px; height: 60px; padding: 0; z-index: 90; opacity: .7;
  border: 4px solid #000; border-radius: 11px 11px 0 0;
  background:
    radial-gradient(circle at 13px 13px, #b9bec6 0 2px, #4a4e56 2.6px 4px, transparent 4.4px),
    radial-gradient(circle at calc(100% - 13px) 13px, #b9bec6 0 2px, #4a4e56 2.6px 4px, transparent 4.4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, rgba(0,0,0,.06) 2px 4px),
    linear-gradient(#cdd2d9, #969ba3 46%, #717680 54%, #9aa0a8);
  box-shadow: 0 -4px 0 #000, inset 0 2px 0 rgba(255,255,255,.5);
  transition: bottom .16s ease, opacity .16s ease, transform .08s;
}
.coin-door:hover { bottom: 0; opacity: 1; }            /* found it -> slides fully into view */
.coin-door:active { transform: translateX(-50%) translateY(3px); }
.coin-door .slot {
  position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 14px; height: 28px; border-radius: 8px; background: #060709;
  border: 2px solid #000; box-shadow: inset 0 0 0 2px #2c3038, inset 0 4px 6px #000, 0 1px 0 rgba(255,255,255,.6);
}
.coin-door .slot::before {   /* "coin goes in here" cross-line */
  content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 4px; margin-top: -2px;
  background: #060709; border-top: 1px solid rgba(255,255,255,.4); border-bottom: 1px solid #000; border-radius: 2px;
}
.coin-door .coin-disc {
  position: absolute; left: 50%; margin-left: -13px; top: -30px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: .46rem; font-weight: 700; color: #6b4e00;
  background: radial-gradient(circle at 38% 32%, #fff0a8, #f0bb20 60%, #aa7a00);
  border: 2px solid #7a5c00; box-shadow: 0 0 9px rgba(255,205,0,.7), inset 0 0 0 2px rgba(255,255,255,.3);
  opacity: 0; pointer-events: none; z-index: 3;
}
.coin-door.drop .coin-disc { animation: coindrop .44s cubic-bezier(.5,.1,.7,1) forwards; }
@keyframes coindrop {
  0% { opacity: 1; top: -30px; transform: rotateY(0) scale(1); }
  62% { opacity: 1; top: 12px; transform: rotateY(360deg) scale(.5); }
  100% { opacity: 0; top: 20px; transform: rotateY(540deg) scale(.2); }
}
.credits { display: flex; align-items: center; gap: 8px; }
.credits-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; color: #b9b2cc; }
.credits-num {
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem; letter-spacing: .12em; color: var(--yellow);
  padding: 2px 8px; border: 2px solid #000; background: #0b0910; box-shadow: inset 0 0 8px rgba(255,230,0,.25);
  text-shadow: 0 0 8px rgba(255,230,0,.6);
}
.credits-num.bump { animation: creditbump .3s ease; }
@keyframes creditbump { 40% { transform: scale(1.25); color: #fff; } }

.select-title {
  position: relative; margin: 4px 0 0; font-family: var(--display);
  font-size: clamp(2.1rem, 8vw, 4.4rem); letter-spacing: .04em; line-height: .95;
  color: #fff; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 #000;
}
/* chromatic-aberration ghost, very arcade */
.select-title::before {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  color: var(--cyan); z-index: -1; transform: translate(-3px, 2px); opacity: .55;
  text-shadow: none;
}
.select-sub { margin: 0; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: #b9b2cc; }
.select-sub kbd { margin: 0 1px; }

/* ---- the carousel reel ---- */
.reel { display: flex; align-items: center; gap: 8px; width: min(960px, 100%); margin-top: 6px; }
.reel-arrow {
  flex: none; width: 52px; height: 88px; border: 4px solid #000; background: var(--yellow); color: #000;
  box-shadow: 4px 4px 0 var(--pink); font-size: 1.6rem; font-weight: 900;
  transition: transform .08s;
}
.reel-arrow:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--pink); }
.reel-arrow:disabled { opacity: .25; box-shadow: 4px 4px 0 #000; cursor: default; }
.reel-window { flex: 1; overflow: hidden; padding: 14px 0; }
.reel-track {
  list-style: none; margin: 0; padding: 0; display: flex; align-items: center;
  transition: transform .32s cubic-bezier(.2,.85,.25,1); will-change: transform;
}

.synth-card {
  flex: 0 0 var(--card-w, 220px); height: 280px; margin: 0 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 18px 14px; border: 5px solid #000; background: #161021;
  box-shadow: 6px 6px 0 #000; transition: transform .3s cubic-bezier(.2,.85,.25,1), box-shadow .3s, opacity .3s;
  transform: scale(.82); opacity: .45; filter: saturate(.6);
}
.synth-card.is-center { transform: scale(1); opacity: 1; filter: none; box-shadow: 9px 9px 0 var(--accent, var(--pink)); border-color: #fff; }
.synth-card.locked { background: #120e1a; }

.card-art { width: 100%; height: 128px; display: grid; place-items: center; border: 3px solid #000; background: radial-gradient(circle at 50% 35%, #2a1c3e, #0d0916); }
.card-art svg { width: 92px; height: 92px; }
.card-name { font-family: var(--display); font-size: 1.7rem; letter-spacing: .03em; color: #fff; text-shadow: 3px 3px 0 #000; }
.card-tag { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; color: var(--accent, var(--pink)); text-transform: uppercase; }
.card-badge { font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .14em; padding: 3px 9px; border: 2px solid #000; }
.card-badge.ready { background: var(--lime); color: #000; }
.card-badge.soon { background: #2a2336; color: #8a82a0; }
.locked .card-art svg { opacity: .3; }
.locked .card-name { color: #5a536b; -webkit-text-stroke: 0; }

.reel-dots { display: flex; gap: 8px; margin-top: 2px; }
.reel-dots span { width: 9px; height: 9px; border: 2px solid #000; background: #2a2336; box-shadow: 1px 1px 0 #000; }
.reel-dots span.on { background: var(--pink); }

.start-button {
  margin-top: 10px; padding: 14px 40px; border: 5px solid #000; background: var(--lime); color: #000;
  font-family: var(--display); font-size: 1.5rem; letter-spacing: .1em; box-shadow: 6px 6px 0 var(--pink);
  transition: transform .08s, box-shadow .08s; animation: pulse 1.3s ease-in-out infinite;
}
.start-button:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--pink); }
.start-button.locked { background: #2a2336; color: #6c6480; box-shadow: 6px 6px 0 #000; animation: none; cursor: default; }
@keyframes pulse { 50% { transform: translateY(-3px); } }

/* ======================================================================
   SYNTH SCREEN
   ====================================================================== */
.synth-screen { display: flex; flex-direction: column; gap: 14px; padding: 14px clamp(10px, 3vw, 26px) 22px; }
.synth-bar { display: flex; align-items: center; gap: 14px; }
.back-button { padding: 9px 14px; border: 4px solid #000; background: var(--yellow); color: #000; font-family: var(--display); font-size: .9rem; letter-spacing: .06em; box-shadow: 4px 4px 0 var(--pink); }
.synth-id { margin-right: auto; }
.synth-id-kicker { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; color: var(--cyan); }
.synth-id h2 { margin: 1px 0 0; font-family: var(--display); font-size: clamp(1.8rem, 5vw, 2.8rem); color: var(--pink); letter-spacing: .03em; text-shadow: 3px 3px 0 #000, 6px 6px 0 var(--yellow); }
.pair-toggle { padding: 9px 14px; border: 4px solid #000; background: var(--paper); color: #000; font-family: var(--display); font-size: .82rem; letter-spacing: .05em; box-shadow: 4px 4px 0 var(--cyan); }
.pair-toggle.online { background: var(--lime); }
.plays-here { font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .12em; color: var(--cyan); white-space: nowrap; }

.pair-panel { border: 4px solid #000; background: #140f1e; padding: 14px; box-shadow: 6px 6px 0 #000; }
.pair-help { margin: 0 0 10px; font-family: var(--mono); font-size: .66rem; color: #b9b2cc; line-height: 1.5; }
.pair-row { display: flex; gap: 10px; }
#pairCode { flex: 1; min-width: 0; padding: 10px 12px; border: 3px solid #000; background: var(--paper); color: #000; font-family: var(--display); font-size: 1.3rem; letter-spacing: .35em; text-align: center; text-transform: uppercase; }
.connect-button { padding: 10px 18px; border: 3px solid #000; background: var(--lime); color: #000; font-family: var(--display); font-size: 1rem; letter-spacing: .06em; box-shadow: 4px 4px 0 var(--pink); }
.connect-button.online { background: var(--red); color: #fff; }
.pair-status { margin: 10px 0 0; font-family: var(--mono); font-size: .62rem; color: #9b93b2; }

/* ---- knob rack ---- */
.rack { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 16px; border: 4px solid #000; background: #161021; box-shadow: 6px 6px 0 #000; }
.knob { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.knob-dial {
  --turn: 0deg; position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #4a4456, #1b1822); border: 3px solid #000;
  box-shadow: 0 4px 0 #000, inset 0 2px 5px rgba(255,255,255,.18);
  cursor: ns-resize; touch-action: none; display: block;
}
.knob-dial::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--lime); transform-origin: 50% 21px; transform: rotate(var(--turn)); box-shadow: 0 0 6px var(--lime); }
.knob-dial:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.knob label { font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .1em; color: var(--yellow); }
.knob output { font-family: var(--mono); font-size: .58rem; color: #b9b2cc; }
.knob .knob-key { font-family: var(--mono); font-size: .52rem; color: #6f6886; letter-spacing: .08em; }
.knob .knob-key b { color: var(--cyan); font-weight: 700; }

/* ---- octave + hints ---- */
.octave-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.octave-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; color: var(--cyan); }
.oct-button { width: 38px; height: 38px; border: 3px solid #000; background: var(--yellow); color: #000; font-family: var(--display); font-size: 1.2rem; box-shadow: 3px 3px 0 var(--pink); }
#octaveValue { min-width: 1.4em; text-align: center; font-family: var(--display); font-size: 1.4rem; color: #fff; }
.export-button { padding: 8px 13px; border: 3px solid #000; background: var(--lime); color: #000; font-family: var(--display); font-size: .78rem; letter-spacing: .05em; box-shadow: 3px 3px 0 var(--pink); }
.export-button:disabled { opacity: .6; box-shadow: 3px 3px 0 #000; cursor: default; }
.kbd-hint { margin-left: auto; font-family: var(--mono); font-size: .58rem; color: #7d7691; }
.kbd-hint kbd { font-size: .7em; }

/* ---- keyboard ---- */
.keyboard-wrap { overflow-x: auto; padding-bottom: 6px; }
.keyboard { position: relative; display: flex; height: clamp(150px, 28vh, 230px); min-width: 560px; border: 4px solid #000; background: #000; box-shadow: 6px 6px 0 #000; user-select: none; touch-action: none; }
.key { position: relative; touch-action: none; }
.key.white { flex: 1; background: linear-gradient(#fbf7ef, #ddd5c6); border-right: 2px solid #000; border-radius: 0 0 5px 5px; }
.key.white:last-child { border-right: 0; }
.key.white.down { background: linear-gradient(var(--lime), #88c92c); }
.key.black {
  position: absolute; top: 0; width: 4.2%; height: 62%; z-index: 2;
  background: linear-gradient(#2a2730, #050506); border: 2px solid #000; border-top: 0;
  border-radius: 0 0 4px 4px; box-shadow: inset 0 -4px 6px rgba(255,255,255,.12);
}
.key.black.down { background: linear-gradient(var(--pink), #a01457); }
.key .key-label { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: .56rem; color: #8b8473; pointer-events: none; }
.key.black .key-label { color: #b9b2cc; bottom: 5px; }

@media (max-width: 560px) {
  .rack { grid-template-columns: repeat(3, 1fr); }
  .kbd-hint { display: none; }
  .synth-card { --card-w: 180px; height: 240px; }
}

/* Shared site footer (matches bashery.app) - a punchy lime block with neo-brutalist chip links. */
.footer {
  margin-top: auto;   /* pushed to the bottom of the flex-column body */
  border-top: 3px solid #1c1c1c; background: #0b0b0b; color: #c7c1b3;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.1rem 1.5rem;
  padding: 2.4rem 1.5rem;
}
.footer__brand { display: flex; flex-direction: column; gap: .35rem; }
.footer__logo { display: inline-flex; align-items: center; gap: .5rem; font-family: 'Anton', system-ui, sans-serif; font-size: 1.6rem; color: #fff; letter-spacing: 1.5px; text-decoration: none; }
.footer__logo img { width: 1.5rem; height: 1.5rem; display: block; }
.footer__note { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; color: #7a766c; }
.footer__links { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.footer__link {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  color: #000; text-decoration: none; background: #ece5d3;
  border: 3px solid #000; padding: .5rem .9rem; box-shadow: 3px 3px 0 rgba(255,255,255,.14);
  transition: transform .1s ease, box-shadow .1s ease;
}
.footer__link:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(255,255,255,.22); color: #000; }
.footer__link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(255,255,255,.14); }
.footer__link--discord { background: #ff2e88; color: #fff; }
@media (max-width: 560px) { .footer { flex-direction: column; text-align: center; } .footer__brand { align-items: center; } }

/* ============================ STUDIO ============================ */
/*
  A production tool has to answer "what am I working on" without being asked, so the pack's own
  state is a rail that never leaves the screen and the panels are only the work in front of you.
*/
.studio-screen { max-width: 1240px; margin: 0 auto; padding: 0 12px 28px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- the bar that is true everywhere --- */
.studio-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid #1d2733; margin-bottom: 4px;
}
.pack-name-wrap { flex: 1 1 200px; min-width: 160px; }
.pack-name {
  width: 100%; font: 700 16px/1.2 ui-monospace, monospace; letter-spacing: .04em;
  color: #cfe3f5; background: transparent; border: 0; border-bottom: 1px solid #23303f;
  padding: 6px 2px;
}
.pack-name:focus { outline: 0; border-bottom-color: #4fd1c5; }
.pack-name::placeholder { color: #4a5c6e; }
.head-actions { display: flex; gap: 6px; align-items: center; }
.icon-button {
  padding: 8px 11px; font: 700 12px/1 ui-monospace, monospace; letter-spacing: .08em;
  color: #a9bccd; background: #141b24; border: 1px solid #23303f; border-radius: 6px; cursor: pointer;
}
.icon-button:hover:not(:disabled) { border-color: #4fd1c5; color: #4fd1c5; }
.icon-button:disabled { opacity: .35; cursor: default; }
.primary-button {
  padding: 9px 16px; font: 700 12px/1 ui-monospace, monospace; letter-spacing: .1em;
  color: #06201e; background: #4fd1c5; border: 1px solid #4fd1c5; border-radius: 6px; cursor: pointer;
}
.primary-button:hover:not(:disabled) { filter: brightness(1.08); }
.primary-button:disabled { opacity: .4; cursor: not-allowed; }
.primary-button.big { padding: 13px 24px; font-size: 13px; }
.head-note { display: block; font: 600 12px/1.5 ui-monospace, monospace; color: #4fd1c5; min-height: 18px; }
.head-note.bad { color: #ffb4a2; }

/* --- the layout --- */
.studio-body { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .studio-body { grid-template-columns: 1fr; } }

/* --- the rail: what the pack IS --- */
.pack-rail {
  border: 1px solid #1d2733; border-radius: 8px; background: #0e131a; padding: 12px 13px;
  position: sticky; top: 12px;
}
@media (max-width: 900px) { .pack-rail { position: static; } }
.pack-rail h3 {
  margin: 0 0 10px; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .2em; color: #4fd1c5;
}
.rail-block { margin-bottom: 11px; }
.rail-label { display: block; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .16em; color: #56697d; margin-bottom: 3px; }
.rail-line { margin: 0; font: 500 11.5px/1.5 ui-monospace, monospace; color: #a9bccd; }
.rail-line.empty { color: #56697d; font-style: italic; }
.rail-parts { list-style: none; margin: 0; padding: 0; }
.rail-parts li {
  display: flex; align-items: center; gap: 6px; justify-content: space-between;
  font: 500 11.5px/1.6 ui-monospace, monospace; color: #a9bccd;
}
.rail-parts .part-name { color: #56697d; text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; }
.rail-parts .has { color: #4fd1c5; }
.rail-parts button {
  background: transparent; border: 0; color: #56697d; cursor: pointer; font-size: 13px; padding: 0 2px;
}
.rail-parts button:hover { color: #ffb4a2; }
.rail-problems { margin-top: 12px; border-top: 1px solid #1d2733; padding-top: 10px; }
.rail-problems:empty { display: none; }
.problem {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-left: 2px solid #33465c;
  padding: 5px 0 5px 9px; margin-bottom: 6px;
  font: 500 11px/1.45 ui-monospace, monospace; color: #a9bccd;
}
.problem.stop { border-left-color: #ff6b6b; color: #ffb4a2; }
.problem.warn { border-left-color: #ffd166; }
.problem:hover { color: #cfe3f5; }

/* --- tabs --- */
.studio-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.studio-tabs button {
  flex: 1; padding: 11px 8px; font: 700 12px/1 ui-monospace, monospace;
  letter-spacing: .14em; color: #7f93a8; background: #0e131a;
  border: 1px solid #1d2733; border-radius: 6px; cursor: pointer;
}
.studio-tabs button.on { color: #06201e; background: #4fd1c5; border-color: #4fd1c5; }
.studio-panel { animation: fadein .16s ease; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .studio-panel { animation: none; } }

/* --- rows of controls --- */
.song-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.song-row label {
  display: flex; flex-direction: column; gap: 4px;
  font: 700 9px/1 ui-monospace, monospace; letter-spacing: .14em; color: #7f93a8;
}
.song-row label.grow { flex: 1 1 190px; }
.song-row select, .song-row input, .inline-select, .inline-num {
  font: 600 13px/1 ui-monospace, monospace; color: #cfe3f5;
  background: #0e131a; border: 1px solid #23303f; border-radius: 5px; padding: 7px 8px;
  min-width: 70px;
}
.song-row input[type="number"], .inline-num { width: 80px; }
:is(.song-row select, .song-row input, .inline-select, .inline-num, .roll-btn, .primary-button,
   .icon-button, .studio-tabs button, .seg button):focus-visible {
  outline: 2px solid #4fd1c5; outline-offset: 2px;
}

.roll-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.roll-bar .push, .samp-status.push { margin-left: auto; }
.seg { display: flex; border: 1px solid #23303f; border-radius: 6px; overflow: hidden; }
.seg button {
  padding: 8px 15px; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .1em;
  color: #7f93a8; background: #0e131a; border: 0; cursor: pointer;
}
.seg button.on { color: #06201e; background: #4fd1c5; }
.roll-btn {
  padding: 8px 14px; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .1em;
  color: #cfe3f5; background: #141b24; border: 1px solid #23303f; border-radius: 6px; cursor: pointer;
}
.roll-btn:hover { border-color: #4fd1c5; color: #4fd1c5; }
.roll-btn.subtle { color: #7f93a8; }
.roll-btn.arming { color: #06201e; background: #ffd166; border-color: #ffd166; }
.starter { display: inline-flex; gap: 6px; align-items: center;
  font: 700 9px/1 ui-monospace, monospace; letter-spacing: .14em; color: #7f93a8; }

/* --- the roll --- */
.roll-wrap { border: 1px solid #1d2733; border-radius: 8px; overflow: hidden; background: #0b0e13; }
#rollCanvas { display: block; width: 100%; height: 340px; touch-action: none; }
#rollCanvas:focus-visible { outline: 2px solid #4fd1c5; outline-offset: -2px; }
@media (max-width: 700px) { #rollCanvas { height: 250px; } }
.roll-help { margin: 10px 0 0; font-size: 12px; line-height: 1.55; }
.muted { color: #7f93a8; }
.next-step {
  display: block; margin-top: 10px; padding: 9px 11px; border-radius: 6px;
  background: rgba(79,209,197,.08); border: 1px solid #23504e;
  font: 600 12px/1.55 ui-monospace, monospace; color: #cfe3f5;
}
.next-step:empty { display: none; }

/* --- disclosure --- */
.hint, .guide {
  border: 1px solid #1d2733; border-radius: 8px; padding: 10px 13px; margin: 12px 0; background: #0e131a;
}
.hint summary, .guide summary {
  cursor: pointer; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .12em; color: #4fd1c5;
}
.hint p, .guide p, .guide li { font-size: 12.5px; line-height: 1.55; color: #a9bccd; }
.guide a { color: #4fd1c5; }
.guide .lede { font-size: 13.5px; color: #cfe3f5; margin: 4px 0 10px; }
.guide .steps { padding-left: 20px; margin: 10px 0; }
.guide .steps li { margin-bottom: 5px; }
.guide .steps b, .guide .chain b { color: #cfe3f5; }
.guide .chain {
  font: 600 12px/1.6 ui-monospace, monospace; color: #cfe3f5;
  background: #0b0e13; border: 1px solid #1d2733; border-radius: 6px; padding: 8px 10px;
}
.os-wrap { overflow-x: auto; margin: 12px 0; }
.os-table { border-collapse: collapse; width: 100%; min-width: 420px; }
.os-table th, .os-table td {
  border: 1px solid #1d2733; padding: 7px 9px; text-align: left; vertical-align: top;
  font: 500 12px/1.45 ui-monospace, monospace; color: #a9bccd;
}
.os-table thead th { color: #4fd1c5; font-weight: 700; background: #0b0e13; letter-spacing: .06em; }
.os-table tbody th { color: #cfe3f5; font-weight: 700; white-space: nowrap; background: #0b0e13; }
.os-table em { color: #cfe3f5; font-style: normal; }
.guide .fyi {
  margin: 10px 0; padding: 8px 10px; border-left: 2px solid #4fd1c5;
  background: rgba(79,209,197,.06); font-size: 12.5px;
}
.guide .trouble { list-style: none; padding: 0; margin: 10px 0 0; }
.guide .trouble li { padding: 5px 0 5px 14px; border-left: 2px solid #33465c; margin-bottom: 4px; font-size: 12.5px; }
.guide .trouble b { color: #ffb4a2; }

/* --- sampling --- */
.samp-run { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.samp-status { font: 600 12px/1.5 ui-monospace, monospace; color: #7f93a8; }
.samp-status.bad { color: #ffb4a2; }
.sf2-badge {
  font: 700 10px/1 ui-monospace, monospace; letter-spacing: .08em; color: #7f93a8;
  background: #141b24; border: 1px solid #23303f; border-radius: 4px; padding: 7px 9px;
}
.wam-gui { margin-top: 10px; overflow: auto; max-height: 520px; }
.wam-gui:empty { display: none; }

/* --- settings --- */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.set-group { border: 1px solid #1d2733; border-radius: 8px; padding: 10px 12px; background: #0e131a; }
.set-group h4 {
  margin: 0 0 8px; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .16em;
  color: #4fd1c5; text-transform: uppercase;
}
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; align-items: center; padding: 4px 0; }
.set-row .set-label { font: 600 11px/1.3 ui-monospace, monospace; color: #a9bccd; }
.set-row.touched .set-label { color: #ffd166; }
.set-row.touched::after { content: '\2022'; color: #ffd166; grid-column: 2; }
.set-row .set-input { justify-self: end; }
.set-row input[type="range"] { width: 108px; accent-color: #4fd1c5; }
.set-row select {
  font: 600 11px/1 ui-monospace, monospace; color: #cfe3f5; background: #0b0e13;
  border: 1px solid #23303f; border-radius: 4px; padding: 4px 6px; max-width: 130px;
}
.set-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4fd1c5; }
.set-row .set-value { grid-column: 2; font: 600 10px/1 ui-monospace, monospace; color: #7f93a8; text-align: right; }
.set-row.learn-target { outline: 2px solid #ffd166; outline-offset: 2px; border-radius: 4px; }
.set-row.midi-lit .set-label { color: #4fd1c5; }
.guitar-quick { margin: 12px 0; }
.guitar-quick .set-group { border-color: #f97316; }
.guitar-quick .set-group h4 { color: #f97316; }

/* --- open by dropping --- */
.drop-veil {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(6,32,30,.86); border: 2px dashed #4fd1c5;
}
.drop-veil span { font: 700 15px/1 ui-monospace, monospace; letter-spacing: .16em; color: #4fd1c5; }

/* --- the way in --- */
.studio-home {
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  margin: 20px auto 0; padding: 16px 34px; cursor: pointer;
  background: linear-gradient(180deg, #4fd1c5, #2bb3a6);
  border: 0; border-radius: 10px; color: #06201e;
  box-shadow: 0 0 0 1px rgba(79,209,197,.5), 0 8px 26px rgba(79,209,197,.22);
  animation: studiopulse 3.4s ease-in-out infinite;
}
.studio-home b { font: 800 15px/1 ui-monospace, monospace; letter-spacing: .18em; }
.studio-home small { font: 600 11px/1.4 ui-monospace, monospace; color: #06201e; opacity: .78; }
.studio-home em { font: 600 10px/1.4 ui-monospace, monospace; color: #06201e; opacity: .6; font-style: normal; }
.studio-home:hover { filter: brightness(1.08); animation: none; }
@keyframes studiopulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(79,209,197,.5), 0 8px 26px rgba(79,209,197,.22); }
  50%      { box-shadow: 0 0 0 1px rgba(79,209,197,.8), 0 8px 34px rgba(79,209,197,.42); }
}
@media (prefers-reduced-motion: reduce) { .studio-home { animation: none; } }
.studio-top {
  cursor: pointer; font-family: inherit;
  color: #06201e !important; background: #4fd1c5 !important; border-color: #4fd1c5 !important;
}
.studio-top:hover { filter: brightness(1.08); }

/* The inline selects in the toolbars: these live outside .song-row, so they need the same
   treatment or they fall back to the browser's own and look like a different page. */
.starter select, .starter input[type="checkbox"] {
  font: 600 11px/1 ui-monospace, monospace; color: #cfe3f5;
  background: #0e131a; border: 1px solid #23303f; border-radius: 5px; padding: 6px 7px;
}
.starter input[type="checkbox"] { padding: 0; width: 15px; height: 15px; accent-color: #4fd1c5; }
.roll-bar .starter { white-space: nowrap; }

/* Undo and redo read as arrows at any size only if they are given room and a label. */
.icon-button { min-width: 40px; }
#undoBtn, #redoBtn { font-size: 15px; line-height: 1; padding: 8px 10px; }
.explain {
  border: 1px solid #23504e; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px;
  background: rgba(79,209,197,.05);
}
.explain p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: #cfe3f5; }
.explain p:last-child { margin-bottom: 0; }
.explain b { color: #4fd1c5; }
.estimate {
  display: block; margin: 10px 0 0; padding: 9px 11px; border-radius: 6px;
  background: #0e131a; border: 1px solid #23303f;
  font: 600 12px/1.5 ui-monospace, monospace; color: #a9bccd;
}
.estimate b { color: #cfe3f5; }
.estimate.heavy { border-color: #6b5a2a; color: #ffd166; }
.estimate.heavy b { color: #ffd166; }

/* --- the four steps, with where you are --- */
.steps-live {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
@media (max-width: 760px) { .steps-live { grid-template-columns: 1fr 1fr; } }
.steps-live li {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: start;
  border: 1px solid #1d2733; border-radius: 7px; padding: 9px 11px; background: #0e131a;
}
.steps-live .n {
  grid-row: span 2; align-self: center;
  width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  font: 700 11px/1 ui-monospace, monospace; color: #56697d;
  border: 1px solid #23303f;
}
.steps-live .what { font: 600 11px/1.35 ui-monospace, monospace; color: #7f93a8; }
.steps-live .state { font: 600 11px/1.35 ui-monospace, monospace; color: #56697d; font-style: normal; }
.steps-live .state:empty { display: none; }
.steps-live li.now { border-color: #4fd1c5; background: rgba(79,209,197,.07); }
.steps-live li.now .n { color: #06201e; background: #4fd1c5; border-color: #4fd1c5; }
.steps-live li.now .what { color: #cfe3f5; }
.steps-live li.now .state { color: #4fd1c5; }
.steps-live li.done .n { color: #4fd1c5; border-color: #23504e; }
.steps-live li.done .n::after { content: '✓'; }
.steps-live li.done .n { font-size: 0; }
.steps-live li.done .n::after { font-size: 12px; }
.steps-live li.done .state { color: #4fd1c5; }

/* --- the walkthrough --- */
.guide-ring {
  position: fixed; z-index: 70; pointer-events: none; border-radius: 8px;
  outline: 2px solid #4fd1c5; box-shadow: 0 0 0 9999px rgba(6,10,14,.62);
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
@media (prefers-reduced-motion: reduce) { .guide-ring { transition: none; } }
.guide-box {
  position: fixed; z-index: 71; width: min(330px, calc(100vw - 16px));
  background: #0e131a; border: 1px solid #4fd1c5; border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.guide-say { margin: 0 0 10px; font: 500 13px/1.55 ui-monospace, monospace; color: #cfe3f5; }
.guide-say b { color: #4fd1c5; }
.guide-row { display: flex; gap: 6px; align-items: center; }
.guide-count { margin-right: auto; font: 600 10px/1 ui-monospace, monospace; color: #56697d; letter-spacing: .1em; }
.guide-row .roll-btn, .guide-row .primary-button { padding: 7px 12px; font-size: 10.5px; }
.steps-live li { cursor: pointer; }
.steps-live li:hover { border-color: #4fd1c5; }
.steps-live li:focus-visible { outline: 2px solid #4fd1c5; outline-offset: 2px; }

/* --- the sample set --- */
.or { font: 600 11px/1 ui-monospace, monospace; color: #56697d; }
.sampleset {
  border: 1px solid #1d2733; border-radius: 8px; padding: 12px 14px; margin: 14px 0; background: #0e131a;
}
.sampleset h4 {
  margin: 0; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .16em; color: #4fd1c5;
}
.set-table-wrap { overflow-x: auto; margin: 10px 0; }
.set-table { border-collapse: collapse; width: 100%; min-width: 620px; }
.set-table th, .set-table td {
  border-bottom: 1px solid #1d2733; padding: 6px 8px; text-align: left;
  font: 500 11.5px/1.4 ui-monospace, monospace; color: #a9bccd; white-space: nowrap;
}
.set-table thead th {
  color: #56697d; font-weight: 700; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
}
.set-table td.name { color: #cfe3f5; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.set-table .how { display: block; font-size: 9.5px; color: #56697d; }
.set-table .how.guessed { color: #ffd166; }
.set-table select {
  font: 600 11px/1 ui-monospace, monospace; color: #cfe3f5; background: #0b0e13;
  border: 1px solid #23303f; border-radius: 4px; padding: 3px 5px;
}
.set-table .holds { color: #4fd1c5; }
.set-table .holds.no { color: #56697d; }
.set-table button {
  background: transparent; border: 0; color: #56697d; cursor: pointer; padding: 2px 5px; font-size: 13px;
}
.set-table button:hover { color: #4fd1c5; }
.set-table button.drop:hover { color: #ffb4a2; }

/* The top bar holds two kinds of link and they should not look alike: + DRUMS and GET THE APP
   leave for another site, THE SYNTHS is a room in this one. */
.rig-link.here {
  cursor: pointer; font-family: inherit;
  color: #4fd1c5 !important; background: rgba(79,209,197,.1) !important;
  border-color: #4fd1c5 !important;
}
.rig-link.here:hover { background: rgba(79,209,197,.22) !important; }
.sound-pick {
  display: inline-flex; gap: 6px; align-items: center;
  font: 700 9px/1 ui-monospace, monospace; letter-spacing: .14em; color: #7f93a8;
}
.sound-pick select {
  font: 600 12px/1 ui-monospace, monospace; color: #cfe3f5;
  background: #0e131a; border: 1px solid #23303f; border-radius: 5px; padding: 7px 8px;
  max-width: 190px;
}
