/* ============================================================================
 * Tuner — Stimmgerät als eigenständige Seite, Plasma-Pedal-Anklang
 * ========================================================================= */

/* Page-Modus: Tuner-Pedal sitzt zentriert mit Margin oben, FX-Panel
   klappt nach links auf (via fx-open). Auf Mobile (max-width: 920px)
   wird Tuner & Panel responsive umgebaut. */
.tuner-page-root {
  position: relative;
  width: 400px;
  height: 600px;
  margin: 60px auto 40px;
  font-family: var(--mono);
  color: var(--paper);
  perspective: 1000px;
}

/* Alte Popover-Klasse wird vom JS nicht mehr gesetzt, aber als
   Fallback-Layout kompatibel halten. */
.tuner-popover {
  position: relative;
  width: 400px;
  height: 600px;
  margin: 60px auto 40px;
  font-family: var(--mono);
  color: var(--paper);
  perspective: 1000px;
}

/* ---- Pedal-Korpus ---- */

.tuner-pedal {
  position: relative;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,255,255,0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-1) 0%, var(--ink-0) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 0 0 1px rgba(0,0,0,0.4),
    0 20px 60px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tuner-bezel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 18px;
  position: relative;
  min-height: 0;       /* erlaubt Flex-Children Schrumpfen, statt zu overflowen */
}

/* ---- Display (oberer Bereich, Flip-Container) ---- */

.tuner-display {
  position: relative;
  width: 100%;
  height: 360px;        /* groesser geworden — enthaelt jetzt zusaetzlich Mini-Plasma + Knob */
  margin-bottom: 16px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.7, 0, .3, 1);
}
.tuner-display.is-flipped {
  transform: rotateX(180deg);
}

.tuner-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background:
    radial-gradient(ellipse 90% 100% at 50% 50%, rgba(20,28,42,0.7) 0%, var(--ink-0) 80%),
    var(--ink-0);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 0 0 1px rgba(0,0,0,0.5) inset,
    0 0 20px rgba(0,0,0,0.6) inset;
  padding: 54px 18px 14px;  /* oben Platz fuer Pedal-Knopf */
  display: flex;
  flex-direction: column;
}
.tuner-face-plasma {
  transform: rotateX(180deg);
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(40,56,88,0.5) 0%, var(--ink-0) 75%),
    var(--ink-0);
}

/* ---- Note-Anzeige (groß, oben mittig) ---- */

.tuner-note {
  text-align: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 50px;
  line-height: 1;
  color: var(--paper);
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 6px;
  user-select: none;
}
.tuner-note-name { letter-spacing: -0.02em; }
.tuner-note-oct {
  font-size: 22px;
  vertical-align: super;
  margin-left: 2px;
  color: var(--grey-3);
  font-style: italic;
}

/* ---- LED-Trio (Triangle, abgerundete Ecken) ---- */

.tuner-leds {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 6px;
  height: 22px;
}
.tuner-led {
  width: 18px;
  height: 16px;
  display: inline-block;
  background: rgba(60, 60, 60, 0.4);
  /* Triangle, abgerundete Ecken via clip-path */
  border-radius: 2px;
  transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
  position: relative;
}
.tuner-led-l { clip-path: polygon(100% 0, 100% 100%, 0 50%); }
.tuner-led-r { clip-path: polygon(0 0, 0 100%, 100% 50%); }
.tuner-led-c {
  /* Mitte: rundes Pad — In-Tune-Indikator */
  width: 18px;
  height: 18px;
  border-radius: 50%;
  clip-path: none;
}
.tuner-led.is-on.is-soft   { background: rgba(220, 150, 70, 0.55); box-shadow: 0 0 6px rgba(220, 150, 70, 0.4); }
.tuner-led.is-on.is-strong { background: rgba(230, 130, 60, 0.95); box-shadow: 0 0 10px rgba(230, 130, 60, 0.7); }
.tuner-led.is-on.is-tune   {
  background: rgba(140, 220, 170, 0.95);
  box-shadow: 0 0 12px rgba(140, 220, 170, 0.7);
}

/* ---- Skala (SVG) ---- */

.tuner-scale {
  width: 100%;
  height: auto;
  max-height: 140px;
  display: block;
  margin-top: 6px;
}

