:root {
  --night: #0c1731;
  --night-2: #1d365c;
  --gold: #e9c46a;
  --gold-deep: #a87a1f;
  --snow: #f3f5fa;
  --card: #ffffff;
  --ink: #1b2333;
  --muted: #5a6476;
  --line: #d9dfea;
  --focus: #2f6fdb;
  --ok: #1d7448;
  --ok-bg: #e5f4eb;
  --warn: #8a5300;
  --warn-bg: #fff3dc;
  --err: #b3261e;
  --err-bg: #fde8e6;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--snow); line-height: 1.5; }
a { color: var(--night-2); }
a:hover { color: var(--gold-deep); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }

.testbanner { background: repeating-linear-gradient(45deg, #ffd23f, #ffd23f 12px, #ffe17a 12px, #ffe17a 24px);
  color: #3b2a00; text-align: center; font-weight: 600; padding: 6px 16px; font-size: .9rem; }

/* ------------------------------------------------------------ Kopf */
.hero { position: relative; overflow: hidden; color: #fff; padding: 44px 16px 92px;
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.sky { position: absolute; inset: 0; opacity: .85;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 40%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 16%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 86%, #fff 50%, transparent 51%); }
.hero::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -40px; height: 90px;
  background: var(--snow); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; z-index: 1; }
.moon { width: 58px; height: 58px; fill: var(--gold); filter: drop-shadow(0 0 18px rgba(233, 196, 106, .55)); }
.moon.small { width: 22px; height: 22px; vertical-align: -5px; filter: none; }
.org { margin: 10px 0 4px; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; color: #c9d5ea; }
.hero h1 { margin: 0; font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.1; letter-spacing: -.01em; }
.dates { margin: 10px 0 0; color: var(--gold); font-weight: 600; }

/* ------------------------------------------------------------ Inhalt */
.wrap { max-width: 720px; margin: -64px auto 0; padding: 0 16px 24px; position: relative; z-index: 2; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px 20px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(12, 23, 49, .06), 0 8px 28px rgba(12, 23, 49, .08); }
@media (min-width: 600px) { .card { padding: 28px 32px; } }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.facts > div { background: var(--snow); border-radius: 10px; padding: 10px 8px; text-align: center; }
.facts .k { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts .v { display: block; font-weight: 700; font-size: 1.05rem; }
.intro p { margin: 0 0 8px; }
.notice { background: var(--warn-bg); border-left: 4px solid var(--gold); border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; }
.closed h2 { margin-top: 0; }

fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; padding: 0; width: 100%;
  border-bottom: 2px solid var(--snow); padding-bottom: 6px; }
.tag { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--snow); border-radius: 99px;
  padding: 2px 8px; vertical-align: 2px; margin-left: 6px; }
.row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .95rem; }
.req { color: var(--err); }
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(47, 111, 219, .35); outline-offset: 1px; border-color: var(--focus); }
.has-error input, .has-error textarea { border-color: var(--err); background: #fffafa; }
.hint { color: var(--muted); font-size: .88rem; margin: 5px 0 0; }
.hint.center { text-align: center; }
.error { color: var(--err); font-size: .9rem; font-weight: 600; margin: 5px 0 0; }
.alert { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-weight: 600; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.choice input { width: auto; margin: 3px 0 0; accent-color: var(--night-2); transform: scale(1.15); }
.check .choice { border: 0; padding: 0; }
.eltern { background: #f8f9fd; border-radius: 12px; padding: 14px; }
.eltern legend { border: 0; float: left; margin-bottom: 6px; }
.eltern legend + * { clear: both; }
html.js .nojs-only { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { background: var(--snow); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.privacy summary { cursor: pointer; font-weight: 600; }
.privacy ul { padding-left: 18px; margin: 10px 0 4px; }
.privacy li { margin-bottom: 6px; font-size: .93rem; }

.btn { display: inline-block; font: inherit; font-weight: 600; font-size: .95rem; padding: 9px 16px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; width: auto; }
.btn:hover { border-color: var(--night-2); color: var(--ink); }
.btn.primary { background: var(--night-2); border-color: var(--night-2); color: #fff; }
.btn.primary:hover { background: var(--night); }
.btn.danger { color: var(--err); border-color: #efc3bf; }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.big { width: 100%; padding: 15px; font-size: 1.1rem; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary.big { background: linear-gradient(180deg, #24426b, var(--night-2)); box-shadow: 0 4px 14px rgba(29, 54, 92, .3); }

.thanks h2 { margin-top: 0; }
.addr { font-size: 1.15rem; font-weight: 700; background: var(--snow); border-radius: 10px; padding: 10px 14px; word-break: break-all; }
.foot { text-align: center; color: var(--muted); font-size: .9rem; padding: 8px 16px 36px; }
.foot p { margin: 4px 0; }

/* ------------------------------------------------------------ Admin */
body.admin { background: #eef1f7; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; background: var(--night); padding: 10px 16px; }
.topnav a, .linkbtn { color: #dfe7f5; text-decoration: none; font-weight: 600; font-size: .95rem; }
.topnav a:hover, .linkbtn:hover { color: var(--gold); }
.topnav .brand { color: #fff; margin-right: 10px; }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; width: auto; }
.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.inline input { width: auto; }
.right { margin-left: auto; }
.awrap { max-width: 1280px; margin: 0 auto; padding: 18px 16px 48px; }
.panel { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(12, 23, 49, .08); }
.panel h1 { font-size: 1.4rem; margin: 0 0 12px; }
.panel h2 { font-size: 1.1rem; margin: 0 0 10px; }
.panel.narrow { max-width: 420px; margin: 40px auto; }
.panel .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel .head h1 { margin: 0 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(12, 23, 49, .08); border-top: 4px solid var(--night-2); }
.stat.ok { border-top-color: var(--ok); }
.stat.warn { border-top-color: var(--gold); }
.stat .n { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat .n small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.stat .l { color: var(--muted); font-size: .85rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.exports { font-size: .95rem; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.filter input[type=search] { flex: 1 1 280px; }
.filter select { flex: 0 1 220px; }
.tablewrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(12, 23, 49, .08); }
.panel .tablewrap { box-shadow: none; border: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; background: #f6f8fc; color: var(--muted); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .04em; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 9px 10px; border-bottom: 1px solid #edf0f6; vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.st-storniert td { color: #98a0ad; }
.sub { color: var(--muted); font-size: .8rem; }
.sub.err, .err { color: var(--err); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 24px !important; }
.late { color: var(--err); font-weight: 700; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eef1f7; color: var(--ink); white-space: nowrap; }
.pill.ok, .pill.s-bezahlt, .pill.m-gesendet { background: var(--ok-bg); color: var(--ok); }
.pill.warn, .pill.s-offen, .pill.m-wartet, .pill.m-sendet { background: var(--warn-bg); color: var(--warn); }
.pill.err, .pill.m-fehler { background: var(--err-bg); color: var(--err); }
.pill.s-freiplatz { background: #e8eefc; color: #2848a0; }
.pill.s-warteliste { background: #f0eafb; color: #5b3a9a; }
.pill.s-storniert, .pill.off { background: #eceef2; color: #6b7280; }
.pill.u18 { background: #e6f2fb; color: #135d8f; }
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600; background: #eef1f7; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); font-weight: 500; }
dl.grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.grid dt { color: var(--muted); font-weight: 600; }
dl.grid dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { dl.grid { grid-template-columns: 1fr; } dl.grid dd { margin-bottom: 6px; } }
.pre { white-space: pre-wrap; }
.events { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.events li { padding: 4px 0; border-bottom: 1px solid #f0f2f7; }
.events li span { color: var(--muted); margin-right: 8px; }
pre.mailbody { white-space: pre-wrap; background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: inherit; font-size: .95rem; line-height: 1.55; }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; line-height: 1.45; }
.settings fieldset { border-top: 1px solid var(--line); padding-top: 14px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding: 18px 0 8px; }
input.short { width: 80px; }
code.big { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }
