@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/fonts/quicksand.woff2') format('woff2');
}

/* ============ Design Tokens ============ */
:root {
  color-scheme: light;
  /* Farben und Schrift wie auf gsvhemmingen.de: Wappenrot, Schwarz, Weiß; Schrift Quicksand */
  --font: 'Quicksand', 'Segoe UI', ui-sans-serif, system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #faf8f7;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #f3e3e1 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #eeeceb 0%, transparent 60%);
  --surface: #ffffff;
  --surface-2: #f5f2f1;
  --surface-3: #ebe6e5;
  --border: #ebe3e1;
  --border-strong: #d9ccc9;
  --text: #1d1b1b;
  --muted: #5f5755;
  --faint: #a39a98;
  --accent: #a52c23;
  --accent-hover: #861f18;
  --accent-soft: #f7e8e6;
  --accent-ink: #ffffff;
  --club-blue: #1d1d1b; /* Kopfleiste: Schwarz wie der Rand des Wappens */
  --club-red: #d11415;
  --court: #a52c23;
  --free: #15803d;
  --free-soft: #eaf6ee;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --warn: #b45309;
  --warn-soft: #fef5e6;
  --info-soft: #eef2ff;
  --t-training: #6366f1;
  --t-match: #e11d48;
  --t-tournament: #d97706;
  --t-maintenance: #64748b;
  --t-regular: #0d9488;
  --mine: #a52c23;
  --booked: #64748b;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.06);
  --shadow: 0 1px 2px rgb(28 25 23 / 0.05), 0 6px 20px -6px rgb(28 25 23 / 0.12);
  --shadow-lg: 0 24px 60px -12px rgb(28 25 23 / 0.28);
  --ring: 0 0 0 3px rgb(165 44 35 / 0.35);
  --header-h: 64px;
  --row: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #121010;
    --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgb(165 44 35 / 0.3) 0%, transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgb(255 255 255 / 0.04) 0%, transparent 60%);
    --surface: #1b1818;
    --surface-2: #231f1f;
    --surface-3: #2d2827;
    --border: #362f2e;
    --border-strong: #4a403e;
    --text: #f5f0ef;
    --muted: #b3a8a6;
    --faint: #7a6f6d;
    --accent: #f0786d;
    --accent-hover: #f59a91;
    --accent-soft: rgb(240 120 109 / 0.14);
    --accent-ink: #2a0b08;
    --club-red: #f0605a;
    --mine: #f0786d;
    --booked: #94a3b8;
    --free: #4ade80;
    --free-soft: rgb(74 222 128 / 0.1);
    --danger: #f87171;
    --danger-soft: rgb(248 113 113 / 0.12);
    --warn: #fbbf24;
    --warn-soft: rgb(251 191 36 / 0.12);
    --info-soft: rgb(99 102 241 / 0.14);
    --t-training: #818cf8;
    --t-match: #fb7185;
    --t-tournament: #fbbf24;
    --t-maintenance: #94a3b8;
    --t-regular: #2dd4bf;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 24px 60px -12px rgb(0 0 0 / 0.7);
    --ring: 0 0 0 3px rgb(240 120 109 / 0.4);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #121010;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgb(165 44 35 / 0.3) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgb(255 255 255 / 0.04) 0%, transparent 60%);
  --surface: #1b1818;
  --surface-2: #231f1f;
  --surface-3: #2d2827;
  --border: #362f2e;
  --border-strong: #4a403e;
  --text: #f5f0ef;
  --muted: #b3a8a6;
  --faint: #7a6f6d;
  --accent: #f0786d;
  --accent-hover: #f59a91;
  --accent-soft: rgb(240 120 109 / 0.14);
  --accent-ink: #2a0b08;
  --club-red: #f0605a;
  --mine: #f0786d;
  --booked: #94a3b8;
  --free: #4ade80;
  --free-soft: rgb(74 222 128 / 0.1);
  --danger: #f87171;
  --danger-soft: rgb(248 113 113 / 0.12);
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / 0.12);
  --info-soft: rgb(99 102 241 / 0.14);
  --t-training: #818cf8;
  --t-match: #fb7185;
  --t-tournament: #fbbf24;
  --t-maintenance: #94a3b8;
  --t-regular: #2dd4bf;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 24px 60px -12px rgb(0 0 0 / 0.7);
  --ring: 0 0 0 3px rgb(240 120 109 / 0.4);
}

/* ============ Basis ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.boot {
  display: grid;
  place-items: center;
  min-height: 100dvh;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ Buttons & Formulare ============ */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  user-select: none;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-border: transparent;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-danger {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
  --btn-border: transparent;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-border: transparent;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-icon {
  width: 40px;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 32px;
}

.btn-block {
  width: 100%;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
  outline: none;
}

.input::placeholder {
  color: var(--faint);
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.form-grid .span-all {
  grid-column: 1 / -1;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.switch input {
  appearance: none;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex: none;
  margin: 0;
}

.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}

.switch input:checked {
  background: var(--accent);
}

.switch input:checked::after {
  transform: translateX(16px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-toggle {
  position: relative;
}

.chip-toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.chip-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.15s;
}

.chip-toggle input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chip-toggle input:focus-visible + span {
  box-shadow: var(--ring);
}

/* ============ Login ============ */
.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100dvh;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(160deg, #2b2726 0%, #1d1d1b 55%, #0f0e0e 100%);
}

.auth-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #a52c23 0 33.3%, #ffffff 33.3% 66.6%, #1d1d1b 66.6%);
}

.auth-hero > * {
  position: relative;
}

.auth-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 12ch;
}

.auth-hero p {
  margin-top: 16px;
  font-size: 17px;
  opacity: 0.85;
  max-width: 40ch;
}

.auth-features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  opacity: 0.9;
}

