/* Anmeldesystem Beachsportclub Cuxhaven – Markendesign von cux-beach.de.
   Schriften, Logo und Bilder liegen lokal (DSGVO), keine externen Anfragen. */
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/barlow-800.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 700; font-style: normal; font-display: swap; src: url(../fonts/inter.woff2) format("woff2"); }

:root {
  /* Marke Beachsportclub Cuxhaven (cux-beach.de) */
  --bg: #fdf9f4;            /* Creme */
  --surface: #ffffff;
  --tint: #eef3f4;          /* helle Blaugrau-Fläche */
  --dark: #12262c;          /* tiefes Petrol (Footer, Hero, Text) */
  --dark-2: #1b3841;        /* Überschriften-Petrol */
  --brand: #e77c1f;         /* Markenorange: nur Deko und Text auf Dunkel */
  --ink: #12262c;
  --ink-2: #2f474e;
  --muted: #566a70;
  --line: #ebe5db;
  --line-strong: #d6cec1;
  --field: #84959a;         /* Rahmen von Eingabefeldern, 3:1 */
  --accent: #ad5206;        /* Aktionsorange mit weißer Schrift 5,3:1 */
  --accent-hover: #8f4304;
  --accent-soft: #fbeadb;
  --ok-bg: #e1f1e7;
  --ok-ink: #14532d;
  --warn-bg: #fff0c9;
  --warn-ink: #5c3f00;
  --err-bg: #fde9e7;
  --err-ink: #9b1c1c;
  --info-bg: #e3eef0;
  --info-ink: #1b3841;
  --radius: 8px;
  --radius-card: 10px;
  --shadow: 0 2px 14px rgba(18, 38, 44, .08);
  --measure: 68ch;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--field) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16.5px/1.6 var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
