/* BattleComms Mockups Variante E – einheitlicher Bedienrahmen und Bausteine.
   Verbindlich (Plan Schritt 4b): feste Regionen, nur diese Knopfklassen, Klickfläche ≥ 36 px (kritisch ≥ 44 px),
   Schrift ≥ 13 px, Seiten-CSS ordnet nur an und überschreibt keine Tokens. */

/* =================== Rahmen =================== */
.bc-app {
  display: grid; height: 100vh; min-width: 0;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-rows: var(--mockbar-h) var(--head-h) var(--txbar-h) auto minmax(0, 1fr);
}
.bc-mockbar { grid-column: 1 / -1; grid-row: 1; }
.bc-nav { grid-column: 1; grid-row: 2 / -1; }
.bc-head { grid-column: 2; grid-row: 2; }
.bc-txbar { grid-column: 2; grid-row: 3; }
.bc-alarms { grid-column: 2; grid-row: 4; }
.bc-main { grid-column: 2; grid-row: 5; min-height: 0; min-width: 0; overflow: hidden; position: relative; }
.bc-side { position: fixed; right: 0; top: var(--mockbar-h); bottom: 0; width: min(var(--side-w), 100vw); z-index: 40; }
@media (min-width: 1280px) {
  .bc-app.side-open { grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--side-w); }
  .bc-app.side-open .bc-side { position: static; grid-column: 3; grid-row: 2 / -1; width: auto; }
}

/* ---- Mockup-Streifen (nicht Teil der App) ---- */
.bc-mockbar {
  display: flex; align-items: center; gap: var(--gap-s); padding: 0 var(--gap-s); overflow-x: auto; overflow-y: hidden; white-space: nowrap;
  color: var(--mock-text); font-size: var(--fs-xs);
  background: repeating-linear-gradient(135deg, var(--mock) 0 14px, color-mix(in srgb, var(--mock) 82%, #000) 14px 28px);
  border-bottom: 1px solid var(--border-strong);
}
.bc-mockbar .mk-tag { font-weight: 800; letter-spacing: 0.1em; padding: 2px 6px; border: 1px solid currentColor; border-radius: 4px; }
.bc-mockbar .mk-id { font-weight: 700; }
.bc-mockbar .mk-sep { opacity: 0.5; }
.bc-mockbar a, .bc-mockbar button {
  color: inherit; text-decoration: none; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs);
}
:root[data-tone="light"] .bc-mockbar a, :root[data-tone="light"] .bc-mockbar button { background: rgba(255, 255, 255, 0.6); border-color: rgba(43, 31, 79, 0.35); }
.bc-mockbar [aria-current="step"], .bc-mockbar [aria-pressed="true"] { background: var(--mock-text); color: var(--mock); font-weight: 700; }
.bc-mockbar .mk-hint { opacity: 0.85; }

/* ---- Navigationsleiste ---- */
.bc-nav {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 4px;
  background: var(--surface-1); border-right: 1px solid var(--border); min-height: 0; overflow-y: auto;
}
.bc-mode { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.bc-mode button {
  min-height: var(--tap); border-radius: var(--radius-s); border: 1px solid var(--control-border); background: var(--surface-2);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em; padding: 0 2px; border-left-width: 4px;
}
.bc-mode button.m-op { border-left-color: var(--mode-op); }
.bc-mode button.m-orga { border-left-color: var(--mode-orga); }
.bc-mode button[aria-checked="true"].m-op { background: var(--mode-op); color: #111317; border-color: var(--mode-op); }
.bc-mode button[aria-checked="true"].m-orga { background: var(--mode-orga); color: #08131a; border-color: var(--mode-orga); }
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 4px 2px; border-radius: var(--radius-s); color: var(--text-muted); text-decoration: none;
  font-size: var(--fs-xs); font-weight: 600; text-align: center; line-height: 1.15; border: 1px solid transparent; background: transparent;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item[aria-disabled="true"] { opacity: 0.55; }
.nav-item .ico { width: 22px; height: 22px; }
.bc-nav .nav-spacer { flex: 1 1 auto; }
.nav-item.small-label { min-height: 48px; }

/* ---- Kopf ---- */
.bc-head {
  display: flex; align-items: center; gap: var(--gap); padding: 0 var(--gap); min-width: 0;
  background: var(--surface-1); border-bottom: 1px solid var(--border);
}
.bc-head .h-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.bc-head .h-title .h-path { color: var(--text-muted); font-weight: 600; }
.bc-head .h-op { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--fs-xs); white-space: nowrap; }
.bc-head .h-op b { color: var(--text); }
.bc-head .spacer { flex: 1 1 auto; }
.bc-head .h-tools { display: flex; align-items: center; gap: var(--gap-s); }
.bc-head .btn { min-height: 32px; }

/* ---- Bedienleiste (Senden, Spricht, Durchsage, Notruf) ---- */
.bc-txbar {
  display: flex; align-items: center; gap: var(--gap); padding: 6px var(--gap); min-width: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.tx-targets { display: flex; align-items: stretch; gap: var(--gap-s); min-width: 0; flex: 0 1 auto; }
.tx-target {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap-critical); padding: 4px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--control-border); background: var(--surface-1); font-weight: 700; min-width: 0;
}
.tx-target .k { font-family: var(--font-mono); font-size: var(--fs-xs); padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text); }
.tx-target .n { white-space: normal; }
.tx-target .f { font-family: var(--font-mono); color: var(--text-muted); font-weight: 600; }
.tx-target.none { color: var(--text-faint); font-weight: 600; border-style: dashed; }
.tx-target.sending { background: var(--sig-tx); color: var(--sig-tx-text); border-color: var(--sig-tx); }
.tx-target.sending .f, .tx-target.sending .k { color: var(--sig-tx-text); background: rgba(0, 0, 0, 0.25); }
.tx-target.blocked { background: var(--surface-3); color: var(--text-muted); }
.tx-target.changed { box-shadow: 0 0 0 3px var(--accent); }
.tx-speaking { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-muted); font-weight: 600; }
.tx-speaking b { color: var(--text); }
.bc-txbar .spacer { flex: 1 1 auto; }
.bc-txbar .tx-actions { display: flex; align-items: center; gap: var(--gap-l); }