.auth-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-features svg {
  width: 18px;
  height: 18px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(400px, 100%);
}

.auth-card h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.auth-card .muted {
  margin-bottom: 24px;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
}

.segmented button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.segmented button[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.25);
}

/* ============ App-Gerüst ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(20px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--club-blue) 0 33.3%, #ffffff 33.3% 66.6%, var(--club-red) 66.6%);
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.nav a svg {
  width: 18px;
  height: 18px;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

.topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #c2382d, #a52c23);
  flex: none;
}

.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.user-btn:hover {
  background: var(--surface-2);
}

.menu {
  position: absolute;
  right: 20px;
  top: calc(var(--header-h) - 6px);
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 40;
  animation: pop 0.16s var(--ease);
}

.menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
}

.menu button:hover {
  background: var(--surface-2);
}

.menu svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: 28px;
  font-weight: 800;
}

.page-head p {
  margin-top: 4px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 22px;
}

.card h2 {
  font-size: 17px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 20px;
}

.grid-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  align-items: start;
}

/* ============ Banner ============ */
.banner {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.banner svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.banner strong {
  display: block;
}

.banner-winter {
  background: linear-gradient(120deg, #e0f2fe, #ede9fe);
  border-color: #c7d2fe;
  color: #1d1d1b;
}

:root[data-theme='dark'] .banner-winter {
  background: linear-gradient(120deg, rgb(56 189 248 / 0.12), rgb(139 92 246 / 0.12));
  border-color: rgb(129 140 248 / 0.25);
  color: #c7d2fe;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .banner-winter {
    background: linear-gradient(120deg, rgb(56 189 248 / 0.12), rgb(139 92 246 / 0.12));
    border-color: rgb(129 140 248 / 0.25);
    color: #c7d2fe;
  }
}

.banner-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.banner-info {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}

/* ============ Datumsleiste ============ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar .date-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.date-picker {
  position: relative;
}

.date-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.daystrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.day-chip {
  flex: none;
  width: 58px;
  padding: 8px 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.15s;
}

.day-chip:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.day-chip .dow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.day-chip .dom {
  font-size: 18px;
  font-weight: 800;
}

.day-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}

.day-chip.today .dot {
  background: var(--accent);
}

.day-chip.closed {
  opacity: 0.45;
}

.day-chip[aria-current='date'] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.day-chip[aria-current='date'] .dow {
  color: inherit;
  opacity: 0.7;
}

.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

/* ============ Belegungsplan ============ */
.schedule-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.schedule {
  display: grid;
  grid-template-columns: 58px repeat(var(--courts, 4), minmax(130px, 1fr));
  grid-template-rows: 54px repeat(var(--rows), var(--row));
  position: relative;
  min-width: 600px;
}

.sch-corner {
  grid-row: 1;
  grid-column: 1;
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.court-head {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 3;
}

.court-head strong {
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.court-head strong::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--free);
  box-shadow: 0 0 0 3px var(--free-soft);
}

.court-head.inactive strong::before {
  background: var(--faint);
  box-shadow: none;
}

.court-head small {
  font-size: 12px;
  color: var(--muted);
}

.time-label {
  grid-column: 1;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  padding: 0 10px 0 0;
  transform: translateY(-8px);
}

.time-label.first {
  transform: none;
  padding-top: 4px;
}

.hour-line {
  grid-column: 2 / -1;
  border-top: 1px solid var(--border);
  pointer-events: none;
}

.hour-line.half {
  border-top-style: dashed;
  opacity: 0.55;
}

.col-line {
  grid-row: 2 / -1;
  border-left: 1px solid var(--border);
  pointer-events: none;
}

.slot {
  margin: 3px;
  border: 1px dashed transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--free);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s, border-color 0.12s;
  z-index: 1;
}

.slot svg {
  width: 16px;
  height: 16px;
}

.schedule.bookable .slot {
  opacity: 0.001;
}

.schedule.bookable .slot:hover,
.schedule.bookable .slot:focus-visible {
  opacity: 1;
  background: var(--free-soft);
  border-color: color-mix(in srgb, var(--free) 45%, transparent);
}

@media (hover: none) {
  .schedule.bookable .slot {
    opacity: 1;
    border-color: color-mix(in srgb, var(--free) 28%, transparent);
    color: color-mix(in srgb, var(--free) 70%, transparent);
  }
  .schedule.bookable .slot span {
    display: none;
  }
}

.slot.past {
  cursor: default;
  pointer-events: none;
}

