/* ============================================================
   SUBTAKT — studio.css
   Nur das Browser-Studio (/studio/, /en/studio/): App-Layout,
   Geräte, Ebenen, GlitchButler-Gerät.
   Lädt NACH style.css und nutzt deren Tokens (:root) und Grundlagen;
   eigene Tokens nur unter .st-app. Alles, was andere Seiten
   brauchen (z. B. .rack-more), bleibt in style.css.
   ============================================================ */

/* ---------- Studio (App-Layout) ----------
   Das Studio füllt das Fenster: Kopfleiste, links die Spuren, in der Mitte das Raster, darunter das Geräte-Feld.
   Ab 1024 × 640 passt alles ohne Seiten-Scrollen; Bereiche, die mehr brauchen, scrollen für sich.
   Unter 1024 px: eine Spalte mit Reitern «Spuren · Raster · Gerät», die Seite darf scrollen. */
@media (min-width: 861px) {
  .cards.is-three .card { grid-column: span 2; }
  .cards.is-three .card h3 { font-size: 1.22rem; letter-spacing: -0.018em; }
}
.theme-studio { scroll-padding-top: 0; }
.theme-studio main { padding-top: 0; }
.st-app section { padding-block: 0; }
.studio { position: relative; }
.studio:not(.is-ready) {
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft) 62%);
}
.studio-wait, .studio-fail { margin: 0; color: var(--text-mute); }
.studio-fail, .studio.is-failed .studio-wait { display: none; }
.studio.is-failed .studio-fail { display: block; }
.studio-nojs { display: none; }
html:not(.js) .studio-nojs { display: block; margin: 24px var(--gutter) 0; }

/* Text unterhalb der App (für Suchmaschinen und Neugierige) */
.studio-about { padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 64px); border-top: 1px solid var(--border); }
.studio-about .claim { margin: 0 0 8px; color: var(--accent-hi); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.studio-about .studio-title { margin: 0 0 10px; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 720; }
.studio-about .hero-sub { margin: 0 0 28px; max-width: 66ch; font-size: clamp(0.98rem, 1.25vw, 1.08rem); color: var(--text-dim); }
.studio-about .rack-note { margin-top: 26px; }

/* ---------- Studio-Skala (W3, 12/2026) ----------
   Ein System statt Einzelwerte. Globale Tokens kommen aus style.css (:root, Block «Skala»); hier nur die dichten
   Studio-Stufen und die Studio-Farben. Neue Regeln bitte nur hieraus bauen.
   Schrift  11 / 12 / 13 / 15 / 18 px: --fs-2xs · --fs-xs · --fs-st-md · --fs-st-lg · --fs-st-xl (nichts unter 11 px)
   Gewicht  400 / 560 / 650: --fw-regular · --fw-medium · --fw-semi
   Radius   3 (Zellen) / 6 (Bedienelemente) / 10 (Felder, Ebenen) / Pille: --r-2xs · --r-xs · --r-sm · --r-pill (Kreis 50 %)
   Abstand  2/4/6/8/12/16/24: --st-1 … --st-7
   Höhe     --ctl 32 px je Leiste (Play --ctl-play 40 px rund); Telefon/grober Zeiger --hit 44 px
   Farbe    Orange (--accent) = primäre Aktion, Fokus, Abspielmarke. Auswahl neutral (--sel/--on-sel). Spurfarben nur
            für Spurinhalt. Gefahr --danger, Aufnahme --rec, an/ok --ok, Stumm/Warnung --warn.
   Breiten  1600 · 1360 · 1220 · 1100 · 1024 (JS: 1023.98) · 760 (JS) · 480 · 420 */
.st-app {
  /* Schrift (11 und 12 px aus style.css) */
  --fs-st-md: .8125rem;   /* 13 px: Grundschrift, Knöpfe, Menüs */
  --fs-st-lg: .9375rem;   /* 15 px: Namen, Titel */
  --fs-st-xl: 1.125rem;   /* 18 px: Zeichen, Dialogtitel */
  /* Abstände */
  --st-1: 2px; --st-2: 4px; --st-3: 6px; --st-4: 8px; --st-5: 12px; --st-6: 16px; --st-7: 24px;
  /* Höhen */
  --ctl: 32px;
  --ctl-play: 40px;
  --hit: 24px;
  --st-off: 0.4;               /* gesperrt (disabled) */
  --st-press: scale(0.97);     /* gedrückt (:active) */
  /* Flächen und Linien (Studio): Ebenen = --surface-3 aus style.css */
  --st-bg-hi: var(--surface);
  --st-bar-bg: var(--surface);
  --st-panel-bg: var(--surface-1);
  --st-well: #090b0f;
  --sel: var(--text);          /* gewählt: helle Fläche … */
  --on-sel: #0c0d11;           /* … dunkle Schrift */
  --on-color: #0c0d11;         /* Schrift auf farbigen Flächen (Spur, Gruppe, Warnung) */
  --white: #fff;
  --shadow-drop: #000;
  --thumb: #e9ebef;
  --knob-hi: #333946;
  --knob-lo: #171a21;
  /* Raster (U-15): leere Zelle, Zellkante, Viertel-/Taktlinie, Lineal */
  --cell: rgba(255, 255, 255, 0.075);
  --cell-alt: rgba(255, 255, 255, 0.115);
  --cell-root: rgba(255, 255, 255, 0.15);
  --cell-hover: rgba(255, 255, 255, 0.22);
  --cell-edge: rgba(255, 255, 255, 0.07);
  --grid-six: rgba(255, 255, 255, 0.16);
  --grid-beat: rgba(255, 255, 255, 0.38);
  --tick: var(--text-mute);
  /* Spurfarben (nur Spurinhalt) */
  --c-drums: #ff6f4a;
  --c-bass: #ffa62e;
  --c-lead: #6fa8ff;
  --c-keys: #3ddcbb;
  --c-glitch: #d27bff;
  /* Drum-Gruppen (Zeilen, Pads) */
  --g-low: #ff6f4a;
  --g-hit: #ffc24d;
  --g-air: #58d0e6;
  --g-fx: #b28dff;
  /* Pattern-Gruppen A–D, E–H, I–L, M–P: bewusst andere Töne als die Spuren, nur als schmaler Strich */
  --pg-1: #e9cf7a;
  --pg-2: #93aec4;
  --pg-3: #9fd58a;
  --pg-4: #e79cc0;
  /* SLICE-Bausteine je Spur */
  --sl-order: var(--accent-hi);
  --sl-loop: var(--accent);
  --sl-shape: var(--steel-hi);
  --sl-filter: #7fd1bf;
  --sl-fxa: #c3a6ff;
  --sl-fxb: #f0a3c8;
  /* Ebenen innerhalb von Bauteilen (global: --z-sticky 5, --z-head 20, --z-drop 30, --z-menu 80, --z-pop 85,
     --z-toast 90, --z-modal 100) */
  --z-raise: 1; --z-lift: 2; --z-float: 3; --z-handle: 4; --z-overlay: 6;
  --p: var(--c-drums);
  --side: 244px;
  --bar: 56px;
  --panel: clamp(200px, 34vh, 312px);
  --lab: 78px;
  --line: var(--line-1);
  --well: rgba(0, 0, 0, 0.22);
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  font-size: var(--fs-st-md);
  line-height: 1.4;
  background: linear-gradient(180deg, var(--st-bg-hi), var(--bg-soft) 40%);
}
/* Fett nur in einer Stufe: Überschriften, strong und b ohne eigene Regel (Spezifität 0, eigene Regeln gewinnen) */
:where(.st-app) :where(strong, b, th) { font-weight: var(--fw-semi); }
/* schlägt die Seiten-Überschriften aus style.css (h2 28 px fett, h3 mit Laufweite und Abstand): jede Überschrift der
   App (Spalten, Dialoge, Hilfe, Felder, Leerzustände) startet auf der Studio-Skala; Bauteile setzen ihre Stufe selbst */
.st-app :where(h1, h2, h3, h4, h5) { margin: 0; font-size: var(--fs-st-md); font-weight: var(--fw-semi); line-height: var(--lh-snug); letter-spacing: normal; text-wrap: wrap; }
:where(.st-app) :where(button, input, select, textarea) { font-family: inherit; }
@supports (color: color-mix(in srgb, red, blue)) { .st-app { --p-soft: color-mix(in srgb, var(--p) 14%, transparent); --p-line: color-mix(in srgb, var(--p) 42%, transparent); --p-glow: color-mix(in srgb, var(--p) 34%, transparent); } }
.st-app[data-track="bass"] { --p: var(--c-bass); }
.st-app[data-track="lead"] { --p: var(--c-lead); }
.st-app[data-track="keys"] { --p: var(--c-keys); }
.st-app[data-track="glitch"] { --p: var(--c-glitch); }
.st-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
.st-app [hidden] { display: none !important; }
.st-appbar { grid-row: 1; }
.st-views { grid-row: 2; }
.st-notices { grid-row: 3; }
.st-body { grid-row: 4; }
.st-grow { flex: 1 1 auto; }

/* ---------- Grundbauteile ---------- */
.st-ic { display: inline-grid; flex: 0 0 auto; width: 16px; height: 16px; }
.st-ic svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.st-field { display: inline-flex; flex-direction: column; gap: 3px; }
.st-field > span, .st-mini {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-mute);
}
/* C2: kleine Feldtitel in Geräten normal geschrieben (keine Versalien, ruhiger zu lesen) */
.st-mini { letter-spacing: 0.02em; text-transform: none; }
.st-input, .st-select {
  height: var(--ctl);
  padding: 0 10px;
  font-family: inherit;
  font-size: var(--fs-st-md);
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  transition: border-color var(--dur-1), background-color var(--dur-1);
}
.st-input:hover, .st-select:hover { border-color: var(--border-2); }
.st-input:focus { border-color: var(--accent); background-color: rgba(255, 255, 255, 0.08); }
.st-input::placeholder { color: var(--text-mute); }
/* Zahlenfeld: ohne native Spinner (B-29), mindestens drei Ziffern sichtbar (B-30) */
.st-num { width: 58px; min-width: calc(3ch + 18px); padding: 0 6px 0 9px; font-family: var(--mono); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.st-num::-webkit-inner-spin-button, .st-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.st-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 24px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23adb4c1' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.st-select option { color: var(--on-sel); background: var(--white); }
.st-select:disabled { opacity: var(--st-off); cursor: not-allowed; }

.st-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--ctl);
  height: var(--ctl);
  padding: 0 7px;
  font-size: var(--fs-st-md);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.st-tool:hover:not(:disabled) { color: var(--text); border-color: var(--border-2); background: rgba(255, 255, 255, 0.08); }
.st-tool:active:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.st-tool:disabled { opacity: var(--st-off); cursor: default; }
.st-tool.has-text { padding: 0 10px 0 8px; }
.st-tool[aria-expanded="true"] { color: var(--text); border-color: var(--border-2); background: rgba(255, 255, 255, 0.1); }
.st-tool[aria-busy="true"] { cursor: progress; }
.st-tool[aria-busy="true"] .st-ic { animation: stBlink 0.9s ease-in-out infinite alternate; }
.st-tool.is-hot { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.st-tool.is-hot:hover:not(:disabled) { color: var(--on-accent); background: var(--accent-hi); border-color: transparent; }
/* Hauptwerkzeug der Spur (Würfeln): hervorgehoben, aber neutral (Spurfarben nur für Inhalt) */
.st-tool.is-key { color: var(--text); border-color: var(--line-3); background: rgba(255, 255, 255, 0.09); }
.st-tool.is-key:hover:not(:disabled) { border-color: var(--text-mute); background: rgba(255, 255, 255, 0.13); }
.st-tool.has-more { color: var(--text); border-color: var(--line-3); }
.st-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.st-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--ctl);
  padding: 0 12px;
  font-size: var(--fs-st-md);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
a.st-chip { text-decoration: none; }
.st-chip:hover { color: var(--text); border-color: var(--border-2); }
.st-chip[aria-pressed="true"] { color: var(--on-sel); background: var(--text); border-color: transparent; }
.st-chip[aria-disabled="true"] { opacity: var(--st-off); cursor: progress; }
.st-chip:disabled { opacity: var(--st-off); cursor: default; }
/* Gefahr: Text in --danger, gefüllt nur im Bestätigungs-Dialog (B-20) */
.st-chip.is-danger, .st-pp.is-danger { color: var(--danger); border-color: rgba(255, 107, 90, 0.4); }
.st-chip.is-danger:hover, .st-pp.is-danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(255, 107, 90, 0.1); }
.st-chip.is-strong { color: var(--on-accent); background: var(--accent); border-color: transparent; font-weight: var(--fw-semi); }
.st-chip.is-strong:hover { color: var(--on-accent); background: var(--accent-hi); }
.st-chip .st-ic, .st-chip .st-ic svg { width: 14px; height: 14px; }
.st-help { margin: 8px 0 0; font-size: var(--fs-st-md); line-height: 1.45; color: var(--text-mute); }
.st-sep { width: 1px; height: 20px; margin: 0 3px; background: var(--border-2); }
/* Segment-Schalter: Hülle --ctl hoch (2 px Polster + 1 px Rand), innen 26 px */
.st-app .seg { flex-wrap: nowrap; padding: 2px; border-radius: var(--r-xs); }
.st-app .seg-btn { position: relative; min-height: calc(var(--ctl) - 6px); padding: 0 10px; font-size: var(--fs-xs); font-weight: var(--fw-medium); border-radius: var(--r-2xs); transition: color var(--dur-1), background var(--dur-1); }
.st-app .seg-btn:disabled { opacity: var(--st-off); cursor: default; }
.st-app .tgl { font-size: var(--fs-st-md); font-weight: var(--fw-medium); border-radius: var(--r-xs); }
.st-ms {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  color: var(--text-mute);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: color var(--dur-1), background var(--dur-1);
}
.st-ms:hover { color: var(--text); border-color: var(--border-2); }
.st-ms[aria-pressed="true"] { color: var(--on-color); background: var(--warn); border-color: transparent; }
.st-ms.is-solo[aria-pressed="true"] { background: var(--ok); }
.st-ms .st-ic, .st-ms .st-ic svg { width: 14px; height: 14px; }
.st-ms:disabled, .st-ms[aria-disabled="true"] { opacity: var(--st-off); cursor: default; }
/* Zustände einheitlich: gedrückt gibt Rückmeldung, Fokus kommt global von .st-app :focus-visible */
.st-app :is(.st-tool, .st-chip, .st-ms, .st-pb, .st-pp, .st-ptab, .st-view, .snd-tab, .seg-btn, .st-rec, .st-play, .st-add, .kit-pad, .gl-tile, .sl-act, .sl-stage):active:not(:disabled):not([aria-disabled="true"]) { transform: var(--st-press); }
@keyframes stBlink { from { opacity: 1; } to { opacity: 0.25; } }

/* schlanker Schieberegler (Pegel), gleich in Spurliste und Mixer */
.st-app .st-vol, .st-app .st-fader { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.st-app .st-vol { display: block; width: 100%; min-width: 0; max-width: 100%; height: 24px; }
.st-app .st-vol::-webkit-slider-runnable-track { height: 3px; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.14); }
.st-app .st-vol::-moz-range-track { height: 3px; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.14); }
.st-app .st-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: var(--thumb); border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.st-app .st-vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--thumb); border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.st-app .st-vol:focus-visible { outline-offset: 0; }

/* ---------- Kopfleiste ---------- */
.st-appbar {
  position: relative;
  z-index: var(--z-head);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--bar);
  padding: 0 12px;
  background: var(--st-bar-bg);
  border-bottom: 1px solid var(--border);
}
.st-grp { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.st-grp + .st-grp::before { content: ""; width: 1px; height: 22px; margin-right: 4px; background: var(--line); }
.st-g-out::before { display: none; }
.st-logo { display: inline-grid; place-items: center; width: var(--ctl); height: var(--ctl); flex: 0 0 auto; border-radius: var(--r-xs); }
.st-logo .st-ic, .st-logo .st-ic svg { width: 28px; height: 28px; }
.st-logo .st-ic svg { stroke: none; }
/* Play: der eine bewusste Ausreisser, 40 px rund in jeder Breite; die Beschriftung bleibt für Bildschirmleser */
.st-play {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--ctl-play);
  height: var(--ctl-play);
  padding: 0;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px -12px var(--accent-glow);
  transition: background var(--dur-1);
}
.st-play:hover { background: var(--accent-hi); }
.st-play[aria-pressed="true"] { background: var(--white); }
.st-play-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.88); color: var(--accent); }
.st-play[aria-pressed="true"] .st-play-ic { color: var(--white); }
.st-play[aria-busy="true"] { cursor: progress; }
.st-play[aria-busy="true"] .st-play-ic { animation: stBlink 0.9s ease-in-out infinite alternate; }   /* Kits werden gerechnet */
.st-play svg { width: 14px; height: 14px; display: block; }
.st-play-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-rec {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: var(--ctl);
  padding: 0 13px;
  font-size: var(--fs-st-md);
  font-weight: var(--fw-semi);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.st-rec:hover { color: var(--text); border-color: var(--border-2); }
.st-rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); }
.st-rec[aria-pressed="true"] { color: var(--white); border-color: var(--rec); background: rgba(229, 72, 77, 0.18); }
.st-rec[aria-pressed="true"] i { box-shadow: 0 0 10px var(--rec); animation: stBlink 1s steps(2, jump-none) infinite; }
.st-count {
  display: inline-grid;
  place-items: center;
  width: var(--ctl);
  height: var(--ctl);
  font-size: var(--fs-st-xl);
  font-weight: var(--fw-semi);
  color: var(--white);
  background: var(--rec);
  border-radius: 50%;
}
.st-unit { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.1em; color: var(--text-mute); }
.st-tap { min-width: 38px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.05em; text-transform: uppercase; }
.st-tap.is-tap { border-color: var(--text); color: var(--text); }
/* N-ST-02: Tonart und Tonleiter zeigen jeden Wert ganz (Tonart ein Name wie «C♯» ~18 px, «Mixolydisch» ~71 px,
   je 13 px); schmaleres Innenmass statt Kürzen, damit die Kopfleiste nicht umbricht */