/* ---- Alarmband (höchstens eines sichtbar) ---- */
.bc-alarms:empty { display: none; }
.alarm {
  display: flex; align-items: center; gap: var(--gap); padding: 8px var(--gap); border-bottom: 1px solid var(--border);
  background: var(--surface-3); font-weight: 700; min-width: 0;
}
.alarm .a-ico { width: 26px; height: 26px; flex: 0 0 auto; }
.alarm .a-txt { flex: 1 1 auto; min-width: 0; }
.alarm .a-txt small { display: block; font-weight: 500; }
.alarm .a-more { font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 10px; border: 1px solid currentColor; white-space: nowrap; }
.alarm .a-actions { display: flex; gap: var(--gap-s); flex-wrap: wrap; }
.alarm.broadcast { background: var(--sig-broadcast); color: var(--sig-broadcast-text); }
.alarm.emergency { background: var(--sig-emergency); color: var(--sig-emergency-text); }
.alarm.battle { color: var(--text); background: var(--surface-1); border-left: 14px solid; border-image: repeating-linear-gradient(135deg, var(--stripe-a) 0 8px, var(--stripe-b) 8px 16px) 14; }
.alarm.lage { background: var(--surface-1); color: var(--text); border-left: 6px solid var(--amp-red); }
.alarm.org { background: var(--surface-1); color: var(--text); border-left: 6px solid var(--accent); }
.alarm.info { background: var(--surface-1); color: var(--text); }
.alarm.broadcast .btn, .alarm.emergency .btn { background: rgba(255, 255, 255, 0.85); color: #111; border-color: rgba(0, 0, 0, 0.5); }

/* ---- Seitenpanel (Mitgliederfenster / Hilfe) ---- */
.bc-side { display: flex; flex-direction: column; background: var(--surface-1); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow); min-height: 0; }
.bc-side-h { display: flex; align-items: center; gap: var(--gap-s); padding: 8px var(--gap); border-bottom: 1px solid var(--border); min-height: 52px; }
.bc-side-h h2 { margin: 0; font-size: var(--fs-lg); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-side-b { flex: 1 1 auto; overflow: auto; padding: var(--gap); display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }

/* ---- Dialog ---- */
.bc-dialog-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 80; display: grid; place-items: center; padding: var(--gap); }
.bc-dialog { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.bc-dialog h2 { margin: 0; padding: var(--gap) var(--gap-l); font-size: var(--fs-lg); border-bottom: 1px solid var(--border); }
.bc-dialog .d-body { padding: var(--gap-l); display: flex; flex-direction: column; gap: var(--gap); }
.bc-dialog .d-foot { display: flex; justify-content: space-between; gap: var(--gap); padding: var(--gap) var(--gap-l); border-top: 1px solid var(--border); }

/* ---- Kompaktmodus / Seitenfenster (?layout=compact oder schmales Fenster) ---- */
body.layout-compact .bc-app {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--mockbar-h) auto auto auto minmax(0, 1fr) 60px;
}
body.layout-compact .bc-head { grid-column: 1; grid-row: 2; flex-wrap: wrap; padding: 6px var(--gap-s); gap: var(--gap-s); }
body.layout-compact .bc-txbar { grid-column: 1; grid-row: 3; flex-wrap: wrap; padding: 6px var(--gap-s); gap: var(--gap-s); }
body.layout-compact .tx-targets { flex: 1 1 100%; flex-direction: column; }
body.layout-compact .tx-speaking { flex: 1 1 auto; }
body.layout-compact .bc-txbar .spacer { display: none; }
body.layout-compact .bc-alarms { grid-column: 1; grid-row: 4; }
body.layout-compact .bc-main { grid-column: 1; grid-row: 5; overflow: auto; }
body.layout-compact .bc-nav { grid-column: 1; grid-row: 6; flex-direction: row; padding: 2px; border-right: 0; border-top: 1px solid var(--border); overflow: hidden; }
body.layout-compact .bc-mode { display: none; }
body.layout-compact .nav-item { flex: 1 1 0; min-height: 52px; }
body.layout-compact .nav-item[aria-current="page"]::before { left: 8px; right: 8px; top: -3px; bottom: auto; width: auto; height: 4px; border-radius: 0 0 3px 3px; }
body.layout-compact .nav-spacer, body.layout-compact .nav-full-only { display: none; }
body.layout-compact .h-op { display: none; }
body:not(.layout-compact) .nav-compact-only { display: none; }