.tuner-cents-readout {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--grey-3);
  margin-top: 4px;
  min-height: 14px;
}

/* ---- Mini-Plasma direkt unter der Skala ---- */
.tuner-mini-plasma {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0; padding: 0;
}

/* ---- Pedal-Drucktaster — toggled Plasma-Ansicht ----
   Sitzt oben in der Stimmanzeige, rechteckig im Effekt-Pedal-Stil
   (gefraester Plate-Look mit oberem Highlight und unterem Schatten). */
.tuner-knob {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 30px;
  border: 1px solid #08090b;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #45464a 0%, #2a2b2f 45%, #16171a 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,    /* top highlight */
    0 -1px 0 rgba(0,0,0,0.5) inset,           /* bottom inset shadow */
    0 1px 0 rgba(255,255,255,0.06),           /* below-edge subtle separator */
    0 2px 3px rgba(0,0,0,0.55);               /* drop shadow */
  cursor: pointer;
  padding: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s, color 0.12s, background 0.15s;
  /* Plate plate "engraving" effect: an inner "engraved" rectangle is the label */
}
.tuner-knob > span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--grey-3);
  text-shadow: 0 1px 0 rgba(0,0,0,0.65);
}
.tuner-knob:hover > span { color: var(--paper); }
.tuner-knob:active {
  transform: translateX(-50%) translateY(1px);
  background: linear-gradient(180deg, #2a2b2f 0%, #16171a 60%, #0c0d10 100%);
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(0,0,0,0.6) inset,
    0 0 2px rgba(0,0,0,0.5);
}
.tuner-knob.is-active {
  background:
    linear-gradient(180deg, #2a3548 0%, #1a2236 45%, #0e1320 100%);
  box-shadow:
    0 1px 0 rgba(170,200,255,0.25) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 0 6px rgba(120,160,220,0.4),
    0 2px 3px rgba(0,0,0,0.55);
}
.tuner-knob.is-active > span {
  color: rgba(200, 220, 255, 0.95);
  text-shadow: 0 0 4px rgba(170, 200, 255, 0.65);
}
.tuner-knob:focus-visible { outline: 1px solid var(--paper); outline-offset: 3px; }

/* ---- Plasma-Face ---- */

.tuner-face-plasma .tuner-note {
  font-size: 48px;
  color: rgba(220, 230, 255, 0.92);
  text-shadow: 0 0 12px rgba(170, 200, 255, 0.4);
}
.tuner-plasma {
  width: 100%;
  height: auto;
  margin-top: 18px;
}
.tuner-plasma-label {
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-top: 14px;
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
}
.tuner-face-plasma.is-in-tune .tuner-plasma-label {
  opacity: 1;
  color: rgba(140, 220, 170, 0.95);
  text-shadow: 0 0 8px rgba(140, 220, 170, 0.5);
}

/* ---- Saiten-Reihe ----
   Kleine Quadrate direkt unter dem Display, eine pro Saite der gewaehlten
   Stimmung. Hervorgehoben wenn der aktuell gespielte Ton dieser Saite
   zuzuordnen ist. */
.tuner-strings {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 0;
}
.tuner-strings:empty { display: none; }
.tuner-string-square {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(8, 10, 14, 0.6);
  border: 1px solid var(--line);
  font-family: var(--mono);
  color: var(--grey-3);
  transition: color 0.12s, border-color 0.12s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}
.tuner-string-square b {
  color: var(--paper);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1;
  font-family: var(--serif);
}
.tuner-string-square.is-active {
  border-color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 6px rgba(255,255,255,0.08);
}
.tuner-string-square.is-active b { color: var(--paper); }

/* ---- Controls (Mode-Selector + Tuning) ----
   margin-top: auto sorgt dafuer, dass die Controls am unteren Rand des
   Bezels sitzen, direkt ueber der Footer-Linie — Display nimmt den Rest. */

.tuner-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.tuner-mode-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tuner-tuning-row {
  display: flex;
  gap: 8px;
}
.tuner-tuning-row .tuner-tuning { flex: 1; }

.tuner-mode-btn,
.tuner-inst,
.tuner-tuning {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-3);
  background: rgba(8, 10, 14, 0.6);
  border: 1px solid var(--line);
  padding: 7px 12px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.tuner-mode-btn:hover,
.tuner-inst:hover,
.tuner-tuning:hover { color: var(--paper); border-color: var(--line-strong); }
.tuner-mode-btn.is-active {
  color: var(--paper);
  border-color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}
.tuner-tuning:disabled { opacity: 0.35; cursor: not-allowed; }
.tuner-inst { flex: 1; min-width: 0; }
.tuner-mode-btn { flex: 0 0 auto; }

/* ---- Foot (Brand + Close) ---- */

.tuner-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.3));
}
.tuner-foot-brand {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--grey-2);
}
.tuner-close-btn {
  background: none;
  border: none;
  color: var(--grey-3);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 6px;
  border-bottom: 1px dotted var(--grey-2);
  transition: color 0.15s, border-color 0.15s;
}
.tuner-close-btn:hover { color: var(--paper); border-color: var(--paper); }

