/* =========================================================================
   FT-Loop — visual system
   Dark machined hardware, amber LCD, one accent: Flytech orange.
   ========================================================================= */

:root {
  --orange: #ff6b1a;
  --orange-hot: #ff8a3d;
  --orange-soft: #ffb27a;
  --orange-deep: #d94206;

  --bg: #070708;
  --panel: #101116;
  --panel-hi: #191a20;
  --text: #eef0f3;
  --text-soft: #c7cad1;
  --muted: #9ea3ae;
  --dim: #747984;

  --line: rgba(255, 255, 255, 0.075);
  --line-soft: rgba(255, 255, 255, 0.045);
  --line-strong: rgba(255, 255, 255, 0.13);

  --lcd-bg: #080605;
  --lcd-ink: #ff7a1e;
  --lcd-ink-soft: rgba(255, 132, 54, 0.78);
  --lcd-ink-dim: rgba(255, 122, 30, 0.14);

  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --knob: clamp(80px, 10.6vh, 104px);
  --foot: clamp(84px, 12vh, 112px);
  --radius: clamp(20px, 2.6vw, 28px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

svg {
  display: block;
}

::selection {
  background: rgba(255, 107, 26, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ------------------------------------------------------------------ ambient */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}

.ambient-blob.b1 {
  width: 46vmax;
  height: 46vmax;
  left: -12vmax;
  top: -18vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255, 107, 26, 0.34), rgba(255, 107, 26, 0) 68%);
  animation: drift-a 26s var(--ease) infinite alternate;
}

.ambient-blob.b2 {
  width: 40vmax;
  height: 40vmax;
  right: -16vmax;
  bottom: -20vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255, 71, 10, 0.18), rgba(255, 71, 10, 0) 70%);
  animation: drift-b 34s var(--ease) infinite alternate;
}

.ambient-grid {
  position: absolute;
  inset: -1px;
  background-image: linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  opacity: 0.55;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift-a {
  to {
    transform: translate3d(6vmax, 4vmax, 0) scale(1.08);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-5vmax, -3vmax, 0) scale(1.12);
  }
}

/* -------------------------------------------------------------------- stage */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vh, 18px);
  padding: calc(clamp(14px, 4vw, 44px) + env(safe-area-inset-top)) clamp(12px, 4vw, 44px)
    calc(clamp(12px, 3vw, 30px) + env(safe-area-inset-bottom));
}

/* -------------------------------------------------------------------- pedal */
.pedal {
  position: relative;
  width: min(524px, 100%);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.1vh, 20px);
  padding: clamp(16px, 3.2vw, 28px);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 80% at 50% -12%, rgba(255, 107, 26, 0.13), transparent 58%),
    linear-gradient(168deg, #1a1b21 0%, #131419 34%, #0c0d11 78%, #101116 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 40px 90px -30px rgba(0, 0, 0, 0.95),
    0 18px 40px -24px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.055);
  isolation: isolate;
  transition: box-shadow 0.5s var(--ease);
}

.pedal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, transparent 4%, rgba(255, 107, 26, 0.7) 26%, rgba(255, 170, 110, 0.95) 50%, rgba(255, 107, 26, 0.7) 74%, transparent 96%);
  opacity: 0.85;
}

.pedal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.017) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
  opacity: 0.75;
  z-index: 0;
}

.pedal > * {
  position: relative;
  z-index: 1;
}

.pedal[data-transport="recording"] {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 40px 90px -30px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 107, 26, 0.22),
    0 0 70px -14px rgba(255, 70, 20, 0.5);
}

/* screws */
.screw {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a4d56, #23252b 55%, #0b0c0f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.screw::after {
  content: "";
  position: absolute;
  inset: 42% 18%;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.55);
  transform: rotate(-32deg);
}

.s-tl { top: 11px; left: 11px; }
.s-tr { top: 11px; right: 11px; }
.s-bl { bottom: 11px; left: 11px; }
.s-br { bottom: 11px; right: 11px; }

/* -------------------------------------------------------------------- brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
}

.brand-mark {
  width: clamp(34px, 4.6vh, 42px);
  aspect-ratio: 1;
  flex: none;
  filter: drop-shadow(0 6px 14px rgba(255, 90, 20, 0.28));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-text .brand-name {
  margin: 0;
  font-size: clamp(17px, 2.5vh, 21px);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  color: #f7f7f9;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.brand-text .brand-name .dot {
  color: var(--orange);
  text-shadow: 0 0 14px rgba(255, 107, 26, 0.55);
}

.brand-text p:not(.brand-name) {
  margin: 5px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: var(--dim);
  white-space: nowrap;
}

.brand-text p:not(.brand-name) span {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.24em;
}

.brand-text p:not(.brand-name) span::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-left: 7px;
  vertical-align: middle;
  background: linear-gradient(90deg, rgba(255, 107, 26, 0.7), transparent);
}

.brand-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mic-led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--dim);
  transition: color 0.3s, border-color 0.3s;
}

.mic-led i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3a3d44;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: background 0.3s, box-shadow 0.3s;
}

.mic-led[data-on="true"] {
  color: var(--orange-soft);
  border-color: rgba(255, 107, 26, 0.28);
}

.mic-led[data-on="true"] i {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 107, 26, 0.85);
}

.mic-led b {
  font-weight: 600;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ---------------------------------------------------------------------- LCD */
.lcd-shell {
  padding: 5px;
  border-radius: 17px;
  background: linear-gradient(180deg, #060608, #0b0b0e 60%, #08080a);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 1px 3px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.lcd {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  padding: clamp(10px, 1.8vh, 14px) clamp(12px, 2.4vw, 18px) clamp(8px, 1.4vh, 12px);
  border-radius: 12px;
  background:
    radial-gradient(120% 160% at 12% 0%, rgba(255, 107, 26, 0.1), transparent 58%),
    radial-gradient(90% 120% at 100% 100%, rgba(255, 107, 26, 0.05), transparent 60%),
    linear-gradient(180deg, #0a0705, #070504 70%, #060403);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    inset 0 3px 18px rgba(0, 0, 0, 0.95),
    inset 0 0 70px rgba(255, 107, 26, 0.055),
    0 12px 26px -12px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.lcd::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.lcd::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.012) 26%, transparent 42%);
}

.lcd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--lcd-ink-soft);
  text-shadow: 0 0 12px rgba(255, 107, 26, 0.35);
}

.lcd-brand i {
  font-style: normal;
  color: rgba(255, 132, 54, 0.55);
}

.lcd-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lcd-ink);
  font-weight: 700;
  letter-spacing: 0.18em;
}

.lcd-state .lamp {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  opacity: 0.9;
}

.lcd[data-state="countin"] .lamp,
.lcd[data-state="recording"] .lamp,
.lcd[data-state="dubbing"] .lamp {
  animation: lamp-blink 0.5s steps(2, jump-none) infinite;
}

.lcd[data-state="recording"] .lcd-state,
.lcd[data-state="dubbing"] .lcd-state {
  color: #ff5a2a;
}

@keyframes lamp-blink {
  50% {
    opacity: 0.15;
  }
}

.lcd-body {
  display: flex;
  align-items: stretch;
  gap: clamp(10px, 2.4vw, 22px);
}

