/* ==========================================================================
   STADIUM-1 — moulded plastic.

   A physical product, not a skin: one textured plastic body, recessed wells
   instead of borders, knurled knobs, rubbery keys, labels printed on the
   surface, and a single signal-orange accent. Two body finishes.
   ========================================================================== */

:root {
  /* stone (default) */
  --table: #8f8c85;
  --body: #d3d0c7;
  --body-hi: #dfdcd4;
  --body-lo: #c3bfb5;
  --well: #c4c0b6;
  --well-shadow: rgba(40, 36, 28, .22);
  --edge-light: rgba(255, 255, 255, .55);

  --ink: #1e1e1c;
  --print: #4a4843;
  --print-faint: rgba(30, 30, 28, .26);

  --accent: #ff5a1f;
  --accent-deep: #d8430f;
  --led-off: #9d988d;

  --key: #e6e3db;
  --key-lo: #d2cec5;
  --key-edge: #a9a499;
  --key-ink: #2a2927;

  --knob: #2b2b29;
  --knob-hi: #45443f;
  --knob-lo: #171716;
  --knob-mark: #f3f1ea;

  --screen: #b3b7a8;
  --screen-lo: #a2a697;
  --screen-ink: #1c2019;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Consolas', monospace;

  color-scheme: light;
}

[data-finish="charcoal"] {
  --table: #121211;
  --body: #2e2e2c;
  --body-hi: #383835;
  --body-lo: #252523;
  --well: #242422;
  --well-shadow: rgba(0, 0, 0, .55);
  --edge-light: rgba(255, 255, 255, .07);

  --ink: #ecebe5;
  --print: #b9b7af;
  --print-faint: rgba(236, 235, 229, .2);

  --led-off: #4b4a45;

  --key: #3d3d3a;
  --key-lo: #31312e;
  --key-edge: #151514;
  --key-ink: #e9e8e2;

  --knob: #161615;
  --knob-hi: #2d2d2a;
  --knob-lo: #0b0b0a;

  --screen: #7f8477;
  --screen-lo: #737869;
  --screen-ink: #12150f;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { background: var(--table); }

body {
  margin: 0;
  padding: 32px 20px 48px;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; }

/* ---------------------------------------------------------------- body --- */
.device {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 30px 22px;
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 20% 0%, var(--body-hi) 0%, var(--body) 45%, var(--body-lo) 100%);
  box-shadow:
    inset 0 1.5px 0 var(--edge-light),
    inset 0 -3px 6px rgba(0, 0, 0, .12),
    0 2px 0 rgba(0, 0, 0, .12),
    0 30px 60px -18px rgba(0, 0, 0, .45),
    0 10px 20px -10px rgba(0, 0, 0, .3);
  isolation: isolate;
}

/* the rough, bead-blasted plastic grain */
.device::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.48  0 0 0 0 0.45  0 0 0 0.42 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-finish="charcoal"] .device::before { mix-blend-mode: screen; opacity: .16; }

.print {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--print);
}
.print.strong {
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}

/* moulded recess used everywhere instead of borders */
.well,
.screen-well,
.wave-well,
.stand-well,
.keys-wrap,
.hood-body {
  background: var(--well);
  border-radius: 16px;
  box-shadow:
    inset 0 2px 5px var(--well-shadow),
    inset 0 -1px 0 var(--edge-light);
}

/* ---------------------------------------------------------------- top --- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.wordmark { display: flex; align-items: baseline; gap: 12px; }
.wordmark b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .06em;
}
.wordmark span {
  font-size: 13px;
  color: var(--print);
}

.finish { display: flex; align-items: center; gap: 8px; }
.finish-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 2px transparent;
}
.finish-dot.stone { background: #d3d0c7; }
.finish-dot.charcoal { background: #2e2e2c; }
.finish-dot[aria-checked="true"] { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 2px var(--accent); }
.finish-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --------------------------------------------------------------- deck --- */
.deck {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 22px;
  margin-bottom: 26px;
}
.deck-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.deck-right { min-width: 0; display: flex; }

