/* ==========================================================================
   VVH Hemsbach – Design-System
   Farben aus dem Logo: Blau #1081c5 · Orange #fab533 · Grau #d6d8d9 · Koralle #f0715f
   ========================================================================== */

/* Inter (SIL OFL 1.1, siehe /assets/fonts/Inter-LICENSE.txt) – lokal eingebunden, keine externen Anfragen */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'), url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
  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;
}

:root {
  --blue: #1081c5;
  --blue-700: #0b6aa5;
  --blue-900: #0a3d5f;
  --blue-100: #e3f2fb;
  --blue-50: #f1f8fd;
  --orange: #fab533;
  --orange-600: #e79c0c;
  --orange-100: #fff3d6;
  --coral: #f0715f;
  --coral-100: #fde6e2;
  --green: #17a864;
  --green-700: #0f7d4a;
  --green-100: #dcf5e8;
  --grey: #d6d8d9;
  --grey-100: #eef0f2;
  --ink: #12202c;
  --ink-soft: #4a5b6a;
  --bg: #f4f8fc;
  --surface: #ffffff;
  --line: #e2e8ee;

  /* Feste/abgeleitete Farben (im dunklen Design angepasst) */
  --navy: #0a3d5f;            /* dunkle Flächen: Footer, Admin-Leiste */
  --blue-deep: #0b6aa5;       /* Hover/Verläufe hinter weißem Text */
  --amber-ink: #8a5a00;
  --amber-ink-2: #6b4a00;
  --red-ink: #b3261e;
  --red-ink-2: #b3392a;
  --red-ink-3: #8f2a1d;
  --glass: 255, 255, 255;     /* RGB der halbtransparenten Kopf-/Tab-Leiste */
  color-scheme: light;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 60, .06), 0 1px 3px rgba(16, 40, 60, .06);
  --shadow: 0 8px 24px -8px rgba(16, 60, 95, .18), 0 2px 6px rgba(16, 40, 60, .06);
  --shadow-lg: 0 24px 48px -16px rgba(16, 60, 95, .28);

  --font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; width: 100%;
  background-image:
    radial-gradient(900px 400px at 85% -10%, rgba(250, 181, 51, .28), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(16, 129, 197, .16), transparent 60%);
  background-size: 100% 700px; background-position: top; background-repeat: no-repeat; }
.site-footer { flex-shrink: 0; }
@media (min-width: 860px) { body { padding-bottom: 0; } }

img, svg { max-width: 100%; height: auto; }
a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-900); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.block { display: block; }
.mt { margin-top: 2rem; }
.mt-sm { margin-top: .75rem; }
.pre-line { white-space: pre-line; }
.cmd-output { margin: 0 0 1.5rem; padding: .8rem 1rem; background: var(--grey-100); border-radius: var(--radius-sm); max-height: 18rem; overflow: auto; font-size: .85rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.location { display: flex; align-items: flex-start; gap: .45rem; margin: 0 0 .6rem; color: var(--ink-soft); font-size: .93rem; }
.location > .icon { margin-top: .2rem; }
.map-link { font-weight: 600; }
.map-link .icon { width: .9em; height: .9em; vertical-align: -.1em; }

/* ------------------------------------------------------------------ Header / Navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--glass), .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--line);   /* statt border-bottom: Header ist exakt 64 px hoch (Verwaltungsleiste klebt darunter) */
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.25rem; letter-spacing: -.02em; font-weight: 800; }
.brand-text small { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 600; }

