/* Look: dunkles Dashboard – schwebende, stark gerundete Panels, weiße Pillen für den aktiven Zustand,
   Blau für Auswahl, Status mit Farbpunkt, diagonale Schraffur für leere/inaktive Flächen. */
:root {
  color-scheme: dark;
  --bg: #08080A;
  --bg2: #0E0E11;
  --panel: #141417;
  --panel2: #1C1C20;
  --panel3: #24242A;
  --line: rgba(255,255,255,.07);
  --line2: rgba(255,255,255,.12);
  --grid: rgba(255,255,255,.08);     /* Gitterlinien in Diagrammen (charts.js) */
  --text: #F4F4F6;
  --ink2: #C9C9CF;
  --muted: #8B8B93;
  --accent: #4C7DFF;                 /* Auswahl, Fokus */
  --accent-soft: rgba(76,125,255,.16);
  --accent2: var(--muted);
  --pill: #F4F4F6;                   /* aktive Pille: hell mit dunkler Schrift */
  --pill-ink: #0B0B0D;
  --ok: #3FD37C;
  --warn: #FF9A3D;
  --bad: #FF5A5F;
  --radius: 18px;
  --hatch: repeating-linear-gradient(135deg, rgba(255,255,255,.055) 0 1.5px, transparent 1.5px 6px);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.9);
  --font: "Chakra Petch", "Saira Semi Condensed", "Segoe UI", system-ui, sans-serif;
  --font-num: var(--font);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--panel3) transparent; }
