/* -------------------------------------------------------------------------
   Personal-App - Gestaltung

   Helle, warme Farbwelt aus dem Logopack: Cremeweiss als Grund, Markenrot
   fuer alles, was man anfassen kann, Olivgruen fuer Zustimmung.
   Zuerst fuers Handy gebaut, ab 760px breiter Satz fuer den Schreibtisch.
   ------------------------------------------------------------------------- */

:root {
  /* Marke */
  --rot:        #d7322d;
  --rot-tief:   #b82723;
  --gruen:      #3c5a1e;
  --creme:      #fac878;

  /* Flaechen */
  --grund:      #fdf9f3;
  --karte:      #ffffff;
  --karte-hoch: #fbf4e9;   /* Eingabefelder, Kennzahlen - leicht abgesetzt */
  --rand:       #ebdfcc;
  --rand-stark: #ddcbb0;

  /* Schrift */
  --text:       #2b2419;
  --text-leise: #786853;

  /* Bedeutungen */
  --akzent:     var(--rot);
  --gut:        #4d7a2b;
  --warnung:    #ab7010;
  --fehler:     #c0362c;
  --info:       #2d6690;

  --radius:     16px;
  --schatten:   0 8px 24px rgba(122, 88, 40, .09), 0 2px 5px rgba(122, 88, 40, .05);
  --nav-hoehe:  62px;
}

* { box-sizing: border-box; }

/* Ein Element mit hidden bleibt unsichtbar - immer. Ohne diese Regel setzt
   jede spaetere display-Angabe das Attribut ausser Kraft, und man sucht den
   Fehler lange an der falschen Stelle. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--grund);
  background-image:
    radial-gradient(1200px 560px at 50% -10%, #fff6e7 0%, rgba(255,246,231,0) 60%),
    linear-gradient(180deg, #fdf9f3 0%, #f7eee1 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-hoehe) + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
}

/* --- Hintergrundbild der Anmeldeseite ---------------------------------
   Das Foto liegt hinter einem hellen Schleier. Ohne ihn waere die Schrift
   auf einem Bild mit hellen und dunklen Stellen nirgends verlaesslich
   lesbar - und lesbar muss sie sein, nicht huebsch. */
body.mit-bild {
  /* Der Koerper ist sonst nur so hoch wie sein Inhalt - das Bild endete
     dann mitten auf dem Bildschirm. dvh beruecksichtigt die ein- und
     ausfahrende Adressleiste auf dem Handy. */
  min-height: 100vh;
  min-height: 100dvh;
  background-image:
    linear-gradient(rgba(253, 249, 243, .86), rgba(250, 242, 230, .90)),
    var(--bild);
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
  background-repeat: no-repeat, no-repeat;
}
/* Die Karte hebt sich vom Bild ab, ohne es ganz zu verdecken. */
body.mit-bild .karte {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(3px);
  box-shadow: 0 12px 34px rgba(90, 60, 25, .16), 0 2px 6px rgba(90, 60, 25, .08);
}
body.mit-bild .logofeld {
  background: rgba(253, 249, 243, .72);
  border-radius: 16px;
  padding: 10px 18px;
  backdrop-filter: blur(2px);
}
/* Auf kleinen Geraeten kostet ein fest stehendes Bild Rechenzeit und ruckelt
   beim Scrollen - dort laeuft es einfach mit. */
@media (max-width: 760px) {
  body.mit-bild { background-attachment: scroll, scroll; }
}

/* --- Kopfzeile -------------------------------------------------------- */
header.oben {
  position: sticky; top: 0; z-index: 40;
  background: rgba(253, 249, 243, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rand);
  padding: calc(env(safe-area-inset-top) + 9px) 16px 9px;
  text-align: center; position: sticky;
}
/* Das Logo traegt die Marke, der Seitentitel steht klein darunter. */
.kopflogo { display: block; }
.kopflogo img { height: 36px; width: auto; display: block; margin: 0 auto; }
header.oben h1 {
  font-size: 13px; margin: 5px 0 0; font-weight: 650; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-leise);
}
.kopfkuerzel {
  position: absolute; right: 14px; top: calc(env(safe-area-inset-top) + 9px);
  width: 38px; height: 38px; border-radius: 11px;
  border: 1.5px solid var(--rand-stark); background: #fffdfa;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-leise);
  text-decoration: none;
}
.kopfkuerzel:hover { border-color: var(--rot); color: var(--rot); }

