/* 40ig.zindel.tools - Look angelehnt an den Einladungsflyer:
   warmes Dunkelbraun, Lichterketten, cremeweisse runde Schrift. */

:root {
  --nacht:      #150e07;
  --nacht-tief: #0c0805;
  --laub:       #2a1c0f;
  --karte:      rgba(32, 21, 12, 0.78);
  --rand:       rgba(255, 214, 148, 0.18);
  --creme:      #fff5e6;
  --creme-matt: rgba(255, 245, 230, 0.72);
  --gold:       #ffc46b;
  --gold-warm:  #f6a13c;
  --gruen:      #7bbf72;
  --rot:        #e08268;
  --radius:     22px;
  --schatten:   0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  color: var(--creme);
  background-color: var(--nacht);
  background-image:
    radial-gradient(1100px 620px at 50% -8%,  rgba(255, 186, 92, 0.30), transparent 62%),
    radial-gradient(760px 520px at 12% 26%,   rgba(255, 158, 60, 0.16), transparent 66%),
    radial-gradient(820px 620px at 88% 42%,   rgba(255, 176, 86, 0.14), transparent 68%),
    radial-gradient(1000px 800px at 50% 108%, rgba(214, 132, 44, 0.22), transparent 70%),
    linear-gradient(178deg, var(--laub) 0%, var(--nacht) 46%, var(--nacht-tief) 100%);
  background-attachment: fixed;
}

/* --- Lichterkette am oberen Rand ------------------------------------- */
.lichterkette {
  position: fixed;
  inset: 0 0 auto 0;
  height: 58px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
}
.lichterkette::before {
  content: "";
  position: absolute;
  inset: 12px 0 auto 0;
  height: 22px;
  border-bottom: 2px solid rgba(255, 220, 160, 0.28);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.birne {
  width: 9px;
  height: 13px;
  margin-top: 26px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 35%, #fff2cd, var(--gold-warm));
  box-shadow: 0 0 12px 4px rgba(255, 178, 76, 0.55);
  animation: flackern 4s ease-in-out infinite;
}
.birne:nth-child(odd)  { margin-top: 34px; animation-delay: -1.3s; }
.birne:nth-child(3n)   { margin-top: 21px; animation-delay: -2.6s; }
@keyframes flackern {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .birne { animation: none; }
}

/* --- Layout ----------------------------------------------------------- */
.wrap {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 74px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  backdrop-filter: blur(3px);
  padding: 26px 22px;
}

.karte.hero { text-align: center; padding-top: 30px; }
.karte.hero.kompakt { padding: 22px; }

h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 5.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
}
h3.unter {
  margin: 22px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--creme-matt);
}

.gruss {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.vierzig {
  margin: 12px auto 18px;
  font-size: clamp(3.4rem, 13vw, 5.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--creme);
  text-shadow:
     0 0 26px rgba(255, 180, 80, 0.55),
     0 4px 0 rgba(0, 0, 0, 0.35);
}

.intro { margin: 10px 0 0; font-size: 1.05rem; color: var(--creme-matt); }
.hinweis { margin: 0 0 14px; font-size: 0.94rem; color: var(--creme-matt); }
.hinweis.mitte { text-align: center; margin: 0; }
.klein { font-size: 0.85rem; opacity: 0.75; font-weight: 500; }

.eckdaten {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
  margin: 4px 0 0;
}
.eckdaten div { min-width: 130px; }
.eckdaten dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 2px;
}
.eckdaten dd { margin: 0; font-size: 1.06rem; font-weight: 600; }

code {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  background: rgba(255, 196, 107, 0.15);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--gold);
}