.st-key { width: 56px; }
.st-scale { width: 108px; }
.st-key, .st-scale { padding-left: 8px; padding-right: 20px; }
.st-g-pat { gap: 6px; }
.st-g-name { flex: 1 1 120px; min-width: 96px; gap: 8px; }
.st-name { flex: 1 1 auto; width: 100%; min-width: 0; max-width: 260px; font-weight: var(--fw-semi); }
.st-saved { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); white-space: nowrap; color: var(--text-mute); }
.st-saved i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: 0.75; }
.st-saved[data-state="saving"] i { background: var(--text-mute); }
.st-g-out { margin-left: auto; gap: 6px; }
.st-master { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; }
.st-mmeter { position: relative; width: 4px; height: var(--ctl); overflow: hidden; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.08); }
.st-mmeter::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: bottom;
  transform: scaleY(var(--lvl, 0));
  background: linear-gradient(to top, var(--ok) 0%, var(--ok) 62%, var(--warn) 84%, var(--rec) 100%);
  background-size: 100% 30px;
  background-position: bottom;
}
.st-mmeter.is-hot { box-shadow: 0 0 0 1px var(--rec); }
.st-share { height: var(--ctl); }
/* Master ist global: neutral, nie in der Farbe der gewählten Spur (B-13) */
.st-master .knob, .st-morepop .knob { --p: var(--text); }
.st-morepop .tgl[aria-pressed="true"] { border-color: var(--line-3); }
.st-morepop .tgl[aria-pressed="true"] i { background: var(--text); box-shadow: none; }
.st-al .st-lstat { min-width: 1ch; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text-mute); }
.st-al.is-live { color: var(--text); border-color: var(--ok); background: rgba(61, 220, 187, 0.12); }
.st-al.is-live .st-lstat { color: var(--ok); }
.st-al.is-wait .st-ic { animation: stBlink 0.9s ease-in-out infinite alternate; }

/* Hinweiszeilen unter der Kopfleiste */
.st-notices:empty { display: none; }
.st-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 7px 14px;
  font-size: var(--fs-st-md);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}
.st-notice > span:first-child { flex: 1 1 240px; }
.st-notice .st-input { flex: 1 1 260px; min-width: 0; }

/* ---------- Körper ---------- */
.st-views { display: none; }
.st-body { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 0; }
.st-main { display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; }

/* Spurliste */
.st-side { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); min-height: 0; background: rgba(0, 0, 0, 0.14); border-right: 1px solid var(--border); }
.st-side-head { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px 6px; }
.st-side-head h2, .st-tname strong { margin: 0; font-size: var(--fs-2xs); font-family: var(--mono); font-weight: var(--fw-semi); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.st-count-t { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); font-variant-numeric: tabular-nums; }
.st-list { min-height: 0; margin: 0; padding: 0 6px 6px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.st-strip {
  --t: var(--c-drums);
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 80px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 4px;
  row-gap: 2px;
  margin-bottom: 2px;
  padding: 6px 8px 6px 0;
  border-radius: var(--r-sm);
  -webkit-touch-callout: none;
  transition: background var(--dur-1);
}
.st-strip[data-track="bass"] { --t: var(--c-bass); }
.st-strip[data-track="lead"] { --t: var(--c-lead); }
.st-strip[data-track="keys"] { --t: var(--c-keys); }
.st-strip[data-track="glitch"] { --t: var(--c-glitch); }
.st-strip:hover { background: rgba(255, 255, 255, 0.035); }
/* gewählte Spur: neutrale Fläche, die Spurfarbe nur als Kennstrich */
.st-strip.is-cur { background: rgba(255, 255, 255, 0.08); box-shadow: inset 2px 0 0 var(--t); }
.st-strip.is-drag { z-index: var(--z-float); transform: translateY(var(--dy, 0)); background: var(--surface-3); box-shadow: 0 10px 28px -10px var(--shadow-drop), inset 2px 0 0 var(--t); }
.st-strip.is-drop { box-shadow: inset 0 2px 0 var(--accent); }
/* gedämpft: nicht nur blasser, sondern durchgestrichen (lesbar auch ohne Kontrastunterschied) */
.st-strip.is-muted .st-strip-txt { opacity: 0.6; }
.st-strip.is-muted .st-strip-txt strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.st-grip {
  position: relative;
  z-index: var(--z-raise);
  grid-row: 1 / 3;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 36px;
  padding: 0;
  color: var(--text-mute);
  background: none;
  border: 0;
  border-radius: var(--r-2xs);
  cursor: grab;
  touch-action: none;
  opacity: 0.6;
}
.st-grip:hover, .st-strip.is-drag .st-grip { opacity: 1; color: var(--text); }
.st-strip.is-drag .st-grip { cursor: grabbing; }
.st-grip .st-ic, .st-grip .st-ic svg { width: 12px; height: 12px; }
.st-strip-name {
  grid-row: 1 / 3;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  text-align: left;
  color: var(--text-dim);
  background: none;
  border: 0;
  cursor: pointer;
}
.st-strip-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); }
.st-strip-name:focus-visible { outline: 0; }
.st-strip-name:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.st-strip-name[aria-pressed="true"] { color: var(--text); }
.st-dev {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--t, var(--p));
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-xs);
}
.st-dev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-strip-txt { display: grid; min-width: 0; }
.st-strip .st-dev { width: 24px; height: 24px; border-radius: var(--r-xs); }
.st-strip .st-dev svg { width: 14px; height: 14px; }
.st-strip-txt strong { overflow: hidden; font-size: var(--fs-st-lg); font-weight: var(--fw-semi); letter-spacing: -0.01em; white-space: nowrap; text-overflow: ellipsis; color: inherit; }
.st-strip-sub { overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); white-space: nowrap; text-overflow: ellipsis; color: var(--text-mute); }
.st-strip-name[aria-pressed="true"] .st-strip-sub { color: var(--t); }
.st-strip.is-error .st-strip-sub::before { content: "⚠ "; color: var(--danger); }
.st-strip.is-loading .st-strip-sub { opacity: 0.6; }
.st-strip-ctl { position: relative; z-index: var(--z-raise); grid-column: 3; grid-row: 1; display: flex; justify-content: flex-end; gap: 3px; }
.st-strip-lvl { position: relative; z-index: var(--z-raise); grid-column: 3; grid-row: 2; height: 24px; }
.st-meter { position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; overflow: hidden; border-radius: var(--r-2xs); pointer-events: none; }
.st-meter::after { content: ""; position: absolute; inset: 0; background: var(--t); transform-origin: left; transform: scaleX(var(--lvl, 0)); }
.st-rename { position: relative; z-index: var(--z-lift); grid-row: 1 / 3; grid-column: 2; height: 30px; font-weight: var(--fw-semi); }
.st-strip.is-renaming .st-strip-name { visibility: hidden; }
.st-list.is-many .st-strip { padding-top: 4px; padding-bottom: 4px; }
.st-side-foot { padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.st-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: var(--ctl);
  font-size: var(--fs-st-md);
  font-weight: var(--fw-semi);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.st-add:hover, .st-add[aria-expanded="true"] { border-style: solid; border-color: var(--text-mute); background: rgba(255, 255, 255, 0.07); }
.st-add[aria-disabled="true"] { opacity: var(--st-off); cursor: default; }

/* Raster mit Werkzeugen der Spur */
.st-editor { display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; }
.st-trackbar { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
/* «Folgt»-Chip (Song-Modus, nur bei Wiedergabe) steht hinter den Werkzeugen: erscheint er, wird nur der Hinweis
   schmaler, die Werkzeuge bleiben stehen (B-02) */
.st-trackbar > .st-follow { order: 1; }
.st-trackbar > .st-hint { order: 2; }
/* Die Seite gibt h2 Schaugrösse und enge Laufweite: hier ausdrücklich zurück auf die Studio-Skala, sonst erbt die Unterzeile die Laufweite. */
.st-tname { display: flex; align-items: center; gap: 9px; flex: 0 1 auto; min-width: 0; max-width: 220px; margin: 0; font-size: var(--fs-st-md); line-height: var(--lh-snug); letter-spacing: normal; font-weight: var(--fw-semi); }
.st-tname .st-dev { --t: var(--p); width: 30px; height: 30px; }
.st-tname > span:last-child { display: grid; min-width: 0; }
.st-tname strong { overflow: hidden; font-family: var(--font); font-size: var(--fs-st-lg); font-weight: var(--fw-semi); letter-spacing: -0.01em; text-transform: none; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
.st-tname small { overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); white-space: nowrap; text-overflow: ellipsis; color: var(--text-mute); }
.st-tools { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.st-oct { display: inline-flex; gap: 3px; margin-left: 4px; }
.st-pages { display: none !important; }
.st-style { padding: 0 2px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.06em; white-space: nowrap; color: var(--text-mute); }
.st-hint { flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; text-align: right; color: var(--text-mute); }
.st-gridwrap { position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 6px 14px 10px 8px; }
.st-grid { --cols: 16; --nr: 16; position: relative; display: grid; grid-template-rows: 18px minmax(0, 1fr); height: 100%; min-height: calc(var(--nr) * 24px + 18px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.st-ruler { display: grid; grid-template-columns: var(--lab) repeat(var(--cols), minmax(0, 1fr)); align-items: center; }
/* C2: Taktlineal bleibt beim senkrechten Bildlauf oben, läuft waagrecht mit; Zeilennamen bleiben links stehen */
.st-ruler { position: sticky; top: -6px; z-index: calc(var(--z-handle) + 1); background: var(--bg-soft); }
.st-lab, .st-corner { position: sticky; left: -8px; z-index: var(--z-handle); background: var(--bg-soft); }
.st-corner { align-self: stretch; }
/* Lineal (U-15): Punkte in --tick (≈ 6:1), Taktzahlen hell, die laufende Stelle in der Abspielfarbe */
.st-tick { text-align: center; font-family: var(--mono); font-size: var(--fs-2xs); line-height: 1; color: var(--tick); }
.st-tick.is-beat { color: var(--text); font-weight: var(--fw-semi); }
.st-tick.is-now { color: var(--accent); }
.st-surface { position: relative; min-height: 0; touch-action: pan-y; }
.st-rows { display: grid; grid-template-rows: repeat(var(--nr), minmax(24px, 1fr)); height: 100%; cursor: crosshair; }
.st-row { --rc: var(--p); display: grid; grid-template-columns: var(--lab) repeat(var(--cols), minmax(0, 1fr)); min-height: 0; }
.st-row[data-g="low"] { --rc: var(--g-low); }
.st-row[data-g="hit"] { --rc: var(--g-hit); }
.st-row[data-g="air"] { --rc: var(--g-air); }
.st-row[data-g="fx"] { --rc: var(--g-fx); }
.st-row[data-g="glitch"] { --rc: var(--c-glitch); }
.st-lab {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 8px 0 4px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  color: var(--text-dim);
  cursor: pointer;
  touch-action: manipulation;
}
.st-lab:hover { color: var(--white); }
.st-lab-f { position: absolute; inset: 2px 5px 2px 0; border-radius: var(--r-2xs); background: var(--rc); opacity: 0; pointer-events: none; }
.st-lab-t { position: relative; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.st-row.is-root .st-lab { color: var(--text); font-weight: var(--fw-semi); }
/* Zellen (U-15): leere Zelle klar vom Grund, Kante sichtbar, jedes zweite Viertel heller */
.st-cell { position: relative; min-height: 0; margin: 1px; border-radius: var(--r-2xs); background: var(--cell); box-shadow: inset 0 0 0 1px var(--cell-edge); transition: background var(--dur-1); }
.st-cell.is-alt { background: var(--cell-alt); }
.st-row.is-root .st-cell { background: var(--cell-root); }
.st-cell:hover { background: var(--cell-hover); }
.st-cell:focus-visible { outline: 2px solid var(--white); outline-offset: 0; border-radius: var(--r-2xs); z-index: var(--z-lift); }
/* Schläge: laut = volle Zelle, leise = halbhoher Balken in voller Farbe (unten bündig, B-38) */
.st-app[data-track="drums"] .st-cell[data-v="2"] { background: var(--rc); box-shadow: 0 0 9px -2px var(--rc); }
.st-app[data-track="drums"] .st-cell[data-v="1"]::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; border-radius: 0 0 var(--r-2xs) var(--r-2xs); background: var(--rc); pointer-events: none; }
.st-app[data-track="drums"] .st-cell.is-now[data-v="2"] { background: var(--white); box-shadow: 0 0 16px var(--rc); }
.st-app[data-track="drums"] .st-cell.is-now[data-v="1"]::before { background: var(--white); }
/* Glitch: die Blöcke zeichnet die Ebene darüber (.st-gb, genaue Lage bis 1/128); die Zellen bleiben Fläche */
.st-notes { position: absolute; top: 0; bottom: 0; left: var(--lab); right: 0; overflow: hidden; pointer-events: none; }
.st-note { position: absolute; left: calc(var(--x) * 100% / var(--cols)); top: calc(var(--y) * 100% / var(--nr)); width: max(4px, calc(var(--l) * 100% / var(--cols))); height: calc(100% / var(--nr)); }
.st-note::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: var(--r-2xs);
  background: linear-gradient(180deg, var(--p), var(--p));
  box-shadow: 0 0 10px -3px var(--p), 0 1px 0 rgba(255, 255, 255, 0.42) inset;
}
@supports (color: color-mix(in srgb, red, blue)) { .st-note::before { background-image: linear-gradient(180deg, color-mix(in srgb, var(--p) 80%, var(--white)), var(--p)); } }
.st-note::after { content: ""; position: absolute; right: 4px; top: 30%; bottom: 30%; width: 2px; border-radius: var(--r-2xs); background: rgba(0, 0, 0, 0.42); }
.st-note.is-cut-l::before { border-top-left-radius: 0; border-bottom-left-radius: 0; left: 0; }
.st-note.is-cut-r::before { border-top-right-radius: 0; border-bottom-right-radius: 0; right: 0; }
.st-note.is-cut-r::after { display: none; }
/* Akzent: hell, mit Kante oben; klar von normalen Noten zu unterscheiden.
   C2 (B-08): auch an der Form – normale Noten sind etwas niedriger, Akzente füllen die ganze Zeile */
.st-note::before { inset: 3px 1px; }
.st-note.is-acc::before { inset: 1px; background: var(--white); box-shadow: 0 0 12px -2px var(--p), inset 0 3px 0 var(--p); }
.st-note.is-acc::after { background: var(--p); }
.st-head {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lab);
  width: calc((100% - var(--lab)) / var(--cols));
  pointer-events: none;
  border-left: 1px solid var(--accent);
  /* C2: Lage per transform (eine Spalte = 100 % der eigenen Breite), kein Layout je Bild */
  transform: translateX(calc(var(--x, 0) * 100%));
  will-change: transform;
}
/* Abspielmarke = Orange (Plan), unabhängig von der Spur */
@supports (color: color-mix(in srgb, red, blue)) { .st-head { background-image: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 5%, transparent)); } }
/* leerer Zustand: sagt, was geht; die Zellen darunter bleiben bedienbar */
.st-empty {
  position: absolute;
  top: 50%;
  left: calc(var(--lab) + (100% - var(--lab)) / 2);
  z-index: var(--z-float);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  width: max-content;
  max-width: calc(100% - var(--lab) - 16px);
  padding: 10px 12px 10px 16px;
  font-size: var(--fs-st-md);
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.st-empty-or { color: var(--text-mute); }
.st-empty .st-chip { pointer-events: auto; }

/* ---------- Geräte-Feld ---------- */
.st-panel { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: var(--panel); min-height: 0; background: var(--st-panel-bg); border-top: 1px solid var(--border); }
.st-panel.is-collapsed { height: auto; }
.st-panel.is-collapsed .st-pbody { display: none; }
.st-panel.is-collapsed .st-collapse .st-ic { transform: rotate(180deg); }
.st-phead { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.st-panel.is-collapsed .st-phead { border-bottom: 0; }
.st-ptabs { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 2px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); border-radius: var(--r-xs); }
.st-ptab { min-height: calc(var(--ctl) - 6px); padding: 0 11px; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-dim); background: transparent; border: 0; border-radius: var(--r-2xs); cursor: pointer; transition: color var(--dur-1), background var(--dur-1); }
.st-ptab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.st-ptab[aria-selected="true"] { color: var(--on-sel); background: var(--text); }
.st-sound-head { display: flex; min-width: 0; flex: 0 1 auto; }
.st-pbody { position: relative; min-height: 0; overflow: hidden; }
.st-pane { height: 100%; overflow: auto; overscroll-behavior: contain; padding: 10px 14px 12px; }
.st-overlay { position: absolute; inset: 0; z-index: var(--z-overlay); padding: 8px 12px 10px; background: var(--overlay); }

/* Flächen der Geräte (C3): vier Stufen statt Einzelwerte; gelten auch in Aufklapp-Feldern des Geräts (.st-app) */
.st-app {
  --dv-1: rgba(255, 255, 255, 0.03);   /* ruhende Fläche: Zelle, Eintrag, Kachel */
  --dv-2: rgba(255, 255, 255, 0.06);   /* Zeiger darüber, Schlag-Zelle, Spurstreifen */
  --dv-3: rgba(255, 255, 255, 0.1);    /* gewählt (mit hellem Rand) */
  --dv-shade: rgba(0, 0, 0, 0.32);     /* Mulde, Griff auf farbiger Fläche */
  --dv-shade-hi: rgba(0, 0, 0, 0.55);
}

/* Kopf des Klangs: ‹ Name › · Gerät · Datei */
.snd-head { display: flex; align-items: center; gap: var(--st-4); min-width: 0; }
.snd-pick { display: inline-flex; align-items: stretch; gap: var(--st-1); min-width: 0; }
.snd-step { min-width: var(--ctl); font-size: var(--fs-st-xl); line-height: 1; }
.snd-open {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--st-4);
  width: clamp(150px, 18vw, 250px);
  min-width: 0;
  height: var(--ctl);
  padding: 0 var(--st-5);
  text-align: left;
  color: var(--text);
  background: var(--st-well);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  box-shadow: 0 0 0 1px var(--dv-shade) inset;
  cursor: pointer;
  transition: border-color var(--dur-1);
}
.snd-open:hover, .snd-open[aria-expanded="true"] { border-color: var(--text-mute); }
.snd-cur { overflow: hidden; font-size: var(--fs-st-lg); font-weight: var(--fw-semi); white-space: nowrap; text-overflow: ellipsis; }
.snd-caret { font-size: var(--fs-2xs); color: var(--text-mute); }
.snd-device { display: inline-flex; align-items: center; gap: var(--st-3); white-space: nowrap; }
.snd-device .st-select { height: var(--ctl); max-width: 170px; }
.snd-devname { font-size: var(--fs-st-md); font-weight: var(--fw-semi); color: var(--text-dim); }
.snd-file { font-size: var(--fs-st-lg); letter-spacing: 0.05em; }
.snd-filepop { width: 300px; }
.snd-filepop .snd-field { display: flex; min-width: 0; }
.snd-filepop .snd-name { width: 100%; }
.snd-fileacts { display: flex; flex-wrap: wrap; gap: var(--st-2); margin-top: var(--st-5); }
/* Meldung des Geräts (lädt, kann nicht spielen): fester Platz über dem Inhalt */
.snd-status { margin: 0 0 var(--st-4); }
.snd-status.is-error { color: var(--danger); }

