/* Grundgerüst des Portals. Farben, Schriften und Rundungen kommen aus designs.css
   (je nach gewähltem Design über <html data-design="…">). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--schrift, 16px);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-titel); line-height: 1.2; margin: 0; font-weight: var(--titel-gewicht, 700); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); font-family: var(--font); }
a { color: var(--link, var(--akzent)); }
small { color: var(--text2); }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 8px;
  height: 60px; padding: 0 12px 0 16px;
  background: var(--kopf-bg); color: var(--kopf-text);
  border-bottom: var(--kopf-linie, none);
  box-shadow: var(--kopf-schatten, none);
}
.marke { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; min-width: 0; }
.marke svg { width: 34px; height: 34px; flex: none; }
.marke span { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.marke b { font-family: var(--font-titel); font-size: 1.05rem; white-space: nowrap; }
.marke small { color: inherit; opacity: .7; font-size: .72rem; }
.kopf nav.haupt { display: none; }
.kopf .symbol { color: inherit; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
  display: inline-grid; place-items: center;
  background: var(--avatar-bg, var(--akzent)); color: var(--avatar-text, var(--akzent-text));
  font: 700 .85rem var(--font); cursor: pointer;
}
.avatar.gross { width: 52px; height: 52px; font-size: 1rem; }

/* ---------- Untere Navigation (Handy) ---------- */
nav.unten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: flex; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg); border-top: 1px solid var(--linie);
}
nav.unten a, nav.unten button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text2); text-decoration: none; font: 600 .72rem var(--font);
  background: none; border: 0; cursor: pointer;
}
nav.unten svg.i { width: 26px; height: 26px; }
nav.unten .aktiv { color: var(--nav-aktiv, var(--akzent)); }

/* ---------- Inhalt ---------- */
.inhalt { max-width: 1180px; margin: 0 auto; padding: 16px 16px 96px; }
.seiten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }

.kachel {
  background: var(--flaeche); border: var(--kachel-rand, 1px solid var(--linie));
  border-radius: var(--radius); box-shadow: var(--schatten, none);
  padding: 16px; margin-bottom: 14px;
}
.kachel-kopf { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.kachel-kopf a { font-weight: 600; text-decoration: none; font-size: .9rem; }

/* ---------- Schaltflächen ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-knopf, var(--radius)); border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text);
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer;
}
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf.gefahr { color: var(--gefahr); border-color: color-mix(in srgb, var(--gefahr) 40%, transparent); }
.knopf.gefahr.voll { background: var(--gefahr); color: #fff; }
.knopf.breit { width: 100%; }
.knopf.gross { min-height: 64px; font-size: 1.02rem; }
.knopf.klein { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.knopf:active { transform: translateY(1px); }
.symbol {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent;
  display: inline-grid; place-items: center; color: var(--text); cursor: pointer; flex: none;
}
.symbol:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.rund {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.25);
  display: grid; place-items: center; cursor: pointer;
}
.rund.an { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }

/* ---------- Formulare ---------- */
.feld { display: block; margin-bottom: 14px; }
.feld > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--eingabe-bg, var(--flaeche)); border: 1px solid var(--eingabe-rand, var(--linie));
  border-radius: var(--radius-klein, 8px);
}
.feld input, .feld select, .feld textarea { width: 100%; min-height: 50px; padding: 10px 14px; font-size: 1rem; }
.feld textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.haken { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 10px; cursor: pointer; }
.haken input { width: 22px; height: 22px; accent-color: var(--akzent); }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* ---------- Kleinteile ---------- */
.abzeichen {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--f, var(--akzent)) 18%, transparent); color: var(--f-text, var(--f, var(--akzent)));
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); font: 600 .95rem var(--font); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.hinweis { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--text2); margin: 0 0 14px; }
.hinweis svg.i { width: 18px; height: 18px; margin-top: 2px; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--linie); }
.liste li:first-child { border-top: 0; }
.liste li > div { flex: 1; min-width: 0; }
.liste b { display: block; font-weight: 600; }
.liste small { display: block; }
.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--f); flex: none; }
.anzahl { font-weight: 700; font-size: 1.1rem; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 3000;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 99px;
  font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: calc(100% - 32px);
}