::selection { background: var(--accent); color: #fff; }
input, select, textarea { caret-color: var(--accent); accent-color: var(--accent); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: #fff; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }

/* Kopf und Fuß */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 76px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--dark-2); font: 600 1.1rem/1.15 var(--font-head); text-decoration: none; }
.brand img { width: 48px; height: 48px; display: block; flex: none; }
.brand em { font-style: normal; color: var(--accent); }
.nav { display: flex; flex-wrap: nowrap; gap: .1rem 1.5rem; align-items: center; margin-left: auto; font: 600 1rem var(--font-head); white-space: nowrap; }
.nav a { color: var(--ink); padding: .35rem 0; border-bottom: 2px solid transparent; text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.nav .who { color: var(--muted); }
.header-cta { flex: none; }

.site-footer { margin-top: 4rem; background: var(--dark); color: #c9d6d9; font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem 3rem; padding-block: 3rem 2rem; }
.site-footer h2 { font: 700 1rem var(--font-head); color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.site-footer p { margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); }
.site-footer .brandline { font: 700 1.25rem var(--font-head); color: #fff; margin-bottom: .6rem; }
.site-footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 1.25rem; color: #a9bbc0; font-size: 14px; }
main:has(.rules:last-child) + .site-footer { margin-top: 0; }

/* Hero (Startseite) */
.hero { position: relative; isolation: isolate; background: var(--dark) url(../img/hero.webp) center 30% / cover; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18, 38, 44, .94) 0%, rgba(18, 38, 44, .82) 50%, rgba(18, 38, 44, .58) 100%); }
.hero .wrap { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.hero h1 { color: #fff; max-width: 16ch; font-size: clamp(2.4rem, 1.4rem + 3.8vw, 4rem); line-height: 1.04; }
.hero p { color: #e3ecee; font-size: 1.15rem; max-width: 50ch; margin: 1.1rem 0 0; }
.hero .actions-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.9rem; }
.btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); color: #fff; }

/* Dunkles Kopfband für Unterseiten */
.page-head.band { background: var(--dark); color: #fff; box-shadow: 0 0 0 100vmax var(--dark); clip-path: inset(0 -100vmax); margin-bottom: 2.25rem; padding-block: clamp(2rem, 5vw, 3.25rem); }
.band h1 { color: #fff; }
.band .lead { color: #e3ecee; }
.band .facts dt { color: #b7c8cc; }
.band .facts dd { color: #fff; }
.band a { color: #fff; }

/* Typografie */
h1, h2, h3 { font-family: var(--font-head); color: var(--dark-2); line-height: 1.1; letter-spacing: -.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.1rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.page-head { padding: clamp(1.75rem, 4vw, 3rem) 0 1.5rem; }
.page-head h1 { margin-bottom: .6rem; }
.page-head .lead { color: var(--ink-2); font-size: 1.1rem; max-width: var(--measure); margin: 0; }

/* Faktenzeile */
.facts { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin: 1rem 0 0; padding: 0; }
.facts div { display: flex; gap: .45rem; align-items: baseline; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; font-weight: 600; font-family: var(--font-head); font-size: 1.1rem; }

/* Startseite: Turnierkarten */
.events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding-top: 3rem; scroll-margin-top: 1rem; align-items: stretch; }
.event { display: flex; flex-direction: column; gap: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.75rem; }
.event h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: .35rem; }
.event .sub { color: var(--ink-2); margin: 0; }
.event ul { list-style: none; margin: 0; padding: 0; }
.event li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.event li:last-child { border-bottom: 0; }
.event li span:last-child { font-weight: 600; white-space: nowrap; }
.event .cta { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; margin-top: auto; }
.deadline { font-size: 15px; color: var(--muted); }
.deadline.soon { color: var(--warn-ink); font-weight: 650; }
.rules { max-width: none; margin-top: 3.5rem; background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); padding-block: 3rem; }
.rules > h2 { margin-bottom: 1rem; }
.rules > div { max-width: var(--measure); padding: 1.1rem 0; border-top: 1px solid #cfdde0; }
.rules h3 { margin-bottom: .3rem; }
.rules p { color: var(--ink-2); margin: 0; font-size: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .65rem 1.5rem; border-radius: 5px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font: 700 1.05rem/1.1 var(--font-head); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-danger { background: transparent; border-color: var(--err-ink); color: var(--err-ink); }
.btn-small { min-height: 40px; padding: .4rem 1rem; font-size: .95rem; }
.btn[disabled], .btn.is-disabled { background: #e8e4dc; border-color: #e8e4dc; color: #5b6468; cursor: not-allowed; transform: none; }
.btn.is-loading { pointer-events: none; opacity: .75; }

/* Formular-Layout */
.form-layout > * { min-width: 0; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; padding-bottom: 3rem; }
.fsec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.75rem; margin-bottom: 1.25rem; }
.fsec > h2 { margin-bottom: .35rem; }
.fsec > .hint { color: var(--ink-2); margin: 0 0 1.25rem; max-width: var(--measure); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.span2 { grid-column: 1 / -1; }
.field label, .field .lbl { display: block; font-weight: 600; color: var(--dark-2); margin-bottom: .35rem; font-size: 16px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .help { color: var(--muted); font-size: 15px; margin-top: .3rem; }
input:not([type]), input[type=date], input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--field); border-radius: var(--radius);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder { color: #5a6c72; opacity: 1; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(173, 82, 6, .28); }
.field.has-error input, .field.has-error select { border-color: var(--err-ink); background: #fff7f6; }
.field-error { color: var(--err-ink); font-size: 15px; font-weight: 600; margin-top: .3rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Teams */
.teams { display: grid; gap: .9rem; margin-bottom: 1rem; }
.team { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) auto; gap: .75rem; align-items: end; padding: 1rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.team .name-wrap { position: relative; }
.team .count { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
.team .name-wrap input { padding-right: 3.2rem; }
.team .rm { width: 48px; min-height: 48px; padding: 0; }
.team .rm svg { width: 20px; height: 20px; }
.team .tprice { grid-column: 1 / -1; font-size: 15px; color: var(--muted); margin: -.25rem 0 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.team.is-new, .person.is-new { animation: rise .2s var(--ease); }

/* Mengen */
.qty-list { border-top: 1px solid var(--line); }
.qty { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.qty .info { overflow-wrap: anywhere; }
.qty .info strong { display: block; font-weight: 600; }
.qty .info span { font-size: 15px; color: var(--muted); }
.qty .each { font-weight: 650; white-space: nowrap; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.stepper button { width: 48px; min-height: 46px; border: 0; background: transparent; display: grid; place-items: center; color: var(--accent); cursor: pointer; border-radius: 6px; }
.stepper button svg { width: 16px; height: 16px; }
.stepper input { width: 3.5rem; min-height: 46px; text-align: center; border: 0; border-inline: 1.5px solid var(--line); border-radius: 0; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.group-title { margin: 1.5rem 0 .4rem; font-size: 1rem; }

.page-head.compact { padding: 1.5rem 0 1rem; }
.page-head.compact h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.back { display: inline-flex; align-items: center; gap: .35rem; font-size: 15px; margin-bottom: .75rem; }
.back svg { width: 14px; height: 14px; }
details.disclosure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding-inline: 1.75rem; margin-bottom: 1.25rem; }
details.disclosure > summary { list-style: none; cursor: pointer; padding: 1.5rem 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary h2 { margin: 0; }
details.disclosure > summary .opt { color: var(--muted); font-size: 15px; font-weight: 400; }
details.disclosure > summary::after { content: ""; width: .6em; height: .6em; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s var(--ease); flex: none; align-self: center; }
details.disclosure[open] > summary::after { transform: rotate(-135deg); }
details.disclosure > .body { padding-bottom: 1.75rem; }
details.disclosure > .body > .hint { color: var(--ink-2); margin: 0 0 1.25rem; max-width: var(--measure); }

/* Teilnehmerliste */
.plist { max-width: 900px; }
.person { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .75rem; align-items: end; padding: 1rem; margin-bottom: .75rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); position: relative; }
.person .pn { grid-column: span 4; }
.person .ps { grid-column: span 3; }
.person .pz { grid-column: span 2; }
.person .pa { grid-column: span 2; }
.person .pl { grid-column: span 5; }
.person .pq { grid-column: span 6; }
.person .rm { grid-column: 12; grid-row: 1 / span 1; justify-self: end; width: 48px; min-height: 48px; padding: 0; }
.person .rm svg { width: 20px; height: 20px; }
@media (max-width: 760px) {
  .person { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 1rem; }
  .person .pn, .person .ps, .person .pl, .person .pq { grid-column: span 2; }
  .person .pz, .person .pa { grid-column: span 1; }
  .person .rm { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; width: auto; min-height: 48px; }
}

/* Zustimmung */
.consent { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; padding: 1rem; background: #fff; border: 1.5px solid var(--field); border-radius: var(--radius); cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; }
.consent.has-error { border-color: var(--err-ink); background: #fff7f6; }
.consent span { color: var(--ink-2); font-size: 16px; }

/* Zusammenfassung */
:is(.summary, .receipt) { position: sticky; top: 1.25rem; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); }
:is(.summary, .receipt) h2 { font-size: 1.05rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
:is(.summary, .receipt) .lines { list-style: none; margin: 0; padding: .5rem 1.25rem; min-height: 4.5rem; }
:is(.summary, .receipt) .lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: 15.5px; border-bottom: 1px dotted var(--line); }
:is(.summary, .receipt) .lines li:last-child { border-bottom: 0; }
:is(.summary, .receipt) .lines .what { min-width: 0; overflow-wrap: anywhere; }
:is(.summary, .receipt) .lines .what small { display: block; color: var(--muted); font-size: 14px; }
:is(.summary, .receipt) .lines .sum { white-space: nowrap; font-weight: 600; }
:is(.summary, .receipt) .empty { color: var(--muted); font-size: 15px; padding: .75rem 0; display: block; }
:is(.summary, .receipt) .total { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 1.25rem; border-top: 2px solid var(--ink); font-size: 1.1rem; }
:is(.summary, .receipt) .total output { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
:is(.summary, .receipt) .next { padding: 0 1.25rem 1.25rem; font-size: 15px; color: var(--ink-2); }
:is(.summary, .receipt) .next .note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: .6rem .8rem; margin-bottom: 1rem; font-weight: 550; }
:is(.summary, .receipt) .btn { width: 100%; }
.summary-toggle { display: none; }
.mobile-only { display: none; }

/* Hinweise */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin: 0 0 1.5rem; background: var(--warn-bg); color: var(--warn-ink); }
.alert.error { background: var(--err-bg); color: var(--err-ink); }
.alert.info { background: var(--info-bg); color: var(--info-ink); }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert a { color: inherit; font-weight: 650; }
.alert strong { font-weight: 700; }

/* Danke */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; max-width: var(--measure); }
.steps li { position: relative; padding: 1rem 0 1rem 3.25rem; border-top: 1px solid var(--line-strong); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .9rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; }
.steps li strong { display: block; }
.steps li.is-now::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.ref { display: inline-block; font-weight: 750; font-size: 1.25rem; letter-spacing: .02em; padding: .2rem .7rem; background: var(--accent-soft); border-radius: 6px; user-select: all; }

/* Tabellen und Admin */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { flex: 1 1 200px; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1rem; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .n { margin-left: .35rem; color: var(--muted); font-weight: 500; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { position: sticky; top: 0; background: var(--tint); font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 14px; }
.pill { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.pill.new { background: var(--warn-bg); color: var(--warn-ink); }
.pill.confirmed { background: var(--info-bg); color: var(--info-ink); }
.pill.paid { background: var(--ok-bg); color: var(--ok-ink); }
.pill.cancelled { background: var(--err-bg); color: var(--err-ink); }
.sumline { display: flex; flex-wrap: wrap; gap: .5rem 2rem; color: var(--ink-2); margin: 0 0 1rem; }
.sumline strong { color: var(--ink); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; }
.panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.panel h2 { font-size: 1.05rem; margin-bottom: .75rem; }
.actions { display: grid; gap: .6rem; }
.actions .btn { width: 100%; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.timeline li { padding: .6rem 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { display: block; color: var(--muted); font-size: 14px; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.5rem; margin: 0 0 1.5rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.login { max-width: 400px; padding-block: 3rem; }
.login .field { margin-bottom: 1rem; }

/* Lesetexte (Impressum, Datenschutz) */
.prose { max-width: var(--measure); padding-bottom: 2rem; }
.prose h2 { margin: 2.25rem 0 .6rem; font-size: 1.25rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }

/* Mobil */
@media (max-width: 980px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .summary { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 20; border-width: 2px 0 0; border-radius: 0; box-shadow: 0 -8px 24px rgba(18, 38, 44, .14); }
  .summary #sumBody { display: none; opacity: 0; transform: translateY(8px); transition: opacity .18s var(--ease), transform .18s var(--ease), display .18s allow-discrete; }
  .summary.open #sumBody { display: block; opacity: 1; transform: none; border-top: 1px solid var(--line); }
  @starting-style { .summary.open #sumBody { opacity: 0; transform: translateY(8px); } }
  .summary #sumBody > h2, .summary #sumBody > .total { display: none; }
  .summary.open .lines { max-height: 40vh; overflow: auto; }
  .summary-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; padding: .5rem 1.25rem; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
  .summary-toggle .t { font-size: 1.4rem; font-weight: 750; letter-spacing: -.02em; }
  .summary-toggle .more { color: var(--accent); font-weight: 650; }
  .summary-toggle .more::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .6em; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(.1em) rotate(-45deg); transition: transform .2s var(--ease); }
  .summary.open .summary-toggle .more::after { transform: translateY(-.1em) rotate(135deg); }
  .summary .btn.desktop-submit { display: none; }
  .mobile-only { display: inline-flex; width: 100%; margin-top: 1.25rem; }
  .form-layout { padding-bottom: 6rem; }
  .event { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem 0; }
  .event .cta { min-width: 0; }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .grid2 { grid-template-columns: 1fr; }
  .team { grid-template-columns: minmax(0, 1fr) auto; }
  .team .sel { grid-column: 1 / -1; }
  .team .name-wrap { grid-column: 1; }
  .qty { grid-template-columns: minmax(0, 1fr) auto; }
  .qty .each { grid-column: 1; grid-row: 2; font-size: 15px; color: var(--muted); font-weight: 500; }
  .qty .stepper { grid-column: 2; grid-row: 1 / span 2; }
  .nav { gap: 1rem; }
  /* Admin-Tabelle als gestapelte Zeilen */
  table.stack thead { position: absolute; left: -9999px; }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .9rem; border-bottom: 1px solid var(--line); }
  table.stack td:nth-child(2), table.stack td:nth-child(3), table.stack td:nth-child(6) { grid-column: 1 / -1; }
  table.stack td:nth-child(5) { justify-self: end; align-self: center; }
  table.stack td { display: block; padding: 0; border: 0; }
  table.stack td.num { text-align: left; }
  table.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 14px; }
  table.stack td.first { grid-column: 1 / -1; font-weight: 650; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print {
  .site-header, .site-footer, .summary, .nav { display: none; }
  body { background: #fff; }
}

.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { min-height: 40px; padding: .3rem .6rem; }
.is-waitlist td { background: #fff8e3; }

.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0 0 .5rem; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
details.plain { margin-top: .75rem; }
details.plain summary { cursor: pointer; color: var(--accent); font-weight: 600; }
ol.teamlist { margin: .5rem 0 0; padding-left: 1.4rem; columns: 2 280px; }

textarea { width: 100%; padding: .7rem .8rem; font: inherit; line-height: 1.5; color: var(--ink); background: #fff; border: 1.5px solid var(--field); border-radius: var(--radius); resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(173, 82, 6, .28); }
.mailprev { margin-top: 1rem; padding: 1rem; background: var(--bg); border-radius: var(--radius); }
.mailprev pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 15px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--accent-soft); padding: .05em .35em; border-radius: 4px; }


/* Hover nur auf Geräten mit Maus: auf dem Handy bleibt Hover sonst nach dem Tippen hängen */
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
  .brand:hover { color: var(--ink); }
  .nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
  .btn:not([disabled]):not(.is-disabled):hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
  .btn-quiet:hover { background: var(--accent-soft); color: var(--accent-hover); }
  .btn-danger:hover { background: var(--err-bg); border-color: var(--err-ink); color: var(--err-ink); }
  input:hover, select:hover { border-color: var(--ink-2); }
  .stepper button:hover { background: var(--accent-soft); }
  .tabs a:hover { color: var(--ink); background: var(--accent-soft); border-radius: 6px 6px 0 0; }
  tbody tr:hover { background: #f6f9fa; }
}

/* Druck-Feedback für alle Tippflächen */
.stepper button, .tabs a, .summary-toggle, .consent { transition: background-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease); }
.stepper button:active, .tabs a:active, .summary-toggle:active { transform: scale(.97); }
.consent:active { transform: scale(.99); }
.nav a { transition: color .15s var(--ease), border-color .15s var(--ease); }

@media (max-width: 840px) {
  .is-admin .wrap { min-height: 0; padding-block: .5rem; row-gap: 0; }
  .is-admin .nav { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; gap: 1.25rem; }
  .is-admin .nav::-webkit-scrollbar { display: none; }
}

/* Markendesign: Karten, Aufstellung, Tabellen */
.team, .person, .consent { background: var(--bg); }
.stepper { background: #fff; border-color: var(--field); }
.summary, .receipt { border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); background: #fff; }
.summary > #sumBody > h2, .receipt > h2 { background: var(--tint); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.summary h2, .receipt h2 { font-size: 1.2rem; }
.summary .total, .receipt .total { border-top: 1px solid var(--line-strong); }
.summary .total output, .receipt .total output { font: 800 2rem/1 var(--font-head); color: var(--dark-2); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tabs a { font-family: var(--font-head); font-size: 1.05rem; }
.login form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.5rem; }
.steps li::before { border-color: var(--dark-2); }
.ref { background: var(--accent-soft); color: var(--dark-2); font-family: var(--font-head); }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.5rem 1.75rem 1rem; margin-bottom: 1rem; }
.prose h2:first-child { margin-top: .5rem; }

@media (max-width: 980px) {
  .summary { border-top-width: 3px; border-radius: 0; }
  .events { grid-template-columns: minmax(0, 1fr); padding-top: 2rem; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .site-header .wrap { min-height: 64px; }
  .brand { font-size: 1rem; } .brand img { width: 40px; height: 40px; }
  .header-cta { display: none; }
  .fsec { padding: 1.25rem; }
  details.disclosure { padding-inline: 1.25rem; }
  .hero .actions-row .btn { width: 100%; }
}

/* Gleichbreite Ziffern nur dort, wo Zahlen untereinander stehen (nicht im Fließtext, sonst werden Bindestriche zu breit) */
.event li span:last-child, .total output, [data-total], .sum, td.num, th.num, .facts dd, .count, .stepper input, .tabs .n, .sumline strong, .summary-toggle .t { font-variant-numeric: tabular-nums; }
