:root {
  --nacht: #0f1d2b;
  --nacht-2: #1a3247;
  --rot: #c4122f;
  --rot-dunkel: #9b0d24;
  --gold: #e3b04b;
  --gold-hell: #fbf1dc;
  --papier: #f8f5ef;
  --weiss: #ffffff;
  --tinte: #1c2430;
  --grau: #5b6472;
  --linie: #e4ddd1;
  --gruen: #1d7a4c;
  --fehler: #b3261e;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--rot-dunkel); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }

/* ---------- Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--weiss);
  text-align: center;
  padding: 52px 20px 190px;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 48%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 45% 12%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 38%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 16%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 44%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 52%, #fff6 50%, transparent 51%),
    radial-gradient(ellipse at 50% -20%, #2b4a68 0%, transparent 60%),
    linear-gradient(180deg, var(--nacht) 0%, #16304a 100%);
}
.schnee {
  position: absolute; inset: -20% 0 0 0; pointer-events: none; z-index: 1;
  background-image:
    radial-gradient(2.5px 2.5px at 20px 30px, #ffffffd9 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 110px 80px, #ffffffb3 50%, transparent 52%),
    radial-gradient(3px 3px at 170px 20px, #ffffffcc 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 60px 140px, #ffffff99 50%, transparent 52%),
    radial-gradient(2.2px 2.2px at 150px 160px, #ffffffbf 50%, transparent 52%);
  background-size: 200px 200px;
  animation: schnee 18s linear infinite;
}
@keyframes schnee { from { background-position: 0 0; } to { background-position: 60px 400px; } }
.hero-inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.hero-bild { position: absolute; left: 0; bottom: -1px; width: 100%; height: 170px; z-index: 0; display: block; }
.lichter circle { animation: funkeln 2.4s ease-in-out infinite; }
.lichter circle:nth-child(2n) { animation-delay: .8s; }
.lichter circle:nth-child(3n) { animation-delay: 1.6s; }
@keyframes funkeln { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.blaulicht { animation: blau 1.1s steps(2) infinite; }
@keyframes blau { 0%, 100% { fill: #4da3ff; } 50% { fill: #1b3c66; } }
.stern { filter: drop-shadow(0 0 6px #e3b04bcc); }
@media (prefers-reduced-motion: reduce) {
  .schnee, .lichter circle, .blaulicht { animation: none; }
}
.kicker {
  display: inline-block;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid #e3b04b66; border-radius: 999px;
  padding: 4px 14px; margin-bottom: 18px; background: #0f1d2b80;
}
.hero h1 { font-size: clamp(2.3rem, 9vw, 3.6rem); margin-bottom: .35em; text-shadow: 0 2px 18px #0008; }
.hero h1 .jahr { color: var(--gold); display: block; font-size: .8em; }
.hero-datum { font-size: 1.15rem; font-weight: 600; margin-bottom: .2em; }
.hero-ort { color: #ffffffcc; margin-bottom: 1.6em; }
.hero-frist { font-size: .88rem; color: #ffffffb3; margin: 14px 0 0; }
.hero-klein { padding: 32px 20px 36px; border-bottom: 5px solid var(--rot); }
.hero-titel { font-family: var(--serif); font-size: 1.6rem; margin: 0; }

/* ---------- Buttons */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font: 600 1rem/1 var(--sans); border-radius: 999px; padding: 15px 26px;
  border: 2px solid transparent; cursor: pointer;
}
.btn-hero, .btn-primaer { background: var(--rot); color: var(--weiss); }
.btn-hero:hover, .btn-primaer:hover { background: var(--rot-dunkel); }
.btn-hero { box-shadow: 0 6px 20px #c4122f55; }
.btn-primaer { width: 100%; font-size: 1.08rem; padding: 17px; margin-top: 6px; }
.btn-primaer:disabled { opacity: .6; cursor: wait; }
.btn-sekundaer { background: var(--weiss); color: var(--nacht); border-color: var(--nacht); }
.btn-sekundaer:hover { background: var(--nacht); color: var(--weiss); }

/* ---------- Layout */
main { max-width: 680px; margin: 0 auto; padding: 28px 16px 8px; }
.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 24px 20px; margin-bottom: 18px;
}
.intro .anrede { font-family: var(--serif); font-size: 1.2rem; }
.intro .gruss { font-family: var(--serif); font-style: italic; color: var(--rot-dunkel); margin: 0; }
main { position: relative; z-index: 1; margin-top: -18px; }