/* screen: a small reflective LCD set into the body */
.screen-well { padding: 9px; }
.screen {
  border-radius: 9px;
  padding: 12px 14px 10px;
  background: linear-gradient(175deg, var(--screen) 0%, var(--screen-lo) 100%);
  color: var(--screen-ink);
  font-family: var(--mono);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(0, 0, 0, .12);
  position: relative;
  overflow: hidden;
}
.screen::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
}
.screen-top { display: flex; align-items: center; gap: 10px; }
.screen-name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.screen-tags { margin-left: auto; display: flex; gap: 5px; }
.screen-tags i {
  font-style: normal;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  opacity: .28;
  border: 1px solid currentColor;
}
.screen-tags i.on { opacity: 1; background: var(--screen-ink); color: var(--screen); border-color: var(--screen-ink); }
.screen-sum { font-size: 13px; margin-top: 6px; opacity: .85; }
.screen-help {
  font-size: 12px;
  margin-top: 8px;
  min-height: 32px;
  line-height: 1.35;
  opacity: .72;
}
.screen-meter { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.meter {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .12);
  overflow: hidden;
}
.meter i { display: block; height: 100%; width: 0; background: var(--screen-ink); opacity: .75; transition: width .06s linear; }
.peak { width: 7px; height: 7px; border-radius: 50%; background: rgba(0, 0, 0, .18); }
.peak.hot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* source */
.source { display: flex; flex-direction: column; gap: 10px; }
.key-row { display: flex; flex-wrap: wrap; gap: 8px; }

.wave-well { position: relative; height: 92px; padding: 8px 10px; }
.wave-well canvas { display: block; width: 100%; height: 100%; cursor: ew-resize; touch-action: none; }
.wave-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px;
  color: var(--print);
  pointer-events: none;
  letter-spacing: .03em;
}

.source-info { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.source-info #srcName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; flex-shrink: 0; }
.chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 0;
  cursor: pointer;
  color: var(--key-ink);
  background: var(--key);
  box-shadow: 0 1px 0 var(--key-edge), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.chip:active { transform: translateY(1px); box-shadow: 0 0 0 var(--key-edge); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.unsure { box-shadow: 0 1px 0 var(--key-edge), inset 0 0 0 1.5px var(--accent); }

/* stand */
.stand-well {
  flex: 1;
  position: relative;
  padding: 12px 12px 30px;
  min-height: 300px;
}
.stand-well canvas { display: block; width: 100%; height: 100%; cursor: ns-resize; touch-action: none; }
.stand-legend {
  position: absolute;
  left: 16px; right: 16px; bottom: 9px;
  display: flex; gap: 14px; align-items: center;
}
.stand-legend .stand-hint { margin-left: auto; opacity: .75; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot.men { background: var(--ink); }
.dot.women { background: var(--accent); }

/* ------------------------------------------------------------- knobs --- */
.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 6px 4px 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--print-faint);
}

.knob-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.knob-well {
  position: relative;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
}
.knob-unit.big .knob-well { width: 112px; height: 112px; }

/* printed scale around the knob — 270° of ticks */
.knob-ticks {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 225deg, var(--print) 0deg 1.4deg, transparent 1.4deg 27deg);
  /* closest-side: 100% is the edge of the box, so the ring sits just
     outside the knob instead of hidden under it */
  -webkit-mask:
    radial-gradient(circle closest-side, transparent 0 calc(100% - 9px), #000 calc(100% - 8.5px) calc(100% - 1px), transparent 100%),
    conic-gradient(from 225deg, #000 0 271deg, transparent 271deg);
  -webkit-mask-composite: source-in;
          mask:
    radial-gradient(circle closest-side, transparent 0 calc(100% - 9px), #000 calc(100% - 8.5px) calc(100% - 1px), transparent 100%),
    conic-gradient(from 225deg, #000 0 271deg, transparent 271deg);
          mask-composite: intersect;
  opacity: .6;
}
.knob-unit:not(.big) .knob-ticks { display: none; }

.knob {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  /* knurled grip */
  background:
    repeating-conic-gradient(var(--knob-lo) 0deg 5deg, var(--knob-hi) 5deg 10deg);
  box-shadow:
    0 3px 0 var(--knob-lo),
    0 6px 10px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(0, 0, 0, .35);
  display: grid;
  place-items: center;
}
.knob-unit.big .knob { width: 80px; height: 80px; }
.knob-unit.is-active .knob { cursor: grabbing; }
.knob:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.knob-cap {
  width: 80%; height: 80%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, var(--knob-hi) 0%, var(--knob) 55%, var(--knob-lo) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .12), inset 0 -2px 3px rgba(0, 0, 0, .4);
  position: relative;
  display: grid;
  place-items: start center;
}
.knob-ind {
  display: block;
  width: 3px; height: 30%;
  margin-top: 8%;
  border-radius: 2px;
  background: var(--knob-mark);
}
.knob-unit.big .knob-ind { width: 4px; background: var(--accent); }

.knob-ends {
  display: flex;
  justify-content: space-between;
  width: 128px;
  max-width: 100%;
  margin-top: -4px;
  font-size: 10.5px;
  color: var(--print);
}
.knob-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}
.knob-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--print);
  min-height: 14px;
}