/* Liste der Klänge (als Ebene über dem Bereich) */
.snd-browser { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.snd-bhead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-4); margin-bottom: var(--st-4); }
.snd-search { flex: 0 1 220px; min-width: 140px; }
.snd-cats { flex: 1 1 auto; }
.snd-cats .st-chip { height: calc(var(--ctl) - var(--st-2)); padding: 0 var(--st-5); font-size: var(--fs-xs); }
/* Gruppen je Kategorie als Listen (B-09, U-25); die Liste füllt die Ebene und rollt allein */
.snd-list { display: block; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: var(--st-1); }
.snd-grouph { margin: var(--st-5) 0 var(--st-2); font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--text-mute); }
.snd-grouph:first-child { margin-top: 0; }
.snd-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--st-1); margin: 0; padding: 0; list-style: none; }
.snd-empty { margin: var(--st-2) 0; }
.snd-item { display: flex; gap: var(--st-1); }
.snd-load {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  height: var(--ctl);
  padding: 0 10px;
  text-align: left;
  color: var(--text-dim);
  background: var(--dv-1);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.snd-load span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-st-md); }
.snd-load:hover { color: var(--text); background: var(--dv-2); }
/* aktueller Klang: neutral, 3-px-Balken links (B-09) */
.snd-load[aria-current="true"] { color: var(--text); background: var(--surface-3); border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--sel); }
.snd-del { min-width: var(--ctl); height: var(--ctl); }

/* Gerüst (B-17): Abschnitte als Reiterzeile über dem Inhalt (alle Geräte gleich, auch Glitch PAINT | SLICE),
   darunter Regler in benannten Gruppen; Hinweis unten */
.snd-editor { display: flex; flex-direction: column; gap: var(--st-5); min-width: 0; }
.snd-tabpanel { min-width: 0; }
.snd-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-1); min-width: 0; }
/* Überschrift einer Reitergruppe (Klang · Spielen · Stimmen): leise vor ihren Reitern, ab der zweiten mit Abstand */
.snd-tabhead { padding: 0 var(--st-3) 0 0; font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--text-mute); white-space: nowrap; }
.snd-tab + .snd-tabhead { margin-left: var(--st-5); padding-left: var(--st-5); border-left: 1px solid var(--line-2); }
/* Reiter: 12 px, 560, gewählt = helle Pille */
.snd-tab { display: inline-flex; align-items: center; min-height: calc(var(--ctl) - var(--st-2)); padding: 0 var(--st-5); font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: 0; white-space: nowrap; color: var(--text-dim); background: transparent; border: 0; border-radius: var(--r-xs); cursor: pointer; transition: color var(--dur-1), background var(--dur-1); }
.snd-tab:hover { color: var(--text); background: var(--dv-2); }
.snd-tab[aria-selected="true"] { color: var(--on-sel); background: var(--sel); }
.snd-tab.is-on::after { content: "●"; margin-left: var(--st-2); font-size: var(--fs-2xs); color: var(--p); }
.snd-tab.is-apart { margin-left: var(--st-5); }
/* Gruppen (B-18): jede Gruppe bricht als Ganzes um; Überschrift im Stil der Studio-Skala mit Haarlinie */
.snd-secs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--st-5) var(--st-7); min-width: 0; }
.snd-sec { display: flex; flex: 0 0 auto; flex-direction: column; gap: var(--st-3); min-width: 0; max-width: 100%; }
.snd-sec-h { overflow: hidden; padding-bottom: var(--st-2); font-size: var(--fs-2xs); font-weight: var(--fw-medium); line-height: 1.2; color: var(--text-mute); white-space: nowrap; text-overflow: ellipsis; border-bottom: 1px solid var(--line-1); }
.snd-ctrls { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--st-4) var(--st-3); }
/* feste Reglerzelle (B-18): 64 px breit, Beschriftung einzeilig mit «…» (voller Name im title), Werte auf einer Grundlinie */
.snd-ctrls .knob:not(.is-small) .knob-lab { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; }
.snd-field { display: inline-flex; flex-direction: column; gap: var(--st-2); min-width: 110px; font-size: var(--fs-2xs); color: var(--text-mute); }
.snd-field > span { overflow: hidden; font-weight: var(--fw-medium); white-space: nowrap; text-overflow: ellipsis; }
.snd-toggle { align-self: center; min-height: var(--ctl); }
/* BassButler: Stimmen-Schalter über den Gruppen */
.snd-voice { display: flex; flex-direction: column; gap: var(--st-4); min-width: 0; }
.snd-voice-on { display: flex; }
.snd-note { margin: 0; font-size: var(--fs-xs); }
.kit-editor { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--st-6); align-items: start; }
.kit-pads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--st-2); }
.kit-pad {
  --c: var(--g-fx);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(var(--ctl) + var(--st-3));
  padding: var(--st-2) var(--st-3);
  overflow: hidden;
  text-align: left;
  color: var(--text);
  background: linear-gradient(160deg, var(--dv-2), var(--dv-1));
  border: 1px solid var(--line-1);
  border-left: 3px solid var(--c);
  border-radius: var(--r-xs);
  cursor: pointer;
}
.kit-pad span { overflow: hidden; font-size: var(--fs-2xs); font-weight: var(--fw-semi); line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.kit-pad small { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); }
.kit-pad[data-cat*="kick"], .kit-pad[data-cat*="tom"], .kit-pad[data-cat*="conga"], .kit-pad[data-cat*="bongo"] { --c: var(--g-low); }
.kit-pad[data-cat*="snare"], .kit-pad[data-cat*="clap"], .kit-pad[data-cat*="rim"], .kit-pad[data-cat*="perc"] { --c: var(--g-hit); }
.kit-pad[data-cat*="hat"], .kit-pad[data-cat*="shak"], .kit-pad[data-cat*="cymbal"], .kit-pad[data-cat*="ride"], .kit-pad[data-cat*="crash"] { --c: var(--g-air); }
/* gewähltes Pad: neutraler heller Ring, die Gruppenfarbe bleibt als Kennstrich links */
.kit-pad[aria-pressed="true"] { border-color: var(--text); border-left-color: var(--c); box-shadow: 0 0 0 1px var(--text); background: var(--dv-3); }
.kit-pad.is-missing { opacity: var(--st-off); }
.kit-side { display: flex; flex-direction: column; gap: var(--st-5); min-width: 0; }
.kit-edit { display: flex; flex-direction: column; align-items: flex-start; gap: var(--st-5); min-width: 0; }
.kit-side > .st-chip { align-self: flex-start; }

/* Drehregler */
.knob {
  --size: 38px;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 64px;
  border-radius: var(--r-xs);
  cursor: ns-resize;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.knob-ring {
  --v: 0.5;
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(from 225deg, var(--line-2) calc(var(--a, 0) * 270deg), var(--p) 0 calc(var(--b, var(--v)) * 270deg), var(--line-2) 0 270deg, transparent 0);
  transition: filter var(--dur-1);
}
.knob:hover .knob-ring, .knob.is-drag .knob-ring { filter: brightness(1.18); }
.knob-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, var(--knob-hi), var(--knob-lo) 72%);
  box-shadow: 0 2px 6px var(--dv-shade-hi), 0 1px 0 var(--line-1) inset;
}
.knob-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2px;
  height: calc(var(--size) * 0.22);
  margin-left: -1px;
  border-radius: var(--r-2xs);
  background: var(--white);
  transform-origin: 50% calc(var(--size) / 2 - 6px);
  transform: rotate(calc(-135deg + var(--v) * 270deg));
}
.knob-val { font-family: var(--mono); font-size: var(--fs-2xs); line-height: 1.25; color: var(--text); }
.knob-lab { font-size: var(--fs-2xs); line-height: 1.2; color: var(--text-mute); white-space: nowrap; }
.knob.is-small { --size: 28px; display: inline-grid; grid-template-columns: var(--size) auto; grid-template-rows: auto auto; column-gap: 7px; width: auto; justify-items: start; align-items: center; }
.knob.is-small .knob-ring { grid-row: 1 / 3; }
.knob.is-small .knob-ring::before { inset: 4px; }
.knob.is-small .knob-ring::after { top: 5px; transform-origin: 50% calc(var(--size) / 2 - 5px); }
.knob.is-small .knob-val { grid-column: 2; grid-row: 2; font-size: var(--fs-xs); }
.knob.is-small .knob-lab { grid-column: 2; grid-row: 1; font-size: var(--fs-2xs); font-weight: var(--fw-medium); }
.knob.is-tiny { --size: 24px; width: auto; gap: 0; }
.knob.is-tiny .knob-val, .knob.is-tiny .knob-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.knob.is-tiny .knob-ring::before { inset: 3px; }
.knob.is-tiny .knob-ring::after { top: 3px; height: 7px; transform-origin: 50% calc(var(--size) / 2 - 3px); }
.st-master .knob.is-small .knob-lab { display: none; }
.st-master .knob.is-small { grid-template-rows: auto; }
.st-master .knob.is-small .knob-val { grid-row: 1; }

/* Mixer: Kanalzüge */
/* Mixer (B-12): breitere Kanäle mit festen Abständen; Skala/dB/Master brauchen Markup (Übergabe) */
.st-mixer { display: flex; gap: 8px; height: 100%; min-height: 168px; }
.st-chan {
  --t: var(--c-drums);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: 8px;
  width: 92px;
  flex: 0 0 auto;
  padding: 8px 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-top: 2px solid var(--t);
  border-radius: var(--r-sm);
}
.st-chan[data-track="bass"] { --t: var(--c-bass); }
.st-chan[data-track="lead"] { --t: var(--c-lead); }
.st-chan[data-track="keys"] { --t: var(--c-keys); }
.st-chan[data-track="glitch"] { --t: var(--c-glitch); }
.st-chan.is-cur { background: rgba(255, 255, 255, 0.08); border-color: var(--line-3); }
.st-chan.is-muted .st-chan-fade { opacity: var(--st-off); }
.st-chan.is-muted .st-chan-name { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--text-dim); }
.st-chan-name { width: 100%; overflow: hidden; padding: 0; font-size: var(--fs-xs); font-weight: var(--fw-semi); text-align: center; white-space: nowrap; text-overflow: ellipsis; color: var(--text); background: none; border: 0; cursor: pointer; }
.st-chan-gap { height: 24px; }
.st-chan-fade { position: relative; display: flex; justify-content: center; gap: 10px; min-height: 0; height: 100%; }
/* Skalenstriche neben dem Fader (reines Dekor, alle 25 %) */
.st-chan-fade::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: calc(50% - 26px); width: 6px; background: repeating-linear-gradient(to bottom, var(--line-3) 0 1px, transparent 1px 25%); background-size: 100% calc(100% + 1px); opacity: 0.8; pointer-events: none; }
.st-cmeter { position: relative; width: 4px; height: 100%; overflow: hidden; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.08); }
.st-cmeter::after { content: ""; position: absolute; inset: 0; background: var(--t); transform-origin: bottom; transform: scaleY(var(--lvl, 0)); }
.st-app .st-fader { width: 22px; height: 100%; min-height: 60px; writing-mode: vertical-lr; direction: rtl; }
.st-app .st-fader::-webkit-slider-runnable-track { width: 3px; height: 100%; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.14); }
.st-app .st-fader::-moz-range-track { width: 3px; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.14); }
.st-app .st-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 10px; margin-top: 0; margin-left: -8.5px; border-radius: var(--r-2xs); background: var(--thumb); border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.st-app .st-fader::-moz-range-thumb { width: 20px; height: 10px; border-radius: var(--r-2xs); background: var(--thumb); border: 0; }
.st-chan-ms { display: flex; gap: 3px; }
/* C2 (B-12): Pegel als Zahl, Panorama mit Wert, Master-Kanal (neutral, ohne Spurfarbe) */
.st-chan { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.st-chan.is-cur { border-top-color: var(--t); }
.st-chan-db { min-height: 1.3em; font-family: var(--mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-dim); }
.st-chan-db.is-none, .st-chan-ms.is-none { visibility: hidden; }
.st-chan-ms.is-none { min-height: 28px; }
.st-chan-panbox { display: flex; align-items: center; gap: 6px; height: 24px; }
.st-chan-pan { min-width: 3ch; font-family: var(--mono); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; color: var(--text-dim); }
.st-chan.is-master { --t: var(--text-dim); margin-left: auto; border-top-color: var(--line-3); }
.st-chan.is-master .st-chan-name { cursor: default; }
.st-cmeter.is-hot { box-shadow: 0 0 0 1px var(--rec); }

/* Song: Kette der Patterns */
.st-song-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 10px; }
.st-song-head .st-help { margin: 0; }
.st-song-info { font-size: var(--fs-2xs); color: var(--text); }

/* ---------- Ebenen: Menüs, Aufklapp-Felder, erste Schritte, Meldung, Dialog ---------- */
.st-menu, .st-pop {
  position: fixed;
  left: var(--mx, 0);
  top: var(--my, 0);
  z-index: var(--z-menu);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
/* Ebenen einheitlich: Fläche --surface-3, Linie --line-2, Radius 10, Schatten --shadow-2 (Menü, Feld, Tour, Toast, Dialog) */
.st-menu { min-width: 210px; padding: 5px; }
.st-menu:focus { outline: 0; }
.st-menu-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 0 10px 0 6px;
  font-size: var(--fs-st-md);
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.st-menu-item:hover, .st-menu-item:focus { outline: 0; background: rgba(255, 255, 255, 0.08); }
.st-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.st-menu-item[aria-disabled="true"] { color: var(--text-mute); opacity: 0.6; cursor: default; }
.st-menu-item[aria-disabled="true"]:hover { background: none; }
.st-menu-item.is-danger:not([aria-disabled="true"]) { color: var(--danger); }
.st-menu-item kbd { font-size: var(--fs-2xs); color: var(--text-mute); }
.st-menu-mark { width: 16px; text-align: center; color: var(--text); }
.st-menu-item[aria-checked="true"] .st-menu-mark::before { content: "✓"; }
.st-menu-item[role="menuitemradio"][aria-checked="true"] .st-menu-mark::before { content: "●"; font-size: var(--fs-2xs); }
.st-menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.st-menu-group { padding: 6px 10px 2px 30px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-mute); }
.st-pop { padding: 12px 14px; }
.st-pop:focus { outline: 0; }
.st-pop-h, .st-msec h4 { margin: 0 0 8px; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.st-morepop { width: 360px; }
.st-msec { padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-msec:first-child { padding-top: 0; }
.st-mrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; }
.st-mrow + .st-mrow { margin-top: 10px; }
.st-mflag { min-height: 32px; }
.st-mfoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding-top: 10px; }
.st-addpop { width: 340px; }
.st-devcards { display: grid; gap: 4px; }
.st-devcard {
  --t: var(--c-drums);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.st-devcard[data-type="bass"] { --t: var(--c-bass); }
.st-devcard[data-type="lead"] { --t: var(--c-lead); }
.st-devcard[data-type="keys"] { --t: var(--c-keys); }
.st-devcard[data-type="glitch"] { --t: var(--c-glitch); }
.st-devcard:hover, .st-devcard:focus-visible { background: rgba(255, 255, 255, 0.07); border-color: var(--line-3); }
.st-devcard[aria-disabled="true"] { opacity: var(--st-off); cursor: default; }
.st-devcard .st-dev { width: 34px; height: 34px; }
.st-devcard-t { display: grid; gap: 1px; min-width: 0; }
.st-devcard-t strong { font-size: var(--fs-st-lg); }
.st-devcard-t em { font-family: var(--mono); font-size: var(--fs-2xs); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t); }
.st-devcard-t small { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-dim); }

.st-tour {
  position: fixed;
  left: var(--tx, 16px);
  top: var(--ty, 16px);
  z-index: var(--z-pop);
  width: min(310px, calc(100vw - 16px));
  padding: 13px 15px 12px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
}
.st-tour::before { content: ""; position: absolute; left: calc(var(--ax, 30px) - 6px); top: -7px; width: 12px; height: 12px; background: var(--surface-3); border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg); }
.st-tour[data-side="above"]::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.st-tour h4 { margin: 0 0 4px; font-size: var(--fs-st-lg); }
.st-tour-n { margin: 0 0 4px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-hi); }
.st-tour-x { margin: 0 0 12px; font-size: var(--fs-st-md); line-height: 1.45; color: var(--text-dim); }
.st-tour-act { display: flex; justify-content: flex-end; gap: 6px; }
.is-tour { outline: 2px solid var(--accent) !important; outline-offset: 3px; box-shadow: 0 0 0 7px rgba(255, 125, 51, 0.16); }
.st-gridwrap.is-tour { outline-offset: -3px; }

