:root {
  --bg: #f6f2ea;
  --flaeche: #ffffff;
  --text: #1c2331;
  --leise: #5d6676;
  --linie: #e4ddd0;
  --marke: #1f4e79;
  --marke-hell: #dbe7f3;
  --akzent: #e2692f;
  --akzent-hell: #fbe2d4;
  --gruen: #2f8f5b;
  --we: #ece7dd;
  --ferien: #3aa06b;
  --radius: 14px;
  --schatten: 0 1px 2px rgba(28,35,49,.06), 0 6px 20px rgba(28,35,49,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c; --flaeche: #1a202a; --text: #e9ecf1; --leise: #9aa4b4; --linie: #2b3340;
    --marke: #7fb0e0; --marke-hell: #1f3550; --akzent: #f08a55; --akzent-hell: #4a2a1b;
    --gruen: #5cc28a; --we: #232a35; --ferien: #4fbf85; --schatten: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--marke); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: .2em 0 .4em; }
h2 { font-size: 1.3rem; margin: 0 0 .7em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.leise { color: var(--leise); font-size: .92em; }
.akzent { color: var(--akzent); }

/* Kopf & Fuß */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.kopf-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.logo svg { width: 28px; height: 28px; color: var(--akzent); }
.kopf nav { display: flex; gap: 18px; }
.kopf nav a { text-decoration: none; font-weight: 600; color: var(--text); }
.kopf nav a:hover { color: var(--marke); }
.nav-raetsel::before { content: "● "; color: var(--akzent); }
.fuss { margin-top: 48px; border-top: 1px solid var(--linie); padding: 24px 0; color: var(--leise); font-size: .9rem; }
.fuss-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fuss a { color: var(--leise); margin-left: 12px; }

/* Bausteine */
.hero { padding: 48px 0 28px; }
.hero.klein { padding: 32px 0 12px; }
.hero > p { max-width: 640px; font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem !important; color: var(--akzent); font-weight: 700; margin: 0; }
.eyebrow a { color: inherit; text-decoration: none; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; margin: 18px 0; box-shadow: var(--schatten); }
button, .knopf {
  display: inline-block; background: var(--akzent); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .knopf:hover { filter: brightness(1.07); }
.knopf.zweit { background: var(--marke-hell); color: var(--marke); }
input, select {
  font: inherit; color: var(--text); background: var(--flaeche); border: 1.5px solid var(--linie);
  border-radius: 10px; padding: 11px 12px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--marke); outline-offset: 1px; }

.startform { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.startform select[name=bl] { flex: 1 1 220px; }
.startform input { width: 90px; }

.zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.kachel { text-decoration: none; color: var(--text); transition: transform .15s; margin: 0; }
.kachel:hover { transform: translateY(-2px); }
.kachel-icon { font-size: 2rem; }
.kachel h2 { margin-top: 8px; }
.laender-links a, .querlinks a { display: inline-block; margin: 0 12px 6px 0; }

.laenderliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.land { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.land:hover { border-color: var(--marke); }
.land span { color: var(--leise); font-size: .9rem; }

/* Planer */
.planer { border-color: var(--marke); }
.planer-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.planer-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.planer-form input { width: 110px; }
.kennzahlen { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.kennzahlen > div { display: flex; flex-direction: column; }
.kennzahlen .zahl { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.kennzahlen.klein .zahl { font-size: 1.6rem; }
.kennzahlen span:not(.zahl) { color: var(--leise); font-size: .85rem; }
.kennzahlen .pfeil { font-size: 1.6rem; color: var(--leise); }
.hinweis { background: var(--marke-hell); border-radius: 10px; padding: 10px 14px; }
.planliste { padding-left: 1.3em; }
.planliste li { margin: 8px 0; }
.planliste li span { display: block; color: var(--leise); font-size: .92rem; }

/* Kalender */
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 14px; }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legende .ft::before { background: var(--akzent); }
.legende .ut::before { background: var(--marke); }
.legende .frei::before { background: var(--marke-hell); }
.legende .we::before { background: var(--we); }
.kalender { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 22px; }
.monat h3 { font-size: .95rem; margin: 0 0 6px; }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: .78rem; text-align: center; }
.mgrid span { padding: 4px 0; border-radius: 5px; }
.mgrid .wk { color: var(--leise); font-weight: 600; }
.mgrid .we { background: var(--we); }
.mgrid .frei { background: var(--marke-hell); }
.mgrid .ft { background: var(--akzent); color: #fff; font-weight: 700; }
.mgrid .ut { background: var(--marke); color: #fff; font-weight: 700; }

/* Tabellen & Listen */
.tabelle-wrap { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; min-width: 520px; }
.tabelle th, .tabelle td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); }
.quote { font-weight: 700; color: var(--marke); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chips li { background: var(--akzent-hell); border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
.feiertagsliste { list-style: none; padding: 0; margin: 0 0 12px; columns: 2 260px; }
.feiertagsliste li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--linie); break-inside: avoid; }
.faq details { border-bottom: 1px solid var(--linie); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.raetsel-teaser { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--akzent-hell); border-color: transparent; }
.raetsel-teaser h2 { margin-bottom: 4px; }
.raetsel-teaser p { margin: 0; max-width: 560px; }

/* Rätsel */
.spiel { max-width: 560px; margin: 0 auto; padding-top: 24px; }
.spiel-kopf { text-align: center; }
.spiel-kopf h1 { margin-bottom: .1em; }
.hinweise { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.hinweise span { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; padding: 5px 12px; font-size: .88rem; }
.hinweise .zu { color: var(--leise); border-style: dashed; }
.tipp-form { display: flex; gap: 8px; }
.tipp-form input { flex: 1; font-size: 1.05rem; }
.meldung { min-height: 1.4em; color: var(--akzent); font-size: .92rem; margin: 6px 0; }
.versuche { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.versuch { display: grid; grid-template-columns: 1fr 80px 36px 90px; gap: 8px; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; min-height: 46px; font-weight: 600; }
.versuch.leer { background: transparent; border-style: dashed; }
.versuch.treffer { border-color: var(--gruen); box-shadow: 0 0 0 2px var(--gruen) inset; }
.v-km { text-align: right; font-variant-numeric: tabular-nums; }
.v-dir { text-align: center; font-size: 1.2rem; }
.v-p { position: relative; height: 24px; background: var(--we); border-radius: 6px; overflow: hidden; }
.balken { position: absolute; inset: 0 auto 0 0; background: var(--gruen); opacity: .85; }
.v-pz { position: relative; display: block; text-align: center; font-size: .82rem; line-height: 24px; }
.v-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ende { text-align: center; }
.ergebnis { font-size: 1.15rem; }
.ende-aktionen { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.statistik { margin-top: 28px; }
.statistik h2 { font-size: 1.05rem; }
.vert { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-size: .85rem; }
.vert > span:first-child { width: 14px; }
.vb { background: var(--marke); color: #fff; border-radius: 4px; padding: 1px 6px; text-align: right; font-weight: 700; }

@media (max-width: 480px) {
  .versuch { grid-template-columns: 1fr 64px 28px 56px; font-size: .9rem; padding: 8px 10px; }
  .kopf nav { gap: 12px; font-size: .92rem; }
  .kennzahlen .zahl { font-size: 1.8rem; }
}

/* ---------- Ergänzungen v2 ---------- */
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--flaeche); padding: 8px 12px; border-radius: 8px; }
.mgrid .sf { box-shadow: inset 0 -3px 0 var(--ferien); }
.legende .sf::before { background: var(--ferien); }
.ferienliste { list-style: none; padding: 0; margin: 0 0 12px; }
.ferienliste li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.ferienliste.kompakt li { grid-template-columns: 1fr auto; padding: 6px 0; }
.ferienliste .f-art { font-weight: 700; }
.ferienliste .f-dauer { color: var(--leise); font-size: .88rem; min-width: 60px; text-align: right; }
.ferienliste li.einzeln .f-art { font-weight: 500; color: var(--leise); }
.ferientabelle td, .ferientabelle th { font-size: .88rem; white-space: nowrap; }
.quelle { font-size: .82rem; color: var(--leise); margin-top: 14px; }
.recht h2 { font-size: 1.1rem; margin-top: 1.4em; }
.recht p, .recht li { max-width: 760px; }
.warnung { background: #fde8e8; color: #8a1c1c; border: 1px solid #f3b4b4; border-radius: 10px; padding: 10px 14px; }

/* Tab-Leiste unten (nur Smartphone) */
.tableiste { display: none; }
@media (max-width: 760px) {
  .hauptnav { display: none !important; }
  .tableiste {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--flaeche); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom);
  }
  .tableiste a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: .72rem; font-weight: 600; color: var(--leise); text-decoration: none; }
  .tableiste a span { font-size: 1.25rem; line-height: 1; }
  .tableiste a[aria-current] { color: var(--akzent); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .kopf { position: static; }
  .kopf-inner { min-height: 52px; }
  .hero { padding: 24px 0 12px; }
  .karte { padding: 16px; border-radius: 12px; }
  .startform > * { flex: 1 1 100%; }
  .startform input { width: 100%; }
  .planer-form, .planer-form label, .planer-form input { width: 100%; }
}

/* Mobile Startseite */
.m-hero { padding: 22px 2px 6px; }
.m-hero h1 { font-size: 1.75rem; margin: 0 0 .3em; }
.m-hero p { margin: 0; color: var(--leise); }
.m-karte { display: block; position: relative; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 16px; margin: 14px 0; color: var(--text); text-decoration: none; box-shadow: var(--schatten); }
.m-karte h2 { font-size: 1.05rem; margin: 0 0 12px; }
.m-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-chip { display: flex; align-items: center; justify-content: center; padding: 12px 10px; border-radius: 12px; background: var(--marke-hell); color: var(--marke); font-weight: 700; font-size: .9rem; text-decoration: none; text-align: center; min-height: 44px; }
.m-chip:active { transform: scale(.97); }
.m-kopfzeile { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.m-kopfzeile h2 { margin: 0; font-size: 1.25rem; }
.m-link { background: none; color: var(--marke); padding: 6px 4px; font-weight: 600; text-decoration: underline; }
.m-gross { display: flex; flex-direction: column; gap: 4px; padding-right: 40px; }
.m-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--akzent); font-weight: 700; }
.m-wert { font-size: 1.35rem; line-height: 1.25; }
.m-gross > span:not(.m-label):not(.m-pfeil) { color: var(--leise); font-size: .92rem; }
.m-pfeil { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 2rem; color: var(--leise); }
.m-raetsel { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(135deg, var(--akzent-hell), var(--flaeche)); }
.m-knopf { align-self: flex-start; margin-top: 6px; }
.m-liste { display: flex; flex-direction: column; }
.m-liste a { padding: 12px 0; border-bottom: 1px solid var(--linie); text-decoration: none; font-weight: 600; }
.m-liste a:last-child { border-bottom: 0; }
.m-desktop { text-align: center; font-size: .85rem; }
.mobil-start .fuss { margin-top: 12px; }
@media (max-width: 560px) {
  .ferienliste li { grid-template-columns: 1fr auto; grid-template-areas: "art dauer" "zeit zeit"; row-gap: 2px; }
  .ferienliste .f-art { grid-area: art; }
  .ferienliste .f-dauer { grid-area: dauer; }
  .ferienliste .f-zeit { grid-area: zeit; color: var(--leise); font-size: .92rem; }
  .ferienliste.kompakt li { grid-template-areas: "art" "zeit"; grid-template-columns: 1fr; }
}
