/* ==========================================================================
   RED STUDIO – audio/instruments.css

   Oberflaechen der grossen Plugins: die beiden Instrumente (Poly Synth,
   NATURA), der Gitarrenverstaerker RED STACK und der Stimmkorrektor RED TUNE.

   WARUM EINE EIGENE DATEI
   -----------------------
   plugins.css beschreibt die gemeinsame Chrome und die kleinen Insert-Plugins.
   Die vier hier sind Vollbild-Geraete mit eigener Bildsprache - in derselben
   Datei waere weder das eine noch das andere noch auffindbar.

   Alle Farben kommen aus design.css (--rw-*). Kein einziger Wert wird hier
   neu erfunden, damit ein spaeterer Markenwechsel EINE Datei betrifft.

   HOEHENBEGRENZUNG
   ----------------
   Die Geraete sind hoch. `.rw-plw` ist `position:fixed` ohne Hoehengrenze -
   ohne die Deckelung hier stuende der untere Teil ausserhalb des Bildes und
   waere unerreichbar. Die Grenze sitzt bewusst an den eigenen Wurzeln
   (.rw-nat/.rw-amp/.rw-at) und NICHT an .rw-plw-body: dort wuerde sie jedes
   bestehende Plugin-Fenster mitveraendern.
   ========================================================================== */

/* ═══════════════ Buehne (ui/InstrumentStage.js) ═══════════════ */