.past-shade {
  grid-column: 2 / -1;
  grid-row-start: 2;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in srgb, var(--surface-3) 55%, transparent) 6px 7px);
  pointer-events: none;
}

.closed-shade {
  grid-column: 2 / -1;
  grid-row: 2 / -1;
  z-index: 1;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--surface-2) 85%, transparent) 0 10px, color-mix(in srgb, var(--surface-3) 70%, transparent) 10px 11px);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.closed-shade div {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 34ch;
  position: sticky;
  top: 50%;
}

.closed-shade svg {
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.court-off {
  grid-row: 2 / -1;
  z-index: 1;
  margin: 3px;
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, var(--surface-3) 8px 9px);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.event {
  --c: var(--booked);
  margin: 3px;
  padding: 6px 10px;
  border-radius: 10px;
  overflow: hidden;
  z-index: 2;
  background: color-mix(in srgb, var(--c) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-left: 4px solid var(--c);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s;
  min-height: 0;
}

button.event {
  cursor: pointer;
}

button.event:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.event > span {
  flex: none;
}

.event svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  margin-right: 2px;
}

.event .ev-title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event .ev-meta {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event.compact {
  padding: 4px 10px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.event.mine {
  --c: var(--mine);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 10%, var(--surface)));
}

.event.block {
  background-image: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--c) 8%, transparent) 8px 16px);
}

.event.t-training {
  --c: var(--t-training);
}

.event.t-match {
  --c: var(--t-match);
}

.event.t-tournament {
  --c: var(--t-tournament);
}

.event.t-maintenance {
  --c: var(--t-maintenance);
}

.event.t-regular {
  --c: var(--t-regular);
}

.now-line {
  grid-column: 2 / -1;
  height: 0;
  border-top: 2px solid var(--danger);
  z-index: 5;
  position: relative;
  pointer-events: none;
  align-self: start;
}

.now-line::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

/* ============ Listen & Tabellen ============ */
.booking-list {
  display: grid;
  gap: 12px;
}

.booking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.date-badge {
  width: 56px;
  height: 60px;
  border-radius: 12px;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.date-badge b {
  font-size: 22px;
  line-height: 1;
}

.date-badge small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.booking-item .grow {
  flex: 1;
  min-width: 0;
}

.booking-item h3 {
  font-size: 15.5px;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  opacity: 0.55;
}

.empty h3 {
  color: var(--text);
  margin-bottom: 4px;
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  padding: 16px 18px;
}

.stat .label {
  display: block;
}

.stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 2px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.plain::before {
  display: none;
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.ok {
  background: var(--free-soft);
  color: var(--free);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.t-training {
  color: var(--t-training);
  background: color-mix(in srgb, var(--t-training) 13%, transparent);
}

.badge.t-match {
  color: var(--t-match);
  background: color-mix(in srgb, var(--t-match) 13%, transparent);
}

.badge.t-tournament {
  color: var(--t-tournament);
  background: color-mix(in srgb, var(--t-tournament) 13%, transparent);
}

.badge.t-maintenance {
  color: var(--t-maintenance);
  background: color-mix(in srgb, var(--t-maintenance) 13%, transparent);
}

.badge.t-regular {
  color: var(--t-regular);
  background: color-mix(in srgb, var(--t-regular) 13%, transparent);
}

.list {
  display: grid;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item .grow {
  flex: 1;
  min-width: 0;
}

.list-item h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exceptions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.exceptions button {
  border: 0;
  cursor: pointer;
  text-decoration: line-through;
}

.exceptions button:hover {
  text-decoration: none;
}

/* ============ Verwaltung ============ */
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  margin-bottom: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  scrollbar-width: none;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.tabs a svg {
  width: 17px;
  height: 17px;
}

.tabs a:hover {
  color: var(--text);
}

.tabs a[aria-current='page'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.season-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius-lg);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.season-hero.open {
  background: linear-gradient(135deg, #15803d, #166534 60%, #14532d);
}

.season-hero.closed {
  background: linear-gradient(135deg, #2b2726, #1d1d1b 60%, #0f0e0e);
}

.season-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/net.svg') right center / auto 140% no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.season-hero > * {
  position: relative;
  z-index: 1;
}

.season-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.14);
}

.season-icon svg {
  width: 34px;
  height: 34px;
}

.season-hero h2 {
  font-size: 22px;
}

.season-hero p {
  opacity: 0.85;
  margin-top: 4px;
}

.season-hero .btn {
  --btn-bg: #fff;
  --btn-fg: #1c1917;
  --btn-border: transparent;
}

.season-hero .btn:hover {
  background: #f5f5f4;
}

.timeline {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-3);
  margin: 26px 0 8px;
}

.timeline .seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #15803d);
}

.timeline .today {
  position: absolute;
  top: -6px;
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--text);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ============ Dialog ============ */
.dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.dialog[open] {
  animation: dialog-in 0.22s var(--ease);
}

.dialog::backdrop {
  background: rgb(15 14 13 / 0.45);
  backdrop-filter: blur(3px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
}

.dialog-head h2 {
  font-size: 19px;
}

.dialog-head p {
  margin-top: 4px;
}

.dialog-body {
  padding: 18px 22px;
}

.dialog-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0 22px 22px;
}

.dialog-foot .spacer {
  margin-right: auto;
}

.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  font-size: 14.5px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.conflict-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.conflict-list li {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  font-size: 13.5px;
}

/* ============ Toasts ============ */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  font-size: 14px;
  animation: toast-in 0.25s var(--ease);
}