.lcd-readout {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.seg {
  width: 100%;
  height: clamp(60px, 10.5vh, 96px);
  transform: skewX(-4deg);
  transform-origin: left center;
  overflow: visible;
}

/* Liquid-crystal look: unlit segments stay a barely-there ghost, lit segments
   carry the ink colour plus a tight phosphor bloom. */
.seg rect,
.seg path {
  fill: rgba(255, 122, 30, 0.055);
  transition:
    fill 0.08s linear,
    filter 0.12s linear;
}

.seg rect.on,
.seg path.on {
  fill: var(--lcd-ink);
  filter: drop-shadow(0 0 5px rgba(255, 107, 26, 0.5)) drop-shadow(0 0 15px rgba(255, 107, 26, 0.2));
}

.seg rect.ghost,
.seg path.ghost {
  fill: rgba(255, 122, 30, 0.04);
}

.seg.is-blank rect:not(.on) {
  fill: rgba(255, 122, 30, 0.028);
}

.lcd-caption {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(255, 138, 61, 0.68);
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding-left: 2px;
}

.lcd-caption b {
  font-size: 8px;
  color: rgba(255, 150, 82, 0.96);
}

.lcd-caption [data-cap="value"] {
  min-width: 2.4ch;
  text-align: center;
  letter-spacing: 0.1em;
}

.lcd-caption [data-cap="total"] {
  color: rgba(255, 132, 54, 0.52);
  letter-spacing: 0.2em;
}

.lcd-caption span {
  color: rgba(255, 132, 54, 0.52);
}

.lcd-data {
  flex: 0 0 auto;
  width: clamp(112px, 15vw, 142px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-family: var(--mono);
  padding-right: 2px;
}

.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 122, 30, 0.11);
}

.data-row:last-of-type {
  border-bottom: 0;
}

.data-row span {
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: rgba(255, 138, 61, 0.66);
}

.data-row b {
  font-size: clamp(11px, 1.55vh, 13px);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--lcd-ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 107, 26, 0.3);
}

.beats {
  display: flex;
  gap: 7px;
  margin-top: 5px;
  padding-left: 1px;
}

.beats i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 132, 54, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 132, 54, 0.22);
  transition: background 0.06s linear, box-shadow 0.1s linear, transform 0.1s var(--ease);
}

.beats i.on {
  background: var(--lcd-ink);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.85);
}

.beats i.on.accent {
  background: #ffb27a;
  box-shadow: 0 0 12px rgba(255, 170, 110, 0.95);
  transform: scale(1.18);
}

.lcd-progress {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 122, 30, 0.1);
  overflow: hidden;
}

.lcd-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 107, 26, 0.55), var(--orange-hot) 70%, #ffc79a);
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.75);
  transition: width 0.05s linear;
}

.lcd-progress i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd2ab;
  transform: translate(50%, -50%);
  box-shadow: 0 0 10px 2px rgba(255, 138, 61, 0.85);
}

.lcd-progress i[data-on="false"] {
  box-shadow: none;
}

.lcd-progress i[data-on="false"]::after {
  display: none;
}

.lcd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
}

.lcd-msg {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: rgba(255, 138, 61, 0.66);
  text-shadow: 0 0 10px rgba(255, 107, 26, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
}

.lcd-msg.is-flash {
  color: #ffd3ad;
}

.lcd-meter {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.lcd-meter i {
  width: 3px;
  height: 60%;
  border-radius: 1px;
  background: rgba(255, 122, 30, 0.13);
  transition: background 0.08s linear, box-shadow 0.08s linear;
}

.lcd-meter i:nth-child(4n + 2),
.lcd-meter i:nth-child(4n + 3) {
  height: 80%;
}

.lcd-meter i:nth-child(4n + 4) {
  height: 100%;
}

.lcd-meter i.on {
  background: var(--orange-hot);
  box-shadow: 0 0 6px rgba(255, 107, 26, 0.6);
}

.lcd-meter i.hot {
  background: #ff3d20;
  box-shadow: 0 0 7px rgba(255, 61, 32, 0.8);
}

/* Beat pulse on the whole LCD */
.lcd.is-beat {
  animation: lcd-beat 0.18s var(--ease);
}

@keyframes lcd-beat {
  0% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 122, 30, 0.28),
      inset 0 3px 18px rgba(0, 0, 0, 0.95),
      inset 0 0 90px rgba(255, 107, 26, 0.16);
  }
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.055),
      inset 0 3px 18px rgba(0, 0, 0, 0.95),
      inset 0 0 70px rgba(255, 107, 26, 0.055);
  }
}

/* -------------------------------------------------------------------- knobs */
.knobs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(4px, 1.4vw, 18px);
  padding: clamp(2px, 1vh, 8px) 0;
}

.knob {
  --angle: 0deg;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  padding: 2px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: ns-resize;
  transition: opacity 0.3s;
}

.knob-name {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--muted);
  transition: color 0.25s;
}

.knob-dial {
  position: relative;
  width: var(--knob);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.knob-dial::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.55), transparent 70%);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
}

.knob-ticks,
.knob-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.knob-ticks line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1.1;
  stroke-linecap: round;
}

.knob-ticks line.major {
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 1.5;
}

.arc-track,
.arc-value {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  transform: rotate(135deg);
  transform-origin: 64px 64px;
}

.arc-track {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-dasharray: 245 327;
}

.arc-value {
  stroke: var(--orange);
  stroke-dasharray: 0 327;
  filter: drop-shadow(0 0 5px rgba(255, 107, 26, 0.55));
  transition: stroke-dasharray 0.06s linear;
}

.knob-cap {
  position: relative;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.032) 0deg 3deg, rgba(255, 255, 255, 0) 3deg 6deg),
    radial-gradient(120% 120% at 32% 22%, #3a3c45 0%, #24262d 38%, #14151a 72%, #0d0e12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -3px 8px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 8px 18px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transform: rotate(var(--angle));
  transition: transform 0.12s var(--ease);
  will-change: transform;
}

.knob.is-dragging .knob-cap {
  transition: none;
}

.knob-cap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.knob-pointer {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 2.5px;
  height: 22%;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, #ffc79a, var(--orange) 60%, #d94206);
  box-shadow: 0 0 9px rgba(255, 107, 26, 0.85);
}

.knob-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--mono);
  line-height: 1;
}

.knob-value b {
  font-size: clamp(12px, 1.7vh, 14px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.knob-value i {
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.knob:hover .knob-name,
.knob:focus-visible .knob-name {
  color: var(--text-soft);
}

.knob.is-dragging .knob-value b,
.knob.is-dragging .knob-name {
  color: var(--orange-soft);
}

.knob.is-dragging .knob-cap {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -3px 8px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(255, 107, 26, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.6);
}

.knob-lock {
  display: none;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 107, 26, 0.14);
  border: 1px solid rgba(255, 107, 26, 0.32);
  color: var(--orange-soft);
  align-self: center;
  margin-left: 2px;
  flex: none;
}

.knob-lock svg {
  width: 7px;
  height: 7px;
  fill: currentColor;
}

.knob {
  position: relative;
}

.knob.is-locked {
  cursor: not-allowed;
}

.knob.is-locked .knob-cap {
  opacity: 0.82;
}

.knob.is-locked .knob-name,
.knob.is-locked .knob-value b {
  color: var(--dim);
}

.knob.is-locked .arc-value {
  stroke: rgba(255, 107, 26, 0.4);
  filter: none;
}

.knob.is-locked .knob-lock {
  display: inline-flex;
}

/* ------------------------------------------------------------------- feet */
.feet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  align-items: start;
  gap: clamp(8px, 2.2vw, 22px);
  padding: clamp(2px, 1.4vh, 10px) 0 0;
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: calc(var(--foot) + 6px);
  padding: 0;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s var(--ease), opacity 0.3s;
}

.foot:disabled {
  cursor: default;
  opacity: 0.42;
}

.foot-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #34373e;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, box-shadow 0.25s;
}