/* =================== Knöpfe (nur diese Klassen) =================== */
.btn {
  min-height: var(--tap); padding: 4px 14px; border-radius: var(--radius-s); border: 1px solid var(--control-border);
  background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; line-height: 1.2; text-align: center; white-space: normal; text-decoration: none; position: relative; overflow: hidden;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; flex: 0 0 auto; }
.btn .key { font-family: var(--font-mono); font-size: var(--fs-xs); padding: 1px 6px; border-radius: 4px; background: rgba(127, 127, 127, 0.25); }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-secondary { /* Grundform */ }
.btn-quiet { background: transparent; border-color: transparent; }
.btn-quiet:hover { background: var(--surface-3); border-color: var(--control-border); }
.btn-danger { border: 2px solid var(--amp-red); color: var(--text); background: var(--surface-1); }
.btn-danger.sig-emergency { background: var(--sig-emergency); color: var(--sig-emergency-text); border-color: var(--sig-emergency); font-weight: 800; }
.btn-danger.sig-broadcast { background: var(--sig-broadcast); color: var(--sig-broadcast-text); border-color: var(--sig-broadcast); font-weight: 800; }
.btn-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.btn-toggle[aria-pressed="true"]::before { content: "✓"; font-weight: 800; color: var(--accent); }
.btn-critical { min-height: var(--tap-critical); min-width: var(--tap-critical); font-size: var(--fs-md); }
/* Halten zum Scharfschalten: Fortschrittsbalken unten (0,5 s) */
.btn.arming::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: currentColor; transform-origin: left; animation: bc-arm 0.5s linear forwards; }
@keyframes bc-arm { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.btn .hold { font-size: var(--fs-xs); font-weight: 600; opacity: 0.85; }

/* Segmentschalter (role=radiogroup) */
.seg { display: inline-flex; border: 1px solid var(--control-border); border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); min-width: 0; }
.seg > button { min-height: var(--tap); padding: 4px 12px; border: 0; border-right: 1px solid var(--control-border); background: transparent; font-weight: 600; white-space: normal; line-height: 1.15; }
.seg > button:last-child { border-right: 0; }
.seg > button[aria-checked="true"] { background: var(--accent); color: var(--accent-text); }
.seg > button:hover:not([aria-checked="true"]) { background: var(--surface-3); }
.seg.compact > button { min-height: 32px; padding: 2px 10px; }
.bc-head .seg > button { min-height: 32px; }

