/* =========================================================================
   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;
}

.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);
}

.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);
}

/* -------------------------------------------------------------------- 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;
}

.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;
}

/* ------------------------------------------------------------------ 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 */
.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: 6px 18px;
    padding: 11px 16px 10px;
    border-radius: 20px;
  }

  .brand {
    grid-area: brand;
  }

  .lcd-shell {
    grid-area: lcd;
    align-self: stretch;
    display: flex;
  }

  .knobs {
    grid-area: knobs;
    align-self: end;
    padding: 0;
    gap: 6px;
  }

  .feet {
    grid-area: feet;
    align-self: center;
    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) {
  /* A barra inferior faz parte do palco: a folga vertical sai do padding, não
     do pedal, para o console continuar inteiro acima da dobra. */
  .stage {
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 8px;
    --pedal-w: min(calc((100dvh - 112px) * 1.8), 86vw, 1720px);
  }

  .pedal {
    /* O console ocupa quase toda a tela: a altura manda (viewport menos a folga
       da barra inferior) e a largura sai da proporção 1,8:1 do pedal, com teto
       em 86vw para nunca encostar nas laterais. */
    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.
   ========================================================================= */
/* Barra inferior do palco — marca, nota de privacidade e alternador de tema.
   Antes a marca e o tema flutuavam nos cantos de cima e, em janelas baixas ou
   no telefone, caiam por cima do pedal. Agora eles fecham o palco por baixo. */
/* Barra inferior da tela: marca à esquerda, aviso de privacidade no meio,
   tema à direita. Mesma estrutura e medidas do FT-Loop. */
.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;
}

.site-brand {
  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 de celular (tela curta e estreita) o pedal ocupa a tela
   toda e o selo colidiria com ele: a marca sai, a nota e o tema ficam.
   Mesma regra do FT-Loop. */
@media (orientation: landscape) and (max-height: 620px) and (max-width: 1239px) {
  .stage-bar .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;
}

}

/* ------------------------------------------------------- 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);
}

/* ===================================================== 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;
}

[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;
}

/* ------------------------------------------------------------------ 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;
  }
}

/* ============================================== leitura de afinação (FT-Tune) */
.pitch {
display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  line-height: 0.82;
}

.pitch-note {
font-size: clamp(44px, 8.6vh, 68px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--lcd-ink);
  text-shadow: 0 0 18px rgba(255, 107, 26, 0.45), 0 0 46px rgba(255, 107, 26, 0.18);
  font-variant-numeric: tabular-nums;
  transition: color 0.18s var(--ease), text-shadow 0.18s var(--ease), opacity 0.18s;
}

.pitch-oct {
font-size: clamp(15px, 2.5vh, 21px);
  font-weight: 600;
  color: rgba(255, 150, 84, 0.72);
  letter-spacing: 0.02em;
}

/* O desvio em cents é o segundo dado mais importante: fala alto, logo abaixo
   da nota, sem moldura — a moldura empurrava o olho para fora do mostrador. */
.pitch-cents {
  font-family: var(--mono);
  font-size: clamp(24px, 4.4vh, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 138, 61, 0.9);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.pitch-cents::after {
  content: "¢";
  margin-left: 4px;
  font-size: 0.36em;
  vertical-align: 0.42em;
  opacity: 0.75;
}

.pitch-sub {
display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-left: 2px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 138, 61, 0.62);
}

.pitch-sub b {
font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 165, 108, 0.95);
  font-variant-numeric: tabular-nums;
}

.pitch-target {
color: rgba(255, 132, 54, 0.5);
  white-space: nowrap;
}

/* Sem sinal o display fica apagado: nada de agulha nem nota inventada. */
.lcd[data-state="idle"] .pitch-note {
color: rgba(255, 122, 30, 0.26);
  text-shadow: none;
}

.lcd[data-state="idle"] .pitch-oct,
.lcd[data-state="idle"] .pitch-cents,
.lcd[data-state="idle"] .pitch-sub b {
color: rgba(255, 132, 54, 0.32);
}

.lcd[data-state="idle"] .gauge-needle {
opacity: 0.35;
}

.lcd[data-state="tuned"] .pitch-note {
color: #ffd8bc;
  text-shadow: 0 0 22px rgba(255, 138, 61, 0.78), 0 0 60px rgba(255, 107, 26, 0.3);
}