.toast svg {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
}

.toast.error svg {
  color: #f87171;
}

.toast.success svg {
  color: #4ade80;
}

.toast.hide {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ============ Mobile ============ */
.bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    padding: 28px 24px;
    min-height: 260px;
    gap: 24px;
  }
  .auth-hero h1 {
    font-size: 30px;
  }
  .auth-features {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar .nav,
  .user-btn .name {
    display: none;
  }
  .user-btn {
    padding: 3px;
  }
  .main {
    padding: 20px 14px calc(96px + env(safe-area-inset-bottom));
  }
  .page-head h1 {
    font-size: 24px;
  }
  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 30;
    padding: 6px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.6) blur(16px);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 7px 0;
    border-radius: 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
  }
  .bottom-nav a svg {
    width: 22px;
    height: 22px;
  }
  .bottom-nav a[aria-current='page'] {
    color: var(--accent);
    background: var(--accent-soft);
  }
  .toolbar .date-title {
    font-size: 19px;
    width: 100%;
  }
  .schedule {
    grid-template-columns: 42px repeat(var(--courts, 4), minmax(70px, 1fr));
    min-width: 0;
  }
  .court-head {
    padding: 0 8px;
  }
  .court-head strong {
    font-size: 13px;
    gap: 6px;
  }
  .court-head small {
    display: none;
  }
  .event .ev-meta {
    white-space: normal;
  }
  .time-label {
    font-size: 11px;
    padding-right: 6px;
  }
  .event {
    padding: 5px 7px;
    margin: 2px;
    border-left-width: 3px;
  }
  .event .ev-title {
    font-size: 12px;
  }
  .event .ev-meta {
    font-size: 11px;
  }
  .slot {
    margin: 2px;
  }
  .legend {
    gap: 6px 12px;
  }
  .season-hero {
    grid-template-columns: 1fr;
  }
  .booking-item {
    flex-wrap: wrap;
  }
  .toasts {
    left: 20px;
    bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .dialog {
    margin-bottom: 0;
    border-radius: 22px 22px 0 0;
    width: 100vw;
    max-width: 100vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.legend i.c-free {
  background: var(--free-soft);
  border: 1px dashed var(--free);
}

.legend i.c-mine {
  background: var(--mine);
}

.legend i.c-booked {
  background: var(--booked);
}

.legend i.t-training {
  background: var(--t-training);
}

.legend i.t-match {
  background: var(--t-match);
}

.legend i.t-tournament {
  background: var(--t-tournament);
}

.legend i.t-maintenance {
  background: var(--t-maintenance);
}

.legend i.t-regular {
  background: var(--t-regular);
}

.mt {
  margin-top: 14px;
}

/* ============ Regeln ============ */
.hours-edit {
  display: grid;
  gap: 8px;
}

.hours-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(0, 130px) auto minmax(0, 130px);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  transition: opacity 0.15s;
}

.hours-row.closed .input {
  opacity: 0.4;
}

.hours-row.closed .switch span {
  color: var(--muted);
}

.rule-editor {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rule-edit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rule-edit .form-stack {
  gap: 8px;
}

.rule-no,
.rule-list > li::before {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.rule-tools {
  display: grid;
  gap: 4px;
}

.savebar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.savebar-state {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

.savebar-state .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--free);
}

.savebar .t-dirty,
.savebar.dirty .t-clean,
.savebar:not(.dirty) [data-reset] {
  display: none;
}

.savebar.dirty .t-dirty {
  display: inline;
  color: var(--text);
}

.savebar.dirty .dot {
  background: var(--club-red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--club-red) 20%, transparent);
}

.hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 24px;
  margin: 0;
}

.hours dt {
  color: var(--muted);
}

.hours dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  gap: 10px;
}

.check-list svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