/* Meldung (B-35): klein, unten rechts über dem Geräte-Feld, blendet sanft ein und aus */
.st-toast {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(calc(100vw - 32px), 420px);
  padding: 8px 8px 8px 14px;
  font-size: var(--fs-st-md);
  line-height: 1.35;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2), 0 0 0 1px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.st-toast p { margin: 0; padding: 3px 0; }
.st-toast.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.st-toast.is-on.has-act { pointer-events: auto; }
/* Aktion in der Meldung (meist «Rückgängig»): neutral hell, nicht orange */
.st-toast .st-chip.is-strong { color: var(--on-sel); background: var(--sel); }
.st-toast .st-chip.is-strong:hover { color: var(--on-sel); background: var(--white); }

.st-drop {
  position: absolute;
  inset: 0;
  z-index: var(--z-drop);
  display: none;
  place-items: center;
  font-size: var(--fs-st-xl);
  font-weight: var(--fw-semi);
  color: var(--text);
  background: rgba(7, 8, 11, 0.84);
  border: 2px dashed var(--accent);
  pointer-events: none;
}
.st-app.is-drop .st-drop { display: grid; }
.st-dialog {
  max-width: min(92vw, 600px);
  max-height: calc(100dvh - 40px);
  padding: 20px 24px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
}
.st-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.st-dialog h3 { margin: 0 0 12px; font-size: var(--fs-st-xl); }
.st-keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0 0 16px; font-size: var(--fs-st-md); }
.st-keys dt { margin: 0; }
.st-keys dd { margin: 0; color: var(--text-dim); }
.st-keys kbd { padding: 2px 7px; font-size: var(--fs-xs); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border); border-radius: var(--r-xs); }
.st-alhelp { margin: 0 0 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.st-alhelp h4 { margin: 0 0 6px; font-size: var(--fs-st-lg); }
.st-alhelp p { margin: 0; font-size: var(--fs-st-md); line-height: 1.5; color: var(--text-dim); }
.st-dlg-act { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Studio: Korrekturrunde (fest im Fenster, Treffer-Flächen, neue Bauteile) ---------- */
/* Das Studio ist die ganze Ansicht und scrollt nie weg: mit JavaScript ist das Dokument nicht scrollbar, die App liegt
   fest im Fenster. Text und Fusszeile der Seite stehen im HTML (Suchmaschinen; ohne JavaScript ganz normal) und
   öffnen sich als Ebene über «⋯ › Über das Studio». */
html.js:has(body.theme-studio), html.js body.theme-studio { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.js .theme-studio .studio { position: fixed; inset: 0; z-index: var(--z-raise); }
html.js .theme-studio .studio:not(.is-ready) { height: auto; }
.st-app { overflow: hidden; overflow: clip; }
html.js .app-extra { position: fixed; inset: 0; z-index: var(--z-modal); display: none; overflow: auto; overscroll-behavior: contain; background: var(--bg); }
html.js .app-extra.is-open { display: block; }
.app-extra-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-lift);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-extra-bar strong { font-size: var(--fs-st-lg); }
.app-extra .studio-about { border-top: 0; }

/* sichtbar je Grösse: Telefon-Teile im Menü, Hilfe im Menü nur ohne Knopf «?» */
.st-only-phone { display: none !important; }
.st-only-narrow { display: none !important; }
@media (max-width: 1100px) { .st-only-narrow { display: inline-flex !important; } }
/* N-ST-02: unter 1280 px ohne Logo in der Kopfleiste: «Startseite» steht dann im Menü «⋯» */
.st-only-nologo { display: none !important; }
@media (max-width: 1279.98px) { .st-mlist > .st-only-nologo { display: grid !important; } }
@media (max-width: 760px) { .st-only-phone { display: revert !important; } .st-chips > .st-only-phone, .st-mfoot > .st-only-phone { display: inline-flex !important; } }

/* Treffer-Flächen am Schreibtisch: mindestens 24 px (eingearbeitet in .st-ms, .st-strip, .st-grip, .st-vol, .st-rows) */

/* Name des Tracks: 140 bis 240 px; Speicherstand als Punkt mit Tooltip und zugänglichem Text */
.st-g-name { flex: 1 1 140px; min-width: 140px; max-width: 260px; gap: 6px; }
.st-name { min-width: 0; max-width: 240px; }
.st-saved { gap: 0; }
.st-saved span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-saved i { width: 8px; height: 8px; }

/* Song-Modus: Folgen oder fixiert */
.st-follow { flex: 0 0 auto; height: var(--ctl); padding: 0 10px; font-size: var(--fs-xs); }
.st-follow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.st-follow.is-fixed { color: var(--text); border-color: var(--line-3); }
.st-follow.is-fixed i { background: var(--text-mute); }

/* Hinweis über dem Raster: kurzer Satz und «i» */
.st-hint { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.st-hint-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* «i» im Stil der übrigen Zeichen: Systemschrift, 650, kein Serif (B-14) */
.st-info { flex: 0 0 auto; width: 28px; min-width: 28px; height: 28px; padding: 0; font-family: var(--font); font-size: var(--fs-st-md); font-style: normal; font-weight: var(--fw-semi); border-radius: 50%; }
.st-infopop { width: 340px; }
.st-pop-x { margin: 0; font-size: var(--fs-st-md); line-height: 1.5; color: var(--text-dim); }
.st-pop-row { display: flex; gap: 6px; margin-top: 10px; }
.st-pop-row .st-input { flex: 1 1 auto; min-width: 0; }
.st-openpop { width: 420px; max-width: calc(100vw - 16px); }

/* ---------- Meine Tracks: Knopf beim Namen, Ebene mit der Liste, «Neuer Track» aus Vorlagen ---------- */
/* Knopf mit Text erst ab 1600 px; darunter nur das Ordner-Zeichen (Name «Meine Tracks» im aria-label), der Name des
   Tracks behält so seinen Platz */
.st-libbtn { flex: 0 0 auto; }
.st-g-name { min-width: 150px; }
/* Platz für einen lesbaren Namen (mindestens ~140 px): bis 1599 px etwas schmalere Tonart-Felder und Wiedergabe-
   Knöpfe, unter 1280 px «Teilen» nur als Zeichen (Name im aria-label und Tooltip) */
@media (min-width: 1024px) and (max-width: 1599.98px) {
  .st-g-name { min-width: 204px; }
  .st-loop .seg-btn { padding: 0 7px; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .st-g-name { min-width: clamp(140px, calc(100vw - 932px), 240px); }
  .st-appbar .st-key { width: 56px; }
  .st-appbar .st-scale { width: 104px; }
  .st-logo { display: none !important; }        /* N-ST-02: Platz für ganze Tonart-Werte; Startseite steht im Menü «⋯» */
  .st-appbar .st-num { width: 52px; }
  .st-appbar .st-loop .seg-btn { padding: 0 5px; }
  .st-share .st-tool-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-share.has-text { padding: 0 7px; }
}
@media (min-width: 1024px) and (max-width: 1100px) {
  .st-g-name { min-width: 192px; }
}
/* Nicht gespeichert: rotes «!» (Grund und Rat im Tooltip, der Text «Nicht gespeichert» für Bildschirmleser); mit Platz
   auch als Text daneben */
.st-saved[data-state="error"] i { display: grid; place-items: center; width: 16px; height: 16px; background: var(--danger); opacity: 1; }
.st-saved[data-state="error"] i::before { content: "!"; font-size: var(--fs-2xs); font-style: normal; font-weight: var(--fw-semi); line-height: 1; color: var(--on-accent); }
@media (min-width: 1600px) {
  .st-saved[data-state="error"] span { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-left: 5px; font-weight: var(--fw-semi); color: var(--danger); }
}
/* höchstens bis unter die Kopfleiste: die Ebene hängt am Knopf und deckt ihn nicht zu */
.st-libpop { display: flex; flex-direction: column; width: 380px; max-width: calc(100vw - 16px); max-height: min(620px, calc(100vh - 64px)); max-height: min(620px, calc(100dvh - 64px)); overflow: hidden; }
.st-lib-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.st-lib-warn { margin: 0 0 10px; padding: 8px 10px; font-size: var(--fs-st-md); line-height: 1.45; color: var(--text); background: rgba(255, 107, 90, 0.12); border: 1px solid rgba(255, 107, 90, 0.4); border-radius: var(--r-xs); }
.st-lib { flex: 1 1 auto; min-height: 0; margin: 0 -6px; padding: 0 6px; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.st-lib-row { display: flex; align-items: center; gap: 4px; }
.st-lib-row + .st-lib-row { margin-top: 2px; }
.st-lib-open {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
  color: var(--text);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.st-lib-open:hover, .st-lib-open:focus { outline: 0; background: rgba(255, 255, 255, 0.06); }
.st-lib-open:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.st-lib-row.is-open .st-lib-open { background: rgba(255, 255, 255, 0.04); border-color: var(--border-2); }
.st-lib-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.st-lib-name strong { min-width: 0; overflow: hidden; font-size: var(--fs-st-lg); font-weight: var(--fw-semi); white-space: nowrap; text-overflow: ellipsis; }
.st-lib-name em { flex: 0 0 auto; font-family: var(--mono); font-size: var(--fs-2xs); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.st-lib-open small { overflow: hidden; font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; color: var(--text-mute); }
.st-lib-more { flex: 0 0 auto; }
.st-lib-input { flex: 1 1 auto; min-width: 0; height: var(--ctl); }
.st-lib-hint { margin: 10px 0 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-mute); }
.st-lib-empty { margin: 2px 0 4px; }
.st-newpop { width: 340px; max-width: calc(100vw - 16px); }
.st-tplcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.st-tplcard {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.st-tplcard:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-3); }
.st-tplcard strong { font-size: var(--fs-st-lg); }
.st-tplcard small { font-size: var(--fs-xs); color: var(--text-dim); }
.st-tplcard[data-tpl="blank"] { grid-column: 1 / -1; }
/* Telefon, Menü «⋯» ganz oben: der offene Track, Tipp öffnet «Meine Tracks» */
.st-mcur {
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 6px;
  padding: 6px 10px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.st-mcur > span:last-child { display: grid; min-width: 0; }
.st-mcur strong { overflow: hidden; font-size: var(--fs-st-lg); white-space: nowrap; text-overflow: ellipsis; }
.st-mcur small { font-size: var(--fs-xs); color: var(--text-mute); }
.st-morepop > .st-mcur.st-only-phone { display: none !important; }
@media (max-width: 760px) { .st-morepop > .st-mcur.st-only-phone { display: flex !important; } }
/* Papierkorb und Suche in «Meine Tracks» */
.st-lib-search { width: 100%; height: var(--ctl); margin-bottom: 8px; }
.st-lib-trash { flex: 0 0 auto; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.st-lib-trash > summary { padding: 4px 2px; font-size: var(--fs-xs); color: var(--text-dim); cursor: pointer; }
.st-lib-trash > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-2xs); }
.st-lib-trash .st-lib-hint { margin: 2px 0 6px; }
.st-lib-gone { max-height: 180px; }
.st-lib-row.is-gone { gap: 6px; }
.st-lib-open.is-static { cursor: default; }
.st-lib-open.is-static:hover { background: none; }
.st-lib-row.is-gone .st-chip { flex: 0 0 auto; height: 28px; padding: 0 9px; font-size: var(--fs-xs); }
.st-lib-purge { color: var(--danger); }
.st-lib-purge:hover { color: var(--danger); border-color: rgba(255, 107, 90, 0.5); }
.st-syncbar { border-color: var(--accent); }
@media (max-width: 1599.98px) {
  .st-libbtn .st-tool-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-libbtn.has-text { padding: 0 7px; }
}
@media (max-width: 760px) {
  .st-libpop, .st-newpop { width: calc(100vw - 16px); }
  .st-lib-top .st-chip { min-height: var(--ctl); }
  .st-lib-open { min-height: 48px; }
  .st-lib-more { width: var(--ctl); height: var(--ctl); }
  .st-tplcard { min-height: 56px; }
  .st-lib-row.is-gone .st-chip { height: var(--ctl); }
}
.st-field-err { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--danger); }
.st-input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.st-fieldwrap { display: inline-flex; flex-direction: column; gap: 3px; max-width: 200px; }
.st-field-note { font-size: var(--fs-2xs); line-height: 1.35; color: var(--text-mute); }

/* Geräte-Feld: Griff zum Verstellen der Höhe */
.st-sizer {
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  z-index: var(--z-handle);
  height: 16px;
  cursor: ns-resize;
  touch-action: none;
}
.st-sizer::after { content: ""; position: absolute; left: 50%; top: 6px; width: 44px; height: 4px; margin-left: -22px; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.16); transition: background var(--dur-1); }
.st-sizer:hover::after, .st-sizer.is-drag::after { background: var(--text-mute); }
.st-sizer:focus-visible::after { background: var(--accent); }
.st-sizer:focus-visible { outline: 0; }
.st-panel.is-collapsed .st-sizer { display: none; }

/* Gerätekarten: Beschreibung unter dem Namen */
.st-devcard { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 11px; }
.st-devcard .st-dev { grid-row: 1 / 3; }
.st-devcard-d { grid-column: 2; font-size: var(--fs-xs); line-height: 1.35; color: var(--text-dim); }

/* Erste Schritte: Zurück, Pfeil auch seitlich */
.st-tour-act { flex-wrap: wrap; }
.st-tour-skip { margin-right: auto; }
.st-tour[data-side="right"]::before { left: -7px; top: calc(var(--ay, 30px) - 6px); transform: rotate(-45deg); }
.st-tour[data-side="left"]::before { left: auto; right: -7px; top: calc(var(--ay, 30px) - 6px); transform: rotate(135deg); }

/* ---------- Mittlere Breiten: Kopfleiste verdichten ---------- */
@media (max-width: 1360px) {
  .st-rec-t, .st-unit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-rec { width: var(--ctl); padding: 0; }
}
@media (max-width: 1220px) {
  .st-app { --side: 240px; }
  .st-share .st-tool-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-share { padding: 0 7px; }
  .st-trackbar .st-tool.has-text:not(.is-key) .st-tool-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-trackbar .st-tool.has-text:not(.is-key) { padding: 0 7px; }
  .kit-editor { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .st-appbar { gap: 5px; padding: 0 8px; }
  .st-grp + .st-grp::before { display: none; }
  .st-helpbtn { display: none; }                 /* Hilfe dann im Menü «⋯» (st-only-narrow) und auf der Taste ? */
  .st-g-pat .seg-btn { padding: 0 6px; }
  .st-tname { max-width: 150px; }
  .st-loop .seg-btn { padding: 0 7px; }
}

/* ---------- Schmal (unter 1024 px): Reiter; die App bleibt fest im Fenster, der Bereich darunter scrollt für sich ---------- */
@media (max-width: 1023.98px) {
  .st-app { --lab: 64px; height: 100vh; height: 100dvh; min-height: 0; }
  .st-appbar { flex-wrap: wrap; row-gap: 6px; padding: 7px 10px; }
  .st-g-name { order: 10; flex: 1 1 0; }
  .st-g-out { order: 11; margin-left: auto; }
  .st-name { max-width: none; }
  .st-views { display: flex; gap: 2px; padding: 4px 8px; background: var(--st-panel-bg); border-bottom: 1px solid var(--border); }
  .st-view { flex: 1; min-height: 40px; font-size: var(--fs-st-md); font-weight: var(--fw-semi); color: var(--text-dim); background: transparent; border: 0; border-radius: var(--r-xs); cursor: pointer; transition: color var(--dur-1), background var(--dur-1); }
  .st-view:hover { color: var(--text); }
  .st-view[aria-selected="true"] { color: var(--on-sel); background: var(--text); }
  .st-body { grid-template-columns: minmax(0, 1fr); }
  .st-app[data-view="tracks"] .st-main { display: none; }
  .st-app:not([data-view="tracks"]) .st-side { display: none; }
  .st-app[data-view="tracks"] .st-side { border-right: 0; }
  .st-strip .st-ms { width: 32px; height: 32px; }
  .st-strip { grid-template-columns: 24px minmax(0, 1fr) 112px; }
  .st-strip-lvl { height: 30px; }
  .st-panel .st-phead { flex-wrap: wrap; }
}
/* Tablet (761–1023): Raster und Gerät untereinander über die ganze Höhe; zwei Reiter (Spuren · Raster) */
@media (min-width: 760.02px) and (max-width: 1023.98px) {
  .st-view[data-view="device"] { display: none; }
  .st-app { --panel: clamp(240px, 36vh, 380px); }
  /* C2 (B-28): Kopfleiste in einer Zeile – Logo (Startseite) und Tap im Menü «⋯», «Gespeichert» nur als Punkt */
  .st-appbar { flex-wrap: nowrap; }
  .st-logo, .st-tap { display: none !important; }
  .st-appbar .st-saved .st-saved-t { position: absolute; width: 1px; height: 1px; min-width: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); }
  .st-g-name { order: 0; min-width: 0; }
  .st-g-out { order: 0; }
  .st-scale { width: 104px; }
  /* R13 (A): der Master-Regler steht hier im Menü «⋯» (und im Mixer), die Abstände wie am Telefon: der Track-Name
     bekommt bei 768 px gut 120 px statt 43 */
  .st-master { display: none !important; }
  .st-appbar { gap: 4px; }
  .st-g-name { gap: 4px; }
}
/* R13 (A): im Menü «⋯» steht das Namensfeld nur am Telefon (am Tablet ist es in der Kopfleiste) */
@media (min-width: 760.02px) { .st-mname { display: none !important; } }
/* Telefon (bis 760): Kopfleiste zweizeilig, drei Reiter; Steuerhöhe = Trefferfläche 44 px (--ctl), der Bereich unter
   den Reitern scrollt. Spurkopf in zwei Zeilen (Name · Hinweis · i | Werkzeuge · 1–8/9–16), Patterns als eine
   waagrecht scrollende Zeile: das Raster beginnt deutlich höher (B-26). */
@media (max-width: 760px) {
  .st-app { --lab: 48px; --ctl: var(--hit); --ctl-play: var(--hit); --hit: 44px; }
  .st-logo, .st-g-name, .st-master, .st-share, .st-tap, .st-unit, .st-mmeter, .st-style, .st-al { display: none !important; }
  .st-appbar { gap: 4px; padding: 6px 8px; }
  .st-g-transport { order: 1; }
  .st-g-tempo { order: 2; }
  .st-g-key { order: 3; }
  .st-g-out { order: 4; margin-left: auto; }
  .st-g-pat { order: 5; flex: 0 1 auto; }
  .st-g-hist { order: 6; margin-left: auto; }
  .st-appbar .st-rec { width: var(--ctl); }
  .st-num { width: 52px; }
  .st-key { width: 56px; }
  .st-scale { width: 104px; }
  .st-loop .seg-btn { padding: 0 9px; }
  .st-g-pat { gap: 4px; }
  .st-app .seg { gap: 1px; }
  .st-body { overflow-y: auto; overscroll-behavior: contain; }
  .st-main { grid-template-rows: auto auto; }
  .st-app[data-view="grid"] .st-panel { display: none; }
  .st-app[data-view="device"] .st-editor { display: none; }
  .st-app[data-view="device"] .st-panel { height: auto; border-top: 0; }
  .st-sizer, .st-collapse { display: none; }
  .st-pane { height: auto; overflow: visible; }
  .st-pbody { min-height: 380px; }
  .st-list { overflow: visible; }
  /* Spurkopf: .st-tools und .st-hint geben ihre Kinder an die Zeile ab (display: contents), die Reihenfolge ordnet */
  .st-trackbar { flex-wrap: wrap; gap: 3px 4px; padding: 6px 8px; }
  .st-trackbar::after { content: ""; order: 5; flex: 0 0 100%; height: 0; }
  .st-tools, .st-hint { display: contents; }
  .st-tname { order: 1; flex: 1 1 0; max-width: none; min-width: 0; }
  .st-trackbar > .st-slice, .st-trackbar > .st-follow { order: 2; }
  .st-hint-t { order: 3; flex: 0 1 auto; max-width: 44%; min-width: 0; font-size: var(--fs-2xs); line-height: 1.25; text-align: right; color: var(--text-mute); }
  .st-trackbar .st-tool.st-info { order: 4; width: var(--ctl); min-width: var(--ctl); height: var(--ctl); }
  .st-tools > * { order: 6; }
  .st-tools .st-sep, .st-tools .st-style { display: none; }
  .st-trackbar .st-tool { min-width: 40px; width: 40px; padding: 0; }
  .st-trackbar .st-tool .st-tool-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-tools > .st-pages { order: 7; display: inline-flex !important; margin-left: auto; }
  .st-pages .seg-btn { min-width: 40px; padding: 0 6px; }
  .st-gridwrap { overflow: visible; padding: 4px 6px 12px 4px; }
  .st-grid { height: auto; min-height: 0; }
  .st-rows { grid-template-rows: repeat(var(--nr), var(--hit)); height: auto; }
  .st-cell { margin: 1px; }
  .st-mixer { overflow-x: auto; height: 280px; }
  .snd-tab { min-height: var(--ctl); }
  .kit-editor { grid-template-columns: minmax(0, 1fr); }
  .snd-open { width: auto; flex: 1 1 auto; }
  .snd-head { flex-wrap: wrap; }
  .snd-pick { flex: 1 1 100%; }
  .st-morepop, .st-addpop, .snd-filepop, .st-infopop { width: calc(100vw - 16px); }
  .st-morepop .st-mflag { min-height: var(--ctl); }
  .st-toast { left: 8px; right: 8px; max-width: none; bottom: max(8px, env(safe-area-inset-bottom)); }
  /* C2 (B-28): Reiter als feste Leiste unten (Daumen), über dem Rand des Geräts (safe-area); der Bereich darüber scrollt */
  .st-app { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .st-notices { grid-row: 2; }
  .st-body { grid-row: 3; }
  .st-views { grid-row: 4; z-index: var(--z-float); padding: 4px 8px max(4px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); border-bottom: 0; }
  .st-view { min-height: var(--hit); }
  .st-toast { bottom: calc(var(--hit) + 16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .st-al.is-wait .st-ic, .st-play[aria-busy="true"] .st-play-ic, .st-tool[aria-busy="true"] .st-ic { animation: none; opacity: 0.55; }
}

/* ---------- v5: 16 Patterns, Raster bis 1/128, Roll, Glitch-Blöcke, Song-Abschnitte ---------- */
/* Farbe je Vierergruppe (A–D, E–H, I–L, M–P): passt zu den Varianten, die je Gruppe abgeleitet werden; eigene Töne
   (--pg-*), nur als schmaler Strich, nie als Fläche (B-13) */
[data-p="A"], [data-p="B"], [data-p="C"], [data-p="D"] { --pc: var(--pg-1); }
[data-p="E"], [data-p="F"], [data-p="G"], [data-p="H"] { --pc: var(--pg-2); }
[data-p="I"], [data-p="J"], [data-p="K"], [data-p="L"] { --pc: var(--pg-3); }
[data-p="M"], [data-p="N"], [data-p="O"], [data-p="P"] { --pc: var(--pg-4); }

/* Pattern-Leiste über dem Raster */
/* Pattern-Leiste über dem Raster: Tasten gleich breit, zwischen den Vierergruppen mehr Luft (B-16); gewählt = helle
   Fläche mit dunkler Schrift, Gruppenfarbe als 2-px-Strich unten; läuft gerade = orange Marke oben */
.st-patbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.st-pbar-l { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.st-pbar-p { display: flex; gap: 2px; }
.st-pb {
  position: relative; flex: 0 0 auto; width: 26px; height: var(--ctl); padding: 0; font-family: var(--mono); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04); border: 1px solid transparent; border-radius: var(--r-xs); cursor: pointer;
  box-shadow: inset 0 -2px 0 var(--pc, transparent); transition: color var(--dur-1), background var(--dur-1);
}
.st-pb:nth-child(4n + 1):not(:first-child) { margin-left: 6px; }
.st-pb:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.st-pb::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: transparent; }
.st-pb.has-notes { color: var(--text); }
.st-pb.has-notes::after { background: var(--text-mute); }
.st-pb[aria-checked="true"] { color: var(--on-sel); background: var(--sel); border-color: var(--sel); }
.st-pb[aria-checked="true"].has-notes::after { background: var(--on-sel); }
.st-pb.is-live { box-shadow: inset 0 -2px 0 var(--pc, transparent), 0 0 0 2px var(--accent); }
.st-pb.is-live::before { content: ""; position: absolute; left: 4px; right: 4px; top: -5px; height: 2px; border-radius: var(--r-2xs); background: var(--accent); }
.st-app.is-kb .st-pb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-pbar-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.st-res .seg-btn { padding: 0 7px; font-family: var(--mono); font-size: var(--fs-2xs); }
.st-slice { flex: 0 0 auto; height: var(--ctl); padding: 0 9px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; color: var(--c-glitch, var(--p)); border-color: currentColor; }
.st-pages[hidden] { display: none !important; }

/* Raster: Viertel bleiben erkennbar, feinere Teilung als Linien */
.st-tick.is-six { color: var(--text-mute); }
.st-grid.is-zoom .st-cell { margin: 1px 0; border-radius: 0; box-shadow: none; }
.st-grid.is-zoom .st-cell.is-six { box-shadow: inset 1px 0 0 var(--grid-six); }
.st-grid.is-zoom .st-cell.is-beat { box-shadow: inset 2px 0 0 var(--grid-beat); }
.st-cell[data-f="1"]::after { content: ""; position: absolute; right: 2px; top: 2px; width: 5px; height: 5px; border-radius: var(--r-2xs); background: var(--white); opacity: 0.85; pointer-events: none; }
/* Auswahl neutral (Plan: Orange nur Hauptaktion, Fokus, Abspielmarke) */
.st-cell.is-sel { box-shadow: inset 0 0 0 2px var(--sel) !important; }
.st-cell.is-sel:not([data-v]) { background: var(--cell-hover); }
/* C2 (B-05): Mindestbreite je Zelle, darunter scrollt der Takt waagrecht statt zu quetschen; --z = Zoom (1 … 4) */
.st-grid { --cw: 0px; --z: 1; }
.st-grid[data-res="32"] { --cw: 22px; }
.st-grid[data-res="64"] { --cw: 16px; }
.st-grid[data-res="128"] { --cw: 12px; }
.st-grid.is-wide { width: max(calc(var(--lab) + (100% - var(--lab)) * var(--z)), calc(var(--lab) + var(--cols) * var(--cw) * var(--z))); }
.st-grid.is-wide .st-ruler { touch-action: pan-x; }
/* breit: der Finger verschiebt das Raster in beide Richtungen; gemalt wird nach kurzem Halten (ui.js) */
.st-grid.is-wide .st-surface { touch-action: pan-x pan-y; }
.st-surface.is-hold { outline: 2px solid var(--p); outline-offset: -2px; }
.st-grid.is-zoom .st-tick { overflow: visible; white-space: nowrap; }
/* feines Raster: die Marke ist eine Linie und läuft flüssig (Lage per transform, Breite = eine Spalte) */
.st-head.is-fine { background: none; border-left: 2px solid var(--accent); }
.st-gridwrap.is-wide { scroll-behavior: auto; }
/* Zoom-Regler in der Pattern-Leiste */
.st-zoombox { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); }
.st-zoom { width: 84px; accent-color: var(--text); cursor: pointer; }
/* Noten: Griffe, Zeiger, Vorschau beim Ziehen (B-07) */
.st-rows[data-hover="size"], .st-rows[data-hover="left"], .st-rows.is-sizing { cursor: ew-resize; }
.st-rows[data-hover="grab"] { cursor: grab; }
.st-rows.is-grabbing { cursor: grabbing; }
.st-note.is-grip::after, .st-note.is-hover::after { top: 18%; bottom: 18%; width: 3px; background: var(--white); }
.st-gb.is-grip::before, .st-gb.is-hover::before { box-shadow: inset 0 0 0 1.5px var(--gc), inset -3px 0 0 var(--white); }
.st-note.is-ghost::before, .st-gb.is-ghost::before { background: none; box-shadow: inset 0 0 0 1px var(--text-mute); }
.st-note.is-ghost::after, .st-gb.is-ghost::after { display: none; }
.st-note.is-drag::before { box-shadow: 0 0 0 1px var(--white), 0 4px 12px -2px var(--shadow-drop); }

/* Ebene: feine Drum-Schläge, Slide, Glitch-Blöcke */
.st-fm { position: absolute; left: calc(var(--x) * 100% / var(--cols)); top: calc(var(--y) * 100% / var(--nr)); width: 3px; height: calc(100% / var(--nr)); margin-left: -1px; }
.st-fm::before { content: ""; position: absolute; left: 0; right: 0; top: 22%; bottom: 22%; border-radius: var(--r-2xs); background: var(--rc, var(--p)); opacity: 0.6; }
.st-fm.is-loud::before { top: 10%; bottom: 10%; background: var(--white); opacity: 1; }
.st-note.is-slide::before { right: -2px; border-top-right-radius: 0; border-bottom-right-radius: 0; background-image: linear-gradient(90deg, var(--p) 70%, var(--white)); }
.st-note.is-slide::after { display: none; }
/* C2 (B-08): Slide an der Form – Pfeilspitze am Ende, senkrechte Verbindung am Beginn der Zielnote */
.st-note.is-slide::before { clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%); }
.st-note.is-slide.is-cut-r::before { clip-path: none; }
.st-glide { position: absolute; left: calc(var(--x) * 100% / var(--cols)); top: calc(var(--y) * 100% / var(--nr)); width: 2px; height: calc(var(--h, 1) * 100% / var(--nr)); margin-left: -1px; background: var(--p); opacity: 0.6; pointer-events: none; }
.st-gb { position: absolute; left: calc(var(--x) * 100% / var(--cols)); top: calc(var(--y) * 100% / var(--nr)); width: max(3px, calc(var(--l) * 100% / var(--cols))); height: calc(100% / var(--nr)); --gc: var(--c-glitch, var(--p)); }
.st-gb::before { content: ""; position: absolute; inset: 2px 1px; border-radius: var(--r-2xs); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--gc); }
@supports (color: color-mix(in srgb, red, blue)) { .st-gb::before { background: color-mix(in srgb, var(--gc) 38%, var(--surface-2)); } }
.st-gb.is-strong::before { background: var(--gc); box-shadow: 0 0 9px -2px var(--gc); }
.st-gb.is-joined::before { left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: inset 0 0 0 1.5px var(--gc), inset 3px 0 0 var(--white); }
.st-gb[data-rule]::after { content: attr(data-rule); position: absolute; left: 4px; top: 50%; transform: translateY(-50%); max-width: calc(100% - 6px); overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); line-height: 1; white-space: nowrap; color: var(--white); text-shadow: 0 0 3px var(--shadow-drop); }
.st-row[data-g="glitch"] .st-cell { cursor: crosshair; }

/* Aufklappfelder: Roll, Block, Export, Pattern-Wahl */
.st-rollpop, .st-blockpop, .st-exportpop { width: 340px; max-width: calc(100vw - 16px); }
.st-pop-f { display: grid; gap: 4px; margin-top: 10px; }
.st-pop-note { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-mute); }
.st-pop-fl { font-size: var(--fs-2xs); color: var(--text-mute); }
.st-pop-f .seg { flex-wrap: wrap; }
.st-pop-f .st-select { width: 100%; }
.st-ppick { width: 230px; }
.st-pp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 6px; }
.st-pp { position: relative; height: 40px; font-family: var(--mono); font-weight: var(--fw-semi); color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; border-radius: var(--r-xs); cursor: pointer; box-shadow: inset 0 -2px 0 var(--pc, transparent); }
.st-pp:not(.has-notes) { color: var(--text-dim); }
.st-pp[aria-pressed="true"] { color: var(--on-sel); background: var(--sel); }
.st-pp.is-rest { width: 100%; font-family: var(--font); font-weight: var(--fw-medium); }
.st-pp:hover { background: rgba(255, 255, 255, 0.1); }
.st-pp[aria-pressed="true"]:hover { background: var(--white); }
.st-lib-v4 { margin-left: 6px; padding: 0 5px; font-size: var(--fs-2xs); font-style: normal; color: var(--warn); border: 1px solid currentColor; border-radius: var(--r-2xs); }