/* ---- Mic-Permission-Overlay ---- */

.tuner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px;
  z-index: 10;
  transition: opacity 0.3s, visibility 0.3s;
}
.tuner-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.tuner-overlay-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--paper-soft);
  text-align: center;
  max-width: 300px;
}
.tuner-mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--paper);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.tuner-mic-btn:hover { background: rgba(255, 255, 255, 0.06); }
.tuner-mic-btn:active { transform: translateY(1px); }
.tuner-mic-btn:disabled { opacity: 0.5; cursor: wait; }
.tuner-mic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(230, 130, 60, 0.9);
  box-shadow: 0 0 6px rgba(230, 130, 60, 0.6);
  animation: tunerMicPulse 1.6s ease-in-out infinite;
}
@keyframes tunerMicPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ============================================================================
 * FX-Settings-Panel — Compressor (1176-Stil), EQ, YIN, Oszilloskop
 * ========================================================================= */

/* Trigger-Pfeil oben links im Tuner-Pedal */
.tuner-fx-toggle {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: var(--grey-3);
  cursor: pointer;
  padding: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.18s;
}
.tuner-fx-toggle svg { width: 12px; height: 12px; }
.tuner-fx-toggle:hover { color: var(--paper); }
.tuner-fx-toggle.is-open { transform: rotate(180deg); color: var(--paper); }

/* Tuner-Popover: erlaubt FX-Panel als Sibling auszubrechen (overflow:visible) */
.tuner-popover { overflow: visible; }

