.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Standard – wird per JS zu 'flex' gesetzt */
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  z-index: 2500;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  width: auto;
  max-width: 96vw;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-body {
  max-height: none;
  overflow: visible;
}

.close-button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* kleines grünes Badge beim Kopieren */
.copy-ok{
  display:inline-block;
  margin-left:.5rem;
  color:#1c7c31;
  font-weight:600;
}


.alarm-btn.ausgewaehlt {
  background-color: #28a745 !important; /* grün */
  color: white;
  border: 2px solid #1c7c31;
}


/* REA-Anleitung Styles */

.rea-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  justify-content: center;
}

.rea-schrittfeld {
  flex: 2;
  min-width: 340px;
  max-width: 570px;
  background: #e6eff7;
  border-radius: 13px;
  border: 2px solid #005073;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 1.1rem 1.4rem 2.2rem 2.1rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  margin-left: 2.3rem;
  font-size: 1.08rem;
}

.rea-praesi-inhalt {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rea-schritt {
  text-align: center;
  width: 100%;
}

.rea-frage {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.rea-antworten {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.rea-antworten button {
  min-width: 110px;
}

.btn-rea-opt,
.btn-rea-start,
.btn-rea-nav,
.btn-rea-fertig {
  background: #005073;
  color: #fff;
  padding: 0.55rem 1.35rem;
  font-size: 1.2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  display: inline-block;
}

.btn-rea-fertig {
  background: #a30000;
}

.btn-rea-opt:hover,
.btn-rea-start:hover,
.btn-rea-nav:hover,
.btn-rea-fertig:hover {
  background: #003b5c;
}

.rea-praesi-nav {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.taktgeber-banner {
  margin-top: 1.3rem;
  padding: 1.1rem 2.6rem;
  background: #fbeeee;
  color: #a30000;
  font-weight: bold;
  font-size: 1.33rem;
  text-align: center;
  border-radius: 14px;
  border: 2px solid #a30000;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 4px 12px rgba(163,0,0,0.06);
  display: inline-block;
}

/* Dokumentationsbereich */
.rea-doku-block {
  flex: 1;
  min-width: 300px;
  max-width: 560px;
  background: #fbeeee;
  border-radius: 15px;
  padding: 0.85rem 0.8rem 1.1rem 1.2rem;
  border: 2px solid #a30000;
  box-shadow: 0 2px 12px rgba(163,0,0,0.07);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 2.2rem;
}

.rea-doku-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.rea-doku-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
  border-left: 5px solid #a30000;
  border-radius: 4px;
  padding-left: 0.5rem;
  background: #fff9fa;
  min-height: 32px;
  flex-wrap: wrap;
}

.rea-doku-row label {
  width: auto;
  min-width: 120px;
  font-size: 0.98rem;
  font-weight: bold;
  color: #a30000;
  margin-right: 0.2rem;
}

.rea-doku-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1 1 280px;
}

.rea-doku-flex input[type="text"] {
  font-size: 1.15rem;
  padding: 0.29rem 0.7rem;
  border-radius: 7px;
  border: 1.5px solid #bbb;
  background: #fff;
  width: 100px;
  flex: 0 1 100px;
}

.rea-doku-flex button,
.rea-doku-buttons-inline button {
  min-width: 100px;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
}

.rea-doku-buttons-inline {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: wrap;
}

#manueller_zusatz {
  min-height: 4.5rem;
  font-size: 1.12rem;
  padding: 0.6rem 0.8rem;
  resize: vertical;
  width: 100%;
  max-width: 100%;
  border-radius: 7px;
  border: 1.5px solid #bbb;
}

.btn-doku-zeit {
  padding: 0.32rem 1.08rem;
  border-radius: 8px;
  border: none;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-doku-rot { background: #a30000; color: #fff; }
.btn-doku-rot:hover { background: #7a0000; }
.btn-doku-blau { background: #005073; color: #fff; }
.btn-doku-blau:hover { background: #003b5c; }

.rea-doku-zusammenfassung {
  margin-top: 1.6rem;
}

.rea-doku-zusammenfassung h2 {
  font-size: 1.15rem;
  color: #a30000;
  margin-bottom: 0.3rem;
}

.rea-doku-zusammenfassung textarea {
  font-size: 1.15rem;
  font-family: inherit;
  padding: 0.7rem;
  border-radius: 8px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #a30000;
  margin-bottom: 0.7rem;
}

@media (max-width: 1100px) {
  .rea-grid {
    flex-direction: column;
    gap: 2.2rem;
  }
  .rea-schrittfeld, .rea-doku-block {
    max-width: 100%;
    min-width: 0;
  }
  .rea-schrittfeld {
    margin-bottom: 0.8rem;
  }
  .rea-doku-row label {
    min-width: 100px;
  }
}

/* REA-Anleitung Zusatzlayout */

.rea-abschnitt {
  background: #ffffff;
  border-left: 4px solid #a30000;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.4rem;
  font-size: 1.22rem;
  line-height: 1.6;
}

.rea-abschnitt strong {
  font-size: 1.26rem;
}

.rea-schritt.letzter-schritt .rea-abschnitt {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
  text-align: left;
}

/* SVG-Schmerzregion Auswahl */
.hover-region {
  fill: rgba(255, 0, 0, 0.2);
  stroke: red;
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}

.hover-region.selected {
  fill: rgba(255, 0, 0, 0.6);
  stroke: darkred;
}


/* optional – nur wenn du willst */
#schmerz-modal .schmerz-panel .framed { background:#fff; }
#schmerz-modal .hover-region { transition: fill 0.15 ease, stroke 0.15s ease, opacity 0.15 ease; }
#schmerz-modal .hover-region:active { transform: none; }




/* REA: breit */
.modal-rea-content { max-width: 1100px; }

/* SVG-Modal: Bild + Bedienfelder */
#schmerz-modal .modal-content { max-width: 1240px; }

/* Alarmierung: mittel */
#alarmierung-modal .modal-content { max-width: 760px; }





/* ========== Notfall-Seiten: 3 Spalten als Panels ========== */

/* Container: 3-Spalten-Grid, gleiche Höhe durch Grid-Stretch */

/* Breiterer Content NUR auf Notfall-Seiten */
.formular-bereich.container{
  max-width: 1280px;          /* vorher 1100px über .container */
}


.formular-bereich{
  display: grid !important;
  grid-template-columns: 40% 35% 25%;
  gap: 1rem;
  /*grid-template-columns: 1.6fr 1.4fr 1.2fr;*/  /* links etwas breiter */
  /*gap: 24px;*/
  padding: var(--space-6) 0;
  align-items: stretch; /* Panels füllen die Zeilenhöhe -> gleich hoch */
}


.formular-panel{
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 520px;                        /* Startwert, kannst du anpassen */
}

/* Überschriften in Panels etwas nach unten rücken */
.formular-panel h1,
.formular-panel h2,
.formular-panel h3{ margin-top: .25rem; }

/* kompaktere Vitalwerte-Reihe
.formular-mitte .notruf-block label { display:inline-flex; align-items:center; gap:.5rem; }
.formular-mitte .notruf-block input.vitalwert { margin-left:.5rem; max-width: 160px; }
.formular-mitte .notruf-block br { line-height: .6; }
.hidden { display:none; }
*/


/* Jede Spalte als „Panel“ mit Rahmen und Schatten */
.formular-bereich > .formular-links,
.formular-bereich > .formular-mitte,
.formular-bereich > .formular-rechts{
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: var(--space-4);
  display: flex;           /* Inhalt sauber stapeln */
  flex-direction: column;
  min-height: 520px;       /* optionaler Startwert; gleiche Höhe kommt durch Grid */
}

.formular-links,
.formular-mitte,
.formular-rechts {
  min-width: 0;      /* wichtig! erlaubt Inhalt-Overflow */
  overflow-wrap: break-word;  /* lange Wörter umbrechen */
  word-wrap: break-word;
}



/* Überschriften in Panels etwas absetzen */
.formular-bereich h1,
.formular-bereich h2,
.formular-bereich h3{
  margin-top: .25rem;
}

/* Mobil/Tablet: Spalten untereinander */
@media (max-width: 1100px){
  .formular-bereich{
    grid-template-columns: 1fr;
  }
}


/* framed für Panels sicherstellen (kommt NACH main.css) */
.formular-panel.framed{
  background:#fff;
  border:1px solid var(--gray-400);
}
.formular-panel.framed-blue{
  background:var(--bg-blue);
  border-left:6px solid var(--blue-900);
}
.formular-panel.framed-red{
  background:var(--bg-red);
  border-left:6px solid var(--red-700);
}
.formular-panel.framed-yellow{
  background:var(--bg-yellow);
  border-left:6px solid var(--yellow-500);
}
.formular-panel.framed-green{
  background:var(--bg-green);
  border-left:6px solid var(--green-700);
}



/* === REA-Modal – Fix: Breite & Layout stabilisieren === */

/* 1) Modal etwas breiter machen */
.modal-rea-content{
  font-size: 0.92rem;
  width: 96vw;
  max-width: 1240px;      /* bei Bedarf 1280px */
}

/* 2) Im REA-Modal kein inneres Scrollen */
.modal-rea-content .modal-body{
  max-height: none;
  overflow: visible;
}

/* 3) Zwei Spalten stabil mit Grid statt Flex */
.modal-rea-content .rea-grid{
  display: grid;
  grid-template-columns: minmax(560px,1fr) minmax(420px,0.9fr);
  gap: 24px;
  align-items: start;
  margin: 0;
}

/* 4) Störende Margins/Width-Bremsen entfernen */
.modal-rea-content .rea-schrittfeld,
.modal-rea-content .rea-doku-block{
  margin: 0;         /* vorher: margin-left */
  max-width: none;
  min-width: 0;      /* wichtig, damit Inhalte schrumpfen dürfen */
}

/* 5) Doku-Zeilen dürfen umbrechen */
.rea-doku-row{
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

/* 6) Flex-Container flexibel + Buttons/Inputs kleiner */
.rea-doku-flex{
  flex: 1 1 280px;
  gap: 8px;
  flex-wrap: wrap;   /* vorher: nowrap */
  column-gap: 0.5rem;
  row-gap: 0.4rem;
}

.rea-doku-flex input[type="text"]{
  flex: 0 1 120px;
  width: 120px;
}

.rea-doku-buttons-inline{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rea-doku-buttons-inline .btn-doku-zeit,
.rea-doku-flex .btn-doku-zeit{
  min-width: 88px;   /* vorher 100px → spart Breite */
}

/* 7) Labels flexibel, nicht zu breit festnageln */
.rea-doku-row label{
  width: auto;
  min-width: 140px;
}

#rea_doku_text{
  min-height: 120px;
}

/* 8) Unter 1100px einspaltig */
@media (max-width: 1100px){
  .modal-rea-content .rea-grid{
    grid-template-columns: 1fr;
  }
}
.rea-doku-buttons-inline .btn-doku-zeit,
.rea-doku-flex .btn-doku-zeit{
  min-width: 74px;           /* vorher 100px/88px */
  padding: .24rem .7rem;
  border-radius: 8px;
  font-size: 1rem;
}

/* Taktgeber-Banner etwas kleiner */
.taktgeber-banner{
  padding: .8rem 1.6rem;
  font-size: 1.12rem;
  border-radius: 10px;
}

/* Grid enger zusammenrücken (kompaktere Spaltenteilung) */
.modal-rea-content .rea-grid{
  grid-template-columns: minmax(520px,1fr) minmax(380px,.9fr);
}


/* Alarmierung: mittelbreit */
#alarmierung-modal .modal-content { max-width: 900px; }

/* Such-/Filterleiste */
.alarm-toolbar{
  display:flex; gap:.5rem; align-items:center; margin:.6rem 0 .8rem 0;
}
#alarmierung-filter{
  flex:1; padding:.55rem .7rem; border:1px solid var(--gray-400); border-radius:8px;
}
.alarm-checkbox{ font-size:.9rem; color:var(--gray-600); user-select:none; }

/* Sektionen-Grid */
.alarm-sections{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}
.alarm-section{
  background:#fff; border:1px solid var(--gray-300);
  border-radius:10px; padding:.8rem;
}
.alarm-section h4{ margin:0 0 .5rem 0; font-size:1.05rem; }
.alarm-section h5{ margin:.4rem 0 .3rem 0; font-size:.95rem; color:var(--gray-600); }

/* Button-Wrapper */
.alarm-button-group{ display:flex; flex-wrap:wrap; gap:.35rem; }

/* Auswahl-Highlight (hast du bereits, hier nochmal zur Sicherheit) */
.alarm-btn.ausgewaehlt{
  background-color:#28a745 !important; color:#fff; border:2px solid #1c7c31;
}








/* === SVG-Modal (Schmerz/Verletzung) – Layout & Look passend zu REA/Alarmierung === */

/* Breite des Modals (du hast bereits #schmerz-modal .modal-content; hier Feinschliff) */
#schmerz-modal .modal-content {
  width: 96vw;
  max-width: 1240px; /* etwas breiter für SVG + Panel */
  padding: 12px;
}

/* Zwei-Spalten-Layout: links SVG, rechts Zusatzabfragen */
#svgModalContent.svg-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 16px;
  align-items: start;
}

/* Sicherheit: keine zusätzlichen Außenabstände der Panels */
#svgModalContent.svg-layout > .svg-canvas,
#svgModalContent.svg-layout > .svg-zusatzabfragen{
  margin: 0;
}


/* SVG-Panel (optisch wie eure Panels) */
.svg-canvas {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 8px 8px 12px;
  overflow: auto; /* falls groß */
}

/* SVG skaliert auf die Spaltenbreite */
.svg-canvas .svg-figure{
  width: 100%;
  height: auto;
  max-width: 700px; /* Originalgröße als Obergrenze */
  display: block;
  margin: 0 auto;
}



/* Zusatzabfragen-Panel (leicht betont, analog framed-blue/red) */
.svg-zusatzabfragen {
  background: var(--bg-blue);
  border-left: 6px solid var(--blue-900);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding:0.9rem 1rem;
}

.svg-zusatzabfragen h3 {
  margin: 0 0 .6rem 0;
}

/* Frageblöcke, Labels, Inputs */
.frageblock {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: .75rem .9rem;
  margin: .6rem 0;
}

.frageblock p { margin: 0 0 .4rem 0; }
.frageblock label { display: inline-flex; align-items: center; gap: .4rem; margin-right: .8rem; }

#schmerzstaerke,
#bewegung {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--gray-400);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

/* Grid-Linien im SVG (standardmäßig aus, per Klasse zuschaltbar) */
.grid-line {
  stroke: rgba(0,0,0,.08);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  display: none;
}
.show-grid .grid-line { display: block; }

/* Interaktion der Hover-Regionen (du hast Basis schon definiert; hier Hover) */
.hover-region:hover {
  fill: rgba(255,0,0,0.35);
}

/* Buttons im Modal: einheitlicher Look */
.svg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.btn-modal-primary,
.btn-modal-secondary {
  padding: .55rem 1.1rem;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.btn-modal-primary {
  background: #005073;
  color: #fff;
}
.btn-modal-primary:hover { background: #003b5c; }

.btn-modal-secondary {
  background: #a30000;
  color: #fff;
}
.btn-modal-secondary:hover { background: #7a0000; }



/* Kleine Chips für die immer sichtbare Regionen-Liste */
.tag{
  display: inline-block;
  padding: 2px 6px;
  margin: 2px 4px 0 0;
  border: 1px solid var(--gray-400);
  border-radius: 8px;
  background: #fff;
  font-size: .9rem;
}


#schmerz-modal .svg-controls{
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}

#schmerz-modal .svg-controls button{
  display: inline-flex;
  align-items: center;
  width: auto !important;   /* falls global 100% erzwungen wird */
  min-width: unset;         /* falls irgendwo min-width gesetzt ist */
  white-space: nowrap;
}

/* SVG-Dev-Overlay (nur für's Ausrichten) */
.svg-debug {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}

/* SVG-Rects: Standard = nur Rahmen, keine Füllung */
#schmerz-modal .hover-region{
  fill: rgba(0,0,0,0.1);                                      /* leichtes Grau */
  stroke: var(--gray-500, #b5b5b5);                /* dezenter Rahmen (oder nimm Rot, siehe Kommentar) */
  stroke-width: 2px;
  transition: fill .15s ease, stroke .15s ease, opacity .15s ease;
  /* falls Klicken mit fill:none zickig wird: pointer-events per Attribut ist ja schon 'all' */
}

/* Hover = leichtes Rot + roter Rahmen */
#schmerz-modal .hover-region:hover{
  fill: rgba(163, 0, 0, 0.18);                     /* leichtes Rot */
  stroke: var(--red-700, #a30000);
}

/* Aktiv (selektiert) = kräftiges Rot + dunkler Rahmen */
#schmerz-modal .hover-region.selected{
  fill: rgba(163, 0, 0, 0.55);                     /* kräftiger */
  stroke: var(--red-900, #7a0000);
}

/* Vitalwerte – EIN Regler für den Zeilenabstand + einheitliche Inputs */
.notruf-block.vital-block {
  --vital-row-space: 2px;        /* <— HIER den Abstand einstellen */
  --vital-input-w:   170px;      /* <— Breite der Eingabefelder */
}

.formular-mitte .notruf-block.vital-block label{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: var(--vital-row-space) 0 !important;
  line-height: 1.0 !important;
}

.formular-mitte .notruf-block.vital-block input.vitalwert{
  width: var(--vital-input-w) !important;
  min-width: var(--vital-input-w) !important;
  max-width: var(--vital-input-w) !important;
  margin-left: auto !important;     /* rechtsbündig */
}

/* Unsichtbar aber platzhaltend -> kein Layout-Shift */
.formular-mitte .notruf-block.vital-block input.vitalwert.vital-off{
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* schmaler Viewport: Input unter das Label klappen */
@media (max-width: 980px){
  .vital-block .vital-row{ flex-wrap: wrap; }
  .vital-block .vitalwert{
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* EIN Regler für den Zeilenabstand der Vitalwerte */
.vital-block {
  --vital-row-space: 0px;   /* <- HIER anpassen (z.B. 0px, 2px, 6px) */
}

/* nutzt den Regler */
.formular-mitte .vital-block .vital-row{
  margin: var(--vital-row-space) 0 !important;
  line-height: 1.0 !important;
}

/* Abstand nur zwischen aufeinanderfolgenden Zeilen */
.formular-mitte .vital-block .vital-row + .vital-row{
  margin-top: var(--vital-row-space) !important;
}


/* Responsive: unter 1100px einspaltig (analog REA) */
@media (max-width: 980px) {
  #svgModalContent.svg-layout {
    grid-template-columns: 1fr;
  }
}

/* Leitstellen-REA – ruhige, klare Optik */
.trea-panel{
  background:#fff;                 /* raus aus dem großen Blauteppich */
  border:2px solid var(--brand-light);
  border-radius:var(--radius-lg);
  padding: var(--space-4);
}


.trea-topbar{
  display:flex; gap:.6rem; align-items:center; justify-content:space-between;
  padding:.4rem .6rem; background:var(--bg-blue); border:1px solid var(--brand-light);
  border-radius: var(--radius-md); margin-bottom:.6rem;
}
.trea-step .trea-say{
  font-size:1.28rem; font-weight:800; color:var(--gray-800);
  border-left:4px solid var(--brand-red); padding-left:1rem; margin:.4rem 0 .6rem;
}
.trea-step .trea-hint{
  font-size:.96rem; color:var(--brand-light); background:var(--bg-blue);
  border-left:4px solid var(--brand-light); padding:.6rem 1rem; border-radius:var(--radius-md);
  margin-bottom:.7rem;
}
.trea-text-center{ text-align:center; }

.trea-answers{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:.6rem; }
.btn-ans{
  background:var(--bg-red); border:2px solid var(--brand); color:var(--brand);
  border-radius:var(--radius-lg); padding:.5rem .9rem; font-weight:600; cursor:pointer;
}
.btn-ans:hover{ background:var(--brand); color:#fff; }

/* Buttons in eurem CD */
.btn-rea-nav{
  background: var(--brand); color:#fff; border:none; border-radius: var(--radius-lg);
  padding:.55rem 1rem; box-shadow: var(--shadow-1); cursor:pointer;
}
.btn-rea-nav:hover{ filter:brightness(1.06); }
.btn-rea-cta{
  background: var(--brand); color:#fff; border:none; border-radius: var(--radius-md);
  padding:.45rem .9rem; font-weight:700; box-shadow: var(--shadow-1);
}
.btn-rea-danger{
  background: var(--brand-red); color:#fff; border:none; border-radius: var(--radius-md);
  padding:.45rem .9rem; font-weight:700; box-shadow: var(--shadow-1);
}
/*.taktgeber-banner{
  min-width:90px; text-align:center; font-weight:700; font-size:1.1rem;
}*/

/* kleine Checkbox-Gruppe rechts */
.trea-flags label{ display:inline-flex; gap:.35rem; align-items:center; margin-right:.6rem; }



/* Panel links neutralisieren (weg vom großen Blauton) */
.trea-panel{
  background:#fff;
  border:2px solid var(--brand-light);
  border-radius:var(--radius-lg);
  padding: var(--space-4);
}

/* TOPBAR als 3-Zonen-Grid */
.trea-topbar--nav{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:.6rem;
  margin-bottom:.6rem;
}
.trea-topbar--nav .zone-left{ justify-self:start; }
.trea-topbar--nav .zone-center{ justify-self:center; }
.trea-topbar--nav .zone-right{ justify-self:end; }

.trea-topbar--met{
  display:flex; align-items:center; gap:.6rem;
  padding:.45rem .6rem; background:var(--bg-blue);
  border:1px solid var(--brand-light); border-radius:var(--radius-md);
  margin-bottom:.6rem;
}
.trea-topbar--met .met-hint{
  font-size:.95rem; color:var(--brand-light);
}

/* Sprech- und Hinweisblöcke */
.trea-say{
  background: var(--bg-red);
  font-size:1.25rem;
  font-weight:800; 
  color: var(--gray-800) !important;
  border: 1.5px solid var(--brand-red) !important;
  border-left: 6px solid var(--brand-red) !important;
  border-radius: 12px !important;
  padding: 1rem 1.25rem !important;     /* mehr Luft rechts/links wie hint */
  margin: .8rem 0 1rem !important;
  line-height: 1.55 !important;
}
.trea-hint{
  font-size:.96rem; color:var(--brand-light); background:var(--bg-blue);
  border-left:4px solid var(--brand-light); padding:.6rem 1rem;
  border-radius:var(--radius-md); margin-bottom:.7rem;
}

/* Antwortbuttons */
.trea-answers{ display:flex; flex-wrap:wrap; gap:.5rem; }
.btn-ans{
  background:#fff; border:2px solid var(--brand); color:var(--brand);
  border-radius:var(--radius-lg); padding:.5rem .9rem; font-weight:600; cursor:pointer;
}
.btn-ans:hover{ background:var(--brand); color:#fff; }

/* Topbar-Buttons (consistent) */
.btn-rea-nav{
  background: var(--brand); color:#fff; border:none; border-radius: var(--radius-lg);
  padding:.55rem 1rem; box-shadow: var(--shadow-1); cursor:pointer;
}
.btn-rea-nav:hover{ filter:brightness(1.06); }
.btn-rea-cta{
  background: var(--brand); color:#fff; border:none; border-radius: var(--radius-md);
  padding:.45rem .9rem; font-weight:700; box-shadow: var(--shadow-1);
}
.btn-rea-danger{
  background: var(--brand-red); color:#fff; border:none; border-radius: var(--radius-md);
  padding:.45rem .9rem; font-weight:700; box-shadow: var(--shadow-1);
}
.taktgeber-banner{
  min-width:90px; text-align:center; font-weight:700; font-size:1.1rem;
}

/* ——— Leitstellen-REA – Topbar wirklich volle Breite ——— */
.modal-rea-content .rea-praesi-inhalt{
  align-items: stretch;              /* statt center -> Kinder dürfen 100% Breite */
}

.modal-rea-content .trea-topbar--nav{
  width: 100%;
}

.modal-rea-content .trea-topbar--met{
  width: 100%;
}

/* Hint-Chip unter der Frage etwas näher ran & nicht so „chipsig“ */
#trea-hint{
  margin-top: .25rem;
}

/* Antwortbuttons unten etwas Abstand von Hint */
#trea-answers{
  margin-top: .35rem;
}

/* REA-Leitstelle: Linkes Panel wirklich als Spalte + 100% Breite der Kinder */
.modal-rea-content .rea-schrittfeld{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;    /* Kinder (Topbars, Inhalt) dürfen voll breit sein */
  justify-content: flex-start !important;
}

.modal-rea-content .rea-praesi-inhalt{
  align-items: stretch !important;    /* statt implizit center */
}

/* Sicherheit: Topbars nehmen volle Breite ein */
.modal-rea-content .trea-topbar--nav,
.modal-rea-content .trea-topbar--met{
  width: 100% !important;
}

/* ==== Antworten unten gleichmäßig (Grid) ==== */
.trea-answers{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: .6rem !important;
}
.trea-answers .btn-ans{
  width: 100% !important;          /* jede Karte gleiche Breite */
  justify-content: center;
}

/* ==== Metronom-Zeile: Banner fix zentriert, feste Größe ==== */
#trea-metronom-row{
  gap: .6rem;
}
#trea-metronom-row .met-center{
  flex: 1 1 auto;                  /* Mitte füllt den Raum */
  display: flex;
  justify-content: center;         /* Banner exakt mittig */
}
#t-metronom-banner{
  width: 210px;                    /* feste Breite -> kein Rutschen */
  height: 46px;                    /* feste Höhe */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 12px;
  border: 2px solid var(--brand-red);
  background: var(--bg-red);
  color: var(--brand-red);
  user-select: none;
  transition: none !important;     /* kein Fading */
}

/* Blinken ohne Fade – “steps(1)” schaltet hart */
:root{ --beat: .545s; }            /* ~110/min = 60/110 ≈ 0.545 s */
#t-metronom-banner.blink{
  animation: pressBlink var(--beat) steps(1, end) infinite;
}
@keyframes pressBlink{
  0%, 49%   { background: var(--bg-red);  color: var(--brand-red); transform: none; }
  50%,100%  { background: var(--brand-red); color: #fff; transform: scale(1.03); }
}

/* Optional: kleiner Abstand zwischen Banner und Hinweistext */
#t-metronom-hint{ margin-left: .35rem; }

/* ====== Mehr Luft & ruhigere Typo links ====== */
.modal-rea-content .rea-grid{
  gap: 28px !important;                       /* Spaltenabstand leicht größer */
}

.modal-rea-content .rea-schrittfeld{
  padding: 1.2rem 1.6rem 2.2rem !important;   /* mehr Innenabstand */
  min-height: 520px !important;               /* nutzt Platz nach unten */
}

/* Topbar: Navigation + Metronom — großzügiger setzen */
.modal-rea-content .trea-topbar--nav{
  margin-bottom: 1.0rem !important;
}

.modal-rea-content .trea-topbar--met{
  margin: .9rem 0 1.1rem !important;
  padding: .55rem .7rem !important;
  gap: .9rem !important;
}

/* Sprechtext & Hinweis mit mehr Zeilenabstand */
.modal-rea-content .trea-say{
  font-size: 1.24rem !important;
  line-height: 1.55 !important;
  margin: .9rem 0 .75rem !important;
}
.modal-rea-content .trea-hint{
  padding: .75rem 1rem !important;
  margin: .7rem 0 1rem !important;
}

/* ====== Antworten unten: sauberes Grid & gleiche Breiten ====== */
.trea-answers{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: .75rem !important;
  margin-top: .6rem !important;
}
.trea-answers .btn-ans{
  width: 100% !important;
  justify-content: center;
  padding: .6rem .9rem !important;
}

/* ====== Metronom – Button dezent (Ghost), Banner mittig bleibt ====== */
#t-metronom-btn{
  background: #fff !important;
  color: var(--brand) !important;
  border: 1px solid var(--brand-light) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: .35rem .7rem !important;
  font-size: .95rem !important;
}
#t-metronom-btn:hover{
  background: var(--bg-blue) !important;
}

/* Banner bleibt mittig (aus vorherigem Schritt), fixe Größe lassen wir */
#trea-metronom-row .met-center{ justify-content: center; }
#t-metronom-banner{
  width: 210px !important;
  height: 46px !important;
}