.inhalt { padding: 16px; max-width: 1180px; margin: 0 auto; }

/* --- Karten ----------------------------------------------------------- */
.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--schatten);
}
.karte > h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: .6px;
              text-transform: uppercase; color: var(--gruen); font-weight: 700; }
.karte > h2 .zahl { color: var(--rot); }
.karte.schmal { padding: 12px 14px; }

/* --- Kennzahlen ------------------------------------------------------- */
.kennzahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kennzahlen.vier { grid-template-columns: repeat(2, 1fr); }
.kennzahl {
  background: var(--karte-hoch); border-radius: 12px; padding: 12px;
  border: 1px solid var(--rand);
}
.kennzahl .wert { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums;
                  line-height: 1.1; }
.kennzahl .wert.klein { font-size: 19px; }
.kennzahl .name { font-size: 11.5px; color: var(--text-leise); margin-top: 3px;
                  text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.kennzahl.gold { background: #fff4e2; border-color: #f2ddb9; }
.kennzahl.gold .wert { color: var(--rot); }
.kennzahl.gut { background: #f0f6ea; border-color: #d6e6c6; }
.kennzahl.gut .wert { color: var(--gut); }
.kennzahl.warn { background: #fdf4e4; border-color: #f0dfba; }
.kennzahl.warn .wert { color: var(--warnung); }

/* --- Formulare -------------------------------------------------------- */
label { display: block; font-size: 13.5px; color: var(--text-leise); margin: 0 0 5px;
        font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 12px 13px; font-size: 16px;  /* 16px = iOS zoomt nicht */
  background: #fffdfa; color: var(--text);
  border: 1.5px solid var(--rand-stark); border-radius: 12px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px rgba(215, 50, 45, .14);
}
input::placeholder, textarea::placeholder { color: #8f7d64; }

/* Safari gibt Datums- und Uhrzeitfeldern eine eigene Mindestbreite und rechnet
   das native Innenpolster obendrauf - dann stehen sie am iPhone ueber den Rand
   der Karte hinaus. Das native Aussehen abschalten macht sie berechenbar. */
input[type=date], input[type=time], input[type=number], input[type=month] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
}
input[type=date]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value { text-align: left; }
/* Der Kalender- bzw. Uhrknopf soll nicht zusaetzlich Platz beanspruchen. */
input[type=date]::-webkit-calendar-picker-indicator { margin-left: 0; }
input[type=checkbox] { width: auto; margin-right: 8px; accent-color: var(--rot); }
textarea { min-height: 84px; resize: vertical; }
.feld { margin-bottom: 14px; }
.feld .hilfe { font-size: 12.5px; color: var(--text-leise); margin-top: 5px; line-height: 1.45; }
.feld.fehlerhaft input, .feld.fehlerhaft select, .feld.fehlerhaft textarea {
  border-color: var(--fehler); background: #fdf3f2;
}
.feld .feldfehler { font-size: 12.5px; color: var(--fehler); margin-top: 5px; font-weight: 600; }
.reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
         gap: 12px; }
.reihe.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset { border: none; padding: 0; margin: 0 0 22px; }
fieldset > legend { font-size: 13px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--gruen); font-weight: 700; padding: 0; margin-bottom: 12px;
  border-bottom: 2px solid var(--rand); width: 100%; padding-bottom: 7px; }

/* --- Schalter --------------------------------------------------------- */
.knopf, button, .knopf:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 17px; font-size: 15px; font-weight: 650; font-family: inherit;
  border-radius: 12px; border: 1.5px solid var(--rand-stark);
  background: #fffdfa; color: var(--text);
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.knopf:hover, button:hover { border-color: var(--rot); color: var(--rot); }
button:active, .knopf:active { transform: scale(.985); }
.knopf.haupt, button.haupt {
  background: var(--rot); color: #fff; border-color: var(--rot);
  box-shadow: 0 4px 14px rgba(215, 50, 45, .26);
}
.knopf.haupt:hover, button.haupt:hover { background: var(--rot-tief); color: #fff; }
.knopf.gut, button.gut {
  background: var(--gut); border-color: var(--gut); color: #fff;
  box-shadow: 0 4px 14px rgba(77, 122, 43, .24);
}
.knopf.gut:hover, button.gut:hover { color: #fff; border-color: var(--gut); }
.knopf.rot, button.rot { background: var(--fehler); border-color: var(--fehler); color: #fff; }
.knopf.rot:hover, button.rot:hover { color: #fff; }
.knopf.leise { background: transparent; color: var(--text-leise); border-color: var(--rand); }
/* Eine getroffene Auswahl - markiert, aber kein Handlungsaufruf. */
.knopf.gewaehlt { border-color: var(--gruen); color: var(--gruen); background: #f2f7ed;
                  border-width: 2px; }
.knopf.voll, button.voll { width: 100%; }
.knopf.klein, button.klein { padding: 8px 12px; font-size: 13.5px; border-radius: 10px; }
.knopfreihe { display: flex; gap: 9px; flex-wrap: wrap; }

/* --- Meldungen -------------------------------------------------------- */
.meldung {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14.5px;
  border: 1px solid; line-height: 1.5;
}
.meldung.gut     { background: #eff6e9; border-color: #cfe2bd; color: #38571c; }
.meldung.fehler  { background: #fdeceb; border-color: #f2c5c1; color: #96201c; }
.meldung.hinweis { background: #fdf3e0; border-color: #f0ddb6; color: #855e18; }
.meldung.info    { background: #eef4f9; border-color: #cbdeef; color: #2a5679; }

/* --- Tabellen --------------------------------------------------------- */
.tabellenrahmen { overflow-x: auto; -webkit-overflow-scrolling: touch;
                  margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 9px; text-align: left; border-bottom: 1px solid var(--rand);
         white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
     color: var(--text-leise); font-weight: 700; position: sticky; top: 0;
     background: var(--karte); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fffaf1; }
tfoot td { font-weight: 700; border-top: 2px solid var(--rand-stark); border-bottom: none;
           color: var(--rot); background: #fffaf1; }
tr.feiertag td { background: #fdf3e0; }
tr.sonntag td  { background: #f2f6fa; }

/* Am Handy zaehlt jeder Millimeter: enger setzen, damit die Statusspalte
   noch ins Bild passt und nicht weggescrollt werden muss. */
@media (max-width: 520px) {
  table { font-size: 13px; }
  th, td { padding: 9px 5px; }
  th { font-size: 10.5px; letter-spacing: .2px; }
  .marke { padding: 3px 7px; font-size: 11px; }
  .knopf.klein, button.klein { padding: 6px 9px; font-size: 12.5px; }
  /* Der Stift statt des Wortes - so bleibt die Zeile im Bild. */
  .knopf.stift { padding: 6px 8px; font-size: 15px; line-height: 1; }
}

/* --- Listeneintraege -------------------------------------------------- */
.eintrag {
  display: flex; align-items: center; gap: 12px; padding: 13px 0;
  border-bottom: 1px solid var(--rand); text-decoration: none; color: inherit;
}
.eintrag:last-child { border-bottom: none; }
.eintrag .haupttext { flex: 1; min-width: 0; }
.eintrag .titel { font-weight: 650; font-size: 15px; }
.eintrag .unter { font-size: 12.5px; color: var(--text-leise); margin-top: 2px; }
.eintrag .wert { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px;
                 color: var(--rot); }
.eintrag .pfeil { color: #9c8a72; font-size: 18px; }
a.eintrag:hover .titel { color: var(--rot); }

/* --- Reservierungen ---------------------------------------------------- */
.zeitspalte {
  flex: none; width: 84px; font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 14px; color: var(--rot);
  background: #fff4e2; border: 1px solid #f2ddb9; border-radius: 9px;
  padding: 7px 4px; text-align: center; line-height: 1.25;
}

/* --- Marken ----------------------------------------------------------- */
.marke {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  background: #f4ece0; color: var(--text-leise); border: 1px solid var(--rand);
}
.marke.gut     { background: #e8f2df; color: #3d6721; border-color: #cfe2bd; }
.marke.warn    { background: #fdf0d8; color: #8a5f12; border-color: #f0ddb6; }
.marke.rot     { background: #fce8e6; color: #a32a24; border-color: #f2c5c1; }
.marke.info    { background: #e9f1f8; color: #275a80; border-color: #cbdeef; }
.marke.gesperrt::before { content: "\1F512  "; }

/* --- Navigation unten ------------------------------------------------- */
nav.unten {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; background: rgba(255, 253, 249, .97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--rand);
  box-shadow: 0 -4px 18px rgba(122, 88, 40, .07);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.unten a {
  flex: 1; text-align: center; padding: 9px 2px 8px; text-decoration: none;
  color: var(--text-leise); font-size: 10px; font-weight: 600;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  -webkit-tap-highlight-color: transparent; position: relative;
}
nav.unten a.aktiv { color: var(--rot); }
nav.unten svg { width: 22px; height: 22px; stroke-width: 1.8; flex: none; }
nav.unten .punkt {
  position: absolute; top: 6px; right: 50%; margin-right: -18px;
  background: var(--rot); color: #fff; border-radius: 999px;
  font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px;
  font-weight: 700;
}

/* --- Jahreskalender --------------------------------------------------- */
.jahr { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
        gap: 14px; }
.monat { background: var(--karte); border: 1px solid var(--rand);
         border-radius: var(--radius); padding: 12px; box-shadow: var(--schatten); }
.monat h3 { margin: 0 0 9px; font-size: 14px; font-weight: 700; color: var(--gruen); }
/* minmax(0,...) statt 1fr: sonst erzwingt aspect-ratio unten eine
   Mindestbreite und das Raster laeuft aus der Monatskarte heraus. */
.raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.raster .kopf { font-size: 10px; color: #8f7d64; text-align: center;
                padding-bottom: 4px; font-weight: 700; }
.tag {
  aspect-ratio: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; border-radius: 7px; position: relative;
  font-variant-numeric: tabular-nums;
}
.tag.leer { visibility: hidden; }
.tag.wochenende { color: #8f7d64; }
.tag.feiertag { background: #fdeccd; color: #8a5f12; font-weight: 700; }
.tag.wunsch { background: #dceaf5; color: #25506f; }
.tag.genehmigt { background: var(--gut); color: #fff; font-weight: 700; }
.tag.eigen::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--rot);
}
.tag.heute { outline: 2px solid var(--rot); outline-offset: -2px; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px;
           color: var(--text-leise); margin-top: 10px; }
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* --- Rechner im Eintragsformular -------------------------------------- */
.rechner {
  background: #fff6e7; border: 1.5px dashed #e8cf9f;
  border-radius: 12px; padding: 13px; margin-bottom: 14px; font-size: 14px;
}
.rechner .gross { font-size: 27px; font-weight: 700; color: var(--rot);
                  font-variant-numeric: tabular-nums; line-height: 1.15; }
.rechner .aufteilung { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 9px;
                       font-size: 12.5px; color: var(--text-leise); }
.rechner .aufteilung b { color: var(--text); font-variant-numeric: tabular-nums; }
.rechner.still { opacity: .6; }

/* --- Verfuegbarkeitskalender ------------------------------------------ */
.raster.verfuegbar { gap: 4px; }
.vtag {
  aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; cursor: pointer; font-family: inherit;
  border: 1.5px solid #f0cdc9; background: #fdeeec;
  -webkit-tap-highlight-color: transparent;
}
.vtag .nr { font-size: 10px; color: var(--text-leise); line-height: 1;
            font-variant-numeric: tabular-nums; }
.vtag .zeichen { font-size: 14px; font-weight: 700; line-height: 1.1;
                 color: var(--fehler); letter-spacing: -.5px; }
/* Zugesagt: gruen. Ganztags kraeftig, einzelne Schichten heller. */
.vtag.ganztags { background: #e4f0d8; border-color: #b9d5a0; }
.vtag.ganztags .zeichen { color: #3d6721; font-size: 17px; }
.vtag.teils { background: #eef6e6; border-color: #cbe0b6; }
.vtag.teils .zeichen { color: #3d6721; font-size: 12.5px; }
.vtag.feiertag .nr { color: var(--warnung); font-weight: 700; }
.vtag.wochenende .nr { font-style: italic; }
.vtag.heute { outline: 2px solid var(--rot); outline-offset: -2px; }
.vtag.vergangen { opacity: .45; }
.vtag:active { transform: scale(.94); }

.legende .lz {
  width: 19px; height: 19px; border-radius: 5px; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.legende .lz.rot { background: #fdeeec; color: var(--fehler); border: 1px solid #f0cdc9; }
.legende .lz.gruen { background: #e4f0d8; color: #3d6721; border: 1px solid #b9d5a0; }

/* Die Auswahl, die beim Antippen eines Tages hochkommt. */
.tagwahl { position: fixed; inset: 0; z-index: 90; display: none;
           align-items: flex-end; justify-content: center; }
.tagwahl.offen { display: flex; }
.tagwahl-flaeche { position: absolute; inset: 0; background: rgba(40, 30, 15, .45); }
.tagwahl-feld {
  position: relative; width: 100%; max-width: 430px;
  background: var(--karte); border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 34px rgba(60, 40, 15, .3);
  animation: hoch .18s ease-out;
}
@keyframes hoch { from { transform: translateY(14px); opacity: .6; } }
.tagwahl-kopf { font-weight: 700; font-size: 16px; margin-bottom: 12px;
                text-align: center; color: var(--gruen); }
.wahl {
  width: 100%; margin-bottom: 8px; justify-content: flex-start; gap: 12px;
  font-size: 15px; padding: 13px 15px;
}
.wahl b { display: inline-flex; align-items: center; justify-content: center;
          width: 26px; height: 26px; border-radius: 7px; font-size: 14px; flex: none; }
/* Alle Auswahlknoepfe sind schlicht - nur das Zeichen traegt die Farbe.
   Ein vollflaechig roter Knopf wirkt wie eine Warnung, dabei ist "nicht
   verfuegbar" der Normalfall. */
.wahl.gruen, .wahl.rot {
  background: #fffdfa; color: var(--text); border-color: var(--rand-stark);
  box-shadow: none;
}
.wahl.gruen:hover, .wahl.rot:hover { border-color: var(--gruen); color: var(--text); }
.wahl.gruen b { background: #e4f0d8; color: #3d6721; }
.wahl.rot b { background: #fdeeec; color: var(--fehler); }
.wahl.aktiv { border-color: var(--gruen); background: #f4f9ef; }
.wahl.schliessen { justify-content: center; color: var(--text-leise); margin-top: 4px; }

@media (min-width: 620px) {
  .tagwahl { align-items: center; }
  .tagwahl-feld { border-radius: 18px; padding-bottom: 16px; }
}

/* --- Gespraechsfaden -------------------------------------------------- */
.verlauf { display: flex; flex-direction: column; gap: 10px; max-height: 62vh;
           overflow-y: auto; padding: 2px; }
.blase {
  max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px;
  line-height: 1.5; border: 1px solid var(--rand); position: relative;
}
.blase .text { white-space: pre-wrap; word-break: break-word; }
.blase .zeit { font-size: 11px; color: var(--text-leise); margin-top: 5px; }
.blase .bezug {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  font-weight: 700; color: var(--gruen); margin-bottom: 4px;
}
/* Eigene Nachrichten rechts und in Hausfarbe, fremde links und hell. */
.blase.eigen {
  align-self: flex-end; background: #fdece9; border-color: #f4cec8;
  border-bottom-right-radius: 5px;
}
.blase.eigen .bezug { color: var(--rot); }
.blase.fremd {
  align-self: flex-start; background: var(--karte-hoch);
  border-bottom-left-radius: 5px;
}
.verlauf .leer { padding: 22px 12px; }

/* --- Logo ------------------------------------------------------------- */
.logo { width: min(250px, 66vw); height: auto; display: block; margin: 0 auto; }
.logofeld { display: inline-block; }
.gruss { font-size: 15px; color: var(--text-leise); margin: 16px 0 0; }
.gruss b { color: var(--gruen); font-weight: 700; }

/* --- Verschiedenes ---------------------------------------------------- */
.leise { color: var(--text-leise); font-size: 13.5px; }
.mini  { font-size: 12px; color: var(--text-leise); }
.zentriert { text-align: center; }
.blaettern { display: flex; align-items: center; justify-content: space-between;
             gap: 10px; margin-bottom: 14px; }
.blaettern .titel { font-weight: 700; font-size: 16px; }
.leer { text-align: center; padding: 34px 16px; color: var(--text-leise); }
.leer .zeichen { font-size: 40px; opacity: .5; display: block; margin-bottom: 10px; }
details.aufklapp { border: 1px solid var(--rand); border-radius: 12px; padding: 12px;
                   margin-bottom: 10px; background: var(--karte-hoch); }
details.aufklapp summary { cursor: pointer; font-weight: 650; font-size: 14.5px;
                           list-style: none; color: var(--gruen); }
details.aufklapp summary::-webkit-details-marker { display: none; }
details.aufklapp summary::before { content: "\25B8"; color: var(--rot);
  display: inline-block; width: 1.1em; }
details.aufklapp[open] summary::before { content: "\25BE"; }
details.aufklapp > *:not(summary) { margin-top: 12px; }
a { color: var(--gruen); text-underline-offset: 2px; }
a:hover { color: var(--rot); }
hr { border: none; border-top: 1px solid var(--rand); margin: 18px 0; }
code { background: var(--karte-hoch); padding: 2px 6px; border-radius: 5px;
       font-size: .92em; border: 1px solid var(--rand); }
.fortschritt { height: 8px; background: #f0e5d4; border-radius: 999px;
               overflow: hidden; margin-top: 8px; }
.fortschritt i { display: block; height: 100%; background: var(--rot); }

/* --- Breiter Bildschirm ----------------------------------------------- */
@media (min-width: 760px) {
  .kennzahlen, .kennzahlen.vier { grid-template-columns: repeat(4, 1fr); }
  .inhalt { padding: 22px; }
  .tabellenrahmen { margin: 0; padding: 0; }
  body { padding-bottom: 20px; }
  /* Am Schreibtisch bleibt die Navigation oben kleben, die Kopfzeile
     scrollt mit - sonst laegen beide uebereinander. */
  header.oben { position: static; padding-top: 16px; padding-bottom: 12px; }
  .kopflogo img { height: 42px; }
  .kopfkuerzel { top: 16px; }
  nav.unten {
    position: sticky; top: 0; bottom: auto; border-top: none;
    border-bottom: 1px solid var(--rand); max-width: 1180px; margin: 0 auto;
    box-shadow: 0 4px 18px rgba(122, 88, 40, .07);
  }
  nav.unten a { flex-direction: row; font-size: 13.5px; padding: 12px 8px; }
  nav.unten svg { width: 18px; height: 18px; }
  nav.unten .punkt { position: static; margin: 0; }
}

@media print {
  nav.unten, header.oben, .knopfreihe, .blaettern { display: none; }
  body { background: #fff; color: #000; padding: 0; }
  .karte { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  th { background: #eee; color: #000; }
}