/* --- Meldungen -------------------------------------------------------- */
.meldung {
  margin: 0;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.meldung.erfolg  { background: rgba(123, 191, 114, 0.16); border-color: rgba(123, 191, 114, 0.45); }
.meldung.fehler  { background: rgba(224, 130, 104, 0.16); border-color: rgba(224, 130, 104, 0.45); }
.meldung.neutral { background: rgba(255, 245, 230, 0.09); border-color: var(--rand); }

.status-banner {
  margin: 0 0 18px;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 600;
  background: rgba(255, 245, 230, 0.07);
  border: 1px solid var(--rand);
}
.status-banner.ja   { border-color: rgba(123, 191, 114, 0.5); color: #cdeac8; }
.status-banner.nein { border-color: rgba(224, 130, 104, 0.5); color: #f3c7ba; }

/* --- Formulare -------------------------------------------------------- */
input, select, textarea, button { font: inherit; }

input[type="text"], input[type="number"], input:not([type]), select, textarea {
  width: 100%;
  padding: 10px 13px;
  color: var(--creme);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--rand);
  border-radius: 12px;
  outline: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
select option { background: var(--nacht); color: var(--creme); }
textarea { resize: vertical; }

.feld { margin: 18px 0; }
.feld label { display: block; margin-bottom: 6px; font-weight: 600; }

.code-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.code-input {
  flex: 1 1 190px;
  max-width: 260px;
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  padding: 12px;
}

.wahl { display: flex; flex-wrap: wrap; gap: 12px; }
.wahl-option {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--rand);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.wahl-option:hover { border-color: rgba(255, 196, 107, 0.5); }
.wahl-option input { accent-color: var(--gold-warm); width: 20px; height: 20px; }
.wahl-option:has(input:checked) {
  background: rgba(255, 196, 107, 0.14);
  border-color: var(--gold);
}

.personen {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  transition: opacity 0.2s;
}
.personen[data-aus="true"] { opacity: 0.35; pointer-events: none; }
.zaehler { flex: 1 1 190px; }
.zaehler > label { display: block; margin-bottom: 6px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input {
  width: 74px;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--rand);
  background: rgba(255, 245, 230, 0.08);
  color: var(--creme);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
}
.step:hover { background: rgba(255, 196, 107, 0.2); }

.checkbox-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 600;
  cursor: pointer;
}
.checkbox-zeile input { width: 20px; height: 20px; accent-color: var(--gold-warm); }

/* --- Knoepfe ---------------------------------------------------------- */
.knopf {
  display: inline-block;
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--gold-warm));
  color: #3a2109;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(246, 161, 60, 0.28);
  transition: transform 0.12s, box-shadow 0.12s;
}
.knopf:hover { transform: translateY(-1px); box-shadow: 0 11px 26px rgba(246, 161, 60, 0.38); }
.knopf:active { transform: translateY(0); }
.knopf.gross { display: block; width: 100%; text-align: center; padding: 14px 22px; font-size: 1.06rem; margin-top: 18px; }
.knopf.leicht {
  background: rgba(255, 245, 230, 0.1);
  border: 1px solid var(--rand);
  color: var(--creme);
  box-shadow: none;
}
.knopf.mini { padding: 6px 13px; font-size: 0.85rem; }
.knopf.loeschen {
  background: rgba(224, 130, 104, 0.18);
  border: 1px solid rgba(224, 130, 104, 0.5);
  color: #f3c7ba;
  box-shadow: none;
}

/* --- Anzeige des automatischen Speicherns ----------------------------- */
.autosave {
  margin: 16px 0 0;
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--rand);
  background: rgba(0, 0, 0, 0.22);
  color: var(--creme-matt);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.autosave.laeuft   { color: var(--gold); }
