/* =====================================================================
 * Uni-Sportforum Kiel – Stylesheet
 * Farben/Typografie angelehnt an ein universitäres Corporate Design
 * (dunkles Blau, rote Akzente, klare Flächen). Keine offiziellen Logos.
 * ===================================================================== */
:root {
  --blue: #003c78;
  --blue-dark: #00264d;
  --blue-700: #0b4f96;
  --blue-50: #eaf1f9;
  --blue-100: #d3e2f2;
  --red: #c8102e;
  --red-dark: #9e0c24;
  --green: #1d7a46;
  --green-50: #e6f4ec;
  --amber: #a15c00;
  --amber-50: #fff3df;
  --ink: #16202c;
  --ink-2: #44505e;
  --ink-3: #6b7684;
  --line: #d9dee5;
  --bg: #ffffff;
  --bg-soft: #f3f5f8;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(0, 20, 50, .06), 0 4px 16px rgba(0, 20, 50, .06);
  --font: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue-700); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--blue-dark); }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

/* ---------- Leisten ---------- */
.demo-bar { background: var(--amber-50); color: #5a3b00; font-size: .88rem; border-bottom: 1px solid #f0d9ad; }
.demo-bar .wrap { padding-top: 6px; padding-bottom: 6px; }
.service-bar { background: var(--blue-dark); color: #cfdcec; font-size: .9rem; }
.service-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.service-bar a { color: #e3ecf6; text-decoration: none; margin-right: 18px; }
.service-bar a:hover { color: #fff; text-decoration: underline; }
.service-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--blue); margin-right: auto; }
.brand:hover { color: var(--blue); }
.brand-mark { width: 48px; height: 48px; flex: none; color: var(--blue); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; color: var(--blue-dark); line-height: 1.1; }
.brand-sub { font-size: .9rem; color: var(--ink-3); }
.header-search { display: flex; border: 1px solid var(--line); background: var(--bg-soft); }
.header-search input { border: 0; background: transparent; padding: 9px 12px; font: inherit; font-size: .95rem; width: 260px; }
.header-search input:focus { outline: none; }
.header-search:focus-within { border-color: var(--blue); background: #fff; }
.header-search button { border: 0; background: var(--blue); color: #fff; padding: 0 12px; cursor: pointer; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; width: 26px; height: 3px; background: var(--blue); margin: 5px 0; }

.main-nav { background: var(--blue); }
.nav-inner { display: flex; align-items: stretch; justify-content: space-between; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; color: #fff; text-decoration: none; font-weight: 600; padding: 14px 18px; border-bottom: 4px solid transparent; }
.nav-list li:first-child a { padding-left: 0; }
.nav-list a:hover { background: var(--blue-700); }
.nav-list li:first-child a:hover { background: none; text-decoration: underline; }
.nav-list a.active { border-bottom-color: var(--red); }
.nav-auth { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .98rem;
  padding: 10px 18px; border: 2px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer;
  text-decoration: none; border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s; line-height: 1.2; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue-dark); }
.btn-light { background: #fff; color: var(--blue); border-color: #fff; }
.btn-light:hover { background: var(--blue-50); color: var(--blue-dark); border-color: var(--blue-50); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Layout-Bausteine ---------- */
main { min-height: 60vh; }
main:focus { outline: none; }
.loading { padding: 80px 20px; text-align: center; color: var(--ink-3); }
.section { padding: 48px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.kicker { display: inline-block; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin-bottom: 6px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }

.breadcrumb { font-size: .9rem; color: var(--ink-3); padding: 14px 0 0; }
.breadcrumb a { color: var(--ink-2); }
.page-head { padding: 26px 0 26px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-soft), #fff); }
.page-head h1 { margin-bottom: .25em; }

/* ---------- Hero (Startseite) ---------- */
.hero { position: relative; background: var(--blue-dark); color: #fff; overflow: hidden; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; padding-top: 64px; padding-bottom: 72px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.hero .lead { color: #d6e3f1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-box { background: #fff; color: var(--ink); padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.25); border-top: 5px solid var(--red); }
.hero-box h2 { font-size: 1.25rem; }
.hero-box label { font-weight: 600; font-size: .92rem; display: block; margin: 10px 0 4px; }
.stat-row { display: flex; gap: 32px; margin-top: 34px; flex-wrap: wrap; }
.stat b { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.stat span { color: #b8cce2; font-size: .92rem; }

/* ---------- Schnellzugriff-Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: -36px; position: relative; z-index: 2; box-shadow: var(--shadow); }
.tile { background: #fff; padding: 22px 22px 20px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; border-bottom: 4px solid transparent; transition: border-color .15s, background .15s; }
.tile:last-child { border-right: 0; }
.tile:hover { border-bottom-color: var(--red); color: var(--ink); background: #fbfcfe; }
.tile svg { width: 34px; height: 34px; color: var(--blue); }
.tile strong { font-size: 1.08rem; color: var(--blue-dark); }
.tile span { color: var(--ink-3); font-size: .93rem; }

/* ---------- Karten ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); padding: 20px; }
.card-shadow { box-shadow: var(--shadow); border-color: transparent; }

.sport-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); transition: box-shadow .15s, transform .15s; }
.sport-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.sport-card .sc-top { height: 92px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 12px 16px; color: #fff; }
.sport-card .sc-top svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sport-card .sc-mono { position: relative; font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; opacity: .95; }
.sport-card .sc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sport-card h3 { margin: 0; }
.sport-card p { font-size: .94rem; color: var(--ink-2); margin: 0; flex: 1; }
.sport-card .sc-meta { display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.sport-card .sc-meta b { color: var(--blue); }

.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-item { border-top: 4px solid var(--blue); background: #fff; padding: 18px 20px; }
.news-item:nth-child(2) { border-top-color: var(--red); }
.news-date { font-size: .85rem; color: var(--ink-3); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 18px 18px 18px 18px; background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 10px; }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--blue-50); color: var(--blue); white-space: nowrap; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-red { background: #fde8eb; color: var(--red-dark); }
.badge-grey { background: #eceff3; color: var(--ink-2); }

/* ---------- Filter ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 12px; align-items: end; background: var(--bg-soft); padding: 16px; border: 1px solid var(--line); margin-bottom: 20px; }
.filters label { font-size: .85rem; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; cursor: pointer; padding-bottom: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- Formulare ---------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #b9c2cd; background: #fff; border-radius: var(--radius); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 60, 120, .18); }
.form { max-width: 640px; }
.form-row { margin-bottom: 16px; }
.form-row > label, .form-label { display: block; font-weight: 700; margin-bottom: 5px; font-size: .95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.hint { font-size: .86rem; color: var(--ink-3); margin-top: 4px; }
fieldset { border: 1px solid var(--line); padding: 16px 18px 6px; margin: 0 0 18px; }
legend { font-weight: 800; color: var(--blue-dark); padding: 0 6px; font-size: 1.05rem; }
.alert { padding: 12px 14px; border-left: 4px solid var(--blue); background: var(--blue-50); margin-bottom: 16px; }
.alert-error { border-color: var(--red); background: #fdecee; color: #6b0718; }
.alert-ok { border-color: var(--green); background: var(--green-50); color: #0f4a2a; }
.alert-warn { border-color: var(--amber); background: var(--amber-50); color: #5a3b00; }

.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0 60px; align-items: start; }
.auth-side { background: var(--blue); color: #fff; padding: 32px; }
.auth-side h2 { color: #fff; }
.auth-side ul { padding-left: 1.1em; }
.auth-side code { background: rgba(255,255,255,.14); padding: 1px 6px; }

/* Auswahlkarten (Tarif / Zahlung) */
.choice-list { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; border: 2px solid var(--line); padding: 12px 14px; cursor: pointer; background: #fff; transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--blue-100); }
.choice input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.choice .c-main { flex: 1; }
.choice .c-title { font-weight: 700; }
.choice .c-sub { font-size: .88rem; color: var(--ink-3); }
.choice .c-price { font-weight: 800; color: var(--blue-dark); font-size: 1.1rem; white-space: nowrap; }
.pay-logo { width: 44px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .72rem; color: #fff; flex: none; border-radius: 3px; letter-spacing: .02em; }
.pay-1 { background: #1e3a8a; } .pay-2 { background: #111; } .pay-3 { background: #232f3e; } .pay-4 { background: #3c4043; }

/* ---------- Kurstabelle ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.kurse { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; }
table.kurse th { text-align: left; background: var(--blue); color: #fff; font-weight: 700; padding: 10px 12px; white-space: nowrap; font-size: .9rem; }
table.kurse td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.kurse tr:nth-child(even) td { background: #fafbfd; }
table.kurse tr:hover td { background: var(--blue-50); }
.k-nr { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.k-name { font-weight: 700; color: var(--blue-dark); }
.tzo { white-space: nowrap; }
.tzo div + div { margin-top: 4px; }
.tzo .ort { color: var(--ink-3); font-size: .88rem; display: block; }
.preis-mini { white-space: nowrap; font-variant-numeric: tabular-nums; }
.preis-mini small { color: var(--ink-3); display: block; font-size: .8rem; }
.platz-bar { height: 5px; background: #e3e8ee; margin-top: 6px; width: 90px; }
.platz-bar i { display: block; height: 100%; background: var(--green); }
.platz-bar.knapp i { background: var(--amber); }
.platz-bar.voll i { background: var(--red); }

/* Kurskarten (mobil) */
.kurs-cards { display: none; }
.kurs-card { border: 1px solid var(--line); padding: 16px; background: #fff; }
.kurs-card + .kurs-card { margin-top: 12px; }
.kurs-card .kc-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.kurs-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 12px; font-size: .95rem; }
.kurs-card dt { color: var(--ink-3); }
.kurs-card dd { margin: 0; }

/* ---------- Buchung ---------- */
.book-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; padding: 32px 0 60px; align-items: start; }
.summary { position: sticky; top: 140px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--blue); padding: 20px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 12px 0; }
.summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary .total { border-top: 2px solid var(--blue-dark); padding-top: 8px; font-weight: 800; font-size: 1.2rem; color: var(--blue-dark); }
.stepper { display: flex; gap: 0; margin-bottom: 22px; border: 1px solid var(--line); }
.stepper div { flex: 1; padding: 10px 12px; font-weight: 700; font-size: .92rem; color: var(--ink-3); background: var(--bg-soft); border-right: 1px solid var(--line); }
.stepper div:last-child { border-right: 0; }
.stepper div.on { background: var(--blue); color: #fff; }
.stepper div.done { background: var(--blue-50); color: var(--blue); }

/* ---------- Meine Buchungen ---------- */
.ticket { display: grid; grid-template-columns: 1fr 300px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ticket + .ticket { margin-top: 18px; }
.ticket-main { padding: 20px 22px; border-left: 6px solid var(--blue); }
.ticket.storniert .ticket-main { border-left-color: #9aa4b0; }
.ticket.storniert { opacity: .7; }
.ticket-code { padding: 18px; border-left: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fcfdfe; text-align: center; }
.ticket-code svg { width: 100%; height: auto; max-width: 260px; background: #fff; }
.ticket-code .code-txt { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; font-size: .9rem; color: var(--ink-2); }
.ticket h3 { font-size: 1.25rem; margin: 4px 0 8px; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 10px 0 12px; font-size: .95rem; }
.ticket dt { color: var(--ink-3); }
.ticket dd { margin: 0; }
.ticket-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); color: var(--ink-2); }

/* ---------- Veranstaltung ---------- */
.staetten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.staetten .choice { padding: 8px 12px; }
.kv-box { background: var(--bg-soft); border: 1px solid var(--line); padding: 16px; }
.kv-box table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.kv-box td { padding: 4px 0; }
.kv-box td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.kv-box tr.sum td { border-top: 1px solid var(--ink-3); font-weight: 800; padding-top: 8px; }

/* ---------- User-Menü ---------- */
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; padding: 6px 10px; }
.user-chip:hover { background: var(--blue-700); color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--blue); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: #c7d5e6; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 32px; }
.footer-h { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a, .site-footer .linklike { color: #e3ecf6; text-decoration: none; }
.site-footer a:hover, .site-footer .linklike:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; font-size: .88rem; }

/* ---------- Toast & Modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; opacity: 0; transition: .2s; z-index: 90; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; background: rgba(0, 20, 45, .55); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; max-width: 440px; width: 100%; padding: 28px; text-align: center; border-top: 5px solid var(--blue); }
.spinner { width: 42px; height: 42px; border: 4px solid var(--blue-100); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.check-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .header-search input { width: 180px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(2) { border-right: 0; }
  .tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters .f-q { grid-column: span 3; }
  .book-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .nav-list a { padding: 14px 12px; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header-search { display: none; }
  .brand-sub { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-inner { flex-direction: column; padding-bottom: 14px; }
  .nav-list { flex-direction: column; }
  .nav-list a, .nav-list li:first-child a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); border-left: 4px solid transparent; }
  .nav-list a.active { border-bottom-color: rgba(255,255,255,.12); border-left-color: var(--red); padding-left: 10px; }
  .nav-auth { padding-top: 12px; }
  .service-bar nav { display: none; }
  .service-inner { justify-content: flex-end; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 64px; }
  .grid-3, .grid-2, .news { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { order: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .f-q { grid-column: span 2; }
  .table-wrap { display: none; }
  .kurs-cards { display: block; }
  .ticket { grid-template-columns: 1fr; }
  .ticket-code { border-left: 0; border-top: 2px dashed var(--line); }
  .staetten { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-header { position: static; }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stepper div { font-size: .8rem; padding: 8px; }
}
@media print {
  .demo-bar, .service-bar, .main-nav, .site-footer, .header-search, .ticket-actions, .nav-toggle { display: none !important; }
  .ticket { box-shadow: none; break-inside: avoid; }
}

/* .wrap + .section zusammen: horizontaler Rand von .wrap, vertikaler von .section */
.wrap.section { padding: 48px 20px; }
@media (max-width: 820px) { .wrap.section { padding: 32px 16px; } }
.wrap.book-layout, .wrap.auth-wrap { padding-left: 20px; padding-right: 20px; }
@media (max-width: 820px) { .wrap.book-layout, .wrap.auth-wrap { padding-left: 16px; padding-right: 16px; } }


/* ---------- Sportkategorien ---------- */
.kat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.kat-chip { font: inherit; font-weight: 700; font-size: .95rem; padding: 8px 14px; border: 2px solid var(--blue-100); background: #fff; color: var(--blue); cursor: pointer; border-radius: 99px; }
.kat-chip span { font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.kat-chip:hover { border-color: var(--blue); }
.kat-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.kat-chip.on span { color: #cfdcec; }
.kat-section + .kat-section { margin-top: 36px; }
.kat-h { padding-bottom: 8px; border-bottom: 3px solid var(--blue); display: inline-block; padding-right: 24px; margin-bottom: 18px; }
.sc-kat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.filters { grid-template-columns: 2fr repeat(5, 1fr) auto; }
@media (max-width: 1020px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 820px) { .filters { grid-template-columns: 1fr 1fr; } .kat-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .kat-chip { white-space: nowrap; } }
.testmodus { display: inline-block; font-size: .75rem; font-weight: 800; background: var(--amber-50); color: var(--amber); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }

/* ---------- A–Z-Verzeichnis ---------- */
.az-tools { display: flex; gap: 20px; align-items: end; flex-wrap: wrap; margin-bottom: 18px; }
.az-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.az-letters a { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; font-weight: 800; text-decoration: none; background: var(--bg-soft); color: var(--blue); border: 1px solid var(--line); }
.az-letters a:hover { background: var(--blue); color: #fff; }
.az-group { scroll-margin-top: 150px; }
.az-letter { font-size: 1.6rem; color: var(--red); border-bottom: 2px solid var(--blue); padding-bottom: 4px; margin: 24px 0 0; }
.az-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.az-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.az-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 4px; text-decoration: none; color: var(--ink); }
.az-list a:hover { background: var(--blue-50); }
.az-name { font-weight: 700; color: var(--blue-dark); }
.az-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
@media (max-width: 820px) { .az-list { columns: 1; } .az-meta .badge { display: none; } .az-group { scroll-margin-top: 20px; } }

/* ---------- Passwortregeln ---------- */
.pw-regeln { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: .88rem; color: var(--ink-3); }
.pw-regeln li::before { content: "○"; display: inline-block; width: 1.2em; font-weight: 800; }
.pw-regeln li.ok { color: var(--green); }
.pw-regeln li.ok::before { content: "✓"; }
.pw-regeln li.fehlt { color: var(--red-dark); }
.pw-regeln li.fehlt::before { content: "✗"; }
.feld-msg { font-size: .88rem; margin-top: 4px; min-height: 1.2em; }
.feld-msg.ok { color: var(--green); }
.feld-msg.fehler { color: var(--red-dark); font-weight: 600; }
@media (max-width: 480px) { .pw-regeln { grid-template-columns: 1fr; } }

/* ---------- Rechtliches ---------- */
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal mark.ph { background: var(--amber-50); color: #5a3b00; padding: 0 3px; }

/* ---------- Belegungsplan ---------- */
.bp-wrap { max-width: none; }
.bp-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bp-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bp-nav input[type=date] { width: auto; padding: 6px 10px; }
.bp-scroll { overflow-x: auto; border: 1px solid var(--line); }
table.bp { border-collapse: collapse; width: 100%; min-width: 1100px; font-size: .86rem; background: #fff; }
table.bp thead th { position: sticky; top: 0; background: var(--blue); color: #fff; padding: 8px; text-align: left; font-size: .9rem; z-index: 1; }
table.bp thead th span { font-weight: 400; opacity: .85; font-size: .82rem; }
table.bp thead th.we { background: var(--blue-dark); }
table.bp tbody th { text-align: left; vertical-align: top; padding: 8px; width: 150px; color: var(--blue-dark); background: #fafbfd; border-top: 1px solid var(--line); position: sticky; left: 0; }
table.bp td { vertical-align: top; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); width: 13%; }
table.bp td.we { background: #f7f8fa; }
tr.bp-gruppe th { background: var(--blue-50) !important; color: var(--blue-dark); font-size: .95rem; position: static !important; }
.bp-hm { display: block; font-size: .78rem; color: var(--red-dark); font-weight: 600; margin-bottom: 3px; }
.bp-legende .bp-hm { display: inline; margin-right: 14px; }
.bp-kurs, .bp-event { display: block; padding: 4px 6px; margin-top: 4px; border-left: 3px solid var(--blue); background: var(--blue-50); text-decoration: none; color: var(--ink); line-height: 1.3; }
.bp-kurs:hover { background: var(--blue-100); color: var(--ink); }
.bp-kurs span, .bp-event span { display: block; color: var(--ink-3); font-size: .76rem; }
.bp-event { border-left-color: var(--amber); background: var(--amber-50); }
.bp-kurs-l { border-left: 3px solid var(--blue); background: var(--blue-50); padding: 1px 6px; margin-right: 14px; }
.bp-event-l { border-left: 3px solid var(--amber); background: var(--amber-50); padding: 1px 6px; }
.bp-leer { color: #b0b8c2; }
@media print {
  @page { size: A3 landscape; margin: 8mm; }
  .site-header, .bp-tools, .breadcrumb { display: none !important; }
  .bp-scroll { overflow: visible; border: 0; }
  table.bp { min-width: 0; font-size: 7.5pt; }
  table.bp thead th, table.bp tbody th { position: static; }
}

/* ---------- Hallen buchen ---------- */
.hb-tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.hb-tag { font: inherit; font-size: .85rem; padding: 6px 2px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.hb-tag b { color: var(--blue-dark); }
.hb-tag.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.hb-tag.on b { color: #fff; }
.hb-tag[disabled] { opacity: .4; cursor: not-allowed; }
.hb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.hb-slot { font: inherit; font-weight: 700; font-size: .92rem; padding: 10px 4px; border: 2px solid; cursor: pointer; font-variant-numeric: tabular-nums; }
.hb-slot.frei { background: var(--green-50); border-color: #a9d8bd; color: var(--green); }
.hb-slot.frei:hover { border-color: var(--green); }
.hb-slot.belegt { background: #eef0f3; border-color: #eef0f3; color: #9aa4b0; text-decoration: line-through; cursor: not-allowed; }
.hb-slot.gewaehlt { background: var(--blue); border-color: var(--blue); color: #fff; }
.hb-legende { display: flex; gap: 14px; margin: 10px 0 0; }
.hb-l::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }
.hb-l.frei::before { background: var(--green-50); border-color: #a9d8bd; }
.hb-l.belegt::before { background: #eef0f3; border-color: #eef0f3; }
.hb-l.gewaehlt::before { background: var(--blue); border-color: var(--blue); }
@media (max-width: 1020px) { .nav-list a { padding: 14px 9px; font-size: .95rem; } }

/* Grid-Kinder dürfen schrumpfen (lange Auswahllisten auf dem Handy) */
fieldset { min-width: 0; }
.book-layout > *, .auth-wrap > * { min-width: 0; }
select { max-width: 100%; }

/* ---------- Öffentliches Schwimmen ---------- */
.sw-section { background: linear-gradient(180deg, #e8f3fb 0%, #fff 100%); }
.sw-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.sw-box { background: #fff; padding: 22px; box-shadow: var(--shadow); border-top: 5px solid #0a7fb5; }
.sw-status { font-size: 1.08rem; margin: 0 0 12px; }
.sw-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: 1px; }
.sw-dot.on { background: #18a058; box-shadow: 0 0 0 4px rgba(24,160,88,.18); }
.sw-dot.off { background: #9aa3ae; }
.sw-heute { list-style: none; padding: 0; margin: 0 0 14px; }
.sw-heute li { padding: 7px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.sw-heute li.aus { color: var(--ink-3); }
.sw-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-woche { display: grid; gap: 8px; }
.sw-tag { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; background: #fff; padding: 8px 12px; border: 1px solid var(--line); }
.sw-tag-name { font-weight: 700; color: var(--blue-dark); }
.sw-tag-name span { display: block; font-weight: 400; color: var(--ink-3); font-size: .85rem; }
.sw-chips, .ka-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chip { display: inline-flex; flex-direction: column; padding: 5px 10px; border: 2px solid #0a7fb5; color: #075a80; text-decoration: none; font-weight: 700; font-size: .9rem; line-height: 1.2; background: #fff; font-family: inherit; cursor: pointer; }
.sw-chip small { font-weight: 400; font-size: .74rem; color: var(--ink-3); }
.sw-chip:hover, .sw-chip.gewaehlt { background: #0a7fb5; color: #fff; }
.sw-chip:hover small, .sw-chip.gewaehlt small { color: #e4f3fb; }
.sw-chip.aus { border-color: var(--line); color: var(--ink-3); background: var(--bg-soft); cursor: default; text-decoration: line-through; }
.sw-chip.aus small { text-decoration: none; }
.sw-h { font-size: 1.15rem; margin: 22px 0 10px; }
.sw-liste { display: grid; gap: 8px; }
.sw-zeile { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); padding: 10px 14px; cursor: pointer; }
.sw-zeile:hover:not([disabled]) { border-color: #0a7fb5; }
.sw-zeile.gewaehlt { border-color: #0a7fb5; background: #e8f3fb; }
.sw-zeile[disabled] { cursor: default; opacity: .65; }
.sw-zeit { font-weight: 800; color: var(--blue-dark); }
.sw-name b, .sw-name span { display: block; }
table.mini { width: 100%; border-collapse: collapse; }
table.mini td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.choice-list.compact { gap: 6px; }
.choice-list.compact .choice { padding: 8px 10px; gap: 10px; }
@media (max-width: 900px) { .sw-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .sw-tag { grid-template-columns: 1fr; gap: 6px; }
  .sw-zeile { grid-template-columns: 1fr auto; }
  .sw-zeile .sw-name { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Anreise / Karten ---------- */
.map-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.map-btns.big { gap: 10px; margin-top: 8px; }
.map-btns svg { vertical-align: -2px; }
.anreise.aktiv { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.anreise-adr { font-size: 1.1rem; font-weight: 600; }
.anreise-adr svg { color: var(--red); vertical-align: -2px; }

/* ---------- Meldungen ---------- */
.kat-wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mf-bild { max-width: 220px; max-height: 180px; display: block; margin: 10px 0; border: 1px solid var(--line); object-fit: cover; }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #b8c1cc; border-radius: var(--radius); resize: vertical; }
.meldung { margin-bottom: 14px; }
.meldung-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.meldung-inhalt { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.meldung-inhalt .mf-bild { margin: 0; }
@media (max-width: 560px) { .kat-wahl { grid-template-columns: 1fr; } }

/* ---------- E-Mails (Postfach / Postausgang) ---------- */
.mail { border: 1px solid var(--line); background: #fff; margin-bottom: 8px; }
.mail summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.mail[open] summary { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.mail-text { padding: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; white-space: normal; word-break: break-word; }
.mail > p { padding: 0 14px 10px; margin: 0; }

/* ---------- Belegungsplan: Ausfall, Ersatz, Schwimmen ---------- */
.bp-aus { border-left-color: var(--red) !important; background: #fdecee !important; }
.bp-aus span { color: var(--red-dark) !important; }
.bp-ersatz { border-left-color: var(--green) !important; background: var(--green-50) !important; }
.bp-schwimm { display: block; padding: 4px 6px; margin-top: 4px; border-left: 3px solid #0a7fb5; background: #e4f3fb; line-height: 1.3; }
.bp-schwimm span { display: block; color: var(--ink-3); font-size: .76rem; }
.bp-schwimm-l { border-left: 3px solid #0a7fb5; background: #e4f3fb; padding: 1px 6px; margin-left: 14px; }
.bp-aus-l { border-left: 3px solid var(--red); background: #fdecee; padding: 1px 6px; margin-left: 14px; }
button.bp-kurs, button.bp-event { width: 100%; text-align: left; font: inherit; border-top: 0; border-right: 0; border-bottom: 0; cursor: pointer; }
.bp-plus { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: .76rem; font-weight: 700; color: var(--blue-700); background: transparent; border: 1px dashed var(--blue-100); padding: 3px; cursor: pointer; opacity: .55; }
.bp-adm td:hover .bp-plus, .bp-plus:focus { opacity: 1; background: #fff; }

/* ---------- Verwaltungsansicht ---------- */
body.admin-mode .service-bar, body.admin-mode .site-header, body.admin-mode .site-footer { display: none; }
body.admin-mode { background: #eef1f5; }
.adm { min-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.adm-top { background: var(--blue-dark); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 22px; flex-wrap: wrap; }
.adm-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.adm-brand:hover { color: #fff; }
.adm-brand b { display: block; line-height: 1.1; }
.adm-brand small { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #ff8a9b; font-weight: 700; }
.adm-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-name { font-weight: 600; }
.adm-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); flex: 1; }
.adm-nav { background: #fff; border-right: 1px solid var(--line); padding: 14px 0; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-left: 4px solid transparent; }
.adm-nav a:hover { background: var(--blue-50); color: var(--blue-dark); }
.adm-nav a.on { border-left-color: var(--red); background: var(--blue-50); color: var(--blue-dark); }
.adm-nav a span { flex: 1; }
.adm-cnt { background: var(--red); color: #fff; font-size: .74rem; border-radius: 99px; padding: 1px 7px; }
.adm-main { padding: 24px 28px 48px; min-width: 0; }
.adm-main h1 { font-size: 1.8rem; }
.adm-main .card { background: #fff; }
.adm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.adm-kpi { background: #fff; padding: 14px 16px; text-decoration: none; color: var(--ink-2); border-bottom: 4px solid var(--blue-100); box-shadow: var(--shadow); }
.adm-kpi b { display: block; font-size: 2rem; color: var(--blue-dark); line-height: 1.1; }
.adm-kpi.warn { border-bottom-color: var(--amber); }
.adm-kpi.warn b { color: var(--amber); }
.adm-kpi:hover { color: var(--ink); border-bottom-color: var(--red); }
.adm-quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.adm-list { list-style: none; padding: 0; margin: 0; }
.adm-list li { padding: 9px 0; border-top: 1px solid var(--line); }
.adm-list li:first-child { border-top: 0; }
.adm-tab { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
.adm-tab th { text-align: left; background: var(--blue-50); color: var(--blue-dark); padding: 8px 10px; font-size: .84rem; white-space: nowrap; }
.adm-tab td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.adm-tab.db td { font-size: .82rem; white-space: nowrap; }
.adm-akt { white-space: nowrap; }
.adm-akt .btn { margin: 0 4px 4px 0; }
.adm-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0 16px; }
.adm-filter label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: .92rem; }
.adm-filter input, .adm-filter select { width: auto; }
.adm-form { max-width: 860px; }
.adm-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.adm-checks .check { margin: 4px 0; }
.adm-2 { align-items: start; }
.adm-db { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; }
.adm-db-list { background: #fff; border: 1px solid var(--line); max-height: 70vh; overflow: auto; }
.adm-db-list a { display: flex; justify-content: space-between; padding: 6px 12px; font-size: .9rem; text-decoration: none; color: var(--ink-2); border-left: 3px solid transparent; }
.adm-db-list a.on { border-left-color: var(--red); background: var(--blue-50); color: var(--blue-dark); font-weight: 700; }
.adm-db-list span { color: var(--ink-3); }
.fenster input { width: auto; }
.form-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .adm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .adm-body { grid-template-columns: 1fr; }
  .adm-nav { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .adm-nav a { flex-direction: column; gap: 2px; padding: 8px 12px; font-size: .78rem; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .adm-nav a.on { border-bottom-color: var(--red); }
  .adm-main { padding: 18px 16px 40px; }
  .adm-db { grid-template-columns: 1fr; }
  .adm-db-list { max-height: 180px; }
  .adm-name { display: none; }
}
@media (max-width: 560px) { .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .adm-checks, .form-grid.g4 { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
.nav-list a { white-space: nowrap; padding-left: 13px; padding-right: 13px; }
@media (max-width: 1240px) and (min-width: 821px) { .nav-list a { padding-left: 9px; padding-right: 9px; font-size: .95rem; } }
.adm-main .card { overflow-x: auto; }
.adm-filter select, .adm-filter input { max-width: 100%; }
#av-go, #ka-f .btn-red { margin-top: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