/* =================== Karten, Raster =================== */
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.card-h { display: flex; align-items: center; gap: var(--gap-s); padding: 8px var(--gap); border-bottom: 1px solid var(--border); min-height: 44px; }
.card-h h3 { margin: 0; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.card-h .spacer { flex: 1; }
.card-b { padding: var(--gap); min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--gap-s); }
.card-b.scroll { overflow: auto; flex: 1 1 auto; }
.scroll { overflow: auto; min-height: 0; }
.row { display: flex; align-items: center; gap: var(--gap-s); min-width: 0; }
.col { display: flex; flex-direction: column; gap: var(--gap-s); min-width: 0; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 6px 0 2px; font-weight: 700; }
.empty { color: var(--text-muted); padding: var(--gap-s) 0; }
.big { font-size: var(--fs-lg); }

/* Badges */
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 6px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 700; line-height: 1; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge.org-rank { background: var(--surface-1); border-color: var(--accent); }
.badge.guest { background: transparent; border-style: dashed; }
.badge.phase { background: transparent; color: var(--text-muted); border-color: var(--border); font-weight: 600; font-family: var(--font-mono); }
.badge.freq { font-family: var(--font-mono); background: transparent; }
.badge.new { border-color: var(--net-1); color: var(--text); }
.rank-badges { display: inline-flex; gap: 3px; flex-wrap: nowrap; }

/* Icons (SVG, currentColor) */
.ico { display: inline-block; width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* LED */
.led { display: inline-block; vertical-align: middle; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--control-border); flex: 0 0 auto; }
.led.rx { background: var(--sig-rx); border-color: var(--sig-rx); box-shadow: 0 0 8px var(--sig-rx); }
.led.tx { background: var(--sig-tx); border-color: var(--sig-tx); box-shadow: 0 0 8px var(--sig-tx); }
.led.off { opacity: 0.45; }

/* Ampel – nur Symbol + Wort */
.amp { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.amp .shape { width: 14px; height: 14px; flex: 0 0 auto; display: inline-block; }
.amp.green .shape { background: var(--amp-green); border-radius: 50%; box-shadow: 0 0 0 1px var(--amp-outline); }
.amp.yellow .shape { background: var(--amp-yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 1px var(--amp-outline)); }
.amp.red .shape { background: var(--amp-red); border-radius: 2px; box-shadow: 0 0 0 1px var(--amp-outline); }
.amp.black .shape { background: var(--amp-black); border: 2px solid var(--amp-black-ring); transform: rotate(45deg); width: 12px; height: 12px; }
.amp .kind { color: var(--text-muted); font-weight: 600; }
.amp .de { color: var(--text-muted); font-weight: 500; }

/* Netz-Kennung (nur Randbalken + Frequenz) */
.net-c1 { background: var(--net-1); } .net-c2 { background: var(--net-2); } .net-c3 { background: var(--net-3); } .net-c4 { background: var(--net-4); }
.net-c5 { background: var(--net-5); } .net-c6 { background: var(--net-6); } .net-c7 { background: var(--net-7); } .net-c8 { background: var(--net-8); }
.netsym { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); }