.autosave.gut      { color: #cdeac8; border-color: rgba(123, 191, 114, 0.5); background: rgba(123, 191, 114, 0.14); }
.autosave.schlecht { color: #f3c7ba; border-color: rgba(224, 130, 104, 0.55); background: rgba(224, 130, 104, 0.16); }
.autosave.gut::before { content: "✓ "; }

.autosave.warnung { color: #f6d9a8; border-color: rgba(246, 161, 60, 0.55); background: rgba(246, 161, 60, 0.14); }

.hotel-haken { width: 20px; height: 20px; accent-color: var(--gold-warm); }

/* E-Mail-Feld der Zimmer-Vorreservierung */
.hotel-email { margin: 14px 0 0; }
.hotel-email[hidden] { display: none; }
.hotel-email input.fehlt,
.admin-tabelle input.fehlt {
  border-color: rgba(224, 130, 104, 0.7);
  background: rgba(224, 130, 104, 0.12);
}
.admin-tabelle input.fehlt::placeholder { color: var(--rot); opacity: 0.9; }


/* --- Fotos ------------------------------------------------------------ */
.foto-form { display: flex; flex-direction: column; }
.foto-form input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.foto-form .knopf.leicht { text-align: center; }

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.galerie.gross { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bild { margin: 0; }
.bild img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--rand);
  display: block;
  background: rgba(0, 0, 0, 0.3);
}
.bild figcaption {
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--creme-matt);
  text-align: center;
}
.bild .von { font-weight: 700; color: var(--creme); }
.bild .dateiname { font-size: 0.72rem; word-break: break-all; opacity: 0.6; }

/* --- Gaesteliste ------------------------------------------------------ */
.zahlen { margin: 0 0 16px; font-size: 1.02rem; color: var(--creme-matt); }
.zahlen strong { color: var(--gold); font-size: 1.2rem; }
.trenner { opacity: 0.4; margin: 0 6px; }

.gaesteliste { list-style: none; margin: 0; padding: 0; }
.gast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 245, 230, 0.09);
}
.gast:last-child { border-bottom: none; }
.gast .namen { font-weight: 600; }
.gast.abgesagt .namen { opacity: 0.55; }

.badge {
  flex: none;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--rand);
  color: var(--creme-matt);
  background: rgba(255, 245, 230, 0.06);
}
.badge.zugesagt { color: #cdeac8; border-color: rgba(123, 191, 114, 0.55); background: rgba(123, 191, 114, 0.14); }
.badge.abgesagt { color: #f3c7ba; border-color: rgba(224, 130, 104, 0.45); background: rgba(224, 130, 104, 0.1); }

/* --- Admin ------------------------------------------------------------ */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kachel {
  padding: 13px 8px;
  text-align: center;
  border-radius: 14px;
  border: 1px solid var(--rand);
  background: rgba(0, 0, 0, 0.24);
}
.kachel .zahl { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.kachel .label { font-size: 0.78rem; color: var(--creme-matt); }
.kachel.gruen { border-color: rgba(123, 191, 114, 0.45); }
.kachel.gruen .zahl { color: var(--gruen); }
.kachel.rot   { border-color: rgba(224, 130, 104, 0.45); }
.kachel.rot .zahl { color: var(--rot); }
.kachel.gold  { border-color: rgba(255, 196, 107, 0.5); }
.kachel.gold .zahl { color: var(--gold); }

.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-tabelle { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-tabelle th {
  text-align: left;
  padding: 8px 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  border-bottom: 1px solid var(--rand);
  white-space: nowrap;
}
.admin-tabelle td { padding: 5px 4px; vertical-align: middle; }
.admin-tabelle td.mitte { text-align: center; }
.admin-tabelle input, .admin-tabelle select { padding: 7px 9px; border-radius: 9px; font-size: 0.88rem; }
.admin-tabelle .mini-num { width: 62px; text-align: center; }
.admin-tabelle .code-feld { width: 84px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.08em; }
.zeile.zugesagt { background: rgba(123, 191, 114, 0.07); }
.zeile.abgesagt { background: rgba(224, 130, 104, 0.07); }

.code-zelle { display: flex; align-items: center; gap: 6px; }
.kopieren {
  flex: none;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--rand);
  background: rgba(255, 245, 230, 0.08);
  color: var(--creme-matt);
  font-size: 0.78rem;
  cursor: pointer;
}
.kopieren:hover { background: rgba(255, 196, 107, 0.2); color: var(--creme); }
.kopieren.fertig { color: var(--gruen); border-color: rgba(123, 191, 114, 0.5); }

.neu-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.neu-form input { flex: 1 1 130px; width: auto; }
.neu-form .mini-num { flex: 0 0 74px; }

/* --- Signatur --------------------------------------------------------- */
.signatur { text-align: center; padding: 26px 16px 40px; }
.script {
  font-family: "Great Vibes", cursive;
  font-size: 2.3rem;
  color: var(--creme);
  text-shadow: 0 0 22px rgba(255, 180, 80, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 560px) {
  .karte { padding: 22px 16px; }
  .wrap { padding-top: 66px; gap: 14px; }
}