.rule-list {
  list-style: none;
  counter-reset: rule;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.rule-list > li {
  counter-increment: rule;
  display: flex;
  gap: 14px;
}

.rule-list > li::before {
  content: counter(rule);
}

.rule-list h3 {
  font-size: 15px;
  margin-bottom: 2px;
}

.rule-list p {
  color: var(--muted);
}

.card-head svg.muted {
  width: 20px;
  height: 20px;
}

.rules-accept {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
}

.rules-accept summary {
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.rules-accept summary svg {
  width: 16px;
  height: 16px;
}

.rules-accept ol {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: none;
}

@media (max-width: 720px) {
  .hours-row {
    grid-template-columns: 1fr auto 1fr;
  }
  .hours-row .switch {
    grid-column: 1 / -1;
  }
  .savebar {
    bottom: calc(96px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .rule-edit {
    flex-wrap: wrap;
  }
  .rule-tools {
    grid-auto-flow: column;
  }
}

.rules-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.rule-edit .grow {
  flex: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast-Container als Popover: Standard-Popover-Stile neutralisieren */
.toasts[popover] {
  inset: auto 20px 20px auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: inherit;
}

.brand {
  min-width: 0;
}

.brand > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .toasts[popover] {
    inset: auto 20px calc(100px + env(safe-area-inset-bottom)) 20px;
  }
  .topbar .brand {
    font-size: 15px;
  }
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 12px 14px;
  }
  .stat b {
    font-size: 19px;
  }
}

/* ============ Rote Asche & Parallax ============ */
:root {
  --clay: #ac5236;
  --clay-texture: url('/img/clay-texture.jpg');
  --clay-shade: transparent;
}

:root[data-theme='dark'] {
  --clay-shade: rgb(8 10 20 / 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --clay-shade: rgb(8 10 20 / 0.42);
  }
}

.hero-video {
  position: absolute;
  inset: -18% -6%;
  width: 112%;
  height: 136%;
  object-fit: cover;
  background: var(--clay);
  will-change: transform;
}

/* Login */
.auth-hero > .hero-layers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgb(29 29 27 / 0.9) 0%, rgb(120 30 24 / 0.7) 38%, rgb(80 20 16 / 0.3) 75%, rgb(80 20 16 / 0.15) 100%),
    linear-gradient(0deg, rgb(10 15 35 / 0.45), transparent 35%);
}

.hero-ball {
  position: absolute;
  right: 12%;
  bottom: 18%;
  width: clamp(64px, 8vw, 104px);
  filter: drop-shadow(0 18px 18px rgb(0 0 0 / 0.45));
  will-change: transform;
}

.hero-ball {
  animation: ball-float 6s ease-in-out infinite;
}

@keyframes ball-float {
  50% {
    translate: 0 -10px;
    rotate: 12deg;
  }
}

/* Banner im Belegungsplan */
.court-hero {
  position: relative;
  overflow: hidden;
  height: 168px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.court-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(20 10 69 / 0.85) 0%, rgb(20 10 69 / 0.5) 45%, rgb(20 10 69 / 0.1) 80%);
}

.court-hero .hero-video {
  z-index: -2;
  inset: -45% 0;
  width: 100%;
  height: 190%;
}

.court-hero-text {
  padding: 22px 26px;
}

.court-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.court-hero .eyebrow::before {
  content: '';
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a52c23 0 33%, #fff 33% 66%, #1d1d1b 66%);
}

.court-hero h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 4px 0 2px;
  letter-spacing: -0.03em;
}

.court-hero p {
  opacity: 0.9;
  font-weight: 500;
}

/* Ascheplätze im Belegungsplan */
.court-bg {
  position: relative;
  margin: 0 3px;
  background: var(--clay) var(--clay-texture) 0 0 / 256px repeat;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.75), inset 0 0 0 5px rgb(0 0 0 / 0.06);
  border-radius: 2px;
  pointer-events: none;
}

.court-bg::before {
  /* Mittellinie und Licht wie auf einem echten Platz */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgb(255 255 255 / 0.22) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, rgb(255 255 255 / 0.1), transparent 30%, rgb(0 0 0 / 0.08));
}

.court-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--clay-shade);
}

.schedule .hour-line {
  border-top-color: rgb(255 255 255 / 0.28);
  z-index: 1;
  margin: 0 5px;
}

.schedule .col-line {
  border-left-color: transparent;
}

.court-head strong::before {
  background: var(--clay) var(--clay-texture) center / 64px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.85), 0 0 0 1px rgb(0 0 0 / 0.08);
  width: 12px;
  height: 16px;
}

.court-head.inactive strong::before {
  filter: grayscale(1);
  opacity: 0.5;
}

.schedule .slot {
  color: #fff;
  z-index: 2;
}

.schedule.bookable .slot:hover,
.schedule.bookable .slot:focus-visible {
  background: rgb(255 255 255 / 0.9);
  border-color: transparent;
  color: var(--free);
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.35);
}

@media (hover: none) {
  .schedule.bookable .slot {
    border-color: rgb(255 255 255 / 0.45);
    color: rgb(255 255 255 / 0.9);
  }
}

.schedule .event {
  box-shadow: 0 4px 14px -6px rgb(0 0 0 / 0.45);
  border-color: rgb(255 255 255 / 0.5);
  z-index: 3;
}

.past-shade {
  background: rgb(15 23 42 / 0.28);
  z-index: 1;
  margin: 0 3px;
}

.closed-shade {
  z-index: 4;
}

.schedule .now-line {
  z-index: 6;
}

.legend i.c-free {
  background: var(--clay) var(--clay-texture) center / 64px;
  border: 1px solid rgb(255 255 255 / 0.8);
  box-shadow: 0 0 0 1px var(--border-strong);
}

