/* Adlerhorst – Farben aus dem Abzeichen Infanterie 11: Feldgrün, Sand, Adlerbraun */
:root {
  --feld: #0f2018;
  --flaeche: #16301f;
  --flaeche2: #1d3b28;
  --linie: #2b4a36;
  --gruen: #2e8b4a;
  --gruen-dunkel: #1f7a3a;
  --sand: #e8d9a8;
  --sand-hell: #f4ead0;
  --braun: #7a4a2a;
  --text: #eef2e6;
  --text2: #a9b8a6;
  --text3: #7d8f7d;
  --rot: #e0634f;
  --gelb: #e8c547;
  --blau: #6aa6d8;
  --karte-text: #13261a;
  --schatten: 0 10px 30px rgba(0, 0, 0, 0.35);
  --r-gross: 20px;
  --r: 14px;
  --r-klein: 10px;
  --nav-h: 62px;
  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  --schrift: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --lese: ui-serif, 'New York', 'Iowan Old Style', Georgia, 'Noto Serif', serif;
  color-scheme: dark;
}
:root[data-theme='hell'] {
  --feld: #efead8;
  --flaeche: #fffdf6;
  --flaeche2: #f5efdc;
  --linie: #d9cfae;
  --gruen: #1f7a3a;
  --gruen-dunkel: #17602d;
  --sand: #7a4a2a;
  --sand-hell: #fbf5e3;
  --text: #13261a;
  --text2: #4b5d4c;
  --text3: #6f7f6e;
  --schatten: 0 8px 24px rgba(40, 50, 30, 0.15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  background: var(--feld);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: var(--sand); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
[hidden] { display: none !important; }
.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Gerüst ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--sicher-oben) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--feld) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--linie) 60%, transparent);
}
.kopf .logo { width: 26px; height: auto; display: block; }
.kopf h1 { font-size: 17px; font-weight: 700; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf .zurueck { border: 0; background: none; padding: 6px 8px 6px 0; margin-left: -4px; color: var(--sand); display: flex; align-items: center; cursor: pointer; }
.kopf .rechts { display: flex; gap: 6px; align-items: center; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--braun); color: var(--sand-hell); font-weight: 700; font-size: 13px; text-decoration: none;
}

main#app {
  max-width: 680px; margin: 0 auto; overflow-x: clip;
  padding: 16px 16px calc(var(--nav-h) + var(--sicher-unten) + 28px);
  min-height: 70vh;
}
.ohne-nav main#app { padding-bottom: calc(var(--sicher-unten) + 28px); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--sicher-unten)); padding-bottom: var(--sicher-unten);
  background: color-mix(in srgb, var(--flaeche) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--linie);
}
.nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text3); text-decoration: none; font-size: 11px; font-weight: 600;
}
.nav a svg { width: 24px; height: 24px; }
.nav a.aktiv { color: var(--sand); }
.nav a.aktiv::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--sand); }
.nav .punkt { position: absolute; top: 8px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--rot); border: 2px solid var(--flaeche); }
.ohne-nav .nav { display: none; }

.fuss { text-align: center; color: var(--text3); font-size: 12px; margin: 32px 0 0; }

/* ---------- Typografie ---------- */
h2 { font-size: 22px; line-height: 1.2; margin: 26px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 18px 0 8px; }
h2:first-child, h3:first-child { margin-top: 0; }
.leise { color: var(--text2); }
.klein { font-size: 14px; }
.winzig { font-size: 12px; }
.zahl { font-variant-numeric: tabular-nums; }
p { margin: 0 0 10px; }