/* Song: Abschnitte */
.st-song-head { align-items: center; }
.st-sec-add { margin-left: auto; }
.st-song-over { margin: 0 0 8px; }
.st-secs { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.st-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 3px 4px 3px 3px; border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.035); border-left: 3px solid var(--pc, var(--line-3)); }
.st-sec.is-now { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--accent); }
.st-sec.is-cut { border-left-style: dashed; }
.st-sec.is-over { opacity: 0.55; border-left-style: dotted; }
.st-sec-p { width: 44px; flex: 0 0 auto; }
.st-sec-m { margin-left: auto; }
.st-sec-go { flex: 0 1 150px; display: flex; align-items: center; gap: 8px; min-width: 0; height: var(--ctl); padding: 0 8px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-dim); background: none; border: 0; border-radius: var(--r-xs); cursor: pointer; text-align: left; }
.st-sec-go:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.st-sec-go .st-ic { width: 14px; height: 14px; flex: 0 0 auto; color: var(--pc, var(--text-mute)); }
.st-sec-bar { min-width: 44px; color: var(--text); }
/* Pattern-Buchstabe im Abschnitt: neutral (die Gruppenfarbe steht als Strich links am Abschnitt) */
.st-sec-p { height: var(--ctl); font-family: var(--mono); font-weight: var(--fw-semi); color: var(--text); background: rgba(255, 255, 255, 0.1); border: 0; border-radius: var(--r-xs); cursor: pointer; transition: background var(--dur-1); }
.st-sec-p:hover { background: rgba(255, 255, 255, 0.16); }
.st-sec.is-rest .st-sec-p { color: var(--text-dim); }
.st-sec-reps { display: inline-flex; align-items: center; gap: 2px; }
.st-sec-x { min-width: 38px; font-family: var(--mono); font-size: var(--fs-xs); text-align: center; color: var(--text); }
.st-sec-n, .st-sec-m { width: 28px; min-width: 28px; height: 28px; padding: 0; }
.st-sec-lim { font-size: var(--fs-2xs); white-space: nowrap; color: var(--warn); }
.st-sec-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 4px; font-size: var(--fs-st-md); color: var(--text-mute); }
/* C2 (B-11): Griff zum Ziehen, Vorschau der Einfügestelle, gewählter Abschnitt */
.st-sec-grip { grid-row: auto; grid-column: auto; width: 24px; height: var(--ctl); flex: 0 0 auto; }
.st-sec-grip:hover, .st-sec.is-drag .st-sec-grip { opacity: 1; color: var(--text); }
.st-sec.is-drag { position: relative; z-index: var(--z-float); transform: translateY(var(--dy, 0)); background: var(--surface-3); box-shadow: var(--shadow-2); }
.st-sec.is-drag .st-sec-grip { cursor: grabbing; }
.st-sec.is-drop-before { box-shadow: 0 -2px 0 var(--sel); }
.st-sec.is-drop-after { box-shadow: 0 2px 0 var(--sel); }
.st-sec.is-pick { box-shadow: inset 0 0 0 1px var(--sel); }
.st-sec.is-now.is-pick { box-shadow: inset 0 0 0 1px var(--accent); }
/* Arrangement-Leiste: ein Balken je Abschnitt, Breite = Dauer; Strich in der Gruppenfarbe des Patterns */
.st-arr { position: relative; height: 34px; margin: 0 0 8px; overflow: hidden; border-radius: var(--r-xs); background: var(--dv-1, var(--cell)); }
.st-arr-blocks { position: absolute; inset: 0; }
.st-arr-b { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); width: calc(var(--w) * 100%); min-width: 2px; padding: 0; overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); color: var(--text); background: var(--cell); border: 0; border-right: 1px solid var(--bg-soft); box-shadow: inset 0 -3px 0 var(--pc, var(--line-3)); cursor: pointer; }
.st-arr-b:hover { background: var(--cell-hover); }
.st-arr-b.is-rest { color: var(--text-mute); background: none; box-shadow: none; }
.st-arr-b.is-cut { background-image: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px); }
.st-arr-b.is-over { opacity: var(--st-off); }
.st-arr-b.is-now { color: var(--on-sel); background: var(--sel); }
.st-arr-b[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--pc, var(--line-3)), inset 0 0 0 1px var(--sel); }
.st-arr-b:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }
.st-arr-l { pointer-events: none; }
.st-arr-lim { position: absolute; top: 0; bottom: 0; left: calc(var(--pos) * 100%); width: 0; border-left: 2px dashed var(--warn); pointer-events: none; }
.st-arr-lim-t { position: absolute; top: 1px; left: 3px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--warn); }
.st-arr-head { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border-left: 2px solid var(--accent); transform: translateX(calc(var(--pos, 0) * 100%)); pointer-events: none; will-change: transform; }
@media (max-width: 760px) {
  /* Patterns: eine Zeile, waagrecht scrollbar (16 × 44 px), darunter Raster-Auflösung, Fill, Break */
  .st-patbar { padding: 6px 8px; gap: 6px; }
  .st-pbar-l { display: none; }
  .st-pbar-p { flex: 1 1 100%; width: 100%; min-width: 0; gap: 3px; margin: -3px -8px; padding: 3px 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .st-pbar-p::-webkit-scrollbar { display: none; }
  .st-pb { width: var(--hit); min-width: var(--hit); font-size: var(--fs-xs); }
  .st-pb:nth-child(4n + 1):not(:first-child) { margin-left: 8px; }
  .st-pbar-r { width: 100%; margin-left: 0; }
  .st-res .seg-btn { min-width: 40px; }
  .st-gridwrap.is-wide { overflow-x: auto; overflow-y: hidden; }
  .st-grid[data-res="32"] { --cw: 26px; }
  .st-grid[data-res="64"] { --cw: 18px; }
  .st-grid[data-res="128"] { --cw: 14px; }
  .st-sec { gap: 2px 4px; }
  .st-sec-go { flex: 1 1 96px; padding: 0 4px; gap: 5px; }
  .st-sec-t { display: none; }
  .st-sec-lim { order: 9; flex: 1 1 100%; padding-left: 26px; }
  .st-sec-n, .st-sec-m { width: var(--ctl); min-width: var(--ctl); height: var(--ctl); }
  .st-sec-x { min-width: 44px; }
}

/* Korrekturrunde 2: «Alle 16» gedrückt bleibt lesbar; «+ Abschnitt» bleibt beim Scrollen der Liste an seinem Platz */
.st-song-head { position: sticky; top: 0; z-index: var(--z-float); padding: 6px 0; margin-top: -6px; background: var(--st-panel-bg); }
/* Telefon: jedes Feld wächst mit seinem Inhalt und die Seite (.st-body) scrollt senkrecht bis zum letzten Element;
   das gezoomte Raster scrollt zusätzlich waagrecht. Vorher schnitten minmax(0, 1fr)-Zeilen und overflow: hidden ab. */
@media (max-width: 760px) {
  .st-body { align-content: start; }
  .st-main { min-height: auto; align-content: start; }
  .st-editor { grid-template-rows: auto auto auto; min-height: auto; }
  .st-panel { grid-template-rows: auto auto; min-height: auto; }
  .st-pbody { overflow: visible; }
  .st-gridwrap.is-wide { overflow-x: auto; overflow-y: hidden; height: auto; }
  /* Umschalter «1–8 | 9–16»: Platz bleibt reserviert, damit beim Rasterwechsel nichts springt */
  .st-pages[hidden] { display: inline-flex !important; visibility: hidden; }
  .st-ms, .st-strip .st-ms { width: var(--ctl); height: var(--ctl); }
  .st-strip { grid-template-columns: 24px minmax(0, 1fr) 132px; }
  /* Kette: Takt und Startzeit untereinander im Abspiel-Knopf */
  .st-sec-go { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.15; position: relative; padding-left: 24px; }
  .st-sec-go > .st-ic { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
  .st-sec-t { display: block; font-size: var(--fs-2xs); color: var(--text-mute); }
}
/* abgeschnittene Texte: Hinweis und Papierkorb-Zeit dürfen umbrechen; Glitch-Zeilennamen am Telefon breiter */
.st-hint-t { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.st-lib-row.is-gone .st-lib-open small { white-space: normal; }
@media (max-width: 760px) { .st-app[data-track="glitch"] { --lab: 74px; } .st-app[data-track="glitch"] .st-lab-t { font-size: var(--fs-2xs); } }
/* Politur: Namen im Papierkorb bekommen den Platz (brechen um statt «…»); Taktzahlen am Telefon bleiben oben stehen
   (nur ungezoomt: im Zoom scrollt das Raster selbst waagrecht, sticky würde dort am eigenen Rahmen kleben) */
.st-lib-row.is-gone .st-lib-name strong { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) { .st-ruler { top: 0; } .st-grid:not(.is-wide) .st-ruler { z-index: var(--z-sticky); } }
/* R13 (B): im Zoom scrollt das Raster am Telefon selbst waagrecht (sticky greift dort nicht senkrecht): ui.js schiebt
   das Lineal per transform an die Oberkante des scrollenden Bereichs (--ry), über den Zeilen */
@media (max-width: 760px) { .st-grid.is-wide .st-ruler { transform: translateY(var(--ry, 0px)); } }
/* grober Zeiger: Zellen im Zoom nicht schmaler als ein Fingertipp braucht (das Raster wird dafür breiter) */
@media (pointer: coarse) {
  .st-grid[data-res="32"] { --cw: 30px; }
  .st-grid[data-res="64"] { --cw: 26px; }
  .st-grid[data-res="128"] { --cw: 22px; }
}

/* === GlitchButler-Gerät (glitch-ui.js) === */
.gl-dev { display: flex; flex-direction: column; gap: var(--st-5); min-width: 0; }
.gl-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-3) var(--st-4); }
.gl-top-gap { flex: 1 1 auto; }
.gl-main { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--st-6) var(--st-7); align-items: start; }