.foot-body {
  width: min(100%, var(--foot));
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  padding: 6px;
  display: grid;
  place-items: center;
  background:
    conic-gradient(from 210deg, #2b2d34, #565a64 12%, #22242a 30%, #4b4f58 48%, #1d1f24 66%, #565a64 84%, #2b2d34);
  box-shadow:
    0 14px 26px -8px rgba(0, 0, 0, 0.85),
    0 2px 0 rgba(255, 255, 255, 0.07),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  transition: box-shadow 0.3s, transform 0.1s var(--ease);
}

.foot-cap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.026) 0deg 4deg, rgba(0, 0, 0, 0) 4deg 9deg),
    radial-gradient(120% 120% at 34% 22%, #2f3138 0%, #1b1d22 42%, #101115 78%, #0b0c0f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -4px 10px rgba(0, 0, 0, 0.75),
    0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.foot-icon {
  width: 40%;
  height: 40%;
  fill: currentColor;
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  transition: color 0.25s, opacity 0.25s;
}

.ico-rec,
.ico-dub {
  display: none;
}

.foot[data-foot="stop"] .foot-icon {
  width: 34%;
  height: 34%;
}

.foot[data-foot="tap"] .ico-tap {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.foot[data-foot="tap"] .ico-tap-fill {
  fill: currentColor;
  stroke: none;
}

.foot[data-foot="tap"] .foot-icon {
  width: 38%;
  height: 38%;
}

.foot[data-foot="clear"] .ico-trash {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot[data-foot="clear"] .foot-icon {
  width: 33%;
  height: 33%;
}

/* Second tap of APAGAR: the whole button turns into the warning. */
.foot[data-foot="clear"].is-confirm .foot-cap {
  color: #ff6a4a;
}

.foot[data-foot="clear"].is-confirm .foot-body {
  box-shadow:
    0 14px 26px -8px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 74, 42, 0.5),
    0 0 26px -2px rgba(255, 74, 42, 0.4);
}

.foot[data-foot="clear"].is-confirm .foot-led {
  background: #ff4a2a;
  box-shadow: 0 0 10px 2px rgba(255, 74, 42, 0.55);
}

.foot[data-foot="clear"].is-confirm .foot-title {
  color: #ff8f6d;
}

.foot[data-foot="clear"].is-confirm .foot-key {
  color: #ff8f6d;
  opacity: 0.9;
}

.foot-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-soft);
  white-space: nowrap;
}

.foot-title em {
  font-style: normal;
  color: var(--orange);
  padding: 0 1px;
}

.foot-key {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.foot:hover .foot-body {
  box-shadow:
    0 16px 30px -8px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 107, 26, 0.18),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.foot:active:not(:disabled) .foot-body,
.foot.is-pressed .foot-body {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    0 6px 12px -4px rgba(0, 0, 0, 0.9),
    inset 0 -1px 3px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

/* play button: idle accent */
.foot[data-foot="play"] .foot-body {
  background:
    conic-gradient(
      from 210deg,
      #2a1c14,
      #7c5334 12%,
      #241a13 30%,
      #6a462c 48%,
      #1e1511 66%,
      #7c5334 84%,
      #2a1c14
    );
}

.foot[data-foot="play"] .foot-cap {
  color: #ffcfae;
}

.foot[data-foot="play"] .foot-icon {
  filter: drop-shadow(0 0 10px rgba(255, 107, 26, 0.4));
}

/* lights */
.foot.is-playing .foot-led,
.foot.is-armed .foot-led {
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.9);
}

.foot.is-recording .foot-led {
  background: #ff3d20;
  box-shadow: 0 0 12px rgba(255, 61, 32, 0.95);
  animation: lamp-blink 0.6s steps(2, jump-none) infinite;
}

.foot.is-recording .foot-body {
  box-shadow:
    0 14px 26px -8px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 61, 32, 0.5),
    0 0 34px rgba(255, 61, 32, 0.35),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.foot.is-recording .foot-cap {
  color: #ff6a4a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -4px 10px rgba(0, 0, 0, 0.75),
    inset 0 0 28px rgba(255, 61, 32, 0.22);
}

.foot.is-playing .foot-cap {
  color: #ffc7a3;
}

.foot[data-foot="play"] .ico-play {
  display: block;
}

.foot[data-foot="play"].is-recording .ico-play,
.foot[data-foot="play"].is-dubbing .ico-play {
  display: none;
}

.foot[data-foot="play"].is-recording .ico-rec,
.foot[data-foot="play"].is-dubbing .ico-rec {
  display: block;
  fill: #ff5a3a;
}

.foot.is-armed .foot-cap {
  color: var(--orange-soft);
}

.foot[data-foot="auto"].is-listening .foot-led {
  background: var(--orange-hot);
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.95);
  animation: lamp-blink 0.45s steps(2, jump-none) infinite;
}

/* A tap flashes the pad and pulses the LED, like a real footswitch. */
.foot[data-foot="tap"].is-tap .foot-cap {
  color: var(--orange-hot);
}

.foot[data-foot="tap"].is-tap .ico-tap {
  animation: tap-ripple 0.42s var(--ease) 1;
}

.foot[data-foot="tap"].is-tap .foot-led {
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255, 107, 26, 0.95);
}

@keyframes tap-ripple {
  0% {
    opacity: 0.35;
    transform: scale(0.86);
    transform-origin: 9.5px 14.3px;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    transform-origin: 9.5px 14.3px;
  }
}

/* ------------------------------------------------------------------ footer */
.pedal-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 12px;
  /* Os parafusos ficam nos cantos: o conteúdo do rodapé começa depois deles. */
  padding: clamp(2px, 0.6vh, 6px) 24px 0;
  border-top: 1px solid var(--line-soft);
}

.pedal-foot .chips:not(.chips-pro) {
  grid-column: 1;
  grid-row: 1;
}

.pedal-foot .hints {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

/* Recursos do Pro: linha própria, separada do que é do pedal. */
.chips-pro {
  grid-column: 1 / -1;
  grid-row: 2;
  padding-top: 1px;
}

.chips-pro .chip {
  font-size: 7.5px;
  letter-spacing: 0.14em;
  padding: 0 9px;
  border-color: rgba(255, 107, 26, 0.16);
  color: var(--orange-soft);
  background: rgba(255, 107, 26, 0.045);
}

.chips-pro .chip i {
  background: rgba(255, 107, 26, 0.5);
}

.chips-pro .chip:hover {
  color: var(--orange-hot);
  border-color: rgba(255, 107, 26, 0.32);
}

.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  color: var(--dim);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3d4046;
  transition: background 0.2s, box-shadow 0.2s;
}