/* Hinweis rechts neben Banner minimal leiser */
#t-metronom-hint{
  font-size: .95rem !important;
  opacity: .9 !important;
  margin-left: .4rem !important;
}

.card-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.card-title-pills {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.card-title .tag-pill {
  display: inline-block !important;
}

/* === Notfallbild-Hinweise (card-subtle) === */
.card-subtle {
  background: #F9FAFB;            /* sanftes Grau */
  border: 1px solid #E5E7EB;      /* leichte Kontur */
  border-left: 4px solid #93C5FD; /* blauer Akzent (JUH-konform) */
  border-radius: .5rem;
  color: #1E3A8A;                 /* dunkles Blau für gute Lesbarkeit */
  font-size: .9rem;
  line-height: 1.3;
  padding: .5rem .75rem;
  margin-top: .5rem;
  margin-bottom: .25rem;
}

/* Variante für die erste Karte (Top-Verdacht) etwas kräftiger */
.card:first-child .card-subtle {
  border-left-color: #2563EB;     /* kräftigeres Blau */
  background: #EFF6FF;            /* heller Blauton */
  font-weight: 500;
}

/* --- Kartenbereich rechts: klare Trennung der Optionen --- */
#tri_result_list {
  display: grid;
  gap: 0.75rem;                     /* Abstand zwischen Karten */
}