.main-nav { display: none; margin-left: 1.5rem; gap: .25rem; }
.nav-link { display: inline-flex; align-items: center; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.nav-link:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-link.is-active { background: var(--blue-100); color: var(--blue-700); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.theme-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.theme-toggle:hover { background: var(--blue-50); color: var(--blue-700); }
.theme-toggle .icon { width: 1.25rem; height: 1.25rem; }
.theme-toggle[hidden] { display: none; }
.theme-icon-sun { display: none; }
@media (min-width: 860px) { .main-nav { display: flex; } }
@media (max-width: 859px) { .header-actions .hide-xs { display: none; } }

.nav-badge { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; flex: none; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; margin-left: .4rem; border-radius: 999px; background: #d64a38; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .user-name { display: none; } .user-menu summary { padding: .2rem; } }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 13rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .4rem; display: grid; gap: .1rem; }
.user-menu-panel a, .menu-button { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 550; background: none; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
.user-menu-panel a:hover, .menu-button:hover { background: var(--blue-50); }

/* Mobile Tab-Bar (App-Feeling) */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 60; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(var(--glass), .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-soft); font-size: .7rem; font-weight: 600; }
.tab { position: relative; }
.tab .icon { width: 1.45rem; height: 1.45rem; }
.tab .nav-badge { position: absolute; top: 6px; left: calc(50% + .45rem); margin: 0; }
.tab.is-active { color: var(--blue); }
.tab.is-active .icon { stroke-width: 2.4; }
@media (min-width: 860px) { .tabbar { display: none; } }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -6px rgba(16, 129, 197, .7); }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--blue-700); border-color: var(--blue-100); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue-700); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover, .btn-ghost.is-active { background: var(--grey-100); color: var(--ink); }
.btn-gold { background: linear-gradient(180deg, #ffc94d, var(--orange)) border-box; color: #12202c; box-shadow: 0 8px 20px -8px rgba(231, 156, 12, .9); }
.btn-gold:hover { background: linear-gradient(180deg, #ffd56e, #fbbd45) border-box; color: #12202c; }
.join-primary .btn-gold { box-shadow: 0 3px 8px -4px rgba(231, 156, 12, .7); }
.btn-light { background: #fff; color: #0a3d5f; }
.btn-light:hover { background: #fff3d6; color: #0a3d5f; }
.btn-danger { background: var(--coral-100); color: var(--red-ink); border-color: transparent; }
.btn-danger:hover { background: var(--coral); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn[data-change-submit][disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 0; }

/* ------------------------------------------------------------------ Flash / Notices */
.flash-area { padding-top: 0; }
.flash-area:has(.flash) { padding-top: 1rem; }
.flash, .notice {
  display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1.1rem;
  border-radius: var(--radius-sm); border: 1px solid; margin-bottom: .75rem; font-weight: 550;
}
.flash-success { background: var(--green-100); border-color: #a7e3c4; color: #0b5a35; }
.flash-error { background: var(--coral-100); border-color: #f6b9b0; color: var(--red-ink-3); }
.flash-info, .notice { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-900); }
.notice-warn { background: var(--orange-100); border-color: #f5d68a; color: var(--amber-ink-2); }
.flash .icon, .notice .icon { margin-top: .15rem; }

/* Meldung als Overlay in einer Karte: verändert das Layout nicht */
.has-toast { position: relative; }
.card-toast { position: absolute; z-index: 5; top: .75rem; left: .75rem; right: .75rem; margin: 0; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; }
.card-toast > span, .card-toast > ul { flex: 1; min-width: 0; margin: 0; }
.card-toast > ul { padding-left: 1.1rem; }
.card-toast[hidden] { display: none; }
.toast-close { flex: none; align-self: flex-start; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.toast-close:hover { background: rgba(0, 0, 0, .08); }
.toast-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card-toast { animation: none; } }

/* ------------------------------------------------------------------ Typografie-Bausteine */
.eyebrow { display: inline-block; margin: 0 0 .75rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 46rem; }
.accent { background: linear-gradient(transparent 62%, var(--orange) 62%, var(--orange) 92%, transparent 92%); }
.hint { font-size: .85rem; color: var(--ink-soft); margin: .5rem 0 0; }
.meta { display: flex; align-items: center; gap: .45rem; color: var(--ink-soft); font-size: .93rem; margin: 0 0 .2rem; }
.meta-lg { font-size: 1.05rem; }

/* ------------------------------------------------------------------ Chips / Badges */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .01em; vertical-align: middle; }
.chip-blue { background: var(--blue-100); color: var(--blue-700); }
.chip-orange { background: var(--orange-100); color: var(--amber-ink); }
.chip-coral { background: var(--coral-100); color: var(--red-ink-2); }
.chip-green { background: var(--green-100); color: var(--green-700); }
.chip-grey { background: var(--grey-100); color: var(--ink-soft); }

.date-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 3.4rem; height: 3.8rem; padding: 0 .4rem; border-radius: 14px; background: var(--blue-100); color: var(--blue-700); line-height: 1; flex: none; }
.date-badge strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.date-badge small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: .2rem; }
.date-badge-lg { min-width: 4.2rem; height: 4.6rem; }

/* ------------------------------------------------------------------ Karten & Grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.card h2 { font-size: 1.25rem; }
.card-fold > summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: 1.25rem; font-weight: 700; }
.card-fold > summary::-webkit-details-marker { display: none; }
.card-fold > summary .icon { width: 1.2rem; height: 1.2rem; color: var(--blue-700); }
.card-fold > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.card-fold[open] > summary { margin-bottom: 1rem; }
.card-danger { border-color: #f6b9b0; }
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.section { padding: 3.5rem 0; }
/* Letzter Abschnitt vor dem Footer: Fußabstand kommt bereits vom Footer-margin-top */
.section-end { padding-bottom: 0; }
.section-tint { background: linear-gradient(180deg, var(--blue-50), var(--surface)); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.page-head { padding: 2.25rem 0 1.25rem; }
.page-head h1 { margin-bottom: .4rem; }
.page-head .lead { max-width: none; text-wrap: pretty; }
.back-link { text-decoration: none; font-weight: 600; color: var(--ink-soft); }

.feature-icon { display: inline-flex; width: 3rem; height: 3rem; border-radius: 14px; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon .icon { width: 1.5rem; height: 1.5rem; }
.tone-blue { background: var(--blue-100); color: var(--blue-700); }
.tone-orange { background: var(--orange-100); color: #b97800; }
.tone-coral { background: var(--coral-100); color: #c2483a; }
.feature p { color: var(--ink-soft); margin: 0; }
.feature { display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; align-items: center; }
.feature .feature-icon { margin-bottom: 0; width: 2.6rem; height: 2.6rem; border-radius: 12px; }
.feature h3 { margin: 0; }
.feature p { grid-column: 1 / -1; margin-top: .75rem; }

.training-info header { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.training-info .time { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--blue-700); }
.training-info p { margin-bottom: .6rem; }
.training-info.is-off-season { background: var(--grey-100); border-style: dashed; color: var(--ink-soft); box-shadow: none; }
.training-info.is-off-season h3, .training-info.is-off-season .time { color: var(--ink-soft); }
.training-info.is-off-season > * { opacity: .7; }

/* ------------------------------------------------------------------ Hero */
.hero { position: relative; overflow: hidden; padding: 2.5rem 0 3.5rem; background:
  radial-gradient(900px 400px at 85% -10%, rgba(250, 181, 51, .28), transparent 60%),
  radial-gradient(800px 500px at -10% 20%, rgba(16, 129, 197, .16), transparent 60%),
  linear-gradient(180deg, var(--surface), var(--bg)); }
.hero-inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.2fr .8fr; } .hero { padding: 4.5rem 0 5rem; } }
.hero h1 { margin-bottom: 1rem; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.5rem 0 0; color: var(--ink-soft); font-weight: 550; font-size: .95rem; }
.hero-facts li { display: flex; align-items: center; gap: .4rem; }
.hero-facts .icon { color: var(--green); }
.hero-visual { position: relative; display: none; place-items: center; order: -1; }
@media (min-width: 900px) { .hero-visual { display: grid; order: 0; } }
.hero-visual img { position: relative; width: min(300px, 62%); filter: drop-shadow(0 24px 30px rgba(16, 60, 95, .25)); }
.hero-blob { position: absolute; width: min(360px, 78%); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: linear-gradient(135deg, var(--orange), #ffd77f 55%, var(--blue-100)); opacity: .55; }

.quick-card-wrap { margin-top: -1.8rem; position: relative; z-index: 2; }
.quick-cards { display: grid; gap: .75rem; }
@media (min-width: 860px) { .quick-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice-badge { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem .35rem .45rem; border-radius: 999px; font-weight: 700; font-size: .85rem; white-space: nowrap; flex: none; }
.choice-badge .icon { width: 1.5rem; height: 1.5rem; }
.choice-yes { background: var(--green-100); color: var(--green-700); }
.choice-no { background: var(--coral-100); color: var(--red-ink); }
@media (max-width: 400px) { .choice-badge > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .choice-badge { padding: .35rem; } }
.quick-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.quick-card:hover { box-shadow: var(--shadow-lg); color: var(--ink); }
.quick-card-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: var(--blue); color: #fff; flex: none; }
.quick-card-icon.quick-card-icon-orange { background: var(--orange); color: #12202c; }
.quick-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.quick-card-note { display: flex; gap: .35rem; align-items: flex-start; margin-top: .2rem; font-size: .85rem; font-weight: 600; color: var(--amber-ink); }
.quick-card-note .icon { flex: none; margin-top: .1rem; }
.quick-card-text small { color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.quick-card-cta { margin-left: auto; font-weight: 700; color: var(--blue-700); display: inline-flex; gap: .3rem; align-items: center; white-space: nowrap; }
@media (max-width: 560px) { .quick-card-cta { display: none; } }

.event-teaser { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); }
.event-teaser:hover { box-shadow: var(--shadow); color: var(--ink); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2.2rem; border-radius: 24px; color: #fff; background: linear-gradient(135deg, var(--blue-deep), var(--blue) 60%, #35a4e0); box-shadow: var(--shadow-lg); }
.video-wrap { max-width: 820px; margin: 0 auto; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--blue-50); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1.25rem; text-align: center; overflow-y: auto; }
.video-consent p { margin: 0; max-width: 34rem; }
.video-consent .btn-row { justify-content: center; margin-top: .5rem; }
/* Mobil: Hinweis-Kachel wächst mit dem Inhalt (kein internes Scrollen); das Video selbst bleibt 16:9. */
@media (max-width: 640px) {
  .video-embed:not(.is-loaded) { aspect-ratio: auto; }
  .video-embed:not(.is-loaded) .video-consent { position: static; overflow: visible; padding: 1.5rem 1.25rem; gap: .75rem; }
  .video-embed:not(.is-loaded) .video-consent .btn-row { flex-direction: column; align-items: stretch; width: 100%; }
  .video-embed:not(.is-loaded) .video-consent .btn { justify-content: center; min-height: 48px; }
}
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .9); max-width: 36rem; }

/* ------------------------------------------------------------------ Training / Attendance */
/* minmax(0, …) verhindert, dass eine breite Karte (z.B. volle Teilnehmerleiste) die Spalte und damit die ganze Seite in die Breite sprengt. */
.session-list { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
#sessions { padding-bottom: 3rem; }
@media (min-width: 900px) { .session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; } }
.session-card { display: flex; flex-direction: column; min-width: 0; padding: 1.35rem; scroll-margin-top: 90px; }
.session-card.is-next { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100), var(--shadow); }
/* Ausgefallenes Training: weiße Karte mit roter Akzentkante, durchgestrichenes Datum und Titel */
.session-card.is-cancelled { --cancel-edge: #c3ccd5; --cancel-edge: color-mix(in srgb, var(--ink-soft) 40%, var(--surface)); box-shadow: inset 5px 0 0 var(--cancel-edge), var(--shadow-sm); border-color: var(--line); padding-left: 1.6rem; }
.session-card.is-cancelled .date-badge { position: relative; overflow: hidden; background: var(--grey-100); color: var(--ink-soft); }
.session-card.is-cancelled .date-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--coral) calc(50% - 1.5px), var(--coral) calc(50% + 1.5px), transparent calc(50% + 1.5px)); }
.session-card.is-cancelled .session-title h2 { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--coral); color: var(--ink-soft); }
.session-card.is-cancelled .session-when { color: var(--ink-soft); }
.session-card.is-cancelled .session-facts .meta, .session-card.is-cancelled .session-facts .location { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.session-card.is-cancelled .notice { background: var(--coral-100); color: var(--red-ink-2); border-color: transparent; margin-bottom: 0; }
.session-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: start; margin-bottom: 1rem; }
.session-head .date-badge { grid-column: 1; grid-row: 1 / span 2; }
.session-title { grid-column: 2; grid-row: 1; min-width: 0; }
.session-facts { grid-column: 2; grid-row: 2; min-width: 0; }
.session-facts .location { margin: 0; }
.session-title h2 { margin: .15rem 0 .35rem; font-size: 1.3rem; }
/* Mobil: Uhrzeit und Ort als Infoleiste über die volle Kartenbreite statt schmal unter dem Titel */
@media (max-width: 600px) {
  .session-head { row-gap: .8rem; }
  .session-head .date-badge { grid-row: 1; align-self: center; min-width: 3.6rem; height: 4rem; }
  .session-title { align-self: center; }
  .session-title h2 { margin: .2rem 0 0; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
  .session-facts { grid-column: 1 / -1; grid-row: 2; display: grid; gap: .5rem; padding: .7rem .85rem; border: 1px solid var(--blue-100); border-radius: var(--radius-sm); background: var(--blue-50); }
  .session-facts .meta { margin: 0; font-weight: 650; color: var(--ink); }
  .session-facts .meta .icon, .session-facts .location > .icon { color: var(--blue-700); flex: none; }
  .session-facts .location { color: var(--ink); }
  .session-card.is-cancelled .session-facts { background: var(--grey-100); border-color: var(--line); }
  .session-card.is-cancelled .session-facts .meta .icon, .session-card.is-cancelled .session-facts .location > .icon { color: var(--ink-soft); }
}
.session-when { margin: 0; font-weight: 700; color: var(--blue-700); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

.attend-form.is-loading { opacity: .7; }
.my-status { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem .9rem; border-radius: var(--radius-sm); font-weight: 700; margin: 0 0 .9rem; }
.my-status small { font-weight: 500; opacity: .8; }
.my-status-yes { background: var(--green-100); color: var(--green-700); }
.my-status-no { background: var(--grey-100); color: var(--ink-soft); }
.my-status-win { background: var(--green-100); color: var(--green-700); }
.my-status-loss { background: var(--coral-100); color: var(--red-ink-2); }
.my-status-draw { background: var(--grey-100); color: var(--ink-soft); }
/* Ergebnis-Karte: Abstand nach oben zum Titel, unten keinen Zusatzabstand (Karten-Padding reicht) */
.result-card .my-status { margin: 1rem 0 0; padding: .8rem .9rem; line-height: 1.3; }
.result-card .my-status ~ .form { margin-top: 1.1rem; }
.result-card .form { margin-top: 1rem; gap: 1.1rem; }
/* Aktionen: gleich große Buttons nebeneinander (bei nur einem Button über die volle Breite) */
.result-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; }
.result-actions .btn { width: 100%; min-height: 2.9rem; justify-content: center; }

.attend-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.attend-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 84px; padding: .8rem; border-radius: 16px; border: 2px solid; font: inherit; font-weight: 800; font-size: 1.05rem;
  cursor: pointer; transition: transform .08s, background .15s, color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.attend-btn .icon { width: 1.6rem; height: 1.6rem; stroke-width: 2.6; }
.attend-btn:active { transform: scale(.98); }
.attend-yes { background: var(--green-100); color: var(--green-700); border-color: #b7e8cf; }
.attend-yes:hover { background: #c8f0dc; }
.attend-yes.is-selected { background: linear-gradient(180deg, #22c07a, var(--green)); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px rgba(23, 168, 100, .85); }
.attend-no { background: var(--grey-100); color: var(--ink-soft); border-color: var(--line); }
.attend-no:hover { background: #e5e8eb; }
.attend-no.is-selected { background: linear-gradient(180deg, #e5524a, #d93a2e); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px rgba(217, 58, 46, .85); }
.attend-btn[disabled] { cursor: progress; }
.attend-btn { position: relative; }
.attend-btn.is-selected { outline: none; }
.attend-btn.is-selected:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: 4px; }
.attend-btn.is-selected .icon { width: 2rem; height: 2rem; }
.attend-chosen { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.has-choice .attend-btn:not(.is-selected) { background: #dfe3e7; color: #7b8794; border-color: #dfe3e7; box-shadow: none; }
.has-choice .attend-btn:not(.is-selected) .icon { stroke-width: 2; }
.has-choice .attend-btn:not(.is-selected):hover, .has-choice .attend-btn:not(.is-selected):focus-visible { background: #d2d7dc; color: var(--ink-soft); }

.attendees { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.attendees h3 { display: flex; align-items: center; gap: .45rem; font-size: 1rem; margin-bottom: .6rem; }
.count { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; padding: 0 .4rem; border-radius: 999px; background: var(--green); color: #fff; font-size: .85rem; }
.people { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.person { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .7rem .25rem .25rem; border-radius: 999px; background: var(--blue-50); border: 1px solid var(--blue-100); font-size: .9rem; font-weight: 550; }
.people-muted .person { background: var(--grey-100); border-color: var(--line); color: var(--ink-soft); }
.person .inline-form { display: inline-flex; }
.person .icon-btn { padding: .15rem; line-height: 0; }
.person .icon-btn .icon { width: .95rem; height: .95rem; }
.guest-tag { font-style: normal; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 6px; background: var(--orange-100); color: var(--amber-ink); }
.no-list { margin-top: .8rem; }
.no-list summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }

/* Training: kompakte Teilnehmerzeile (feste Höhe) + Liste im Dialog */
.session-card .attendees { margin-top: auto; padding-top: 0; border-top: 0; }
.session-card .attend-form { margin-bottom: 1.1rem; }
.attendees-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; row-gap: .35rem; width: 100%; min-height: 3.4rem; padding: .5rem .8rem; margin: 0;
  border: 1px solid var(--blue-100); border-radius: var(--radius-sm); background: var(--blue-50); color: var(--ink);
  font: inherit; text-align: left;
}
button.attendees-bar { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s; }
button.attendees-bar:hover { background: var(--blue-100); }
button.attendees-bar:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.attendees-bar.is-empty { border-style: dashed; background: transparent; border-color: var(--line); }
.attendees-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; white-space: nowrap; }
.attendees-empty { font-size: .9rem; min-width: 0; }
.attendees-open { margin-left: auto; display: inline-flex; align-items: center; gap: .15rem; font-size: .85rem; font-weight: 700; color: var(--blue-700); white-space: nowrap; }
.attendees-open .icon { width: 1rem; height: 1rem; }
.avatar-stack { display: inline-flex; align-items: center; min-width: 0; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--blue-50); }
.avatar-stack .avatar + .avatar { margin-left: -.5rem; }
button.attendees-bar:hover .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--blue-100); }
.count-muted { background: var(--grey); }
/* Mobil: eine Bubble weniger (4 statt 5), damit die Leiste nicht umbricht */
@media (max-width: 600px) {
  /* nowrap + etwas weniger Abstand/Padding, damit Label, Bubbles und Pfeil sicher in eine Zeile passen (der Pfeil soll nie allein umbrechen) */
  .attendees-bar { flex-wrap: nowrap; gap: .5rem; padding: .5rem .6rem; }
  .attendees-open { font-size: 0; gap: 0; }
  .attendees-open .icon { width: 1.2rem; height: 1.2rem; }
  .avatar-stack .avatar-desktop-only { display: none; }
}

.sheet { width: min(30rem, calc(100% - 2rem)); max-height: min(80dvh, 40rem); padding: 0; overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .8rem; border-bottom: 1px solid var(--line); }
.sheet-head .modal-title { margin: 0; }
.sheet-sub { margin: .1rem 0 0; font-size: .9rem; }
.sheet-close { color: var(--ink-soft); padding: .5rem; margin: -.3rem -.4rem 0 0; }
.sheet-close .icon { width: 1.4rem; height: 1.4rem; }
.sheet-close:hover { background: var(--grey-100); color: var(--ink); }
.sheet-close:focus-visible { outline: 1px solid var(--grey); outline-offset: 0; border-radius: 8px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: .5rem 1.25rem 1.25rem; }
.sheet-section { display: flex; align-items: center; gap: .45rem; font-size: 1rem; margin: 1rem 0 .5rem; }
.sheet-section .icon { width: 1.1rem; height: 1.1rem; color: var(--green); }
.sheet-section-muted .icon { color: var(--ink-soft); }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; }
.people-list li { display: flex; align-items: center; gap: .7rem; min-height: 3rem; padding: .35rem 0; border-bottom: 1px solid var(--grey-100); }
.people-list li:last-child { border-bottom: 0; }
.people-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.people-list-muted .people-name { color: var(--ink-soft); font-weight: 500; }
.people-list .inline-form { display: inline-flex; }
@media (max-width: 600px) {
  .sheet { width: 100%; max-width: none; margin: auto 0 0; max-height: 85dvh; border-radius: var(--radius) var(--radius) 0 0; }
  .sheet[open] { animation: sheet-up .2s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.install-steps { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .9rem; }
.install-steps li { display: flex; align-items: flex-start; gap: .85rem; }
.install-step-icon { flex: none; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); }
.install-step-icon .icon { width: 1.3rem; height: 1.3rem; }
.install-steps li > span:last-child { padding-top: .35rem; }
.install-note { margin: 1.1rem 0 0; font-size: .85rem; }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--ink-soft); }
.empty-state .icon { width: 2.6rem; height: 2.6rem; color: var(--blue); margin-bottom: .5rem; }

/* ------------------------------------------------------------------ Avatare */
.avatar { display: inline-block; border-radius: 50%; object-fit: cover; flex: none; background: var(--grey-100); }
.avatar-xs { width: 1.5rem; height: 1.5rem; font-size: .6rem; }
.avatar-sm { width: 2rem; height: 2rem; font-size: .75rem; }
.avatar-md { width: 2.8rem; height: 2.8rem; font-size: 1rem; }
.avatar-xl { width: 6rem; height: 6rem; font-size: 2rem; }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 800; color: #fff; letter-spacing: .02em; }
.tone-0 { background: var(--blue); }
.tone-1 { background: var(--orange-600); }
.tone-2 { background: var(--coral); }
.tone-3 { background: var(--green); }
.tone-4 { background: #6a7fdb; }

/* ------------------------------------------------------------------ Formulare */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-weight: 650; font-size: .92rem; }
.input { width: 100%; padding: .75rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea.input { resize: vertical; min-height: 5rem; }
.input[type="datetime-local"], .input[type="date"], .input[type="time"] { min-width: 0; max-width: 100%; min-height: 3rem; -webkit-appearance: none; appearance: none; text-align: left; }
.input[type="datetime-local"]::-webkit-date-and-time-value, .input[type="date"]::-webkit-date-and-time-value, .input[type="time"]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.input[aria-invalid="true"] { border-color: var(--coral); }
.input:disabled, .input[readonly] { background: var(--bg); color: var(--ink-soft); border-style: dashed; opacity: .75; cursor: not-allowed; -webkit-text-fill-color: var(--ink-soft); }
.input-lg { padding: 1rem 1.1rem; font-size: 1.1rem; border-radius: 14px; }
.field-error { color: var(--red-ink); font-size: .88rem; font-weight: 600; margin: 0; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
/* Training-Rhythmus: Wochentag nur bei "wöchentlich", Datum (und Hinweis) nur bei allen anderen Rhythmen */
.form:has(#recurrence option[value="weekly"]:checked) .rec-date,
.form:not(:has(#recurrence option[value="weekly"]:checked)) .rec-weekly { display: none; }
.form-inline { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; margin-top: 1rem; }
.checkbox { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.checkbox input { width: 1.2rem; height: 1.2rem; accent-color: var(--blue); }
.pref-group { display: grid; gap: .6rem; margin: 0; padding: .75rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.pref-group legend { padding: 0 .4rem; font-weight: 700; font-size: .88rem; color: var(--ink-soft); }

/* Datum/Uhrzeit (deutsches Format) + Picker */
.field .label { font-weight: 650; font-size: .92rem; }
.dt-group { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: .5rem; }

/* Art wählt die sichtbaren Felder (reines CSS, funktioniert auch ohne JavaScript) */
.form:has(#kind):not(:has(#kind option[value="team"]:checked)) .team-only,
.form:has(#kind):not(:has(#kind option[value="team"]:checked)) .hint-team,
.form:has(#kind):not(:has(#kind option[value="game"]:checked)) .hint-game,
.form:has(#kind):not(:has(#kind option[value="game"]:checked)):not(:has(#kind option[value="tournament"]:checked)) .staff-only,
.form:has(#kind):not(:has(#kind option[value="tournament"]:checked)) .hint-tournament,
.form:has(#kind):not(:has(#kind option[value="tournament"]:checked)) .tournament-only { display: none; }
.tournament-only > .label { margin: 0 0 .4rem; }
.min-players .label { margin: 0 0 .4rem; }
.min-players-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.min-players-grid .field { margin: 0; }

/* Optionales Ende: eingeklappt hinter einem Link, damit das Formular ruhig bleibt */
.optional-field > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--blue-700); font-weight: 700; font-size: .92rem; padding: .35rem .6rem .35rem .4rem; margin-left: -.4rem; border-radius: 10px; }
.optional-field > summary::-webkit-details-marker { display: none; }
.optional-field > summary:hover { background: var(--blue-100); }
.optional-field > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.optional-field > summary .icon { width: 1.1rem; height: 1.1rem; }
.optional-field > summary small { font-weight: 500; color: var(--ink-soft); }
.optional-field[open] > summary { display: none; }
.picker { position: relative; min-width: 0; }
.picker .input { padding-right: 2.8rem; }
.picker-btn { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--blue-700); cursor: pointer; }
.picker-btn[hidden] { display: none; }
.picker-btn:hover, .picker-btn[aria-expanded="true"] { background: var(--blue-100); }
.picker-btn .icon { width: 1.2rem; height: 1.2rem; }
.picker-pop { position: absolute; z-index: 40; top: calc(100% + .4rem); left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .75rem; width: min(19rem, calc(100vw - 2rem)); }
.picker-pop-time { left: auto; right: 0; width: min(17rem, calc(100vw - 2rem)); }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.picker-title { font-size: .98rem; }
.picker-nav { width: 2.4rem; height: 2.4rem; border: 0; border-radius: 10px; background: var(--grey-100); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.picker-nav:hover { background: var(--blue-100); }
.picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; text-align: center; }
.picker-wd { font-size: .75rem; font-weight: 700; color: var(--ink-soft); padding: .25rem 0; }
.picker-day, .picker-cell { border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; min-height: 2.3rem; }
.picker-day:hover, .picker-cell:hover { background: var(--blue-100); }
.picker-day.is-today { box-shadow: inset 0 0 0 2px var(--orange); }
.picker-day.is-match { background: var(--green-100); color: var(--green-700); }
.picker-day.is-match:hover { background: var(--green); color: #fff; }
/* Bestehende Events im Kalender: Spieltag rot, Turnier orange, Team-Event blau */
.picker-day { position: relative; }
.picker-day.has-events { padding-bottom: .55rem; }
.picker-dots { position: absolute; left: 0; right: 0; bottom: .22rem; display: flex; justify-content: center; gap: .2rem; pointer-events: none; }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--surface); }
.dot-game { background: #d93025; }
.dot-tournament { background: var(--orange-600); }
.dot-team { background: var(--blue); }
.dot-training { background: var(--green); }
.picker-day.has-training { background: var(--green-100); color: var(--green-700); }
.picker-day.has-training:hover { background: var(--green); color: #fff; }
.picker-day.is-selected .dot { box-shadow: 0 0 0 1.5px #fff; }
.picker-day.is-peek { box-shadow: inset 0 0 0 2px var(--blue); }
.picker-peek { display: grid; gap: .25rem; margin-top: .6rem; padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--blue-50); border: 1px solid var(--blue-100); font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.picker-peek[hidden] { display: none; }
.picker-peek-row { display: flex; align-items: flex-start; gap: .45rem; }
.picker-peek-row .dot { margin-top: .3rem; flex: none; }
.picker-peek-hint { font-weight: 500; color: var(--ink-soft); }
.picker-events { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .6rem; padding-top: .5rem; border-top: 1px solid var(--line); font-size: .76rem; font-weight: 600; color: var(--ink-soft); }
.picker-events-item { display: inline-flex; align-items: center; gap: .35rem; }
.picker-day:disabled, .picker-link:disabled { opacity: .35; cursor: not-allowed; }
.picker-day:disabled:hover, .picker-link:disabled:hover { background: transparent; }
.picker-legend { float: left; padding: .3rem 0; font-size: .78rem; font-weight: 600; color: var(--green-700); }
.picker-day.is-selected, .picker-cell.is-selected { background: var(--blue); color: #fff; }
.picker-foot { margin-top: .5rem; text-align: right; }
.picker-link { border: 0; background: transparent; color: var(--blue-700); font: inherit; font-weight: 700; cursor: pointer; padding: .3rem .5rem; border-radius: 8px; }
.picker-link:hover { background: var(--blue-100); }
.picker-sub { margin: .25rem 0 .35rem; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.picker-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .2rem; }
.picker-day:focus-visible, .picker-cell:focus-visible, .picker-nav:focus-visible, .picker-link:focus-visible, .picker-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
input[type="file"].input { padding: .6rem; }
.attend-form .field { margin-bottom: .9rem; }

.auth-wrap { display: grid; place-items: start center; padding: 2rem 1rem 3rem; }
.auth-card { width: min(440px, 100%); padding: 2rem; box-shadow: var(--shadow); }
.auth-card-wide { width: min(600px, 100%); }
.auth-logo { display: block; margin: 0 auto 1rem; }
.auth-card h1 { text-align: center; font-size: 1.8rem; }
.auth-card > .muted { text-align: center; }
.auth-alt { text-align: center; margin: 1.25rem 0 0; color: var(--ink-soft); }

/* ------------------------------------------------------------------ Join-Seite */
.steps { list-style: none; display: grid; gap: 1.25rem; }
@media (max-width: 859px) { .steps { gap: 2.25rem; padding-top: 1.25rem; } }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 2.2rem; }
.step-no { position: absolute; top: -1rem; left: 1.25rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #12202c; font-weight: 800; box-shadow: var(--shadow-sm); }
.step p { color: var(--ink-soft); }
.step p.step-hint { margin: .6rem 0 0; font-size: .9rem; font-weight: 700; }
.step-hint .icon { transform: rotate(90deg); width: 1em; height: 1em; vertical-align: -.15em; }

/* Gabelung: Pfeile von Schritt 2 zu den beiden Beitrittswegen (nur im 3-spaltigen Layout) */
.fork { display: none; }
@media (min-width: 860px) {
  .step p.step-hint { display: none; }
  .fork { --fork: var(--orange-600); display: block; position: relative; height: 4.5rem; margin: -3.1rem 0 .4rem; }
  .fork > span { position: absolute; background: var(--fork); }
  .fork-stem { left: 50%; top: 0; width: 3px; height: 1.6rem; transform: translateX(-50%); }
  .fork-bar { left: 25%; right: 25%; top: 1.6rem; height: 3px; }
  .fork-drop { top: 1.6rem; width: 3px; height: 2.4rem; transform: translateX(-50%); }
  .fork-left { left: 25%; }
  .fork-right { left: 75%; }
  .fork-drop::after { content: ''; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); border-inline: 8px solid transparent; border-top: 11px solid var(--fork); }
  .fork-drop em { position: absolute; top: .55rem; left: 1rem; font-style: normal; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; padding: .1rem .55rem; border-radius: 999px; background: var(--orange-100); color: var(--amber-ink); }
  .fork-drop.fork-right em { left: auto; right: 1rem; }
}
.step p.price-tile {
  display: grid; justify-items: center; gap: 0; margin: .8rem 0 0; padding: .5rem .8rem; text-align: center;
  border-radius: 14px; color: #12202c;
  background: linear-gradient(135deg, var(--orange), #ffd77f);
  box-shadow: 0 3px 8px -4px rgba(231, 156, 12, .6), inset 0 0 0 2px rgba(255, 255, 255, .55);
}
.price-label { font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b4a00; }
.price-value { font-size: 1.7rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: #12202c; }
.price-value small { font-size: .85rem; font-weight: 700; letter-spacing: 0; }
.price-unit { font-size: .8rem; font-weight: 700; color: #6b4a00; }
.join-option { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; }
/* Diagonales Band in der oberen rechten Ecke (läuft von oben links nach rechts mitte) */
.sticker {
  position: absolute; top: 1.55rem; right: -3.3rem; z-index: 1; width: 12rem;
  display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .3rem 0;
  background: var(--green); color: #fff;
  font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 4px 10px -3px rgba(15, 125, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .15);
  transform: rotate(45deg);
}
.sticker .icon { width: 1em; height: 1em; }
.join-option .btn { margin-top: auto; }
.join-primary { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.contact-card { margin-top: 2.5rem; text-align: center; }
.contact-card p { margin: 0; }

/* ------------------------------------------------------------------ Events */
.event-list { display: grid; gap: 1rem; }
.event-card { display: flex; align-items: center; gap: 1.25rem; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.event-card { position: relative; }
.unanswered-dot { position: absolute; top: .6rem; right: .6rem; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #d64a38; color: #fff; font-size: .8rem; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px rgba(214, 74, 56, .45); pointer-events: none; }
.event-card.is-past .date-badge, .event-card.is-past .event-kind, .event-hero.is-past .date-badge { filter: grayscale(.7); opacity: .8; }
.event-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.event-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .35rem; }
.event-title { font-size: 1.2rem; letter-spacing: -.01em; }
.event-go { color: var(--blue); }

/* Event-Übersicht: ruhige Kachel. Oben Datum + Titel + Infos, darunter eine Statuszeile.
   Farbe nur mit Bedeutung: grün = erledigt/erfüllt, orange = es fehlt noch etwas, alles andere neutral. */
.event-list { gap: .85rem; }
@media (min-width: 900px) { .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.event-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 1fr auto; grid-template-areas: "date body go" "foot foot foot"; align-items: start; gap: .85rem 1rem; padding: 1.1rem 1.2rem 1rem; }
.event-card .date-badge { grid-area: date; }
.event-card .event-body { grid-area: body; gap: 0; }
.event-card .event-go { grid-area: go; align-self: center; }
.event-card .event-foot { grid-area: foot; }
.date-badge .dow { margin: 0 0 .2rem; font-size: .66rem; opacity: .8; }
.event-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.event-kind .icon { width: .95em; height: .95em; color: var(--blue); }
.event-kind-extra { display: inline-flex; align-items: center; gap: .3rem; }
.event-card .event-title { margin-top: .15rem; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.event-info { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .3rem; }
.event-info .meta, .event-foot .meta { margin: 0; font-size: .9rem; gap: .35rem; }
.event-info .meta .icon, .event-foot .meta .icon { width: 1em; height: 1em; flex: none; }
.event-note { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.event-note .icon { width: 1em; height: 1em; flex: none; }
.event-note.is-ok { color: var(--green-700); }
.event-note.is-warn { color: var(--amber-ink); }
.event-note.is-cancel { color: var(--red-ink-2); }
.notice-cancel { background: var(--coral-100); border-color: transparent; color: var(--red-ink-2); }
.event-card.is-cancelled .event-title, .event-hero.is-cancelled h1 { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--coral); color: var(--ink-soft); }
.event-card.is-cancelled .date-badge, .event-card.is-cancelled .event-kind, .event-hero.is-cancelled .date-badge { filter: grayscale(1); opacity: .7; }
.event-hero .notice { margin: 0 0 1rem; }
.cancel-card form .checkbox { margin-bottom: .75rem; }
.event-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.1rem; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .88rem; }
.event-count strong { color: var(--ink); }
.meter { display: inline-flex; align-items: center; gap: .5rem; }
.meter svg { width: 5.25rem; height: .5rem; flex: none; }
.meter .meter-off { fill: var(--grey); }
.meter.is-ok .meter-on { fill: var(--green); }
.meter.is-missing .meter-on { fill: var(--orange-600); }
.meter-text { color: var(--ink-soft); white-space: nowrap; }
.meter-text strong { color: var(--ink); }
.event-mine { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; font-weight: 700; white-space: nowrap; }
.event-mine .icon { width: 1em; height: 1em; }
.event-mine.is-yes { color: var(--green-700); }
.event-mine.is-no { color: var(--ink-soft); }
.event-mine.is-none { color: var(--blue-700); }
.event-missing { flex-basis: 100%; display: flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; color: var(--amber-ink); }
.event-missing .icon { width: 1em; height: 1em; flex: none; }
@media (max-width: 600px) {
  .page-head { padding: 1.25rem 0 .75rem; }
  .page-head .lead { font-size: .95rem; margin-bottom: 0; }
  .page-head .btn-row { margin-top: .75rem; }
  .filter-pills.filter-pills-scroll { flex-wrap: nowrap; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
  .filter-pills-scroll .filter-pills-group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; min-width: 0; }
  .filter-pills-scroll .filter-pills-group::-webkit-scrollbar { display: none; }
  .filter-pills-scroll .filter-pill { flex: none; min-height: 2.2rem; padding: .25rem .75rem; font-size: .88rem; }
  .event-list { gap: .6rem; }
  .event-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "date body" "foot foot"; gap: .65rem .8rem; padding: .85rem .9rem .75rem; }
  .event-card .event-go { display: none; }
  .event-card .date-badge { min-width: 3.1rem; height: 4rem; padding: 0 .3rem; border-radius: 12px; }
  .event-card .date-badge strong { font-size: 1.3rem; }
  .event-card .date-badge small { font-size: .62rem; margin-top: .15rem; }
  .event-card .date-badge .dow { margin: 0 0 .15rem; }
  .event-card .event-title { font-size: 1.05rem; }
  .event-info { gap: .05rem .8rem; margin-top: .2rem; }
  .event-info .meta { font-size: .85rem; }
  .event-foot { gap: .35rem .9rem; padding-top: .6rem; font-size: .84rem; }
  .meter svg { width: 4rem; }
}


/* Farbe nach Art: Spieltag = rot, Turnier = orange, Team-Event = blau (Kacheln und Filter) */
.kind-game { --k: var(--coral); --k-soft: var(--coral-100); --k-ink: var(--red-ink-2); --k-solid: #d64a38; --k-on: #fff; }
.kind-tournament { --k: var(--orange-600); --k-soft: var(--orange-100); --k-ink: var(--amber-ink); --k-solid: #fab533; --k-on: #12202c; }
.kind-team { --k: var(--blue); --k-soft: var(--blue-100); --k-ink: var(--blue-700); --k-solid: #1081c5; --k-on: #fff; }
.event-card[class*="kind-"] { box-shadow: inset 5px 0 0 var(--k), var(--shadow-sm); padding-left: 1.45rem; }
.event-card[class*="kind-"]:hover { box-shadow: inset 5px 0 0 var(--k), var(--shadow); }
.event-card[class*="kind-"] .date-badge { background: var(--k-soft); color: var(--k-ink); }
.event-card[class*="kind-"] .event-kind, .event-card[class*="kind-"] .event-kind .icon { color: var(--k-ink); }
.event-card[class*="kind-"] .event-foot { border-top-color: var(--k-soft); }
.filter-pill.has-kind { background: var(--k-soft); border-color: transparent; color: var(--k-ink); }
.filter-pill.has-kind .icon { width: 1em; height: 1em; flex: none; }
.filter-pill.has-kind small { color: inherit; opacity: .75; }
.filter-pill.has-kind:hover { background: var(--k-soft); border-color: var(--k); }
.filter-pill.has-kind.is-active { background: var(--k-solid); border-color: var(--k-solid); color: var(--k-on); }
.filter-pill.has-kind.is-active small { color: inherit; opacity: .85; }
.filter-pill.has-kind:focus-visible { outline-color: var(--k); }
@media (max-width: 600px) { .event-card[class*="kind-"] { padding-left: 1.15rem; } }

/* Detailseite: Kopfkarte mit Datumskachel, Titel und Fakten (Wann / Wo / Angelegt von) */
.event-hero { display: grid; gap: 1.1rem; padding: 1.4rem 1.5rem 1.3rem 1.75rem; box-shadow: inset 5px 0 0 var(--k), var(--shadow-sm); }
.event-hero-top { display: flex; align-items: center; gap: 1.1rem; }
.event-hero .date-badge { background: var(--k-soft); color: var(--k-ink); min-width: 4.6rem; height: 5.2rem; }
.event-hero .date-badge strong { font-size: 1.9rem; }
.event-hero .date-badge small { font-size: .72rem; }
.event-hero-title { min-width: 0; flex: 1; }
.event-hero .event-chips { margin: 0 0 .4rem; }
.event-hero h1 { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.15; overflow-wrap: anywhere; }
.event-facts { list-style: none; margin: 0; padding: 1.1rem 0 0; border-top: 1px solid var(--k-soft); display: grid; gap: 1rem 1.75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.event-fact { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.fact-icon { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--k-soft); color: var(--k-ink); }
.fact-icon .icon { width: 1.1rem; height: 1.1rem; }
.fact-body { display: grid; min-width: 0; line-height: 1.35; }
.fact-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.fact-value { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fact-sub { font-size: .9rem; color: var(--ink-soft); }
.event-facts .location { display: block; margin: 0; font-size: 1rem; color: var(--ink); }
.event-facts .location > .icon { display: none; }
.event-facts .location > span { display: block; font-weight: 600; overflow-wrap: anywhere; }
.event-facts .map-link { font-weight: 400; font-size: .9rem; }
.event-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--k-soft); }
@media (max-width: 600px) {
  .event-hero { gap: .9rem; padding: 1rem 1rem 1rem 1.2rem; }
  .event-hero-top { gap: .8rem; }
  .event-hero .date-badge { min-width: 3.5rem; height: 4.4rem; padding: 0 .3rem; border-radius: 12px; }
  .event-hero .date-badge strong { font-size: 1.5rem; }
  .event-hero .date-badge small { font-size: .62rem; }
  .event-facts { padding-top: .9rem; gap: .85rem; }
  .event-hero-actions .btn { flex: 1 1 100%; min-height: 2.75rem; justify-content: center; }
}
.event-detail { display: grid; gap: 1.25rem; padding-bottom: 3rem; }
/* Mobil hat .page-head nur .75rem Fußabstand: ergänzen, damit der Abstand zur ersten Karte so groß ist wie zwischen den Karten */
@media (max-width: 600px) { .event-detail { padding-top: .5rem; } }
@media (min-width: 900px) { .event-detail { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.event-main, .event-side { display: grid; gap: 1.25rem; }
/* Mobil: Teilnehmende direkt nach „Deine Zusage“ statt am Ende */
@media (max-width: 899px) {
    .event-main, .event-side { display: contents; }
    .event-main > *, .event-side > * { order: 4; }
    .event-main > .info-card { order: 0; }
    /* Ergebnis (nur bei vergangenen Spieltagen) direkt nach den Infos; gleiche Ordnung, Quellreihenfolge bleibt */
    .event-main > .result-card { order: 0; }
    .event-main > .rsvp-card { order: 1; }
    .event-side > .participants-card { order: 2; }
    .event-side > .staffing-card { order: 3; }
    /* Startaufstellung ganz ans Ende; greift auch für die Live-Ansicht (Wrapper hat display: contents) */
    .event-main .lineup-card { order: 5; }
    /* Event absagen/Absage zurücknehmen ganz am Ende */
    .event-main > .cancel-card { order: 6; }
}
.big-number { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 .5rem; }
.big-number small { font-size: .9rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.gender-split { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
@media (max-width: 899px) { .big-number { font-size: 2rem; margin-bottom: .4rem; } .gender-split { margin-bottom: .75rem; } }
.gender-split-compact { margin: .3rem 0 0; }

/* Besetzung eines Spieltags: ein Kästchen je benötigtem Platz (gefüllt = zugesagt) */
.staffing { list-style: none; display: grid; gap: 1rem; margin: 0; padding: 0; }
.staffing-row { display: grid; gap: .35rem; }
.staffing-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.staffing-count { font-weight: 800; font-size: 1.1rem; }
.slots { display: flex; flex-wrap: wrap; gap: .3rem; }
.slot { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px dashed var(--grey); background: transparent; }
.slot.is-filled { border-style: solid; border-color: transparent; }
.slot-total.is-filled { background: var(--green); }
.slot-female.is-filled { background: var(--coral); }
.slot-male.is-filled { background: var(--blue); }
.staffing-state { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.staffing-state .icon { width: 1em; height: 1em; }
.staffing-row.is-ok .staffing-state { color: var(--green-700); }
.staffing-row.is-missing .staffing-state { color: var(--red-ink-2); }
.staffing-summary { display: flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border-radius: var(--radius-sm); font-weight: 700; margin: 0 0 1rem; }
.staffing-summary .icon { width: 1.1em; height: 1.1em; flex: none; }
.staffing-summary.is-ok { background: var(--green-100); color: var(--green-700); }
.staffing-summary.is-missing { background: var(--orange-100); color: var(--amber-ink-2); }
.staff-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.staff-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.staff-chip .icon { width: .9em; height: .9em; }
.staff-chip.is-ok { background: var(--green-100); color: var(--green-700); }
.staff-chip.is-missing { background: var(--orange-100); color: var(--amber-ink-2); }
.staff-chip.is-pending { background: var(--blue-100); color: var(--blue-700); }
.staff-chip.is-neutral { background: var(--grey-100); color: var(--ink-soft); }

/* Turnier-Anmeldung */
.reg-status { display: flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border-radius: var(--radius-sm); font-weight: 700; margin: 0 0 1rem; }
.reg-status .icon { width: 1.1em; height: 1.1em; flex: none; }
.reg-open { background: var(--orange-100); color: var(--amber-ink-2); }
.reg-pending { background: var(--blue-100); color: var(--blue-700); }
.reg-registered { background: var(--green-100); color: var(--green-700); }
.facts { display: grid; gap: .15rem; margin: 0; }
.facts dt { display: flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--ink-soft); margin-top: .6rem; }
.facts dt .icon { width: 1em; height: 1em; }
.facts dd { margin: 0; font-weight: 650; }
.facts dd small { font-weight: 500; color: var(--ink-soft); }
.facts dd.is-urgent, .hint-urgent { color: var(--red-ink-2); }
.reg-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* Startaufstellung (Spielfeld mit Positionen 1-6) */
.live-contents { display: contents; }
.lineup-card .court-wrap { max-width: none; margin: 1rem auto 0; }
.court-net { margin: 0; padding: .2rem 0; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: repeating-linear-gradient(90deg, var(--navy) 0 8px, var(--blue-deep) 8px 16px); border: 2px solid var(--blue-deep); border-bottom: 0; border-radius: 8px 8px 0 0; }
.court { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; background: var(--surface); border: 2px solid var(--blue-deep); border-top: 0; border-radius: 0 0 8px 8px; }
.court-slot { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .4rem; min-height: 6.5rem; padding: .35rem; background: var(--blue-50); }
.court-slot.is-over { background: var(--blue-100); outline: 2px dashed var(--blue); outline-offset: -4px; }
/* Anordnung der aktiven Positionen (Zeile r, Spalte c; siehe lineup_layout() in events.php / courtLayout() in app.js) */
.court-slot.r1 { grid-row: 1; } .court-slot.r2 { grid-row: 2; } .court-slot.r3 { grid-row: 3; }
.court-slot.c1 { grid-column: 1; } .court-slot.c2 { grid-column: 2; } .court-slot.c3 { grid-column: 3; }
.court-wrap.cols-2 .court { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.court-wrap.cols-1 .court { grid-template-columns: minmax(0, 1fr); }
.lineup-card .court-wrap.cols-2 { max-width: 40rem; }
.lineup-card .court-wrap.cols-1 { max-width: 20rem; }
@media (min-width: 700px) { .court-slot { min-height: 8rem; } .slot-body { min-height: 6rem; } }
.pos-picker { margin: 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.lineup-card .lineup-editor .court-wrap { margin-top: 1.25rem; }
.pos-picker legend { padding: 0 .4rem; font-weight: 700; font-size: .88rem; color: var(--ink-soft); }
.pos-toggles { display: flex; flex-wrap: wrap; gap: .5rem; }
.pos-toggle { position: relative; display: inline-grid; cursor: pointer; }
.pos-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pos-toggle span { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; font-weight: 800; color: var(--ink-soft); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); }
.pos-toggle input:checked + span { color: #fff; background: var(--blue-deep); border-color: var(--blue-deep); }
.pos-toggle input:not(:checked) + span { color: var(--red-ink-2); background: var(--coral-100); border-color: var(--coral); opacity: .85; }
.pos-toggle input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 599px) {
  .pos-picker { padding: .6rem .7rem; }
  .pos-toggles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; }
  .pos-toggle span { min-width: 0; min-height: 2.3rem; }
}
.pos-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.pos-picker .hint { margin: .75rem 0 0; }
.pos-no { position: absolute; top: .25rem; left: .45rem; font-size: 1.15rem; font-weight: 800; line-height: 1; color: var(--blue-700); opacity: .5; }
.slot-body { display: grid; place-items: center; min-height: 4.8rem; padding-top: 1.1rem; }
.slot-empty { font-size: .78rem; color: var(--ink-soft); text-align: center; }
.slot-person { position: relative; display: grid; justify-items: center; gap: .2rem; min-width: min(100%, 6.5rem); max-width: 100%; padding: .4rem .4rem .35rem; text-align: center; font-size: .82rem; font-weight: 650; line-height: 1.2; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.slot-person[draggable="true"], .pool-chip { cursor: grab; }
.pool-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .7rem .25rem .25rem; font-size: .9rem; font-weight: 550; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; user-select: none; }
.slot-person.g-f, .pool-chip.g-f { border-color: var(--coral); }
.slot-person.g-m, .pool-chip.g-m { border-color: var(--blue); }
.slot-person.is-draft, .pool-chip.is-draft { border-style: dashed; background: var(--orange-100); }
.pool-chip.is-placed { opacity: .4; }
.is-dragging { opacity: .45; }
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.jersey-no { position: absolute; right: -.45rem; bottom: -.3rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--navy); color: #fff; border: 2px solid var(--surface); font-size: .68rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.chip-state { display: inline-flex; align-items: center; gap: .2rem; font-size: .7rem; font-weight: 700; color: var(--amber-ink); }
.chip-state .icon { width: .85em; height: .85em; }
.slot-clear { position: absolute; top: -.55rem; right: -.55rem; width: 1.4rem; height: 1.4rem; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.slot-select { width: 100%; min-height: 0; padding: .3rem .4rem; font-size: .8rem; }
.lineup-pool { display: grid; gap: 1rem; margin-top: 1.25rem; padding: .75rem; border: 1px dashed var(--grey); border-radius: var(--radius-sm); }
.lineup-pool.is-over { background: var(--grey-100); }
.pool-group .label { margin: 0 0 .4rem; }
.pool-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.lineup-editor .notice { margin-bottom: 1rem; }
.lineup-status { align-self: center; font-size: .9rem; color: var(--ink-soft); }
.lineup-status.is-error { color: var(--red-ink-2); }
/* Legende unter dem Spielfeld */
.lineup-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .5rem; max-width: 34rem; margin: .9rem auto 0; padding: 0; }
.lineup-card .lineup-legend { max-width: none; }
.lineup-legend li { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .7rem .25rem .35rem; font-size: .8rem; font-weight: 600; color: var(--ink-soft); background: var(--grey-100); border-radius: 999px; }
.legend-swatch { flex: none; width: 1.1rem; height: 1.1rem; background: var(--surface); border: 2px solid var(--line); border-radius: 6px; }
.legend-swatch.sw-m { border-color: var(--blue); }
.legend-swatch.sw-f { border-color: var(--coral); }
.legend-swatch.sw-draft { border-style: dashed; border-color: var(--amber-ink); background: var(--orange-100); }
.item-list { list-style: none; display: grid; gap: .5rem; margin-bottom: 1rem; }
.item-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--coral-100); }
.icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--red-ink); padding: .35rem; border-radius: 8px; }
.icon-btn:hover { background: rgba(255, 255, 255, .7); }
.inline-form { display: inline; margin: 0; }
.inline-add { display: flex; flex-wrap: wrap; gap: .6rem; }
.inline-add .input { flex: 1 1 14rem; }
.inline-add .input-auto { flex: 0 1 11rem; width: auto; }
.inline-add-labeled { align-items: flex-end; }
.mf { display: flex; flex-direction: column; flex: 1 1 14rem; min-width: 0; }
.mf-auto { flex: 0 1 11rem; }
.mf .input { width: 100%; flex: none; }
.inline-add-labeled .input, .inline-add-labeled .btn { box-sizing: border-box; height: 3rem; line-height: 1.3; }
.inline-add-labeled select.input { -webkit-appearance: none; appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.1rem; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: .75rem; top: 50%; width: 1.05rem; height: 1.05rem; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.input-icon > .input { padding-left: 2.4rem; }
.input-icon:focus-within > .icon { color: var(--blue-700); }

/* ------------------------------------------------------------------ Profil / Admin */
.profile { padding-bottom: 3rem; display: grid; gap: 1.25rem; }
.profile-grid { display: grid; gap: 1.25rem; align-items: start; }
.profile-col { display: grid; gap: 1.25rem; min-width: 0; }
@media (min-width: 860px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.profile .card { padding: 1.5rem; }
.profile .card h2 { margin: 0; font-size: 1.15rem; }
.card-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem; }
.card-head p { margin: 0; font-size: .88rem; }
.card-head .feature-icon { margin: 0; width: 2.6rem; height: 2.6rem; border-radius: 12px; }
.card-head .feature-icon .icon { width: 1.3rem; height: 1.3rem; }
.profile-sub { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.profile-hero { padding: 0; overflow: hidden; }
.profile .profile-hero { padding: 0; }
.profile-hero-top { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; background: linear-gradient(135deg, var(--blue-50), var(--surface)); }
.profile-hero-top .avatar-xl { width: 5.5rem; height: 5.5rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--blue-100); }
.profile-hero-main { min-width: 0; }
.profile-name { margin: 0; font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.profile-fullname { margin: .1rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.person-name[title] { cursor: help; text-decoration: underline dotted; text-decoration-color: var(--ink-soft); text-underline-offset: 3px; }
.name-pop {
  position: fixed; inset: auto; margin: 0; padding: .4rem .7rem; width: max-content; max-width: min(18rem, calc(100vw - 16px));
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; pointer-events: none;
}
.profile-mail { margin: .15rem 0 .6rem; display: flex; align-items: center; gap: .4rem; color: var(--ink-soft); font-size: .93rem; overflow-wrap: anywhere; }
.profile-chips { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.profile-upload { display: grid; gap: .6rem; padding: 1rem 1.5rem 1.25rem; border-top: 1px solid var(--line); }
.profile-upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.profile-upload .hint, .profile-upload .field-error { margin: 0; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.file-input:focus-visible + .btn { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn.is-busy { opacity: .7; pointer-events: none; }
@media (max-width: 520px) {
  .profile-hero-top { flex-direction: column; text-align: center; padding: 1.5rem 1.1rem; }
  .profile-mail, .profile-chips { justify-content: center; }
  .profile-upload { padding: 1rem 1.1rem 1.25rem; }
  .profile-upload-actions { justify-content: center; }
  .profile-upload .hint { text-align: center; }
  .profile .form .btn { width: 100%; }
  .profile .card:not(.profile-hero) { padding: 1.25rem 1.1rem; }
}

.admin-bar { background: var(--navy); color: #fff; }
.admin-nav { display: flex; gap: .25rem; overflow-x: auto; align-items: center; padding: .4rem 0; scrollbar-width: none; }
.admin-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; margin-right: .75rem; white-space: nowrap; color: var(--orange); }
.admin-link { color: rgba(255, 255, 255, .85); text-decoration: none; padding: .45rem .9rem; border-radius: 999px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.admin-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-link.is-active { background: #fff; color: #0a3d5f; }
.admin-link .icon { display: none; }
/* Desktop: Verwaltungsleiste bleibt direkt unter dem Header stehen (Header: 64 px hoch) */
@media (min-width: 860px) { .admin-bar { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 40; } }
/* Mobil: Kacheln statt horizontalem Scrollen – alle Bereiche auf einen Blick */
@media (max-width: 859px) {
  .admin-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; overflow: visible; padding: .6rem 0 .75rem; }
  .admin-label { grid-column: 1 / -1; margin: 0 0 .1rem .2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
  .admin-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 3.6rem; padding: .5rem .3rem; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: .8rem; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .admin-link .icon { display: block; width: 1.35rem; height: 1.35rem; }
}
.admin-section { padding: 1.75rem 0 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.admin-section h1 { font-size: 1.9rem; margin: 0; }
.admin-grid { align-items: start; }
@media (max-width: 639px) { .admin-grid > .card-first-mobile { order: -1; } }
.narrow { max-width: 38rem; }
.narrow-lg { max-width: 56rem; }
.status-line { margin: 1rem 0; }
.stats .stat { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.stat strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.stat-alert { border-color: var(--orange); background: var(--orange-100); }
.input-narrow { width: 7.5rem; }

/* Statistik: Tabellen und Quoten-Balken */
.stats .stat small { margin-top: .15rem; }
.table-wrap { overflow-x: auto; margin: 0 -.25rem; padding: 0 .25rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: .6rem .6rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data-table thead th { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.data-table tbody th { font-weight: 650; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-cell { display: grid; gap: .2rem; min-width: 9rem; }
.stat-cell strong { font-size: 1rem; line-height: 1.1; }
.stat-cell small { font-size: .74rem; white-space: nowrap; }
.stat-bar { display: block; width: 100%; height: .45rem; border-radius: 999px; overflow: hidden; }
.stat-bar .bar-bg { fill: var(--grey-100); }
.stat-bar .bar-fg { fill: var(--green); }

/* Statistik mobil: Filter als 2-spaltiges Raster, Tabellen als Karten pro Zeile */
.filter-bar-grid .filter-field .input { text-overflow: ellipsis; }
@media (max-width: 700px) {
  .filter-bar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .filter-bar-grid .filter-grow { grid-column: 1 / -1; }
  .filter-bar-grid > .btn { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .filter-bar-grid .input { padding: .65rem .7rem; font-size: .95rem; }

  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  .data-table-stack, .data-table-stack tbody, .data-table-stack tr, .data-table-stack th, .data-table-stack td { display: block; }
  .data-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table-stack tbody { display: grid; gap: .75rem; }
  .data-table-stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .85rem .5rem; background: var(--surface); }
  .data-table-stack th, .data-table-stack td { border: 0; padding: .3rem 0; text-align: left; }
  .data-table-stack tbody tr:last-child > * { border-bottom: 0; }
  .data-table-stack .cell-main { padding: .5rem 0 .4rem; margin-bottom: .2rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .data-table-stack td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
  .data-table-stack td[data-label]::before { content: attr(data-label); flex: none; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
  .data-table-stack td.num { white-space: normal; text-align: right; }
  .data-table-stack .stat-cell { min-width: 0; width: min(13rem, 62%); }
  .data-table-stack .stat-cell small { white-space: normal; }
}
.admin-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.admin-list li:last-child { border-bottom: 0; }
.admin-list li.is-editing { background: var(--blue-50); margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; border-radius: var(--radius-sm); scroll-margin-top: 5rem; }
.admin-list .edit-inline { flex: 1 1 100%; min-width: 0; gap: .85rem; }
.edit-inline .edit-actions { margin: 0; }
/* Mobil: Formular zum Hinzufügen ausblenden, solange ein Eintrag bearbeitet wird */
@media (max-width: 600px) { .hide-mobile { display: none; } }
.edit-inline .edit-actions .btn { flex: 1 1 8rem; justify-content: center; }
@media (max-width: 520px) {
  .admin-list li .row-actions { flex: 1 1 100%; }
  .admin-list li .row-actions > .btn, .admin-list li .row-actions > .inline-form { flex: 1 1 0; }
  .admin-list li .row-actions .inline-form .btn { width: 100%; }
  .admin-list li .row-actions .btn { min-height: 2.75rem; justify-content: center; }
}
/* Mobil: Einträge der Ausfall-Liste als Kacheln, Aktionen als gleich breite Buttons in einer Zeile */
@media (max-width: 600px) {
  .admin-list-cards { gap: .75rem; }
  .admin-list-cards > li:not(.is-editing) { display: grid; gap: .8rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .admin-list-cards > li:not(.is-editing):last-child { border-bottom: 1px solid var(--line); }
  .admin-list-cards .row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
  .admin-list-cards .row-actions .inline-form { display: block; }
  .admin-list-cards .row-actions .btn { width: 100%; min-height: 2.9rem; justify-content: center; }
}
/* Umschalter (segmentierte Auswahl, bewusst anders als ein Button: Schiene mit hervorgehobenem Segment) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border-radius: 999px; background: var(--grey-100); border: 1px solid var(--line); }
.seg label { position: relative; display: block; min-width: 0; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .4rem .9rem; border-radius: 999px; font-weight: 650; text-align: center; color: var(--ink-soft); -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s, box-shadow .15s; }
.seg span::before { content: ""; flex: none; width: .65rem; height: .65rem; border-radius: 50%; border: 2px solid currentColor; opacity: .55; }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 800; box-shadow: var(--shadow-sm), 0 0 0 1.5px var(--line); }
.seg input:checked + span::before { opacity: 1; border-color: transparent; }
.seg label:nth-child(1) input:checked + span::before { background: var(--ink-soft); }
.seg label:nth-child(2) input:checked + span::before { background: var(--orange-600); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue-100), 0 0 0 1.5px var(--blue); }
.edit-inline .field-label { font-weight: 650; font-size: .92rem; margin-bottom: -.35rem; }
.admin-user { display: flex; align-items: center; gap: .8rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filter-field { min-width: 0; }
.filter-grow { flex: 1 1 14rem; }

/* Filter als Links (funktioniert ohne JavaScript) */
.filter-pills { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-bottom: 1.25rem; }
.filter-pills-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .92rem; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s; }
.filter-pill small { font-weight: 700; color: var(--ink-soft); }
.filter-pill:hover { background: var(--blue-50); border-color: var(--blue-100); }
.filter-pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.filter-pill.is-active small { color: rgba(255, 255, 255, .85); }
.filter-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.result-count { margin: 0; font-size: .9rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.pager-info { font-weight: 700; color: var(--ink-soft); font-size: .92rem; }
.year-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.year-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.year-chip .count { font-size: .78rem; font-weight: 700; color: var(--ink-soft); background: var(--bg); border-radius: 999px; padding: .05rem .5rem; }
.year-chip:hover { border-color: var(--blue); }
.year-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.year-chip.is-active .count { background: rgba(255, 255, 255, .22); color: #fff; }
.year-filter-select { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.year-filter-select label { font-weight: 700; color: var(--ink-soft); }
.year-filter-select .input { min-width: 0; flex: 1 1 auto; max-width: 18rem; }
@media (max-width: 520px) {
  .year-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding: 0 1rem .25rem; scrollbar-width: none; }
  .year-filter::-webkit-scrollbar { display: none; }
  .year-filter-select .input { max-width: none; }
}
.load-more { display: grid; justify-items: center; gap: .5rem; margin-top: 1.5rem; text-align: center; }
.load-more p { margin: 0; font-size: .88rem; }
.load-more .btn.is-busy { opacity: .7; pointer-events: none; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------ Bestätigungs-Modal */
.modal { border: 0; padding: 1.6rem; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(26rem, calc(100% - 2rem)); margin: auto; }
.confirm-modal { position: fixed; inset: 50% auto auto 50%; margin: 0; max-height: calc(100dvh - 2rem); overflow-y: auto; transform: translate(-50%, -50%); }
.modal::backdrop { background: rgba(16, 40, 60, .5); }
.modal[open] { animation: modal-in .15s ease-out; }
.confirm-modal[open] { animation-name: confirm-modal-in; }
.modal-title { font-size: 1.25rem; margin: 0 0 .5rem; }
.modal-text { margin: 0 0 1.4rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes confirm-modal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }

/* ------------------------------------------------------------------ News + Markdown */
.news-list { display: grid; gap: 1rem; }
.news-card { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.news-excerpt { color: var(--ink-soft); overflow-wrap: anywhere; }
.news-more { display: inline-flex; align-items: center; gap: .35rem; color: var(--blue-700); font-weight: 700; font-size: .92rem; }
.news-more .icon { width: 1em; height: 1em; }
.back-link { text-decoration: none; }
.danger-zone { margin-top: 1.25rem; }
.card > .danger-zone { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; margin: 0; }
.danger-zone .delete-form { margin-top: .5rem; }
.checkbox-sm { font-size: .85rem; font-weight: 550; color: var(--ink-soft); }
.checkbox-sm input { width: 1rem; height: 1rem; }
.event-creator { margin-top: .5rem; }
.admin-stack { display: grid; gap: 1.25rem; align-content: start; }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h2 { font-size: 1.4rem; margin: 1.6rem 0 .6rem; }
.md h3 { font-size: 1.2rem; margin: 1.4rem 0 .5rem; }
.md h4 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.md ul, .md ol { padding-left: 1.4rem; margin: 0 0 1em; }
.md li { margin: .2rem 0; }
.md blockquote { margin: 0 0 1em; padding: .6rem 1rem; border-left: 4px solid var(--orange); background: var(--orange-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.md-img { display: block; max-width: 100%; height: auto; margin: .5rem 0; border-radius: var(--radius-sm); background: var(--grey-100); }
.md-blocked { display: inline-block; padding: .1rem .5rem; border-radius: 6px; background: var(--coral-100); color: var(--red-ink-3); font-size: .85rem; font-weight: 600; }
.md-help { margin-top: .5rem; font-size: .9rem; }
.md-help summary { cursor: pointer; font-weight: 650; color: var(--blue-700); }
.md-help pre { margin: .6rem 0 0; padding: .8rem 1rem; background: var(--grey-100); border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; line-height: 1.5; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.email-edit { flex: 1 1 100%; min-width: 0; font-size: .9rem; }
.email-edit summary { cursor: pointer; color: var(--blue-700); font-weight: 600; width: fit-content; max-width: 100%; }
.email-edit .inline-add { margin-top: .5rem; }

/* ------------------------------------------------------------------ Rechtstexte */
.prose { max-width: 52rem; padding-bottom: 3rem; }
.prose h2 { margin-top: 2.2rem; scroll-margin-top: 5rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.1rem; scroll-margin-top: 5rem; }
.prose p, .prose li { color: #2b3a47; }
.prose ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal-grid { margin: 1rem 0 0; }
.legal-grid h3 { margin-top: 0; }
.legal-grid p { margin: 0; }

/* ------------------------------------------------------------------ Footer */
.site-footer { margin-top: 3rem; background: var(--navy); color: rgba(255, 255, 255, .85); padding: 2.5rem 0 2rem; }
.footer-inner { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1.3fr 1fr; align-items: center; } .footer-copy, .site-footer .btn { grid-column: 1 / -1; } }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-brand p { margin: 0; font-size: .9rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer-links a, .footer-copy a { color: rgba(255, 255, 255, .85); }
.footer-links a:hover, .footer-copy a:hover { color: var(--orange); }
.footer-copy { margin: 0; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1rem; }
.site-footer .btn { justify-self: start; }

/* ------------------------------------------------------------------ Fehlerseite / Offline */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(700px 400px at 50% 0, rgba(250, 181, 51, .25), transparent 60%), var(--bg); }
.error-box { text-align: center; max-width: 30rem; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--blue); margin: .5rem 0 0; line-height: 1; }

/* ------------------------------------------------------------------ Dunkles Design (per Umschalter, Standard = hell) */
html[data-theme="dark"] {
  color-scheme: dark;
  --blue-700: #6ab8ee;          /* Text-/Link-Blau */
  --blue-900: #d4ebfa;
  --blue-100: #17405f;
  --blue-50: #12293b;
  --orange-100: #3b2e0e;
  --coral-100: #48211c;
  --green-700: #5fdc9c;
  --green-100: #12382a;
  --grey: #3a4856;
  --grey-100: #212c37;
  --ink: #e8eff6;
  --ink-soft: #a5b5c4;
  --bg: #0d151d;
  --surface: #16212c;
  --line: #2a3947;

  --navy: #0c2a40;
  --amber-ink: #f6c862;
  --amber-ink-2: #f6c862;
  --red-ink: #ff9d8f;
  --red-ink-2: #ff9d8f;
  --red-ink-3: #ffb1a6;
  --glass: 22, 33, 44;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .65);
}
html[data-theme="dark"] .skip-link { color: #0d151d; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle { color: var(--orange); }

/* Blau als reine Textfarbe heller darstellen */
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .tab.is-active,
html[data-theme="dark"] .event-go,
html[data-theme="dark"] .empty-state .icon,
html[data-theme="dark"] .error-code { color: var(--blue-700); }
html[data-theme="dark"] .tab.is-active { color: #4db0ee; }

html[data-theme="dark"] .accent { background: linear-gradient(transparent 62%, rgba(250, 181, 51, .4) 62%, rgba(250, 181, 51, .4) 92%, transparent 92%); }
html[data-theme="dark"] .site-main { background-image:
  radial-gradient(900px 400px at 85% -10%, rgba(250, 181, 51, .12), transparent 60%),
  radial-gradient(800px 500px at -10% 20%, rgba(16, 129, 197, .22), transparent 60%); }
html[data-theme="dark"] .hero-blob { opacity: .22; }
html[data-theme="dark"] .hero-visual img { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .5)); }
html[data-theme="dark"] .hero { background:
  radial-gradient(900px 400px at 85% -10%, rgba(250, 181, 51, .12), transparent 60%),
  radial-gradient(800px 500px at -10% 20%, rgba(16, 129, 197, .22), transparent 60%),
  linear-gradient(180deg, var(--surface), var(--bg)); }
html[data-theme="dark"] .error-page { background: radial-gradient(700px 400px at 50% 0, rgba(250, 181, 51, .12), transparent 60%), var(--bg); }

/* Meldungen */
html[data-theme="dark"] .flash-success { border-color: #1f6e4b; color: #8be8b9; }
html[data-theme="dark"] .flash-error { border-color: #7d3a32; }
html[data-theme="dark"] .notice-warn { border-color: #6b5316; }
html[data-theme="dark"] .card-danger { border-color: #7d3a32; }
html[data-theme="dark"] .tone-orange { color: var(--orange); }
html[data-theme="dark"] .tone-coral { color: #ff9d8f; }
html[data-theme="dark"] .prose p, html[data-theme="dark"] .prose li { color: #c9d6e2; }

/* Zu-/Absage-Buttons: Hover-Farbwechsel nur für nicht gewählte Buttons; Fokus ändert keine Farben (Fokusring bleibt). */
html[data-theme="dark"] .attend-yes { border-color: #1f6e4b; }
html[data-theme="dark"] .attend-yes:not(.is-selected):hover { background: #17473a; }
html[data-theme="dark"] .attend-no:not(.is-selected):hover { background: #2b3844; }
html[data-theme="dark"] .has-choice .attend-btn:not(.is-selected) { background: #1d2833; color: #6f8193; border-color: #1d2833; }
html[data-theme="dark"] .has-choice .attend-btn:not(.is-selected):hover { background: #283543; color: var(--ink-soft); }
/* Gewählter Button (z. B. „Ich bin dabei“ mit Smiley): nur ein dezentes Aufhellen statt Farbwechsel. */
html[data-theme="dark"] .attend-btn.is-selected:hover { filter: brightness(1.08); }

html[data-theme="dark"] .icon-btn:hover { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .btn-secondary { border-color: var(--line); }
html[data-theme="dark"] .btn-secondary:hover { border-color: var(--blue); }
html[data-theme="dark"] .btn-danger:hover { color: #fff; }
html[data-theme="dark"] .modal::backdrop { background: rgba(0, 0, 0, .65); }
html[data-theme="dark"] .modal { border: 1px solid var(--line); }
html[data-theme="dark"] .md-img { opacity: .92; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