/* ---------- Blatt von unten („Mehr“-Menü) ---------- */
.blatt-hg { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.blatt {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: var(--flaeche); color: var(--text);
  border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
}
.griff { width: 44px; height: 5px; border-radius: 9px; background: var(--linie); margin: 6px auto 12px; cursor: pointer; }
.konto-kopf { display: flex; align-items: center; gap: 14px; padding: 6px 4px 14px; border-bottom: 1px solid var(--linie); }
.konto-kopf div { flex: 1; }
.konto-kopf small { display: block; }
.menue a { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 6px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--linie); }
.menue a:last-child { border-bottom: 0; }
.menue a svg.i { color: var(--text2); }

/* ---------- Startseite ---------- */
.gruss { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 6px 0 16px; flex-wrap: wrap; }
.gruss p { margin: 0 0 2px; color: var(--text2); font-size: .9rem; }
.sonne { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text2); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 99px; padding: 6px 12px; }
.sonne svg.i { width: 18px; height: 18px; color: var(--akzent2); }
.schnell { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.schnell .knopf { flex-direction: column; gap: 4px; padding: 10px; text-align: center; font-size: .95rem; }
.schnell .knopf svg.i { width: 26px; height: 26px; }
.zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.zahl { background: var(--flaeche); border: var(--kachel-rand, 1px solid var(--linie)); border-radius: var(--radius); box-shadow: var(--schatten, none); padding: 12px; }
.zahl b { display: block; font-family: var(--font-titel); font-size: 1.8rem; line-height: 1; color: var(--zahl-farbe, var(--akzent)); }
.zahl span { display: block; font-size: .75rem; color: var(--text2); margin-top: 6px; line-height: 1.25; }
.streifen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.streifen a { position: relative; display: block; aspect-ratio: 4/3; border-radius: var(--radius-klein, 8px); overflow: hidden; }
.streifen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.streifen span { position: absolute; left: 4px; bottom: 4px; font-size: .65rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.kam-status li .abzeichen { margin-left: auto; }

/* ---------- Revierkarte ---------- */
body[data-seite="karte"] { overflow: hidden; }
.karte-seite { position: fixed; top: 60px; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); }
#karte { position: absolute; inset: 0; background: var(--flaeche2); }
.leaflet-tile-pane { filter: var(--karte-filter, none); }
.karte-knoepfe { position: absolute; top: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.ebenen-menue {
  position: absolute; top: 12px; right: 74px; z-index: 600; width: 260px;
  background: var(--flaeche); color: var(--text); border-radius: var(--radius); padding: 14px 16px 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.ebenen-menue h3 { margin: 4px 0 6px; }
.ebenen-menue label { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; }
.ebenen-menue input { width: 20px; height: 20px; accent-color: var(--akzent); }
.zeichen-leiste {
  position: absolute; top: 12px; left: 12px; right: 76px; z-index: 500;
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
}
.zeichen-leiste .knopf { white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.25); min-height: 44px; }
.karte-hinweis {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 600;
  background: var(--akzent); color: var(--akzent-text); padding: 10px 16px; border-radius: 99px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 700;
  height: 52%; display: flex; flex-direction: column;
  background: var(--flaeche); color: var(--text);
  border-radius: 20px 20px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.28);
  transition: height .25s ease;
}
.panel.gross { height: 88%; }
.panel.zu { height: 0; overflow: hidden; }
.panel .griff { margin: 8px auto 4px; }
.panel-kopf { display: flex; align-items: center; gap: 10px; padding: 0 8px 8px 16px; }
.panel-kopf > div { flex: 1; min-width: 0; }
.panel-kopf h2 { font-size: 1.25rem; }
.farbfleck { width: 16px; height: 16px; border-radius: 5px; background: var(--f); flex: none; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--linie); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  flex: 1 0 auto; min-height: 46px; padding: 0 10px; border: 0; background: none; color: var(--text2);
  font: 600 .9rem var(--font); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs button span { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 99px; background: var(--flaeche2); color: var(--text2); font-size: .72rem; margin-left: 2px; }
.tabs button[aria-selected="true"] { color: var(--akzent); border-bottom-color: var(--akzent); }
.panel-inhalt { flex: 1; overflow: auto; padding: 4px 16px 16px; }
.panel-fuss { padding: 10px 16px; border-top: 1px solid var(--linie); }
.eintrag { padding: 12px 0; border-bottom: 1px solid var(--linie); }
.eintrag:last-child { border-bottom: 0; }
.eintrag-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.eintrag-kopf b { font-weight: 700; }
.eintrag p { margin: 4px 0; }
.eintrag .wer { font-size: .78rem; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.eintrag .fotos { display: flex; gap: 6px; margin-top: 6px; }
.eintrag .fotos img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.leer { color: var(--text2); text-align: center; padding: 24px 8px; }
.seg-beschreibung { color: var(--text2); font-size: .9rem; margin: 10px 0 2px; }

.mk { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.mk svg.i { width: 18px; height: 18px; }
.mk-hochsitz { background: #7a4b22; }
.mk-kamera { background: #2c6fb0; border-radius: 9px; }
.mk-futter { background: #4f7a28; }
.mk-schaden { background: #c4372b; border-radius: 6px; transform: rotate(45deg); }
.mk-schaden svg.i { transform: rotate(-45deg); }
.mk-strecke { background: #222; }
.mk-ich { width: 20px; height: 20px; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(26,115,232,.25); }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--flaeche); color: var(--text); }
.leaflet-popup-content a { font-weight: 700; }
.seg-label { background: none; border: 0; box-shadow: none; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); font-size: 12px; }
.seg-label::before { display: none; }

/* ---------- Galerie ---------- */
.filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px 10px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.filter select { min-height: 44px; padding: 0 12px; flex: none; font-weight: 600; font-size: .92rem; border-radius: 99px; }
.segmentiert { display: inline-flex; flex: none; border: 1px solid var(--linie); border-radius: 99px; overflow: hidden; background: var(--flaeche); }
.segmentiert button { min-height: 42px; padding: 0 12px; border: 0; background: none; color: var(--text); font: 600 .9rem var(--font); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.segmentiert button svg.i { width: 16px; height: 16px; }
.segmentiert button[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); }
.tag-kopf { font: 700 .85rem var(--font); color: var(--text2); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.kachel-bild { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-klein, 8px); background: var(--flaeche2); }
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel-bild .oben { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.kachel-bild .oben span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; }
.kachel-bild .oben span.stern { color: #ffc93c; }
.kachel-bild .oben svg.i { width: 15px; height: 15px; }
.kachel-bild .unten { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: .74rem; display: flex; justify-content: space-between; gap: 6px; }
.kachel-bild .unten b { font-weight: 700; }
.kachel-bild .wahl { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.3); display: none; place-items: center; color: #fff; }
.auswahl-modus .kachel-bild .wahl { display: grid; }
.kachel-bild.gewaehlt { outline: 4px solid var(--akzent); outline-offset: -4px; }
.kachel-bild.gewaehlt .wahl { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.laden { text-align: center; color: var(--text2); padding: 20px; font-size: .9rem; }
.auswahl-leiste {
  position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 950;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  background: var(--text); color: var(--bg); border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.auswahl-leiste span { flex: 1; font-weight: 700; }
.auswahl-leiste .knopf { min-height: 44px; padding: 0 12px; }

/* ---------- Bild-Detail ---------- */
.bild-buehne {
  position: relative; background: #000; aspect-ratio: 4 / 3; max-height: 70vh; width: 100%;
  display: grid; place-items: center; overflow: hidden; touch-action: pan-y;
}
.bild-buehne img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s, opacity .2s; user-select: none; -webkit-user-drag: none; }
.bild-buehne .pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
.bild-buehne .pfeil.links { left: 6px; }
.bild-buehne .pfeil.rechts { right: 6px; }
.bild-buehne .zurueck { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; color: #fff; text-decoration: none; background: rgba(0,0,0,.5); border-radius: 99px; padding: 8px 14px 8px 8px; font-weight: 600; }
.bild-buehne .zaehler { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(0,0,0,.5); padding: 3px 10px; border-radius: 99px; font-size: .8rem; }
.wisch-tipp { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .78rem; }
.bild-info { padding: 16px 16px 100px; max-width: 760px; }
.bild-info section { margin-top: 20px; }
.bild-info h2 { margin-bottom: 10px; }
.bild-info .meta p { margin: 4px 0 12px; color: var(--text2); }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.aktionen .knopf { flex: 1 1 auto; }
.knopf.stern-an { background: #ffc93c; border-color: #ffc93c; color: #3a2a00; }
.kommentare { list-style: none; margin: 0 0 10px; padding: 0; }
.kommentare li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.kommentare small { display: block; }
.komm-form { display: flex; gap: 8px; }
.komm-form input { flex: 1; min-height: 50px; padding: 0 14px; min-width: 0; }
.klein-info { font-size: .82rem; color: var(--text2); border-top: 1px solid var(--linie); padding-top: 12px; }

/* ---------- Benutzer ---------- */
.suche { width: 100%; min-height: 50px; padding: 0 16px; margin-bottom: 10px; }
.benutzer-liste { list-style: none; margin: 0; padding: 0; }
.benutzer-liste > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.benutzer-liste > li:first-child { border-top: 0; }
.benutzer-liste .avatar { background: var(--av, var(--akzent)); color: #fff; cursor: default; }
.benutzer-liste .wer { flex: 1; min-width: 0; }
.benutzer-liste .wer b { display: block; }
.benutzer-liste .wer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benutzer-liste .status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.benutzer-liste .aktionen-menue { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 4px 52px; }
.benutzer-liste .aktionen-menue select { min-height: 44px; padding: 0 10px; }
.gesperrt .wer { opacity: .55; }
.rechte { width: 100%; border-collapse: collapse; font-size: .85rem; }
.rechte th, .rechte td { padding: 8px 6px; border-bottom: 1px solid var(--linie); text-align: center; }
.rechte th:first-child, .rechte td:first-child { text-align: left; }
.rechte th { font-size: .75rem; color: var(--text2); font-weight: 700; }
.rechte .ja { color: var(--ok); font-weight: 700; }
.rechte .nein { color: var(--text2); opacity: .5; }
.tabelle-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.protokoll { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.protokoll li { padding: 9px 0; border-top: 1px solid var(--linie); }
.protokoll li:first-child { border-top: 0; }
.protokoll time { display: block; font-size: .78rem; color: var(--text2); }

/* ---------- Login ---------- */
body[data-seite="login"] { min-height: 100vh; background: var(--login-bg, var(--bg)); }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-karte {
  width: 100%; max-width: 420px; background: var(--flaeche); color: var(--text);
  border-radius: calc(var(--radius) * 1.6); padding: 28px 22px; box-shadow: var(--login-schatten, 0 20px 60px rgba(0,0,0,.25));
  border: var(--kachel-rand, 0);
}
.login-marke { text-align: center; margin-bottom: 22px; }
.login-marke svg { width: 64px; height: 64px; }
.login-marke h1 { margin-top: 10px; font-size: 1.6rem; }
.login-marke p { margin: 4px 0 0; color: var(--text2); }
.pw { display: flex; gap: 0; position: relative; }
.pw input { padding-right: 52px !important; }
.pw .symbol { position: absolute; right: 3px; top: 3px; }
.login .link { display: block; text-align: center; margin-top: 16px; font-weight: 600; min-height: 44px; line-height: 44px; }
.login-hinweis { text-align: center; color: var(--text2); font-size: .85rem; margin: 18px 0 0; }
.login-fuss { margin-top: 18px; font-size: .85rem; color: var(--login-fuss, var(--text2)); }
.login-fuss a { color: inherit; }
.code-feld input { text-align: center; letter-spacing: .5em; font-size: 1.5rem !important; font-weight: 700; }
.meldung { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--text); border-radius: var(--radius-klein, 8px); padding: 12px 14px; margin-bottom: 14px; font-size: .92rem; }
.meldung.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); }

/* ---------- Rotlicht (nur dunkle Variante) ---------- */
.rotlicht-filter { position: fixed; inset: 0; z-index: 5000; pointer-events: none; background: #ff2a00; mix-blend-mode: multiply; display: none; }
html.rotlicht .rotlicht-filter { display: block; }
html.rotlicht body { filter: none; }

/* ====================== Tablet / Desktop ====================== */
@media (min-width: 900px) {
  nav.unten { display: none; }
  .kopf { height: 64px; padding: 0 20px 0 24px; gap: 14px; }
  .marke { margin-right: 18px; }
  .kopf nav.haupt { display: flex; gap: 4px; margin-right: auto; }
  .kopf nav.haupt a { color: inherit; text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-knopf, 8px); opacity: .8; }
  .kopf nav.haupt a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
  .kopf nav.haupt a.aktiv { opacity: 1; background: var(--nav-desk-aktiv-bg, color-mix(in srgb, currentColor 12%, transparent)); color: var(--nav-desk-aktiv, inherit); }
  .inhalt { padding: 28px 28px 60px; }
  h1 { font-size: 1.9rem; }
  .schnell { grid-template-columns: repeat(4, 1fr); }
  .streifen { grid-template-columns: repeat(4, 1fr); }
  .zahlen { gap: 14px; }
  .zahl { padding: 18px; }
  .zahl b { font-size: 2.4rem; }
  .zahl span { font-size: .85rem; }
  .spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .spalten .kachel { margin: 0; }
  .spalten .breit-2 { grid-column: span 2; }
  .blatt-hg { align-items: flex-start; justify-content: flex-end; background: rgba(0,0,0,.2); }
  .blatt { margin: 70px 16px 0 0; border-radius: var(--radius); max-width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
  .blatt .griff { display: none; }

  .karte-seite { top: 64px; bottom: 0; }
  .panel, .panel.gross { left: auto; top: 0; width: 410px; height: auto; border-radius: 0; box-shadow: -6px 0 30px rgba(0,0,0,.18); }
  .panel .griff { display: none; }
  .panel-kopf { padding-top: 16px; }
  .panel.zu { width: 0; }
  .karte-seite #karte { right: 410px; }
  .karte-seite.ohne-panel #karte { right: 0; }
  .karte-knoepfe { right: 426px; }
  .ohne-panel .karte-knoepfe { right: 16px; }
  .ebenen-menue { right: 490px; }
  .ohne-panel .ebenen-menue { right: 80px; }
  .zeichen-leiste { right: auto; }

  .filter { margin: 0 0 10px; padding: 0 0 6px; flex-wrap: wrap; }
  .raster { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
  .auswahl-leiste { left: 50%; right: auto; transform: translateX(-50%); bottom: 24px; min-width: 520px; }

  body[data-seite="bild"] main { display: grid; grid-template-columns: 1fr 400px; height: calc(100vh - 64px); }
  .bild-buehne { height: 100%; aspect-ratio: auto; max-height: none; }
  .bild-info { overflow: auto; padding: 24px; border-left: 1px solid var(--linie); }
  .wisch-tipp { display: none; }

  .benutzer-raster { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
  .tabelle-scroll { margin: 0; padding: 0; }
  .toast { bottom: 28px; }
  .login-karte { padding: 36px 34px; }
}

/* ====================== Ergänzungen für das echte Portal ====================== */
html:not([data-design="dunkel"]) .nur-dunkel { display: none !important; }
.visuell-versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Meldungen */
.meldungen { list-style: none; margin: 0 0 14px; padding: 0; }
.meldungen li { padding: 12px 14px; border-radius: var(--radius-klein, 8px); margin-bottom: 8px; font-weight: 600;
  background: color-mix(in srgb, var(--ok) 16%, var(--flaeche)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.meldungen li.error { background: color-mix(in srgb, var(--gefahr) 14%, var(--flaeche)); border-color: color-mix(in srgb, var(--gefahr) 40%, transparent); }
.meldungen li.warning { background: color-mix(in srgb, var(--warn) 16%, var(--flaeche)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.meldungen li.info { background: var(--flaeche2); border-color: var(--linie); }

/* Formularfehler */
.fehler, .errorlist { color: var(--gefahr); font-size: .88rem; font-weight: 600; margin: 6px 0 0; padding: 0; list-style: none; }
.feld .hilfe { display: block; font-size: .82rem; color: var(--text2); margin-top: 4px; }
.feld.hat-fehler input, .feld.hat-fehler select { border-color: var(--gefahr); }
.formular-fehler { margin-bottom: 14px; }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopf-reihe .knopf { flex: 1 1 auto; }
button.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: var(--link, var(--akzent)); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Navigation: noch nicht gebaute Bereiche */
.bald-marke { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 99px;
  background: color-mix(in srgb, currentColor 15%, transparent); margin-left: 6px; vertical-align: 2px; }
.menue form { margin: 0; }
.menue button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 6px; color: var(--text);
  background: none; border: 0; font: 600 1rem var(--font); cursor: pointer; text-align: left; }
.menue button svg.i { color: var(--text2); }
.menue .bald-marke { margin-left: auto; }

/* Design-Wahl im Benutzermenü und in „Mein Konto“ */
.design-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; }
.design-wahl button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; min-height: 76px;
  border: 2px solid var(--linie); border-radius: var(--radius-klein, 8px); background: var(--flaeche); color: var(--text);
  font: 600 .8rem var(--font); cursor: pointer;
}
.design-wahl button[aria-pressed="true"] { border-color: var(--akzent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--akzent) 30%, transparent); }
.design-muster { display: flex; width: 54px; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.2); }
.design-muster i { flex: 1; }
.menue-titel { font: 700 .75rem var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--text2); margin: 14px 6px 0; }

/* Startseite: kommende Bereiche */
.bereiche { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 14px; }
.bereich { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; color: var(--text); margin: 0; }
.bereich > svg.i { width: 34px; height: 34px; color: var(--akzent); flex: none; }
.bereich b { display: block; font-size: 1.05rem; }
.bereich small { display: block; }
.bereich .abzeichen { margin-left: auto; }

/* Benutzerverwaltung */
.link-box { display: flex; gap: 8px; margin-top: 10px; }
.link-box input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; font-size: .85rem; }
.benutzer-liste form { display: contents; }
.aktionen-menue form { display: flex; gap: 8px; flex-wrap: wrap; }

/* Mein Konto */
.konto-abschnitt { margin-bottom: 14px; }
.konto-abschnitt h2 { margin-bottom: 12px; }
.qr { background: #fff; border-radius: 10px; padding: 6px; display: inline-block; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.geheim { font-family: Consolas, monospace; font-size: 1rem; letter-spacing: .05em; word-break: break-all; background: var(--flaeche2); padding: 8px 10px; border-radius: 8px; }
.schritte { padding-left: 20px; margin: 0 0 14px; }
.schritte li { margin-bottom: 8px; }

/* Textseiten */
.textseite { white-space: pre-line; max-width: 70ch; }

/* Einfache Seiten (Login usw.): Fuß mit Links */
.login-karte h2 { margin-bottom: 8px; }
.login-karte p { color: var(--text2); }

@media (min-width: 900px) {
  .bereiche { grid-template-columns: repeat(3, 1fr); }
  .konto-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .konto-raster .kachel { margin: 0 0 14px; }
}