.lcd[data-state="tuned"] .pitch-cents {
color: #ffd8bc;
}

.lcd[data-state="tuned"] .gauge-zone {
opacity: 1;
}

/* --------------------------------------------------------- agulha de cents */
.lcd-gauge {
flex: 0 0 clamp(104px, 21vw, 152px);
  display: grid;
  place-items: center;
  align-self: center;
}

.lcd-gauge svg {
width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-track {
fill: none;
  stroke: rgba(255, 122, 30, 0.16);
  stroke-width: 2;
  stroke-linecap: round;
}

.gauge-zone {
fill: none;
  stroke: rgba(255, 138, 61, 0.95);
  stroke-width: 5.5;
  stroke-linecap: round;
  opacity: 0.45;
  filter: drop-shadow(0 0 6px rgba(255, 107, 26, 0.6));
  transition: opacity 0.2s var(--ease);
}

.gauge-ticks line {
stroke: rgba(255, 138, 61, 0.34);
  stroke-width: 1;
  stroke-linecap: round;
}

.gauge-ticks line.major {
stroke: rgba(255, 178, 122, 0.8);
  stroke-width: 1.6;
}

.gauge-needle {
transform-box: view-box;
  transform-origin: 50% 85.94%;
  transition: transform 0.1s linear, opacity 0.2s;
}

.gauge-needle path {
filter: drop-shadow(0 0 7px rgba(255, 107, 26, 0.72));
}

.gauge-hub {
fill: #2b1a10;
  stroke: rgba(255, 138, 61, 0.42);
  stroke-width: 1;
}

.gauge-hub-dot {
fill: #ffb27a;
}

.gauge-label {
font-family: var(--mono);
  font-size: 6.6px;
  letter-spacing: 0.08em;
  fill: rgba(255, 138, 61, 0.55);
}

/* ------------------------------------------------------- cordas da afinação */
.strings {
display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 7px;
  min-height: 15px;
}

.strings:empty {
display: none;
}

.strings .string {
display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 7.2px;
  letter-spacing: 0.06em;
  color: rgba(255, 132, 54, 0.38);
  transition: color 0.16s;
}

.strings .string i {
width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: rgba(255, 132, 54, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 132, 54, 0.22);
  transition: background 0.16s, box-shadow 0.16s, transform 0.16s var(--ease);
}

.strings .string.is-on {
color: rgba(255, 206, 172, 0.95);
}

.strings .string.is-on i {
background: var(--lcd-ink);
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.85);
}

.strings .string.is-tuned i {
background: #ffc79a;
  box-shadow: 0 0 12px rgba(255, 170, 110, 0.95);
  transform: scale(1.22);
}

/* ------------------------------------------------------ estados do display */
.lcd[data-state="listening"] .lamp {
animation: lamp-blink 1.6s steps(2, jump-none) infinite;
}

/* Leitura retida: o sinal caiu, mas a última nota continua útil por um instante.
   O conjunto fica mais apagado em vez de piscar para o vazio. */
.lcd[data-stale="true"] .pitch,
.lcd[data-stale="true"] .lcd-gauge,
.lcd[data-stale="true"] .lcd-data {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lcd[data-state="tuned"] .lcd-state {
color: #ffd0ad;
}

.lcd[data-state="flat"] .lcd-state,
.lcd[data-state="sharp"] .lcd-state {
color: #ffb27a;
}

/* ----------------------------------------------------- pedal: estado da escuta */
.foot[data-foot="listen"] .foot-body {
background: conic-gradient(
    from 210deg,
    #2a1c14,
    #7c5334 12%,
    #241a13 30%,
    #6a462c 48%,
    #1e1511 66%,
    #7c5334 84%,
    #2a1c14
  );
}

.foot[data-foot="listen"] .foot-cap {
color: #ffcfae;
}

.foot[data-foot="listen"] .foot-icon {
filter: drop-shadow(0 0 10px rgba(255, 107, 26, 0.4));
}

.foot[data-foot="listen"].is-live .foot-led {
background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.95);
}

.foot[data-foot="listen"].is-live .foot-body {
box-shadow:
    0 14px 26px -8px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 107, 26, 0.32),
    0 0 30px -2px rgba(255, 107, 26, 0.34),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.foot[data-foot="listen"].is-live .foot-cap {
color: #ffd8bc;
}