.chip svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.chip[aria-pressed="true"] {
  color: var(--orange-soft);
  border-color: rgba(255, 107, 26, 0.3);
  background: rgba(255, 107, 26, 0.07);
}

.chip[aria-pressed="true"] i {
  background: var(--orange);
  box-shadow: 0 0 7px rgba(255, 107, 26, 0.8);
}

/* Modo de operação: o chip é o próprio indicador — TELA apagado, PEDAL aceso.
   Ele não é um "toggle de efeito", então ganha peso tipográfico e um ponto
   quadrado para se distinguir dos chips de áudio. */
.chip-mode {
  padding-right: 11px;
  letter-spacing: 0.16em;
}

.chip-mode i {
  width: 5px;
  height: 5px;
  border-radius: 1px;
}

.chip-mode[aria-pressed="true"] {
  color: var(--orange-hot);
  border-color: rgba(255, 138, 61, 0.42);
  background: rgba(255, 107, 26, 0.12);
}

.chip-mode[aria-pressed="true"] i {
  background: var(--orange-hot);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.9);
}

.chip-danger:hover {
  color: #ff8d74;
  border-color: rgba(255, 70, 40, 0.35);
  background: rgba(255, 70, 40, 0.06);
}

.chip:disabled {
  cursor: default;
  opacity: 0.4;
}

.chip.is-armed {
  color: #ffb3a3;
  border-color: rgba(255, 70, 40, 0.6);
  background: rgba(255, 70, 40, 0.14);
  box-shadow: 0 0 16px -4px rgba(255, 70, 40, 0.6);
}

.chip.is-armed svg {
  stroke: #ff8d74;
}

.chip-sep {
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: var(--line);
}

.hints {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8.5px;
  letter-spacing: 0.11em;
  color: #7d828d;
  white-space: nowrap;
}

.hints span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

kbd {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(0, 0, 0, 0.6);
  background: #1a1b21;
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------- side note */

/* Barra inferior da tela: marca à esquerda, aviso de privacidade à direita. */
.stage-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: clamp(12px, 3vw, 34px);
}

/* No app nativo a marca não existe: o aviso fica centralizado. */
html.is-native .stage-bar {
  justify-content: center;
}

@media (max-width: 640px) {
  /* No telefone o tema desce para a barra: no canto ele encostava no pedal. */
  .stage-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand theme'
      'note note';
    align-items: center;
    gap: 8px 12px;
    padding-inline: 14px;
  }

  .stage-bar .site-brand {
    grid-area: brand;
    justify-self: start;
  }

  .stage-bar .theme-toggle {
    position: static;
    grid-area: theme;
    justify-self: end;
  }

  .stage-bar .stage-note {
    grid-area: note;
    justify-self: center;
  }
}

.stage-note {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #9ba1ad;
  text-align: center;
}

.note-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 7px rgba(255, 107, 26, 0.7);
}

/* ------------------------------------------------------------------- toast */
.toast {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid rgba(255, 107, 26, 0.24);
  background: linear-gradient(180deg, rgba(30, 21, 14, 0.98), rgba(10, 8, 7, 0.98));
  box-shadow:
    0 10px 24px -12px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--orange-soft);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.26s var(--ease);
}

.toast::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 107, 26, 0.9);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: rgba(255, 70, 40, 0.32);
  color: #ffd4cb;
}

.toast.is-error::before {
  background: #ff4a2a;
  box-shadow: 0 0 8px rgba(255, 74, 42, 0.9);
}

/* ------------------------------------------------------------------- help */
.help {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: min(560px, 92vw);
  max-height: 88dvh;
}

.help::backdrop {
  background: rgba(4, 4, 6, 0.72);
  backdrop-filter: blur(10px);
}

.help-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 107, 26, 0.12), transparent 55%),
    linear-gradient(170deg, #17181e, #0d0e12);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: help-in 0.28s var(--ease);
}

@keyframes help-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.help-kicker {
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--orange-soft);
}

.help-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.help-body {
  padding: 6px 22px 20px;
  max-height: 62dvh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 26, 0.3) transparent;
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}

.ico-x {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.help-body section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.help-body section:last-child {
  border-bottom: 0;
}

.help-body h3 {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--orange-soft);
}

