/* Standort -- eigenes Design (Schrift und Farben wie Wohnungssuche), ohne CSS-Framework. Handy zuerst. */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 300 900; font-display: block;
  src: url('../fonts/nunito-latin.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 300 900; font-display: block;
  src: url('../fonts/nunito-latin-ext.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }

:root {
  --bg: #f8f5ef; --karte: rgba(255, 255, 255, .92); --flaeche: #fff;
  --text: #283043; --text2: #5d6577; --text3: #9aa0ad;
  --micha: #3f6f73; --rebecca: #d9775c; --gruen: #6aa58c; --gold: #c99a3a; --fehler: #b8452f;
  --linie: rgba(40, 48, 67, .08);
  --schatten: 0 14px 34px -18px rgba(40, 48, 67, .5), 0 2px 6px -2px rgba(40, 48, 67, .1);
  color-scheme: light;
}
[data-bs-theme="dark"] {
  --bg: #151a22; --karte: rgba(28, 34, 44, .94); --flaeche: #1d2430;
  --text: #eef0f4; --text2: #b8bfcc; --text3: #7d8594;
  --micha: #6fb0b3; --rebecca: #e98b6f; --gruen: #7fbfa3; --gold: #e5b95c; --fehler: #f08a70;
  --linie: rgba(255, 255, 255, .07);
  --schatten: 0 18px 40px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* kein graues Aufblitzen beim Antippen; Platz für die Bildlaufleiste immer frei (wie alle Apps) */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif; font-size: 16px; line-height: 1.4; }
a { color: var(--micha); }
button { font: inherit; color: inherit; }
.leise { color: var(--text2); }
small { display: block; color: var(--text2); font-size: 13px; }

/* --- Kopf der Personen (Kreis mit Anfangsbuchstabe) ------------------------------- */
.kopf { width: 44px; height: 44px; border-radius: 50%; color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 18px; flex: none; background: var(--micha); }
.kopf.micha { background: var(--micha); } .kopf.rebecca { background: var(--rebecca); }
.kopf.gruen { background: var(--gruen); } .kopf.gold { background: var(--gold); }
.kopf.klein { width: 32px; height: 32px; font-size: 14px; }

/* --- Kartenseite ------------------------------------------------------------------ */
.kartenseite { overflow: hidden; }
.vollkarte { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
[data-bs-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10px; }
.oben { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 500;
  display: flex; gap: 8px; align-items: center; pointer-events: none; }
.oben > * { pointer-events: auto; }
.pille { background: var(--karte); box-shadow: var(--schatten); border-radius: 999px; padding: 10px 16px; font-weight: 800;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text); text-decoration: none; }
.pille.marke i { margin-right: 4px; }
.pille.stand { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--text2); padding: 8px 14px; }
.pille.stand:empty { display: none; }
.tage { margin-left: auto; display: flex; align-items: center; gap: 2px; padding: 4px; }
.tage[hidden] { display: none; }
.tage button { border: 0; background: none; color: var(--text2); font-size: 18px; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; }
.tage button:disabled { opacity: .3; cursor: default; }
.tage span { min-width: 74px; text-align: center; }

.blatt { position: fixed; left: 0; right: 0; bottom: 0; z-index: 500; background: var(--karte);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 24px 24px 0 0; box-shadow: var(--schatten);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 58vh; overflow: auto; overscroll-behavior: contain; }
@media (min-width: 720px) { .blatt { left: 16px; right: auto; bottom: 16px; width: 380px; border-radius: 24px; max-height: calc(100vh - 100px); } }
.griff { width: 40px; height: 5px; border-radius: 3px; background: var(--text3); opacity: .5; margin: 0 auto 10px; }
@media (min-width: 720px) { .griff { display: none; } }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 16px; width: 100%;
  border: 0; background: none; text-align: left; cursor: pointer; }
.person.aktiv { background: var(--linie); }
.person .text { min-width: 0; }
.person b { display: block; font-size: 17px; }
.person .ort { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.person .zeit { margin-left: auto; text-align: right; color: var(--text3); font-size: 13px; flex: none; }
.person.veraltet .zeit { color: var(--fehler); }
.person .zeit .gemeldet { display: block; font-size: 15px; font-weight: 800; color: var(--text2); }
.person.veraltet .zeit .gemeldet { color: var(--fehler); }
.trenner { height: 1px; background: var(--linie); margin: 10px 0; }
h3 { margin: 6px 4px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.regler { padding: 4px 4px 0; }
.regler input { width: 100%; accent-color: var(--micha); }
.regler .skala { display: flex; justify-content: space-between; font-size: 12px; color: var(--text3); }
.regler #schieber-zeit { font-weight: 800; color: var(--text); }
.halt { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 8px 4px; width: 100%;
  border: 0; background: none; text-align: left; cursor: pointer; border-radius: 12px; }
.halt > i { color: var(--micha); font-size: 16px; margin-top: 2px; }
.halt .ort { display: block; font-weight: 700; }
.halt .von { display: block; color: var(--text2); font-size: 13px; }
.halt .dauer { color: var(--text3); font-size: 13px; }
.weg { color: var(--text3); font-size: 13px; padding: 0 4px 0 36px; }
.punkt { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); background: var(--micha); }
.punkt.rebecca { background: var(--rebecca); } .punkt.gruen { background: var(--gruen); } .punkt.gold { background: var(--gold); }
.marke { display: flex; justify-content: center; }
.marke .kopf { width: 38px; height: 38px; font-size: 16px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }

/* --- Normale Seiten (Anmelden, Einstellungen) --------------------------------------- */
.seite { max-width: 640px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 32px; }
.karte { background: var(--flaeche); border-radius: 20px; box-shadow: var(--schatten); padding: 16px 18px; margin-bottom: 16px; }
.karte h2 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); }
.seitenkopf { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.seitenkopf h1 { margin: 0; font-size: 26px; font-weight: 900; }
.zurueck { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text);
  background: var(--flaeche); box-shadow: var(--schatten); text-decoration: none; font-size: 18px; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.zeile:last-of-type { border-bottom: 0; }
.zeile > i { color: var(--micha); width: 32px; text-align: center; }
.zeile .rechts { margin-left: auto; text-align: right; font-size: 14px; }
.zeile small { word-break: break-all; }
.fehler-text { color: var(--fehler) !important; }
.fuss { text-align: center; color: var(--text3); font-size: 13px; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 12px 18px; background: var(--micha); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; }
.knopf.leise { background: var(--linie); color: var(--text); }
.knopf.breit { width: 100%; }
.mitte { min-height: 80vh; display: grid; place-items: center; }
.anmelde-karte { width: 100%; max-width: 380px; text-align: center; padding: 28px 24px; }
.anmelde-karte h1 { font-size: 1.8rem; font-weight: 900; margin: 0 0 4px; }
.anmelde-bild { width: 84px; height: 84px; display: block; margin: 6px auto 10px; }
.anmelde-form { text-align: left; display: grid; gap: 6px; margin-top: 8px; }
.anmelde-form label { font-weight: 700; font-size: 14px; margin-top: 6px; }
.anmelde-form input { font: inherit; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--linie);
  background: var(--bg); color: var(--text); }
.anmelde-form button { margin-top: 12px; }
.trenner-text { color: var(--text3); font-size: 13px; margin: 16px 0 4px; }
.meldung { padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; background: var(--linie); }
.meldung.fehler { color: var(--fehler); }