@media (max-width: 720px) {
  .court-hero {
    height: 124px;
  }
  .court-hero h2 {
    font-size: 23px;
  }
  .court-hero-text {
    padding: 16px 18px;
  }
  .court-bg {
    margin: 0 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ball {
    animation: none;
  }
}

/* ============ Kopfleiste: Schwarz mit rotem Strich (Farben des GSV-Wappens) ============ */
.topbar {
  color: #fff;
  background: rgb(29 29 27 / 0.96);
  border-bottom: 0;
}

.topbar::after {
  bottom: -4px;
  height: 4px;
  background: #a52c23;
}

.topbar .nav a {
  color: rgb(255 255 255 / 0.78);
}

.topbar .nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
}

.topbar .nav a[aria-current='page'] {
  color: #a52c23;
  background: #fff;
  box-shadow: none;
}

.topbar .btn-ghost {
  --btn-fg: #fff;
}

.topbar .btn-ghost:hover {
  background: rgb(255 255 255 / 0.12);
}

.topbar .user-btn {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.25);
}

.topbar .user-btn:hover {
  background: rgb(255 255 255 / 0.18);
}

.topbar .avatar {
  background: #a52c23;
}

/* ============ KI-Assistenten (MCP) ============ */
.copy-field {
  display: flex;
  gap: 8px;
}

.copy-field .input {
  flex: 1;
  min-width: 0;
}

.input.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.token-list {
  display: grid;
  gap: 8px;
}

.token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* Anmeldeseite für ChatGPT, Claude & Co. (server/oauth.js) */
.oauth-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px max(16px, env(safe-area-inset-left, 0px));
}

.oauth-page .auth-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.oauth-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
}

.oauth-error {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
}