/* Maschinen-Reiter PAINT | SLICE (Muster .snd-tabs/.snd-tab): Punkt = Pattern hat Inhalt, durchgestrichen = Maschine aus */
.gl-mtab { gap: var(--st-3); font-family: var(--mono); letter-spacing: 0.06em; }
.gl-mtab .gl-mdot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--line-2); }
.gl-mtab.has-content .gl-mdot { background: var(--p); }
.gl-mtab.is-off > span { text-decoration: line-through; text-decoration-thickness: 1px; opacity: 0.7; }

/* Übersicht: 16 Kacheln im Signalweg, je eine Mini-Spur mit den Blöcken des Patterns */
.gl-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--st-2); }
.gl-tile {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: var(--st-2); min-width: 0; min-height: 44px;
  padding: var(--st-3); text-align: left; color: var(--text-dim); background: var(--dv-1);
  border: 1px solid var(--border); border-radius: var(--r-xs); cursor: pointer; transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.gl-tile:nth-child(n+13) { background: transparent; }      /* Reso, Prism, Echo, Space: klingen aus */
.gl-tile:hover { color: var(--text); border-color: var(--border-2); }
/* gewählter Effekt: neutral hell umrandet (Auswahl), die Spurfarbe bleibt den Blöcken in der Mini-Spur */
.gl-tile[aria-checked="true"] { color: var(--text); border-color: var(--text-dim); background: var(--dv-3); }
.gl-tname { overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: 0.06em; white-space: nowrap; text-overflow: ellipsis; padding-right: var(--st-6); }
.gl-badges b.gl-be { align-self: center; width: 5px; height: 5px; border-radius: 50%; background: var(--text-mute); }
.gl-badges { position: absolute; top: var(--st-2); right: var(--st-2); display: flex; gap: var(--st-1); }
.gl-badges b { display: inline-grid; place-items: center; min-width: 14px; height: 14px; padding: 0 var(--st-1); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); line-height: 1; border-radius: var(--r-2xs); }
.gl-bm { color: var(--on-color); background: var(--p); }
.gl-bl { color: var(--text); background: var(--cell-hover); }
.gl-lane { position: relative; display: block; height: 5px; overflow: hidden; background: var(--dv-2); border-radius: var(--r-2xs); }
.gl-lane > i { position: absolute; top: 0; bottom: 0; left: calc(var(--l, 0) * 100%); width: max(2px, calc(var(--w, 0) * 100%)); background: var(--p); opacity: 0.6; }
.gl-lane > i.is-strong { opacity: 1; box-shadow: 0 0 5px var(--p-glow); }
.gl-tile:not(.is-used) .gl-lane { opacity: 0.6; }

/* gewählter Effekt */
.gl-fx { display: flex; flex-direction: column; gap: var(--st-5); min-width: 0; }
.gl-fx-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--st-4) var(--st-5); }
.gl-fx-title { min-width: 0; flex: 1 1 220px; }
.gl-fx-title h3 { margin: 0; font-family: var(--mono); font-size: var(--fs-st-md); letter-spacing: 0.12em; color: var(--text); }
.gl-fx-title p { margin: var(--st-1) 0 0; font-size: var(--fs-st-md); line-height: 1.4; color: var(--text-dim); }
.gl-fx-use { display: inline-block; margin-top: var(--st-1); font-size: var(--fs-2xs); color: var(--text-mute); }
.gl-fx-use.is-used { color: var(--p); }
.gl-fx-acts { display: flex; flex-wrap: wrap; gap: var(--st-3); }
.gl-fx-acts .tgl { min-height: var(--ctl); padding: 0 var(--st-5); font-size: var(--fs-xs); }
.gl-knobs { gap: var(--st-5) var(--st-6); }
.gl-knobs .knob.gl-big { --size: 52px; width: 76px; }
.gl-more { align-self: flex-start; height: var(--ctl); font-size: var(--fs-xs); }
.gl-strong { margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-mute); }
.gl-strong b { font-weight: var(--fw-medium); color: var(--text-dim); }
.gl-modded { position: relative; }
.gl-modded::after {
  content: attr(data-mod); position: absolute; top: -3px; right: var(--st-1); padding: 1px 3px; font-family: var(--mono); font-size: var(--fs-2xs);
  font-weight: var(--fw-semi); line-height: 1.2; color: var(--on-color); background: var(--p); border-radius: var(--r-2xs); pointer-events: none;
}
.knob.gl-modded .knob-ring { box-shadow: 0 0 0 1px var(--p-line), 0 0 10px var(--p-glow); }

/* Modulatoren */
.gl-mods { display: flex; flex-direction: column; gap: var(--st-4); padding-top: var(--st-5); border-top: 1px solid var(--border); }
.gl-mods-head { display: flex; align-items: center; justify-content: space-between; gap: var(--st-4); }
.gl-mods-head h4 { margin: 0; font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--text-mute); }
.gl-addmod { height: var(--ctl); font-size: var(--fs-xs); }
.gl-mods-help { margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-mute); }
.gl-mod { display: flex; flex-direction: column; gap: var(--st-3); padding: var(--st-4); background: var(--dv-1); border: 1px solid var(--border); border-radius: var(--r-sm); }
.gl-mod.is-off { opacity: var(--st-off); }
.gl-mrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--st-3) var(--st-4); min-width: 0; }
.gl-mrow .snd-field { min-width: 0; flex: 1 1 110px; max-width: 190px; }
.gl-mrow .st-select { width: 100%; }
.gl-arrow { align-self: flex-end; padding-bottom: var(--st-4); color: var(--text-mute); }
.gl-mon, .gl-flag { min-height: var(--ctl); padding: 0 var(--st-4); font-size: var(--fs-xs); }
.gl-mon { font-family: var(--mono); font-weight: var(--fw-semi); }
.gl-mdel { margin-left: auto; }
.gl-msrc { margin: 0; font-size: var(--fs-2xs); line-height: 1.4; color: var(--text-mute); }
.gl-stepsbox { display: flex; flex-direction: column; gap: var(--st-2); }
.gl-steps {
  display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: var(--st-1); height: 56px; padding: var(--st-1);
  background: var(--well); border: 1px solid var(--border); border-radius: var(--r-xs); cursor: crosshair; touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.gl-steps:focus-visible { outline: 2px solid var(--p); outline-offset: 1px; }
.gl-bar { position: relative; display: block; background: var(--dv-2); border-radius: var(--r-2xs); overflow: hidden; }
.gl-bar.is-beat { background: var(--dv-3); }
.gl-bar > i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v, 0.5) * 100%); background: var(--p); opacity: 0.75; }
.gl-steps:focus-visible .gl-bar.is-at > i { opacity: 1; box-shadow: 0 0 6px var(--p-glow); }

/* Muster und Würfel (Aufklapp-Felder) */
.gl-pop { width: min(380px, calc(100vw - 24px)); }
.gl-patlist { display: flex; flex-direction: column; gap: var(--st-1); max-height: min(60vh, 460px); overflow-y: auto; }
.gl-patitem {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: var(--st-5); width: 100%; min-height: 40px; padding: var(--st-2) var(--st-4);
  text-align: left; color: var(--text-dim); background: var(--dv-1); border: 1px solid transparent; border-radius: var(--r-xs); cursor: pointer;
}
.gl-patitem:hover, .gl-patitem:focus-visible { color: var(--text); border-color: var(--border-2); background: var(--dv-2); }
.gl-patname { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-st-md); }
.gl-patname small { overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.05em; white-space: nowrap; text-overflow: ellipsis; color: var(--text-mute); }
.gl-prev { display: flex; flex-direction: column; justify-content: center; gap: var(--st-1); }
.gl-prev .gl-lane { height: 4px; }
.gl-dicerow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-4); }
.gl-lockh { margin: var(--st-5) 0 var(--st-3); }
.gl-locks { display: flex; flex-wrap: wrap; gap: var(--st-2); }
.gl-lockchip { height: calc(var(--ctl) - var(--st-2)); padding: 0 var(--st-4); font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.05em; }
.gl-dicego { flex-wrap: wrap; }
.gl-dicego .st-chip.is-go { color: var(--on-color); background: var(--p); border-color: transparent; }

/* SLICE */
.sl-body { display: flex; flex-direction: column; gap: var(--st-5); min-width: 0; }
/* Maschine und Pattern-Kopf fliessen als eine Zeile (bricht nur zwischen Bedienelementen um, B-24: Platz für die Spuren) */
.sl-heads { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--st-4) var(--st-6); min-width: 0; }
.sl-heads > .sl-row { display: contents; }
.sl-heads .gl-top-gap { display: none; }
.sl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--st-4) var(--st-6); min-width: 0; }
.sl-row .snd-field { min-width: 0; flex: 0 1 150px; }
.sl-row .st-select { width: 100%; }
.sl-tgl { min-height: var(--ctl); padding: 0 var(--st-5); font-size: var(--fs-xs); }
.sl-freeze {
  min-height: var(--ctl); padding: 0 var(--st-6); font-family: var(--mono); font-size: var(--fs-xs); font-weight: var(--fw-semi); letter-spacing: 0.12em;
  color: var(--text-dim); background: var(--dv-1); border: 1px solid var(--border-2); border-radius: var(--r-xs); cursor: pointer;
}
.sl-freeze[aria-pressed="true"] { color: var(--on-color); background: var(--p); border-color: transparent; box-shadow: 0 0 12px var(--p-glow); }
.sl-stages { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-2) var(--st-3); }
.sl-stagechips { display: flex; flex-wrap: wrap; gap: var(--st-1); }
.sl-stage { height: var(--ctl); padding: 0 var(--st-4); font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.05em; }
.sl-stage[aria-pressed="true"] { color: var(--on-sel); border-color: transparent; background: var(--sel); }
.sl-stmove { height: var(--ctl); min-width: var(--ctl); }

/* Raster: Spurkopf bleibt stehen (sticky), die Schritte nutzen die volle Breite und scrollen schmal seitlich.
   Kopf am Desktop: Name/Pinsel links, M S L rechts in einer Zeile (Spur 40 px hoch); grober Zeiger/Telefon: untereinander, 44 px. */