.help-body p,
.help-body li {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.help-body ol,
.help-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.help-body li::marker {
  color: rgba(255, 107, 26, 0.6);
  font-family: var(--mono);
  font-size: 11px;
}

.help-body p + p {
  margin-top: 8px;
}

.help-body b {
  color: #fff;
  font-weight: 600;
}

.help-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* ------------------------------------------------------------------ others */
.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px;
  border-radius: 12px;
  background: #1a1b21;
  border: 1px solid rgba(255, 107, 26, 0.3);
  text-align: center;
  z-index: 40;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 640px) {
  :root {
    --knob: clamp(76px, 21vw, 92px);
    --foot: clamp(84px, 24vw, 104px);
  }

  .stage {
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .pedal {
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
  }

  .brand-text p:not(.brand-name) {
    font-size: 7.5px;
    letter-spacing: 0.22em;
  }

  .brand-text p:not(.brand-name) span::after {
    display: none;
  }

  .hints {
    display: none;
  }

  .lcd {
    padding: 10px 12px 8px;
  }

  .lcd-data {
    width: 104px;
  }

  .seg {
    height: clamp(52px, 8.4vh, 66px);
  }

  .foot-title {
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .foot-key {
    display: none;
  }

  .feet {
    gap: 10px;
    padding-top: 4px;
  }

  .stage-note {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
}

@media (max-height: 720px) {
  .stage {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .pedal {
    gap: 10px;
  }

  .knob-name {
    font-size: 7.5px;
  }

  .foot-title {
    letter-spacing: 0.16em;
  }
}

/* Sem largura para chips e atalhos na mesma linha: ficam os chips (os atalhos
   só fazem sentido com teclado, ou seja, em telas grandes). */
@media (max-width: 1120px) {
  .hints {
    display: none;
  }
}

/* ------------------------------------------------------- landscape: compact */
/* Tablets and small laptops on their side are wide but not tall enough for the
   full stack: the same column layout runs with tighter clamps so the pedal,
   the knobs and the feet still fit above the fold. */
@media (orientation: landscape) and (max-height: 820px) and (min-height: 621px) {
  :root {
    --knob: clamp(62px, 9.2vh, 88px);
    --foot: clamp(66px, 9.6vh, 92px);
  }

  .stage {
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .pedal {
    gap: 10px;
  }

  .seg {
    height: clamp(48px, 7.6vh, 64px);
  }

  .stage-note {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
}

/* ----------------------------------------------------- landscape: console */
/* A phone on its side has ~380 px of height and ~800 of width, so a vertical
   stack would have to scroll. The pedal becomes a console instead: the display
   keeps the left column, the adjustments sit beside it, and the four feet plus
   the chips run along the bottom. */
@media (orientation: landscape) and (max-height: 620px) and (max-width: 899px) {
  :root {
    --knob: clamp(54px, 16vh, 76px);
    --foot: clamp(58px, 17.5vh, 84px);
  }

  .stage {
    gap: 4px;
    padding-top: max(6px, env(safe-area-inset-top));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    justify-content: center;
  }

  .stage-note {
    display: none;
  }

  .pedal {
    width: min(1000px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-areas:
      'brand brand'
      'lcd controls'
      'lcd controls'
      'foot foot';
    align-items: start;
    gap: 5px 16px;
    padding: 8px 14px 7px;
    border-radius: 20px;
  }

  .brand {
    grid-area: brand;
  }

  .lcd-shell {
    grid-area: lcd;
    align-self: stretch;
    display: flex;
  }

  .controls {
    grid-area: controls;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }

  .knobs {
    padding: 0;
    gap: 6px;
  }

  .feet {
    gap: 4px;
    padding-top: 0;
  }

  .pedal-foot {
    grid-area: foot;
    padding-top: 4px;
  }

  /* the header shrinks to a single line so the display gets the height */
  .brand-mark {
    width: 28px;
  }

  .brand-text .brand-name {
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .brand-text p:not(.brand-name) {
    margin-top: 3px;
    font-size: 7px;
    letter-spacing: 0.24em;
  }

  .lcd {
    flex: 1;
    justify-content: space-between;
    gap: 4px;
    padding: 8px 12px 7px;
    /* short and wide: the readout keeps its row, the numbers stay beside it */
  }

  .seg {
    height: clamp(52px, 17vh, 72px);
  }

  .lcd-data {
    width: 116px;
    gap: 2px;
  }

  .data-row {
    padding: 2px 0;
  }

  .foot {
    gap: 4px;
  }

  .foot-title {
    font-size: 7.5px;
    letter-spacing: 0.1em;
  }

  .foot-key {
    display: none;
  }

  .hints {
    font-size: 8px;
  }

  .chip {
    height: 24px;
    padding: 0 9px;
  }

  /* The help card is a full-height sheet on a short screen: trim the header so
     the steps themselves get the room. */
  .help {
    max-height: calc(100dvh - 12px);
    max-width: min(640px, 94vw);
  }

  .help-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 12px);
  }

  .help-head {
    padding: 12px 18px 8px;
  }

  .help-head h2 {
    font-size: 18px;
  }

  .help-kicker {
    font-size: 7px;
  }

  .help-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 8px 18px 14px;
  }
}

/* ------------------------------------------- landscape: console de tela larga */
/* Num monitor deitado (1920×1080, 1440×900) a altura passa de 620 px, então a
   regra do celular não pegava e o pedal ficava estreito no meio do vazio. Aqui
   o mesmo console aparece em escala de tela grande: display à esquerda, ajustes
   à direita, pés embaixo — ocupando a largura disponível. */

/* Agrupador dos controles da direita: no layout de coluna ele é transparente;
   no console largo vira uma caixa flex para centrar knob + pés + prática como
   um conjunto (antes cada um se alinhava sozinho e sobrava vão em cima). */
.controls {
  display: contents;
}

@media (orientation: landscape) and (min-width: 900px) {
  .pedal {
    /* O console escala com a janela: largura limitada pela tela menos margem e
       também pela altura disponível (proporção ~1,62:1), para não sobrar moldura
       em monitores grandes nem estourar em telas baixas. */
    /* O console ocupa quase toda a tela: a altura manda (viewport menos a folga
       da nota) e a largura sai da proporção 1,8:1 do pedal, com teto em 86vw para
       nunca encostar nas laterais. */
    --pedal-w: min(calc((100dvh - 104px) * 1.8), 86vw, 1720px);
    width: var(--pedal-w);
    height: calc(var(--pedal-w) / 1.8);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      'brand brand'
      'lcd controls'
      'lcd controls'
      'foot foot';
    align-items: stretch;
    gap: 10px 30px;
    padding: 16px 24px 14px;
    border-radius: 26px;
    --knob: clamp(76px, 15vh, 165px);
    --foot: clamp(82px, 16vh, 172px);
  }

  .brand {
    grid-area: brand;
  }

  .brand-mark {
    width: 54px;
  }

  .brand-text .brand-name {
    font-size: 26px;
  }

  .brand-text p:not(.brand-name) {
    font-size: 8.5px;
  }

  .lcd-shell {
    grid-area: lcd;
    align-self: stretch;
    display: flex;
  }

  .lcd {
    flex: 1;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px 13px;
  }

  /* O display é grande: o conteúdo cresce junto, senão o vidro fica vazio. */
  .lcd-body {
    flex: 1;
    align-items: center;
  }

  .lcd-top {
    font-size: 10px;
  }

  /* O display acompanha a largura do painel: o número é o herói da tela. */
  .lcd-readout {
    align-items: center;
    gap: 10px;
    max-width: 64%;
  }

  .seg {
    width: 100%;
    height: auto;
    margin-inline: auto;
  }

  .lcd-caption,
  .lcd-caption b {
    font-size: 10px;
  }

  .lcd-data {
    width: clamp(150px, 14vw, 230px);
  }

  .data-row {
    padding: 6px 0;
  }

  .data-row span {
    font-size: 9px;
  }

  .data-row b {
    font-size: clamp(15px, 2.2vh, 22px);
  }

  .beats i {
    width: 8px;
    height: 8px;
  }

  .lcd-msg {
    font-size: 10px;
  }

  .knob-name {
    font-size: 9.5px;
  }

  .knob-value {
    font-size: 13px;
  }

  .controls {
    grid-area: controls;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-height: 0;
  }

  .knobs {
    grid-area: auto;
    align-self: stretch;
    padding: 0;
    gap: 12px;
  }

  .feet {
    grid-area: auto;
    align-self: center;
    gap: 10px;
    padding-top: 0;
  }

  .pedal-foot {
    grid-area: foot;
    padding: 6px 22px 0;
    gap: 4px 10px;
  }

  /* No console a fileira do Pro rola na horizontal em vez de empilhar. */
  .chips-pro {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chips-pro::-webkit-scrollbar {
    display: none;
  }

  .chips-pro .chip {
    flex: 0 0 auto;
  }

  .foot-title {
    font-size: 10px;
  }

  .chip {
    height: 28px;
    padding: 0 12px;
  }

  .hints {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================================
   Chrome só da web — marca Flytech no canto e barra de atalhos
   O app nativo (Capacitor) não tem teclado nem navegador para onde linkar,
   então `html.is-native` esconde os dois. A classe é posta pelo main.js.
   ========================================================================= */
/* A marca vive na barra inferior do palco: nunca sobrepõe o pedal, em nenhuma
   largura de janela. */
.site-brand {
  position: static;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-decoration: none;
  transition: transform 0.25s var(--ease);
}

.site-brand:hover {
  transform: translateY(-1px);
}

.site-brand:focus-visible {
  outline: 2px solid var(--orange-hot);
  outline-offset: 5px;
  border-radius: 4px;
}

/* A marca é o logotipo oficial da Flytech (mesmo PNG do site, 1208×173, com
   alfa), exibido a 20 px de altura — nítido em telas 2x e 3x. */
.site-brand-logo {
  display: block;
  width: 139px;
  height: auto;
  filter: drop-shadow(0 5px 18px rgba(255, 107, 26, 0.26));
  transition: filter 0.25s var(--ease);
}

.site-brand:hover .site-brand-logo {
  filter: drop-shadow(0 5px 22px rgba(255, 107, 26, 0.48));
}

.site-brand-caption {
  font-family: var(--mono);
  font-size: 7.5px;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 158, 104, 0.72);
  transition: color 0.25s var(--ease);
}

.site-brand:hover .site-brand-caption {
  color: rgba(255, 199, 163, 0.94);
}

/* No console deitado o pedal ocupa a tela toda: só sobra canto em telas largas.
   Em celular deitado (≤1239 px) o selo colidiria com o pedal, então ele sai. */
@media (orientation: landscape) and (max-height: 620px) and (max-width: 1239px) {
  .site-brand {
    display: none;
  }
}

/* App nativo: sem teclado e sem navegador — some com a chrome de web. */
html.is-native .hints,
html.is-native .site-brand,
html.is-native .foot-key,
html.is-native .below-fold,
html.is-native .only-web {
  display: none !important;
}

/* Conteúdo abaixo do pedal (fora da primeira dobra): existe para explicar o
   app a quem chega por busca e para o índice do Google ter texto indexável.
   Não interfere no palco: `.stage` continua com 100dvh e o pedal centrado. */
.below-fold {
  position: relative;
  /* O texto ocupa a largura da tela: duas colunas em vez de uma faixa estreita
     perdida no meio de um monitor grande. */
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 34px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px 56px;
  align-items: start;
}

.below-fold::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 107, 26, 0) 0%,
    rgba(255, 107, 26, 0.22) 22%,
    rgba(255, 107, 26, 0.22) 78%,
    rgba(255, 107, 26, 0) 100%
  );
}

.below-fold h1 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(16px, 0.5vw + 14px, 22px);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.35;
  color: var(--text);
}

.below-fold h1::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  vertical-align: 0.16em;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.7);
}

.below-fold p {
  margin: 0;
  max-width: none;
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
}

/* Telas estreitas: volta a uma coluna só. */
@media (max-width: 900px) {
  .below-fold {
    width: calc(100% - 44px);
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 26px 0 56px;
  }
}

.below-fold b {
  font-weight: 600;
  color: var(--text);
}

.below-fold-links {
  grid-column: 1 / -1;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.below-fold-links a {
  color: var(--orange-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 107, 26, 0.35);
  padding-bottom: 1px;
}

.below-fold-links a:hover {
  color: var(--orange-hot);
  border-bottom-color: rgba(255, 138, 61, 0.8);
}

@media (max-width: 640px) {
  .below-fold {
    width: calc(100% - 32px);
    padding: 24px 0 40px;
  }

  .below-fold p {
    font-size: 12px;
  }
}

/* ---------- MIDI: diálogo de controle externo ---------- */
.midi .help-card {
  display: flex;
  flex-direction: column;
  max-width: min(520px, 94vw);
  max-height: calc(100dvh - 28px);
}

/* O painel é curto: deixa o corpo crescer com o conteúdo e só rolar se faltar
   espaço. A ajuda continua com o seu próprio teto. */
.midi .help-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.midi-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.midi-status {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.midi-status[data-state="on"] { color: #ffc9a3; }
.midi-status[data-state="off"] { color: var(--dim); }
.midi-status[data-state="error"] { color: #ff8f6d; }

.midi-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.midi-btn {
  appearance: none;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 107, 26, 0.32);
  background: rgba(255, 107, 26, 0.1);
  color: var(--orange-soft);
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms;
}

.midi-btn:hover:not(:disabled) {
  background: rgba(255, 107, 26, 0.18);
  border-color: rgba(255, 138, 61, 0.5);
  color: #ffd7bd;
}

.midi-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.midi-btn.ghost {
  border-color: rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--dim);
}

.midi-btn.ghost:hover:not(:disabled) {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.18);
}

.midi-heading {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--dim);
}

.midi-devices,
.midi-map {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.midi-empty {
  font-size: 11px;
  color: var(--dim);
}

.midi-device {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text);
}

.midi-device .midi-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--dim);
}