/* Funkgerät (Netzzeile): LED · Name · Frequenz · Sprecher · Hören · ⋯ */
.radio { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px 6px 0; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-1); min-width: 0; }
.radio .bar { align-self: stretch; border-radius: var(--radius-s) 0 0 var(--radius-s); }
.radio .r-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; background: transparent; border: 0; padding: 2px 0; min-height: var(--tap); justify-content: center; }
.radio .r-title { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.radio .r-sub { font-size: var(--fs-xs); color: var(--text-muted); display: flex; gap: 8px; align-items: center; min-width: 0; }
.radio .r-ctrl { display: flex; align-items: center; gap: 6px; }
.radio.rx-active { border-color: var(--sig-rx); }
.radio.tx-net { box-shadow: inset 3px 0 0 var(--accent); }
.radio.muted { opacity: 0.5; }
.radio .r-more[hidden] { display: none; }
.radio .r-more { grid-column: 2 / -1; display: flex; gap: var(--gap-s); align-items: center; flex-wrap: wrap; padding-top: 4px; border-top: 1px dashed var(--border); }
.vol { width: 110px; accent-color: var(--accent); min-height: var(--tap); }

/* Person */
.person { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px; border-radius: var(--radius-s); min-height: var(--tap); }
.person .name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .pos { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.person .loc { font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap; margin-left: auto; }
.person.me { background: var(--accent-soft); }
.person.disconnected { opacity: 0.55; }
.person.disconnected .name::after { content: " · getrennt"; font-weight: 400; color: var(--text-faint); }

/* Mitgliederfenster */
.mp-meta { display: flex; flex-wrap: wrap; gap: var(--gap-s); align-items: center; color: var(--text-muted); font-size: var(--fs-xs); }
.mp-roles { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--gap); align-items: center; }
.mp-roles dt { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.mp-roles dd { margin: 0; min-width: 0; }
.mp-jump { border: 1px solid var(--control-border); border-left: 4px solid var(--accent); border-radius: var(--radius-s); padding: var(--gap-s) var(--gap); display: flex; flex-direction: column; gap: 4px; }
.mp-jump.not-ready { border-left-color: var(--amp-red); }
.mp-jump .j-name { font-size: var(--fs-lg); font-weight: 800; }
.mp-list { display: flex; flex-direction: column; gap: 2px; }
.mp-sub { display: flex; flex-direction: column; gap: 4px; }
.mp-actions { display: flex; flex-wrap: wrap; gap: var(--gap-s); }
.mp-guest-note { border: 1px dashed var(--control-border); border-radius: var(--radius-s); padding: var(--gap-s); color: var(--text-muted); }
[data-open-members] { cursor: pointer; }

/* Auswahl mit Suchfeld */
.ss { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ss input { min-height: var(--tap); padding: 6px 10px; border-radius: var(--radius-s); border: 1px solid var(--control-border); background: var(--surface-2); width: 100%; }
.ss ul { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--control-border); border-radius: var(--radius-s); background: var(--surface-1); max-height: 260px; overflow: auto; }
.ss li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: var(--tap); border-radius: 4px; cursor: pointer; }
.ss li[aria-selected="true"], .ss li:hover { background: var(--accent-soft); }
.ss li .sub { margin-left: auto; color: var(--text-muted); font-size: var(--fs-xs); }
.ss .ss-empty { color: var(--text-muted); padding: 6px 8px; }

/* „Für mich“ */
.fm { border: 1px solid var(--control-border); border-left: 6px solid var(--accent); border-radius: var(--radius); background: var(--surface-1); padding: var(--gap); display: flex; flex-direction: column; gap: var(--gap-s); }
.fm.k-broadcast { border-left-color: var(--sig-broadcast); }
.fm.k-contact { border-left-color: var(--amp-yellow); }
.fm .fm-head { display: flex; align-items: center; gap: var(--gap-s); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.fm .fm-text { font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; }
.fm .fm-from { color: var(--text-muted); font-size: var(--fs-xs); }
.fm .fm-answers { display: flex; flex-wrap: wrap; gap: var(--gap-s); }
.fm .fm-done { color: var(--text-muted); font-weight: 600; }

/* Zähler */
.counter { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--border); }
.counter .lbl { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.counter .val { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 800; }
.counter.done { border-color: var(--amp-green); }
.counter .cbar { display: block; height: 4px; background: var(--surface-3); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.counter .cbar > i { display: block; height: 100%; width: 0; background: var(--amp-green); }

/* Code-Tasten */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.code { min-height: var(--tap-critical); padding: 4px 8px; border-radius: var(--radius-s); border: 1px solid var(--control-border); background: var(--surface-2); text-align: left; display: flex; flex-direction: column; justify-content: center; }
.code b { font-size: var(--fs-md); }
.code span { font-size: var(--fs-xs); color: var(--text-muted); }
.code:hover { border-color: var(--accent); }
.code.flash { animation: bc-flash 0.6s ease-out; }
@keyframes bc-flash { from { background: var(--accent-soft); } to { background: var(--surface-2); } }

/* Lage-Feed, Aufträge, Ziele */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.feed li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--surface-2); border-left: 3px solid var(--border-strong); }
.feed li .t { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); }
.feed li.k-contact { border-left-color: var(--amp-yellow); }
.feed li.k-broadcast { border-left-color: var(--sig-broadcast); }
.feed li.k-order { border-left-color: var(--accent); }
.feed li.k-emergency { border-left-color: var(--sig-emergency); }
.feed li.k-ok { border-left-color: var(--amp-green); }
.feed li .who { font-weight: 700; }
.feed li .schema { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; font-size: var(--fs-xs); margin-top: 2px; }
.feed li .schema dt { color: var(--text-muted); font-weight: 700; }
.feed li .schema dd { margin: 0; }
.orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.orders li { padding: 8px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--border); }
.orders .o-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.orders .o-what { font-weight: 600; margin-top: 2px; }
.orders .o-why { font-size: var(--fs-xs); color: var(--text-muted); }
.ostate { font-size: var(--fs-xs); font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-strong); }
.ostate.s-ack { border-color: var(--net-1); }
.ostate.s-progress { border-color: var(--amp-yellow); }
.ostate.s-done { border-color: var(--amp-green); }
.ostate.s-failed { border-color: var(--amp-red); }
.targets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.targets li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--border); }
.targets .tag { font-family: var(--font-mono); font-weight: 800; letter-spacing: 0.05em; }
.targets li.primary { border-color: var(--amp-red); }
.targets li.done { opacity: 0.55; text-decoration: line-through; }
.tcmd { font-size: var(--fs-xs); font-weight: 800; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); }
.tcmd.primary { border: 1px solid var(--amp-red); }