.rw-stg {
    position: relative;
    height: 150px;
    border-radius: var(--rw-r-sm);
    overflow: hidden;
    border: 1px solid var(--rw-stroke-2);
    background: var(--rw-inset);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(152, 10, 10, .1);
}
.rw-stg-cv { display: block; width: 100%; height: 100%; }
.rw-stg-cap {
    position: absolute; left: 11px; top: 9px; pointer-events: none;
    font-size: 8.5px; letter-spacing: 2.4px; text-transform: uppercase;
    color: var(--rw-muted); font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.rw-stg-modes { position: absolute; right: 9px; top: 8px; display: flex; gap: 4px; }
.rw-stg-mode {
    font-size: 8px; font-weight: 800; letter-spacing: 1.3px;
    padding: 3px 7px; border-radius: 20px; cursor: pointer;
    color: var(--rw-dim); background: rgba(10, 13, 19, .72);
    border: 1px solid var(--rw-stroke); transition: all var(--rw-dur) var(--rw-ease);
}
.rw-stg-mode:hover { color: var(--rw-text); border-color: var(--rw-line-s); }
.rw-stg-mode.is-on {
    color: #fff; border-color: transparent;
    background: linear-gradient(140deg, var(--rw-primary), var(--rw-primary-hi));
    box-shadow: var(--rw-glow-p);
}

/* ═══════════════ Preset-Browser (ui/PresetBrowser.js) ═══════════════ */

.rw-pb2 {
    margin-top: 10px;
    border: 1px solid var(--rw-stroke-2);
    border-radius: var(--rw-r-sm);
    background: linear-gradient(180deg, rgba(23, 28, 40, .96), rgba(10, 13, 19, .98));
    box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
    overflow: hidden;
    animation: rw-rise .18s var(--rw-ease);
}
.rw-pb2-head {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 11px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), transparent);
    border-bottom: 1px solid var(--rw-stroke);
}
.rw-pb2-title { font-size: 9px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; color: var(--rw-primary-hi); }
.rw-pb2-count { font-family: var(--rw-mono); font-size: 10px; color: var(--rw-dim); }
.rw-pb2-search {
    margin-left: auto; width: 190px;
    background: var(--rw-inset); color: var(--rw-text);
    border: 1px solid var(--rw-stroke-2); border-radius: 20px;
    padding: 5px 11px; font-size: 11px; font-family: var(--rw-font);
    outline: none; transition: border-color var(--rw-dur) var(--rw-ease);
}
.rw-pb2-search:focus { border-color: var(--rw-line-s); box-shadow: var(--rw-glow-s); }
.rw-pb2-close {
    background: none; border: 1px solid var(--rw-stroke-2); color: var(--rw-muted);
    width: 22px; height: 22px; border-radius: 6px; cursor: pointer; line-height: 1; font-size: 14px;
}
.rw-pb2-close:hover { color: #fff; border-color: #ff5a5a; }

.rw-pb2-body { display: flex; max-height: 260px; }
.rw-pb2-cats {
    flex: 0 0 132px; display: flex; flex-direction: column; gap: 2px;
    padding: 8px; overflow-y: auto;
    border-right: 1px solid var(--rw-stroke);
    background: rgba(5, 7, 11, .5);
}
.rw-pb2-cat {
    text-align: left; padding: 6px 9px; border-radius: 7px; cursor: pointer;
    font-size: 11px; font-weight: 600; color: var(--rw-muted);
    background: none; border: 1px solid transparent;
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-pb2-cat:hover { color: var(--rw-text); background: rgba(255, 255, 255, .04); }
.rw-pb2-cat.is-on {
    color: #fff; border-color: var(--rw-line-p);
    background: linear-gradient(90deg, rgba(152, 10, 10, .35), rgba(152, 10, 10, .05));
}

.rw-pb2-grid {
    flex: 1; min-width: 0; overflow-y: auto; padding: 9px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px;
    align-content: start;
}
.rw-pb2-card {
    display: flex; flex-direction: column; gap: 2px; text-align: left;
    padding: 8px 10px; border-radius: 9px; cursor: pointer;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid var(--rw-stroke); color: var(--rw-text);
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-pb2-card:hover { border-color: var(--rw-line-s); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.rw-pb2-card.is-on {
    border-color: transparent;
    background: linear-gradient(150deg, rgba(152, 10, 10, .55), rgba(171, 39, 232, .28));
    box-shadow: var(--rw-glow-p);
}
.rw-pb2-card-cat { font-size: 7.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--rw-secondary-hi); }
.rw-pb2-card.is-on .rw-pb2-card-cat { color: rgba(255, 255, 255, .85); }
.rw-pb2-card-name { font-size: 12px; font-weight: 700; line-height: 1.15; }
.rw-pb2-card-desc { font-size: 9.5px; color: var(--rw-dim); line-height: 1.3; }
.rw-pb2-card.is-on .rw-pb2-card-desc { color: rgba(255, 255, 255, .7); }
.rw-pb2-empty { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--rw-dim); font-size: 11px; }

/* ═══════════════ Instrumente (NATURA + Poly Synth) ═══════════════

   Aufbau wie ein grosses Sample-Instrument: Preset-Wahl fest links, Geraet
   rechts, Klaviatur unten. Die Hoehe wird am BODY gedeckelt und nicht am
   ganzen Geraet - so scrollt der mittlere Teil, waehrend Schiene und
   Klaviatur stehen bleiben. Eine Klaviatur, die man wegscrollen kann, ist
   keine.                                                                    */

.rw-inst {
    width: 880px; max-width: 94vw;
    display: flex; flex-direction: column; gap: 9px;
}
.rw-inst-body {
    display: flex; gap: 11px; align-items: stretch;
    max-height: calc(100vh - 330px); min-height: 330px;
}
.rw-inst-rail { flex: 0 0 226px; min-width: 0; display: flex; }
.rw-inst-main {
    flex: 1; min-width: 0; overflow-y: auto; padding-right: 3px;
    display: flex; flex-direction: column; gap: 11px;
}
.rw-inst-keys { flex: 0 0 auto; }

.rw-nat-bar {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 11px; border-radius: var(--rw-r-sm);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
    border: 1px solid var(--rw-stroke);
}
.rw-nat-preset { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rw-nat-preset-lbl { font-size: 7.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--rw-dim); }
.rw-nat-preset-name {
    font-size: 14px; font-weight: 800; letter-spacing: .2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: linear-gradient(90deg, #fff, var(--rw-secondary-hi));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rw-nat-sels { display: flex; gap: 9px; flex-wrap: wrap; }
.rw-nat-sel { display: flex; flex-direction: column; gap: 3px; flex: 1 1 150px; min-width: 130px; }
.rw-nat-sel > span { font-size: 7.5px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--rw-dim); }
.rw-nat-sel select {
    background: var(--rw-inset); color: var(--rw-text);
    border: 1px solid var(--rw-stroke-2); border-radius: 7px;
    padding: 6px 9px; font-size: 11.5px; font-family: var(--rw-font);
    outline: none; cursor: pointer;
    transition: border-color var(--rw-dur) var(--rw-ease);
}
.rw-nat-sel select:hover, .rw-nat-sel select:focus { border-color: var(--rw-line-s); }

.rw-nat-stage { position: relative; }

/* ═══════════════ Preset-Schiene (variant 'rail') ═══════════════ */

.rw-pb2--rail {
    margin-top: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; animation: none;
}
.rw-pb2--rail .rw-pb2-head { flex-wrap: wrap; gap: 6px; }
.rw-pb2--rail .rw-pb2-search { margin-left: 0; width: 100%; order: 3; }
.rw-pb2--rail .rw-pb2-count { margin-left: auto; }
/* Aus zwei Spalten wird eine Saeule: Kategorien als Chips oben, darunter die
   Liste. Bei 226 px Breite waere eine eigene Kategoriespalte nicht lesbar. */
.rw-pb2--rail .rw-pb2-body { flex-direction: column; flex: 1; min-height: 0; max-height: none; }
.rw-pb2--rail .rw-pb2-cats {
    flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; gap: 3px;
    border-right: none; border-bottom: 1px solid var(--rw-stroke);
    max-height: 84px; overflow-y: auto;
}
.rw-pb2--rail .rw-pb2-cat { padding: 4px 8px; border-radius: 20px; font-size: 10px; border-color: var(--rw-stroke); }
.rw-pb2--rail .rw-pb2-grid { grid-template-columns: 1fr; flex: 1; min-height: 0; }
.rw-pb2--rail .rw-pb2-card { padding: 6px 9px; }
.rw-pb2--rail .rw-pb2-card-name { font-size: 11.5px; }
.rw-pb2--rail .rw-pb2-card-desc { display: none; }

/* ═══════════════ Klaviatur unter dem Instrument ═══════════════ */

.rw-kb {
    display: flex; align-items: stretch; gap: 9px;
    padding: 9px 11px; border-radius: var(--rw-r-sm);
    background: linear-gradient(180deg, #171b24, #0b0e14);
    border: 1px solid var(--rw-stroke-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 -6px 18px rgba(0, 0, 0, .4);
}
.rw-kb-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 0 0 auto; }
.rw-kb-oct {
    width: 24px; height: 20px; border-radius: 6px; cursor: pointer; line-height: 1;
    font-size: 13px; font-weight: 800; color: var(--rw-muted);
    background: rgba(255, 255, 255, .05); border: 1px solid var(--rw-stroke-2);
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-kb-oct:hover { color: #fff; border-color: var(--rw-line-p); box-shadow: var(--rw-glow-p); }
.rw-kb-lbl { font-family: var(--rw-mono); font-size: 10px; color: var(--rw-text); }

.rw-kb-keys {
    position: relative; flex: 1; min-width: 0; height: 84px;
    display: flex; gap: 2px;
    /* Ohne das schiebt ein Finger auf der Klaviatur die Seite, statt zu spielen. */
    touch-action: none; user-select: none;
}
.rw-kb-key {
    position: relative; flex: 1; min-width: 0;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;
    border-radius: 0 0 5px 5px; cursor: pointer;
    background: linear-gradient(180deg, #f4f5f8, #cfd3dc);
    border: 1px solid #0a0c11; border-top: none;
    box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .18);
    transition: background var(--rw-dur) var(--rw-ease);
}
.rw-kb-key span { font-size: 8px; font-weight: 700; color: #6c7280; pointer-events: none; }
.rw-kb-key.is-black {
    position: absolute; top: 0; z-index: 2;
    width: 2.1em; height: 58%; flex: none; border-radius: 0 0 4px 4px;
    background: linear-gradient(180deg, #2a2f3a, #0a0c11);
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .6), 0 3px 7px rgba(0, 0, 0, .55);
}
.rw-kb-key.is-down {
    background: linear-gradient(180deg, var(--rw-primary-hi), var(--rw-primary));
    box-shadow: inset 0 3px 9px rgba(0, 0, 0, .5), 0 0 16px rgba(209, 20, 20, .55);
}
.rw-kb-key.is-down span { color: #fff; }
.rw-kb-key.is-black.is-down { background: linear-gradient(180deg, var(--rw-secondary-hi), var(--rw-secondary)); box-shadow: inset 0 3px 9px rgba(0, 0, 0, .5), var(--rw-glow-s); }
.rw-kb-hint {
    flex: 0 0 62px; align-self: center; text-align: right;
    font-size: 8px; line-height: 1.3; letter-spacing: .3px; color: var(--rw-dim);
}

/* ═══════════════ RED STACK (Gitarrenverstärker) ═══════════════ */

.rw-amp {
    width: 700px; max-width: 92vw;
    max-height: calc(100vh - 210px); overflow-y: auto;
    display: flex; flex-direction: column; gap: 12px;
}

.rw-amp-head {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 13px 15px; border-radius: var(--rw-r-sm);
    /* Geriffelte Frontplatte: die Streifen sind der Bezugsstoff. */
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 5px),
        linear-gradient(180deg, #22161a, #150d10 60%, #0d0709);
    border: 1px solid var(--rw-stroke-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 30px rgba(0, 0, 0, .5);
}
.rw-amp-brand { display: flex; flex-direction: column; gap: 2px; padding-right: 12px; border-right: 1px solid var(--rw-stroke); }
.rw-amp-brand-t {
    font-size: 17px; font-weight: 900; letter-spacing: 3px;
    background: linear-gradient(90deg, var(--rw-primary-hi), #ffd9d9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 22px rgba(209, 20, 20, .35);
}
.rw-amp-brand-s { font-size: 7.5px; letter-spacing: 2.6px; text-transform: uppercase; color: var(--rw-dim); font-weight: 700; }
.rw-amp-knobs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.rw-amp-sels { display: flex; flex-direction: column; gap: 7px; min-width: 150px; }

.rw-amp-boardlbl {
    font-size: 8px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
    color: var(--rw-dim); padding-left: 2px;
}
.rw-amp-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.rw-pedal {
    --pedal: #555;
    position: relative;
    display: flex; flex-direction: column; gap: 7px; align-items: center;
    padding: 10px 8px 9px;
    border-radius: 11px;
    /* Rückfall zuerst: kennt ein Browser `color-mix` nicht, verwirft er die
       ganze folgende Deklaration und das Pedal stünde sonst ohne Fläche da. */
    background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 42%), var(--pedal);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--pedal) 62%, #0c0f15), color-mix(in srgb, var(--pedal) 26%, #05070b));
    border: 1px solid rgba(0, 0, 0, .6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        inset 0 -2px 6px rgba(0, 0, 0, .5),
        0 8px 20px rgba(0, 0, 0, .55);
    transition: box-shadow var(--rw-dur) var(--rw-ease), transform var(--rw-dur) var(--rw-ease);
}
.rw-pedal.is-empty {
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 6px, transparent 6px 12px), var(--rw-panel);
    border-style: dashed; border-color: var(--rw-stroke-2); box-shadow: none;
}
.rw-pedal.is-on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 26px rgba(0, 0, 0, .6), 0 0 22px color-mix(in srgb, var(--pedal) 45%, transparent); }

.rw-pedal-top { display: flex; align-items: center; gap: 5px; width: 100%; }
.rw-pedal-num {
    flex: 0 0 auto; width: 15px; height: 15px; border-radius: 4px;
    display: grid; place-items: center;
    font-size: 8px; font-weight: 900; color: rgba(255, 255, 255, .8);
    background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14);
}
.rw-pedal-type {
    flex: 1; min-width: 0;
    background: rgba(0, 0, 0, .5); color: #fff;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px;
    padding: 3px 5px; font-size: 9.5px; font-family: var(--rw-font);
    outline: none; cursor: pointer;
}
.rw-pedal-name {
    font-size: 21px; font-weight: 900; letter-spacing: 2px; line-height: 1;
    color: rgba(255, 255, 255, .92); text-shadow: 0 2px 5px rgba(0, 0, 0, .7);
}
.rw-pedal.is-empty .rw-pedal-name { color: var(--rw-dim); text-shadow: none; }
.rw-pedal-knobs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 4px; }

.rw-pedal-sw {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 0; border-radius: 8px; cursor: pointer;
    font-size: 9px; font-weight: 900; letter-spacing: 1.6px; color: rgba(255, 255, 255, .75);
    background: linear-gradient(180deg, #2a2f3a, #12161e);
    border: 1px solid rgba(0, 0, 0, .65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 3px 8px rgba(0, 0, 0, .5);
}
.rw-pedal-sw:disabled { opacity: .4; cursor: default; }
.rw-pedal-sw:not(:disabled):active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
.rw-pedal-led {
    width: 7px; height: 7px; border-radius: 50%;
    background: #3a1010; box-shadow: inset 0 0 3px rgba(0, 0, 0, .8);
}
.rw-pedal.is-on .rw-pedal-led {
    background: #ff3b3b;
    box-shadow: 0 0 9px #ff3b3b, 0 0 18px rgba(255, 59, 59, .6);
    animation: rw-pulse 2.4s var(--rw-ease) infinite;
}
.rw-pedal-desc { font-size: 8.5px; line-height: 1.25; text-align: center; color: rgba(255, 255, 255, .5); }
.rw-pedal.is-empty .rw-pedal-desc { color: var(--rw-dim); }

/* Kleinere Reglerbeschriftung im Pedal - vier Knöpfe müssen nebeneinander passen. */
.rw-pedal .rs-pl-knob { width: 48px; padding: 0; }
.rw-pedal .rs-pl-knob-lbl { font-size: 7px; letter-spacing: .4px; }
.rw-pedal .rs-pl-knob-val-txt { font-size: 8.5px; }

/* ═══════════════ RED TUNE (Stimmkorrektur) ═══════════════ */

.rw-at {
    width: 660px; max-width: 92vw;
    display: flex; flex-direction: column; gap: 11px;
}

/* Reiter: drei getrennte Aufgaben, drei Seiten. Die Reiterleiste bleibt
   stehen, nur die Seite darunter scrollt - sonst waere der Wechsel nach
   unten gescrollt nicht mehr erreichbar. */
.rw-at-tabs {
    display: flex; gap: 5px; padding: 4px; border-radius: var(--rw-r-sm);
    background: rgba(5, 7, 11, .55); border: 1px solid var(--rw-stroke);
}
.rw-at-tab {
    flex: 1; display: flex; flex-direction: column; gap: 1px; align-items: center;
    padding: 8px 6px; border-radius: 8px; cursor: pointer;
    background: none; border: 1px solid transparent; color: var(--rw-muted);
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-at-tab:hover { color: var(--rw-text); background: rgba(255, 255, 255, .045); }
.rw-at-tab b { font-size: 11.5px; font-weight: 800; letter-spacing: .3px; }
.rw-at-tab span { font-size: 8px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; opacity: .75; }
.rw-at-tab.is-on {
    color: #fff; border-color: transparent;
    background: linear-gradient(160deg, var(--rw-primary), rgba(171, 39, 232, .55));
    box-shadow: var(--rw-glow-p);
}

.rw-at-page {
    display: flex; flex-direction: column; gap: 11px;
    max-height: calc(100vh - 300px); overflow-y: auto; padding-right: 3px;
    animation: rw-rise .16s var(--rw-ease);
}
/* ⚠ PFLICHT, sobald einem Element mit `hidden` ein `display` gegeben wird:
   das `display: none` des `hidden`-Attributs steht im Stilblatt des Browsers,
   und JEDE Autorenregel schlaegt das - unabhaengig von der Spezifitaet. Ohne
   diese Zeile setzt der Reiterwechsel `hidden` zwar brav, sichtbar bleibt
   aber trotzdem alles. Dieselbe Zeile gibt es aus demselben Grund fuer
   `.rs-vkb` in plugins.css. */
.rw-at-page[hidden] { display: none; }
.rw-at-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rw-at-row .rs-mpc-hint { flex: 1 1 220px; margin: 0; }

.rw-at-scope { position: relative; }
.rw-at-cv {
    display: block; width: 100%; height: 168px;
    border-radius: var(--rw-r-sm); border: 1px solid var(--rw-stroke-2);
    background: var(--rw-inset);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, .7);
}
.rw-at-read {
    position: absolute; right: 10px; top: 9px;
    display: flex; gap: 14px; pointer-events: none;
    padding: 6px 11px; border-radius: 9px;
    background: rgba(5, 7, 11, .78); border: 1px solid var(--rw-stroke);
    backdrop-filter: blur(6px);
}
.rw-at-read > div { display: flex; flex-direction: column; gap: 1px; align-items: flex-end; }
.rw-at-read span { font-size: 7px; font-weight: 800; letter-spacing: 1.6px; color: var(--rw-dim); }
.rw-at-read b { font-family: var(--rw-mono); font-size: 12px; color: var(--rw-text); }
.rw-at-warn {
    margin-top: 7px; padding: 8px 11px; border-radius: 8px;
    font-size: 10.5px; line-height: 1.4;
    color: #ffd0d0; background: rgba(152, 10, 10, .22); border: 1px solid var(--rw-line-p);
}

.rw-at-scale { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.rw-at-keys { display: flex; gap: 3px; flex: 1 1 100%; }
.rw-at-key {
    flex: 1; padding: 9px 0 7px; border-radius: 0 0 6px 6px; cursor: default;
    font-size: 9px; font-weight: 800; letter-spacing: .3px;
    color: var(--rw-dim);
    background: linear-gradient(180deg, #1a1f29, #0d1017);
    border: 1px solid var(--rw-stroke); border-top: none;
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-at-key.is-black { background: linear-gradient(180deg, #0b0d13, #05070b); }
.rw-at-key.is-on {
    color: #fff; border-color: transparent;
    background: linear-gradient(180deg, var(--rw-secondary), rgba(152, 10, 10, .85));
    box-shadow: var(--rw-glow-s);
}
.rw-at-keys.is-custom .rw-at-key { cursor: pointer; }
.rw-at-keys.is-custom .rw-at-key:hover { border-color: var(--rw-line-s); }

.rw-at-panel {
    border-radius: var(--rw-r-sm); overflow: hidden;
    border: 1px solid var(--rw-stroke);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .008));
}
.rw-at-panel-h {
    display: flex; align-items: baseline; gap: 9px;
    padding: 8px 12px; border-bottom: 1px solid var(--rw-stroke);
    background: linear-gradient(90deg, rgba(152, 10, 10, .22), transparent 65%);
}
.rw-at-panel-h b { font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.rw-at-panel-h span { font-size: 9.5px; color: var(--rw-dim); }

.rw-at-chars {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px;
    padding: 10px;
}
.rw-at-char {
    display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
    padding: 7px 9px; border-radius: 8px; color: var(--rw-text);
    background: rgba(255, 255, 255, .035); border: 1px solid var(--rw-stroke);
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-at-char:hover { border-color: var(--rw-line-s); transform: translateY(-1px); }
.rw-at-char.is-on {
    border-color: transparent;
    background: linear-gradient(150deg, rgba(171, 39, 232, .5), rgba(152, 10, 10, .35));
    box-shadow: var(--rw-glow-s);
}
.rw-at-char b { font-size: 11.5px; font-weight: 700; }
.rw-at-char span { font-size: 9px; color: var(--rw-dim); line-height: 1.3; }
.rw-at-char.is-on span { color: rgba(255, 255, 255, .78); }

.rw-at-sat { display: flex; align-items: center; gap: 12px; padding: 10px; flex-wrap: wrap; }
.rw-at-sattypes { display: flex; flex-direction: column; gap: 4px; min-width: 118px; }
.rw-at-sattype {
    padding: 6px 11px; border-radius: 7px; cursor: pointer; text-align: left;
    font-size: 11px; font-weight: 600; color: var(--rw-muted);
    background: rgba(255, 255, 255, .03); border: 1px solid var(--rw-stroke);
    transition: all var(--rw-dur) var(--rw-ease);
}
.rw-at-sattype:hover { color: var(--rw-text); border-color: var(--rw-line-s); }
.rw-at-sattype.is-on {
    color: #fff; border-color: transparent;
    background: linear-gradient(140deg, var(--rw-primary), var(--rw-primary-hi));
    box-shadow: var(--rw-glow-p);
}

/* ═══════════════ Kleine Bildschirme ═══════════════ */

@media (max-width: 900px) {
    .rw-inst, .rw-amp, .rw-at { width: min(94vw, 640px); }
    .rw-amp-board { grid-template-columns: repeat(2, 1fr); }
    .rw-pb2-body { flex-direction: column; max-height: 300px; }
    .rw-pb2-cats { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--rw-stroke); }
    .rw-pb2-cat { white-space: nowrap; }
    .rw-pb2-search { width: 130px; }
    /* Schmal wird aus nebeneinander untereinander: die Schiene bekommt eine
       feste, begrenzte Hoehe, damit das Geraet darunter noch Platz hat. */
    .rw-inst-body { flex-direction: column; max-height: none; }
    .rw-inst-rail { flex: 0 0 auto; height: 216px; }
    .rw-inst-main { overflow: visible; }
    .rw-at-tab span { display: none; }
}

@media (pointer: coarse) {
    /* Am Finger gespielt brauchen die Tasten mehr Flaeche. */
    .rw-kb-keys { height: 104px; }
    .rw-kb-oct { width: 34px; height: 30px; }
}