.oauth-scopes {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.oauth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============ E-Mail ============ */
.mail-choice {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.mail-choice legend {
  padding: 0 4px;
  font-weight: 600;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}


/* ---------- Vereinsleben (Seite „Verein“, Verwaltung) ---------- */

.news-item.pinned {
  border-color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger), var(--shadow-sm);
}

.news-item .card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pre-line {
  white-space: pre-line;
}

.list-button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.list-button:hover {
  background: var(--surface-2);
}

.list-item.compact {
  padding: 8px 0;
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.result {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.card-head.sub {
  margin-top: 18px;
}

.row-gap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

details.team {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

details.team:last-child {
  border-bottom: 0;
}

details.team summary {
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

details.team p {
  margin: 8px 0;
}

.table.compact td {
  padding: 4px 8px;
  font-size: 13px;
}

tr.muted td,
.list-item.muted {
  opacity: 0.6;
}

.contact-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {
  .contact-row {
    grid-template-columns: 1fr 1fr;
  }
}

.news-item .card-head h2 svg,
.with-icon svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ GSV: Training, Spiele, Arbeitsstunden, Kalender ============ */

.mt-lg {
  margin-top: 32px;
}

.stack-sm {
  display: grid;
  gap: 6px;
}

.lead {
  font-size: 18px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.grid-2.tight,
.grid-3.tight,
.grid-4.tight {
  display: grid;
  gap: 12px;
}

.grid-3.tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4.tight {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.segmented.wrap {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 4px;
  margin-bottom: 16px;
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.level-green {
  background: color-mix(in srgb, #16a34a 14%, transparent);
  color: #15803d;
}

.badge.level-yellow {
  background: color-mix(in srgb, #eab308 18%, transparent);
  color: #a16207;
}

.badge.level-red {
  background: color-mix(in srgb, #dc2626 14%, transparent);
  color: #b91c1c;
}

.btn-ok {
  background: var(--free);
  border-color: var(--free);
  color: #fff;
}

.btn-warn {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}

.warn-text {
  color: var(--warn);
}

.input-sm,
.select.input-sm {
  height: 34px;
  padding: 0 8px;
  width: auto;
  min-width: 110px;
}

/* Ampel: drei Lichter übereinander, das zutreffende leuchtet */
.ampel {
  display: inline-grid;
  gap: 3px;
  padding: 5px 4px;
  border-radius: 9px;
  background: #1d1d1b;
  vertical-align: middle;
  flex: none;
}

.ampel i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0.22;
}

.ampel i.red {
  background: #ef4444;
}

.ampel i.yellow {
  background: #facc15;
}

.ampel i.green {
  background: #22c55e;
}

.ampel i.on {
  opacity: 1;
  box-shadow: 0 0 8px currentColor;
}

.ampel i.red.on {
  color: #ef4444;
}

.ampel i.yellow.on {
  color: #facc15;
}

.ampel i.green.on {
  color: #22c55e;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.stat b {
  font-size: 26px;
  line-height: 1;
}

.stat span {
  font-size: 12px;
  color: var(--muted);
}

.training-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.training-card.full {
  opacity: 0.85;
}

.training-card .card-head {
  align-items: flex-start;
}

/* Belegung: Frauen, Männer, ohne Angabe als gestapelter Balken */
.occupancy {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}

.occupancy span {
  width: var(--w);
}

.occupancy .female,
.dot.female {
  background: #c2185b;
}

.occupancy .male,
.dot.male {
  background: #1d4ed8;
}

.occupancy .other,
.dot.other {
  background: var(--faint);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: baseline;
}

.levels-help p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
}

.level-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.level-option {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.level-option small {
  color: var(--muted);
  font-size: 11px;
}

.level-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.level-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.squad-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 46vh;
  overflow: auto;
}

.squad-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.squad-row:last-child {
  border-bottom: 0;
}

.switch.small {
  font-size: 13px;
  white-space: nowrap;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 12px;
}

.match-card.nominated {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent), var(--shadow-sm);
}

.match-card .row-gap {
  align-items: center;
  margin-top: 8px;
}

.team-body {
  padding: 4px 0 8px;
}

/* Arbeitsstunden: Fortschrittsring */
.hours-card {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.hours-ring {
  --p: 0;
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
}

.hours-ring > div {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--surface);
}

.hours-ring b {
  font-size: 24px;
  line-height: 1;
}

.hours-ring span {
  font-size: 12px;
  color: var(--muted);
}

.cal-item {
  border-left: 3px solid transparent;
  padding-left: 10px;
}

.cal-item.kind-match {
  border-left-color: var(--t-match);
}

.cal-item.kind-workday {
  border-left-color: var(--t-tournament);
}

.cal-item.kind-event {
  border-left-color: var(--accent);
}

.cal-item.kind-booking {
  border-left-color: var(--free);
}

.cal-item.kind-training {
  border-left-color: var(--t-training);
}

/* Smartphone: „Mehr“ in der unteren Leiste und Menü als Blatt von unten */
.bottom-nav button {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav button svg {
  width: 22px;
  height: 22px;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.menu a:hover {
  background: var(--surface-2);
}

.menu a svg {
  width: 18px;
  height: 18px;
}

.menu-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  top: auto;
  bottom: calc(84px + env(safe-area-inset-bottom));
}

@media (max-width: 720px) {
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3.tight,
  .grid-4.tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .level-pick {
    grid-template-columns: 1fr;
  }
  .level-option {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }
  .level-option small {
    grid-column: 1 / -1;
  }
  .hours-card {
    flex-direction: column;
    text-align: center;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  .squad-row {
    flex-wrap: wrap;
  }
  .squad-row .grow {
    flex-basis: 100%;
  }
  .match-card .row-gap .btn {
    flex: 1 1 auto;
  }
}

/* Viele Bereiche: obere Navigation kompakt halten */
.topbar .nav a {
  white-space: nowrap;
}

@media (max-width: 1360px) {
  .topbar .nav a svg {
    display: none;
  }
  .topbar .brand span {
    display: none;
  }
}

/* Login: lange Knopftexte umbrechen statt die Seite zu verbreitern */
.auth-card .btn-block {
  white-space: normal;
  height: auto;
  min-height: 44px;
  padding-block: 8px;
  text-align: center;
}

.auth-card {
  min-width: 0;
  max-width: 100%;
}

.cal-item.kind-rental {
  border-left-color: var(--club-black, #1d1d1b);
}

/* Arbeitseinsätze mit Tätigkeiten, Hallenplätze */
.workday + .workday {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

.task-list {
  display: grid;
  gap: 6px;
  margin: 4px 0 0 64px;
}

.task {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.task-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-head .grow {
  min-width: 0;
}

.task-head .input-sm {
  max-width: 160px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.todo-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.todo-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.todo-list input[type='checkbox'] {
  margin-top: 3px;
  accent-color: var(--accent);
}

.todo-list li.done span {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-add form {
  display: flex;
  gap: 6px;
  flex: 1;
  margin-top: 4px;
}

.todo-add .input-sm {
  flex: 1;
  min-width: 0;
}

.btn-xs {
  width: 24px;
  height: 24px;
  padding: 0;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 10px;
  border-radius: 99px;
  background: var(--surface-2, var(--accent-soft));
  border: 1px solid var(--border);
}

.btn-chip-x {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.btn-chip-x:hover {
  color: var(--danger, #c00);
}

.btn-chip-x svg {
  width: 12px;
  height: 12px;
}

.template-tasks {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: grid;
  gap: 8px;
  margin: 0;
}

.template-tasks[hidden] {
  display: none;
}

.template-tasks .check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.template-tasks .check-row input {
  margin-top: 4px;
}

.block {
  display: block;
}

.task.mine {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hall-court {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.hall-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.slot-chip {
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: var(--free-soft);
  color: var(--free);
  font-weight: 600;
}

@media (max-width: 720px) {
  .task-list {
    margin-left: 0;
  }
  .task-head {
    flex-wrap: wrap;
  }
  .task-head .grow {
    flex: 1 1 100%;
  }
  .task-head .input-sm {
    flex: 1 1 0;
    max-width: none;
  }
}

.suggestion {
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion .grow {
  flex: 1 1 260px;
  min-width: 0;
}

.suggestion .input-sm {
  min-width: 0;
  max-width: 100%;
}

/* Swimlane „Aufgaben zum Mitmachen“ (Kalender, Stunden) */
.lane-section .card-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.lane {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 320px);
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.lane-card {
  scroll-snap-align: start;
  align-content: start;
  background: var(--surface);
}

.lane-card h3 {
  margin: 0;
  font-size: 16px;
}

.lane-card p {
  margin: 0;
}

.lane-card.is-done {
  opacity: 0.7;
}

.lane-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lane-top .badge svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

.lane-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

.lane-actions .input-sm {
  flex: 1 1 120px;
  min-width: 0;
}

.cal-item.kind-task {
  border-left-color: var(--free, #2e7d32);
}

@media (max-width: 720px) {
  .lane {
    grid-auto-columns: 85%;
  }
}

/* Persönliche Übersicht (Start) */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.dash-todo .todo-link {
  color: inherit;
  text-decoration: none;
}

.dash-todo .todo-link:hover {
  background: var(--surface-2);
}

.dash-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dash-item + .dash-item {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.dash-item h3 {
  margin: 0;
  font-size: 15px;
}

.dash-item .badge {
  vertical-align: 2px;
}

.mt-xs {
  margin-top: 6px;
}

.segmented.small {
  margin: 0;
  padding: 2px;
  border-radius: 10px;
}

.segmented.small button {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.segmented.small button[aria-pressed='true'] {
  background: var(--accent);
  color: #fff;
}

.date-badge.small {
  width: 44px;
  height: 48px;
}

.date-badge.small b {
  font-size: 17px;
}

.dash-event {
  color: inherit;
  text-decoration: none;
}

.dash-teams {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dash-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-hours {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hours-ring.small {
  width: 96px;
  height: 96px;
}

.hours-ring.small > div {
  width: 76px;
  height: 76px;
}

.hours-ring.small b {
  font-size: 18px;
}

.plain-list {
  margin: 4px 0 0;
  padding-left: 18px;
}

.dash-news {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 8px;
}

.dash-news.pinned {
  border-left: 3px solid var(--accent);
}

.dash-news p {
  margin: 4px 0 0;
}

.team-nuliga {
  margin-left: 6px;
}

/* Abo-Dialog mit Teilkalendern */
.feeds {
  display: grid;
  gap: 8px;
}

.feed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.feed .grow {
  flex: 1 1 180px;
  min-width: 0;
}

@media (max-width: 720px) {
  .dash-hours {
    align-items: flex-start;
  }
}

/* Icons in Fließtext und Listen (außerhalb von Buttons) in Schriftgröße */
.dash-grid a > svg,
.dash-todo svg,
.dash-teams svg,
.team-nuliga svg,
p > a > svg,
.small > svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  vertical-align: -0.15em;
}

.dash-todo .todo-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-hours .grow {
  min-width: 0;
}

.dash-hours .btn {
  white-space: normal;
  max-width: 100%;
  height: auto;
  min-height: 32px;
}

/* Neue Mitteilungen: pulsierender Punkt am Profil (Kopfleiste) und an „Mehr“ (Smartphone) */
.user-btn,
.bottom-nav button {
  position: relative;
}

.has-unread::after {
  content: attr(data-unread);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: unread-pulse 1.4s ease-in-out infinite;
}

.bottom-nav button.has-unread::after {
  top: 2px;
  right: calc(50% - 22px);
}

.user-btn.has-unread .avatar {
  animation: unread-ring 1.4s ease-in-out infinite;
}

@keyframes unread-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.55;
  }
}

@keyframes unread-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}

.badge.pulse {
  animation: unread-pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .has-unread::after,
  .user-btn.has-unread .avatar,
  .badge.pulse {
    animation: none;
  }
}

.menu-count:not(:empty) {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Profilseite */
.profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.profile-head h1 {
  margin: 0;
  font-size: 24px;
}

.profile-head .badges .badge svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

.avatar.xl {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

/* Mitteilungszentrale */
.inbox {
  display: grid;
}

.inbox-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.inbox-item:hover {
  background: var(--surface-2);
}

.inbox-item .grow {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inbox-item:not(.unread) {
  opacity: 0.75;
}

.inbox-item.unread strong {
  font-weight: 700;
}

.inbox-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.inbox-icon svg {
  width: 18px;
  height: 18px;
}

.inbox-item .dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: unread-pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .inbox-item .dot {
    animation: none;
  }
}

/* Abstimmungsstand je Spieltag */
.votes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.vote {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
}

.vote.yes {
  background: var(--free-soft, #e7f6ec);
  color: var(--free, #1e7b3c);
}

.vote.maybe {
  background: #fff4dc;
  color: #8a5a00;
}

.vote.no {
  background: var(--danger-soft);
  color: var(--danger);
}

.vote.reserve {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Passwort vergessen / neues Passwort */
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth.single {
  grid-template-columns: 1fr;
}

.auth.single .auth-card h1 {
  font-size: 26px;
  margin: 24px 0 6px;
}

.brand.dark {
  color: var(--text);
  text-decoration: none;
}

.temp-password {
  font-size: 18px;
  letter-spacing: 0.06em;
}

/* Arbeitseinsatz wartet auf Freigabe */
.workday.pending {
  border: 1px dashed var(--warn, #b7791f);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface-2);
}

.pending-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.pending-bar .badge svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

/* Vor der Freigabe kann sich niemand eintragen (der Server lehnt es ohnehin ab) */
.workday.pending [data-in],
.workday.pending [data-assign] {
  display: none;
}
