:root {
  --navy: #00274d;
  --navy-2: #0b3c6e;
  --ink: #1b2430;
  --muted: #5d6877;
  --line: #c9d0d9;
  --bg: #f1f3f6;
  --card: #ffffff;
  --blob: #d9dce1;
  --accent: #0b5cad;
  --error: #b3261e;
  --error-bg: #fdecea;
  --warn-bg: #fff4d6;
  --ok: #1d6f42;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- Kopf ---------- */
.hero { background: var(--navy); color: #fff; border-radius: 0 0 50% 50% / 0 0 28px 28px; padding: 22px 0 30px; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero h1 {
  margin: 0; font-size: clamp(1.15rem, 5.6vw, 3rem); line-height: 1.1;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 800;
}
.hero-sub { margin: 6px 0 0; opacity: .85; letter-spacing: .04em; }
.hero img { width: clamp(72px, 16vw, 107px); height: auto; flex: none; }

.bubble {
  display: inline-block; margin: 22px 0 6px; padding: 14px 26px;
  background: var(--blob); border-radius: 40px 60px 50px 70px / 50px 40px 60px 40px;
  font-weight: 700;
}

/* ---------- Karten ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 22px 22px 24px; margin: 18px 0;
  box-shadow: 0 1px 2px rgba(0, 39, 77, .08), 0 4px 16px rgba(0, 39, 77, .05);
}
.card h2 {
  margin: 0 0 14px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em; color: var(--navy);
  padding-bottom: 8px; border-bottom: 3px solid var(--navy);
}
.card h3 { margin: 18px 0 8px; font-size: 1rem; }
.lead { font-weight: 700; margin: 0 0 12px; }
.hint { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
.opt { color: var(--muted); font-weight: 400; }
.sub-block { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sub-block .hint { margin: 0 0 10px; }

/* ---------- Felder ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid .wide { grid-column: 1 / -1; }
.field { min-width: 0; border: 0; padding: 0; margin: 0; }
.field.split { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
.field.split.rev { grid-template-columns: 1fr 6em; }
label, legend { font-size: .9rem; font-weight: 600; padding: 0; }
.field > label, .field.split label { display: block; margin-bottom: 4px; }
input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=date], select {
  width: 100%; min-height: 46px; padding: 9px 12px; font: inherit; color: inherit;
  background: #fff; border: 1.5px solid var(--line); border-radius: 9px; appearance: none; -webkit-appearance: none;
}
select {
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid #7fb2ea; outline-offset: 2px; }
input[readonly] { background: #f3f5f8; color: var(--muted); }
input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--navy); flex: none; margin: 2px 0 0; }

.inline-choices { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.inline-choices legend { margin-bottom: 8px; }
.inline-choices label { display: inline-flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 1rem; min-height: 34px; padding-top: 5px; cursor: pointer; }
.zahlung { margin-bottom: 16px; }

/* ---------- Auswahlkarten ---------- */
.choice { position: relative; display: block; cursor: pointer; font-weight: 400; font-size: 1rem; }
.choice input { position: absolute; top: 14px; left: 13px; }
.choice-body {
  display: block; height: 100%; padding: 11px 12px 11px 44px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .12s, background-color .12s;
}
.choice-body small { display: block; color: var(--muted); font-size: .78rem; }
.choice-body b { font-weight: 700; }
.choice-body i { display: block; font-style: normal; color: var(--muted); font-size: .84rem; }
.choice:hover .choice-body { border-color: var(--navy-2); }
.choice input:checked + .choice-body { border-color: var(--navy); background: #e8f0f9; box-shadow: inset 0 0 0 1px var(--navy); }

.tarif-gruppe, .spende { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.tarif-gruppe legend, .spende legend { margin-bottom: 8px; font-size: 1rem; font-weight: 400; }
.tarif-gruppe legend span, .spende legend span { color: var(--muted); font-size: .86rem; }
.tarif-optionen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { font-style: normal; font-size: .74rem; font-weight: 700; background: var(--navy); color: #fff; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.choice.single { margin-bottom: 18px; }
.stack-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spende { padding-top: 14px; border-top: 1px dashed var(--line); }
.spende-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; }
.spende-row .betrag { width: 9.5em; }

.info, .creditor, .legal { background: #eceef1; border-radius: 10px; padding: 12px 16px; font-size: .9rem; }
.info p, .creditor p, .legal p { margin: 6px 0; }
.creditor { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; }
.legal { max-height: 15.5em; overflow: auto; margin-bottom: 14px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 1rem; margin: 14px 0; cursor: pointer; padding: 10px 12px; border-radius: 10px; border: 1.5px solid transparent; }
.check { flex-wrap: wrap; }
.check > span { flex: 1; min-width: 0; }
.check .field-error { flex: 0 0 100%; margin: 0; }
.check small { color: var(--muted); display: inline-block; margin-top: 4px; }

/* ---------- Unterschrift ---------- */
.sigfield { margin-top: 18px; }
.sig-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sig-label { font-weight: 600; font-size: .9rem; }
.sigpad { position: relative; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.sigpad::after { content: ""; position: absolute; left: 5%; right: 5%; bottom: 26%; border-bottom: 1.5px solid #9aa4b1; pointer-events: none; }
.sigpad canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; position: relative; z-index: 1; }
.sig-placeholder { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; color: #8a94a1; font-size: .85rem; pointer-events: none; padding: 0 8px; }
.sigpad.signed .sig-placeholder { display: none; }

/* ---------- Buttons / Meldungen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; font: inherit; font-weight: 700;
  color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 99px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #e8f0f9; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { border-color: var(--line); font-weight: 600; }
.btn.small { min-height: 36px; padding: 5px 14px; font-size: .88rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { margin: 22px 0 34px; text-align: center; }
.actions.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; margin: 18px 0 8px; }
.actions .primary { font-size: 1.05rem; padding: 12px 28px; }

.notice { border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.notice.error { background: var(--error-bg); color: var(--error); border: 1.5px solid var(--error); font-weight: 600; }
.notice.warn { background: var(--warn-bg); border: 1.5px solid #d9a400; }
.notice ul { margin: 8px 0 0; padding-left: 22px; }
.notice li + li { margin-top: 6px; }
.notice > :first-child { margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.field-error { color: var(--error); font-size: .86rem; font-weight: 600; margin: 5px 0 0; }
.invalid input:not([type=radio]):not([type=checkbox]), .invalid select, input.invalid { border-color: var(--error); background: var(--error-bg); }
.invalid .sigpad, .check.invalid { border-color: var(--error); background: var(--error-bg); }
.done h2 { border-color: var(--ok); color: var(--ok); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer { color: var(--muted); font-size: .84rem; text-align: center; padding-bottom: 30px; }

@media (max-width: 640px) {
  .grid, .stack-choices { grid-template-columns: 1fr; }
  .tarif-optionen { grid-template-columns: 1fr; gap: 8px; }
  .card { padding: 18px 16px 20px; }
  .bubble { padding: 12px 20px; }
  .actions.row .btn { flex: 1 1 100%; }
  .actions .primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.sig-hint { font-size: .92rem; color: var(--ink); background: #eceef1; border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