/* Dezente Trennerlinie zwischen Karten */
#tri_result_list .card.small {
  border-top: 1px solid #E5E7EB;    /* neutral-grau */
  padding-top: .75rem;
}

/* erste Karte ohne obere Linie */
#tri_result_list .card.small:first-child {
  border-top: none;
  padding-top: 0;
}

/* --- Hinweis-Kästchen (card-subtle) sachlich, besser sichtbar --- */
.card-subtle{
  background: #F3F4F6;              /* neutrales Grau */
  border: 1px solid #E5E7EB;        /* feine Kontur */
  border-left: 5px solid #9CA3AF;   /* grauer Akzentstreifen */
  border-radius: .6rem;
  color: #1F2937;                   /* dunkles Grau für Kontrast */
  font-size: .92rem;
  line-height: 1.35;
  padding: .55rem .8rem;
  margin-top: .5rem;
}

/* Top-Verdacht leicht hervorgehoben, ohne Alarm-Charakter */
#tri_result_list .card.small:first-child .card-subtle{
  background: #EDEFF3;              /* minimal kühler */
  border-left-color: #6B7280;       /* etwas kräftiger */
  font-weight: 520;
}

/* Optional: kleines "Hinweis:"-Label wirkt strukturierend */
.card-subtle strong{
  font-weight: 600;
  margin-right: .25rem;
}

/* --- Button "Zum Notfallbild": dezentes Rot (JUH-Anmutung) --- */
.btn-blass.small-inline{
  border: 1px solid #FCA5A5;        /* hellrot */
  color: #B91C1C;                   /* Dunkelrot, guter Kontrast */
  background: #FEF2F2;              /* Hauch von Rot */
  padding: .25rem .5rem;
  border-radius: .5rem;
}
.btn-blass.small-inline:hover{
  background: #FFE4E6;
  border-color: #F87171;
}

/* Prozent-Balken etwas klarer absetzen (optional) */
.bar-wrap{
  height: 8px;
  background: #E5E7EB;
  border-radius: 999px;
  margin: .35rem 0 .5rem;
}
.bar{
  height: 100%;
  border-radius: 999px;
}