.midi-device[data-state="connected"] .midi-dot {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 107, 26, 0.85);
}

.midi-device small {
  color: var(--dim);
  font-size: 9.5px;
}

.midi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}

.midi-row[data-learning="true"] {
  border-color: rgba(255, 138, 61, 0.55);
  background: rgba(255, 107, 26, 0.09);
}

.midi-row-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
}

.midi-row-bind {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.midi-row-bind[data-empty="true"] { color: var(--dim); }

.midi-learn,
.midi-unbind {
  appearance: none;
  cursor: pointer;
  border-radius: 7px;
  padding: 6px 8px;
  font: 600 8.5px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 107, 26, 0.28);
  background: transparent;
  color: var(--orange-soft);
}

.midi-learn[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #1a0d06;
}

.midi-unbind {
  padding: 6px 7px;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--dim);
}

.midi-unbind:hover {
  color: #ff8f6d;
  border-color: rgba(255, 74, 42, 0.4);
}

.midi-monitor {
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 150, 90, 0.85);
  min-height: 1.4em;
}

.midi-monitor[data-hot="true"] {
  color: #ffd0ad;
  border-color: rgba(255, 138, 61, 0.35);
}

.midi-hint {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--dim);
}

/* ------------------------------------------------------- entrada de áudio */
.input .help-card {
  max-width: min(520px, 94vw);
}

.input-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-status {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.input-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 26, 0.14);
  border-radius: 11px;
  background: rgba(12, 12, 14, 0.55);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.input-row:hover {
  border-color: rgba(255, 107, 26, 0.34);
  background: rgba(255, 107, 26, 0.05);
}

.input-row[aria-checked='true'] {
  border-color: rgba(255, 107, 26, 0.55);
  background: rgba(255, 107, 26, 0.1);
}

.input-row b {
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-row span {
  flex: none;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-soft);
}

.input-row[aria-checked='true'] span {
  color: var(--orange-hot);
}

.input-tools {
  display: flex;
  gap: 8px;
}

.input-btn {
  height: 30px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid rgba(255, 107, 26, 0.2);
  background: rgba(255, 107, 26, 0.06);
  color: var(--orange-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.input-btn:hover {
  border-color: rgba(255, 107, 26, 0.45);
  color: var(--orange-hot);
}

.input-hint {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--dim);
}

/* Opção que muda como o navegador captura (AEC): caixa + texto explicativo. */
.input-opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  cursor: pointer;
}

.input-opt input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.input-opt input::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.14s var(--ease);
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.5);
}

.input-opt input:checked {
  border-color: rgba(255, 107, 26, 0.55);
  background: rgba(255, 107, 26, 0.12);
}

.input-opt input:checked::before {
  transform: scale(1);
}

.input-opt:has(input:focus-visible) {
  outline: 2px solid rgba(255, 138, 61, 0.55);
  outline-offset: 2px;
}

.input-opt b {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 4px;
}

.input-opt i {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--dim);
}


/* ===================================================== tema (claro/escuro) */
/* Escuro é o padrão; o claro é opt-in por [data-theme="light"] no <html>.
   A troca atinge a PÁGINA (papel, tinta, selo, texto abaixo do pedal). O console
   — o pedal e as folhas de ajuda/MIDI/entrada — continua escuro: é "hardware",
   do mesmo jeito que um screenshot do pedal entra em moldura escura numa página
   clara. Ver a skill flytech-design (produto sempre dark). */