/* @-Vervollständigung, Text */
.mention-wrap { position: relative; }
.mention-input { width: 100%; min-height: var(--tap); padding: 6px 10px; border-radius: var(--radius-s); border: 1px solid var(--control-border); background: var(--surface-2); }
.mention-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--surface-1); border: 1px solid var(--control-border); border-radius: var(--radius-s); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 4px; z-index: 30; max-height: 240px; overflow: auto; }
.mention-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: var(--tap); border-radius: 4px; cursor: pointer; }
.mention-list li[aria-selected="true"], .mention-list li:hover { background: var(--accent-soft); }
.mention-list .kind { font-size: var(--fs-xs); color: var(--text-muted); margin-left: auto; }
.msg { padding: 4px 0; }
.msg .who { font-weight: 700; margin-right: 6px; }
.msg .at { color: var(--accent); font-weight: 700; }
.msg .time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-faint); margin-right: 6px; }

/* Ziehen und Ablegen */
.draggable { cursor: grab; }
.draggable.dragging { opacity: 0.5; }
.dropzone { min-height: 40px; border: 1px dashed transparent; border-radius: var(--radius-s); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }

/* Toasts (mit Zurücknehmen) */
.bc-toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 90; max-width: calc(100vw - 24px); }
.bc-toast { display: flex; align-items: center; gap: var(--gap); background: var(--surface-1); border: 1px solid var(--control-border); border-radius: var(--radius); padding: 6px 8px 6px 14px; box-shadow: var(--shadow); font-weight: 600; min-height: 44px; }
.bc-toast .t-time { font-family: var(--font-mono); color: var(--text-muted); font-size: var(--fs-xs); }