.sl-scroll { display: flex; flex-direction: column; gap: var(--st-2); min-width: 0; }
.sl-grid {
  --head: 184px; --step: max(30px, var(--hit)); display: flex; flex-direction: column; gap: var(--st-1); overflow-x: auto; padding-bottom: var(--st-2);
  overscroll-behavior-x: contain; scrollbar-width: thin;
}
.sl-lane {
  display: grid; grid-template-columns: var(--head) repeat(var(--steps, 16), minmax(var(--step), 1fr)); gap: var(--st-1); align-items: stretch;
  width: 100%; min-width: calc(var(--head) + var(--steps, 16) * (var(--step) + var(--st-1))); min-height: calc(var(--ctl) + var(--st-4));
}
.sl-lane > * { grid-row: 1; }
.sl-lane > :not(.sl-head) { grid-column: var(--c) / span var(--n, 1); }
.sl-head {
  position: sticky; left: 0; z-index: var(--z-lift); grid-column: 1; display: flex; align-items: stretch; gap: var(--st-1); min-width: 0;
  padding-right: var(--st-2); background: var(--st-panel-bg);
}
.sl-nums { min-height: 0; }
.sl-nums > span:not(.sl-head) { font-family: var(--mono); font-size: var(--fs-2xs); text-align: center; color: var(--text-mute); }
.sl-nums > span.is-beat { color: var(--text-dim); }
.sl-lname {
  display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: var(--st-1) var(--st-3); text-align: left; color: var(--text);
  background: var(--dv-1); border: 1px solid var(--border); border-radius: var(--r-xs); cursor: pointer;
}
.sl-lname b { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; }
.sl-lname small { max-width: 100%; overflow: hidden; font-size: var(--fs-2xs); white-space: nowrap; text-overflow: ellipsis; color: var(--text-mute); }
.sl-lname:hover { border-color: var(--border-2); }
.sl-hbtns { display: flex; flex: 0 0 auto; gap: var(--st-1); }
.sl-hbtn {
  flex: 1 1 0; min-width: var(--hit); padding: 0; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); color: var(--text-mute);
  background: var(--dv-1); border: 1px solid var(--border); border-radius: var(--r-2xs); cursor: pointer;
}
.sl-hbtn[aria-pressed="true"] { color: var(--on-sel); background: var(--text-dim); border-color: transparent; }
.sl-lock { display: inline-grid; place-items: center; }
.sl-lock .st-ic, .sl-lock .st-ic svg { width: 12px; height: 12px; }
.sl-lane.is-muted .sl-cell, .sl-lane.is-muted .sl-brick { opacity: var(--st-off); }
.sl-lane.is-solo .sl-lname { border-color: var(--ok); }
.sl-cell {
  min-width: 0; padding: 0; background: var(--dv-1); border: 1px solid transparent; border-radius: var(--r-2xs); cursor: pointer;
}
.sl-cell.is-beat { background: var(--dv-2); }
.sl-cell:hover { border-color: var(--border-2); }
.sl-brick {
  position: relative; display: flex; align-items: center; min-width: 0; padding: 0 15px 0 4px; overflow: hidden; text-align: left;
  color: var(--on-sel); background: var(--sl-c, var(--p)); border: 1px solid transparent; border-radius: var(--r-xs); cursor: pointer;
}
/* Farbe je Spur (Baustein-Gruppe), Form: ORDER/LOOP eckig, SHAPE/FILTER rund, Effekte mit Kerbe */
.sl-brick[data-lane="order"] { --sl-c: var(--sl-order); border-radius: var(--r-2xs); }
.sl-brick[data-lane="loop"] { --sl-c: var(--sl-loop); border-radius: var(--r-2xs); }
.sl-brick[data-lane="shape"] { --sl-c: var(--sl-shape); border-radius: var(--r-sm); }
.sl-brick[data-lane="filter"] { --sl-c: var(--sl-filter); border-radius: var(--r-sm); }
.sl-brick[data-lane="fxa"] { --sl-c: var(--sl-fxa); border-radius: var(--r-xs) var(--r-2xs) var(--r-xs) var(--r-2xs); }
.sl-brick[data-lane="fxb"] { --sl-c: var(--sl-fxb); border-radius: var(--r-2xs) var(--r-xs) var(--r-2xs) var(--r-xs); }
/* Ein Schritt breit: Kurzform mittig über die ganze Breite (der Griff liegt durchsichtig darüber, Balken schmal am Rand) */
.sl-brick[data-n="1"] { justify-content: center; padding: 0 1px; }
.sl-brick[data-n="1"] .sl-bname { text-overflow: clip; letter-spacing: -0.04em; }
.sl-brick[data-n="1"] .sl-grip::after { right: 0; width: 2px; }
.sl-brick.is-sel { outline: 2px solid var(--text); outline-offset: 1px; }
.sl-brick.is-chance { background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--well) 5px 7px); }
.sl-brick.is-cond { border-color: var(--on-sel); border-style: dashed; }
.sl-bname { overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: 0.03em; white-space: nowrap; text-overflow: ellipsis; }
.sl-bmod { position: absolute; top: 0; right: 5px; font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-semi); pointer-events: none; }
/* Griff: 14 px Fangbreite (Finger 24 px), sichtbar nur als schmaler Balken am Rand */
.sl-grip { position: absolute; z-index: var(--z-raise); top: 0; right: 0; bottom: 0; width: 14px; cursor: ew-resize; touch-action: none; }
.sl-grip::after { content: ""; position: absolute; top: var(--st-2); bottom: var(--st-2); right: var(--st-1); width: 3px; border-radius: var(--r-2xs); background: var(--dv-shade); }
.sl-brick:hover .sl-grip::after, .sl-brick.is-sel .sl-grip::after { background: var(--dv-shade-hi); }
.sl-rulehelp { flex: 1 1 100%; margin: 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--text-mute); }
/* versteckte Beschreibungen (aria-describedby) bleiben unsichtbar, auch wo eine Regel span sichtbar macht */
.snd-desc[hidden], .gl-sr[hidden] { display: none !important; }
.sl-cell:focus-visible, .sl-brick:focus-visible, .sl-lname:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.sl-gridhelp, .sl-help { margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-mute); }

/* Baustein-Editor */
.sl-editor { display: flex; flex-direction: column; gap: var(--st-5); padding: var(--st-5); background: var(--dv-1); border: 1px solid var(--border); border-radius: var(--r-sm); }
.sl-editor.is-empty { padding: var(--st-4) var(--st-5); }
.sl-editor.is-empty .st-help { margin: 0; }
.sl-edhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--st-4) var(--st-5); }
.sl-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-2); }
.sl-act { height: var(--ctl); min-width: var(--ctl); padding: 0 var(--st-4); }
.sl-len { min-width: 20px; font-family: var(--mono); font-size: var(--fs-xs); text-align: center; color: var(--text-dim); }
.sl-values { gap: var(--st-5) var(--st-6); }
.sl-value { display: flex; flex-direction: column; align-items: center; gap: var(--st-2); min-width: 0; }
.sl-vsel { min-width: 110px; }
.sl-modchip {
  max-width: 110px; height: var(--hit); padding: 0 var(--st-3); overflow: hidden; font-family: var(--mono); font-size: var(--fs-2xs); white-space: nowrap; text-overflow: ellipsis;
  color: var(--text-mute); background: transparent; border: 1px dashed var(--border-2); border-radius: var(--r-pill); cursor: pointer;
}
.sl-modchip.is-on { color: var(--on-color); background: var(--p); border: 1px solid transparent; }
.sl-rules { padding-top: var(--st-4); border-top: 1px solid var(--border); }

/* Auswahl der Bausteine */
.sl-pbricks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--st-2); max-height: min(42vh, 320px); overflow-y: auto; }
.sl-pbrick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-height: 44px; padding: var(--st-2) var(--st-4); text-align: left;
  color: var(--text-dim); background: var(--dv-1); border: 1px solid var(--border); border-radius: var(--r-xs); cursor: pointer;
}
.sl-pbrick b { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text); }
.sl-pbrick small { font-size: var(--fs-2xs); line-height: 1.3; color: var(--text-mute); }
.sl-pbrick:hover { color: var(--text); border-color: var(--line-3); }
.sl-ph { margin: var(--st-5) 0 var(--st-2); }
.sl-ppresets { display: flex; flex-wrap: wrap; gap: var(--st-2); }
.sl-cat { margin: var(--st-4) 0 var(--st-1); }
.gl-locknote { margin-top: var(--st-3); }

@media (max-width: 760px) {
  .gl-main { grid-template-columns: minmax(0, 1fr); }
  .gl-mon, .gl-flag, .gl-fx-acts .tgl, .sl-act, .sl-stage, .sl-stmove { min-height: var(--ctl); height: var(--ctl); }
}
/* schmal oder grober Zeiger: Spurkopf untereinander (Name, dann M S L), Schritte und Knöpfe mit Fingerfläche */
@media (max-width: 760px), (pointer: coarse) {
  .sl-grid { --head: 132px; }
  .sl-head { flex-direction: column; }
  .sl-lname { min-height: var(--ctl); }
  .sl-hbtn { min-width: 0; height: var(--hit); }
  .sl-lane.sl-nums { min-height: 0; }
}
@media (max-width: 480px) {
  .sl-grid { --head: 112px; }
  .sl-stage { padding: 0 var(--st-3); }
  .sl-stages > .st-mini { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .gl-tile { padding: var(--st-3) var(--st-2); }
  .gl-tname { letter-spacing: 0.02em; padding-right: var(--st-5); }
  .gl-mrow .snd-field { max-width: none; }
  .gl-patitem { grid-template-columns: minmax(0, 1fr) 84px; }
}
@media (pointer: coarse) {
  .snd-tab, .snd-cats .st-chip { min-height: var(--hit); }
  .kit-pad { height: var(--hit); }
  .st-pane .knob.is-small { min-height: var(--hit); }
  .gl-tile { min-height: 48px; }
  .gl-lockchip { height: var(--hit); }
  .sl-grip { width: var(--hit); }
  .sl-brick { padding-right: var(--hit); }
  .sl-brick[data-n="1"] { padding-right: 1px; }
}
/* === Ende GlitchButler-Gerät === */

/* ---------- Druck (Gegenstück zu style.css) ---------- */
@media print {
  .st-toast { display: none !important; }
}

/* ---------- Trefferflächen bei grobem Zeiger (U-17, B-27) ----------
   Telefon: --ctl ist dort 44 px (echte Höhe). Tablet/Touch-Laptop ab 761 px: die Optik bleibt 32 px, die Fläche wächst
   unsichtbar per ::after auf 44 px Höhe; seitlich nur 2 px, damit Nachbarn (Abstand ≥ 4 px) sich nicht überdecken. */
@media (pointer: coarse) {
  .st-app { --hit: 44px; }
  .st-app :is(.st-tool, .st-chip, .seg-btn, .st-ms, .st-ptab, .st-rec, .snd-load, .st-sec-p, .st-sec-go)::after {
    content: "";
    position: absolute;
    top: min(0px, calc((100% - var(--hit)) / 2));
    bottom: min(0px, calc((100% - var(--hit)) / 2));
    left: -2px;
    right: -2px;
  }
  .st-app :is(.st-sec-p, .st-sec-go, .snd-load, .st-ptab) { position: relative; }
  .st-sizer { top: -12px; height: 24px; }
  .st-sizer::after { top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-app :is(.st-tool, .st-chip, .st-ms, .st-pb, .st-pp, .st-ptab, .st-view, .snd-tab, .seg-btn, .st-rec, .st-play, .st-add, .kit-pad, .gl-tile, .sl-act, .sl-stage):active { transform: none; }
  .st-toast { transform: none; transition: opacity var(--dur-1), visibility 0s linear var(--dur-1); }
}

/* === W2a === */
/* B-02: der Folgen-Chip behält im Song-Modus seinen Platz; im Stillstand unsichtbar (nicht bedienbar, nicht vorgelesen) */
.st-follow { min-width: 120px; }
.st-follow.is-idle { visibility: hidden; }

/* U-10: bleibende Fortschrittszeile des Exports mit «Abbrechen» */
.st-export { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--line-2); background: var(--surface-3); font-size: var(--fs-xs); }
.st-export[hidden] { display: none; }
.st-export-label { flex: 0 1 auto; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-export-bar { flex: 1 1 160px; min-width: 80px; height: 6px; appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; }
.st-export-bar::-webkit-progress-bar { background: var(--line-2); border-radius: var(--r-pill); }
.st-export-bar::-webkit-progress-value { background: var(--accent, currentColor); border-radius: var(--r-pill); transition: width var(--dur-2); }
.st-export-bar::-moz-progress-bar { background: var(--accent, currentColor); border-radius: var(--r-pill); }

/* U-29: Rückfrage-Dialog; die gefährliche Aktion gefüllt in --danger (B-20) */
.st-ask { max-width: min(420px, calc(100vw - 32px)); }
.st-ask-x { margin: 0 0 16px; font-size: var(--fs-st-md); line-height: 1.45; color: var(--text-mute); }
.st-ask .st-dlg-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.st-ask .st-chip.is-danger { color: var(--bg, #000); background: var(--danger); border-color: var(--danger); }
.st-ask .st-chip.is-danger:hover { color: var(--bg, #000); background: var(--danger); filter: brightness(1.08); }

/* U-08: «Aus Zwischenablage einfügen» unter dem Feld */
.st-openpop > .st-chip { margin-top: 8px; }

/* Bittiefe im Export-Dialog */
.st-exportpop .st-pop-row .seg { flex: 0 0 auto; }

/* Abschnitt für W2a (ui.js, menu.js, tour.js, stage/kit.js): neue Regeln nur hier anhängen. */

/* === W2b === */
/* Geräte-Feld: seit C3 stehen alle Regeln bei ihren Bauteilen (Abschnitte «Geräte-Feld» und «GlitchButler-Gerät»). */

/* === C1: neue Regeln Leisten und Felder (ui.js, menu.js, tour.js, Studio-HTML) === */

/* sichtbar nur unter 1024 px (schmal: was die Kopfleiste dort nicht zeigt, steht im Menü «⋯») */
@media (min-width: 1024px) { .st-only-compact { display: none !important; } }

/* ---------- B-10: Swing und Metronom in der Transportleiste (ab 1024 px) ---------- */
.st-g-groove { gap: var(--st-2); }
.st-numwrap { position: relative; display: inline-flex; align-items: center; }
.st-appbar .st-swing { width: 50px; padding-right: 18px; }
.st-pct { position: absolute; right: 7px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); pointer-events: none; }
.st-metro[aria-pressed="true"] { color: var(--on-sel); background: var(--sel); border-color: var(--sel); }
.st-metro[aria-pressed="true"]:hover:not(:disabled) { color: var(--on-sel); background: var(--white); border-color: var(--white); }
.st-metro .st-ic, .st-metro .st-ic svg { width: 16px; height: 16px; }
.st-appbar .st-playopts { min-width: 20px; width: 20px; padding: 0; border-color: transparent; background: none; }
.st-appbar .st-playopts .st-ic, .st-appbar .st-playopts .st-ic svg { width: 14px; height: 14px; }
.st-playpop { width: 300px; max-width: calc(100vw - 16px); }
@media (max-width: 1023.98px) { .st-g-groove { display: none !important; } }
/* R14 W2: Schalter «Klaviatur» (Rechner-Tastatur spielt) neben der Aufnahme; ohne Tastatur-Bedienung (schmal, nur
   Finger) weg — M schaltet trotzdem */
.st-appbar .st-piano { margin-left: 2px; }
@media (max-width: 1023.98px), (hover: none) and (pointer: coarse) { .st-appbar .st-piano { display: none; } }
/* 1024–1279: Leiste darf nicht umbrechen — Beschriftung «Swing» weg (Name im aria-label und Tooltip), schmalere Felder */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .st-unit-sw { display: none; }
  .st-appbar .st-swing { width: 44px; padding-left: 6px; }
  .st-appbar .st-g-groove { gap: 2px; }
}

/* ---------- B-10: Menü «⋯» als geordnete Liste ---------- */
.st-morepop { width: 300px; padding: 8px; }
.st-morepop .st-msec { padding: 6px 0; }
.st-morepop .st-msec h4 { margin: 4px 8px 4px; }
.st-morepop .st-msec:last-child { border-bottom: 0; padding-bottom: 0; }
.st-morepop .st-mrow { padding: 2px 8px 6px; }
.st-mlist { display: grid; gap: 1px; }
.st-mitem {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--st-4);
  width: 100%;
  min-height: var(--ctl);
  padding: 0 var(--st-4);
  font-size: var(--fs-st-md);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.st-mitem:hover, .st-mitem:focus { outline: 0; background: rgba(255, 255, 255, 0.08); }
.st-mitem:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.st-mitem[aria-disabled="true"] { color: var(--text-mute); cursor: progress; }
.st-mitem .st-ic, .st-mitem .st-ic svg { width: 16px; height: 16px; color: var(--text-dim); }
.st-mitem-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-mitem kbd { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); background: none; border: 0; }
.st-mitem[aria-busy="true"] { cursor: progress; }
/* Schalter rechts (MIDI, Ableton Link): Auswahl neutral */
.st-mswitch { position: relative; width: 26px; height: 14px; border-radius: var(--r-pill); background: var(--line-3); transition: background var(--dur-1) var(--ease); }
.st-mswitch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-dim); transition: transform var(--dur-1) var(--ease), background var(--dur-1); }
.st-mitem[aria-pressed="true"] .st-mswitch { background: var(--sel); }
.st-mitem[aria-pressed="true"] .st-mswitch::after { transform: translateX(12px); background: var(--on-sel); }
.st-mfoot > .st-mlist { flex: 1 1 100%; }
.st-morepop .st-mfoot { padding-top: 6px; }
@media (max-width: 1100px) { .st-mlist > .st-only-narrow { display: grid !important; } }
@media (max-width: 760px) { .st-mlist > .st-only-phone { display: grid !important; } .st-morepop { width: calc(100vw - 16px); } }

/* ---------- B-19: Pattern-Befehle «⋯» am Ende der Pattern-Leiste ---------- */
.st-patbar .st-pbar-more { min-width: 28px; width: 28px; height: 28px; margin-left: var(--st-1); }
.st-patbar .st-pbar-more .st-ic, .st-patbar .st-pbar-more .st-ic svg { width: 16px; height: 16px; }

/* ---------- B-31: Speicherstand als Wort neben dem Namen, kurz ein Häkchen ---------- */
.st-saved .st-saved-t { position: static; width: auto; height: auto; overflow: visible; clip: auto; min-width: 10ch; margin-left: var(--st-3); font-size: var(--fs-2xs); color: var(--text-mute); }
.st-saved[data-state="error"] .st-saved-t { font-weight: var(--fw-semi); color: var(--danger); }
.st-saved.is-tick i { display: grid; place-items: center; width: 10px; height: 10px; background: none; opacity: 1; }
.st-saved.is-tick i::before { content: "✓"; font-size: var(--fs-2xs); font-style: normal; font-weight: var(--fw-semi); line-height: 1; color: var(--ok); }
@media (min-width: 1024px) and (max-width: 1279.98px) { .st-saved .st-saved-t { min-width: 0; } }

/* ---------- B-21: Teilen als Feld ---------- */
.st-sharepop { width: 440px; max-width: calc(100vw - 16px); }
.st-share-row { margin-top: 0; }
.st-share-url { font-family: var(--mono); font-size: var(--fs-xs); }
.st-share-note { margin-top: var(--st-4); font-size: var(--fs-xs); }
.st-share-alt { flex-wrap: wrap; }
.st-sharepop .st-lib-warn { margin-top: 0; }

/* ---------- B-32: Hilfe in Gruppen ---------- */
.st-dialog:has(.st-keygroups) { max-width: min(94vw, 860px); }
.st-keygroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 var(--st-7); }
.st-keygrp h4 { margin: 0 0 var(--st-4); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.st-keygrp .st-keys { margin-bottom: var(--st-6); }
/* R14 W2: Hinweise unter der Klaviatur-Belegung über die ganze Breite */
.st-keys .st-keynote-t { display: none; }
.st-keys dd.st-keynote { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-mute); }
.st-keys dd.st-keynote[hidden] { display: none; }

