/* Kompendium – App-Oberfläche. Mobil zuerst, große Touch-Ziele, Tag/Nacht. */
:root {
  --bg: #f5f7f9;
  --karte: #ffffff;
  --text: #14181d;
  --leise: #5b6570;
  --linie: #d7dde3;
  --flaeche: #eef1f4;
  --akzent: #0f2a43;
  --akzent-text: #ffffff;
  --rot: #c62828;
  --rot-flaeche: #fdecea;
  --warn: #8a5a00;
  --warn-flaeche: #fff4d6;
  --gruen: #1b6e3a;
  --gruen-flaeche: #e3f4e8;
  --markiert: #fff3b0;
  --schatten: 0 1px 2px rgba(15, 42, 67, .08), 0 2px 8px rgba(15, 42, 67, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --karte: #161b22; --text: #e6edf3; --leise: #9aa7b4; --linie: #2d3640; --flaeche: #1f2630;
    --akzent: #1c3d5e; --rot: #ff6b6b; --rot-flaeche: #3a1d1d; --warn: #ffcf66; --warn-flaeche: #3a2e10;
    --gruen: #7ee2a0; --gruen-flaeche: #15301f;
    --markiert: #4a4110; --schatten: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --karte: #161b22; --text: #e6edf3; --leise: #9aa7b4; --linie: #2d3640; --flaeche: #1f2630;
  --akzent: #1c3d5e; --rot: #ff6b6b; --rot-flaeche: #3a1d1d; --warn: #ffcf66; --warn-flaeche: #3a2e10;
  --gruen: #7ee2a0; --gruen-flaeche: #15301f;
  --markiert: #4a4110; --schatten: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* auch bei Klassen mit eigener display-Regel (z. B. .felder) */
html { -webkit-text-size-adjust: 100%; }
/* Schriftgröße (Info → Schriftgröße): skaliert den Lesebereich; Kopfzeile, Fußleiste und Dialoge bleiben fest */
#inhalt { font-size: calc(16px * var(--schrift, 1)); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button { font: inherit; }

/* ---------- Kopfzeile */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--akzent); color: var(--akzent-text);
}
.marke { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; flex: none; }
.logo { width: 34px; height: 34px; flex: none; display: block; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.28); }
.marke-text { font-weight: 800; letter-spacing: -.01em; }
.suche-feld { flex: 1; min-width: 0; }
#suche {
  width: 100%; height: 40px; border-radius: 10px; border: 0; padding: 0 12px;
  font: inherit; font-size: 16px; background: rgba(255,255,255,.14); color: #fff; outline: none;
}
#suche::placeholder { color: rgba(255,255,255,.7); }
#suche:focus { background: #fff; color: #14181d; }
.knopf {
  min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--karte); color: var(--text); cursor: pointer; font-weight: 600;
}
.kopf .knopf { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.knopf.rund { width: 40px; padding: 0; }
.sprache-knopf { font-size: 13px; font-weight: 800; letter-spacing: .03em; flex: none; }
.knopf.gewicht { white-space: nowrap; }
.knopf.gewicht.aktiv { background: #fff; color: var(--akzent); }
.knopf.primaer { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.knopf:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 560px) {
  .marke-text { display: none; }
}

.probe-banner { background: var(--navy, #0f2a43); color: #fff; font-size: 14px; font-weight: 700; text-align: center; padding: 8px 12px; }
.probe-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.probe-banner a:hover { color: #ffd7d7; }
.update-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; background: var(--akzent); color: #fff;
  font-size: 14px; font-weight: 700; text-align: center; padding: 8px 12px; }
.update-banner button { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 8px; border: 0; background: #fff; color: var(--akzent); cursor: pointer; }
.lizenz-banner { background: var(--warn-flaeche); color: var(--warn); font-size: 14px; font-weight: 600; text-align: center; padding: 8px 12px; border-bottom: 1px solid var(--linie); }
/* Englische Ausgabe: Übersetzungshinweise oben auf Inhaltsseiten (Stil wie die Info-Banner) */
.uebersetzung { display: grid; gap: 6px; margin: 0 0 12px; }
.uebersetzung-hinweis { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: calc(13px * var(--schrift, 1)); font-weight: 600; line-height: 1.4;
  background: var(--flaeche); color: var(--leise); border-left: 4px solid var(--linie); }
.uebersetzung-hinweis.fehlt { background: var(--warn-flaeche); color: var(--warn); border-left-color: var(--warn); font-size: calc(14px * var(--schrift, 1)); }
.uebersetzung-hinweis.entwurf { background: var(--rot-flaeche); color: var(--rot); border-left-color: var(--rot); font-size: calc(14px * var(--schrift, 1)); }
.entwurf-banner { background: #b71c1c; color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 6px 12px; }

/* ---------- Suchtreffer */
.treffer {
  position: sticky; top: 56px; z-index: 19; max-height: 70vh; overflow: auto;
  background: var(--karte); border-bottom: 1px solid var(--linie); box-shadow: var(--schatten);
}
.treffer a { display: block; padding: 10px 16px; text-decoration: none; border-bottom: 1px solid var(--linie); }
.treffer a:focus, .treffer a.aktiv { background: var(--flaeche); outline: none; }
.treffer .t-titel { font-weight: 700; }
.treffer .t-info { font-size: calc(13px * var(--schrift, 1)); color: var(--leise); }
.treffer mark { background: var(--markiert); color: inherit; border-radius: 2px; }
.treffer .leer { padding: 16px; color: var(--leise); }

/* ---------- Hauptbereich */
main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }
.leise { color: var(--leise); }

.schnell { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 22px; }
.schnell a {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 84px; padding: 12px;
  border-radius: 14px; text-decoration: none; color: #fff; font-weight: 800; line-height: 1.2;
  background: var(--farbe); box-shadow: var(--schatten);
}
.schnell a small { font-weight: 600; opacity: .85; }
.schnell a.buch-kachel { justify-content: space-between; gap: 6px; color: #0f2a43; background: linear-gradient(135deg, #fff6d6, #ffe08a);
  border: 2px solid #e0b43a; }
.schnell a.buch-kachel svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.schnell a.buch-kachel span { display: flex; flex-direction: column; min-width: 0; }
.schnell a.buch-kachel small { font-weight: 600; opacity: .8; }
.abschnitt-titel { font-size: calc(13px * var(--schrift, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--leise); margin: 22px 0 8px; font-weight: 700; }
.kapitel-liste { display: grid; gap: 8px; }
.kapitel-liste a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--karte); box-shadow: var(--schatten); border: 1px solid var(--linie);
}
.kapitel-liste .nr { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--farbe); flex: none; }
.kapitel-liste .anzahl { margin-left: auto; color: var(--leise); font-size: calc(14px * var(--schrift, 1)); }

/* Startseite: Kapitelgruppen als Karten mit den Kapiteln direkt darunter */
.gruppen { display: grid; gap: 10px; }
.gruppe { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten); overflow: hidden; }
.gruppe-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--leise);
  font-size: calc(13px * var(--schrift, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.gruppe-kopf .nr { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 800;
  font-size: calc(14px * var(--schrift, 1)); letter-spacing: 0; background: var(--farbe); flex: none; }
.gruppe-kopf .anzahl { margin-left: auto; color: var(--leise); font-size: calc(14px * var(--schrift, 1)); font-weight: 600; letter-spacing: 0; text-transform: none; }
.gruppe.einzeln .gruppe-kopf { color: var(--text); font-size: calc(17px * var(--schrift, 1)); font-weight: 500; text-transform: none; letter-spacing: 0; padding: 12px 14px; }
.gruppe.einzeln .gruppe-kopf .nr { width: 32px; height: 32px; border-radius: 8px; font-size: calc(16px * var(--schrift, 1)); }
.gruppe-kapitel a { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 50px; border-top: 1px solid var(--linie);
  text-decoration: none; color: var(--text); font-size: calc(17px * var(--schrift, 1)); min-height: 46px; position: relative; }
.gruppe-kapitel a::before { content: ''; position: absolute; left: 26px; top: 0; bottom: 0; width: 3px; background: var(--farbe); opacity: .35; }
.gruppe-kapitel a::after { content: '›'; margin-left: auto; color: var(--leise); font-size: calc(20px * var(--schrift, 1)); line-height: 1; }
.gruppe-kapitel a:hover, .gruppe-kopf:hover { background: var(--flaeche); }
.gruppe-kapitel .nw { white-space: nowrap; }

/* Zuletzt angesehen: schlichte Verlaufsliste (keine Kacheln), 3 sichtbar, Rest aufklappbar */
.zuletzt-liste { border-top: 1px solid var(--linie); }
.zuletzt-liste a {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--linie); font-size: calc(15px * var(--schrift, 1)); min-height: 40px;
}
.zuletzt-liste .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--farbe); flex: none; }
.zuletzt-liste .titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zuletzt-liste .gruppe { margin-left: auto; color: var(--leise); font-size: calc(12px * var(--schrift, 1)); white-space: nowrap; padding-left: 8px; }
.zuletzt-mehr summary {
  list-style: none; cursor: pointer; color: var(--leise); font-size: calc(13px * var(--schrift, 1)); font-weight: 600; padding: 9px 4px;
  border-bottom: 1px solid var(--linie);
}
.zuletzt-mehr summary::-webkit-details-marker { display: none; }
.zuletzt-mehr summary::after { content: ' ▾'; }
.zuletzt-mehr[open] summary::after { content: ' ▴'; }
.zuletzt-mehr .auf, .zuletzt-mehr[open] .zu { display: none; }
.zuletzt-mehr[open] .auf { display: inline; }
@media (max-width: 420px) { .zuletzt-liste .gruppe { display: none; } }

/* ---------- Seiten */
.seitenkopf { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: calc(14px * var(--schrift, 1)); color: var(--leise); }
.seitenkopf .streifen { width: 6px; align-self: stretch; border-radius: 3px; background: var(--farbe); }
.seitenkopf a { text-decoration: none; font-weight: 600; }
.favorit { margin-left: auto; background: none; border: 0; font-size: calc(24px * var(--schrift, 1)); cursor: pointer; color: var(--leise); min-width: 44px; min-height: 44px; }
.favorit.an { color: #f5a400; }

article { background: var(--karte); border-radius: 16px; padding: 18px; box-shadow: var(--schatten); border: 1px solid var(--linie); }
article h1 { font-size: calc(24px * var(--schrift, 1)); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em; }
article h2 { font-size: calc(19px * var(--schrift, 1)); margin: 24px 0 8px; }
article h3 { font-size: calc(16px * var(--schrift, 1)); margin: 18px 0 6px; }
blockquote.sofort { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--rot-flaeche); border-left: 6px solid var(--rot); }
blockquote.sofort p { margin: 0; }

.tabelle-rahmen { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: calc(14px * var(--schrift, 1)); }
th, td { border: 1px solid var(--linie); padding: 7px 8px; text-align: left; vertical-align: top; }
thead th { background: var(--flaeche); }
.tab-titel { font-weight: 700; padding: 0 0 6px; }
.tab-titel small, th small { font-weight: 500; color: var(--leise); }
.gewichtstabelle td, .gewichtstabelle thead th { text-align: center; }
.gewichtstabelle tbody th { white-space: nowrap; }
tr.markiert td, tr.markiert th { background: var(--markiert) !important; }
.ml { color: var(--leise); }
.max { font-size: calc(11px * var(--schrift, 1)); font-weight: 800; color: var(--warn); }

.dosisbox { border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px 2px; margin: 0 0 14px; }
.dosisbox-kopf { font-weight: 700; margin-bottom: 4px; }
.dosisbox-kopf a { color: var(--akzent); }
:root[data-theme="dark"] .dosisbox-kopf a { color: #8cc4ff; }
.dosisbox-kopf span { font-weight: 500; color: var(--leise); }
.dosen { list-style: none; padding: 0; margin: 0 0 8px; }
.dos { margin: 0 0 8px; padding-left: 16px; position: relative; }
.dos::before { content: "▸"; position: absolute; left: 0; color: var(--rot); }
.dos-zusatz { color: var(--leise); font-size: calc(14px * var(--schrift, 1)); }
.dos-rechner { margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--markiert); font-size: calc(15px * var(--schrift, 1)); }
.dos-rechner small { display: block; color: var(--leise); font-size: calc(12px * var(--schrift, 1)); }
.hinweis { background: var(--flaeche); padding: 8px 10px; border-radius: 8px; font-size: calc(15px * var(--schrift, 1)); }
.warnung { background: var(--warn-flaeche); color: var(--warn); font-weight: 700; padding: 8px 10px; border-radius: 8px; }
sup.q { font-size: calc(11px * var(--schrift, 1)); color: var(--leise); margin-left: 2px; }
.namen { margin: 2px 0 0; color: var(--leise); }
.klasse { margin: 2px 0 12px; font-weight: 600; }
.med-kopf h2 { font-size: calc(24px * var(--schrift, 1)); margin: 0; }
.zubereitungen span { font-weight: 700; }
.seiten-fuss { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--linie); font-size: calc(12px * var(--schrift, 1)); color: var(--leise); }
.entwurf { color: var(--rot); font-weight: 800; }
.marke-druck { display: none; }