/* Tabellen, Formular */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.input, select.input { min-height: var(--tap); padding: 6px 10px; border-radius: var(--radius-s); border: 1px solid var(--control-border); background: var(--surface-2); }
.meter { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--amp-green), var(--amp-yellow) 75%, var(--amp-red)); }

/* Hilfe im Seitenpanel */
.help-block h3 { margin: 0 0 4px; font-size: var(--fs-md); }
.help-block p, .help-block ul { margin: 0; color: var(--text-muted); }
.help-block ul { padding-left: 18px; }
.help-keys { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--gap); }
.help-keys kbd { font-family: var(--font-mono); font-size: var(--fs-xs); padding: 1px 6px; border: 1px solid var(--control-border); border-radius: 4px; background: var(--surface-2); }

/* Menü im Kopf */
.bc-menu-wrap { position: relative; }
.bc-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 70; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 260px; box-shadow: var(--shadow); }
.bc-menu .btn { justify-content: flex-start; text-align: left; }

/* Feinschliff nach Musterseite E3 (Fotos 08.11.) */
.bc-mockbar > * { flex: 0 0 auto; }
.bc-mockbar .row { flex-wrap: nowrap; }
.bc-mode button { letter-spacing: 0; font-weight: 700; padding: 0; }
.nav-item.icon-only { min-height: 48px; }
.btn .key { font-family: var(--font); }
.seg > button[aria-checked="true"] .amp .de, .seg > button[aria-checked="true"] .amp .kind { color: inherit; }
.radio .r-title { flex-wrap: wrap; row-gap: 2px; }
.radio .r-title .r-name { white-space: normal; overflow-wrap: anywhere; }
.radio .r-ctrl .btn { padding: 4px 10px; }
.person .name { flex: 0 1 auto; min-width: 8ch; }
.mp-list .person { flex-wrap: wrap; row-gap: 0; }
.mp-list .person .loc { flex-basis: 100%; margin-left: 20px; }

