:root {
  --nacht: #100d09;
  --stein: #1e1710;
  --stein-hell: #251d14;
  --stein-tief: #16110b;
  --kante: #4b3b27;
  --kante-fein: #322718;
  --papyrus: #f0e4c9;
  --papyrus-still: #a89073;
  --papyrus-leise: #7a6749;
  --fackel: #e9a63e;
  --glut: #f6d190;
  --glut-tief: #9c6716;
  --lapis: #46b3cd;
  --lapis-tief: #1c6076;
  --karneol: #c0563a;
  --malachit: #57a37b;
  --radius: 2px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -12%, #261d13 0%, rgba(38, 29, 19, 0) 68%),
    var(--nacht);
  color: var(--papyrus);
  font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--glut); }

h1, h2, h3, .marke, .schlicht, .monatskopf strong, .siegel,
.gewaehlt, .stelentitel, .stelendatum, .abschnitt, .zaehler strong {
  font-family: "Marcellus", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.012em;
}

/* ---------- Fackel ---------- */

.fackel { width: 40px; height: 88px; display: block; }
.rand .fackel { position: absolute; top: 26px; right: 22px; }
.fackel .schein { fill: var(--glut); opacity: 0.22; filter: blur(10px); }
.fackel .flamme.aussen { fill: var(--fackel); opacity: 0.9; }
.fackel .flamme.innen { fill: var(--glut); }
.fackel .schale, .fackel .wandarm { fill: #6d5738; }
.fackel .schaft { fill: #4a3b28; }
.fackel.brennt-blau .schein { fill: var(--lapis); opacity: 0.3; }
.fackel.brennt-blau .flamme.aussen { fill: var(--lapis-tief); opacity: 1; }
.fackel.brennt-blau .flamme.innen { fill: var(--lapis); }

/* Die Flamme lodert dauerhaft: drei Ebenen mit unterschiedlichem Takt,
   damit das Flackern nie sichtbar in eine Schleife fällt. */
.fackel .flamme.aussen { animation: lodern 1.7s ease-in-out infinite; transform-origin: 22px 47px; }
.fackel .flamme.innen  { animation: zuengeln 1.13s ease-in-out infinite; transform-origin: 22px 40px; }
.fackel .schein        { animation: atmen 2.3s ease-in-out infinite; transform-origin: 22px 30px; }

@keyframes lodern {
  0%   { transform: scale(1, 1)       translateX(0);      opacity: 0.88; }
  17%  { transform: scale(0.96, 1.08) translateX(-0.6px); opacity: 1; }
  34%  { transform: scale(1.04, 0.95) translateX(0.5px);  opacity: 0.92; }
  53%  { transform: scale(0.98, 1.06) translateX(0.7px);  opacity: 1; }
  71%  { transform: scale(1.03, 0.97) translateX(-0.4px); opacity: 0.9; }
  88%  { transform: scale(0.97, 1.04) translateX(0.2px);  opacity: 0.97; }
  100% { transform: scale(1, 1)       translateX(0);      opacity: 0.88; }
}
@keyframes zuengeln {
  0%   { transform: scale(1, 1)       translateY(0);      opacity: 0.95; }
  23%  { transform: scale(0.92, 1.12) translateY(-1px);   opacity: 1; }
  46%  { transform: scale(1.06, 0.93) translateY(0.6px);  opacity: 0.85; }
  69%  { transform: scale(0.95, 1.09) translateY(-0.7px); opacity: 1; }
  100% { transform: scale(1, 1)       translateY(0);      opacity: 0.95; }
}
@keyframes atmen {
  0%   { opacity: 0.16; transform: scale(0.96); }
  30%  { opacity: 0.3;  transform: scale(1.05); }
  55%  { opacity: 0.2;  transform: scale(0.99); }
  80%  { opacity: 0.28; transform: scale(1.03); }
  100% { opacity: 0.16; transform: scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .fackel .flamme.aussen, .fackel .flamme.innen { animation: none; }
  .fackel .schein { animation-duration: 6s; }
}

/* ---------- Siegel ---------- */

.siegelbild { display: block; width: 92px; height: auto; }
.rand .siegelbild { margin: 0 0 16px; }
.siegelbild.klein { width: 74px; margin: 0 auto 14px; }
.siegelbild.winzig { width: 30px; display: inline-block; vertical-align: -9px; margin-right: 10px; }

/* ---------- Grundgerüst ---------- */

.huelle { max-width: 1040px; margin: 0 auto; padding: 48px 20px 24px; }
.huelle.weit { max-width: 1240px; }

.tafel {
  position: relative;
  display: grid;
  grid-template-columns: 330px 1fr;
  background: linear-gradient(180deg, var(--stein-hell) 0%, var(--stein) 55%);
  border: 1px solid var(--kante);
  border-radius: var(--radius);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.tafel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(233,166,62,0) 0%, rgba(233,166,62,0.55) 50%, rgba(233,166,62,0) 100%);
}
.tafel.schmal { grid-template-columns: 1fr; max-width: 580px; margin: 0 auto; }

.rand {
  position: relative;
  background:
    radial-gradient(240px 240px at 48px 44px, rgba(233, 166, 62, 0.15) 0%, rgba(233, 166, 62, 0) 74%),
    var(--stein-tief);
  border-right: 1px solid var(--kante-fein);
  padding: 34px 28px 36px;
}
.rand h1 { margin: 2px 0 12px; font-size: 30px; line-height: 1.1; color: #fdf6e7; }
.marke { margin: 0; font-size: 13px; letter-spacing: 0.09em; color: var(--fackel); }
.beschreibung { margin: 14px 0 24px; font-size: 15px; color: var(--papyrus-still); }

.siegel {
  display: inline-block;
  margin: 0;
  padding: 4px 16px;
  background: var(--fackel);
  color: #1a1208;
  font-size: 12.5px;
  letter-spacing: 0.11em;
  border-radius: 999px;
}

.formate { display: grid; gap: 16px; border-top: 1px solid var(--kante-fein); padding-top: 20px; }
.format { display: flex; gap: 11px; align-items: start; font-size: 14px; }
.format strong { display: block; font-weight: 600; color: var(--papyrus); }
.format span { display: block; color: var(--papyrus-still); }
.format .ortzeile { color: var(--papyrus-leise); font-size: 13px; margin-top: 2px; }
.format .marker { margin-top: 7px; flex: none; }

.marker {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.marker.ist-vorort { background: var(--fackel); }
.marker.ist-online { background: transparent; border: 1.5px solid var(--fackel); }

.buehne { padding: 34px 32px 36px; }
.buehne.mittig { text-align: center; }
.buehne.mittig .fackel { margin: 0 auto 16px; }
.leiste .marke { display: flex; align-items: center; }
.buehne.mittig .gewaehlt {
  border-left: none;
  border-top: 1px solid var(--kante);
  border-bottom: 1px solid var(--kante);
  padding: 13px 0;
}
.buehne.mittig .fakten { display: inline-block; text-align: left; }
.buehne.mittig .knopfreihe { justify-content: center; }
.buehne.mittig .formular { max-width: 340px; margin: 0 auto; }

.fuss {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 20px 48px;
  font-size: 13px;
  color: var(--papyrus-leise);
}

.fakten { margin: 0; font-size: 14.5px; }
.fakten dt { color: var(--papyrus-leise); margin-top: 12px; font-size: 13px; }
.fakten dd { margin: 0; color: var(--papyrus); }
.fakten dd.restplaetze { color: var(--fackel); font-weight: 600; }

/* ---------- Kalender und Stele ---------- */

.planer { display: grid; grid-template-columns: 1fr 236px; gap: 34px; }

.monatskopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.monatskopf strong { font-size: 20px; color: #fdf6e7; }
.blaettern {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--kante);
  border-radius: var(--radius);
  font-size: 19px;
  color: var(--papyrus);
  text-decoration: none;
}
.blaettern:hover { border-color: var(--fackel); color: var(--glut); }
.blaettern.leer { color: #453727; border-color: var(--kante-fein); }

.raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.wochenkopf { text-align: center; font-size: 12px; letter-spacing: 0.07em; color: var(--papyrus-leise); padding-bottom: 6px; }
.feld {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-family: "Marcellus", Georgia, serif;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: #55462d;
  border-radius: var(--radius);
}
.feld.leer { visibility: hidden; }
.feld.belegt { color: var(--papyrus-leise); border: 1px dashed var(--kante-fein); }
.feld .marker { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; }

a.feld.offen {
  color: var(--papyrus);
  text-decoration: none;
  background: linear-gradient(180deg, #2a2016 0%, #221a11 100%);
  border: 1px solid var(--kante-fein);
  border-bottom: 2px solid var(--glut-tief);
  padding-bottom: 6px;
}
a.feld.offen:hover {
  border-color: var(--fackel);
  color: #fff8ea;
  box-shadow: 0 0 16px rgba(233, 166, 62, 0.3);
}
a.feld.ist-gewaehlt {
  background: linear-gradient(180deg, #26798f 0%, var(--lapis-tief) 100%);
  border-color: var(--lapis);
  border-bottom-color: var(--lapis);
  color: #f0fbff;
  box-shadow: 0 0 18px rgba(70, 179, 205, 0.38);
}
a.feld.ist-gewaehlt .marker { background: #f0fbff; border-color: #f0fbff; }

.legende {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--papyrus-leise);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.legende .marker { margin-left: 12px; }
.legende .marker:first-child { margin-left: 0; }

.stele {
  align-self: start;
  padding: 22px 20px 24px;
  background: var(--stein-tief);
  border: 1px solid var(--kante-fein);
  border-top: 2px solid var(--glut-tief);
  border-radius: var(--radius);
}
.stelentitel { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.1em; color: var(--fackel); }
.stelendatum {
  margin: 0 0 12px;
  font-size: 52px;
  line-height: 0.95;
  color: #fdf6e7;
  font-variant-numeric: lining-nums;
}
.stelendatum span { display: block; font-size: 17px; color: var(--papyrus-still); letter-spacing: 0.03em; }

.schnellwahl { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
.schnellwahl a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--kante-fein);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--papyrus);
  font-size: 14px;
}
.schnellwahl a:hover { border-color: var(--fackel); background: #241b12; }
.schnellwahl strong { font-weight: 600; }
.schnellwahl span { color: var(--papyrus-leise); font-size: 12.5px; }

/* ---------- Formulare ---------- */

.rueckweg { margin: 0 0 18px; font-size: 14px; }
.abschnitt { margin: 0 0 14px; font-size: 22px; color: #fdf6e7; }
.gewaehlt {
  margin: 0 0 26px;
  font-size: 20px;
  color: #fdf6e7;
  border-left: 2px solid var(--lapis);
  padding-left: 15px;
}
.gewaehlt span {
  display: block;
  font-family: "Barlow", sans-serif;
  font-size: 14.5px;
  color: var(--papyrus-still);
}

.formular { display: grid; gap: 16px; max-width: 560px; }
.formular label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.feldpaar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pflicht { color: var(--fackel); font-weight: 400; font-size: 12.5px; letter-spacing: 0.04em; }
.zusatz { color: var(--papyrus-still); font-weight: 400; font-size: 13px; }
.trennwort {
  margin: 6px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--kante-fein);
  font-size: 13.5px;
  color: var(--papyrus-still);
}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="time"], input[type="date"], input[type="datetime-local"], input[type="number"],
textarea, select {
  font: inherit;
  font-weight: 400;
  width: 100%;
  padding: 11px 13px;
  background: #140f09;
  color: var(--papyrus);
  border: 1px solid var(--kante);
  border-radius: var(--radius);
}
input:hover, textarea:hover, select:hover { border-color: #67512f; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--fackel);
  outline-offset: 2px;
}
textarea { resize: vertical; }
::placeholder { color: #6d5a40; }

.zustimmung {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 14px;
  color: var(--papyrus-still);
}
.zustimmung input { width: auto; margin-top: 4px; accent-color: var(--fackel); }

button, .knopf {
  font-family: "Barlow", sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  background: var(--fackel);
  color: #1a1208;
  border: 1px solid var(--fackel);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .knopf:hover { background: var(--glut); border-color: var(--glut); }
.knopf.still { background: transparent; color: var(--papyrus); border-color: var(--kante); }
.knopf.still:hover { background: #241b12; border-color: var(--fackel); color: var(--glut); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.knopfreihe.klein { margin-top: 16px; gap: 10px; }
.knopfreihe form { margin: 0; }
button.mini, .knopfreihe.klein .knopf {
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--papyrus-still);
  border-color: var(--kante);
}
button.mini:hover, .knopfreihe.klein .knopf:hover { background: transparent; color: var(--glut); border-color: var(--fackel); }

.falle { position: absolute; left: -9999px; }

.stoerung {
  margin: 0 0 22px;
  padding: 12px 15px;
  background: rgba(192, 86, 58, 0.13);
  border-left: 2px solid var(--karneol);
  font-size: 14px;
}
.notiz {
  margin: 0 0 24px;
  padding: 12px 15px;
  background: rgba(87, 163, 123, 0.13);
  border-left: 2px solid var(--malachit);
  font-size: 14px;
}
.hinweis, .leerraum { color: var(--papyrus-still); font-size: 14px; margin: 0 0 12px; }

.schlicht { margin: 0 0 16px; font-size: 26px; color: #fdf6e7; }
.buehne.mittig .siegel { margin-bottom: 14px; }

/* ---------- Verwaltung ---------- */

.leiste {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--stein-tief);
  border-bottom: 1px solid var(--kante);
}
.leiste .marke { color: #fdf6e7; font-size: 16px; letter-spacing: 0.04em; }
.leiste nav { display: flex; flex-wrap: wrap; gap: 20px; }
.leiste nav a { color: var(--papyrus-still); text-decoration: none; font-size: 14px; }
.leiste nav a:hover { color: var(--glut); }
.leiste nav a.ist-aktiv { color: var(--fackel); }

.huelle h2 { font-size: 20px; margin: 36px 0 14px; color: #fdf6e7; }
.huelle h2:first-of-type { margin-top: 8px; }

.terminkarte {
  margin-bottom: 22px;
  padding: 22px 24px 24px;
  background: var(--stein);
  border: 1px solid var(--kante);
  border-top: 2px solid var(--glut-tief);
  border-radius: var(--radius);
}
.terminkarte > header {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: start; justify-content: space-between;
  margin-bottom: 16px;
}
.terminkarte h3 { margin: 2px 0 4px; font-size: 21px; color: #fdf6e7; }
.terminkarte .ortzeile { margin: 0; font-size: 13.5px; color: var(--papyrus-still); }
.zaehler { margin: 0; text-align: right; }
.zaehler strong { display: block; font-size: 34px; line-height: 1; color: var(--fackel); }
.zaehler span { font-size: 12.5px; color: var(--papyrus-leise); }

.liste {
  width: 100%;
  border-collapse: collapse;
  background: var(--stein-tief);
  border: 1px solid var(--kante-fein);
  border-radius: var(--radius);
  font-size: 14px;
}
.liste th {
  text-align: left;
  font-weight: 500;
  color: var(--papyrus-leise);
  padding: 10px 13px;
  border-bottom: 1px solid var(--kante-fein);
}
.liste td { padding: 11px 13px; border-bottom: 1px solid var(--kante-fein); vertical-align: top; }
.liste tr:last-child td { border-bottom: none; }
.liste .zahl { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--papyrus-leise); }
.liste .schmalspalte { max-width: 240px; color: var(--papyrus-still); }
.liste form { margin: 0; }

.reihenformular {
  display: flex; flex-wrap: wrap; align-items: end; gap: 14px;
  margin-top: 18px;
  padding: 20px;
  background: var(--stein);
  border: 1px solid var(--kante);
  border-radius: var(--radius);
}
.reihenformular label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }
.reihenformular input, .reihenformular select { width: auto; min-width: 138px; }

.kachel {
  display: grid; gap: 14px;
  max-width: 720px;
  margin-bottom: 18px;
  padding: 22px;
  background: var(--stein);
  border: 1px solid var(--kante);
  border-radius: var(--radius);
}
.kachel label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }
.kachel .reihe { display: flex; flex-wrap: wrap; gap: 14px; }
.kachel .reihe label { flex: 1; min-width: 118px; }
.kachel .reihe input, .kachel .reihe select { width: 100%; }
.kachel button { justify-self: start; }

/* ---------- Klein ---------- */

@media (max-width: 820px) {
  .huelle { padding: 24px 14px; }
  .tafel { grid-template-columns: 1fr; }
  .rand { padding: 26px 20px 30px; border-right: none; border-bottom: 1px solid var(--kante-fein); }
  .buehne { padding: 26px 20px 30px; }
  .planer { grid-template-columns: 1fr; gap: 26px; }
  .feldpaar { grid-template-columns: 1fr; gap: 16px; }
  .stelendatum { font-size: 44px; }
  .terminkarte { padding: 18px 16px 20px; }
  .liste { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  a.feld.offen, .zeiten a, button, .knopf, .blaettern, .schnellwahl a {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
}
