/* Nachbau der App-Oberfläche. Maße in pt aus den Bildern der App (SONUS_SNAPSHOT, 1470 × 900).
   Die Bühne wird als Ganzes skaliert: innen gilt 1 px = 1 pt. */
.stage-wrap { position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.stage {
  position: relative; width: 1470px; height: 900px; transform-origin: 0 0;
  font: 14px/1.25 "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--text);
  user-select: none; -webkit-user-select: none; overflow: hidden; background: var(--bg);
}
.stage canvas.stage-bg { position: absolute; inset: 0; width: 1470px; height: 900px; }
.stage .ui { position: absolute; inset: 0; transition: opacity .6s; }
:where(.stage, .mini) button { font: inherit; color: inherit; border: 0; cursor: pointer; padding: 0; background: none; }

/* Reiterleiste (ImGui-Tabs) */
.a-tabs { position: absolute; left: 7px; top: 6px; right: 7px; display: flex; gap: 4px; }
.a-tabs::after { content: ""; position: absolute; left: -7px; right: -7px; top: 21px; height: 1px; background: var(--tab-sel); }
.a-tab { height: 20px; padding: 0 4.5px; border-radius: 4px 4px 0 0; background: var(--panel); white-space: nowrap; line-height: 20px; }
.a-tab:hover { background: var(--tab-h); }
.a-tab.cur { background: var(--tab-sel); }
.a-tab.locked { color: rgba(224, 227, 237, .32); }
.a-gear { position: absolute; left: 12px; top: 37px; width: 22px; height: 22px; color: #8c91a1; }
.a-gear:hover { color: var(--text); }
.a-help { position: absolute; right: 12px; top: 37px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #8c91a1; color: #8c91a1; font-size: 15px; line-height: 19px; text-align: center; }
.a-help:hover { border-color: var(--text); color: var(--text); }
.a-body { position: absolute; left: 0; right: 0; top: 83px; height: 760px; display: flex; justify-content: center; gap: 9px; }
.a-body.full { display: block; }
.a-group { display: flex; gap: 9px; }
.a-group + .a-group, .a-group + .a-side { margin-left: 20px; }   /* kGroupGap 28 */

/* Karte */
.a-card {
  --c: var(--in);
  position: relative; width: 180px; height: 760px; flex: none; padding: 7px 8px 8px;
  background: var(--card); border: 1px solid rgba(77, 82, 102, .6); border-radius: 6px; display: flex; flex-direction: column;
}
.a-card.sel { border: 2px solid var(--c); padding: 6px 7px 7px; }
.a-title { height: 18px; line-height: 18px; text-align: center; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.a-title.pad { padding: 0 30px; }
.a-fx { position: absolute; right: 8px; top: 7px; height: 17px; padding: 0 4px; border-radius: 3px; font-size: 13px; line-height: 17px; background: #3a3d4a; color: #8c91a1; }
.a-fx.lit { background: var(--in); color: var(--text-dark); }
.a-phones { position: absolute; right: 10px; top: 8px; width: 16px; height: 16px; color: var(--c); }
.a-row2 { position: relative; margin-top: 5px; height: 24px; line-height: 24px; text-align: center; color: #b8bdcc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-row2.dev { padding-right: 16px; cursor: pointer; }
.a-row2.dev::after { content: ""; position: absolute; right: 2px; top: 10px; border: 4px solid transparent; border-top: 5px solid currentColor; }
.a-row2.dev:hover { color: var(--c); }
.a-row2.app { text-align: left; color: #8c91a1; padding-left: 3px; }
.a-std { width: 100%; height: 24px; border-radius: 4px; background: var(--gray); }
.a-std.on { background: var(--c); color: var(--text-dark); }
.a-fader { margin-top: 39px; height: var(--len, 418px); display: flex; justify-content: center; gap: 6px; position: relative; touch-action: none; }
.a-rail { position: relative; width: 34px; height: 100%; cursor: pointer; }
.a-rail::before { content: ""; position: absolute; left: 14px; width: 6px; top: 0; bottom: 0; border-radius: 3px; background: var(--track); }
.a-zero { position: absolute; left: 0; right: -25px; height: 1px; background: rgba(255, 255, 255, .24); pointer-events: none; }
.a-prev { position: absolute; left: 0; width: 34px; height: 2px; margin-top: -1px; background: rgba(120, 200, 255, .86); pointer-events: none; display: none; }
.a-rail:hover .a-prev { display: block; }
.a-rail.drag .a-prev { display: none; }
.a-grip {
  position: absolute; left: 0; width: 34px; height: 24px; margin-top: -12px; border-radius: 4px; background-color: #d7dce8; pointer-events: none;
  background-image: linear-gradient(#282a32, #282a32), linear-gradient(#282a32, #282a32), linear-gradient(#282a32, #282a32);
  background-size: 20px 1.5px; background-repeat: no-repeat; background-position: 7px 5.25px, 7px 11.25px, 7px 17.25px;
}
.a-rail:hover .a-grip, .a-rail.drag .a-grip { background-color: #fff; }
.a-meters { display: flex; gap: 3px; height: 100%; position: relative; }
.a-gate { position: absolute; left: -3px; right: -3px; height: 2px; background: var(--red); display: none; }
.a-db { margin-top: 6px; height: 16px; line-height: 16px; text-align: center; color: #8c91a1; }
.a-btn {
  height: 24px; border-radius: 4px; background: var(--gray); color: #8c91a1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.a-btn:hover { background: var(--gray-h); }
.a-card > .a-btn { width: 100%; margin-top: 6px; }
.a-card > .a-btn.first { margin-top: 5px; }
.a-card > .a-btn.gap { margin-top: 14px; }
.a-btn.on { background: var(--c); color: var(--text-dark); }
.a-btn.on:hover { filter: brightness(1.12); }
.a-btn.nodev { color: #737582; }
.a-btn.muted { background: #7a4248; color: #ccb3b8; }
.a-btn.mute { color: var(--text); }
.a-btn.mute.on { background: var(--red); color: var(--text); }
.a-list { margin-top: 8px; line-height: 20px; color: var(--text); }
.a-drop { position: absolute; left: 8px; bottom: 8px; color: #8c91a1; }

/* Bereich rechts */
.a-side { width: 579px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.a-panel { background: var(--card); border: 1px solid rgba(77, 82, 102, .6); border-radius: 6px; padding: 8px 7px; position: relative; }
.a-h { color: #8c91a1; height: 18px; line-height: 18px; }
.a-h.c { color: var(--c); }
.a-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8.5px 8px; margin: 6px 0 12px; }
.a-tile { position: relative; height: 45px; border-radius: 6px; background: var(--gray); color: var(--text); line-height: 15px; }
.a-tile:hover { background: #4b4e5c; }
.a-tile.on { background: #496a83; color: #fff; }
.a-tile.on:hover { background: #527189; }
.a-tile.on::before { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--in); }
.a-tile.sel { box-shadow: inset 0 0 0 2px var(--in); }
.a-tile small { display: block; font-size: 13px; color: rgba(255, 255, 255, .5); }
.a-tile.locked { opacity: .3; }
.a-onoff { display: flex; align-items: center; gap: 8px; margin: 8px 0 20px; color: #8c91a1; }
.a-onoff .a-btn { width: 70px; height: 19px; line-height: 19px; color: var(--text); }
.a-onoff .a-btn.on { background: var(--c, var(--in)); color: var(--text-dark); }
.a-param { display: grid; grid-template-columns: 123px 1fr; align-items: center; height: 26px; }
.a-slider { position: relative; height: 19px; border-radius: 4px; background: #3a3d4a; text-align: center; line-height: 19px; cursor: ew-resize; touch-action: none; }
.a-slider:hover { background: #42455a; }
.a-slider i { position: absolute; top: 2px; bottom: 2px; width: 4px; margin-left: -2px; background: var(--c, var(--in)); border-radius: 1px; }
.a-slider span { position: relative; }
.a-steps { display: flex; gap: 8px; }
.a-steps .a-btn { flex: 1; height: 19px; line-height: 19px; color: var(--text); }
.a-steps .a-btn.on { background: var(--c, var(--in)); color: var(--text-dark); }
.a-graph { position: relative; background: #121318; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.a-graph svg { display: block; width: 100%; height: 100%; }
.a-eqcols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.a-eqcols .a-h { margin-top: 4px; }
.a-eqcols .lab { height: 22px; line-height: 22px; }
.a-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.a-chips span { background: #3f5577; border-radius: 4px; padding: 2px 10px; }
.a-lockbar { margin-top: 18px; display: flex; align-items: center; gap: 12px; color: #a8adbf; }

/* gesperrter Reiter */
.a-locked { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #a8adbf; }
.a-locked b { display: block; font-size: 22px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.a-up { margin-top: 18px; height: 34px; padding: 0 18px; border-radius: 4px; background: var(--c); color: var(--text-dark) !important; font-size: 15px !important; }
.a-up:hover { filter: brightness(1.12); }

/* Tabellen (Software, Kreuztabelle, Playlist) */
.a-table { border-collapse: collapse; }
.a-table th { font-weight: 400; text-align: left; height: 31px; padding: 0 8px; background: rgba(38, 41, 51, .95); }
.a-table td { padding: 0 8px; white-space: nowrap; }
.a-pill { height: 21px; padding: 0 6px; border-radius: 3px; background: #3a3d4a; color: var(--text); }
.a-pill.on { background: var(--vi); color: var(--text-dark); }
.a-hfader { position: relative; width: 145px; height: 26px; cursor: pointer; }
.a-hfader::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 6px; border-radius: 3px; background: var(--track); }
.a-hfader i { position: absolute; top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 4px; background: #d7dce8; }
.a-hfader b { position: absolute; left: 0; height: 3px; background: var(--track); width: 100%; }
.a-hfader b u { position: absolute; left: 0; top: 0; bottom: 0; background: #43e04a; width: 0; }

/* Pads */
.a-pads { display: grid; grid-template-columns: repeat(4, 184px); grid-auto-rows: 184px; gap: 8.6px; }
.a-pad { position: relative; text-align: left; border-radius: 6px; background: var(--card); border: 1px solid #424554; padding: 6px 9px; overflow: hidden; }
.a-pad:hover { background: #3b3d4d; }
.a-pad::before { content: ""; position: absolute; inset: 0; background: var(--pad); opacity: 0; transition: opacity .25s; }
.a-pad.play::before { opacity: .26; }
.a-pad small { display: block; color: #80848f; font-size: 13px; position: relative; }
.a-pad span { display: block; position: relative; margin-top: 2px; line-height: 16px; }

/* Visualisierung */
.a-vis { position: absolute; inset: 0; }
.a-vis svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.a-vbox { position: absolute; width: 339px; height: 63px; border: 1.5px solid var(--c); border-radius: 6px; background: var(--card); padding: 5px 12px; cursor: pointer; }
.a-vbox:hover { background: #363948; }
.a-vbox.pick { box-shadow: 0 0 0 2px var(--c); }
.a-vbox b { font-weight: 400; color: var(--c); display: block; line-height: 17px; }
.a-vbox em { font-style: normal; color: #8c91a1; line-height: 17px; }
.a-vbox u { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; background: var(--track); }
.a-vbox u i { position: absolute; left: 0; top: 0; bottom: 0; background: #43e04a; width: 0; }
.a-vbox .dot { position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--c); }
.a-vh { position: absolute; font-size: 14px; letter-spacing: .02em; color: var(--c); }

/* Einstellungen */
.a-set { position: absolute; left: 355px; right: 10px; top: 0; }
.a-set h5 { margin: 0; font-weight: 400; height: 26px; line-height: 26px; border-bottom: 1px solid rgba(140, 145, 161, .35); margin-bottom: 9px; }
.a-set .r { display: grid; grid-template-columns: 200px 1fr; height: 26px; align-items: center; color: #a8adbf; }
.a-set .r > div { color: var(--text); display: flex; align-items: center; gap: 8px; }
.a-set .a-btn { height: 19px; line-height: 19px; padding: 0 12px; color: var(--text); min-width: 87px; }
.a-set .a-btn.white { background: #e0e3ed; color: var(--text-dark); }
.a-set .dim { color: #8c91a1; }

/* Tooltip in der Bühne */
.a-tip { position: fixed; z-index: 60; padding: 4px 8px; background: var(--panel); border: 1px solid rgba(77, 82, 102, .8); border-radius: 4px; font: 13px/1.3 "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--text); pointer-events: none; white-space: pre; display: none; }

/* Meter wie in der App: dunkle Schiene, Verlauf von unten */
.a-meter { width: 8px; height: 100%; border-radius: 2px; position: relative; overflow: hidden; background: var(--track); }
.a-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, #43e04a 0%, #43e04a 50%, #a9e043 64%, #e0c243 74%, #e07a43 79%, #e04343 83.3%, #e04343 100%) bottom / 100% var(--len, 418px) no-repeat; }