.blaettern { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0; }
.blaettern a { flex: 1; padding: 12px; border-radius: 12px; background: var(--karte); border: 1px solid var(--linie); text-decoration: none; font-weight: 600; }
.blaettern a.weiter { text-align: right; }
.blaettern small { display: block; color: var(--leise); font-weight: 500; }

/* ---------- Rechner */
.rechner-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 16px; margin: 0 0 14px; box-shadow: var(--schatten); }
.rechner-karte h2 { margin: 0 0 4px; font-size: calc(18px * var(--schrift, 1)); }
.rechner-warnung { background: var(--warn-flaeche); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: calc(14px * var(--schrift, 1)); margin: 0 0 14px; }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0; }
.felder label { display: grid; gap: 4px; font-size: calc(14px * var(--schrift, 1)); color: var(--leise); }
.felder input, .felder select { width: 100%; min-width: 0; height: 44px; border-radius: 10px; border: 1px solid var(--linie); padding: 0 10px; font: inherit; font-size: max(16px, calc(16px * var(--schrift, 1))); background: var(--bg); color: var(--text); }
.felder textarea { width: 100%; min-width: 0; border-radius: 10px; border: 1px solid var(--linie); padding: 10px; font: inherit; font-size: max(16px, calc(16px * var(--schrift, 1))); line-height: 1.4; background: var(--bg); color: var(--text); resize: vertical; }
.ergebnis { background: var(--flaeche); border-radius: 10px; padding: 10px 12px; font-size: calc(15px * var(--schrift, 1)); }
.ergebnis strong { font-size: calc(18px * var(--schrift, 1)); }
.installieren { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.installieren img { border-radius: 10px; border: 1px solid var(--linie); background: #fff; }
.installieren p { flex: 1; min-width: 200px; margin: 0; }
.app-adresse { word-break: break-all; }
.anleitung { border: 1px solid var(--linie); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.anleitung summary { font-weight: 700; cursor: pointer; }
.anleitung ol { margin: 8px 0 4px; padding-left: 20px; }
.anleitung li { margin: 4px 0; }
.hinweis-persoenlich { background: var(--warn-flaeche); color: var(--text); border-left: 5px solid var(--warn); border-radius: 10px; padding: 10px 12px; }
.code-eingabe { font: 800 24px/1 ui-monospace, Menlo, Consolas, monospace !important; letter-spacing: .3em; text-align: center; }
.fehler-melden { margin: 18px 0 6px; font-size: calc(14px * var(--schrift, 1)); }
.fehler-melden a { color: var(--leise); text-decoration: underline; text-underline-offset: 2px; }
.bestell-uebersicht { background: var(--flaeche); border-radius: 12px; padding: 4px 14px; margin: 0 0 12px; }
.bestellknopf { font-size: calc(17px * var(--schrift, 1)); padding: 12px 18px; }
.ergebnis.ok { background: var(--gruen-flaeche); color: var(--gruen); border-left: 5px solid var(--gruen); font-weight: 600; }
.ergebnis.fehler { background: var(--rot-flaeche); color: var(--rot); border-left: 5px solid var(--rot); font-weight: 600; }
.auswahl { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.auswahl label { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 10px; font-size: calc(14px * var(--schrift, 1)); cursor: pointer; }
/* Konto: Monatsabo oder Jahreszugang – untereinander, ganze Breite, gewählte Zeile hervorgehoben */
fieldset.abo-art { border: 0; padding: 0; margin: 8px 0 12px; flex-direction: column; flex-wrap: nowrap; }
fieldset.abo-art legend { padding: 0; margin-bottom: 6px; }
.abo-art label { align-items: flex-start; line-height: 1.4; }
.abo-art label input { margin-top: 3px; flex: none; }
.abo-art label:has(input:checked) { border-color: var(--gruen); box-shadow: 0 0 0 1px var(--gruen) inset; }

/* ---------- Abo, Konto, Recht */
.abo-hinweis { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 14px 16px; border-radius: 14px;
  background: var(--akzent); color: #fff; text-decoration: none; box-shadow: var(--schatten); }
.abo-hinweis span { font-size: calc(14px * var(--schrift, 1)); opacity: .9; }
/* Schloss: Seite nur im Abo enthalten (Startseite, Listen, Suche, Verweise in Seiten) */
.schloss-ikone { display: inline-flex; flex: none; width: 1em; height: 1em; margin-left: 6px; vertical-align: -0.12em; color: var(--leise); }
.schloss-ikone svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.schnell a { position: relative; }
.schnell a .schloss-ikone { position: absolute; top: 10px; right: 10px; margin: 0; color: inherit; opacity: .9; }
.kapitel-liste a .schloss-ikone { margin-left: auto; }
.gesperrt h1 .schloss-ikone { width: .8em; height: .8em; margin-left: 10px; }
.gesperrt { text-align: left; }
a.knopf { display: inline-flex; align-items: center; text-decoration: none; }
.notruf { background: var(--rot-flaeche); border-left: 6px solid var(--rot); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.rechtsfuss { margin: 28px 0 8px; font-size: calc(13px * var(--schrift, 1)); color: var(--leise); text-align: center; line-height: 2; }
.rechtsfuss a { color: inherit; }
.paypal-bereich { margin: 14px 0; min-height: 48px; }
.land-frage { margin: 14px 0 4px; }

/* ---------- Fußleiste */
.fussleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex;
  background: var(--karte); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom);
}
.fussleiste a { flex: 1; text-align: center; padding: 12px 4px; text-decoration: none; font-weight: 700; font-size: 14px; min-height: 48px; }
.fussleiste a.aktiv { color: var(--rot); }
/* Schmale Handys mit langen Beschriftungen (z. B. „Calculadoras“): Leiste mit Metronom-Knopf passt in eine Zeile */
@media (max-width: 430px) {
  .fussleiste a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; line-height: 1.15;
    padding: 6px 3px; -webkit-hyphens: auto; hyphens: auto; }
}
@media (max-width: 340px) { .fussleiste a { font-size: 11px; padding: 6px 1px; } .metronom-knopf { flex-basis: 50px; } }

/* ---------- Metronom (Herzdruckmassage): Herz-Knopf in der Mitte der Fußleiste, Feld darüber (web/metronom.js) */
.metronom-knopf { flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 4px 0 3px; border: 0; background: none; color: var(--rot); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mk-herz { display: grid; place-items: center; width: 34px; height: 34px; margin-top: -14px; border-radius: 50%; background: var(--karte);
  border: 2px solid var(--rot); box-shadow: 0 2px 8px rgba(198, 40, 40, .25); transition: transform .08s ease-out, background .15s; }
.mk-herz svg { width: 18px; height: 18px; fill: currentColor; }
.mk-takt { font-size: 11px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.metronom-knopf.laeuft .mk-herz { background: var(--rot); color: #fff; }
.metronom-knopf.laeuft.schlag .mk-herz { transform: scale(1.18); box-shadow: 0 0 0 7px rgba(198, 40, 40, .22); }
.metronom-knopf:focus-visible .mk-herz { outline: 3px solid var(--akzent); outline-offset: 2px; }
.metronom { position: fixed; left: 8px; right: 8px; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 21; max-width: 520px; margin: 0 auto;
  background: var(--karte); color: var(--text); border: 2px solid var(--rot); border-radius: 16px; padding: 10px 12px 8px;
  box-shadow: 0 10px 30px rgba(5, 12, 20, .25); }
.metronom[hidden] { display: none; }
.metronom-kopf { display: flex; align-items: center; gap: 10px; }
.metronom-kopf strong { font-size: 15px; }
.metronom-puls { width: 14px; height: 14px; border-radius: 50%; background: var(--rot); opacity: .35; flex: none; transition: opacity .06s, transform .06s; }
.metronom-puls.schlag { opacity: 1; transform: scale(1.35); }
.metronom-zeit { margin-left: auto; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.metronom-zeile { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.metronom-takte { display: inline-flex; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.metronom-takte button { min-width: 50px; min-height: 40px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 800;
  font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums; }
.metronom-takte button + button { border-left: 1px solid var(--linie); }
.metronom-takte button.aktiv { background: var(--rot); color: #fff; }
.metronom-einheit { font-size: 13px; color: var(--leise); font-weight: 700; }
.metronom-stopp { margin-left: auto; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--text); color: var(--karte);
  font: inherit; font-weight: 800; cursor: pointer; }
.metronom-hinweis { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--rot); min-height: 0; }
.metronom-hinweis:empty { display: none; }
.metronom.zyklus { background: var(--rot-flaeche); }
body.metronom-an #inhalt { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) {
  .metronom-knopf.laeuft.schlag .mk-herz, .metronom-puls.schlag { transform: none; }
}

/* ---------- Dialoge */
.dialog { border: 0; border-radius: 18px; padding: 20px; max-width: min(520px, calc(100vw - 32px)); width: 100%; background: var(--karte); color: var(--text); }
.dialog::backdrop { background: rgba(5, 12, 20, .55); }
.dialog h2 { margin: 0 0 4px; }
.gewicht-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin: 12px 0; }
.gewicht-raster button { min-height: 44px; border-radius: 10px; border: 1px solid var(--linie); background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer; }
.gewicht-raster button.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.gewicht-raster .gruppe { grid-column: 1 / -1; font-size: calc(12px * var(--schrift, 1)); color: var(--leise); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.gewicht-frei { display: flex; align-items: center; gap: 8px; color: var(--leise); }
.gewicht-frei input { width: 100px; height: 44px; border-radius: 10px; border: 1px solid var(--linie); padding: 0 10px; font: inherit; font-size: 16px; background: var(--bg); color: var(--text); }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hinweis-dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 16px 18px; overflow: hidden; }
/* Text scrollt, Land + Bestätigung + Weiter bleiben immer sichtbar (auch bei langem Disclaimer, kleinen Bildschirmen) */
.hinweis-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
.hinweis-dialog #hinweis-text, .hinweis-dialog #kauf-hinweis-text { flex: 1 1 auto; min-height: 96px; overflow: auto; font-size: 15px; padding-right: 6px;
  border-bottom: 1px solid var(--linie); -webkit-overflow-scrolling: touch; }
.hinweis-dialog .dialog-sprache { flex: none; display: flex; justify-content: flex-end; margin: 0 0 6px; }
.dialog-sprache .knopf { min-height: 32px; padding: 0 10px; font-size: 13px; }
.hinweis-dialog .land-frage { flex: none; margin: 10px 0 2px; font-size: 15px; }
.hinweis-dialog #hinweis-land { flex: none; margin: 4px 0; }
#kauf-hinweis-titel { margin: 0 0 6px; font-size: 20px; }
#kauf-hinweis-titel:focus { outline: none; }
.kauf-einleitung { margin: 0 0 10px; font-size: 13.5px; }
#kauf-hinweis-text:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 700; }
.hinweis-dialog .bestaetigung { flex: none; margin-top: 8px; font-size: 14.5px; line-height: 1.35; }
.hinweis-dialog .dialog-knoepfe { flex: none; margin-top: 10px; align-items: center; justify-content: space-between; }
.hinweis-dialog .dialog-knoepfe .leise { font-size: 13px; }
.bestaetigung { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-weight: 600; }
.bestaetigung input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
/* Installationshilfe (App auf dem Home-Bildschirm): Anleitung scrollt, Titel und Knöpfe bleiben sichtbar */
.install-dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 16px 18px; overflow: hidden; }
.install-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
#install-titel { flex: none; margin: 0 0 6px; font-size: 20px; }
#install-titel:focus { outline: none; }
#install-einleitung { flex: none; margin: 0 0 10px; }
#install-schritte { flex: 1 1 auto; min-height: 96px; overflow: auto; -webkit-overflow-scrolling: touch; }
.install-dialog .dialog-knoepfe { flex: none; flex-wrap: wrap; margin-top: 10px; }
.install-safari { background: var(--warn-flaeche); border-left: 5px solid var(--warn); margin: 0 0 8px; }
/* Ladehinweis bis zur ersten Seite (index.html): „Neu laden“ erst nach 12 s einblenden (reines CSS) */
.start-laden-hinweis { visibility: hidden; animation: start-laden-zeigen 0s 12s forwards; }
@keyframes start-laden-zeigen { to { visibility: visible; } }

@media print {
  .kopf, .fussleiste, .treffer, .entwurf-banner, .metronom { display: none; }
}
/* Sprachumschalter nur, wenn der Build Englisch anbietet (html[data-sprachen]) */
html:not([data-sprachen*=" "]) [data-sprache-wechsel]{display:none!important}
select.sprache-knopf{appearance:none;-webkit-appearance:none;text-align:center;text-align-last:center;padding:0 6px;cursor:pointer;font:inherit;font-size:13px;font-weight:800;color:inherit}
.dialog-sprache{gap:6px;flex-wrap:wrap}

/* Sprungleiste unter dem Kapiteltitel (ab 3 Abschnitten): am Handy untereinander (alle Abschnitte sichtbar, kein
   Wischen), sonst umbrechend */
.sprungleiste { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.sprungleiste button { font: inherit; font-size: calc(13.5px * var(--schrift, 1)); font-weight: 600; line-height: 1.2; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  background: var(--karte, #fff); color: var(--text, #1b1f24); border: 1px solid var(--linie, #d0d5db); white-space: nowrap; }
.sprungleiste button:hover, .sprungleiste button:focus-visible { border-color: var(--farbe, #c62828); color: var(--farbe, #c62828); }
@media (max-width: 640px) {
  .sprungleiste { flex-direction: column; flex-wrap: nowrap; gap: 0; border: 1px solid var(--linie, #d0d5db); border-radius: 12px;
    overflow: hidden; background: var(--karte, #fff); }
  .sprungleiste button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left;
    white-space: normal; border: 0; border-radius: 0; border-top: 1px solid var(--linie, #d0d5db); padding: 10px 14px; font-size: calc(15px * var(--schrift, 1)); }
  .sprungleiste button:first-child { border-top: 0; }
  .sprungleiste button::after { content: '›'; font-size: calc(18px * var(--schrift, 1)); line-height: 1; opacity: .55; }
}
.kapitelseite h2, .sprungziel { scroll-margin-top: 72px; }
.rechner-warnung + .sprungleiste { margin-top: 10px; }
/* Flaggen der Länderausgaben AT/DE (Länderwahl) */
svg.flagge { display: inline-block; vertical-align: -2px; margin-right: 6px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); flex: none; }
/* Rechner: Ankreuzfelder (qSOFA), Quelle, Entwurfshinweis (neue Rechner bis zur Freigabe) */
/* Scores mit langen Antworttexten einspaltig, damit am Handy nichts abgeschnitten wird */
#rechner-gcs .felder, #rechner-gcskind .felder, #rechner-apgar .felder, #rechner-race .felder { grid-template-columns: 1fr; }
#rechner-sauerstoff .felder, #rechner-qsofa .felder { align-items: end; }
.rechner-pruefung { display: block; font-size: calc(13px * var(--schrift, 1)); line-height: 1.35; color: var(--leise); font-weight: 400; }
.rechner-quelle { display: inline-block; margin-top: 4px; color: var(--leise); font-size: 12px; }
.rechner-entwurf { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--warn, #8a5a00); background: var(--warn-flaeche, #fff3cd); border-radius: 8px; padding: 4px 8px; }

