/* wokrankenhaus.de im Look der iOS-App RettungRheinNeckar: große Titel,
   Kapsel-Chips, schlichte Liste, gruppierte Detailansicht. Systemschrift,
   nichts wird nachgeladen. Grau ist gegenüber iOS leicht abgedunkelt
   (#6E6E73 statt 60 % Grau), damit kleiner Text 4,5:1 erreicht. */

:root {
  --hg: #ffffff;
  --hg-gruppiert: #f2f2f7;
  --zelle: #ffffff;
  --leiste: rgba(247, 247, 248, 0.94);
  --text: #000000;
  --text2: #6e6e73;       /* 5,1:1 auf Weiß */
  --platzhalter: #636366;
  --trenn: #c6c6c8;
  --akzent: #0068b3;      /* Blau der App, 5,8:1 auf Weiß */
  --akzent-flaeche: rgba(0, 104, 179, 0.12);
  --fuellung: #e9e9eb;    /* Chips, Suchfeld */
  --warn: #9a5800;        /* Warn-Text der App, 5,6:1 */
  --glas: rgba(255, 255, 255, 0.82);
  --glas-rand: rgba(0, 0, 0, 0.08);
  --schatten: 0 2px 10px rgba(0, 0, 0, 0.08);
  /* Karte */
  --k-land: #f3f1ec;
  --k-gruen: #d7eac9;
  --k-wasser: #a8ccee;
  --k-klinik: #f6d9df;
  --k-strasse: #ffffff;
  --k-strasse-rand: #d9d4ca;
  --k-autobahn: #f6cf6e;
  --k-autobahn-rand: #dcb04f;
  --k-text: #3c3c43;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hg: #000000;
    --hg-gruppiert: #000000;
    --zelle: #1c1c1e;
    --leiste: rgba(18, 18, 20, 0.94);
    --text: #ffffff;
    --text2: #a1a1a6;
    --platzhalter: #a1a1a6;
    --trenn: #38383a;
    --akzent: #4aa3ee;
    --akzent-flaeche: rgba(74, 163, 238, 0.18);
    --fuellung: #2c2c2e;
    --warn: #ffb340;
    --glas: rgba(44, 44, 46, 0.85);
    --glas-rand: rgba(255, 255, 255, 0.1);
    --schatten: 0 2px 10px rgba(0, 0, 0, 0.5);
    --k-land: #242426;
    --k-gruen: #22302a;
    --k-wasser: #1d3652;
    --k-klinik: #432c33;
    --k-strasse: #3d3d41;
    --k-strasse-rand: #2a2a2d;
    --k-autobahn: #7a6430;
    --k-autobahn-rand: #594820;
    --k-text: #d1d1d6;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }

[hidden] { display: none !important; }

.nur-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprung { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: 0.5rem 0.75rem; background: var(--zelle); border-radius: 8px; }
.sprung:focus { top: 0.5rem; }

.symbol { width: 22px; height: 22px; flex: none; fill: currentColor; }

#ansicht-liste, #ansicht-detail { max-width: 44rem; margin: 0 auto; }
#ansicht-detail { min-height: 100vh; background: var(--hg-gruppiert); }
@media (min-width: 44rem) { body { background: var(--hg-gruppiert); } #ansicht-liste { background: var(--hg); min-height: 100vh; } }

main:focus { outline: none; }

/* ---------- Navigationsleiste ---------- */

.leiste { background: var(--leiste); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

.leiste--gross { padding: 0.5rem 1rem 0.25rem; padding-top: max(0.5rem, env(safe-area-inset-top)); }
.leiste__knoepfe { display: flex; justify-content: flex-end; min-height: 44px; }
.grosstitel { margin: 0.25rem 0 0.5rem; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.01em; }

.leiste--klein {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; padding-top: max(0.5rem, env(safe-area-inset-top));
  border-bottom: 0.5px solid var(--trenn);
}
.leiste__titel { margin: 0; grid-column: 2; text-align: center; font-size: 17px; font-weight: 600; line-height: 1.25; }
.leiste__titel:focus { outline: none; }
.leiste__titel:focus-visible { outline: 3px solid var(--akzent); }

/* runde Glasknöpfe wie in iOS 26 */
.glas {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--glas); border: 0.5px solid var(--glas-rand); box-shadow: var(--schatten);
  color: var(--akzent); cursor: pointer;
}
.glas .symbol { width: 24px; height: 24px; }
#zurueck { color: var(--text); }

/* ---------- Suchfeld (Ort oder PLZ) ---------- */

.suche { position: relative; margin: 0 0 0.5rem; }
.suche__lupe { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--platzhalter); pointer-events: none; }
.suche input {
  width: 100%; height: 40px; padding: 0 0.75rem 0 2rem;
  font: inherit; font-size: 17px; color: var(--text);
  background: var(--fuellung); border: 0; border-radius: 12px;
}
.suche input::placeholder { color: var(--platzhalter); }
.suche__hinweis { font-size: 15px; color: var(--text2); }
.suche__hinweis:not(:empty) { padding: 0 0 0.5rem; }
.suche__treffer { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.suche__treffer button { min-height: 44px; padding: 0; border: 0; background: none; color: var(--akzent); cursor: pointer; }

/* ---------- Chips der Fachabteilungen ---------- */

.chips {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; padding: 8px 1rem;
  overflow-x: auto; scroll-padding-inline: 1rem;
  background: var(--leiste); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--trenn);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (pointer: fine) { .chips { scrollbar-width: thin; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 36px; padding: 0 12px;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  background: var(--fuellung); color: var(--text);
  border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
}
.chip .symbol { width: 18px; height: 18px; }
.chip[aria-pressed="true"] { background: var(--akzent-flaeche); border-color: var(--akzent); color: var(--akzent); }
.chip:focus-visible { outline-offset: 1px; }

/* ---------- Hinweiszeilen oben in der Liste ---------- */

.hinweise { list-style: none; margin: 0; padding: 0; }
.hinweis {
  display: flex; align-items: flex-start; gap: 10px;
  margin-left: 1rem; padding: 11px 1rem 11px 0;
  font-size: 15px; color: var(--text2);
  border-bottom: 0.5px solid var(--trenn);
}
.hinweis .symbol { width: 18px; height: 18px; margin-top: 1px; }
.hinweis--warnung { color: var(--warn); }
.hinweis--knopf { padding: 0; }
.hinweis--knopf button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 1rem 0 0;
  border: 0; background: none; color: var(--akzent); font-size: 17px; text-align: left; cursor: pointer;
}
.hinweis--knopf .symbol { margin-top: 0; }

/* ---------- Klinikliste (wie HospitalRow) ---------- */

.liste { list-style: none; margin: 0; padding: 0; }

.zeile__link {
  display: flex; align-items: flex-start; gap: 12px;
  margin-left: 1rem; padding: 12px 1rem 12px 0;
  color: var(--text); border-bottom: 0.5px solid var(--trenn);
}
.zeile__link:active { background: var(--fuellung); }
.zeile__link:focus-visible { outline-offset: -2px; }
.zeile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.zeile__name { font-size: 17px; font-weight: 600; line-height: 22px; }
.zeile__adresse { font-size: 15px; line-height: 20px; color: var(--text2); }
.zeile__abt { font-size: 12px; line-height: 16px; color: var(--text2); }
.zeile__wege { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; padding-top: 2px; }
.zeile__strecke { font-size: 15px; font-weight: 700; color: var(--akzent); font-variant-numeric: tabular-nums; }
.zeile__klein { font-size: 11px; line-height: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.zeile__pfeil { align-self: center; width: 14px; height: 14px; color: #8e8e93; }

/* große Schrift: Entfernungen unter den Namen, wie in der App */
@media (max-width: 20rem) {
  .zeile__link { flex-wrap: wrap; }
  .zeile__wege { order: 2; flex-basis: 100%; align-items: flex-start; text-align: left; }
}

/* ---------- Leerzustand (wie ContentUnavailableView) ---------- */

.leer { padding: 3rem 1.5rem; text-align: center; }
.leer__symbol { width: 48px; height: 48px; color: var(--text2); }
.leer__titel { margin: 0.75rem 0 0.25rem; font-size: 22px; font-weight: 700; }
.leer__text { margin: 0 0 0.75rem; color: var(--text2); font-size: 15px; }
.textknopf { min-height: 44px; padding: 0 0.5rem; border: 0; background: none; color: var(--akzent); cursor: pointer; }

/* ---------- Karte ---------- */

.karte { padding-top: 8px; }
.segmente {
  display: flex; margin: 0 1rem 8px; padding: 2px; gap: 2px;
  background: var(--fuellung); border-radius: 9px;
}
.segmente button {
  flex: 1; min-height: 32px; border: 0; border-radius: 7px; background: transparent;
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.segmente [aria-pressed="true"] { background: var(--zelle); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); font-weight: 600; }
.karte__flaeche { height: min(68vh, 560px); background: var(--k-land); overflow: hidden; }
.karte__svg { display: block; width: 100%; height: 100%; }
.karte__fuss { margin: 6px 1rem 0; font-size: 11px; color: var(--text2); }
#karte-auswahl:focus { outline: none; }

.k-grund { fill: var(--k-land); }
.k-fluss { fill: none; stroke: var(--k-wasser); stroke-linecap: round; stroke-linejoin: round; }
.k-bundes { fill: none; stroke: var(--k-strasse-rand); stroke-linecap: round; stroke-linejoin: round; }
.k-autobahn { fill: none; stroke: var(--k-autobahn); stroke-linecap: round; stroke-linejoin: round; }
.k-ort { fill: var(--k-text); font-family: inherit; paint-order: stroke; stroke: var(--k-land); stroke-width: 0.25em; }
.k-ort--1 { font-weight: 600; }
.k-ortpunkt { fill: var(--k-text); }
.k-genau { fill: var(--akzent); fill-opacity: 0.15; }
.k-ich { fill: #0a84ff; stroke: #ffffff; }
.k-treffer { fill: transparent; }
.k-pin { fill: var(--akzent); stroke: #ffffff; }
.k-pin-symbol { color: #ffffff; fill: #ffffff; }
.k-zahl { fill: #ffffff; font-weight: 700; text-anchor: middle; font-family: inherit; }
.k-klinik { cursor: pointer; }
.k-klinik--gewaehlt .k-pin { stroke: var(--text); }
.k-klinik:focus-visible { outline: none; }
.k-klinik:focus-visible .k-treffer { stroke: var(--text); stroke-width: 3px; vector-effect: non-scaling-stroke; }

/* ---------- gruppierte Ansichten (Detail, Info) ---------- */

.gruppiert { padding: 0 1rem 2rem; background: var(--hg-gruppiert); }
.info { margin-top: 1.5rem; padding-top: 0.25rem; }

.abschnitt { margin: 1.5rem 1rem 0.5rem; font-size: 17px; font-weight: 600; color: var(--text2); }
.abschnitt--mit-knopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.abschnitt--mit-knopf h2 { margin: 0; font: inherit; }
.abschnitt--mit-knopf a { font-weight: 400; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

.gruppe { list-style: none; margin: 1.25rem 0 0; padding: 0; background: var(--zelle); border-radius: 24px; overflow: hidden; }
.abschnitt + .gruppe, .abschnitt--mit-knopf + .gruppe { margin-top: 0; }
.gruppe > li, .gruppe > div { position: relative; }
.gruppe > li + li::before, .gruppe > div + div::before {
  content: ""; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; border-top: 0.5px solid var(--trenn);
}
.gruppe--symbol > li + li::before { left: 3.75rem; }

.zelle { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 1.25rem; color: var(--text); }
.zelle--link { justify-content: space-between; }
.zelle__pfeil { width: 14px; height: 14px; color: #8e8e93; }
a.zelle:active, button.zelle:active { background: var(--fuellung); }
.zelle .symbol { width: 24px; height: 24px; color: var(--akzent); }
.zelle--aktion { color: var(--akzent); }
.zelle__beschriftung { flex: 1; min-width: 0; }
.zelle__wert { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }

.gruppe__fuss { margin: 0.5rem 1.25rem 0; font-size: 13px; line-height: 1.35; color: var(--text2); }
.gruppe__fuss a { text-decoration: underline; text-underline-offset: 0.15em; }

/* Beschriftung und Wert nebeneinander (LabeledContent) */
.werte { margin-top: 1.25rem; }
.werte > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 1.25rem; }
.werte dt { flex: none; }
.werte dd { margin: 0; text-align: right; color: var(--text2); font-variant-numeric: tabular-nums; }
@media (max-width: 22rem) { .werte > div { flex-direction: column; gap: 2px; } .werte dd { text-align: left; } }

/* kleine Karte oben im Detail */
.minikarte { position: relative; height: 180px; margin-top: 1rem; border-radius: 24px; overflow: hidden; background: var(--k-land); }
.minikarte svg { display: block; width: 100%; height: 100%; }
.m-gruen { fill: var(--k-gruen); }
.m-wasser { fill: var(--k-wasser); }
.m-klinik { fill: var(--k-klinik); }
.m-fluss { fill: none; stroke: var(--k-wasser); stroke-width: 4px; vector-effect: non-scaling-stroke; }
.m-rand, .m-linie { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-rand { stroke: var(--k-strasse-rand); }
.m-linie { stroke: var(--k-strasse); }
.m-rand--autobahn { stroke: var(--k-autobahn-rand); stroke-width: 8px; }
.m-linie--autobahn { stroke: var(--k-autobahn); stroke-width: 6px; }
.m-rand--gross { stroke-width: 7.5px; }
.m-linie--gross { stroke-width: 5.5px; }
.m-rand--mittel { stroke-width: 5px; }
.m-linie--mittel { stroke-width: 3.5px; }
.m-rand--klein { stroke-width: 3px; }
.m-linie--klein { stroke-width: 2px; }
.minikarte__pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--akzent); color: #fff;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.minikarte__pin .symbol { width: 20px; height: 20px; }
.minikarte__name {
  position: absolute; left: 50%; top: calc(50% + 6px); transform: translateX(-50%);
  max-width: 90%; font-size: 12px; font-weight: 600; color: var(--k-text); text-align: center;
  text-shadow: 0 0 3px var(--k-land), 0 0 3px var(--k-land), 0 0 3px var(--k-land);
}
.minikarte__quelle { position: absolute; left: 10px; bottom: 6px; font-size: 10px; color: var(--k-text); text-shadow: 0 0 3px var(--k-land), 0 0 3px var(--k-land); }

/* ---------- Textseiten (Impressum, Datenschutz, Haftung) ---------- */

.textseite { background: var(--hg-gruppiert); }
.text { max-width: 44rem; margin: 0 auto; padding: 0 1rem 3rem; }
.text .gruppe { padding: 0.5rem 1.25rem 1rem; }
.text h2 { font-size: 20px; margin: 1.25rem 0 0.5rem; }
.text p, .text li { font-size: 17px; line-height: 1.45; }
.text ul { padding-left: 1.25rem; }
.text address { font-style: normal; line-height: 1.45; }
.text .grosstitel { margin: 1rem 0 0.75rem; }
.fusslinks { display: flex; flex-wrap: wrap; gap: 0 1.25rem; padding-bottom: 2rem; font-size: 15px; }
.fusslinks a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.fusslinks [aria-current="page"] { color: var(--text2); }
.text a { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- ohne JavaScript ---------- */

.noscript { margin: 1rem; color: var(--text2); font-size: 15px; }
.statisch { padding: 0 1rem; }
.statisch h2 { font-size: 17px; color: var(--text2); margin: 1.5rem 0 0.25rem; }
.statisch ul { list-style: none; margin: 0; padding: 0; }
.statisch li { padding: 10px 0; border-bottom: 0.5px solid var(--trenn); font-size: 15px; }
.statisch a { text-decoration: underline; }
.mit-js .statisch, .mit-js noscript { display: none; }
html:not(.mit-js) .suche, html:not(.mit-js) .chips, html:not(.mit-js) .leiste__knoepfe { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
