/* Oswald (SIL OFL, selbst gehostet – keine Anfragen an Google) */
@font-face {
  font-family: "Oswald";
  src: url("/static/fonts/oswald-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oswald";
  src: url("/static/fonts/oswald-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Farbschema passend zum Team-Alpha-Bar-Logo: Schwarz/Weiß, Farbe nur für Status */
:root {
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --bg: #f3f3f1;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5e5e5b;
  --border: #deded9;
  --primary: #111111;
  --primary-text: #ffffff;
  --primary-soft: #ebebe7;
  --header-bg: #0b0b0b;
  --header-text: #f5f5f5;
  --header-muted: #a3a3a3;
  --success: #17703f;
  --success-soft: #e2f2e8;
  --warning: #7a5200;
  --warning-soft: #fbf0d4;
  --error: #b3261e;
  --error-soft: #fbe9e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .07);
  --on-status: #ffffff;
  color-scheme: light;
}
/* Dunkel: folgt der Systemeinstellung */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --surface: #161616;
    --text: #f2f2f2;
    --muted: #9d9d9d;
    --border: #2b2b2b;
    --primary: #f2f2f2;
    --primary-text: #0b0b0b;
    --primary-soft: #242424;
    --header-bg: #000000;
    --header-text: #f5f5f5;
    --header-muted: #9d9d9d;
    --success: #6fd49b;
    --success-soft: #15291d;
    --warning: #f0c36a;
    --warning-soft: #2e2510;
    --error: #ff8b80;
    --error-soft: #361a18;
    --shadow: none;
    --on-status: #0b0b0b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--muted); }
h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; font-weight: 600; }
h1 { font-size: 1.9rem; margin: 0 0 .75rem; line-height: 1.15; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; line-height: 1.2; }
h3 { line-height: 1.2; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 32px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.prewrap { white-space: pre-wrap; }

/* Kopfzeile */
.topbar { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid #000; }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; line-height: 0; border-radius: 50%; }
.brand-logo { width: 48px; height: 48px; display: block; transition: transform .2s ease; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.05); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a {
  padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--header-muted);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; font-weight: 500;
}
.nav a:hover { color: var(--header-text); background: rgba(255, 255, 255, .08); }
.nav a.active { color: #0b0b0b; background: #f5f5f5; }
.nav-extras { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.nav a.nav-external { border: 1px solid #3a3a3a; }
.nav a.nav-external:hover { border-color: var(--header-text); }
.nav a.nav-social { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border-radius: 8px; }
.nav a.nav-social img { display: block; width: 22px; height: 22px; border-radius: 6px; }
.nav a.nav-social:hover { background: rgba(255, 255, 255, .08); }
.topbar .link-button { color: var(--header-muted); }
.topbar .link-button:hover { color: var(--header-text); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu form { margin: 0; }
.footer { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); padding: 24px 16px 40px; font-size: .875rem; }
.footer a { color: var(--muted); }
.footer-social { display: inline-flex; align-items: center; gap: 6px; }
.footer-social img { width: 18px; height: 18px; border-radius: 4px; }

/* Karten, Layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card.narrow { max-width: 560px; margin: 24px auto; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 20px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h1, .section-head h2 { margin: 0; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.actions form { display: flex; gap: 10px; align-items: center; margin: 0; }

/* Formulare */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 500; margin-bottom: 6px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-weight: 400; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.radio-card input { margin-top: 4px; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 500; padding: 9px 18px; border-radius: 6px; cursor: pointer; line-height: 1.3;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
}
.button:hover { border-color: var(--muted); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.button.primary:hover { opacity: .85; color: var(--primary-text); }
.button.ghost { background: transparent; }
.button.danger { background: var(--error); border-color: var(--error); color: #fff; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button.danger, .danger { color: var(--error); }

/* Hinweise, Badges */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--primary-soft); color: var(--text); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-error { background: var(--error-soft); color: var(--error); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--border); vertical-align: middle; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-error { background: var(--error-soft); color: var(--error); border-color: transparent; }
.badge-solid { background: var(--primary); color: var(--primary-text); border-color: transparent; text-transform: uppercase; letter-spacing: .04em; }

/* Avatare */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.avatar-initials { background: var(--primary-soft); color: var(--text); font-family: var(--font-display); font-weight: 600; letter-spacing: .03em; }
.topbar .avatar-initials { background: #2a2a2a; color: #f5f5f5; }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar-md { width: 40px; height: 40px; font-size: .9rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.2rem; }
.avatar-edit { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.avatar-edit > div { flex: 1; min-width: 200px; display: grid; gap: 8px; }
.profile-hero { display: flex; gap: 20px; align-items: center; }
.profile-hero h1 { margin-bottom: 2px; }
.profile-hero p { margin: 0 0 8px; }

/* Listen, Tabellen */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.ticket-row form { margin: 0; }
.danger-link { color: var(--error); }
.ticket-offer { margin: 12px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; }
.ticket-offer p { margin: 0 0 8px; }
.ticket-offer p:last-child { margin-bottom: 0; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.people li { display: flex; gap: 10px; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td form { margin: 0; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.waiver-text { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 4px 16px; max-height: 320px; overflow-y: auto; font-size: .92rem; }
.waiver-text ol { padding-left: 20px; }

/* Kalender */
.calendar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.calendar-head h1 { margin: 0; min-width: 200px; text-align: center; }
.calendar-head .today-link { margin-left: auto; }
.calendar {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--border); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.calendar-weekday { background: var(--surface); padding: 8px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 500; color: var(--muted); text-align: center; }
.calendar-day { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.calendar-day.outside { background: var(--bg); }
.calendar-day.outside .calendar-date { opacity: .5; }
.calendar-date-num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-size: .85rem; font-weight: 600; }
.calendar-date-long { display: none; }
.calendar-day.today .calendar-date-num { background: var(--primary); color: var(--primary-text); }
.calendar-event {
  display: flex; gap: 4px; align-items: baseline; font-size: .78rem; line-height: 1.3; text-decoration: none; color: var(--text);
  background: var(--primary-soft); border-left: 3px solid var(--event-color, var(--primary)); padding: 3px 6px; border-radius: 4px; overflow: hidden;
}
.calendar-event[style]:not(.mine) { background: color-mix(in srgb, var(--event-color) 16%, var(--surface)); }
.legend-item { white-space: nowrap; }
.form [hidden] { display: none; }
.calendar-event:hover { outline: 1px solid var(--primary); }
.calendar-event.mine { background: var(--primary); color: var(--primary-text); }
.calendar-event.mine .event-count { color: inherit; opacity: .75; }
.calendar-event.canceled { opacity: .55; text-decoration: line-through; }
.event-time { font-weight: 600; white-space: nowrap; }
.event-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-count { font-weight: 700; color: var(--muted); }
.legend { font-size: .85rem; margin-top: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--primary); vertical-align: middle; }

/* Startseite */
.hero { padding: 24px 0 8px; display: grid; justify-items: start; }
.hero-logo { width: 112px; height: 112px; margin-bottom: 16px; }
.hero h1 { font-size: 2.6rem; margin-bottom: 4px; }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; }
.choice h2 { margin-bottom: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 32px; }
.choice-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.choice-card h3 { margin: 0; font-size: 1.2rem; }
.choice-card p { margin: 0; flex: 1; }
.choice-card.highlight { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.choice-card .button { align-self: flex-start; }
.choice-tag { align-self: flex-start; font-family: var(--font-display); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--text); background: var(--primary-soft); padding: 2px 10px; border-radius: 4px; }
.choice-card.highlight .choice-tag { background: var(--primary); color: var(--primary-text); }
.choice-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.quick-link { display: grid; gap: 4px; margin: 0; text-decoration: none; color: var(--text); }
.quick-link:hover, .news-card:hover { border-color: var(--primary); }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.news-card { display: grid; gap: 6px; align-content: start; margin: 0; text-decoration: none; color: var(--text); }
.news-title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.news-item h2 { margin: 4px 0 6px; font-size: 1.25rem; }
.news-item h2 a { color: var(--text); text-decoration: none; }
.news-item h2 a:hover { color: var(--muted); }
.news-item p { margin: 0 0 10px; }
.news-article h1 { margin-top: 6px; }
.prose { line-height: 1.65; overflow-wrap: anywhere; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose blockquote { border-left: 3px solid var(--border); margin: 0; padding-left: 16px; color: var(--muted); }
.prose mark { background: var(--warning-soft); color: inherit; }

/* Rechtstexte */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.legal h3 { font-size: 1rem; margin: 20px 0 6px; font-family: inherit; text-transform: none; letter-spacing: 0; }
.legal mark { padding: 0 3px; border-radius: 3px; }

/* Eltern-Angaben bei Minderjährigen */
.guardian-fields { border: 1px dashed var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; }
.guardian-fields[hidden] { display: none; }
.guardian-fields p { margin: 0; }
.danger-zone { border-color: var(--error-soft); }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
pre.code { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; max-height: 420px; font-size: .8rem; }

.verify-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.verify-banner form { margin: 0; }
.verify-banner .link-button { color: inherit; }
.mail h2 { text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 1.1rem; margin-top: 4px; }

/* Trainer: Wer trainiert heute */
.training { margin-bottom: 32px; }
.training-summary { margin: 2px 0 0; }
.day-nav { display: flex; gap: 6px; }
.training-board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr);
  gap: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
}
.card.training-col { margin: 0; padding: 0; overflow: hidden; scroll-snap-align: start; display: flex; flex-direction: column; }
.training-col header { display: grid; gap: 2px; padding: 14px 16px; background: var(--primary); color: var(--primary-text); }
.training-col header .muted { color: inherit; opacity: .7; }
.training-col.canceled header { background: var(--primary-soft); color: var(--muted); text-decoration: line-through; }
.training-time { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: .02em; line-height: 1.1; }
.training-name { color: inherit; font-weight: 600; text-decoration: none; }
.training-name:hover { color: inherit; text-decoration: underline; }
.training-col > p { padding: 14px 16px; margin: 0; }
.training-people { list-style: none; margin: 0; padding: 6px 0; }
.training-people li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.training-people li:last-child { border-bottom: 0; }
.training-people a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-table td { vertical-align: top; }
.users-table .badge + .small { margin-top: 3px; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; }

/* Trainer-Unternavigation */
.trainer-head { margin-bottom: 20px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--primary-soft); padding: 4px; border-radius: 8px; }
.tabs a {
  padding: 6px 14px; border-radius: 6px; text-decoration: none; color: var(--muted);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.subhead { font-size: 1rem; margin: 18px 0 8px; }

/* Anwesenheit: "Anwesend" (grün) / "Nicht da" (rot) */
.attendance { display: inline-flex; gap: 6px; margin: 0; flex: none; }
.att {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; line-height: 1; white-space: nowrap;
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--muted);
  transition: background-color .15s, border-color .15s, color .15s;
}
.att span[aria-hidden] { font-size: 1rem; }
.att-present:hover { border-color: var(--success); color: var(--success); }
.att-absent:hover { border-color: var(--error); color: var(--error); }
.att-present.on { background: var(--success); border-color: var(--success); color: var(--on-status); }
.att-absent.on { background: var(--error); border-color: var(--error); color: var(--on-status); }
.att-spontan { border-style: dashed; color: var(--text); }
.att-spontan:hover { border-style: solid; border-color: var(--success); color: var(--success); }
.att:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Kompakt (Spalten der Trainer-Übersicht): nur Symbole, Beschriftung bleibt für Screenreader */
.attendance.compact .att { width: 34px; min-height: 34px; padding: 0; }
.attendance.compact .att-label, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.training-people li.present { background: var(--success-soft); }
.training-people li.absent { background: var(--error-soft); }
.training-people .person-cell a { white-space: normal; }
.attendance-list li.present, .attendance-list li.absent { border-radius: 8px; }

.person-cell { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-cell a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.training-waitlist { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 16px; border-top: 1px dashed var(--border); }
.attendance-list li { align-items: center; }
.attendance-list .person { display: flex; align-items: center; gap: 10px; }
.waitlist { margin: 0; padding-left: 20px; }

/* QR-Code */
.checkin-card { display: flex; flex-direction: column; }
.qr-box { display: block; background: #fff; padding: 10px; border-radius: 10px; width: 200px; max-width: 100%; margin: 4px 0 14px; border: 1px solid var(--border); }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-fullscreen { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 12px 0; }
.qr-fullscreen h1 { margin: 8px 0 0; }
.qr-large { width: min(360px, 88vw); padding: 16px; margin: 12px 0; }
.qr-logo { width: 64px; height: 64px; }
input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
details.help { margin: 10px 0; color: var(--muted); }
details.help summary { cursor: pointer; color: var(--text); }

/* Check-in-Seite */
.checkin-person { display: flex; gap: 20px; align-items: center; border-width: 2px; }
.checkin-person.ok { border-color: var(--success); }
.checkin-person.warn { border-color: var(--error); }
.checkin-person h1 { margin: 0; }
.checkin-person p { margin: 4px 0 0; }
.checkin-info { flex: 1; min-width: 0; }
.checkin-status { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.status-big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.status-big.ok { color: var(--success); }
.status-big.warn { color: var(--error); }
.status-big.open { color: var(--warning); }
.checkin-sessions { display: grid; gap: 12px; }
.checkin-session { margin: 0; }
.checkin-session.highlight { box-shadow: 0 0 0 2px var(--primary); }
.checkin-session.past { opacity: .6; }
.session-action { display: flex; align-items: center; justify-content: flex-end; }
.session-action form { margin: 0; }

/* Statistik: Werte als Zeilen – Bezeichnung links, Summe rechts */
.stats-card h2 { margin-bottom: 12px; }
.stats-card .section-head h2 { margin: 0; }
.stats-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.ledger { margin: 0; padding: 0; list-style: none; }
.ledger-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger dt, .ledger-person { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ledger dd, .ledger-value { margin: 0; font-weight: 650; font-size: 1.1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger dd.warn { color: var(--warning); }
.ledger-sub { font-size: .8rem; color: var(--muted); }
.ledger-total { border-top: 2px solid var(--text); border-bottom: 0; margin-top: 4px; }
.ledger-total dt { font-weight: 650; }
.ledger-total dd { font-size: 1.35rem; }
.ledger-people .ledger-person { flex-direction: row; align-items: center; gap: 10px; }
.ledger-people .ledger-value { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 500; }
.chip.chip-warn { background: var(--warning-soft); color: var(--warning); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .grid.baseline { stroke: var(--muted); opacity: .5; }
.chart .tick { fill: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .tick-sub { font-size: 11px; opacity: .75; }
.chart .value-label { fill: var(--text); font-size: 13px; font-weight: 600; }
.chart .hit { fill: transparent; }
.chart .col { outline: none; cursor: default; }
.chart .col:hover .hit, .chart .col:focus-visible .hit, .chart .col.active .hit { fill: var(--primary-soft); opacity: .6; }
.chart .col:focus-visible .hit { stroke: var(--primary); stroke-width: 1; }
.bar-ink { fill: var(--primary); }
.chart-tip {
  position: absolute; z-index: 20; pointer-events: none; min-width: 160px; max-width: 280px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18); padding: 8px 10px; font-size: .85rem; line-height: 1.45;
}
.chart-tip-head { font-weight: 700; margin-bottom: 2px; }

/* Check-in: eine Zeile pro Termin – Uhrzeit | Kurs | Aktion */
.checkin-session {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  border-left: 4px solid var(--border);
}
.checkin-session.state-present { border-left-color: var(--success); }
.checkin-session.state-absent { border-left-color: var(--error); }
.session-time { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; min-width: 3.2em; }
.session-info { display: grid; gap: 4px; min-width: 0; }
.session-info .muted { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.session-name { font-weight: 600; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--primary-soft); color: var(--muted); }
.chip-ok { background: var(--success-soft); color: var(--success); }

/* Trainer-Dropdown in der Navigation – gleicher Stil wie die Menüpunkte daneben */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 6px; color: var(--header-muted);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; font-weight: 500;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover, .nav-dropdown[open] summary { color: var(--header-text); background: rgba(255, 255, 255, .08); }
.nav-dropdown.active summary { color: #0b0b0b; background: #f5f5f5; }
.caret { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-dropdown[open] .caret { transform: translateY(1px) rotate(-135deg); }
.dot-alert { width: 7px; height: 7px; border-radius: 50%; background: #ff6b5e; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; min-width: 200px; padding: 6px;
  background: var(--header-bg); border: 1px solid #2a2a2a; border-radius: 8px; box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
  display: grid; gap: 2px;
}
.nav .dropdown-menu a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; }
.nav .dropdown-menu a .badge { font-family: system-ui, sans-serif; letter-spacing: 0; }

.eyebrow { display: block; font-size: .8rem; letter-spacing: .12em; color: var(--muted); margin-bottom: 2px; }

/* Mobil: Kalender als Liste der Tage mit Terminen */
@media (max-width: 720px) {
  h1 { font-size: 1.35rem; }
  .topbar-inner { gap: 8px 16px; padding: 8px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .user-menu { margin-left: auto; }
  .calendar-head h1 { min-width: 0; flex: 1; font-size: 1.3rem; }
  .brand-logo { width: 40px; height: 40px; }
  .hero h1 { font-size: 2rem; }
  .hero-logo { width: 88px; height: 88px; }
  .calendar { display: block; background: none; border: 0; }
  .calendar-weekday, .calendar-day.empty { display: none; }
  .calendar-day.outside { background: var(--surface); }
  .calendar-day { min-height: 0; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; padding: 10px; }
  .calendar-date { display: flex; align-items: center; gap: 8px; }
  .calendar-date-long { display: inline; font-weight: 600; font-size: .9rem; }
  .calendar-event { font-size: .95rem; padding: 8px 10px; }
  .event-name { white-space: normal; }
  .profile-hero { flex-direction: column; text-align: center; }
  .checkin-person { flex-direction: column; text-align: center; }
  .checkin-status { justify-content: center; }
  .checkin-session { gap: 10px; padding: 12px 12px 12px 14px; }
  .session-time { font-size: 1.2rem; min-width: 2.8em; }
  .checkin-session .att { width: 40px; min-height: 40px; padding: 0; }
  .checkin-session .att-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hide-sm { display: none; }
  .stats-split { grid-template-columns: 1fr; gap: 12px; }
  .checkin-session .att-spontan { width: auto; padding: 0 12px; }
  .dropdown-menu { left: auto; right: 0; }
  .card { padding: 16px; }
  .card.training-col { padding: 0; }
  .training-board { grid-auto-columns: min(300px, 82vw); }
  /* Nutzertabelle als Karten */
  .table-wrap.card:has(.users-table) { padding: 0; background: none; border: 0; box-shadow: none; }
  .users-table thead { display: none; }
  .users-table, .users-table tbody { display: block; }
  .users-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 16px; margin-bottom: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  }
  .users-table td { display: block; padding: 0; border: 0; }
  .users-table td.cell-name { grid-column: 1 / -1; }
  .users-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  }
}

/* Tickets-Seite */
.ticket-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ticket-prices .card { margin-bottom: 0; }
.ticket-prices h3 { margin: 0 0 4px; }
.ticket-prices .price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin: 0 0 8px; }
.ticket-prices .muted { margin: 0; }
.block-meter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.block-meter span { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); }
.block-meter span.used { background: transparent; border: 2px solid var(--border); }
.ticket-uses td { padding-top: 0; }
.ticket-log ul { margin: 4px 0 0; padding-left: 18px; }

/* Installierbare App */
.app-install ol { margin: 8px 0 12px; padding-left: 20px; }
.offline-page { max-width: 420px; margin: 48px auto; text-align: center; }
.offline-page img { border-radius: 50%; }

/* Intro beim ersten Aufruf pro Sitzung (gesteuert von intro.js; ohne JS nie sichtbar) */
.intro-screen { display: none; }
.intro body { overflow: hidden; }
.intro .intro-screen {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; overflow: hidden;
}
.intro-out .intro-screen { animation: intro-exit 1s cubic-bezier(.77, 0, .18, 1) forwards; }
.intro-stage { position: relative; display: grid; place-items: center; }
.intro-logo {
  width: 132px; height: 132px; display: block; opacity: 0;
  animation: intro-stamp .55s cubic-bezier(.5, 0, .2, 1.4) .2s forwards;
}
.intro-ring {
  position: absolute; width: 132px; height: 132px; border-radius: 50%; border: 2px solid var(--text);
  opacity: 0; animation: intro-ring 1.1s ease-out .62s;
}
.intro-text {
  display: flex; font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: .42em; padding-left: .42em; color: var(--text);
}
.intro-text span {
  opacity: 0;
  animation: intro-letter .6s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(.85s + var(--i) * .035s);
}
.intro-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--text);
  transform: scaleX(0); transform-origin: 0 50%;
  animation: intro-bar 1.9s cubic-bezier(.65, 0, .35, 1) .2s forwards;
}
@keyframes intro-stamp {
  from { opacity: 0; transform: scale(1.8) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes intro-ring {
  from { opacity: .6; transform: scale(1); }
  to { opacity: 0; transform: scale(2.4); }
}
@keyframes intro-letter {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes intro-bar { to { transform: scaleX(1); } }
@keyframes intro-exit {
  to { transform: translateY(-100%); border-bottom-left-radius: 50% 12vh; border-bottom-right-radius: 50% 12vh; }
}
@media (prefers-color-scheme: dark) {
  .intro-logo { filter: drop-shadow(0 0 18px rgba(255, 255, 255, .18)); }
}