/* ---------- Bausteine ---------- */
.block {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross);
  padding: 16px; margin-bottom: 14px;
}
.block.flach { background: transparent; border-style: dashed; }
.block > h3:first-child { margin-top: 0; }
.reihe { display: flex; gap: 10px; align-items: center; }
.reihe.zwischen { justify-content: space-between; }
.reihe.umbruch { flex-wrap: wrap; }
.spalte { display: flex; flex-direction: column; gap: 10px; }
.raster2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.raster2 > *, .reihe > .wachsen, .reihe > input, .reihe > select { min-width: 0; }
.reihe > .btn, .reihe > .chip { flex-shrink: 0; }
.wachsen { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid transparent; background: var(--gruen); color: #fff;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.sand { background: var(--sand); color: var(--karte-text); }
:root[data-theme='hell'] .btn.sand { color: #fff; }
.btn.leer { background: transparent; border-color: var(--linie); color: var(--text); }
.btn.gefahr { background: transparent; border-color: var(--rot); color: var(--rot); }
.btn.klein { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-klein); }
.btn.breit { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.ikon-btn { border: 0; background: none; color: var(--text2); padding: 8px; border-radius: 10px; cursor: pointer; display: inline-grid; place-items: center; }
.ikon-btn svg { width: 22px; height: 22px; }

label.feld { display: block; margin-bottom: 12px; }
label.feld > span { display: block; font-size: 14px; color: var(--text2); margin-bottom: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font-size: 16px; /* 16px verhindert Zoom auf dem iPhone */
  background: var(--flaeche2); border: 1px solid var(--linie); border-radius: var(--r-klein); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sand) 25%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--gruen); flex: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--flaeche2); color: var(--text2); border: 1px solid var(--linie); }