.site-brand-logo--light {
  display: none;
}

.theme-toggle {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 26, 0.16);
  background: rgba(14, 14, 17, 0.55);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  color: var(--orange-soft);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease),
    background 0.16s var(--ease), transform 0.16s var(--ease);
}

.theme-toggle:hover {
  color: var(--orange-hot);
  border-color: rgba(255, 107, 26, 0.34);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* O ícone mostra o tema para onde o toque leva. */
.theme-toggle .ico-moon {
  display: none;
}

/* No console deitado de celular o pedal ocupa a tela toda: o controle sai de
   cena. Nas janelas largas e baixas ele vive na barra inferior, sem colidir. */
@media (orientation: landscape) and (max-height: 620px) and (max-width: 899px) {
  .theme-toggle {
    display: none;
  }
}

[data-theme='light'] {
  color-scheme: light;

  --bg: #f7f5f2;
  --text: #0b0e14;
  --text-soft: #3a4250;
  --muted: #5f6673;
  --dim: #6b7280;

  --line: rgba(11, 14, 20, 0.12);
  --line-soft: rgba(11, 14, 20, 0.07);
  --line-strong: rgba(11, 14, 20, 0.2);

  /* No claro o laranja é preenchimento; texto de acento usa --accent-ink. */
  --orange: #c2410c;
  --orange-hot: #9a3412;
  --orange-soft: #c2410c;
  --orange-deep: #b3300f;
}

[data-theme='light'] .ambient-blob {
  opacity: 0.2;
}

[data-theme='light'] .ambient-grid {
  background-image: linear-gradient(rgba(11, 14, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 14, 20, 0.05) 1px, transparent 1px);
  opacity: 0.45;
}

[data-theme='light'] .ambient-grain {
  opacity: 0.025;
}

[data-theme='light'] .site-brand-logo--dark {
  display: none;
}

[data-theme='light'] .site-brand-logo--light {
  display: block;
}

[data-theme='light'] .site-brand-logo {
  filter: none;
}

[data-theme='light'] .site-brand:hover .site-brand-logo {
  filter: none;
}

[data-theme='light'] .site-brand-caption {
  color: #8a4a2a;
}

[data-theme='light'] .site-brand:hover .site-brand-caption {
  color: #9a3412;
}

[data-theme='light'] .theme-toggle {
  border-color: rgba(11, 14, 20, 0.14);
  background: rgba(255, 255, 255, 0.6);
  color: #3a4250;
}

[data-theme='light'] .theme-toggle:hover {
  border-color: rgba(11, 14, 20, 0.3);
  color: #0b0e14;
}

[data-theme='light'] .theme-toggle .ico-sun {
  display: none;
}

[data-theme='light'] .theme-toggle .ico-moon {
  display: block;
}

[data-theme='light'] .stage-note {
  color: #5f6673;
}

[data-theme='light'] .note-dot {
  background: #ff7a1a;
  box-shadow: none;
}

[data-theme='light'] .below-fold::before {
  background: linear-gradient(
    90deg,
    rgba(11, 14, 20, 0) 0%,
    rgba(11, 14, 20, 0.14) 22%,
    rgba(11, 14, 20, 0.14) 78%,
    rgba(11, 14, 20, 0) 100%
  );
}

[data-theme='light'] .below-fold h1 {
  color: #0b0e14;
}

[data-theme='light'] .below-fold h1::before {
  background: #ff7a1a;
  box-shadow: none;
}

[data-theme='light'] .below-fold p {
  color: #5f6673;
}

[data-theme='light'] .below-fold b {
  color: #0b0e14;
}

[data-theme='light'] .below-fold-links a {
  color: #c2410c;
  border-bottom-color: rgba(194, 65, 12, 0.35);
}

[data-theme='light'] .below-fold-links a:hover {
  color: #9a3412;
  border-bottom-color: rgba(154, 52, 18, 0.5);
}

[data-theme='light'] :focus-visible {
  outline-color: #0b0e14;
}

[data-theme='light'] ::selection {
  background: rgba(255, 122, 26, 0.22);
  color: #0b0e14;
}

/* O console sobre o papel: sombra de tinta, nunca colorida. */
[data-theme='light'] .pedal {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(11, 14, 20, 0.1),
    0 30px 70px rgba(11, 14, 20, 0.18);
}

/* Dentro do pedal e das folhas, os tokens voltam para a paleta de hardware. */
[data-theme='light'] .pedal,
[data-theme='light'] .toast,
[data-theme='light'] dialog.help {
  color-scheme: dark;

  --orange: #ff6b1a;
  --orange-hot: #ff8a3d;
  --orange-soft: #ffb27a;
  --orange-deep: #d94206;

  --text: #eef0f3;
  --text-soft: #c7cad1;
  --muted: #9ea3ae;
  --dim: #747984;

  --line: rgba(255, 255, 255, 0.075);
  --line-soft: rgba(255, 255, 255, 0.045);
  --line-strong: rgba(255, 255, 255, 0.13);

  color: #eef0f3;
}

/* ============================================================ estúdio Pro */
.chip.chip-pro {
  letter-spacing: 0.14em;
}

.chip.chip-pro[aria-pressed="true"] {
  border-color: rgba(255, 138, 61, 0.55);
  color: var(--orange-soft);
}

.pro .help-card {
  max-width: min(600px, 94vw);
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
}

.pro .help-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 6px 20px 18px;
}

.pro-lock {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 26, 0.35);
  background: rgba(255, 107, 26, 0.1);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
}

.pro-lock a {
  color: var(--orange-soft);
}

.pro-block {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.pro-block:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.pro-block h3 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-soft);
}

.pro-hint {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.pro-hint b {
  color: var(--text-soft);
  font-weight: 600;
}

.pro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pro-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 26, 0.32);
  background: rgba(255, 107, 26, 0.08);
  color: var(--orange-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.pro-btn:hover:not(:disabled) {
  background: rgba(255, 107, 26, 0.16);
  border-color: rgba(255, 107, 26, 0.55);
  transform: translateY(-1px);
}

.pro-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pro-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pro-link:hover {
  color: var(--orange-soft);
}

.pro-input {
  flex: 1 1 160px;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
}

.pro-input:focus-visible {
  outline: none;
  border-color: rgba(255, 107, 26, 0.6);
}

.pro-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 176px;
  overflow: auto;
}

.pro-empty {
  padding: 8px 0;
  font-size: 11.5px;
  color: var(--dim);
}

.pro-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.pro-item b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-item span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.pro-item-actions {
  display: flex;
  gap: 4px;
}

.pro-icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: none;
  color: var(--text-soft);
  cursor: pointer;
}

.pro-icon-btn:hover {
  border-color: rgba(255, 107, 26, 0.45);
  color: var(--orange-soft);
}

.pro-icon-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pro-range {
  flex: 1 1 200px;
  accent-color: var(--orange);
}

.pro-readout {
  min-width: 58px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--orange-soft);
  text-align: right;
}

.pro-presets {
  gap: 6px;
}

.pro-mini {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: none;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.pro-mini:hover {
  border-color: rgba(255, 107, 26, 0.45);
  color: var(--orange-soft);
}

.pro-mini[aria-pressed="true"] {
  background: rgba(255, 107, 26, 0.16);
  border-color: rgba(255, 107, 26, 0.55);
  color: var(--orange-soft);
}

.pro-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.pro-swatch i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch, #1a1b21);
}