/* FX-Panel: sitzt absolute LINKS NEBEN dem Tuner. Auf Mobile als Overlay. */
.tuner-fx-panel {
  position: absolute;
  top: 0;
  right: calc(100% + 12px);
  width: 480px;
  /* Eigene Hoehe unabhaengig vom Tuner-Popover (das wieder 600px ist).
     FX-Panel waechst nach unten so lang wie Inhalt + cap an Viewport. */
  height: auto;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background:
    linear-gradient(180deg, #0c0d10 0%, #06070a 100%);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tuner-page-root.fx-open .tuner-fx-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.fx-section {
  background:
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(255,255,255,0.012) 2px 3px),
    linear-gradient(180deg, #16161a 0%, #0a0a0c 100%);
  border: 1px solid #000;
  border-radius: 3px;
  padding: 12px 14px 14px;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 0 0 1px rgba(0,0,0,0.5);
}
.fx-section::before, .fx-section::after {
  /* Eck-Schrauben — dezente Kreise */
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #888 0%, #333 50%, #111 100%);
  box-shadow: 0 0 1px rgba(0,0,0,0.8);
}
.fx-section::before { top: 4px; left: 4px; }
.fx-section::after { top: 4px; right: 4px; }

.fx-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding: 0 6px;
}
.fx-section-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper);
}
.fx-brand {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.fx-plate {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-around;
  padding: 4px 0;
}

/* ---- Knob ---- */
.fx-knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fx-knob-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-3);
}
.fx-knob-value {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  color: var(--paper);
  min-height: 11px;
}
.fx-knob-svg {
  cursor: ns-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.fx-knob-cap {
  fill: url(#fxKnobGrad);  /* fallback via attr */
  fill: radial-gradient(circle at 35% 30%, #d8d8d4, #6a6a6a 60%, #2a2a2a 100%);
  /* SVG kennt keinen radial-gradient via fill direkt — wir simulieren mit
     mehreren circles oder benutzen filter; hier: Solid silver mit shadow. */
  fill: #aaa;
  stroke: #000;
  stroke-width: 0.5;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
}
.fx-knob-tick { stroke: #222; stroke-width: 1.5; stroke-linecap: round; }
.fx-knob-tick-mark { stroke: rgba(237,237,234,0.45); stroke-width: 0.8; }
.fx-knob-tick-label {
  font-family: var(--mono);
  font-size: 5.5px;
  fill: rgba(237,237,234,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Ratio Buttons (1176 style) ---- */
.fx-ratio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fx-ratio-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fx-ratio-btn {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  background: linear-gradient(180deg, #3a3a3e 0%, #1a1a1d 100%);
  border: 1px solid #000;
  color: var(--grey-3);
  cursor: pointer;
  min-width: 38px;
  text-align: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset;
}
.fx-ratio-btn:hover { color: var(--paper); }
.fx-ratio-btn.is-active {
  background: linear-gradient(180deg, #1a2236 0%, #0a1020 100%);
  color: rgba(200, 220, 255, 0.95);
  box-shadow:
    0 -1px 0 rgba(0,0,0,0.6) inset,
    0 1px 0 rgba(170,200,255,0.15) inset;
}

/* ---- VU Meter ---- */
.fx-vu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fx-vu-svg {
  background:
    radial-gradient(ellipse 90% 100% at 50% 60%, rgba(20,28,42,0.7) 0%, var(--ink-0) 80%),
    var(--ink-0);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 0 0 1px rgba(0,0,0,0.5) inset,
    0 0 8px rgba(0,0,0,0.5) inset;
}

/* ---- Switch (Autogain) ---- */
.fx-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.fx-switch input { display: none; }
.fx-switch-track {
  position: relative;
  width: 28px;
  height: 14px;
  background: #0a0a0d;
  border: 1px solid #000;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 -1px 0 rgba(0,0,0,0.5) inset;
}
.fx-switch-thumb {
  position: absolute;
  top: 1px; left: 1px;
  width: 10px; height: 10px;
  background: linear-gradient(180deg, #aaa, #555);
  border-radius: 50%;
  transition: left 0.18s, background 0.18s;
}
.fx-switch.is-on .fx-switch-thumb { left: 15px; background: linear-gradient(180deg, #a0d4ff, #4080c0); }
.fx-switch-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-3);
}
.fx-switch.is-on .fx-switch-label { color: var(--paper); }

/* ---- Slider (YIN + Mobile) ---- */
.fx-yin-sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 6px;
}
.fx-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.fx-slider-label { color: var(--grey-3); }
.fx-slider-value { color: var(--paper); }
.fx-slider input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(237,237,234,0.12);
  outline: none;
  margin-top: 4px;
}
.fx-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ededea;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.fx-slider input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ededea;
  cursor: pointer;
  border: none;
}

/* ---- LED-Pegel-Meter ---- */
.fx-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fx-meter-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-3);
}
.fx-meter-segs {
  display: flex;
  flex-direction: column-reverse; /* bottom = erstes Kind */
  gap: 1px;
  padding: 2px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(0,0,0,0.85);
  border-radius: 2px;
  width: 12px;
  flex: 1;
  min-height: 60px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 -1px 0 rgba(0,0,0,0.6) inset;
}
.fx-meter-seg {
  flex: 1;
  display: block;
  background: rgba(0,0,0,0.7);
  border-radius: 1px;
  transition: background 0.04s, box-shadow 0.04s;
  min-height: 3px;
}
.fx-meter-seg.lit.green { background: #4ec880; box-shadow: 0 0 3px rgba(78,200,128,0.55); }
.fx-meter-seg.lit.yellow { background: #d8c84a; box-shadow: 0 0 3px rgba(216,200,74,0.55); }
.fx-meter-seg.lit.orange { background: #e89a4a; box-shadow: 0 0 3px rgba(232,154,74,0.55); }
.fx-meter-seg.lit.red { background: #e85040; box-shadow: 0 0 4px rgba(232,80,64,0.65); }
.fx-meter-seg.peak.green { background: rgba(78,200,128,0.4); }
.fx-meter-seg.peak.yellow { background: rgba(216,200,74,0.4); }
.fx-meter-seg.peak.orange { background: rgba(232,154,74,0.4); }
.fx-meter-seg.peak.red { background: rgba(232,80,64,0.4); }

/* ---- Tuner-Bezel-Meter (rechte Seite des Display-Bereichs im Tuner) ----
   Sitzt im rechten Padding-Bereich des Bezels — gerade noch innerhalb der
   Pedal-Border, ohne das Display zu ueberlagern. Vertikal vom oberen Knopf
   bis knapp ueber die Saiten/Controls. */
.tuner-bezel-meter {
  /* Sitzt LINKS — zeigt das Input-Signal in den YIN, dem Pendant zum
     "IN"-Meter im FX-Panel. Spannt nur den inneren Anzeigebereich
     (Note → Mini-Plasma), nicht den Controls-Bereich.
     Standard versteckt — wird nur sichtbar wenn das FX-Panel offen ist
     (sonst gehoert das LED-Meter visuell nicht zum reinen Tuner-Modus). */
  position: absolute;
  left: 2px;
  top: 80px;
  height: 270px;
  width: 18px;
  z-index: 6;
  display: none;
  flex-direction: column;
}
.tuner-page-root.fx-open .tuner-bezel-meter {
  display: flex;
}
.tuner-bezel-meter .fx-meter {
  height: 100%;
  width: 100%;
  gap: 2px;
}
.tuner-bezel-meter .fx-meter-segs {
  width: 14px;
  flex: 1;
}
.tuner-bezel-meter .fx-meter-label {
  font-size: 7px;
  letter-spacing: 0.18em;
}

/* ---- Scope ---- */
.fx-scope-section {
  background:
    linear-gradient(180deg, #0c0d10 0%, #06070a 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px 12px;
}
.fx-scope-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 8px;
}
.fx-scope-legend {
  font-size: 8px;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fx-scope-dot {
  display: inline-block;
  width: 8px; height: 2px;
  margin-right: 2px;
}
.fx-scope-dot.pre { background: rgba(170, 200, 235, 0.45); }
.fx-scope-dot.post { background: rgba(220, 235, 255, 0.85); }
.fx-scope-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.fx-scope-row .fx-meter { height: 100px; }
.fx-scope-row > .fx-scope-meter { display: flex; flex-direction: column; }
.fx-scope-row > .fx-scope-meter > .fx-meter { width: 100%; height: 100%; }
.fx-scope-pregain {
  display: flex;
  align-items: center;
}
.fx-scope {
  flex: 1;
  width: 100%;
  height: auto;
  display: block;
  min-width: 0;
}

/* ---- Vertikaler Mini-Schieberegler ---- */
.fx-vslider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  user-select: none;
  -webkit-user-select: none;
}
.fx-vslider-label {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-3);
}
.fx-vslider-track {
  position: relative;
  width: 2px;
  background: rgba(237,237,234,0.18);
  cursor: ns-resize;
  margin: 2px 8px;
}
.fx-vslider-thumb {
  position: absolute;
  left: -7px;
  width: 16px;
  height: 3px;
  background: var(--paper);
  box-shadow: 0 0 4px rgba(255,255,255,0.35);
  pointer-events: none;
}
.fx-vslider-value {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--paper);
  min-height: 10px;
}

/* ---- Mobile-Layout: FX-Panel als Overlay ueber dem Tuner ---- */
@media (max-width: 920px) {
  .tuner-fx-panel {
    right: auto;
    left: 0;
    width: 100%;
    max-height: 100%;
    /* Verbergt Plates auf Mobile — nur Sliders + Scope */
  }
  .tuner-fx-panel .fx-plate {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .tuner-fx-panel .fx-knob,
  .tuner-fx-panel .fx-ratio-wrap,
  .tuner-fx-panel .fx-vu,
  .tuner-fx-panel .fx-switch {
    /* Verstecken — Mobile zeigt nur Slider */
  }
}

@media (max-width: 480px) {
  .tuner-page-root,
  .tuner-popover {
    width: calc(100vw - 24px);
    margin: 24px auto;
  }
}