.ablauf { list-style: none; margin: 0; padding: 0; }
.ablauf li {
  display: grid; grid-template-columns: 78px 1fr; gap: 12px;
  padding: 12px 0; border-top: 1px dashed var(--linie);
}
.ablauf li:first-child { border-top: 0; padding-top: 2px; }
.ablauf .zeit { font-weight: 700; color: var(--rot); font-variant-numeric: tabular-nums; }
.ablauf strong { display: block; }
.ablauf div span { color: var(--grau); font-size: .93rem; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.kachel {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 18px 16px; border-top: 4px solid var(--gold);
}
.kachel p { margin: 0; color: var(--grau); font-size: .93rem; }
.icon { width: 30px; height: 30px; margin-bottom: 8px; fill: none; stroke: var(--rot); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; display: block; }
.icon .voll { fill: var(--rot); stroke: none; }
.kachel small { display: block; margin-top: 4px; font-size: .82rem; }

.weg { list-style: none; counter-reset: weg; margin: 0 0 16px; padding: 0; }
.weg li { counter-increment: weg; position: relative; padding: 0 0 14px 44px; }
.weg li::before {
  content: counter(weg); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--nacht); color: var(--weiss);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.weg strong { display: block; }
.weg span { color: var(--grau); }
.lageplan { margin: 4px 0 16px; }
.lageplan img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 24px #0f1d2b33; }
.lageplan figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: .85rem; color: var(--grau); }
.leg { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: .78rem; color: #fff; }
.leg-p { background: #1f5fbf; }
.leg-weg { width: 26px; height: 6px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 0 2px #0f1d2b; }
.leg-ein { background: var(--rot); border-radius: 50%; }
.platzhalter {
  border: 2px dashed var(--linie); border-radius: 10px; padding: 28px 12px; text-align: center;
  color: var(--grau); font-size: .9rem;
}
.adresse { font-weight: 600; }

/* ---------- Formular */
.frist { margin-bottom: 6px; }
.frist-hinweis { border-left: 4px solid var(--rot); background: #fff5f6; border-radius: 0 10px 10px 0;
  padding: 12px 14px 4px; margin: 10px 0 18px; font-size: .93rem; }
.frist-hinweis p { margin-bottom: .6em; }
.karte-anmeldung { border-top: 5px solid var(--rot); box-shadow: 0 10px 30px #0f1d2b14; }
.verbindlich { background: var(--gold-hell); border: 1px solid #ecd6a6; border-radius: 12px; padding: 14px 16px 2px; margin-bottom: 16px; font-size: .93rem; }
.verbindlich-titel { font-weight: 700; color: #6b4a0e; margin-bottom: 6px; }
.badge {
  display: inline-block; background: var(--gold-hell); color: #7a5410; border-radius: 999px;
  padding: 2px 10px; font-size: .82rem; font-weight: 600; margin-left: 4px;
}
.felder { display: grid; gap: 12px; margin-bottom: 14px; }
.feld { display: block; font-weight: 600; font-size: .92rem; }
.feld input {
  display: block; width: 100%; margin-top: 6px; font: 16px var(--sans);
  padding: 13px 14px; border: 1.5px solid #cfc7b9; border-radius: 10px; background: var(--weiss); color: var(--tinte);
}
.feld input:focus, .option input:focus-visible + span, .check input:focus-visible {
  outline: 3px solid #c4122f44; outline-offset: 1px; border-color: var(--rot);
}
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.wahl { display: grid; gap: 10px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option span {
  display: block; padding: 14px 16px 14px 48px; border: 1.5px solid #cfc7b9; border-radius: 12px;
  background: var(--weiss); position: relative;
}
.option span::before {
  content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9aa1ab; background: var(--weiss);
}
.option small { display: block; color: var(--grau); font-size: .85rem; }
.option input:checked + span { border-color: var(--rot); background: #fff5f6; }
.option input:checked + span::before { border-color: var(--rot); background: radial-gradient(circle, var(--rot) 0 4px, var(--weiss) 5px); }

.begleitung { background: var(--papier); border: 1px solid var(--linie); border-radius: 12px; padding: 16px; }
.begleitung legend { float: left; width: 100%; margin-bottom: 10px; }
.begleitung legend ~ * { clear: both; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-bottom: 14px; font-size: .93rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rot); }
.klein { font-size: .85rem; color: var(--grau); margin-top: 10px; }
.js .ohne-js { display: none; }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fehler {
  border: 1.5px solid var(--fehler); background: #fdf1f0; color: var(--fehler);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.fehler ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Danke */
.danke { text-align: center; padding-top: 32px; }
.danke h1 { font-size: 1.7rem; }
.haken {
  width: 64px; height: 64px; border-radius: 50%; background: var(--gruen); color: var(--weiss);
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto 16px;
}
.eckdaten { background: var(--papier); border-radius: 10px; padding: 12px; font-size: .93rem; margin: 18px 0; }
.zurueck { margin-top: 20px; font-size: .93rem; }
.text h2 { font-size: 1.1rem; margin-top: 1.2em; }

.fuss { text-align: center; color: var(--grau); font-size: .85rem; padding: 10px 16px 32px; }

/* ---------- Admin */
.admin { max-width: 1100px; }
.admin-kopf h1 { font-size: 1.6rem; margin-bottom: .2em; }
.admin-kopf p { color: var(--grau); }
.meldung { background: #eaf6ef; border: 1px solid #b7dcc6; color: var(--gruen); border-radius: 10px; padding: 10px 14px; }
.zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.zahl { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; color: var(--grau); font-size: .88rem; }
.zahl span { display: block; font: 700 2rem/1.1 var(--sans); color: var(--tinte); font-variant-numeric: tabular-nums; }
.zahl-gross { background: var(--nacht); border-color: var(--nacht); color: #ffffffbb; }
.zahl-gross span { color: var(--gold); }
.admin-links { margin-bottom: 16px; }
.tabelle-wrap { overflow-x: auto; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
th { background: var(--papier); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--grau); }
td.leer { text-align: center; color: var(--grau); padding: 28px; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .78rem; font-weight: 600; background: #eef0f3; color: var(--grau); }
.tag-ok { background: #e6f4ec; color: var(--gruen); }
.tag-absage { background: #f1f1f1; color: #6b6b6b; }
.tag-aus { background: #fdecee; color: var(--rot-dunkel); }
.tag-warn { background: var(--gold-hell); color: #7a5410; }
.aktionen { display: flex; gap: 6px; }
.aktionen button {
  font: 600 .8rem var(--sans); border: 1px solid #cfc7b9; background: var(--weiss);
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.aktionen .gefahr { color: var(--fehler); border-color: #e7b9b5; }
.nachtrag .btn-primaer { width: auto; padding: 13px 24px; }
.option.kompakt { display: flex; gap: 8px; align-items: center; border: 1.5px solid #cfc7b9; border-radius: 10px; padding: 10px 12px; }
.option.kompakt input { position: static; opacity: 1; accent-color: var(--rot); }

@media (min-width: 560px) {
  .felder.zwei { grid-template-columns: 1fr 1fr; }
  .felder.drei { grid-template-columns: repeat(3, 1fr); }
  .felder.vier { grid-template-columns: repeat(4, 1fr); }
  .karte { padding: 28px 28px; }
  .kacheln { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-bottom: 230px; }
  .hero-bild { height: 240px; }
}
@media (max-width: 559px) {
  .zahlen { grid-template-columns: 1fr 1fr; }
}

/* ---------- Bestätigungs-Animation */
.szene { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto 22px;
  border-radius: 18px; box-shadow: 0 12px 30px #0f1d2b40; overflow: visible; }
.szene .lkw { animation: anfahrt 1.8s cubic-bezier(.16,.84,.3,1) both; }
@keyframes anfahrt { from { transform: translateX(-240px); } to { transform: translateX(0); } }
.szene .rad { transform-box: fill-box; transform-origin: center; animation: drehen .45s linear 4; }
@keyframes drehen { to { transform: rotate(360deg); } }
.szene .blau.a, .szene .blau-schein.a { animation: blinken .8s steps(1) infinite; }
.szene .blau.b, .szene .blau-schein.b { animation: blinken .8s steps(1) infinite .4s; }
@keyframes blinken { 0% { opacity: 1; } 50% { opacity: .15; } }
.szene .stern-gross { transform-box: fill-box; transform-origin: center; animation: stern-an 1s ease-out 1.6s both, pulsieren 2.4s ease-in-out 2.6s infinite; }
@keyframes stern-an { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(0); } }
@keyframes pulsieren { 50% { transform: scale(1.12); } }
.szene .stern-schein { animation: schein 2.4s ease-in-out 1.8s infinite both; }
@keyframes schein { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.szene .kugel-funkeln circle { animation: funkeln 1.8s ease-in-out infinite; }
.szene .kugel-funkeln circle:nth-child(2n) { animation-delay: .6s; }
.szene .kugel-funkeln circle:nth-child(3n) { animation-delay: 1.2s; }
.szene .flocken circle { animation: fallen 6s linear infinite; }
.szene .flocken circle:nth-child(2) { animation-delay: -1.5s; animation-duration: 7s; }
.szene .flocken circle:nth-child(3) { animation-delay: -3s; }
.szene .flocken circle:nth-child(4) { animation-delay: -4.5s; animation-duration: 8s; }
.szene .flocken circle:nth-child(5) { animation-delay: -2.2s; animation-duration: 6.5s; }
.szene .flocken circle:nth-child(6) { animation-delay: -5s; }
.szene .flocken circle:nth-child(7) { animation-delay: -0.7s; animation-duration: 7.5s; }
.szene .flocken circle:nth-child(8) { animation-delay: -3.8s; }
@keyframes fallen { from { transform: translate(0, 0); } to { transform: translate(14px, 200px); } }
.szene .badge { transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.3,1.6,.5,1) 2s both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .szene *, .szene .lkw, .szene .badge, .szene .stern-gross { animation: none !important; }
  .szene .flocken { display: none; }
}
