/* Farben angelehnt an den Flyer: Creme, Nachtblau, Sand, bunte Buchstaben */
:root {
  --bg: #f4efe6;
  --paper: #fdfaf3;
  --ink: #2d3e50;
  --muted: #66727f;
  --sand: #e6ddd1;
  --sand-strong: #d6c9b8;
  --line: #e3dacd;
  --accent: #2d3e50;
  --accent-ink: #fdfaf3;
  --select: #fff4dc;
  --ok: #2f8f6b;
  --err-bg: #fdecea; --err: #b4382a;
  --c0: #3aa6a2; --c1: #f2b33d; --c2: #ec8a3c; --c3: #e0533d; --c4: #7a4fa0; --c5: #ef6f9a;
  --radius: 18px;
  --head: "Bree Serif", "Rockwell", "Roboto Slab", "Noto Serif", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17212d; --paper: #213042; --ink: #f6efe3; --muted: #aab4c0;
    --sand: #33465c; --sand-strong: #445a72; --line: #34475d;
    --accent: #f2b33d; --accent-ink: #1d2a3a; --select: #2f4257;
    --err-bg: #3a2222; --err: #ff9b8c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body); }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 8px; }
a { color: inherit; text-underline-offset: 2px; }
h1, h2, legend { font-family: var(--head); font-weight: 400; }
h2 { font-size: 1.45rem; margin: 0 0 12px; line-height: 1.2; }
.small, small { font-size: 0.88rem; color: var(--muted); }
.warn { color: var(--err); }

/* ---------- Kopfbereich ---------- */
.hero { position: relative; background: var(--paper); border-radius: var(--radius); padding: 44px 16px 20px;
  text-align: center; overflow: hidden; margin-bottom: 16px; }
.badge-wave { position: relative; display: inline-block; padding: 22px 26px 18px; border: 3px solid var(--ink);
  border-radius: 40px; background: var(--paper); z-index: 1; max-width: 100%;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--sand); }
.badge-wave::before { content: ""; position: absolute; left: 50%; top: -46px; height: 44px; border-left: 2px solid var(--ink); }
.hero-date { font-family: var(--head); font-size: 1.15rem; line-height: 1.3; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .02em; }
.rainbow { margin: 0; font-family: "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", var(--body); font-weight: 900;
  font-size: clamp(2.3rem, 11vw, 3.4rem); line-height: 1; letter-spacing: .04em; }
.rainbow > span { display: block; }
.c0 { color: var(--c0); } .c1 { color: var(--c1); } .c2 { color: var(--c2); }
.c3 { color: var(--c3); } .c4 { color: var(--c4); } .c5 { color: var(--c5); }
.hero-place { font-family: var(--head); margin: 8px 0 0; font-size: 0.95rem; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips li { background: var(--sand); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; font-family: var(--head); }
.star { position: absolute; width: 34px; height: 34px; background: var(--sand);
  clip-path: polygon(50% 0, 62% 35%, 98% 35%, 69% 57%, 79% 91%, 50% 70%, 21% 91%, 31% 57%, 2% 35%, 38% 35%); }
.s1 { left: 6%; top: 18%; } .s2 { right: 8%; top: 52%; width: 26px; height: 26px; }
.s3 { left: 10%; bottom: 26%; width: 22px; height: 22px; } .s4 { right: 24%; top: 10%; width: 20px; height: 20px; }
.moon { position: absolute; right: 7%; top: 14%; width: 44px; height: 44px; border-radius: 50%; box-shadow: -11px 7px 0 0 var(--sand); }

/* ---------- Karten & Formular ---------- */
.card { background: var(--paper); border-radius: var(--radius); padding: 20px 18px; margin-bottom: 16px; }
.card.error { background: var(--err-bg); color: var(--err); }
.card.error ul { margin: 6px 0 0; padding-left: 20px; }
.card.ok { border-left: 5px solid var(--ok); }
.card ul { padding-left: 20px; }
.done { text-align: center; }
.done-icon { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 30px; line-height: 56px; }
.form-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.form-head h2 { margin: 0; }
.pill { background: var(--sand); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; white-space: nowrap; }
fieldset { border: 0; padding: 0; margin: 0; }
.step { margin-top: 22px; }
legend { font-size: 1.15rem; margin-bottom: 10px; padding: 0; display: flex; align-items: center; gap: 10px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink);
  color: var(--paper); font: 700 0.9rem var(--body); }
label { display: block; margin-bottom: 12px; font-size: 0.92rem; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 4px; padding: 12px 14px; font: 400 17px var(--body); color: var(--ink);
  background: var(--bg); border: 2px solid transparent; border-radius: 12px; min-height: 50px; }
input:focus, select:focus { outline: none; border-color: var(--ink); }
.row { display: grid; grid-template-columns: 1fr 92px; gap: 10px; }

/* Terminauswahl als Kacheln */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { margin: 0; cursor: pointer; }
.tile input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tile span { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 76px;
  padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); transition: all .15s; }
.tile strong { font-family: var(--head); font-weight: 400; font-size: 1.05rem; }
.tile small { font-weight: 400; }
.tile input:checked + span { border-color: var(--ink); background: var(--select); box-shadow: inset 0 0 0 1px var(--ink); }
.tile input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--c1); outline-offset: 2px; }