/* =================== Theme-Anbindung (strukturelle Tokens) =================== */
.card, .fm, .radio, .bc-dialog, .bc-side { background: var(--card-bg); border-color: var(--card-border); box-shadow: var(--card-shadow); backdrop-filter: var(--glass); }
.bc-nav, .bc-head, .bc-txbar { backdrop-filter: var(--glass); }
.bc-nav, .bc-head { background: var(--card-bg); }
.bc-txbar { background: var(--surface-2); }
.bc-main { background: transparent; }
.btn, .seg, .tx-target, .code, .place-node { box-shadow: var(--btn-shadow); }
.btn-secondary, .btn:not(.btn-primary):not(.btn-quiet):not(.btn-danger):not(.btn-toggle) { background: var(--btn-bg); }
.btn:active, .tx-target:active, .code:active { box-shadow: var(--btn-pressed-shadow); }
.btn-primary { background: var(--primary-bg); box-shadow: var(--btn-shadow), var(--primary-glow); }
.btn-quiet { box-shadow: none; }
.seg > button[aria-checked="true"] { background: var(--primary-bg); box-shadow: var(--primary-glow); }
.btn-toggle[aria-pressed="true"] { box-shadow: var(--btn-pressed-shadow); }
:focus-visible { box-shadow: var(--focus-glow); }
.alarm.broadcast, .btn-danger.sig-broadcast { background-image: var(--broadcast-mark); background-size: 100% 6px; background-repeat: no-repeat; background-position: bottom; }
.alarm.broadcast { background-color: var(--sig-broadcast); }
.btn-danger.sig-broadcast { background-color: var(--sig-broadcast); }
.bc-mockbar select { height: 28px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.25); color: inherit; font-size: var(--fs-xs); }
:root[data-tone="light"] .bc-mockbar select { background: rgba(255, 255, 255, 0.6); border-color: rgba(43, 31, 79, 0.35); }
.bc-mockbar select option { color: #111; background: #fff; }
:root[data-tone="light"] .bc-mockbar [aria-current="step"], :root[data-tone="light"] .bc-mockbar [aria-pressed="true"] { background: var(--mock-text); color: var(--mock); }

/* Strukturknoten (Einheit in Baum/Pfad, öffnet Mitgliederfenster) – gemeinsam für E3, CC1, FB1 … */
.tree-node { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 4px 10px; border: 1px solid var(--control-border); border-radius: var(--radius-s); background: var(--btn-bg); box-shadow: var(--btn-shadow); text-align: left; width: 100%; color: var(--text); }
.tree-node .tn-name { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.tree-node.own { border-color: var(--accent); background: var(--accent-soft); }
.tree-node:hover { border-color: var(--accent); }
.bc-head .btn, .bc-head .seg > button, .seg.compact > button { min-height: var(--tap); }

/* Bedienleiste bei schmalen Fenstern (Wunsch mehrerer Seiten, 09.11.): Sendeziele nie kürzen, „Spricht“ gibt nach */
.tx-targets { flex-shrink: 0; }
.tx-speaking { flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 1240px) {
  .tx-actions .hold { display: none; }
  .tx-actions { gap: var(--gap); }
  .tx-speaking > span:not(.led) { display: none; }
}

/* Notruf (Inhaber 09.11.): klein und umrandet, erst im Alarmfall vollfarbig */
.tx-actions [data-req="notruf-button"] { border-color: var(--sig-emergency); color: var(--text); background: var(--btn-bg); font-weight: 700; }
.tx-actions [data-req="notruf-button"] .ico { color: var(--sig-emergency); }

/* Simulator-Band und Regelzeilen (KONZEPT-017) */
.sim-band { position: fixed; left: calc(var(--nav-w) + 12px); bottom: 12px; z-index: 75; display: flex; align-items: center; gap: var(--gap); padding: 6px 8px 6px 12px;
  border-radius: var(--radius); border: 2px solid var(--accent); background: var(--surface-1); box-shadow: var(--shadow); max-width: calc(100vw - var(--nav-w) - 24px); }
.sim-band small { color: var(--text-muted); }
body.layout-compact .sim-band { left: 8px; bottom: 68px; }
.rule-row { display: flex; align-items: center; gap: var(--gap-s); flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--border); }
.rule-add { border: 1px dashed var(--control-border); border-radius: var(--radius-s); padding: var(--gap-s); }

/* Mockup-Werkzeuge ausgeblendet: Zeile fällt weg, kleiner Knopf unten rechts */
:root.mock-hidden { --mockbar-h: 0px; }
:root.mock-hidden .bc-mockbar { display: none; }
.bc-mock-fab { position: fixed; right: 10px; bottom: 10px; z-index: 60; min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  color: #2b1f4f; background: repeating-linear-gradient(135deg, #e9e2ff 0 10px, #d9cffb 10px 20px); border: 1px solid #2b1f4f; border-radius: 18px; cursor: pointer; opacity: 0.85; }
.bc-mock-fab:hover { opacity: 1; }
.bc-mockbar .mk-close { margin-left: auto; }