/* ---------- B-37: Meine Tracks — Papierkorb einzeilig, Aktionen als Zeichen ---------- */
.st-lib-row.is-gone .st-lib-open { display: flex; align-items: baseline; gap: var(--st-4); }
.st-lib-row.is-gone .st-lib-name { flex: 1 1 auto; }
.st-lib-row.is-gone .st-lib-open small { flex: 0 0 auto; }
.st-lib-act { flex: 0 0 auto; width: 28px; height: 28px; }
.st-lib-act.st-lib-purge:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- B-23: Block-Regeln, ein Schalter ---------- */
.st-blk-join[aria-disabled="true"] { opacity: var(--st-off); cursor: default; }

/* ---------- W3-Liste 5: Aktion in der Meldung als eigener Knopf ---------- */
.st-toast-act {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 var(--st-5);
  font: inherit;
  font-size: var(--fs-st-md);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  color: var(--on-sel);
  background: var(--sel);
  border: 0;
  border-radius: var(--r-xs);
  cursor: pointer;
}
.st-toast-act:hover { background: var(--white); }
.st-toast-act[hidden] { display: none; }

/* ---------- U-27 / S-26: Start mit Marke, Ladezustand, Fehler mit Grund ---------- */
.studio-wait { display: grid; justify-items: center; gap: var(--st-5); }
.studio-mark { width: 44px; height: 44px; }
.studio-mark svg { display: block; width: 100%; height: 100%; }
.studio-bar { position: relative; width: 120px; height: 2px; overflow: hidden; border-radius: var(--r-pill); background: var(--line-2); }
.studio-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .studio-mark { animation: studioPulse 1.2s var(--ease) infinite alternate; }
  .studio-bar::after { animation: studioBar 1.2s var(--ease) infinite; }
}
@keyframes studioPulse { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes studioBar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.studio-fail { display: none; max-width: 52ch; text-align: center; }
.studio-fail p { margin: 0 0 var(--st-4); }
.studio-why { display: none; color: var(--text-mute); }
.studio[data-why="load"] .studio-why[data-why="load"], .studio[data-why="old"] .studio-why[data-why="old"],
.studio[data-why="other"] .studio-why[data-why="other"] { display: block; }
.studio-fail a { color: var(--accent-hi); }

/* ---------- Korrekturrunde nach der Nachprüfung (N-ST-…) ---------- */
/* N-ST-09: «Folgt»-Chip mit festem Platz für beide Zustände (DE «Fixiert B · läuft D», EN «Following · playing D») */
.st-follow { min-width: 136px; }
html[lang="en"] .st-follow { min-width: 160px; }
/* N-ST-13: M/S klein: hellere Schrift (AA auf jeder Ebene) */
.st-ms { color: var(--text-dim); }
/* N-ST-14: Trefferflächen am Schreibtisch mindestens 24 px */
.st-appbar .st-playopts { min-width: 24px; width: 24px; }
.st-chan-name { min-height: 24px; }
.sl-modchip { min-width: 24px; }
@media (max-width: 760px) {
  /* Controller (a): Drum-Zeilennamen ganz lesbar: breitere Spalte, bis zwei Zeilen («Hat / Closed» ≠ «Hat / Open»);
     der volle Name steht zusätzlich im Tooltip der Zeile */
  .st-app:not([data-track="glitch"]) { --lab: 58px; }
  .st-app:not([data-track="glitch"]) .st-lab { padding-right: 4px; white-space: normal; }
  .st-app:not([data-track="glitch"]) .st-lab-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.2; overflow-wrap: anywhere; }
  /* Controller (b) und B-26: Patterns und «⋯» in einer Zeile (die Patterns scrollen, «⋯» steht fest am Ende);
     Raster-Auflösung, Zoom, Fill, Break und «Nur benutzte» in einer zweiten, waagrecht scrollenden Zeile:
     die Pattern-Leiste ist zwei statt vier Zeilen hoch, das Raster zeigt mindestens 8 Drum-Zeilen */
  .st-patbar { gap: 6px 4px; }
  .st-pbar-p { flex: 1 1 calc(100% - var(--hit) - 4px); width: auto; margin: -3px 0 -3px -8px; padding: 3px 4px 3px 8px; }
  .st-patbar .st-pbar-more { flex: 0 0 var(--hit); width: var(--hit); min-width: var(--hit); height: var(--hit); margin-left: 0; }
  .st-pbar-r { flex: 1 1 100%; flex-wrap: nowrap; margin: -3px -8px; padding: 3px 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .st-pbar-r::-webkit-scrollbar { display: none; }
  .st-pbar-r > * { flex: 0 0 auto; }
}

/* R14: GlitchButler als Insert je Spur. Glitch-Knopf mit drei Zuständen, lesbar ohne Farbe:
   none = gestrichelt mit «+», on = Glitch-Farbe, mute = durchgestrichen. 4 Knöpfe je Zeile (M S G ⋯). */
.st-strip { grid-template-columns: 24px minmax(0, 1fr) 107px; }
.st-gx { color: var(--text-mute); }
.st-gx .st-ic, .st-gx .st-ic svg { width: 13px; height: 13px; }
.st-gx svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-gx-m { position: absolute; right: -3px; top: -3px; display: none; width: 11px; height: 11px; font-style: normal; font-size: 10px; line-height: 10px; text-align: center; border-radius: 50%; pointer-events: none; }
.st-gx[data-state="none"] { border-style: dashed; opacity: 0.75; }
.st-gx[data-state="none"] .st-gx-m { display: block; color: var(--text); background: var(--surface-2, #222); }
.st-gx[data-state="none"] .st-gx-m::before { content: "+"; }
.st-gx[data-state="on"] { color: var(--c-glitch); border-color: var(--c-glitch); }
.st-gx[data-state="mute"] { color: var(--text-dim); }
.st-gx[data-state="mute"]::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-35deg); pointer-events: none; }
.st-gx[aria-pressed="true"] { color: var(--on-color); background: var(--c-glitch); border-color: transparent; }
.st-gx[aria-pressed="true"][data-state="mute"] { background: var(--text-dim); }
.st-gx.is-error { box-shadow: 0 0 0 1px var(--danger); }
.st-gx.is-loading { opacity: 0.55; }
/* Zeile «Summe»: schmal, ohne Griff und Pegel, zählt nicht als Spur */
.st-strip.is-sum { --t: var(--c-glitch); grid-template-rows: auto; margin-top: 6px; padding-top: 4px; padding-bottom: 4px; border-top: 1px dashed var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.st-strip.is-sum .st-strip-name { grid-row: 1; }
.st-strip.is-sum .st-strip-txt strong { font-size: var(--fs-xs); font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); }
.st-strip.is-sum.is-none .st-dev { opacity: 0.45; }
.st-strip.is-sum.is-none .st-strip-more { opacity: var(--st-off); }
/* ab 10 Spuren: Zeilen dichter, damit 12 Spuren plus «Summe» ohne viel Rollen passen */
.st-list.is-dense .st-strip { padding-top: 2px; padding-bottom: 2px; margin-bottom: 1px; row-gap: 0; }
.st-list.is-dense .st-strip-lvl { height: 20px; }
.st-list.is-dense .st-strip .st-dev { width: 20px; height: 20px; }
/* Ebenen-Umschalter Noten/Drums | Glitch in der Spurleiste über dem Raster */
.st-layer { flex: 0 0 auto; }
.st-layer[hidden] { display: none !important; }
.st-layer .seg-btn[data-id="glitch"] { color: var(--c-glitch); }
.st-layer .seg-btn[data-id="glitch"][aria-pressed="true"], .st-layer .seg-btn[data-id="glitch"][aria-checked="true"], .st-layer .seg-btn[data-id="glitch"].is-on { color: var(--on-color); background: var(--c-glitch); }
.st-layer .seg-btn[data-state="mute"] { text-decoration: line-through; text-decoration-thickness: 1px; }
.st-layer .seg-btn.is-error::after { content: " ⚠"; color: var(--danger); }
/* Mixer: Insert-Knopf je Kanal, am Master der Glitch der Summe; der Mixer rollt waagrecht, der Master bleibt rechts stehen */
.st-mixer { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.st-chan { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; }
.st-chan.is-master { position: sticky; right: 0; z-index: var(--z-raise); background: var(--st-panel-bg, var(--surface-1)); box-shadow: -10px 0 12px -8px var(--shadow-drop, rgba(0, 0, 0, 0.6)); }
.st-chan-fx { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 24px; padding: 0 6px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-mute); background: none; border: 1px dashed var(--border); border-radius: var(--r-xs); cursor: pointer; }
.st-chan-fx .st-ic, .st-chan-fx svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-chan-fx[data-state="none"]::after { content: "+"; }
.st-chan-fx[data-state="on"] { color: var(--c-glitch); border: 1px solid var(--c-glitch); }
.st-chan-fx[data-state="mute"] { color: var(--text-dim); border-style: solid; text-decoration: line-through; }
.st-chan-fx[data-state="mute"]::after { content: "M"; }
.st-chan-fx.is-error { box-shadow: 0 0 0 1px var(--danger); }
@media (max-width: 1023.98px) {
  .st-strip { grid-template-columns: 24px minmax(0, 1fr) 140px; }
}
/* 1024–1279 px: die Spalte der Spurliste ist schmal und trägt jetzt 4 Knöpfe (M S G ⋯); ohne Geräte-Symbol bleibt
   dem Namen rund 30 px mehr (gemessen 37 → ~69 px). Die Spurfarbe zeigt der Rand links weiter. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .st-strip .st-dev { display: none; }
}
@media (max-width: 760px) {
  .st-strip { grid-template-columns: 24px minmax(0, 1fr) calc(4 * var(--ctl) + 9px); }
  .st-trackbar > .st-layer { order: 2; }
  .st-chan-fx { min-height: var(--ctl); }
}

/* R14 W2 (Etappe 2): Patterns 1–4 Takte. Länge in der Pattern-Leiste («Takte» 1–4 und «Wiederholen»), Raster über alle
   Takte mit Taktstrichen und Taktnummern im Lineal, Längen-Marke an den Pattern-Knöpfen (Striche oben = Takte) */
.st-lenbox { display: inline-flex; align-items: center; gap: 6px; }
.st-len .seg-btn { min-width: 26px; padding: 0 6px; font-family: var(--mono); font-size: var(--fs-2xs); }
.st-lenrep { height: var(--ctl); }
.st-pb[data-len="2"], .st-pb[data-len="3"], .st-pb[data-len="4"] { background-image: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px); background-repeat: no-repeat; background-position: center 3px; }
.st-pb[data-len="2"] { background-size: 8px 2px; }
.st-pb[data-len="3"] { background-size: 13px 2px; }
.st-pb[data-len="4"] { background-size: 18px 2px; }
/* mehrere Takte bei 1/16: Mindestbreite je Zelle, darunter scrollt das Pattern waagrecht (wie die feinen Raster) */
.st-grid[data-res="16"]:not([data-bars="1"]) { --cw: 18px; }
@media (pointer: coarse) { .st-grid[data-res="16"]:not([data-bars="1"]) { --cw: 30px; } }
/* Taktstrich: Lücke vor dem Takt und eine deutliche Linie (ab Takt 2) */
.st-cell.is-bar { margin-left: 3px; }
.st-grid.is-zoom .st-cell.is-bar { margin-left: 3px; box-shadow: inset 2px 0 0 var(--text-dim); }
.st-tick.is-bar { position: relative; color: var(--accent); font-weight: var(--fw-semi); overflow: visible; white-space: nowrap; }
.st-tick.is-bar::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; border-left: 2px solid var(--accent); }
.st-tick.is-bar:not(:nth-child(2)) { padding-left: 3px; }
/* mehrere Takte: Viertel im Takt leiser, damit die Taktnummer (orange) nicht mit der Schlagzahl verwechselt wird */
.st-grid:not([data-bars="1"]) .st-tick.is-beat:not(.is-bar) { color: var(--text-mute); font-weight: var(--fw-regular, 400); }
/* Telefon: viele Seiten (2 je Takt) brechen in zwei Reihen um statt die Leiste zu sprengen */
.st-pages.is-many { flex-wrap: wrap; max-width: 100%; }
.st-pages.is-many .seg-btn { min-width: 36px; padding: 0 4px; font-family: var(--mono); font-size: var(--fs-2xs); }

/* ---------- R14 Korrekturrunde 2 (Prüfer B) ---------- */
/* B-01 Telefon: die Spurliste wächst mit ihren Zeilen (der Bereich unter den Reitern scrollt), statt in einer festen
   Höhe über «+ Spur» hinauszulaufen. Ursache: min-height: 0 an Liste und Spalte, dadurch blieb die Zeile minmax(0, 1fr)
   auf der Fensterhöhe stehen, während der Inhalt (overflow: visible) darüber hinausragte. */
@media (max-width: 760px) {
  .st-side, .st-list { min-height: auto; }
}
/* B-02: Spurnamen mit Kürzung in der Mitte: «Akkor… 3» (die Nummer am Ende schrumpft nie, ui.js nameEl) */
.st-strip-txt .st-nm { display: flex; min-width: 0; overflow: hidden; white-space: nowrap; }
.st-nm-h { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-nm-t { flex: none; white-space: pre; }
.st-strip.is-muted .st-nm > span { text-decoration: line-through; text-decoration-thickness: 1px; }
/* ab 1024 px ohne Geräte-Symbol in der Spurliste (die Spurfarbe zeigt der Kennstrich links, das Gerät der Tooltip und
   der Spurkopf); ab 1280 bzw. 1440 px eine breitere Spalte: Name ≥ 96 px auch mit 4 Knöpfen (M S G ⋯) */
@media (min-width: 1024px) {
  .st-strip .st-dev { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) { .st-app { --side: 256px; } }
@media (min-width: 1280px) { .st-app { --side: 268px; } }
@media (min-width: 1440px) { .st-app { --side: 288px; } }
/* B-10: Name des Tracks mindestens so breit wie vor R14 (der Klaviatur-Schalter kostet in der Kopfleiste 38 px):
   1024–1360 px «Gespeichert» nur als Punkt bzw. ✓ (Text im Tooltip und für Bildschirmleser, wie am Tablet),
   1361–1599 px die Aufnahme nur als Zeichen (wie schon bis 1360 px; Name im aria-label) */
@media (min-width: 1024px) and (max-width: 1360px) {
  .st-appbar .st-saved .st-saved-t { position: absolute; width: 1px; height: 1px; min-width: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 1360.02px) and (max-width: 1599.98px) {
  .st-rec-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-rec { width: var(--ctl); padding: 0; }
}
/* B-03 / B-04: Takte-Wahl als Knopfgruppe (aria-pressed); Trefferflächen Tablet ≥ 32 px, Telefon ≥ 40 px */
.st-len .seg-btn[aria-pressed="true"] { color: var(--on-light); background: var(--text); }
@media (min-width: 760.02px) and (max-width: 1279.98px) {
  .st-len .seg-btn { min-width: 32px; min-height: 32px; }
}
@media (max-width: 760px) {
  .st-len .seg-btn, .st-layer .seg-btn { min-width: 40px; min-height: 40px; }
  /* Spurkopf: mit Ebenen-Umschalter weicht der kurze Hinweis (ganz hinter «i»), der Name behält Platz */
  .st-trackbar:has(> .st-layer:not([hidden])) .st-hint-t { display: none; }
  .st-tname { min-width: min(40%, 140px); }
  /* zweite Werkzeugzeile bricht um statt waagrecht zu rollen: «Fill» und «Break» ganz sichtbar */
  .st-pbar-r { flex-wrap: wrap; overflow-x: visible; }
}
/* B-11: «Folgen» steht im Song-Modus von Anfang an (vor dem ersten Play nur als reservierter Platz, ui.js applySong);
   bis 1279 px weicht dann der erkannte Stil im Spurkopf, damit der Spurname nicht auf wenige px schrumpft */
@media (min-width: 760.02px) and (max-width: 1279.98px) {
  .st-trackbar:has(> .st-follow:not([hidden])) .st-tools .st-style { display: none; }
}
/* B-08: Leer-Hinweis in der Mitte des sichtbaren Teils (ui.js placeEmpty setzt --ex/--ew) */
.st-empty { left: var(--ex, calc(var(--lab) + (100% - var(--lab)) / 2)); max-width: min(calc(100% - var(--lab) - 16px), var(--ew, 100vw)); }
/* B-09: Takt.Viertel im Lineal («1.2») darf über die schmale Zelle hinausragen */
.st-grid:not([data-bars="1"]) .st-tick.is-beat { overflow: visible; white-space: nowrap; }