/* ------------------------------------------------------------- fader --- */
.fader-unit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0 10px 6px;
  min-width: 0;
  align-self: center;
}
.fader-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--print);
}
.fader {
  position: relative;
  height: 48px;
  cursor: ew-resize;
  touch-action: none;
}
.fader:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.fader-slot {
  position: absolute;
  left: 12px; right: 12px; top: 20px;
  height: 8px;
  border-radius: 4px;
  background: var(--knob-lo);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6), 0 1px 0 var(--edge-light);
  overflow: hidden;
}
.fader-fill { display: block; height: 100%; width: 0; background: var(--accent); opacity: .85; }
.fader-scale {
  position: absolute;
  left: 18px; right: 18px; top: 36px;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--print) 0 1px, transparent 1px 10%);
  opacity: .45;
}
.fader-cap {
  position: absolute;
  top: 6px;
  width: 36px; height: 36px;
  margin-left: -18px;
  border-radius: 9px;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(0, 0, 0, .28) 5px 6px) center / 60% 55% no-repeat,
    linear-gradient(180deg, var(--knob-hi), var(--knob) 60%, var(--knob-lo));
  box-shadow: 0 3px 0 var(--knob-lo), 0 6px 10px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.fader-unit .knob-label { margin-top: -2px; }

/* -------------------------------------------------------------- keys --- */
.key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--key-ink);
  background: linear-gradient(180deg, var(--key) 0%, var(--key-lo) 100%);
  box-shadow:
    0 3px 0 var(--key-edge),
    0 5px 8px rgba(0, 0, 0, .16),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .05s ease;
  user-select: none;
}
.key:hover { filter: brightness(1.03); }
.key:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--key-edge), 0 1px 2px rgba(0, 0, 0, .2), inset 0 1px 2px rgba(0, 0, 0, .08);
}
.key:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.key[disabled] { opacity: .5; cursor: progress; }
.key.small { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.key.big { padding: 15px 22px; font-size: 15px; border-radius: 14px; }

.led {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--led-off);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .35);
  flex-shrink: 0;
}
.key.is-on .led { background: var(--accent); box-shadow: 0 0 8px var(--accent), inset 0 -1px 1px rgba(0, 0, 0, .2); }
.key.rec.is-on .led { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.glyph { font-size: 12px; opacity: .8; }
.key.play .glyph { color: var(--accent); opacity: 1; }

/* ------------------------------------------------------------ perform --- */
.perform {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}
.transport { display: flex; align-items: center; gap: 12px; }

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  cursor: pointer;
  user-select: none;
}
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.sw-label { font-size: 12px; font-weight: 600; color: var(--print); }
.switch:not(.is-once) .sw-label:first-child,
.switch.is-once .sw-label:last-child { color: var(--ink); }
.sw-track {
  position: relative;
  width: 50px; height: 24px;
  border-radius: 12px;
  background: var(--knob-lo);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6), 0 1px 0 var(--edge-light);
}
.sw-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 26px; height: 20px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(0, 0, 0, .18) 4px 5px) center / 50% 50% no-repeat,
    linear-gradient(180deg, var(--key), var(--key-lo));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  transition: left .12s ease;
}
.switch.is-once .sw-knob { left: 22px; }