/* ------------------------------------------------- pingente: link do FT-Loop */
/* O quarto pé não é um modo do afinador: é um atalho para o outro pedal da
   Flytech. O ícone fica neutro como MODO e AFINAÇÃO (o laranja é do OUVIR) e
   só acende no hover; a legenda é a mesma de sempre, com a tecla L. */
.foot[data-foot="loop"] {
  text-decoration: none;
}

.foot[data-foot="loop"]:hover .foot-icon,
.foot[data-foot="loop"]:focus-visible .foot-icon {
  color: var(--orange-hot);
}

/* ------------------------------------------------------ botões de ajuste */
.seg-btns {
display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg-btns button {
height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 26, 0.22);
  background: rgba(255, 107, 26, 0.05);
  color: var(--orange-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.seg-btns button:hover {
border-color: rgba(255, 107, 26, 0.5);
  color: var(--orange-hot);
}

.seg-btns button[aria-pressed="true"] {
background: var(--orange);
  border-color: var(--orange);
  color: #1a0d06;
  font-weight: 700;
}

.set-block {
padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.set-block:first-of-type {
border-top: 0;
  padding-top: 2px;
}

.set-block h3 {
margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-soft);
}

.set-hint {
margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.set-hint b {
color: var(--text-soft);
  font-weight: 600;
}

.set-row {
display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.set-row .set-hint {
margin: 0;
}

.set-toggle {
height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.set-toggle b {
font-weight: 600;
  color: var(--orange-soft);
}

.set-toggle[aria-pressed="true"] {
border-color: rgba(255, 107, 26, 0.55);
  background: rgba(255, 107, 26, 0.12);
  color: var(--text);
}

.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.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.pro-btn:hover {
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;
  transform: none;
}

.pro-range {
flex: 1 1 160px;
  accent-color: var(--orange);
}

.pro-readout {
min-width: 54px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--orange-soft);
  text-align: right;
}

/* ------------------------------------------------------- tom de referência */
.tone-notes {
display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.tone-notes button {
display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 26, 0.16);
  background: rgba(12, 12, 14, 0.55);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.tone-notes button b {
font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tone-notes button span {
font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.tone-notes button:hover {
border-color: rgba(255, 107, 26, 0.4);
  background: rgba(255, 107, 26, 0.06);
}

.tone-notes button[aria-pressed="true"] {
border-color: rgba(255, 107, 26, 0.6);
  background: rgba(255, 107, 26, 0.13);
  color: var(--orange-hot);
}

.tone-notes button[aria-pressed="true"] span {
color: var(--orange-soft);
}

.tone-bar {
display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.tone-label {
font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.tone-bar .set-hint {
margin: 0;
}

/* --------------------------------------------------------------- histórico */
.hist-list {
margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow: auto;
}

.hist-list li {
display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hist-note {
font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-soft);
  font-variant-numeric: tabular-nums;
}

.hist-meta {
font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-meta b {
color: var(--text-soft);
  font-weight: 600;
}

.hist-time {
font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* --------------------------------------------------------------- afinações */
.preset-list {
display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --------------------------------------------------------------- acabamento */
.finish-list {
display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finish-swatch {
display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 7px;
  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;
  transition: border-color 0.16s, color 0.16s;
}

.finish-swatch i {
width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch, #1a1b21);
}

.finish-swatch:hover {
border-color: rgba(255, 107, 26, 0.4);
}

.finish-swatch[aria-pressed="true"] {
border-color: rgba(255, 107, 26, 0.6);
  color: var(--text);
}

.finish-swatch[data-finish="classic"] {
--swatch: linear-gradient(145deg, #26272f, #0b0c10);
}

.finish-swatch[data-finish="copper"] {
--swatch: linear-gradient(145deg, #8a4a24, #2a1408);
}

.finish-swatch[data-finish="graphite"] {
--swatch: linear-gradient(145deg, #45484f, #121317);
}

.finish-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, e o acento
   segue laranja em todos — o afinador não vira outro produto. */
.pedal[data-finish="copper"] {
--panel: #171009;
  --panel-hi: #261a12;
  --line: rgba(255, 214, 186, 0.1);
  --line-soft: rgba(255, 214, 186, 0.055);
  --line-strong: rgba(255, 214, 186, 0.17);
  --orange: #ff7420;
  --orange-hot: #ff9450;
}

.pedal[data-finish="graphite"] {
--panel: #141519;
  --panel-hi: #1e2025;
  --line: rgba(214, 220, 232, 0.09);
  --line-soft: rgba(214, 220, 232, 0.05);
  --line-strong: rgba(214, 220, 232, 0.15);
}

.pedal[data-finish="midnight"] {
--panel: #0c1018;
  --panel-hi: #151b26;
  --line: rgba(186, 214, 255, 0.09);
  --line-soft: rgba(186, 214, 255, 0.05);
  --line-strong: rgba(186, 214, 255, 0.16);
}

/* Telas estreitas: a agulha cede espaço para a nota. */
@media (max-width: 400px) {
.lcd-gauge {
    flex-basis: 92px;
  }

  .pitch {
    gap: 4px;
  }
}

/* ------------------------------------------------------------ utilidades finais */
.sr-only {
position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* As cordas no display são botões: clicar escolhe a corda e desliga o AUTO. */
.strings button.string {
border: 0;
  padding: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.strings button.string b {
font-weight: 600;
  font-size: 6.4px;
  letter-spacing: 0.06em;
}

.strings button.string:focus-visible {
outline: 1px solid rgba(255, 138, 61, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* "Dó♯" ocupa mais espaço que "C♯": a nota cede um pouco para não estourar. */
.pitch.is-solfejo .pitch-note {
font-size: clamp(30px, 6.2vh, 48px);
}

.pitch.is-solfejo .pitch-oct {
font-size: clamp(13px, 2.1vh, 18px);
}

/* Tom de referência: o seletor de oitava fica entre os botões de nota. */
.tone-bar .pro-readout {
min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-hot);
}

/* ================================================= composição do mostrador
   O afinador tem uma hierarquia diferente do looper: a nota é o herói, a
   agulha vem ao lado e os dados de calibração viram uma faixa de instrumento
   na base do vidro (rótulo em cima, valor embaixo). */
.lcd-body {
display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2.2vw, 20px);
}

.lcd-readout {
gap: clamp(6px, 1.2vh, 10px);
}

.pitch {
width: 100%;
  align-items: flex-start;
  gap: 8px;
}

.pitch-note {
font-size: clamp(56px, 9.6vh, 80px);
  line-height: 0.78;
}

.pitch-oct {
padding-top: 4px;
  font-size: clamp(15px, 2.4vh, 20px);
}

.pitch-cents {
margin-top: 2px;
  font-size: clamp(19px, 3.2vh, 25px);
}

.pitch-sub {
font-size: 8px;
  letter-spacing: 0.18em;
}

.pitch-sub b {
font-size: 10px;
}

.lcd-gauge {
width: clamp(132px, 22vw, 168px);
}

.lcd-data {
width: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.7fr;
  gap: 0 clamp(10px, 2.2vw, 22px);
  padding: clamp(7px, 1.3vh, 11px) 0 0;
  margin-top: clamp(4px, 1vh, 8px);
  border-top: 1px solid rgba(255, 122, 30, 0.12);
}

.lcd-data .data-row {
flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border-bottom: 0;
}

.lcd-data .data-row span {
font-size: 6.8px;
  letter-spacing: 0.2em;
}

.lcd-data .data-row b {
max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(11px, 1.7vh, 14px);
}

@media (max-width: 560px) {
.lcd-data {
grid-template-columns: 1fr 1fr;
    row-gap: 7px;
}

}

@media (orientation: landscape) and (max-height: 620px) {
.pitch-note {
font-size: clamp(60px, 12vh, 96px);
}

.lcd-gauge {
width: clamp(150px, 18vw, 210px);
}

.lcd-data .data-row span {
font-size: 8px;
}

.lcd-data .data-row b {
font-size: clamp(12px, 2vh, 17px);
}

}

/* Console em paisagem alta (desktop/tablet deitado): o vidro é grande, então a
   nota, a agulha e a faixa de dados crescem junto para o display não ficar vazio. */
@media (orientation: landscape) and (min-height: 621px) {
.lcd-body {
    gap: clamp(18px, 2.6vw, 32px);
  }

  .lcd-readout {
    gap: clamp(10px, 1.6vh, 16px);
  }

  .pitch-note {
    font-size: clamp(84px, 13.4vh, 118px);
  }

  .pitch-oct {
    padding-top: 10px;
    font-size: clamp(20px, 2.8vh, 26px);
  }

  .pitch-cents {
    margin-top: 6px;
    font-size: clamp(30px, 5vh, 44px);
  }

  .pitch-sub {
    font-size: 9.5px;
  }

  .pitch-sub b {
    font-size: 12px;
  }

  .lcd-gauge {
    width: clamp(196px, 21vw, 250px);
  }

  .lcd-data {
    padding-top: clamp(10px, 1.6vh, 15px);
  }

  .lcd-data .data-row span {
    font-size: 8px;
  }

  .lcd-data .data-row b {
    font-size: clamp(14px, 1.9vh, 18px);
  }
}

@media (orientation: landscape) and (min-height: 621px) {
.pitch-note {
font-size: clamp(104px, 16.4vh, 148px);
}

.pitch-oct {
padding-top: 14px;
    font-size: clamp(22px, 3.2vh, 30px);
}

.pitch-cents {
font-size: clamp(24px, 3.9vh, 32px);
}

.lcd-gauge {
width: clamp(240px, 25vw, 300px);
}

.lcd-data .data-row b {
font-size: clamp(15px, 2.1vh, 19px);
}

}

/* Ajustes finos do mostrador: unidades não quebram linha e a faixa de dados
   ganha divisórias discretas, como um painel de instrumento. */
.pitch-hz {
white-space: nowrap;
}

.pitch-sub {
padding-top: 2px;
}

.lcd-data {
grid-template-columns: 0.9fr 0.7fr 1.6fr 0.8fr;
}

.lcd-data .data-row + .data-row {
border-left: 1px solid rgba(255, 122, 30, 0.1);
  padding-left: clamp(8px, 1.6vw, 14px);
}

@media (max-width: 560px) {
.lcd-data {
grid-template-columns: 1fr 1fr;
}

.lcd-data .data-row:nth-child(odd) {
border-left: 0;
    padding-left: 0;
}

}

/* Telefone estreito: diminui o passo dos chips para a fileira caber sem corte. */
@media (max-width: 640px) {
.chips,
  .chips-pro {
    gap: 5px;
  }

  .chips .chip,
  .chips-pro .chip {
    font-size: 7px;
    padding: 0 7px;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 470px) {
.pitch-note {
font-size: clamp(64px, 9.8vh, 84px);
}

  /* Cinco chips em 390px: passo menor para a fileira caber inteira. */
  .chips,
  .chips-pro {
    gap: 4px;
  }

  .chips .chip,
  .chips-pro .chip {
    font-size: 6.2px;
    padding: 0 5px;
    letter-spacing: 0.06em;
  }

  /* A coluna da agulha precisa de largura fixa: com "auto" ela engole a
     coluna da leitura quando o SVG pede espaço. */
  .lcd-body {
    grid-template-columns: minmax(0, 1fr) clamp(132px, 38vw, 158px);
  }

  .lcd-gauge {
    width: 100%;
    align-self: center;
  }
}

@media (orientation: landscape) and (min-height: 621px) {
.pitch-note {
font-size: clamp(118px, 19vh, 172px);
}

.lcd-gauge {
width: clamp(250px, 26vw, 320px);
}

}

/* Paisagem larga: o bloco de leitura ocupa a coluna inteira do vidro. */
@media (orientation: landscape) and (min-width: 900px) {
.lcd-body {
    grid-template-columns: minmax(0, 1.05fr) auto;
  }

  .lcd-readout {
    max-width: none;
    align-self: stretch;
    justify-content: center;
  }

  .pitch-cents {
    font-size: clamp(30px, 5.2vh, 46px);
  }
}

/* A escala do desvio precisa ler como escala: marca e trilho com contraste. */
.gauge-track {
stroke: rgba(255, 122, 30, 0.26);
}

.gauge-ticks line {
stroke: rgba(255, 138, 61, 0.44);
}

/* ------------------------------------------------------------------- barra */
/* No telefone a barra vira duas linhas: marca e tema em cima, nota embaixo.
   Em 390 px o logotipo e a nota não cabem lado a lado. */
@media (max-width: 640px) {
  /* No telefone o tema desce para a barra: no canto ele encostava no pedal. */
  .stage {
    padding-top: calc(12px + env(safe-area-inset-top));
    gap: clamp(8px, 1.5vh, 12px);
  }

  .stage-bar {
    display: grid;
    grid-template-columns: minmax(0, 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;
  }
}

/* ------------------------------------------------------- telefone pequeno */
/* 360×640 e 375×667 são os menores aparelhos que ainda rodam o console
   inteiro: com os valores padrão o pedal passava de 660 px e a página rolava.
   Aqui tudo encolhe junto — vidro, agulha, knobs, pés, chips e a barra — e as
   medidas acompanham a altura (vh), então 412×732 também cabe sem virar
   miniatura. */
@media (max-width: 470px) and (max-height: 780px) {
  :root {
    --knob: clamp(60px, 11.6vh, 92px);
    --foot: clamp(54px, 10.2vh, 76px);
  }

  .stage {
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    gap: clamp(5px, 1vh, 9px);
  }

  .pedal {
    gap: clamp(5px, 0.9vh, 8px);
    padding: clamp(9px, 1.5vh, 12px);
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: clamp(24px, 3.8vh, 30px);
  }

  .brand-text .brand-name {
    font-size: clamp(13px, 2.1vh, 16px);
    letter-spacing: 0.13em;
  }

  .brand-text p:not(.brand-name) {
    margin-top: 2px;
    font-size: 6px;
  }

  .lcd {
    padding: 8px 10px 7px;
    gap: 4px;
  }

  .lcd-top {
    font-size: 7px;
  }

  .lcd-body {
    gap: 6px;
  }

  .pitch-note {
    font-size: clamp(42px, 7.4vh, 60px);
  }

  .pitch-oct {
    padding-top: 3px;
    font-size: clamp(12px, 2vh, 15px);
  }

  .pitch-cents {
    font-size: clamp(16px, 2.6vh, 21px);
  }

  .pitch-sub {
    font-size: 8px;
  }

  .lcd-gauge {
    width: clamp(84px, 14.6vh, 112px);
  }

  .lcd-data {
    gap: 3px 6px;
  }

  .lcd-data .data-row {
    padding: 1px 0 2px;
  }

  .lcd-data .data-row span {
    font-size: 6px;
    line-height: 1.2;
  }

  .lcd-data .data-row b {
    font-size: 12px;
    line-height: 1.15;
  }

  .lcd-progress {
    height: 3px;
  }

  .lcd-foot {
    padding-top: 4px;
  }

  .lcd-msg,
  .lcd-meter {
    font-size: 7.4px;
  }

  .knobs {
    padding: 2px 0;
  }

  .knob {
    gap: 3px;
    padding: 1px;
  }

  .knob-name {
    font-size: 6.6px;
  }

  .knob-value b {
    font-size: 10px;
  }

  .knob-value i {
    font-size: 6.4px;
  }

  .feet {
    padding-top: 0;
  }

  .foot {
    gap: 3px;
  }

  .foot-title {
    font-size: 6.6px;
    letter-spacing: 0.12em;
  }

  .pedal-foot {
    gap: 4px;
    padding-top: 2px;
  }

  .chip {
    height: 20px;
  }

  .stage-bar {
    row-gap: 6px;
  }

  .stage-bar .site-brand-logo {
    width: 88px;
  }

  .stage-bar .site-brand-caption {
    font-size: 6px;
    letter-spacing: 0.24em;
  }

  .stage-bar .theme-toggle {
    width: 30px;
    height: 30px;
  }

  .stage-bar .theme-toggle svg {
    width: 13px;
    height: 13px;
  }

  .stage-note {
    font-size: 8.4px;
    letter-spacing: 0.04em;
  }
}

/* Abaixo de 600 px de altura não sobra linha para a frequência detectada e a
   do alvo: ficam a nota, o desvio e a faixa de dados, que já trazem o resto. */
@media (max-width: 470px) and (max-height: 600px) {
  .pitch-sub {
    display: none;
  }

  .pedal-foot {
    padding-top: 0;
  }
}