.chip.gruen { background: color-mix(in srgb, var(--gruen) 22%, transparent); color: #8fd6a4; border-color: transparent; }
.chip.gelb { background: color-mix(in srgb, var(--gelb) 18%, transparent); color: var(--gelb); border-color: transparent; }
.chip.rot { background: color-mix(in srgb, var(--rot) 18%, transparent); color: var(--rot); border-color: transparent; }
:root[data-theme='hell'] .chip.gruen { color: var(--gruen-dunkel); }
:root[data-theme='hell'] .chip.gelb { color: #8a6a00; }

.segment { display: flex; background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 12px; padding: 3px; gap: 3px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.segment::-webkit-scrollbar { display: none; }
.segment button { flex: 1 0 auto; border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text2); cursor: pointer; white-space: nowrap; }
.segment button.aktiv { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

.liste { list-style: none; margin: 0; padding: 0; }
.zeile {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--linie);
  color: inherit; text-decoration: none;
}
.liste > li:last-child .zeile, .liste > .zeile:last-child { border-bottom: 0; }
.zeile .titel { font-weight: 600; }
.zeile .pfeil { color: var(--text3); flex: none; }
.zeile.klickbar { cursor: pointer; }

.balken { height: 8px; border-radius: 99px; background: var(--flaeche2); overflow: hidden; }
.balken > i { display: block; height: 100%; border-radius: 99px; background: var(--gruen); transition: width 0.6s ease; }
.balken.sand > i { background: var(--sand); }

.leerstelle { text-align: center; padding: 28px 12px; color: var(--text2); }
.leerstelle svg { width: 40px; height: 40px; color: var(--text3); margin-bottom: 6px; }

.meldung { padding: 12px 14px; border-radius: var(--r); background: var(--flaeche2); border-left: 4px solid var(--sand); margin-bottom: 14px; font-size: 15px; }
.meldung.fehler { border-left-color: var(--rot); }
.meldung.ok { border-left-color: var(--gruen); }

/* ---------- Home: Schild-Countdown (das eine auffällige Element) ---------- */
.schild-feld { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.schild { position: relative; width: 132px; }
.schild svg { width: 100%; height: auto; display: block; overflow: visible; }
.schild .fuellung { transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.schild .inhalt { position: absolute; inset: 22% 0 18%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--sand-hell); pointer-events: none; }
.schild .inhalt b { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.schild .inhalt span { font-size: 12px; font-weight: 600; opacity: 0.9; margin-top: 2px; }
.schild-text h2 { margin: 0 0 4px; font-size: 24px; }
.schild-text p { margin: 0; color: var(--text2); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .schild .fuellung, .balken > i { transition: none; } }

.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 12px; text-decoration: none; color: inherit; }
.kachel b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kachel span { font-size: 13px; color: var(--text2); }
.kachel.dringend b { color: var(--gelb); }

.lern-start { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-gross); background: var(--gruen-dunkel); color: #fff; text-decoration: none; margin-bottom: 14px; box-shadow: var(--schatten); }
.lern-start b { font-size: 18px; display: block; }
.lern-start span { opacity: 0.85; font-size: 14px; }
.lern-start svg { width: 34px; height: 34px; flex: none; }

/* ---------- Karteikarte ---------- */
.lernkopf { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lernkopf .balken { flex: 1; }
.buehne { perspective: 1400px; margin-bottom: 16px; }
.karte {
  position: relative; min-height: 290px; border-radius: 16px; color: var(--karte-text);
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1); cursor: pointer;
}
.karte.umgedreht { transform: rotateY(180deg); }
.karte .seite {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; padding: 22px 20px 20px; display: flex; flex-direction: column;
  background-color: var(--sand-hell);
  background-image: linear-gradient(to bottom, transparent 54px, #d9534f55 54px, #d9534f55 56px, transparent 56px),
    repeating-linear-gradient(to bottom, transparent 0 31px, #7aa0c233 31px 32px);
  box-shadow: var(--schatten);
}
.karte .rueck { transform: rotateY(180deg); background-color: #fffaf0; }
.karte .art { font-size: 13px; font-weight: 600; color: #6b5a3a; height: 30px; }
.karte .frage { font-size: 21px; font-weight: 700; line-height: 32px; flex: 1; display: flex; align-items: center; }
.karte .antwort { font-size: 19px; line-height: 32px; flex: 1; display: flex; align-items: center; font-family: var(--lese); }
.karte .tipp { font-size: 13px; color: #6b5a3a; text-align: center; }
.karte img { max-height: 180px; object-fit: contain; margin: 0 auto 10px; display: block; border-radius: 8px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .karte { transition: none; } }

.aufgabe { background: var(--sand-hell); color: var(--karte-text); border-radius: 16px; padding: 22px 18px; box-shadow: var(--schatten); margin-bottom: 16px; }
.aufgabe .art { font-size: 13px; font-weight: 600; color: #6b5a3a; margin-bottom: 8px; }
.aufgabe .frage { font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.aufgabe img { max-height: 200px; object-fit: contain; display: block; margin: 0 auto 12px; border-radius: 8px; background: #fff; }
.luecke-text { font-family: var(--lese); font-size: 20px; line-height: 2.1; }
.luecke-text input {
  display: inline-block; width: auto; min-height: 0; height: 34px; padding: 0 6px; margin: 0 2px;
  font-family: var(--schrift); font-size: 17px; font-weight: 600; color: var(--karte-text);
  background: #fff; border: 0; border-bottom: 2px solid #9c8a5e; border-radius: 6px 6px 0 0; vertical-align: baseline;
}
.luecke-text input:focus { box-shadow: none; border-bottom-color: var(--gruen-dunkel); background: #f1f8f1; }
.luecke-text input.richtig { border-bottom-color: var(--gruen-dunkel); background: #e1f3e4; }
.luecke-text input.falsch { border-bottom-color: #c0392b; background: #fbe4e1; }
.freitext input { background: #fff; color: var(--karte-text); border-color: #cdbf95; }
.optionen { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.optionen button {
  text-align: left; padding: 14px 16px; border-radius: 12px; border: 2px solid #d8caa0; background: #fff; color: var(--karte-text);
  font-size: 17px; font-weight: 600; cursor: pointer; line-height: 1.35; -webkit-tap-highlight-color: transparent;
}
.optionen button.gewaehlt { border-color: var(--gruen-dunkel); background: #eef7ef; }
.optionen button.richtig { border-color: var(--gruen-dunkel); background: #d5efda; }
.optionen button.falsch { border-color: #c0392b; background: #fbe4e1; }
.bewertung { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bewertung button { min-height: 54px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.bewertung button small { font-weight: 500; color: var(--text3); font-size: 11px; }
.bewertung .b0 { border-color: var(--rot); color: var(--rot); }
.bewertung .b3 { border-color: var(--gruen); color: #8fd6a4; }
:root[data-theme='hell'] .bewertung .b3 { color: var(--gruen-dunkel); }
.rueckmeldung { border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; font-weight: 600; animation: auf 0.25s ease; }
.rueckmeldung.richtig { background: color-mix(in srgb, var(--gruen) 25%, var(--flaeche)); border-left: 4px solid var(--gruen); }
.rueckmeldung.falsch { background: color-mix(in srgb, var(--rot) 16%, var(--flaeche)); border-left: 4px solid var(--rot); }
.rueckmeldung .loesung { font-weight: 400; margin-top: 4px; font-family: var(--lese); }
@keyframes auf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.xp-blitz { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 34px; font-weight: 800; color: var(--sand); pointer-events: none; animation: xp 0.9s ease forwards; z-index: 60; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
@keyframes xp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(0.8); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -120%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .xp-blitz { display: none; } }

.thema-karte { display: block; text-decoration: none; color: inherit; }
.thema-karte .reihe { margin-top: 10px; }
.modi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* ---------- Rangliste ---------- */
.podest { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 10px 0 4px; }
.podest > div { text-align: center; }
.podest .stufe { border-radius: 12px 12px 4px 4px; background: var(--flaeche2); border: 1px solid var(--linie); padding: 10px 4px; }
.podest .p1 .stufe { background: color-mix(in srgb, var(--sand) 30%, var(--flaeche)); min-height: 92px; }
.podest .p2 .stufe { min-height: 72px; }
.podest .p3 .stufe { min-height: 58px; }
.podest .name { font-weight: 700; font-size: 14px; line-height: 1.2; word-break: break-word; }
.podest .xp { font-size: 12px; color: var(--text2); }
.podest .platz { font-size: 22px; font-weight: 800; color: var(--sand); }
.zugliste .zeile .rang { width: 28px; text-align: center; font-weight: 800; color: var(--sand); font-variant-numeric: tabular-nums; }

/* ---------- Chat ---------- */
.chat-seite { display: flex; flex-direction: column; height: calc(100dvh - 60px - var(--sicher-oben) - var(--nav-h) - var(--sicher-unten)); margin: -16px -16px 0; }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.blase { max-width: 82%; padding: 8px 12px; border-radius: 16px; background: var(--flaeche); border: 1px solid var(--linie); align-self: flex-start; overflow-wrap: anywhere; }
.blase .txt { white-space: pre-wrap; }
.blase.eigen { align-self: flex-end; background: var(--gruen-dunkel); border-color: transparent; color: #fff; }
.blase.kader { border-color: color-mix(in srgb, var(--sand) 55%, transparent); }
.blase .wer { font-size: 12px; font-weight: 700; color: var(--sand); margin-bottom: 1px; }
.blase .zeit { font-size: 11px; opacity: 0.6; margin-left: 8px; float: right; margin-top: 6px; }
.blase.geloescht { font-style: italic; opacity: 0.6; }
.tag-trenner { align-self: center; font-size: 12px; color: var(--text3); background: var(--flaeche2); border-radius: 99px; padding: 2px 10px; margin: 8px 0; }
.chat-eingabe { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--linie); background: var(--feld); align-items: flex-end; }
.chat-eingabe textarea { min-height: 44px; max-height: 120px; height: 44px; resize: none; border-radius: 22px; padding: 10px 16px; }
.chat-eingabe .btn { border-radius: 50%; width: 44px; min-height: 44px; padding: 0; flex: none; }
.stumm-band { padding: 8px 14px; background: color-mix(in srgb, var(--gelb) 16%, var(--feld)); color: var(--gelb); font-size: 14px; display: flex; gap: 8px; align-items: center; }

/* ---------- Verpflegung ---------- */
.tage-leiste { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.tage-leiste::-webkit-scrollbar { display: none; }
.tage-leiste button { flex: 1 0 44px; width: auto; padding: 8px 0; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text2); cursor: pointer; font-weight: 600; font-size: 13px; line-height: 1.2; }
.tage-leiste button b { display: block; font-size: 18px; color: var(--text); }
.tage-leiste button.aktiv { background: var(--sand); color: var(--karte-text); border-color: var(--sand); }
.tage-leiste button.aktiv b { color: var(--karte-text); }
.tage-leiste button.heute:not(.aktiv) { border-color: var(--sand); }
.mahlzeit h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.mahlzeit ul { margin: 0; padding-left: 18px; }
.mahlzeit li { margin: 2px 0; }
.mahlzeit .haupt { font-weight: 600; }
.veggie { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

/* ---------- Kalender ---------- */
.termin { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.termin:last-child { border-bottom: 0; }
.termin .zeit { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--sand); font-size: 15px; line-height: 1.25; }
.termin .zeit small { display: block; color: var(--text3); font-weight: 500; }
.termin.jetzt { background: color-mix(in srgb, var(--gruen) 14%, transparent); border-radius: 10px; padding-left: 6px; margin-left: -6px; }

/* ---------- Reglemente ---------- */
.regl-kat h3 { display: flex; align-items: center; gap: 8px; }
.regl-kat h3 svg { width: 20px; height: 20px; color: var(--sand); }
.regl-dok { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: inherit; }
.regl-dok:last-child { border-bottom: 0; }
.regl-dok .buchruecken { width: 44px; height: 58px; border-radius: 4px 8px 8px 4px; background: linear-gradient(90deg, var(--braun) 0 6px, var(--gruen-dunkel) 6px); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 2px 2px 8px; color: var(--sand-hell); text-align: center; line-height: 1.1; box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.08); }
.regl-dok .buchruecken b { font-size: 17px; }
.regl-dok .buchruecken small { font-size: 9px; font-weight: 600; opacity: 0.85; }
.leser { font-family: var(--lese); font-size: 18px; line-height: 1.65; }
.leser p { margin: 0 0 14px; }
.leser p.ueberschrift { font-family: var(--schrift); font-weight: 700; font-size: 18px; color: var(--sand); margin-top: 24px; }
.leser mark { color: inherit; border-radius: 3px; padding: 1px 0; }
.leser mark.gelb { background: rgba(232, 197, 71, 0.38); }
.leser mark.gruen { background: rgba(46, 139, 74, 0.42); }
.leser mark.blau { background: rgba(106, 166, 216, 0.4); }
.leser mark.rot { background: rgba(224, 99, 79, 0.4); }
.leser mark.notiz { border-bottom: 2px dotted var(--sand); }
.leser .treffer { background: rgba(232, 217, 168, 0.55); color: var(--karte-text); }
.seiten-nav { position: sticky; bottom: calc(var(--nav-h) + var(--sicher-unten) + 8px); display: flex; gap: 8px; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--flaeche) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--linie); border-radius: 16px; padding: 6px; margin-top: 18px; z-index: 5; }
.seiten-nav .zahl { font-weight: 700; font-size: 14px; }
.markier-leiste { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sicher-unten) + 70px); z-index: 40; display: flex; gap: 6px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; padding: 6px; box-shadow: var(--schatten); }
.farbe { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--linie); cursor: pointer; }
.farbe.gelb { background: #e8c547; } .farbe.gruen { background: #2e8b4a; } .farbe.blau { background: #6aa6d8; } .farbe.rot { background: #e0634f; }
.seitenbild { width: 100%; border-radius: 8px; background: #fff; }
.toc a { display: block; padding: 8px 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--linie); font-size: 15px; }
.toc a.e2 { padding-left: 14px; font-size: 14px; color: var(--text2); }
.toc a.e3, .toc a.e4 { padding-left: 28px; font-size: 13px; color: var(--text3); }
.toc a span { float: right; color: var(--text3); font-variant-numeric: tabular-nums; }
.suchtreffer { display: block; padding: 10px 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: inherit; font-size: 14px; }
.suchtreffer b.hl { background: rgba(232, 217, 168, 0.35); color: var(--text); font-weight: 600; border-radius: 3px; }

/* ---------- Tabellen (Kader, Admin) ---------- */
.tabelle-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.tabelle { border-collapse: collapse; width: 100%; font-size: 14px; }
table.tabelle th, table.tabelle td { padding: 8px 6px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; white-space: nowrap; }
table.tabelle th { color: var(--text2); font-weight: 600; font-size: 13px; position: sticky; top: 0; background: var(--feld); }
table.tabelle td.p { text-align: center; font-variant-numeric: tabular-nums; }
.hitze { display: inline-block; min-width: 38px; padding: 2px 4px; border-radius: 6px; font-weight: 700; font-size: 12px; text-align: center; }
.plan-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.plan-zeile .voll { grid-column: 1 / -1; }
.plan-zeile input, .plan-zeile select { min-height: 40px; padding: 6px 8px; font-size: 16px; }

/* ---------- Overlays ---------- */
.toast-bereich { position: fixed; top: calc(var(--sicher-oben) + 10px); left: 0; right: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 520px; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); border-radius: 14px; padding: 11px 16px; box-shadow: var(--schatten); font-weight: 600; font-size: 15px; animation: auf 0.2s ease; }
.toast.fehler { border-color: var(--rot); }
.toast.ok { border-color: var(--gruen); }
.blatt-hinter { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: einblenden 0.2s ease; }
.blatt { width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto; background: var(--flaeche); border-radius: 22px 22px 0 0; padding: 10px 18px calc(var(--sicher-unten) + 18px); border-top: 1px solid var(--linie); animation: hoch 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.blatt .griff { width: 40px; height: 5px; border-radius: 99px; background: var(--linie); margin: 0 auto 14px; }
@media (min-width: 700px) { .blatt-hinter { align-items: center; } .blatt { border-radius: 22px; } }
@keyframes einblenden { from { opacity: 0; } }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } }

.laden { display: grid; place-items: center; padding: 40px; color: var(--text3); }
.laden::after { content: ''; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--sand); animation: drehen 0.8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Anmelden ---------- */
.eingang { max-width: 420px; margin: 0 auto; padding-top: 4vh; }
.eingang .marke { text-align: center; margin-bottom: 22px; }
.eingang .marke img { width: 96px; height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45)); }
.eingang .marke h1 { font-size: 30px; margin: 10px 0 2px; letter-spacing: -0.02em; }
.eingang .marke p { color: var(--text2); margin: 0; }

.install { display: flex; gap: 12px; align-items: flex-start; }
.install svg { flex: none; width: 26px; height: 26px; color: var(--sand); }
.schritte { margin: 8px 0 0; padding-left: 20px; }
.schritte li { margin: 4px 0; }

.mehr-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mehr-raster a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r); background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; text-align: center; }
.mehr-raster a svg { width: 26px; height: 26px; color: var(--sand); }

.wetter-jetzt { display: flex; align-items: center; gap: 14px; }
.wetter-jetzt .icon { font-size: 44px; line-height: 1; }
.wetter-jetzt b { font-size: 40px; font-weight: 800; line-height: 1; }
.stunden { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.stunden > div { flex: none; text-align: center; font-size: 13px; color: var(--text2); min-width: 42px; }
.stunden > div b { display: block; color: var(--text); font-size: 15px; }

@media (min-width: 700px) {
  .kacheln { grid-template-columns: repeat(3, 1fr); }
  .chat-seite { height: calc(100dvh - 120px); }
}
.raster2 > .btn, .modi > .btn { padding: 0 10px; }