/* Kinder */
.child { position: relative; background: var(--bg); border-radius: 14px; padding: 14px 14px 4px; margin-bottom: 10px; }
.child input, .child select { background: var(--paper); }
.child.hidden { display: none; }
.remove-child { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--muted);
  font-size: 18px; padding: 6px 8px; cursor: pointer; }
.child-name { padding-right: 28px; }
.child:first-child .child-name { padding-right: 0; }
.step-hint { margin: -4px 0 10px; font-size: 0.9rem; color: var(--muted); }
.seg { display: grid; gap: 6px; margin-bottom: 10px; }
.seg label { margin: 0; font-weight: 400; cursor: pointer; }
.seg span { display: block; padding: 10px 12px 10px 44px; border-radius: 12px; background: var(--paper); border: 2px solid transparent;
  position: relative; font-size: 0.95rem; }
.seg span::before { content: ""; position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  box-sizing: border-box; border-radius: 50%; border: 2px solid var(--sand-strong); background: var(--paper); }
.seg input:checked + span { border-color: var(--ink); }
.seg input:checked + span::before { border-color: var(--ink); box-shadow: inset 0 0 0 4px var(--paper); background: var(--ink); }
.link-btn { background: none; border: 2px dashed var(--sand-strong); color: var(--ink); width: 100%; padding: 12px; border-radius: 14px;
  font: 600 1rem var(--body); cursor: pointer; }

/* Abschluss */
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 22px 0 16px; font-size: 0.95rem; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
button { font: 600 1rem var(--body); padding: 12px 20px; border: 0; border-radius: 12px; background: var(--accent);
  color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.submit { width: 100%; min-height: 56px; font-size: 1.1rem; border-radius: 14px; }
button.secondary { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
button.danger { background: var(--err); color: #fff; }
.small-btn { padding: 6px 10px; font-size: 14px; min-height: 0; }
.howto { margin-top: 16px; font-size: 0.92rem; color: var(--muted); }
.howto summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 6px 0; }
.howto p { margin: 6px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Unterseiten ---------- */
.prose h1 { font-size: 1.5rem; line-height: 1.25; margin-top: 0; }
.prose h2 { font-size: 1.1rem; margin-top: 22px; }
.prose p, .prose li { font-size: 0.95rem; }
pre.code { white-space: pre-wrap; word-break: break-all; background: var(--bg); padding: 12px; border-radius: 8px; }
footer.site { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 8px 16px 32px; }
footer.site p { margin: 4px 0; }

/* ---------- Admin ---------- */
.v-admin .wrap, .v-admin .hdr-inner { max-width: 1150px; }
.v-admin .card { border: 1px solid var(--line); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-head h1 { font-family: var(--head); font-weight: 400; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.stats div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 14px; color: var(--muted); }
.stats div.over { border-color: var(--err); }
.stats span { display: block; font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 14px; }
.steps form { margin-bottom: 4px; }
form.inline { display: flex; gap: 6px; align-items: center; margin: 0; }
form.inline input, form.inline select { margin: 0; width: auto; padding: 6px 8px; min-height: 0; font-size: 14px; }
td form.inline + form.inline { margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
td div + div { margin-top: 6px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--sand); }
.badge.zugesagt { background: var(--ok); color: #fff; }
.danger-zone { border-color: var(--err) !important; }
.v-admin label, .v-page .form label { font-weight: 600; }

@media (max-width: 380px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:last-child { grid-column: span 2; }
  .tile span { min-height: 64px; }
}
@media (min-width: 600px) {
  .wrap { padding-top: 28px; }
  .seg { grid-template-columns: 1fr 1fr; }
}
.seg-label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 4px; }

/* ---------- Sticky Kopfleiste ---------- */
.sticky { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(45, 62, 80, .08); transition: background .3s, box-shadow .3s; }
.hdr-inner { max-width: 560px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; transition: opacity .3s, transform .3s; }
.lantern { display: inline-flex; transform-origin: 50% 0; animation: swing 3.2s ease-in-out infinite; }
.lantern svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(245, 158, 11, .55)); }
@keyframes swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-title { font-family: "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", var(--body); font-weight: 900; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; }
.brand-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.hdr-cta { flex: none; text-decoration: none; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.95rem;
  padding: 9px 16px; border-radius: 999px; transition: opacity .25s, transform .25s; }
.hdr-cta:active { transform: scale(.96); }
.hdr-progress { height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--c0), var(--c1), var(--c2), var(--c3), var(--c4), var(--c5)); }
/* Startseite ganz oben: Leiste durchsichtig, Titel erst nach dem Scrollen */
.sticky.at-top { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sticky.at-top .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.sticky.at-top .hdr-progress { opacity: 0; }
.sticky.form-visible .hdr-cta { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.v-home .hero { margin-top: 4px; }
.v-home main.wrap { padding-top: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  .lantern { animation: none; }
  html { scroll-behavior: auto; }
  .sticky, .brand, .hdr-cta { transition: none; }
}
@media (prefers-color-scheme: dark) {
  .sticky { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0, 0, 0, .3); }
}