html, body { margin: 0; }
/* Die App füllt genau ein Fenster (.seite); die Fußleiste liegt darunter und ist erst beim ganz nach unten Scrollen zu sehen */
.seite { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-height: 0; }
body {
  background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--font);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .btn {
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; font-size: 13px;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
button:hover, .btn:hover { background: var(--panel3); border-color: rgba(255,255,255,.2); }
button.primary, a.btn.primary { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
button.primary:hover { background: #fff; border-color: #fff; }
button.danger { color: var(--bad); }
button.small { padding: 2px 10px; font-size: 12px; }
input, select, textarea {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 5px 9px; min-width: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input[type=number] { width: 80px; }
input[type=range] { width: auto; accent-color: var(--accent); }
/* Checkboxen: Kästchen mit Häkchen, das sich beim Anhaken einzeichnet, und einem kleinen „Wellen“-Effekt (Vorlage „checkbox-wrapper-4“).
   Gilt für alle Checkboxen der Seite; das Häkchen ist eine Maske mit Ausblendung von links nach rechts, die Farbe ist die Akzentfarbe der App. */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; position: relative; flex: none;
  width: 18px; height: 18px; margin: 0 4px 0 0; padding: 0; vertical-align: middle; cursor: pointer;
  border: 1px solid #cccfdb; border-radius: 4px; background: transparent; box-shadow: 0 1px 1px rgba(0, 16, 75, .05);
  transition: all .2s ease;
}
input[type=checkbox]::after {
  content: ''; position: absolute; inset: 0; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpolyline points='1.5 6 4.5 9 10.5 1' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 10px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpolyline points='1.5 6 4.5 9 10.5 1' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 10px no-repeat;
  clip-path: inset(0 100% 0 0); transition: clip-path .3s ease .1s;
}
input[type=checkbox]:hover { border-color: var(--accent); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); animation: haken-welle .4s ease; }
input[type=checkbox]:checked::after { clip-path: inset(0 0 0 0); }
input[type=checkbox]:disabled { opacity: .45; cursor: default; }
@keyframes haken-welle { 50% { transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { input[type=checkbox], input[type=checkbox]::after { transition: none; } input[type=checkbox]:checked { animation: none; } }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; min-height: 60px; resize: vertical; }
b, strong { font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }

/* Kopfzeile */
.top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; background: var(--bg); }
.brand { font-weight: 600; font-size: 20px; }
.brand .sub { color: var(--muted); font-weight: 400; font-size: 13.5px; letter-spacing: 0; margin-left: -2px; }
/* Tabs als Segment-Schalter */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.tabs button { background: transparent; border-color: transparent; color: var(--muted); padding: 5px 15px; }
.tabs button:hover { background: transparent; border-color: transparent; color: var(--text); }
.tabs button.active { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
/* Reiter im Boxen-Editor (bewusst nicht „.tabs“, das gehört den Hauptreitern) */
.box-tabs { display: flex; gap: 2px; padding: 3px; margin: 0 0 12px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; position: sticky; top: 0; z-index: 5; }
.box-tabs button { background: transparent; border-color: transparent; color: var(--muted); padding: 5px 15px; white-space: nowrap; }
.box-tabs button:hover { background: transparent; border-color: transparent; color: var(--text); }
.box-tabs button.active { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
/* Sprachumschalter */
.sprache { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.sprache button { background: transparent; border-color: transparent; color: var(--muted); padding: 3px 10px; font-size: 12px; }
.sprache button:hover { background: transparent; border-color: transparent; color: var(--text); }
.sprache button.active { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }

/* Panels schweben auf schwarzem Grund */
main { flex: 1; min-height: 0; padding: 0 12px 12px; }
.tab { display: none; height: 100%; gap: 12px; }
.tab.active { display: flex; }

/* Layouts */
.side {
  width: 330px; flex: none; overflow-y: auto; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.side.right { width: 360px; }
.center {
  flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
}
.scroll { flex: 1; overflow-y: auto; padding: 16px; }
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.side .card { background: var(--panel2); padding: 12px; margin-bottom: 10px; border-radius: 14px; }
.row { display: flex; align-items: center; gap: 8px; margin: 5px 0; flex-wrap: wrap; }
.row > label:first-child { min-width: 120px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; }
.grid2 .row { gap: 6px; }
.grid2 .row > label:first-child { min-width: 118px; }
.unit { color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Listen */
.list { display: flex; flex-direction: column; gap: 4px; }
.list .item {
  padding: 8px 11px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; display: flex; justify-content: space-between; gap: 8px;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.list .item:hover { background: var(--panel3); }
.list .item.sel { background: var(--accent-soft); border-color: var(--accent); }
/* Status-Pille mit Farbpunkt */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none;
  background: var(--panel3); border: 1px solid var(--line); color: var(--ink2);
}
.badge.ok, .badge.warn { color: var(--ink2); }
.badge.ok::before, .badge.warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.badge.warn::before { background: var(--warn); }

table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 6px 6px; text-align: left; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; }
.tbl input[type=number] { width: 72px; }
/* Treiber-Katalog: sortierbare Spaltenköpfe, Zahlen rechtsbündig */
.tbl.katalog th, .tbl.katalog td { white-space: nowrap; padding: 5px 7px; }
.tbl.katalog th.sortierbar { cursor: pointer; user-select: none; }
.tbl.katalog th.sortierbar:hover, .tbl.katalog th.aktiv { color: var(--text); }
.tbl.katalog td.zahl { text-align: right; }
.tbl.katalog tr:hover td { background: var(--panel3); }

canvas.chart, canvas.viewer, canvas.section {
  width: 100%; height: 240px; display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
}
canvas.viewer { height: 420px; cursor: grab; }
canvas.section { height: 560px; cursor: crosshair; touch-action: none; }
canvas.section.drehen { cursor: grab; }
/* 3D-Vorschau und gedrehter Schnitt: Flächen per WebGL (canvas.gl) unter der 2D-Zeichenfläche mit Linien und Markern */
.gl-stapel { position: relative; background: var(--bg2); border-radius: 14px; }
.gl-stapel > canvas.viewer, .gl-stapel > canvas.section { position: relative; background: transparent; }
.gl-stapel > canvas.gl { position: absolute; left: 1px; top: 1px; width: calc(100% - 2px); height: calc(100% - 2px); border-radius: 13px; pointer-events: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
/* Boxen → Ergebnisse: Diagramme in wählbarer Höhe und Breite */
.erg-diagramme canvas.chart { height: var(--erg-h, 240px); }
.two.eine { grid-template-columns: 1fr; }
.erg-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.erg-leiste .muted { margin-right: 4px; }
.chart-box { min-width: 0; }

/* Planer-Hauptfenster: Werkzeugleiste, darunter drei Spalten (Projekt/Gelände · Stacks · Ergebnisse), jede scrollt für sich */
.plan-haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-haupt > .plan-toolbar { border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.plan-raster { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 12px; }
.plan-spalte {
  min-height: 0; overflow-y: auto; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.plan-spalte .card { background: var(--panel2); padding: 12px; margin-bottom: 10px; border-radius: 14px; }
.stack-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; align-items: start; }
.stack-liste .card { margin-bottom: 0; }
@media (max-width: 1250px) { .plan-raster { grid-template-columns: minmax(0, 1fr) 340px; } }
/* Stacks-Bereich: Kopfzeile, Karten mit beschrifteten Feldern in Gruppen */
.stacks-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.stacks-kopf h3 { margin: 0; font-size: 17px; }
.stacks-kopf .stacks-hinweis { flex: 1; min-width: 180px; }
.stack-liste { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.stack-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* Wege-Tabelle kompakt, damit sie in die Karte passt; reicht es trotzdem nicht, scrollt sie in der Karte statt über die Nachbarn zu laufen */
.stack-card .wege-box { overflow-x: auto; }
.stack-card .tbl.wege td:first-child { max-width: 72px; }
.stack-card .tbl.wege input[type=number] { width: 48px !important; padding-left: 5px; padding-right: 5px; }
.stack-card .tbl.wege td:nth-child(4) input[type=number] { width: 56px !important; }
.stack-card .tbl.wege td:nth-child(5) input[type=number], .stack-card .tbl.wege td:nth-child(6) input[type=number] { width: 60px !important; }
.stack-card .tbl.wege select.filter-art { width: 60px; padding: 5px 4px; }
.plan-spalte { min-width: 0; }
.stack-card .stack-info { margin: -4px 0 0; }
.stack-gruppe { border-top: 1px solid var(--line); padding-top: 8px; }
.stack-gruppe-titel { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.sf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sf { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sf-l { font-size: 11px; color: var(--muted); }
.stack-card .sf-grid input[type=number], .stack-card .sf-grid select { width: 100%; min-width: 0; }
.sf-grid.top-winkel { align-items: end; margin-top: 5px; }
.top-winkel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: 6px; }
.top-winkel.gewaehlt .top-winkel-name { color: var(--accent); }
.top-winkel .sf-l:empty { display: none; }
.top-winkel-form { margin: 8px 0 0; gap: 8px; align-items: center; }
.stack-card .stack-aktionen { margin: 0; border-top: 1px solid var(--line); padding-top: 8px; }
.stack-card details.schnell { margin: 0; border-top: 1px solid var(--line); padding-top: 8px; }
.stack-card .stack-wege > summary { color: var(--text); font-weight: 500; }
/* Hub über Xmax (Wege bzw. Diagramm „Hub und Xmax“): roter Rand ums ganze Fenster */
.stack-card details.schnell.hub-ueber { border: 1.5px solid var(--bad); border-radius: 12px; padding: 8px 10px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.stack-card details.schnell.hub-ueber > summary { color: var(--bad); }
/* Hochpass-Feld eines Wegs, dessen Hub über Xmax liegt: rot und leicht pulsierend */
input.hub-feld-rot { border-color: var(--bad) !important; color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); animation: hub-puls 1.6s ease-in-out infinite; }
@keyframes hub-puls { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 8%, transparent); } }
.ohne-animation input.hub-feld-rot { animation: none; }
/* Fenster „Projekt-Einstellungen“ (nutzt die Optionen-Fensterklassen) */
.modal-projekt { width: min(560px, calc(100vw - 32px)); }
.projekt-dialog .card { margin-bottom: 12px; }
/* Ansichtsfenster: Pegel der Tanzfläche rechts neben der Draufsicht */
.plan-reset { position: absolute; top: 10px; right: 10px; z-index: 2; }
.plan-karte { position: relative; flex: 1; min-width: 0; display: flex; }
.plan-kpi { width: 250px; flex: none; overflow-y: auto; padding: 14px; background: var(--panel); border-left: 1px solid var(--line); }
#plan-right > .plan-kpi { width: auto; border: 1px solid var(--line); border-radius: 8px; overflow: visible; margin-bottom: 12px; }
.plan-kpi h3 { margin: 0 0 8px; }
.plan-kpi .kpi-wert { font-size: 38px; }
/* Ansichtsfenster: Tanzflächen-Pegel als halbtransparente Karte oben links auf der Pegelkarte */
.plan-ansichten { position: relative; }
.plan-ansichten .plan-kpi {
  position: absolute; right: 10px; top: 64px; z-index: 2; width: 214px; max-height: calc(100% - 74px); padding: 9px 11px; pointer-events: none;
  background: rgba(14,14,18,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line2); border-radius: 4px; font-size: 11.5px;
}
.plan-ansichten .plan-kpi h3 { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.plan-ansichten .plan-kpi .kpi { margin-bottom: 6px; }
.plan-ansichten .plan-kpi .kpi-label { font-size: 11px; }
.plan-ansichten .plan-kpi .kpi-wert { font-size: 26px; }
.plan-ansichten .plan-kpi .kpi-wert small { font-size: 13px; }
.plan-ansichten .plan-kpi .stat { font-size: 11px; }
.plan-ansichten .plan-kpi .muted.small-text { display: none; }
.plan-ansichten .legend { right: 10px; bottom: 10px; padding: 5px 8px; font-size: 9.5px; border-radius: 4px; }
.plan-ansichten .legend .bar { width: 110px; height: 6px; margin: 3px 0; }
/* Zahnrad (Leiste ein/aus) und Lösen oben rechts auf der Karte; Griff zum Verschieben, wenn die Karte gelöst ist */
.plan-ecke { position: absolute; top: 6px; right: 8px; z-index: 4; display: flex; gap: 4px; }
.plan-ecke-knopf { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 4px; background: rgba(14,14,18,.6); }
.plan-ecke-knopf svg { width: 14px; height: 14px; }
.plan-ecke-knopf.an { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.plan-ansichten .plan-oben { flex-direction: column; }
.plan-oben.zu, .plan-oben.drauf-aus { display: none !important; }
.front-main { perspective: 1800px; }
.front-drauf-hinweis { margin-left: 8px; }
.plan-ansichten { perspective: 1800px; }
/* Draufsicht: die Pegelkarte füllt die ganze Fläche, die Frontansicht ist weggeklappt */
.plan-ansichten.karte-voll .plan-oben.voll { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; border: 0; border-radius: 0; box-shadow: none; z-index: 25; }
.plan-oben.voll .plan-griff { cursor: default; }
.plan-oben.voll #plan-mini, .plan-oben.voll #plan-zahnrad, .plan-oben.voll > .plan-toolbar, .plan-oben.voll .plan-kpi { display: none !important; }
.plan-draufhinweis { display: none; position: absolute; left: 10px; bottom: 8px; z-index: 3; font-size: 11px; color: var(--muted); pointer-events: none; }
.plan-oben.voll .plan-draufhinweis { display: block; }
.plan-ansichten.karte-voll > .plan-front { visibility: hidden; }
.plan-ecke-knopf.an { color: var(--accent); }
.front-aktionen .icon-knopf.an { color: var(--accent); }
.plan-ansichten .plan-oben > .plan-toolbar { flex: none; padding: 8px 80px 8px 12px; font-size: 12.5px; gap: 8px; }
.plan-ansichten .plan-karte { min-height: 0; }
.plan-ansichten .plan-reset { right: auto; left: 10px; top: 10px; }
.plan-griff { display: none; position: absolute; left: 0; right: 0; top: 0; height: 26px; z-index: 3; cursor: move; align-items: center; padding: 0 110px 0 10px;
  font-size: 11px; color: var(--muted); background: var(--panel3); border-bottom: 1px solid var(--line2); user-select: none; }
.plan-oben.schwebend .plan-griff { display: flex; }
.plan-oben.schwebend { padding-top: 26px; box-sizing: border-box; position: absolute; flex: none !important; z-index: 20; min-height: 0; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden;
  resize: both; box-shadow: 0 8px 28px rgba(0,0,0,.5); background: var(--bg2); }
.plan-oben.schwebend .plan-ecke { top: 2px; right: 4px; gap: 3px; }   /* Titelleiste ist 26 px hoch: Knöpfe 22 px, mittig */
.plan-oben.schwebend .plan-ecke-knopf { width: 22px; height: 22px; min-height: 0; line-height: 1; box-sizing: border-box; }
.plan-oben.schwebend .plan-ecke-knopf svg { width: 12px; height: 12px; }
.plan-oben.schwebend.minimiert .plan-ecke { top: 2px; }
.plan-ansichten.karte-schwebt > .plan-teiler, .plan-ansichten.karte-min > .plan-teiler { display: none; }
/* Minimiert: nur die Leiste „Pegelkarte“ bleibt, die Frontansicht bekommt den Platz */
.plan-oben.minimiert { flex: 0 0 27px !important; height: 27px !important; min-height: 0; padding-top: 0; overflow: hidden; resize: none; }
.plan-oben.minimiert > :not(.plan-griff):not(.plan-ecke) { display: none !important; }
.plan-oben.minimiert .plan-griff { display: flex; }
.plan-oben.minimiert:not(.schwebend) .plan-griff { cursor: default; }
.plan-oben.minimiert .plan-ecke { top: 0; }
.plan-oben.schwebend.minimiert { height: 28px !important; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.plan-ansichten.karte-min > .plan-front { flex: 1; }
.plan-ansichten.karte-schwebt > .plan-front { flex: 1; }
/* Leiste ausgeblendet: nur „Karte veraltet“ und der Lade-Kreis bleiben, schwebend oben in der Mitte der Karte */
.plan-oben.leiste-aus > .plan-toolbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5; padding: 0; background: none; border: 0; box-shadow: none; }
.plan-oben.leiste-aus.schwebend > .plan-toolbar { top: 36px; }
.plan-oben.leiste-aus > .plan-toolbar > *:not(.veraltet):not(.loader) { display: none; }
.plan-oben > .plan-toolbar .plan-hinweis { flex-basis: 100%; margin: 0; }

/* Planer: Draufsicht oben, Frontansicht unten, Trenner dazwischen */
.plan-ansichten { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.plan-oben { position: relative; flex: 0 0 58%; min-height: 120px; display: flex; }
#plan-canvas-drauf { flex: 1; width: 100%; min-height: 0; display: block; background: var(--bg2); }
#plan-canvas { flex: 1; width: 100%; min-height: 0; display: block; background: var(--bg2); }
.plan-teiler {
  flex: none; height: 9px; cursor: row-resize; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.plan-teiler::before { content: ""; width: 44px; height: 3px; border-radius: 999px; background: var(--line2); }
.plan-teiler:hover::before { background: var(--accent); }
.plan-front { flex: 1; min-height: 140px; display: flex; }
.front-palette { width: 210px; flex: none; overflow-y: auto; padding: 10px; border-right: 1px solid var(--line); background: var(--panel); }
.front-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.front-tools { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.front-tools button:disabled { opacity: .4; cursor: default; }
.btn.chip.veraltet { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-weight: 500; }
.btn.chip.veraltet:hover { background: color-mix(in srgb, var(--warn) 24%, transparent); }
.front-aktionen { display: flex; gap: 4px; align-items: center; margin-left: 6px; }
.front-tools-rechts { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#front-canvas { flex: 1; width: 100%; min-height: 0; display: block; background: var(--bg2); outline: none; }
.pal-gruppe { font-size: 11px; color: var(--muted); margin: 8px 0 3px; }
.pal-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 10px; cursor: grab; border: 1px solid transparent;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.pal-item:hover { background: var(--panel3); border-color: var(--line2); }
.pal-item:active { cursor: grabbing; }
.pal-item .pal-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pal-item button { padding: 0 7px; }
details.schnell { margin: 6px 0; font-size: 13px; }
details.schnell summary { cursor: pointer; color: var(--muted); font-size: 12px; }
details.schnell.off { opacity: .55; }
/* Speicherstand in der Kopfzeile (Ordner daten/): Punkt grün = gespeichert, orange = speichert, rot = Fehler */
.version-tag { font-size: 11px; color: var(--muted); padding: 1px 7px; border: 1px solid var(--line2); border-radius: 3px; white-space: nowrap; cursor: default; }
.version-tag.alt { color: var(--warn); border-color: var(--warn); }
.speicher { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.speicher::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.speicher.speichert::before { background: var(--warn); }
.speicher.fehler { color: var(--bad); font-weight: 600; }
.speicher.fehler::before { background: var(--bad); }
/* Ansichtsfenster (index.html#ansicht): nur Draufsicht und Frontansicht */
body.nur-ansicht .top { display: none; }
body.nur-ansicht main { padding-top: 12px; }
.plan-toolbar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.legend {
  position: absolute; right: 14px; bottom: 14px; padding: 8px 11px; font-size: 11px;
  background: rgba(20,20,23,.88); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.legend .bar { width: 220px; height: 10px; border-radius: 999px; margin: 5px 0; }
.legend .ticks { display: flex; justify-content: space-between; color: var(--muted); }
.stack-card { border-left: 3px solid var(--accent); }
.stack-card.off { opacity: .6; background-image: var(--hatch); }
.stack-card .head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.stack-titel-zeile { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.stack-card input.stack-name { flex: 1; min-width: 0; max-width: 190px; font-weight: 600; padding: 2px 8px; }
.pal-schalter { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; cursor: pointer; color: var(--muted); }
.pal-hinweis { margin: 0 0 6px; }
.pal-ziel-zeile { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.pal-ziel-zeile select { flex: 1; min-width: 0; }
.front-tools .chip.stack-titel { cursor: text; }
.stack-card input[type=number] { width: 64px; }
.wege-box { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.tbl.wege th, .tbl.wege td { padding: 4px 3px; }
/* schmale Zahlenfelder ohne Pfeiltasten, sonst bleibt zum Eintippen kein Platz */
.tbl.wege input[type=number] { width: 54px !important; padding-left: 7px; padding-right: 7px; -moz-appearance: textfield; appearance: textfield; }
.tbl.wege input[type=number]::-webkit-outer-spin-button, .tbl.wege input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tbl.wege td:first-child { max-width: 110px; }
.weg-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tbl.wege select.filter-art { display: block; width: 72px; margin-top: 4px; padding: 5px 6px; font-size: 13px; }
.tbl.wege td:nth-child(5) input[type=number], .tbl.wege td:nth-child(6) input[type=number] { width: 72px !important; }
.tbl.wege td:nth-child(4) input[type=number] { width: 62px !important; }
.weg-auto { margin-left: 4px; font-size: 10px; color: var(--accent); }
.weg-auto.aus { color: var(--muted); }
.weg-db { display: block; margin: 4px 0 0 2px; font-size: 11px; color: var(--muted); }
.weg-db.check-bad { color: var(--bad); }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 13px; }
.stat b { text-align: right; font-weight: 500; }
.warnbox, .okbox {
  position: relative; padding: 8px 10px 8px 26px; border-radius: 12px; margin: 6px 0; font-size: 13px;
  background: var(--panel2); border: 1px solid var(--line);
}
.warnbox::before, .okbox::before {
  content: ""; position: absolute; left: 11px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn);
}
.warnbox.bad::before { background: var(--bad); }
.okbox::before { background: var(--ok); }
/* Scan-Vorschläge in der Marker-Karte */
.scan-karte { margin: 6px 0 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); }
.scan-karte .row > .muted { max-width: 70ch; }
.scan-liste { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 6px; }
.scan-zeile { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 10px; font-size: 13px; }
.scan-zeile:hover { background: var(--panel3); }
.scan-zeile .scan-text { flex: 1; }
.scan-zeile .scan-knoepfe { display: inline-flex; gap: 6px; }
.scan-zeile.ok .scan-text, .scan-zeile.info .scan-text { color: var(--ink2); }
.scan-zeile.weg .scan-text { color: var(--muted); text-decoration: line-through; }
.scan-punkt { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.scan-zeile.weg .scan-punkt { opacity: .35; }
.check-ok { color: var(--ok); }
.check-bad { color: var(--bad); }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 6px); z-index: 1000;
  background: var(--panel2); border: 1px solid var(--line2); padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: var(--bad); color: var(--bad); }

.help { max-width: 860px; }
.help p, .help li { color: var(--ink2); }
.okbox pre, .okbox code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.okbox pre { padding: 8px 10px; }
.help code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 900px) {
  .seite { height: auto; min-height: 100vh; }
  main { padding: 0 8px 8px; }
  .tab.active { flex-direction: column; height: auto; }
  .side, .side.right { width: auto; }
  .plan-raster { grid-template-columns: 1fr; }
  .plan-spalte { overflow: visible; }
  #plan-canvas { height: 60vh; flex: none; }
  .plan-oben { flex: none !important; }
  .plan-teiler { display: none; }
  .plan-front { flex-direction: column; min-height: 0; }
  .front-palette { width: auto; max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); }
  #front-canvas { height: 50vh; flex: none; }
  .tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: 1; justify-content: center; padding: 5px 8px; }
}

/* Crews, Archiv, Projekte */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border-radius: 999px; padding: 3px 11px; font-size: 12px; background: var(--panel3); border-color: var(--line); }
.chip.on { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
.chip.neu { background: transparent var(--hatch); border-style: dashed; border-color: rgba(255,255,255,.24); color: var(--muted); }
.chip.neu:hover { border-color: rgba(255,255,255,.4); color: var(--text); }
.list .item.variante { padding-left: 24px; }
.card a { color: var(--accent); text-decoration: none; }
.card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip .x { color: currentColor; opacity: .55; margin-left: 2px; }
.chip.schreiben, .chip.schreiben:hover { background: var(--bg2); border-style: solid; border-color: var(--accent); color: var(--text); padding: 3px 11px; box-shadow: 0 0 0 3px var(--accent-soft); }
input.chip-input { background: transparent; border: none; border-radius: 0; outline: none; box-shadow: none; padding: 0; width: 10ch; font-size: 12px; line-height: 17px; color: inherit; }
/* der Tag selbst zeigt den Fokus (blauer Rand), das Feld darin keinen eigenen Rahmen */
input.chip-input:focus, input.chip-input:focus-visible { outline: none; box-shadow: none; border: none; }
/* weiches Einblenden (Konstellation des gewählten Projekts, Box-Archiv) */
@keyframes einblenden { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.einblenden { animation: einblenden 1.1s cubic-bezier(.25,.1,.25,1) both; }
.archiv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1300px) { .archiv-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .archiv-grid { grid-template-columns: 1fr; } }
.archiv-item { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.archiv-item.aktiv { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.archiv-item.waehlbar { cursor: pointer; transition: border-color .4s ease-in-out, box-shadow .4s ease-in-out; }
.archiv-item.waehlbar:not(.aktiv):hover { border-color: var(--muted); }
.archiv-item.waehlbar.aktiv { cursor: default; }
.archiv-item .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 3px; }
.archiv-item .head input[type=text] { flex: 1; }
.archiv-item .tbl select { max-width: 190px; }
.archiv-grid .list .item { background: var(--panel2); cursor: default; }
.crew-block { border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px 8px 8px; margin-top: 8px; }
.crew-block .gruppe { padding: 6px 0; border-top: 1px solid var(--line); }
.crew-block .gruppe .row { margin: 0; flex-wrap: nowrap; }
.crew-block .gruppe.kompakt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; }
.crew-block .gruppe .row + .row { margin-top: 5px; gap: 10px; }
.crew-block .gruppe select { flex: 1; min-width: 0; }
.crew-block .gruppe label { min-width: 0; display: inline-flex; align-items: center; gap: 5px; }
.crew-block > .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.crew-block.ohne { background: transparent var(--hatch); }
/* kompakt (Projekte-Seite): Crew-Name als eigene Kopfzeile, Boxen eingerückt darunter; × der Crew erst beim Drüberfahren */
.crew-block.kompakt { padding: 0; overflow: hidden; }
.crew-block.kompakt > .head { margin: 0; padding: 7px 8px 7px 12px; background: var(--panel3); border-bottom: 1px solid var(--line2); min-height: 38px; }
.crew-block.kompakt > .head b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.crew-block.kompakt > .head button { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.crew-block.kompakt > .head:hover button, .crew-block.kompakt > .head button:focus-visible { opacity: 1; pointer-events: auto; }
.crew-block.kompakt .gruppe { margin: 0 8px 0 22px; }
.crew-block.kompakt .gruppe:first-child { border-top: none; }
/* Assistent: kompakte Zeile mit Zahlenfeldern darunter */
.crew-block.kompakt .gruppe.zahlen { display: block; padding: 6px 0 7px; }
.crew-block.kompakt .gruppe.zahlen .z1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.crew-block.kompakt .gruppe.zahlen .z1 select { flex: 1; min-width: 0; }
.crew-block.kompakt .gruppe.zahlen .zahlen-zeile { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.crew-block.kompakt .gruppe.zahlen .zahlen-zeile label { display: inline-flex; align-items: center; gap: 5px; }
.crew-block.drop { border-color: var(--accent); background: var(--accent-soft); }
.richt-karte.drop { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 10px; }
.archiv-grid.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .archiv-grid.zwei { grid-template-columns: 1fr; } }
.archiv-grid .list .item.ziehbar { cursor: grab; }
.archiv-grid .list .item.ziehbar:active { cursor: grabbing; }
.toggle2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle2 button { flex-direction: column; padding: 11px; border-radius: 14px; }
.toggle2 button small { font-weight: 500; color: var(--muted); font-size: 11px; }
/* „Top“ gewählt: das Feld nimmt zwei kleine Schalter (Selbstbau | Markentops) auf und klappt beim Umschalten auf */
/* Schalter Subwoofer | Top in der Gehäuse-Bibliothek: klein und eckig wie „Outdoor | Indoor“ im Projekt-Assistenten */
.toggle2.typ { display: flex; gap: 6px; align-items: center; }
.toggle2.typ button { flex-direction: row; box-sizing: border-box; height: 28px; padding: 0 14px; border-radius: 4px; font-size: 13px; line-height: 1; white-space: nowrap; }
.toggle2.typ > button small { display: none; }
/* „Top“ gewählt: an seiner Stelle stehen die zwei Schalter Selbstbau | Markentops (aufploppen beim Umschalten); markiert ist nur, was gewählt ist */
.toggle2.typ .tbox { display: flex; box-sizing: border-box; height: 28px; padding: 0; border: 1px solid var(--line2, rgba(255,255,255,.14)); border-radius: 4px; background: var(--panel3, rgba(255,255,255,.05)); min-width: 0; overflow: hidden; transform-origin: left center; }
.tbox .tsub { display: flex; gap: 0; }
.toggle2.typ .tbox .tsub button { height: 26px; border: 0; border-radius: 0; background: transparent; }
.toggle2.typ .tbox .tsub button + button { border-left: 1px solid var(--line2, rgba(255,255,255,.14)); }
.toggle2.typ .tbox .tsub button:hover { background: rgba(255,255,255,.06); }
.toggle2.typ .tbox .tsub button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }
.tbox.neu { animation: tbox-auf .32s cubic-bezier(.2, .9, .3, 1.25) both; }
.tbox.neu .tsub button { animation: tsub-auf .3s ease both; }
.tbox.neu .tsub button:nth-child(2) { animation-delay: .08s; }
@keyframes tbox-auf { from { opacity: 0; transform: scaleX(.35); } to { opacity: 1; transform: none; } }
@keyframes tsub-auf { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tbox.neu, .tbox.neu .tsub button { animation: none; } }
.toggle2 button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
/* Projekt-Assistent, alles in einer Fläche: Kopfzeile (Name, draußen/drinnen, Übernehmen), darunter die Abschnitte als Karten */
.ass-kopf { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.ass-name { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; max-width: 440px; color: var(--muted); }
.ass-name input { flex: 1; min-width: 0; font-weight: 600; }
.ass-kopf .toggle2 { gap: 6px; }
.ass-kopf .toggle2 button { padding: 3px 12px; border-radius: 4px; line-height: 1.25; }
/* Projekt ohne eigenen Namen: Knopf wird rot und wackelt, danach ist das Namensfeld rot markiert */
button.primary.abgelehnt, button.primary.abgelehnt:hover { background: var(--bad); border-color: var(--bad); color: #fff; animation: wackeln .55s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes wackeln { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.ass-name input.feld-fehler { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.ass-name:has(input.feld-fehler) { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { button.primary.abgelehnt { animation: none; } }
.ass-aktionen { margin-left: auto; display: flex; gap: 8px; align-items: center; }
/* Abschnitte als untereinander gestapelte, aufklappbare Menüs (eckig, wie die Panels in Blender) */
.ass-karten { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 12px; }
.ass-spalte { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.ass-spalte-konst { flex-basis: 380px; max-width: 560px; }
.ass-spalte:empty { display: none; }
/* kleines „Beta“-Etikett an Knöpfen für noch unfertige Funktionen */
.beta-marke { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--warn); border-radius: 8px; color: var(--warn); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; vertical-align: middle; }
.ass-menue { margin: 0 0 12px; break-inside: avoid; min-width: 0; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel); }
.ass-kopfleiste { margin: 0; padding: 7px 12px; font-weight: 600; font-size: 13px; background: var(--panel3); border-bottom: 1px solid var(--line2); border-radius: 2px 2px 0 0; }
.ass-menue-inhalt { padding: 10px 14px 12px; min-width: 0; }
.ass-menue .ass-text { overflow-wrap: anywhere; }
.ass-kopf .toggle2 button { padding: 4px 14px; }
.ass-bloecke { display: flex; flex-direction: column; gap: 12px; }
.ass-block h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ass-fgs { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.ass-fg { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; }
.ass-fg > label { display: block; font-size: 12px; color: var(--muted); margin: 0; }
.ass-fg .ctl { display: flex; align-items: center; gap: 6px; min-height: 30px; flex-wrap: wrap; }
.ass-fg input[type=number] { width: 78px; }
.ass-fg select { width: 280px; max-width: 100%; }
@media (max-width: 560px) { .ass-fg { grid-template-columns: 1fr; gap: 2px; } }
.ass-haken { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; white-space: nowrap; }
/* Stromquellen (Projekte-Tab) */
.strom-quelle { padding: 6px 0 8px; border-bottom: 1px solid rgba(128, 128, 128, 0.22); }
.strom-quelle:first-child { padding-top: 0; }
.strom-fenster { max-width: 620px; }
.strom-gen-bild { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.strom-gen-bild.gross { width: 120px; height: 120px; }
.strom-gen-bild.leer { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; background: rgba(128, 128, 128, 0.15); }
.ass-neben { align-self: center; }
.ass-text { max-width: 980px; margin-top: 10px; }
.ass-text + .ass-text { margin-top: 4px; }
/* Konstellation im Assistenten: Crews nebeneinander statt untereinander */
.ass-menue .crew-gruppen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; align-items: start; margin-top: 8px; }
/* Crew-Blöcke im Assistenten: eckig wie die Panels */
.ass-menue .crew-block { border-radius: 3px; border-color: var(--line2); }
.ass-menue .crew-block.kompakt > .head { border-radius: 2px 2px 0 0; }
.ass-menue .crew-block.kompakt > button { margin: 6px 8px 8px; border-radius: 3px; }
.ass-menue .crew-block.kompakt > button:not(.danger) { border-color: var(--warn); color: var(--warn); }
.ass-menue .crew-gruppen > *, .ass-menue .crew-block, .ass-menue .crew-block .gruppe { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ass-menue .crew-block .gruppe .row { flex-wrap: wrap; }
.ass-menue .crew-block .gruppe select { max-width: 100%; width: 100%; }
.ass-menue-inhalt { overflow: hidden; }
.ass-menue .crew-gruppen > :not(.crew-block) { grid-column: 1 / -1; }
tr.gewaehlt td { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 900px) {
  .ass-aktionen { margin-left: 0; flex: 1 1 100%; }
  .ass-aktionen button { flex: 1; justify-content: center; }
}
.list-head { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 3px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.list-head:first-child { margin-top: 0; }
.list-head .muted { font-weight: 400; }
.list-head.klapp { cursor: pointer; user-select: none; }
.list-head.klapp:hover { color: var(--text); }
.list-head.unter { margin: 8px 0 2px 10px; border-bottom: none; padding-bottom: 0; font-weight: 500; }
.list-head.zu { margin-bottom: 0; }
.klapp-pfeil { display: inline-block; width: 12px; }
.box-suche { width: 100%; margin-top: 12px; }

/* Logo und Icons */
.brand { display: flex; align-items: center; gap: 10px; }
/* Fußleiste: „by keter“ */
.fuss { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 12px 8px; font-size: 12px; color: var(--muted); }
.fuss-text { letter-spacing: .03em; }
body.nur-ansicht .fuss { display: none; }
.logo {
  width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center;
}
.logo img { width: 34px; height: 34px; object-fit: contain; display: block; }   /* weiße Katze auf durchsichtigem Grund */
.ico { width: 16px; height: 16px; flex: none; }
button.small .ico { width: 13px; height: 13px; }
button.kipp-knopf { padding: 4px 11px; }
button.kipp-knopf .ico { width: 22px; height: 22px; }
.tabs .ico { width: 15px; height: 15px; }
@media (max-width: 600px) { .tabs .ico { display: none; } }

/* Große Kennzahl (Planer, Tanzfläche) */
.kpi { margin-bottom: 12px; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-wert { font-family: var(--font-num); font-size: 44px; font-weight: 500; line-height: 1.05; }
.kpi-wert small { font-size: 22px; font-weight: 400; color: var(--muted); margin-left: 3px; }

/* Box-Bilder (RS.front.boxBild): in der Boxen-Liste und neben den Stammdaten */
.box-zeile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.box-bild-rahmen { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: flex-end; justify-content: center; }
.box-bild, .pal-bild { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.stamm { display: flex; gap: 18px; align-items: flex-start; }
.stamm > .grid2 { flex: 1; min-width: 0; }
.mund-editor .mund-zeile { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.mund-bild { position: relative; flex: none; line-height: 0; }
.mund-bild canvas { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.mund-rahmen {
  position: absolute; box-sizing: border-box; border: 2px solid var(--accent); background: rgba(76,125,255,.16); border-radius: 2px;
  cursor: move; touch-action: none;
}
.stamm-bild { flex: none; margin: 0; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
@media (max-width: 900px) { .stamm { flex-direction: column-reverse; } .stamm-bild { width: auto; } }

/* Einheit rechts im Eingabefeld */
.feld { position: relative; display: inline-flex; align-items: center; }
.feld > input { padding-right: 30px; }
.feld > input[type=number]:not([style*="width"]) { width: 100px; }
.unit.in { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 12px; }

/* Leere Zustände */
.leer {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 18px;
  border: 1px dashed var(--line2); border-radius: 14px; background: var(--hatch); color: var(--muted); font-size: 13px;
}
.leer > .ico { width: 22px; height: 22px; color: var(--ink2); }
.leer > div { max-width: 36ch; }
.leer button { margin-top: 4px; }

/* (Die Windows-Einstellung „reduzierte Bewegung“ wird nicht mehr ausgewertet: Animationen an/aus steht in den Einstellungen → Performance
   und gilt für alle Browser; ausgeschaltet setzt js/einstellungen.js die Klasse .ohne-animation.) */
.pal-bild { flex: none; display: block; border-radius: 2px; background: var(--bg2); }

/* ---------- Einstellungen (Zahnrad oben rechts) ---------- */
button.zahnrad { padding: 6px; width: 32px; height: 32px; justify-content: center; }
button.zahnrad .ico { width: 17px; height: 17px; transition: transform .5s var(--ease); }
button.zahnrad:hover .ico { transform: rotate(60deg); }
/* Admin-Schloss in der Kopfzeile: grau = kein Schutz eingerichtet, rot getönt = gesperrt (Gast), Akzent = als Admin angemeldet */
button.schloss-knopf { padding: 6px; width: 32px; height: 32px; justify-content: center; }
button.schloss-knopf .ico { width: 17px; height: 17px; }
button.schloss-knopf.gast { color: var(--warn); }
button.schloss-knopf.admin { color: var(--accent); }
.tabs button.gesperrt-tab { opacity: .4; cursor: progress; }
.modal-admin { width: min(460px, 100%); }
.modal-admin .row { margin: 8px 0; }
.modal-admin .frage-knoepfe { margin-top: 12px; flex-wrap: wrap; }
/* gesperrte Boxen und Treiber: Inhalt sichtbar, aber nicht bedienbar (inert) */
.gesperrt { opacity: .62; cursor: not-allowed; }
.ganz-gesperrt { opacity: .4; filter: grayscale(1); }   /* komplett ausgegraut (z. B. Vermessung ohne Admin) */
.sperr-hinweis { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding-left: 12px; }
.sperr-hinweis::before { display: none; }
.sperr-hinweis .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.schloss-mini { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--muted); }
.schloss-mini .ico { width: 12px; height: 12px; }
.modal-hinter {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(4,4,6,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: modal-hinter-ein .3s ease both;
}
.modal {
  width: min(760px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow), 0 30px 80px -20px rgba(0,0,0,.8);
  animation: modal-ein .45s cubic-bezier(.2,.9,.25,1.12) both; transform-origin: 50% 40%;
}
/* Einstellungen: feste Höhe, damit das Fenster beim Reiterwechsel nicht springt */
.modal-einst { height: min(80vh, 720px); }
/* Treiber-Finder */
.modal-finder { width: min(1620px, 100%); height: min(86vh, 860px); max-height: none; }
.finder-rumpf { min-height: 0; flex: 1; }
.finder-links { width: 340px; flex: none; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.finder-links-kopf { padding: 12px 12px 8px; border-bottom: 1px solid var(--line); }
.finder-liste { flex: 1; overflow-y: auto; padding: 6px 8px; }
.finder-treiber { display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px; border-radius: 10px; cursor: pointer; }
.finder-treiber:hover { background: var(--panel2); }
.finder-treiber.unvollstaendig { opacity: .55; }
.finder-name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.finder-name small { font-size: 11px; }
.finder-rechts { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 18px 18px; }
.finder-optionen { justify-content: space-between; margin: 0 0 6px; }
.finder-chart { height: 300px; margin: 10px 0; }
.finder-tbl-rahmen { overflow-x: auto; }
.finder-tbl th.sortierbar { cursor: pointer; white-space: nowrap; }
.finder-tbl th.sortierbar:hover, .finder-tbl th.aktiv { color: var(--text); }
.finder-tbl td { white-space: nowrap; }
.finder-tbl tr.ref td { background: var(--accent-soft); }
.finder-tbl tr.unpassend td { opacity: .55; }
.finder-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
@media (max-width: 800px) { .finder-rumpf { flex-direction: column; } .finder-links { width: auto; max-height: 40%; } }
/* Lade-Kreis (rechnet gerade): Ring, der sich dreht und dabei aufbaut und abbaut */
.loader {
  --color-1: currentColor; --size: 0.6px;
  display: inline-block; flex: none; vertical-align: middle;
  width: calc(48 * var(--size)); height: calc(48 * var(--size)); border-radius: 50%; position: relative;
  animation: loader-rotate 1s linear infinite;
}
.loader.klein { --size: 0.4px; }
.loader::before {
  content: ''; box-sizing: border-box; position: absolute; inset: 0; border-radius: 50%;
  border: calc(5 * var(--size)) solid var(--color-1);
  animation: loader-clip 2s linear infinite;
}
button > .loader { margin-right: 7px; }
.loader + .muted, .loader + span { margin-left: 6px; }
@keyframes loader-rotate { 100% { transform: rotate(360deg); } }
@keyframes loader-clip {
  0% { clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0); }
  25% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0); }
  50% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%); }
  75% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%); }
  100% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0); }
}
.modal-frage { width: min(400px, 100%); }
.frage-inhalt { overflow: visible; }
.frage-text { margin: 0 0 16px; font-size: 15px; line-height: 1.45; }
.frage-knoepfe { justify-content: flex-end; margin: 0; }
.modal-hinter.zu { animation: modal-hinter-aus .25s ease both; }
.modal-hinter.zu .modal { animation: modal-aus .25s ease both; }
@keyframes modal-hinter-ein { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-hinter-aus { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-ein { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes modal-aus { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(.96); } }
.modal-kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.modal-kopf h2 { margin: 0; }
.modal-zu { width: 30px; height: 30px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; }
.modal-rumpf { display: flex; min-height: 0; flex: 1; }
.modal-reiter { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-right: 1px solid var(--line); min-width: 150px; }
.modal-reiter button { justify-content: flex-start; background: transparent; border-color: transparent; color: var(--muted); }
.modal-reiter button:hover { background: var(--panel2); color: var(--text); }
.modal-reiter button.active { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
.modal-inhalt { flex: 1; overflow: auto; padding: 16px 20px 20px; animation: einblenden .3s var(--ease) both; }
@media (max-width: 600px) {
  .modal { max-height: calc(100vh - 32px); }
  .modal-rumpf { flex-direction: column; }
  .modal-reiter { flex-direction: row; border-right: none; border-bottom: 1px solid var(--line); min-width: 0; padding: 10px; }
}
.farb-zeile { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.farb-zeile:first-of-type { border-top: none; }
.farb-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
input.farbkreis { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line2); border-radius: 50%; background: none; cursor: pointer; flex: none; }
input.farbkreis::-webkit-color-swatch-wrapper { padding: 2px; }
input.farbkreis::-webkit-color-swatch { border: none; border-radius: 50%; }
input.farbkreis::-moz-color-swatch { border: none; border-radius: 50%; }
input.farbhex { width: 86px; font-family: var(--font-num); text-transform: uppercase; }
.farb-zurueck .ico { width: 13px; height: 13px; }
.chip.farb-muster { width: 22px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; }
/* Schalter (Checkbox als Kippschalter) */
.schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
input.schalter { -webkit-appearance: none; appearance: none; width: 42px; height: 24px; padding: 0; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel3); position: relative; cursor: pointer; flex: none; transition: background-color .2s ease, border-color .2s ease; }
input.schalter::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background-color .2s ease; }
input.schalter:checked { background: var(--accent); border-color: var(--accent); }
input.schalter:checked::after { transform: translateX(18px); background: #fff; }

/* Crew-Farben: aktive Tags in der Crew-Farbe, inaktive mit Farbpunkt; Kopf des Crew-Blocks mit Farbstreifen */
.chip.crew-farbe.on { background: var(--crew, var(--pill)); border-color: var(--crew, var(--pill)); color: var(--crew-ink, var(--pill-ink)); }
.chip.crew-farbe:not(.on)::before { content: ''; display: var(--crew-punkt, none); width: 7px; height: 7px; border-radius: 50%; background: var(--crew); margin-right: 5px; vertical-align: 1px; }
.crew-block.kompakt > .head[data-crew] { box-shadow: inset 3px 0 0 var(--crew, transparent); }

/* Performance: Animationen aus (Einstellung je PC) */
.ohne-animation *, .ohne-animation *::before, .ohne-animation *::after { animation: none !important; transition: none !important; }
.ohne-animation .modal-hinter { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Aufgeräumt: Stack-Karte mit stillen Icon-Knöpfen, Kopfzeile ohne Beschriftung der Datei-Knöpfe */
.stack-card .stack-icons { display: flex; gap: 4px; align-items: center; }
.stack-card .stack-icons button.kipp-knopf { width: 28px; height: 28px; padding: 0; justify-content: center; }
.stack-card .stack-icons button.kipp-knopf .ico { width: 15px; height: 15px; }
.stack-card .stack-icons button.kipp-knopf.an { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); }
.top-actions #btn-export, .top-actions label.btn { font-size: 0; gap: 0; width: 32px; height: 32px; padding: 0; justify-content: center; }
.top-actions #btn-export .ico, .top-actions label.btn .ico { width: 16px; height: 16px; }
.brand-text .brand-hoch { font-size: .62em; margin-left: 1px; position: relative; top: -.35em; }

/* =====================================================================================================================
   Feinschliff „ruhig und hochwertig“ (05.11.): Schwarz, Glas statt Rahmen, wenig Kontur, leise Bewegung.
   Steht bewusst am Ende der Datei und überschreibt nur Aussehen, nicht Layout.
   ===================================================================================================================== */
:root {
  --bg: #050506;
  --bg2: rgba(255,255,255,.045);              /* Eingabefelder: gefüllt statt umrandet */
  --panel: rgba(24,24,28,.62);
  --panel2: rgba(255,255,255,.045);
  --panel3: rgba(255,255,255,.085);
  --line: rgba(255,255,255,.06);
  --line2: rgba(255,255,255,.10);
  --muted: #86868E;
  --radius: 20px;
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 48px -28px rgba(0,0,0,.9);
  --ease: cubic-bezier(.22,1,.36,1);
  --glas: blur(26px) saturate(1.35);
}
body {
  background: radial-gradient(900px 520px at 50% -140px, rgba(255,255,255,.07), transparent 70%), radial-gradient(700px 500px at 100% 100%, rgba(76,125,255,.05), transparent 70%), var(--bg);
  background-attachment: fixed;
  letter-spacing: .003em;
}
h2 { font-weight: 500; font-size: 18px; letter-spacing: -.005em; }
h3 { font-weight: 500; letter-spacing: -.003em; }
b, strong { font-weight: 560; }

/* Kopfzeile und Reiter: schwebendes Glas */
.top { background: transparent; padding: 14px 20px 8px; }
.tabs { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.06); backdrop-filter: var(--glas); -webkit-backdrop-filter: var(--glas); padding: 4px; gap: 2px; }
.tabs button, .box-tabs button { transition: background-color .35s var(--ease), color .35s var(--ease), transform .2s var(--ease); font-weight: 480; }
.tabs button.active, .box-tabs button.active { box-shadow: 0 6px 18px -8px rgba(255,255,255,.45); }
.box-tabs { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.06); }
.brand-text { font-weight: 560; letter-spacing: -.01em; display: flex; align-items: center; }
.brand-text img { display: block; height: 22px; width: auto; }   /* Schriftzug als PNG (css/stack-lab.png) */

/* Flächen: Glas, kaum Rand */
.side, .center, .plan-spalte, .plan-haupt > .plan-toolbar, .card, .modal {
  background: var(--panel); border-color: rgba(255,255,255,.065);
  backdrop-filter: var(--glas); -webkit-backdrop-filter: var(--glas);
}
.side, .center, .plan-spalte { border-radius: 26px; box-shadow: var(--shadow); }
.card { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.028)); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.side .card, .plan-spalte .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.05); border-radius: 16px; }
.plan-haupt > .plan-toolbar { border-radius: 999px; padding: 8px 18px; }
.modal { background: rgba(22,22,26,.86); border-color: rgba(255,255,255,.09); border-radius: 26px; }
.modal-hinter { background: rgba(0,0,0,.5); backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1); }

/* Knöpfe: leise, gefüllt statt umrandet; die eine wichtige Aktion bleibt die weiße Pille */
button, .btn { background: rgba(255,255,255,.07); border-color: transparent; font-weight: 480; transition: background-color .28s var(--ease), color .28s var(--ease), transform .2s var(--ease), box-shadow .28s var(--ease); }
button:hover, .btn:hover { background: rgba(255,255,255,.13); border-color: transparent; }
button:active, .btn:active { transform: scale(.965); }
button:disabled { opacity: .38; pointer-events: none; }
button.primary, a.btn.primary { box-shadow: 0 8px 22px -10px rgba(255,255,255,.55); }
button.primary:hover { transform: translateY(-1px); }
button.danger { background: rgba(255,90,95,.08); }
button.danger:hover { background: rgba(255,90,95,.18); }
.tabs button, .box-tabs button, .sprache button { background: transparent; }
.tabs button:hover, .box-tabs button:hover, .sprache button:hover { background: transparent; color: var(--text); }
.tabs button.active, .box-tabs button.active, .sprache button.active, button.primary, a.btn.primary, .chip.on { background: var(--pill); color: var(--pill-ink); }

/* Eingabefelder: ruhig gefüllt, Rahmen erst beim Fokus */
input, select, textarea { background: rgba(255,255,255,.055); border-color: transparent; border-radius: 12px; padding: 6px 11px; }
input:hover, select:hover, textarea:hover { background: rgba(255,255,255,.075); }
input:focus, select:focus, textarea:focus { background: rgba(255,255,255,.07); border-color: rgba(76,125,255,.7); box-shadow: 0 0 0 4px rgba(76,125,255,.16); }
select { cursor: pointer; }
/* Aufgeklappte Auswahlliste: der Browser zeichnet sie mit dem Hintergrund der Einträge. Das Feld selbst ist durchsichtig (rgba), die Liste
   wurde dadurch weiß mit heller Schrift, also unleserlich. Die Einträge bekommen darum eine feste dunkle Farbe (aus --bg abgeleitet, immer deckend). */
select option, select optgroup { background-color: color-mix(in srgb, var(--bg) 90%, white); color: var(--text); }
select option:checked, select option:hover { background-color: var(--accent); color: #fff; }
select optgroup { font-style: normal; color: var(--muted); }

/* Listen: Auswahl als sanft gefüllte Fläche mit feiner Kontur statt harter Umrandung */
.list .item { border-radius: 14px; transition: background-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.list .item:hover { background: rgba(255,255,255,.06); }
.list .item.sel { background: rgba(255,255,255,.09); border-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.chip { background: rgba(255,255,255,.07); border-color: transparent; }
.badge { background: rgba(255,255,255,.07); border-color: transparent; }
.tbl th, .tbl td { border-bottom-color: rgba(255,255,255,.045); }
.tbl th { font-size: 11.5px; letter-spacing: .02em; }
.stack-gruppe, .stack-card .stack-aktionen, .stack-card details.schnell { border-top-color: rgba(255,255,255,.05); }
.stack-gruppe-titel, .list-head { letter-spacing: .06em; font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 500; border-bottom-color: transparent; }
.stack-card { border-left-width: 0; box-shadow: inset 3px 0 0 var(--accent), 0 1px 0 rgba(255,255,255,.04) inset; }
.stack-card.off { background-image: none; }
.legend, #toast { background: rgba(20,20,24,.72); backdrop-filter: var(--glas); -webkit-backdrop-filter: var(--glas); border-color: rgba(255,255,255,.08); }
.kpi-wert { font-weight: 400; letter-spacing: -.02em; }
.fuss { opacity: .6; transition: opacity .4s var(--ease); }
.fuss:hover { opacity: 1; }

/* Bewegung: Seitenwechsel blendet weich ein, Listen und Karten laufen gestaffelt nach */
@keyframes rs-ein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rs-weich { from { opacity: 0; } to { opacity: 1; } }
.tab.active { animation: rs-ein .55s var(--ease) backwards; }
/* Karten, Listen und Seitenleisten blenden nur beim Wechsel des Reiters ein (app.js setzt .tab-ein für 0,8 s), nicht bei jedem Neuaufbau:
   der Planer baut seine Stack-Karten bei jeder Änderung neu auf, und jede neue Karte spielte sonst die Einblendung ab (Ruckeln beim Ziehen im Ansichtsfenster) */
.tab.tab-ein .card, .tab.tab-ein .stack-card, .tab.tab-ein .archiv-item { animation: rs-weich .6s var(--ease) backwards; }
.tab.tab-ein .side { animation: rs-weich .5s var(--ease) backwards; }
.tab.tab-ein .list .item { animation: rs-weich .4s var(--ease) backwards; }
.ohne-animation .tab.active, .ohne-animation .tab.active *, .ohne-animation .list .item { animation-duration: .01ms !important; }

.archiv-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.05); border-radius: 18px; transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
.archiv-item:hover { background: rgba(255,255,255,.065); }
.archiv-item.aktiv { background: rgba(255,255,255,.075); border-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.crew-block.drop, .toggle2 button.on { border-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }

/* Hilfe: schmale, ruhige Lesespalte */
.help { max-width: 760px; margin: 0 auto; padding: 14px 8px 40px; line-height: 1.7; }
.help h2 { font-size: 26px; font-weight: 500; letter-spacing: -.02em; margin: 6px 0 18px; }
.help h3 { font-size: 15px; margin: 30px 0 8px; color: var(--text); }
.help p, .help li { color: #B4B4BC; font-weight: 380; }
.help li { margin: 5px 0; }
.help code { background: rgba(255,255,255,.07); border-radius: 7px; padding: 1px 7px; }

/* Gezielter: kleine Icon-Knöpfe, zweitrangige Aktionen zurückgenommen */
button.icon-knopf { width: 36px; height: 36px; padding: 0; justify-content: center; }
button.icon-knopf .ico { width: 21px; height: 21px; stroke-width: 1.8; }
.archiv-item .actions { margin-top: 8px; align-items: center; }
.archiv-item .actions button:not(.primary) { opacity: .5; transition: opacity .3s var(--ease), background-color .28s var(--ease), transform .2s var(--ease); }
.archiv-item:hover .actions button:not(.primary), .archiv-item.aktiv .actions button:not(.primary), .archiv-item .actions button:focus-visible { opacity: 1; }
.archiv-item .head b { font-weight: 560; font-size: 15px; }
.archiv-item .small-text { color: var(--muted); }

/* Formulare: Beschriftung über dem Feld, mehr Luft */
.grid2 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 22px; }
.grid2 .row { margin: 0; gap: 4px 6px; align-items: center; }
.grid2 .row > label:first-child { flex: 1 0 100%; min-width: 0; font-size: 11.5px; letter-spacing: .01em; color: var(--muted); }
.grid2 .row input[type=number], .grid2 .row input[type=text] { min-width: 0; }
.card > h3:first-child { margin-bottom: 14px; }
.card h3 + .muted, .card h3 + .small-text { margin-top: -8px; }

/* Kästen durchsichtig: kaum Füllung, feine Kontur; der Hintergrund scheint durch (Dialoge bleiben lesbar halb deckend) */
:root { --panel: rgba(255,255,255,.022); --panel2: rgba(255,255,255,.03); --panel3: rgba(255,255,255,.07); }
.side, .center, .plan-spalte, .plan-haupt > .plan-toolbar, .plan-kpi { background: rgba(255,255,255,.018); border-color: rgba(255,255,255,.07); box-shadow: none; }
.card, .side .card, .plan-spalte .card, .archiv-item, .stack-card { background: rgba(255,255,255,.022); border-color: rgba(255,255,255,.06); box-shadow: none; }
.stack-card { box-shadow: inset 3px 0 0 var(--accent); }
.archiv-item.aktiv { background: rgba(255,255,255,.04); }
.tabs, .box-tabs { background: rgba(255,255,255,.03); }
.modal { background: rgba(14,14,18,.8); }

/* Keine Unschärfe auf scrollenden Flächen: die Kästen sind jetzt durchsichtig, die Unschärfe brächte nichts und erzeugt beim Darüberfahren Bildreste */
.side, .center, .plan-spalte, .plan-haupt > .plan-toolbar, .plan-kpi, .card { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Hintergrundbild (Einstellungen → Hintergrund): fest hinter allem, abgedunkelt und auf Wunsch weichgezeichnet */
html.mit-bild body::before {
  content: ""; position: fixed; inset: -40px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(5,5,6,var(--bg-dunkel,.55)), rgba(5,5,6,var(--bg-dunkel,.55))), var(--bg-bild) center / cover no-repeat;
  filter: blur(var(--bg-blur,0px)); transition: opacity .6s var(--ease);
}
html.mit-bild body { background: transparent; }
.hg-vorschau { height: 150px; border-radius: 16px; background: rgba(255,255,255,.04) center / cover no-repeat; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.hg-zeile { display: grid; grid-template-columns: 120px 1fr 56px; gap: 12px; align-items: center; margin-top: 14px; }
.hg-wert { text-align: right; }
/* Einstellungen: Abschnitte, „Gilt für“-Schild, Tastatur-Reiter */
.einst-sek + .einst-sek { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.einst-kopf { display: flex; align-items: center; gap: 10px; }
.einst-gilt { font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.einst-gilt.alle { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.einst-info > div { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.einst-sprache { display: inline-flex; }
/* Geräte-Fenster (Endstufen, DSPs): Auswahl, Zuordnung, Neues Gerät */
.modal-geraete { width: min(860px, 100%); height: min(82vh, 760px); }
/* Geräte als freies Fenster (wie die Pegelkarte): verschiebbar, in der Größe änderbar, minimierbar zum Knopf „Geräte“ */
.geraete-win { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 420px; min-height: 260px; resize: both; overflow: hidden;
  background: #0c0c0f; border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.55); outline: none; }
.geraete-win .geraete-kopf { cursor: move; user-select: none; }
.geraete-win.versteckt { display: none; }
.geraete-win.mini-leiste { height: auto !important; min-height: 0; resize: none; }
.geraete-win.mini-leiste .modal-rumpf { display: none; }
.geraete-suche { width: 100%; margin: 4px 0 8px; }
.geraete-gruppe { margin: 14px 0 4px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.geraet-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; flex-wrap: wrap; }
.geraet-zeile:hover { background: var(--panel2); }
.geraet-zeile.im-projekt { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
/* Auswahlmodus: alle grau, gewählte farbig mit Rand */
.wahl-modus .geraet-zeile:not(.im-projekt) { opacity: .45; filter: grayscale(1); }
.wahl-modus .geraet-zeile:not(.im-projekt):hover { opacity: .75; }
.wahl-modus .geraet-zeile.im-projekt, .wahl-direkt .geraet-zeile.im-projekt { border-width: 2px; padding: 7px 11px; }
.wahl-direkt .geraet-zeile { cursor: pointer; }
.geraet-name { flex: 1; min-width: 160px; }
.latenz-chip { display: inline-block; font-size: 12px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.latenz-chip small { color: var(--muted); }
.latenz-chip.leer { color: var(--muted); }
.zuordnung-stack { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
/* Zuordnung: Geräte-Karten mit Frontbild, Boxen unten zum Hinziehen */
.ger-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ger-karte { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line2); border-radius: 4px; background: var(--panel); transition: border-color .15s, background-color .15s, transform .15s; }
.ger-karte.ziel { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.02); }
.ger-karte.plopp { animation: ger-plopp .45s ease-out; }
@keyframes ger-plopp { 0% { transform: scale(.96); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 60% { transform: scale(1.03); } 100% { transform: scale(1); box-shadow: 0 0 0 10px transparent; } }
.ohne-animation .ger-karte.plopp { animation: none; }
.ger-front { display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 3px; }
.ger-front:hover .ger-front-bild { outline: 2px solid var(--accent); }
.ger-front-bild { display: block; line-height: 0; }
.ger-front-bild svg { width: 100%; height: auto; display: block; }
.ger-kopf { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ger-kopf b { flex: 1; min-width: 0; }
.ger-wege { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; align-items: center; }
.ger-weg { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; font-size: 12px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel3); }
.ger-x { padding: 0 5px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.ger-x:hover { color: var(--bad); }
.ger-pool { position: sticky; bottom: -1px; margin-top: 16px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 4px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.ger-pool-titel { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ger-pool-stack { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.ger-chip { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel3); cursor: grab; font-size: 12.5px; user-select: none; transition: transform .12s, opacity .12s; }
.ger-chip:hover { border-color: var(--accent); }
.ger-chip small { color: var(--muted); font-size: 10.5px; }
.ger-chip.leer { border-style: dashed; }
.ger-chip.zieht { opacity: .45; transform: scale(.96); cursor: grabbing; }
/* einzelne Boxen unten (Miniatur der Frontansicht + Name), mehrere wählbar */
.ger-pool { max-height: 42%; overflow-y: auto; background-color: #17171b; }
.ger-pool-stack { flex-direction: column; gap: 4px; }
.ger-pool-kopf { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.ger-pool-boxen { display: flex; flex-wrap: wrap; gap: 6px; }
.ger-box.fertig { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.ger-box-stand { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.ger-box { position: relative; width: 132px; padding: 4px 4px 3px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel3); cursor: grab; user-select: none; text-align: center; transition: transform .12s, opacity .12s, border-color .12s; }
.ger-box:hover { border-color: var(--accent); }
.ger-box.gewaehlt { border-color: var(--accent); background: var(--accent-soft); }
.ger-box.leer { border-style: dashed; }
.ger-box.zieht { opacity: .45; transform: scale(.94); cursor: grabbing; }
.ger-mini { width: 64px; height: 46px; display: block; margin: 0 auto; pointer-events: none; }
.ger-box-name { display: block; font-size: 11px; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.ger-box-zu { position: absolute; top: 2px; right: 4px; font-size: 9px; font-weight: 600; color: var(--ok); }
/* Kanalzeilen einer Endstufe: Nummer, Boxen auf dem Kanal (parallel), Last, Brücke */
.ger-kanaele { display: flex; flex-direction: column; gap: 3px; }
.ger-weg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.ger-kanal { flex-wrap: wrap; }
.ger-kanal .ger-kanal-last { margin-left: 24px; flex: 1 0 100%; order: 5; }
.ger-kanal .ger-bruecke { order: 3; }
.ger-kanal { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); transition: border-color .12s, background-color .12s; }
.ger-kanal.ziel { border-color: var(--accent); background: var(--accent-soft); }
.ger-kanal.partner { opacity: .55; }
/* Fenster „Stromquellen und Verteiler“ (wie „Geräte“) liegt über dem Strom-Fenster des Planers; Generator-Dialog darüber */
.geraete-win.strom-win { z-index: 950; }
.modal-hinter.strom-dialog { z-index: 980; }
.strom-win .ger-bildknopf img { width: 72px; height: 44px; background: #fff; border-radius: 3px; }
/* Planer → Strom: Verkabelung per Drag & Drop (Quelle → Distro → Dreierdose → Endstufe) */
.strom-fenster.sv-fenster { max-width: min(1280px, 96vw); width: 96vw; }
.sv-fenster .modal-inhalt { max-height: 80vh; overflow: auto; }
.sv-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sv-spalten { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; align-items: start; }
.sv-links { position: sticky; top: 0; padding: 10px; border: 1px dashed var(--line2); border-radius: 4px; background: var(--panel); min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.sv-links h3, .sv-quelle h3 { margin: 0 0 4px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.sv-titel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.sv-rechts { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sv-quelle { padding: 10px; border: 1px solid var(--line2); border-radius: 4px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.sv-dose { padding: 4px 6px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel2); display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: border-color .12s, background-color .12s; }
.sv-dose.drueber, .sv-links.drueber { border-color: var(--accent); background: var(--accent-soft); }
.sv-dose-kopf { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sv-dose-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-last { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sv-last.check-bad { color: var(--bad); font-weight: 600; }
.sv-frei { padding: 2px 4px; font-style: italic; }
.sv-geraet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel3); cursor: grab; font-size: 12.5px; user-select: none; }
.sv-geraet .sv-name { font-weight: 600; }
.sv-vorschlag { flex: 1 0 100%; }
.sv-vert { border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 3px; background: var(--panel); padding: 5px 6px 6px; cursor: grab; display: flex; flex-direction: column; gap: 5px; }
.sv-vert.zuviel { border-color: var(--bad); border-left-color: var(--bad); }
.sv-vert-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.sv-vert-kopf > .sv-last { margin-left: auto; }
.sv-ls { flex: 1 0 100%; text-align: right; font-size: 11px; color: var(--muted); }
.sv-aus { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; cursor: default; }
.sv-geraet.zieht, .sv-vert.zieht { opacity: .4; }
@media (max-width: 760px) { .sv-spalten { grid-template-columns: 1fr; } .sv-links { position: static; } }
/* Fläche statt Spalten: Ablage oben, Karten nebeneinander */
.sv-fenster .modal-inhalt { max-height: 86vh; }
.sv-ablage { padding: 8px 10px 10px; border: 1px dashed var(--line2); border-radius: 4px; background: var(--panel); transition: border-color .12s, background-color .12s; }
.sv-ablage.drueber { border-color: var(--accent); background: var(--accent-soft); }
.sv-ablage-titel { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.sv-ablage-liste { display: flex; flex-wrap: wrap; gap: 8px; min-height: 58px; }
.sv-geraet { flex-direction: column; align-items: stretch; flex-wrap: nowrap; width: 156px; gap: 3px; padding: 6px; }
.sv-geraet .sv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-geraet > * { flex: none; }
.sv-dose .sv-dose-kopf { flex-direction: column; align-items: flex-start; gap: 0; }
.sv-dose .sv-dose-name { width: 100%; }
.sv-dose .sv-dose-kopf .sv-last { font-size: 10.5px; }
.sv-front { display: block; pointer-events: none; }
.sv-front .ger-front-bild, .sv-front svg, .sv-front img { display: block; width: 100%; height: auto; max-height: 64px; object-fit: contain; }
.sv-geraet .sv-vorschlag { white-space: normal; font-size: 10.5px; line-height: 1.25; }
.sv-geraet.klein { width: auto; gap: 2px; padding: 4px; }
.sv-geraet.klein .sv-front svg, .sv-geraet.klein .sv-front img { max-height: 30px; }
.sv-geraet.klein .sv-name { font-size: 11.5px; white-space: normal; line-height: 1.2; }
.sv-geraet.klein > .muted { display: none; }
.sv-flaeche { columns: 360px; column-gap: 12px; margin-top: 12px; }
.sv-flaeche > .sv-karte { break-inside: avoid; margin-bottom: 12px; }
.sv-phasen { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.sv-phasen .sv-dosen { grid-template-columns: 1fr; }
.sv-phasen .sv-phase-kopf { flex-direction: column; align-items: flex-start; }
.sv-karte { border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--panel); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sv-karte.quelle { border-left-color: #e0b030; }
.sv-karte.lose { border-style: dashed; border-left-style: solid; }
.sv-karte.zuviel { border-color: var(--bad); border-left-color: var(--bad); }
.sv-karte.leer { border-left-width: 1px; padding: 14px; }
.sv-karte-kopf { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.sv-karte-kopf[draggable="true"] { cursor: grab; }
.sv-karte-kopf > .sv-last { margin-left: auto; align-self: flex-start; }
.sv-karte-titel { flex: 1; min-width: 0; }
.sv-karte-bild { width: 58px; height: 40px; object-fit: contain; background: #fff; border-radius: 3px; flex: none; }
.sv-lose { color: #e0b030; }
.sv-phase { display: flex; flex-direction: column; gap: 4px; }
.sv-phase-kopf { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 2px 2px 0; border-top: 1px solid var(--line); }
.sv-dosen { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 5px; }
.sv-dose { min-height: 52px; }
.sv-frei { font-size: 11px; color: var(--muted); font-style: italic; padding: 2px 4px; }
.sv-schild { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent-soft); cursor: grab; font-size: 12px; user-select: none; }
.sv-schild img { width: 34px; height: 22px; object-fit: contain; background: #fff; border-radius: 2px; flex: none; }
.sv-schild .sv-name { font-weight: 600; min-width: 0; line-height: 1.2; }
.sv-phasen .sv-schild { flex-direction: column; align-items: flex-start; gap: 3px; }
.sv-schild.zuviel { border-color: var(--bad); }
.sv-schild.zieht, .sv-karte.zieht { opacity: .4; }
/* Verteiler-Karte: Input (Stecker → wo er steckt) und Output (Dosen); × steckt aus; Ablage bleibt beim Scrollen oben */
.sv-ablage { position: sticky; top: -1px; z-index: 3; box-shadow: 0 6px 14px rgba(0,0,0,.45); background: #0f0f12; }
.sv-ablage-liste { max-height: 170px; overflow-y: auto; }
.sv-io { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel2); }
.sv-io-label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 46px; }
.sv-out { margin: 2px 0 -2px 2px; }
.sv-stecker { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid #e0b030; color: #e0b030; font-size: 12px; font-weight: 600; cursor: grab; user-select: none; }
.sv-input-wahl { flex: 1; min-width: 150px; max-width: 100%; font-size: 12px; padding: 3px 6px; }
.sv-output { display: flex; flex-direction: column; gap: 6px; }
.sv-geraet, .sv-schild { position: relative; }
.sv-raus { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; min-width: 0; padding: 0; border-radius: 50%; font-size: 12px; line-height: 16px; text-align: center;
  background: rgba(0,0,0,.55); border: 1px solid var(--line2); color: var(--text); opacity: .75; cursor: pointer; }
.sv-raus:hover { opacity: 1; background: var(--bad); border-color: var(--bad); }
.sv-io .sv-raus { position: static; }
.sv-schild { padding-right: 24px; }
/* beim Ziehen: passende Dosen grün umrandet, alle anderen abgedunkelt */
.sv-dose.passt { border-color: #3ddc84; box-shadow: inset 0 0 0 1px rgba(61,220,132,.35); }
.sv-dose.passt-nicht { opacity: .35; }
.ger-kanal.ueber { border-color: var(--bad); }
.ger-kanal-nr { flex: none; width: 16px; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.ger-kanal-boxen { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.ger-kanal-last { flex: none; white-space: nowrap; }
.ger-bruecke { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); cursor: pointer; }
.ger-foto img { width: 100%; height: auto; display: block; border-radius: 2px; }
.ger-bildknopf { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; min-width: 56px; justify-content: center; }
.ger-bildknopf img { width: 56px; height: 26px; object-fit: contain; display: block; }
.ger-vorschau img { max-width: 220px; max-height: 70px; display: block; border: 1px solid var(--line2); border-radius: 2px; }
.ger-summe { font-size: 22px; line-height: 1; }
.ger-summe b { font-weight: 600; }
.ger-summe .muted { font-size: 12px; }
.ger-detail .ger-kanaele { max-width: 560px; }
.ger-verkabelung { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.ger-verkabelung label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ger-dsp { align-self: flex-start; }
.ger-karte.zieh-amp { cursor: grab; }
.ger-karte.zieh-amp.zieht { opacity: .5; }
.ger-detail-kopf { display: flex; gap: 16px; align-items: flex-start; margin: 12px 0; flex-wrap: wrap; }
.ger-gross { width: 340px; max-width: 100%; cursor: default; }
.zuordnung-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.geraete-form .row { margin: 8px 0; }
.geraete-form .row > label { min-width: 110px; }
.geraete-form input[type=text] { width: min(360px, 100%); }
.check-warn { color: var(--warn); }
.check-ok { color: var(--ok); }
.last-wahl { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.last-wahl label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; }
.ohm-felder { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ohm-feld { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.taste-zeile { display: grid; grid-template-columns: 1fr auto 34px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.taste-knopf { min-width: 96px; justify-content: center; font-variant-numeric: tabular-nums; }
.taste-zeile.fest { grid-template-columns: 1fr auto; }
.taste-fest { font: inherit; font-size: 12px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text); white-space: nowrap; }
.einst-melde { min-height: 18px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.einst-melde:empty { min-height: 0; margin: 0; }
.einst-melde.bad { color: var(--bad); }
html.mit-bild { background: var(--bg); }

/* Glas einstellbar (Einstellungen → Glas) */
:root { --glas-px: 18px; --modal-a: .8; --glas: blur(var(--glas-px)) saturate(1.1); }
.modal-hinter { backdrop-filter: blur(var(--glas-px)) saturate(1.05); -webkit-backdrop-filter: blur(var(--glas-px)) saturate(1.05); }
.modal { background: rgba(14,14,18,var(--modal-a)); }
.tabs, .legend, #toast { backdrop-filter: var(--glas); -webkit-backdrop-filter: var(--glas); }

/* Wege-Fenster (frei schwebend): Felder wie in der Stack-Karte */
.eq-fenster .sf-grid input[type=number], .eq-fenster .sf-grid select { width: 100%; min-width: 0; }
.eq-fenster .feld { display: flex; }

/* Stack-Karte: größere Bedienelemente, Bereichszeilen mit Stand-Chips (öffnen je ein Fenster) */
.stack-card input.stack-name { font-size: 15px; padding: 6px 14px; max-width: none; }
.stack-card .stack-icons { gap: 6px; }
.stack-card .stack-icons button.kipp-knopf { width: 34px; height: 34px; }
.stack-card .stack-icons button.kipp-knopf .ico { width: 17px; height: 17px; }
.pegel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pegel-grid > .sf:nth-child(3) { grid-column: 1 / -1; }
.stack-card .pegel-gruppe { border-top: 0; padding-top: 0; }
.stack-card .pegel-gruppe .stack-gruppe-titel { display: none; }
.bereich-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255,255,255,.05); border: 1px solid transparent; border-radius: 14px; padding: 12px 14px; margin-top: 8px; cursor: pointer; color: inherit; font: inherit; font-size: 14px; min-height: 48px; }
.bereich-zeile:hover { background: rgba(255,255,255,.08); border-color: var(--accent); }
.bereich-name { display: flex; align-items: center; gap: 10px; }
.bereich-name .ico { width: 18px; height: 18px; }
.bereich-stand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bereich-stand .ico { width: 15px; height: 15px; }
.bereich-chip { background: rgba(255,255,255,.09); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.bereich-chip.warn { background: #4a2a12; color: #ff9f43; }

/* Projekt-Einstellungen: schmalere Felder */
.ass-fg { grid-template-columns: 110px minmax(0, 1fr); }
.ass-fg input[type=number] { width: 64px; }
.ass-fg select { width: 210px; }

/* Stack-Karten: Breite am rechten Rand ziehen */
.stack-liste .stack-card { position: relative; }
.stack-griff { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 3; }
.stack-griff::after { content: ""; position: absolute; right: 3px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: transparent; transition: background .12s; }
.stack-griff:hover::after, body.stack-breite-zieht .stack-griff::after { background: var(--accent); }
body.stack-breite-zieht { cursor: col-resize; user-select: none; }

