:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --primary: #3268ad;
  --primary-dark: #27558e;
  --accent: #eaf1fb;
  --text: #1d2a39;
  --muted: #5f6f82;
  --border: #dfe8f3;
  --danger: #ee2b25;
  --surface-soft: #f7fafd;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; min-height: 100vh; padding: 24px 12px; background: var(--bg); color: var(--text); font: 16px Arial, Helvetica, sans-serif; }
h1, h2 { margin: 0; }
p { margin: 0 0 12px; line-height: 1.55; }
strong { font-weight: 600; }
a { color: var(--primary); font-weight: 500; }

/* Gemeinsame Karte: Formularseiten (main) und Textseiten (.card) */
main.form-page { width: min(100%, 720px); margin: 0 auto; padding: 28px; }
main.text-page { width: min(100%, 820px); margin: 0 auto; }
main.form-page,
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 12px 30px rgba(17, 38, 61, .06); }
main.text-page { background: none; border: 0; box-shadow: none; padding: 0; }
.card { padding: 26px; }

/* Kopfbereich */
.brand { display: block; width: 84px; height: 100px; object-fit: contain; margin: 0 auto 12px; }
.form-page h1 { margin-bottom: 6px; text-align: center; font-size: 1.5rem; font-weight: 600; }
.form-page h2 { margin: 28px 0 4px; font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); }
.lead { color: var(--muted); text-align: center; margin: 0 0 8px; }
.event-info { text-align: center; margin: 4px 0 0; color: var(--muted); }

.page-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-header img { width: 48px; height: 58px; object-fit: contain; }
.eyebrow { margin: 0 0 5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 600; }
.card h2 { margin-bottom: 8px; font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); }
.card section + section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.card ul { margin: 8px 0 12px; padding-left: 22px; }
.card li { line-height: 1.55; }

.back-links { display: flex; gap: 18px; margin-top: 20px; }
.back-links a, .back-link { color: var(--primary); text-decoration: none; }
.back-link { display: inline-block; margin-top: 20px; }
.back-links a:hover, .back-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* Formulare */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.grid > * { min-width: 0; }
.grid .wide, .grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; margin-top: 14px; font-weight: 700; font-size: .92rem; min-width: 0; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-weight: 400; background: var(--card); }
textarea { resize: vertical; }
input[type="date"] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; min-height: 44px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 12px; }
.check input { width: auto; margin-top: 4px; }
.check a { font-weight: 700; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; }

button { width: 100%; margin-top: 24px; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: .2s ease; }
button:hover:not(:disabled) { background: var(--primary-dark); }
button:disabled { opacity: .6; cursor: wait; }

.message { margin-top: 16px; padding: 12px; border-radius: var(--radius-sm); }
.message.error { background: #fdecec; color: #a11a16; }
.message.ok { background: var(--accent); color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.legal { display: flex; justify-content: center; gap: 16px; margin-top: 22px; font-size: .9rem; }
.legal a { font-weight: 700; }

/* Helfer-Aufgabenliste */
.jobs { display: grid; gap: 10px; margin-top: 12px; }
.job { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-weight: 400; cursor: pointer; }
.job input { width: auto; margin-top: 4px; }
.job.full { opacity: .55; cursor: not-allowed; background: var(--surface-soft); }
.job strong { display: block; }
.job .free { color: var(--primary); font-weight: 700; font-size: .85rem; }
.job .signed-up { color: var(--muted, #5b6672); font-size: .85rem; margin-top: 2px; overflow-wrap: anywhere; }
.job.full .free { color: var(--danger); }
.job-group { display: grid; gap: 8px; padding-top: 4px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  main.form-page { padding: 20px; }
}

@media (max-width: 560px) {
  body { padding: 18px 12px; }
  .card { padding: 20px; }
  .page-header { align-items: flex-start; }
  .back-links { flex-direction: column; gap: 8px; }
}