.pro-swatch[aria-pressed="true"] {
  border-color: rgba(255, 107, 26, 0.55);
  color: var(--text);
}

.pro-swatch[data-finish="classic"] { --swatch: linear-gradient(145deg, #26272f, #0b0c10); }
.pro-swatch[data-finish="copper"] { --swatch: linear-gradient(145deg, #8a4a24, #2a1408); }
.pro-swatch[data-finish="olive"] { --swatch: linear-gradient(145deg, #5c6440, #191d12); }
.pro-swatch[data-finish="midnight"] { --swatch: linear-gradient(145deg, #2b3f63, #0a1020); }

/* --------------------------------------------------- acabamentos do pedal */
/* Só metal e LED mudam: o LCD e a tipografia continuam os mesmos. */
.pedal[data-finish="copper"] {
  --panel: #16100c;
  --panel-hi: #241812;
  --line: rgba(255, 214, 186, 0.09);
  --line-soft: rgba(255, 214, 186, 0.05);
  --line-strong: rgba(255, 214, 186, 0.16);
  --orange: #ff7420;
  --orange-hot: #ff9450;
}

.pedal[data-finish="olive"] {
  --panel: #12140e;
  --panel-hi: #1b1f16;
  --line: rgba(214, 232, 186, 0.09);
  --line-soft: rgba(214, 232, 186, 0.05);
  --line-strong: rgba(214, 232, 186, 0.15);
  --orange: #d8e66a;
  --orange-hot: #e9f28c;
  --orange-soft: #c8d46a;
}

.pedal[data-finish="midnight"] {
  --panel: #0c1018;
  --panel-hi: #141a26;
  --line: rgba(186, 214, 255, 0.09);
  --line-soft: rgba(186, 214, 255, 0.05);
  --line-strong: rgba(186, 214, 255, 0.16);
  --orange: #6aa8ff;
  --orange-hot: #8dc0ff;
  --orange-soft: #a8d0ff;
}

/* Oliva e Noite trocam o laranja por acento próprio: o LCD acompanha. */
.pedal[data-finish="olive"] .lcd,
.pedal[data-finish="midnight"] .lcd {
  --lcd-ink: var(--orange-hot);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(216, 230, 106, 0.07), transparent 60%),
    linear-gradient(180deg, #0a0c07, #060705);
}

.pedal[data-finish="midnight"] .lcd {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(106, 168, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #070a10, #04060a);
}

/* A barra de progresso acompanha o acento de cada acabamento. */
.pedal[data-finish="olive"] .lcd-progress i,
.pedal[data-finish="midnight"] .lcd-progress i {
  background: linear-gradient(90deg, var(--orange-soft), var(--orange-hot) 70%, var(--orange));
  box-shadow: 0 0 12px color-mix(in srgb, var(--orange) 60%, transparent);
}

.pedal[data-finish="olive"] .lcd-progress i::after,
.pedal[data-finish="midnight"] .lcd-progress i::after {
  background: var(--orange-soft);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--orange) 55%, transparent);
}

.pro-mini:disabled,
.pro-swatch:disabled,
.pro-range:disabled,
.pro-input:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pro-mini:disabled:hover,
.pro-swatch:disabled:hover {
  border-color: var(--line);
  color: var(--text-soft);
}

/* ------------------------------------------------------------------ telefone */
@media (max-width: 640px) {
  .pedal-foot {
    padding-inline: 18px;
  }

  .chips,
  .chips-pro {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* A máscara na ponta direita avisa que a fileira rola. */
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }

  .chips .chip,
  .chips-pro .chip {
    font-size: 7.4px;
    padding: 0 8px;
    letter-spacing: 0.12em;
  }

  .chips::-webkit-scrollbar,
  .chips-pro::-webkit-scrollbar {
    display: none;
  }

  .chips .chip,
  .chips-pro .chip {
    flex: 0 0 auto;
  }
}

/* ------------------------------------------------------- prática: par de pés */
.speed-pad {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 4px;
}

.foot-speed {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(46px, calc(var(--foot) * 0.5), 58px);
  height: clamp(46px, calc(var(--foot) * 0.5), 58px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--orange-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.foot-speed-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #2b2d34, #565a64 12%, #22242a 30%, #4b4f58 48%, #1d1f24 66%, #565a64 84%, #2b2d34);
  box-shadow:
    0 6px 14px -4px rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 3px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.16);
  transition: box-shadow 160ms ease, background 160ms ease;
  transition: transform 90ms ease, box-shadow 140ms ease;
}

.foot-speed-cap {
  position: relative;
  display: grid;
  place-items: center;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 36% 24%, #2a2b31 0%, #16171b 62%, #0d0e11 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: #b9bec8;
  transition: color 160ms ease, text-shadow 160ms ease;
}

/* Só o lado que está de fato mudando a velocidade recebe a cor do acabamento:
   o "−" abaixo de 1×, o "+" acima. Em 1× os dois ficam neutros. */
.foot-speed.is-active .foot-speed-ring {
  /* Mesmo metal do PLAY / REC, só que puxado para a cor do acabamento:
     o anel inteiro acende, não apenas o contorno. */
  background: conic-gradient(
    from 210deg,
    color-mix(in srgb, var(--orange) 16%, #2a1c14),
    color-mix(in srgb, var(--orange) 52%, #7c5334) 12%,
    color-mix(in srgb, var(--orange) 10%, #241a13) 30%,
    color-mix(in srgb, var(--orange) 44%, #6a462c) 48%,
    color-mix(in srgb, var(--orange) 8%, #1e1511) 66%,
    color-mix(in srgb, var(--orange) 52%, #7c5334) 84%,
    color-mix(in srgb, var(--orange) 16%, #2a1c14)
  );
  box-shadow:
    0 6px 14px -4px rgba(0, 0, 0, 0.8),
    0 0 0 1px color-mix(in srgb, var(--orange) 55%, transparent),
    0 0 22px -2px color-mix(in srgb, var(--orange) 55%, transparent),
    inset 0 -1px 3px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.foot-speed.is-active .foot-speed-cap {
  color: var(--orange-hot);
  text-shadow: 0 0 10px color-mix(in srgb, var(--orange) 60%, transparent);
}

.foot-speed.is-active:hover .foot-speed-cap {
  color: var(--orange-hot);
}

.foot-speed:hover .foot-speed-cap {
  color: var(--orange-hot);
}

.foot-speed:active .foot-speed-ring {
  transform: scale(0.94);
}

.foot-speed:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.foot-speed[aria-disabled="true"],
.speed-pad.is-locked .foot-speed {
  color: var(--dim);
}

.speed-pad.is-locked .foot-speed-cap {
  color: var(--dim);
}

.speed-pad-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Em 1× o valor é "−" na mesma tinta laranja das outras linhas do display. */
.data-row-speed b {
  color: var(--lcd-ink);
}

.data-row-speed.is-active b {
  color: var(--orange-hot);
  text-shadow: 0 0 10px rgba(255, 107, 26, 0.45);
}

.data-row-speed[hidden] {
  display: none;
}