.keys-wrap { padding: 8px; min-width: 0; }
.keys {
  position: relative;
  display: flex;
  height: 92px;
  gap: 4px;
  touch-action: none;
}
.pkey {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--print);
  padding-bottom: 6px;
}
.pkey.white {
  flex: 1;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--key) 0%, var(--key-lo) 100%);
  box-shadow: 0 3px 0 var(--key-edge), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.pkey.black {
  position: absolute;
  top: 0;
  height: 56%;
  border-radius: 0 0 5px 5px;
  z-index: 2;
  background: linear-gradient(180deg, var(--knob-hi), var(--knob));
  box-shadow: 0 3px 0 var(--knob-lo), 0 4px 6px rgba(0, 0, 0, .3);
}
.pkey.is-down { transform: translateY(3px); box-shadow: 0 0 0 var(--key-edge); }
.pkey.white.is-down { background: linear-gradient(180deg, #ffb08e, var(--accent)); color: #3a1406; }
.pkey.black.is-down { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); }

.out { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.out .knob-unit.big .knob-well { width: 96px; height: 96px; }
.out .knob-unit.big .knob { width: 68px; height: 68px; }

/* ------------------------------------------------------------- sounds --- */
.sounds { margin-bottom: 16px; }
.sounds-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.save-row { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.divider { width: 1px; height: 22px; background: var(--print-faint); margin: 0 6px; }

.save-row input,
.save-row select,
.hood-selects select {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--well);
  border: 0;
  border-radius: 9px;
  padding: 8px 11px;
  box-shadow: inset 0 2px 3px var(--well-shadow), inset 0 -1px 0 var(--edge-light);
}
.save-row input { width: 160px; }
.save-row input::placeholder { color: var(--print); opacity: .8; }
.save-row input:focus-visible,
.save-row select:focus-visible,
.hood-selects select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.preset-keys { display: flex; flex-wrap: wrap; gap: 9px; }
.key.preset { padding: 8px 13px; font-size: 12px; }
.key.preset.user { font-style: italic; }

/* -------------------------------------------------------------- hood --- */
.hood { margin: 6px 0 12px; }
.hood summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  border-top: 1px solid var(--print-faint);
}
.hood summary::-webkit-details-marker { display: none; }
.hood summary::before {
  content: '';
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
  transition: transform .15s ease;
  align-self: center;
  margin-right: 2px;
}
.hood[open] summary::before { transform: rotate(45deg); }
.hood summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.hood-body {
  padding: 18px 20px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px 28px;
}
.hood-group h3 { margin: 0 0 12px; font-size: 11px; }
.knob-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 14px 6px;
}
.hood-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 14px;
}
.hood-selects label { display: flex; flex-direction: column; gap: 4px; }
.hood-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------- foot --- */
.foot {
  display: flex;
  gap: 18px;
  padding-top: 10px;
  opacity: .8;
}
.foot #footStatus { margin-left: auto; }
.foot a { color: inherit; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1020px) {
  .deck { grid-template-columns: 1fr; }
  .stand-well { min-height: 260px; }
  .controls { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .controls .fader-unit { grid-column: 1 / -1; order: 10; }
  .perform { grid-template-columns: 1fr; justify-items: center; }
  .out { flex-direction: row; justify-content: center; }
}
@media (max-width: 560px) {
  body { padding: 12px 8px; }
  .device { padding: 18px 14px; border-radius: 20px; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knob-unit.big .knob-well { width: 96px; height: 96px; }
  .knob-unit.big .knob { width: 68px; height: 68px; }
  .transport { flex-wrap: wrap; }
}

/* ============================================================ product === */
.wordmark { color: inherit; text-decoration: none; }
.top { gap: 16px; flex-wrap: wrap; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tier {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--print); background: var(--well); border: 0; border-radius: 99px;
  padding: 7px 12px; cursor: pointer;
  box-shadow: inset 0 2px 3px var(--well-shadow), inset 0 -1px 0 var(--edge-light);
}
.tier:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tier.is-pro { color: var(--ink); }
.tier.is-pro .led { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.key.icon { min-width: 32px; justify-content: center; padding-left: 0; padding-right: 0; font-weight: 700; }
.key.accent { background: linear-gradient(180deg, #ff7a45 0%, var(--accent) 100%); color: #2a0e03; box-shadow: 0 3px 0 var(--accent-deep), 0 5px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.35); }
.key.accent:active { box-shadow: 0 0 0 var(--accent-deep), 0 1px 2px rgba(0,0,0,.2); }

/* locked presets */
.key.preset.locked { color: var(--print); }
.key.preset.locked .lock { width: 9px; height: 9px; flex-shrink: 0; opacity: .7; }

/* key selector (replaces the piano keyboard) */
.keysel { display: flex; align-items: center; gap: 10px; justify-self: center; flex-wrap: wrap; }
.keysel-well {
  min-width: 130px; padding: 8px 14px; border-radius: 10px;
  background: var(--screen); color: var(--screen-ink); text-align: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 2px;
}
.keysel-well #keyName { font: 600 20px/1.1 var(--mono); }
.keysel-well .print { color: var(--screen-ink); opacity: .7; }

/* dialogs */
dialog.panel {
  border: 0; padding: 0; border-radius: 18px; max-width: min(520px, calc(100vw - 32px)); width: 100%;
  color: var(--ink); background: var(--body);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 var(--edge-light);
}
dialog.panel::backdrop { background: rgba(20, 18, 14, .55); backdrop-filter: blur(2px); }
.panel-body { padding: 24px 26px 22px; display: flex; flex-direction: column; gap: 14px; font-family: var(--font); }
.panel-body h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .03em; }
.panel-body p { margin: 0; line-height: 1.5; font-size: 14px; }
.panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: 500 12px/1 var(--mono); padding: 8px 10px; border-radius: 8px; border: 0; cursor: pointer;
  color: var(--ink); background: var(--well);
  box-shadow: inset 0 2px 3px var(--well-shadow), inset 0 -1px 0 var(--edge-light);
}
.seg button.is-on { background: var(--ink); color: var(--body); box-shadow: none; }
.seg button.locked { color: var(--print); opacity: .65; }
.seg button.locked::after { content: ' · pro'; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check em { font-style: normal; }
.check.locked { opacity: .6; }
.pro-note { font-size: 13px !important; color: var(--print); }
.pro-note a, .pro-why a { color: var(--accent-deep); font-weight: 600; cursor: pointer; }
.pro-why { color: var(--print); }
.pro-why:empty, .pro-msg:empty, .pro-note:empty { display: none; }
.pro-list { margin: 0; padding-left: 18px; columns: 2; column-gap: 20px; font-size: 14px; line-height: 1.7; }
.pro-price { display: flex; align-items: baseline; gap: 10px; }
.pro-price b { font-size: 28px; font-weight: 800; }
.big-cta { justify-content: center; text-decoration: none; padding: 13px 18px; font-size: 15px; }
.big-cta.is-disabled { pointer-events: none; opacity: .55; }
.pro-key { display: flex; flex-direction: column; gap: 7px; padding-top: 6px; border-top: 1px solid var(--print-faint); }
.pro-key-row { display: flex; gap: 8px; }
.pro-key input {
  flex: 1; min-width: 0; font: 500 12px/1 var(--mono); color: var(--ink); background: var(--well);
  border: 0; border-radius: 9px; padding: 10px 11px;
  box-shadow: inset 0 2px 3px var(--well-shadow), inset 0 -1px 0 var(--edge-light);
}
.pro-key input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pro-msg { font-size: 13px !important; font-weight: 600; }
.pro-msg.bad { color: var(--accent-deep); }
.guide-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.guide-steps em { font-style: normal; font-weight: 700; }
@media (max-width: 560px) {
  .pro-list { columns: 1; }
  .top-right { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
