* {
  box-sizing: border-box;
}

html {
  /* Projektregel (Projektstart/01_PROJEKTREGELN.md): kein Scrollbar-Layout-Shift
     - Seite darf nicht horizontal springen, wenn Scrollbar erscheint/verschwindet. */
  scrollbar-gutter: stable;
}

:root {
  --ink: #142033;
  --muted: #5f6f84;
  --line: #dfe7f0;
  --paper: #ffffff;
  --soft: #f3f7fb;
  --panel: #f9fbfe;
  --court: #216b57;
  --court-dark: #123b35;
  --lime: #b7e21c;
  --lime-soft: #eef8c7;
  --clay: #f26b38;
  --clay-soft: #fff0e9;
  --sky: #e2f1ff;
  --blue: #2367c9;
  --on-lime: #102000;
  --on-lime-soft: #456600;
  --lime-edge: #afd72f;
  --shadow: 0 16px 42px rgba(14, 31, 53, .12);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ecf3f8 0, var(--soft) 360px, #edf2f7 100%);
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 max(16px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(190, 202, 216, .82);
  backdrop-filter: blur(14px);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
  color: var(--court-dark);
  font-weight: 850;
}

.ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #efff7b 0 18%, var(--lime) 19% 58%, #6f9b13 59% 100%);
  box-shadow: 0 0 0 3px #dcebb8;
}

.club-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.primary-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 780;
}

.primary-nav a:hover {
  background: #edf4f8;
  color: var(--ink);
}

.primary-nav a.active {
  background: var(--lime);
  color: var(--on-lime);
}

.header-actions {
  display: flex;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--court);
  font-weight: 850;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--court);
  font-size: .84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

h1 {
  margin: 5px 0 6px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn,
.tab,
.pc-reserve,
.courts-date-nav button {
  border-radius: var(--radius);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  font-weight: 820;
  white-space: nowrap;
}

.btn-primary {
  background: var(--court);
  color: #fff;
}

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.app-dashboard-shell,
.dark-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.weather-host {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #eef6f4;
  border: 1px solid #cfe2dc;
  color: var(--muted);
}

.weather-host strong {
  color: var(--court-dark);
}

.card {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: none;
}

#meCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--court-dark);
  color: #fff;
  border-color: var(--court-dark);
}

.me-name {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.45rem);
  line-height: 1.05;
  font-weight: 900;
}

.me-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, .76);
}

.me-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(94px, 1fr));
  gap: 10px;
}

.me-stat {
  min-width: 94px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
}

.me-stat small {
  display: block;
  color: rgba(255, 255, 255, .7);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.me-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 1.4rem;
}

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

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-weight: 820;
}

.tab.active {
  background: var(--lime);
  color: var(--on-lime);
  border-color: transparent;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  margin-top: 16px;
}

.ranking-section,
.actuals-section {
  margin-top: 16px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0;
  font-size: 1.28rem;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
}

.badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: var(--radius);
  background: #eef3f8;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
}

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

.badge.warn {
  background: var(--clay-soft);
  color: #9e3e16;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.view-btn {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: .9rem;
}

.view-btn.active {
  background: var(--court);
  color: #fff;
}

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

.is-hidden {
  display: none !important;
}

.pyramid {
  display: grid;
  gap: 8px;
  padding: 4px;
}

.pyramid-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.ptile {
  position: relative;
  flex: 0 0 130px;
  width: 130px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}

.ptile-pos {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--court-dark);
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  box-shadow: 0 0 0 2px var(--paper);
}

.ptile-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  width: 100%;
  line-height: 1.05;
  color: var(--ink);
}

.ptile-first {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.1;
}

.ptile-last {
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ink);
  line-height: 1.1;
  margin-top: 1px;
  word-break: break-word;
  max-width: 100%;
}

.ptile.rank-1 .ptile-first,
.ptile.rank-2 .ptile-first,
.ptile.rank-3 .ptile-first {
  color: rgba(0, 0, 0, .55);
}

.ptile.rank-1 {
  border-color: #c99520;
  background: linear-gradient(180deg, #ffe580, #ffce3c);
}
.ptile.rank-1 .ptile-pos {
  background: #b97f00;
  box-shadow: 0 0 0 2px #ffe580;
}

.ptile.rank-2 {
  border-color: #8c9bac;
  background: linear-gradient(180deg, #e1e7ee, #c4ced8);
}
.ptile.rank-2 .ptile-pos {
  background: #6e7d8d;
  box-shadow: 0 0 0 2px #e1e7ee;
}

.ptile.rank-3 {
  border-color: #a16a3a;
  background: linear-gradient(180deg, #f5c994, #e8a065);
}
.ptile.rank-3 .ptile-pos {
  background: #8c5320;
  box-shadow: 0 0 0 2px #f5c994;
}

.ptile.me {
  outline: 2px solid var(--court);
  outline-offset: -2px;
}


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

.rrow {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.rrow-pos {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--court-dark);
  color: #fff;
  font-weight: 850;
  font-size: .82rem;
}

.rrow-name {
  font-weight: 800;
}

.rrow.me {
  background: var(--lime-soft);
  border-color: var(--lime-edge);
}

.rrow-divider {
  grid-template-columns: 1fr;
  text-align: center;
  background: transparent;
  border: 0;
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rrow-divider-label {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.pyramid-tail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

.pyramid-tail strong {
  color: var(--ink);
  font-weight: 850;
}

.pyramid-tail-link {
  background: var(--court);
  color: #fff;
}

.player-tile {
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.player-tile.me {
  background: var(--lime-soft);
  border-color: var(--lime-edge);
}

.rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--court-dark);
  font-weight: 900;
}

.player-tile strong {
  display: block;
  margin-top: 10px;
}

.player-tile span {
  color: var(--muted);
  font-size: .88rem;
}

.entry-list {
  display: grid;
  gap: 10px;
}

.entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.entry-icon,
.entry-date {
  min-width: 46px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--sky);
  color: var(--court-dark);
  font-weight: 900;
}

.entry strong {
  display: block;
}

.entry span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.courts-day-nav-card {
  padding: 0;
  background: transparent;
  border: 0;
}

.courts-date-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.courts-date-nav button,
.courts-date-nav input {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.per-court-section {
  display: grid;
  gap: 14px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.courts-date-suffix {
  color: var(--court);
  font-size: .92rem;
}

.per-court-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.per-court-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: none;
}

.pc-header {
  padding: 15px;
  color: #fff;
  background: var(--court-dark);
}

.pc-header-title {
  display: block;
  font-size: 1.08rem;
  font-weight: 900;
}

.pc-header-meta {
  color: rgba(255, 255, 255, .72);
  font-size: .84rem;
}

.pc-slot-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.pc-slot {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 4px solid #c2cbd9;
  background: var(--panel);
}

.pc-slot.free {
  border-left-color: var(--lime);
  background: #fbfff0;
}

.pc-slot.mine {
  border-left-color: var(--blue);
  background: #edf4ff;
}

.pc-slot.training {
  border-left-color: var(--clay);
  background: var(--clay-soft);
}

.pc-slot small {
  color: var(--muted);
}

.pc-reserve {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: var(--court);
  color: #fff;
  font-weight: 850;
}

.reservation-row {
  margin-top: 16px;
}

#postsList {
  display: grid;
  gap: 12px;
}

.post-item {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--court);
  box-shadow: var(--shadow);
}

.post-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.post-toggle-text {
  display: grid;
  gap: 2px;
}

.post-title {
  color: var(--ink);
  font-weight: 900;
  font-size: 1.12rem;
}

.post-meta {
  color: var(--muted);
  font-size: .84rem;
}

.post-chevron {
  margin-left: auto;
  color: var(--court);
}

.post-body {
  padding: 0 18px 18px;
  color: var(--muted);
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.side-panel {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.side-panel h2 {
  margin: 0 0 12px;
}

.mini-grid {
  display: grid;
  gap: 10px;
}

.mini-card {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.mini-card strong {
  display: block;
}

.mini-card span {
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-stack {
  display: grid;
  gap: 12px;
}

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

.field > span {
  font-size: .86rem;
  font-weight: 780;
  color: var(--muted);
}

.field input,
.field select {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--court);
  box-shadow: 0 0 0 3px rgba(33, 107, 87, .16);
}

.field-note {
  margin: 8px 0 0;
}

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

.field-sep {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.notify-panel {
  margin-top: 16px;
}

.switch-list {
  display: grid;
  gap: 10px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.switch-row strong {
  display: block;
}

.switch-row span {
  display: block;
  color: var(--muted);
  font-size: .88rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8d3df;
  transition: background .15s;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s;
}

.switch input:checked + .slider {
  background: var(--court);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px rgba(33, 107, 87, .25);
}

@media (max-width: 920px) {
  .site-header {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .club-chip,
  .header-actions {
    display: none;
  }

  .primary-nav {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .primary-nav a:nth-child(4) {
    display: none;
  }

  .page-hero,
  .content-grid,
  .info-layout,
  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .per-court-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .site-header {
    padding-inline: 12px;
  }

  .site-logo {
    min-width: 0;
  }

  .primary-nav a {
    min-width: 0;
    padding: 0 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.1;
  }

  .hero-actions,
  #meCard,
  .me-stats,
  .tabs {
    grid-template-columns: 1fr;
  }

  .pyramid-row {
    gap: 4px;
  }

  .pyramid .ptile {
    flex: 0 0 130px;
    width: 130px;
    min-height: 72px;
    padding: 10px 6px;
  }

  .ptile.medal {
    flex: 0 0 160px;
    max-width: 160px;
    width: 160px;
    min-height: 86px;
  }

  .ptile.medal.gold {
    flex: 0 0 200px;
    max-width: 200px;
    width: 200px;
    min-height: 96px;
  }

  .ptile.medal.gold .ptile-name {
    font-size: 1.05rem;
  }

  .ptile-name {
    font-size: .9rem;
  }

  .ptile-pos {
    font-size: .66rem;
  }

  .hero-actions {
    display: grid;
  }

  .btn,
  .courts-date-nav button,
  .courts-date-nav input {
    width: 100%;
  }

  .entry,
  .pc-slot {
    grid-template-columns: 1fr;
  }

  .pc-reserve {
    width: 100%;
  }
}

[data-theme="neutral"] {
  --ink: #17181c;
  --muted: #6b6f76;
  --line: #e4e4e6;
  --soft: #f5f5f6;
  --panel: #fafafa;
  --court: #1f2125;
  --court-dark: #17181c;
  --lime: #2c2e34;
  --lime-soft: #ececee;
  --clay: #6b6f76;
  --clay-soft: #ededee;
  --sky: #ededee;
  --blue: #45474d;
  --on-lime: #ffffff;
  --on-lime-soft: #2c2e34;
  --lime-edge: #cfd0d2;
  background: linear-gradient(180deg, #eff0f1 0, var(--soft) 360px, #ededee 100%);
}

[data-theme="neutral"] .ball {
  background: radial-gradient(circle at 30% 30%, #dadada 0 18%, #8c8e92 19% 58%, #3a3b40 59% 100%);
  box-shadow: 0 0 0 3px #e2e2e4;
}

[data-theme="orange"] {
  --ink: #2a1d15;
  --muted: #82725f;
  --line: #eaddd2;
  --soft: #faf6f2;
  --panel: #fdfaf7;
  --court: #e2622a;
  --court-dark: #2b2521;
  --lime: #0f9b8e;
  --lime-soft: #d6f2ee;
  --clay: #e2622a;
  --clay-soft: #fdeee3;
  --sky: #d6f2ee;
  --blue: #0f9b8e;
  --on-lime: #ffffff;
  --on-lime-soft: #0a5f57;
  --lime-edge: #8fd8cd;
  background: linear-gradient(180deg, #f7f1ea 0, var(--soft) 360px, #f3ece4 100%);
}

[data-theme="orange"] .ball {
  background: radial-gradient(circle at 30% 30%, #ffd9b0 0 18%, #e2622a 19% 58%, #9e3c12 59% 100%);
  box-shadow: 0 0 0 3px #f6d9c6;
}

.auth-header {
  justify-content: flex-start;
  gap: 14px;
}

.auth-main {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 2px 0 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.auth-card .lead {
  margin: 0 0 4px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.link-subtle {
  color: var(--court);
  font-weight: 780;
}

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

.theme-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.theme-btn.active {
  border-color: var(--court);
  box-shadow: 0 0 0 2px var(--court);
}

.theme-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(20, 32, 51, .12);
}

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

.landing-header {
  gap: 14px;
}

.landing-nav {
  gap: 10px;
}

.landing-cta {
  gap: 8px;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: .9rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.05rem;
}

.landing-hero {
  display: grid;
  gap: 14px;
  padding: 40px 0 28px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.landing-hero h1 {
  margin: 4px 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.12;
}

.landing-hero .lead {
  margin: 0 auto;
  max-width: 680px;
}

.landing-hero-actions {
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: .92rem;
}

.hero-trust strong {
  color: var(--ink);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.feat-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.feat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--lime-soft);
  color: var(--on-lime-soft);
  font-size: 1.3rem;
  font-weight: 850;
}

.feat-card h2 {
  margin: 4px 0 0;
  font-size: 1.18rem;
}

.feat-card p {
  margin: 0;
  color: var(--muted);
}

.section-h {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  text-align: center;
}

.landing-steps {
  padding: 32px 0;
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--court-dark);
  color: #fff;
  font-weight: 900;
}

.step strong {
  display: block;
}

.step span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  margin-top: 2px;
}

.landing-pricing {
  padding: 32px 0;
}

.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 2px solid var(--court);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  gap: 14px;
}

.pricing-card header {
  display: grid;
  gap: 6px;
}

.pricing-eyebrow {
  color: var(--court);
  font-weight: 850;
  text-transform: uppercase;
  font-size: .82rem;
  letter-spacing: .04em;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.pricing-prefix,
.pricing-suffix {
  color: var(--muted);
}

.pricing-price strong {
  font-size: 1.8rem;
}

.pricing-note {
  color: var(--muted);
  font-size: .92rem;
}

.pricing-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  text-align: left;
}

.pricing-feats li {
  padding-left: 22px;
  position: relative;
}

.pricing-feats li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--court);
  font-weight: 900;
}

.pricing-cta {
  margin-top: 6px;
}

.landing-cta-row {
  padding: 32px 0;
  text-align: center;
}

.signup-form {
  max-width: 480px;
  margin: 14px auto 0;
  display: grid;
  gap: 12px;
  text-align: left;
}

.signup-form .field {
  text-align: left;
}

/* Ergebnis-Box der Self-Service-Registrierung (Erfolg / Fehler). */
.signup-result {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
}
.signup-result.ok {
  background: color-mix(in srgb, var(--brand, #1f7a54) 12%, white);
  border: 1px solid color-mix(in srgb, var(--brand, #1f7a54) 35%, white);
  color: #14532d;
}
.signup-result.err {
  background: #fde8e8;
  border: 1px solid #f5b5b5;
  color: #8a1f1f;
}
.signup-result a { color: inherit; font-weight: 700; }

.landing-footer {
  margin-top: 40px;
  padding: 28px 0 14px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid div {
  display: grid;
  gap: 6px;
}

.footer-grid a {
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--ink);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .landing-features,
  .step-list {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    display: none;
  }

  .landing-cta {
    display: flex !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.admin-nav-btn:hover {
  background: var(--panel);
}

.admin-nav-btn.active {
  background: var(--lime-soft);
  color: var(--on-lime-soft);
  border-left-color: var(--court);
}

.admin-nav-btn.active .admin-nav-icon {
  color: var(--court);
}

.admin-nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  font-size: .95rem;
  opacity: .9;
}

.admin-main {
  display: grid;
  gap: 16px;
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.admin-section-head .hint {
  margin: 4px 0 0;
}

.admin-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-h {
  margin: 0;
  font-size: 1.05rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .92rem;
}

.admin-table th {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

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

.btn-link {
  background: transparent;
  border: 0;
  color: var(--court);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.court-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.court-card .panel-head {
  align-items: center;
}

.opening-list,
.template-list,
.kv-list,
.audit-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.opening-list li,
.kv-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.opening-list li:last-child,
.kv-list li:last-child {
  border-bottom: 0;
}

.opening-list span,
.kv-list span {
  color: var(--muted);
  font-size: .88rem;
}

.template-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.template-more {
  background: transparent !important;
  border: 1px dashed var(--line) !important;
  color: var(--muted);
  font-style: italic;
}

.audit-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}

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

.audit-list .hint {
  margin-left: 6px;
}

.page-monitor {
  background: #0a1820;
  color: #e8eef2;
  min-height: 100vh;
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

.monitor-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 36px;
}

.monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.monitor-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.4rem;
  font-weight: 900;
}

.monitor-clock {
  text-align: right;
}

.monitor-clock strong {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.monitor-clock span {
  display: block;
  color: rgba(255, 255, 255, .6);
  font-size: 1rem;
  margin-top: 4px;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.monitor-card {
  display: grid;
  gap: 10px;
  padding: 26px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  min-height: 320px;
}

.monitor-eyebrow {
  color: #b7e21c;
  font-size: .9rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.monitor-big {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.monitor-sub {
  color: rgba(255, 255, 255, .72);
  font-size: 1.15rem;
}

.monitor-pill {
  margin-top: auto;
  align-self: start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(183, 226, 28, .14);
  color: #b7e21c;
  font-weight: 850;
  font-size: .92rem;
}

.monitor-slot-list,
.monitor-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.monitor-slot-list li,
.monitor-rank li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}

.monitor-slot-list strong {
  min-width: 90px;
  font-size: 1.15rem;
}

.monitor-slot-list span {
  color: rgba(255, 255, 255, .8);
  font-size: 1.05rem;
}

.monitor-rank .r-pos {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #b7e21c;
  color: #102000;
  font-weight: 900;
}

.monitor-rank strong {
  font-size: 1.18rem;
}

.monitor-marquee {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 26px;
  border-radius: 14px;
  background: rgba(183, 226, 28, .08);
  border: 1px solid rgba(183, 226, 28, .26);
}

.monitor-message {
  font-size: 1.1rem;
  color: #fff;
}

.monitor-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: rgba(255, 255, 255, .5);
  font-size: .9rem;
}

@media (max-width: 1100px) {
  .monitor-grid {
    grid-template-columns: 1fr;
  }
  .monitor-big {
    font-size: 3rem;
  }
}

@media (max-width: 920px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }

  .admin-nav-btn {
    flex: 1 0 auto;
  }

  .court-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Bridge-Regeln fuer die Auth-Seiten (login/erst-login/setup-password):
   Elemente, die das bestehende JS erwartet, aber im Sandbox-CSS fehlten.
   ============================================================ */
/* [hidden] muss IMMER gewinnen — sonst zeigen display:flex/grid-Regeln
   (z.B. .auth-card) versteckte Elemente wie das Forgot-Formular trotzdem an. */
[hidden] { display: none !important; }

.error {
  margin: .2rem 0 0;
  color: #c2413b;
  font-size: .9rem;
  font-weight: 600;
}

/* Passwort-Regel-Checkliste (setup-password.js / erst-login.js togglen .ok) */
.pw-rules {
  list-style: none;
  margin: .2rem 0 .4rem;
  padding: 0;
  display: grid;
  gap: .3rem;
}
.pw-rules .rule {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--muted);
}
.pw-rules .rule .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
  transition: background .15s ease;
}
.pw-rules .rule.ok {
  color: var(--ink);
}
.pw-rules .rule.ok .dot {
  background: var(--court, #2f7a18);
}

/* ============================================================
   APP-BRIDGE: stylt die JS-gerenderten ACE-Klassen (pyramid.js, profile.js,
   challenges.js, matches.js) im Sandbox-Look, damit /app das echte Redesign
   nutzt (app.html laedt jetzt app-redesign.css). 2026-06-16.
   ============================================================ */
.tabpane { display: none; }
.tabpane.active { display: block; }
.loading { text-align: center; color: var(--muted); padding: 2rem; }

/* Nav-Sichtbarkeits-Toggle (nav-bootstrap.js) — MUSS verstecken */
.nav-hidden { display: none !important; }

/* Test-Modus-Leiste (nav-bootstrap.js: #globalImperBanner.imper-bar) */
.imper-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem 1rem; background: #f5c518; color: #2a2300; font-size: .85rem; font-weight: 700; }
.imper-bar-btn { border: 0; background: #1f2937; color: #fff; padding: .35rem .85rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.imper-bar-btn:hover { background: #111827; }

/* Banner */
.page-banner { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .8rem 1.1rem; border-radius: var(--radius); font-size: .92rem; }
.banner-noplayer { background: #fff3e9; border: 1px solid #f3d3b0; color: #7c4a12; }
.banner-locked { background: #fae6e4; border: 1px solid #f0c3bd; color: #8c2c22; }
.banner-action-link { margin-left: auto; padding: .4rem .9rem; border-radius: 999px; background: var(--court); color: #fff; font-weight: 700; }

/* Forderungsbaum-Panel: Container fuer Pyramide/Listen/Feeds */
.ranking-section .panel { padding: 1.3rem 1.1rem 1.6rem; }
#pyramidContainer { display: grid; gap: 1rem; justify-items: center; }

/* Pyramide (pyramid.js: .pyramid > .pyramid-row > .pyramid-cell) — .pyramid/.pyramid-row
   sind im Sandbox-CSS vorhanden; hier die Kachel + Kinder + Zustaende. */
.pyramid-cell {
  position: relative; flex: 0 0 130px; width: 130px; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 13px 6px 9px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(20, 30, 50, .06); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pyramid-cell:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20, 30, 50, .12); }
.pyramid-cell .cell-pos {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--court); color: #fff; font-size: .68rem; font-weight: 800;
}
.pyramid-cell .cell-first { font-size: .72rem; font-weight: 600; color: var(--muted); line-height: 1.1; text-align: center; }
.pyramid-cell .cell-last { font-size: .92rem; font-weight: 900; letter-spacing: .02em; color: var(--ink); line-height: 1.1; text-transform: uppercase; text-align: center; }

.pyramid-cell.rank-1 { border-color: #c99520; background: linear-gradient(180deg, #ffe580, #ffce3c); }
.pyramid-cell.rank-1 .cell-last { color: #2a1f00; }
.pyramid-cell.rank-1 .cell-first { color: rgba(0, 0, 0, .55); }
.pyramid-cell.rank-1 .cell-pos { background: #b97f00; box-shadow: 0 0 0 2px #ffe580; }
.pyramid-cell.rank-2 { border-color: #8c9bac; background: linear-gradient(180deg, #e1e7ee, #c4ced8); }
.pyramid-cell.rank-2 .cell-last { color: #1f2632; }
.pyramid-cell.rank-2 .cell-first { color: rgba(0, 0, 0, .55); }
.pyramid-cell.rank-2 .cell-pos { background: #6e7d8d; box-shadow: 0 0 0 2px #e1e7ee; }
.pyramid-cell.rank-3 { border-color: #a16a3a; background: linear-gradient(180deg, #f5c994, #e8a065); }
.pyramid-cell.rank-3 .cell-last { color: #2c1a07; }
.pyramid-cell.rank-3 .cell-first { color: rgba(0, 0, 0, .55); }
.pyramid-cell.rank-3 .cell-pos { background: #8c5320; box-shadow: 0 0 0 2px #f5c994; }

.pyramid-cell.me { outline: 2px solid var(--court); outline-offset: -2px; }
.pyramid-cell.target { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime-soft), 0 8px 20px rgba(120, 200, 40, .25); }
.pyramid-cell.open-challenge { border-color: var(--lime); }
.pyramid-cell.incoming-challenge { border-color: var(--clay); }
.pyramid-cell.busy { opacity: .5; cursor: default; }
.pyramid-cell.inactive { opacity: .4; }

.pyramid-status { text-align: center; margin: 0 auto 1rem; max-width: 640px; padding: .55rem 1.1rem; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .92rem; }
.pyramid-status strong { color: var(--ink); }

/* Pyramide/Liste-Umschalter (pyramid.js: .view-toggle > .view-toggle-btn) */
.view-toggle { display: inline-flex; gap: 4px; margin: 0 auto 1rem; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; }
.view-toggle-btn { border: 0; background: transparent; padding: .4rem 1rem; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; }
.view-toggle-btn.active { background: var(--lime); color: var(--on-lime); }
.view-toggle-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Listen-Ansicht (pyramid.js buildList) */
.rank-list { display: flex; flex-direction: column; gap: .4rem; width: 100%; }
.rank-row { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.rank-row.me { outline: 2px solid var(--court); outline-offset: -2px; }
.rank-pos { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--court); color: #fff; font-weight: 800; font-size: .8rem; }
.rank-name { display: flex; flex-direction: column; }
.rank-first { font-size: .74rem; color: var(--muted); }
.rank-last { font-weight: 800; text-transform: uppercase; letter-spacing: .015em; color: var(--ink); }
.rank-status { margin-left: auto; }
.rank-status-pill { padding: .2rem .6rem; border-radius: 999px; background: var(--lime-soft); color: var(--court-dark); font-size: .78rem; font-weight: 700; }

/* ---- Spieler-Karte (#meCard, profile.js) als dunkler Akzent (= Sandbox) ---- */
#meCard {
  background: linear-gradient(120deg, #16294b 0%, #103433 100%); color: #fff; border: 0;
  display: grid; grid-template-columns: 1fr auto auto; gap: 1.3rem; align-items: center;
}
#meCard.me-empty { grid-template-columns: 1fr; text-align: center; }
#meCard > h2, #meCard > p { color: #fff; }
.me-name { font-size: 1.4rem; font-weight: 850; margin: 0; }
.me-fam { font-weight: 850; }
.me-position-row { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.me-pos-badge { display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 9px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 850; }
.me-pos-label { color: rgba(255, 255, 255, .78); font-size: .9rem; }
.me-stats { display: flex; gap: .8rem; }
.me-stat { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: .6rem .9rem; text-align: center; min-width: 84px; }
.me-stat-lbl { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .7); }
.me-stat-val { font-size: 1.35rem; font-weight: 850; }
.me-stat-of { font-size: .85rem; font-weight: 600; opacity: .6; }
.me-stat-meta { display: block; font-size: .68rem; opacity: .7; }
.me-right { display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; }
.me-mail { font-size: .82rem; text-align: right; }
.me-mail-label { display: block; color: rgba(255, 255, 255, .6); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
.me-mail-value { color: #fff; }
.me-mail-warn { color: #ffd9a8; font-weight: 700; }
.me-actions { display: flex; gap: .5rem; }
.me-btn { padding: .45rem .85rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; }
.me-btn:hover { background: rgba(255, 255, 255, .16); }
.me-challenge-badge { margin-left: .4rem; padding: .25rem .7rem; border-radius: 999px; border: 0; background: var(--clay); color: #fff; font-weight: 800; font-size: .78rem; cursor: pointer; animation: me-badge-pulse 2s infinite; }
@keyframes me-badge-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,122,60,.5);} 50% { box-shadow: 0 0 0 6px rgba(255,122,60,0);} }
@media (max-width: 860px) { #meCard { grid-template-columns: 1fr; gap: .9rem; } .me-right { align-items: flex-start; } .me-mail { text-align: left; } }

/* ---- Feeds (challenges.js / matches.js) ---- */
.feed-panel { margin-top: .4rem; }
.feed-heading { font-size: 1.05rem; font-weight: 800; margin: 0 0 .7rem; color: var(--ink); }
.feed-empty { color: var(--muted); padding: 1rem; text-align: center; }
.feed-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .7rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; }
.feed-row.is-accepted { border-color: var(--lime); }
.feed-main { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.feed-main strong { font-weight: 800; }
.feed-main .fam { text-transform: uppercase; letter-spacing: .015em; }
.feed-pos { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--court); color: #fff; font-size: .68rem; font-weight: 800; }
.feed-pos.is-empty { background: var(--line); }
.feed-vs { color: var(--muted); font-size: .85rem; }
.feed-meta { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.feed-badge { padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.feed-badge-accepted { background: var(--lime-soft); color: var(--court-dark); }
.feed-badge-pending { background: #fff3e9; color: #7c4a12; }
.feed-date { color: var(--muted); font-size: .8rem; }
.feed-score code { background: var(--soft); padding: .2rem .5rem; border-radius: 8px; font-weight: 700; }
.feed-trophy { font-size: 1.1rem; }
.fam { font-weight: 800; }

/* ============================================================
   MEMBER-BRIDGE: gemeinsame Komponenten fuer info / courts / platzwart
   (ace-Klassen aus info.js, courts.js, courts-admin.js, platzwart.js) im
   Sandbox-Look. 2026-06-16.
   ============================================================ */
/* Generische Karte + Abschnittstitel */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,30,50,.05); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.card > h2, .card > h3 { margin-top: 0; color: var(--ink); }
.section-title { font-size: 1.3rem; font-weight: 850; color: var(--ink); margin: 1.2rem 0 .8rem; }
.section-title .courts-date-suffix { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: .5rem; }
.meta { color: var(--muted); font-size: .85rem; }
.nav-static, .club-chip { color: var(--muted); }

/* Formular-Elemente (bare labels/inputs aus den ace-Seiten) */
main label { display: block; font-weight: 650; color: var(--ink); margin-bottom: .7rem; font-size: .92rem; }
main input[type="text"], main input[type="email"], main input[type="password"], main input[type="number"],
main input[type="date"], main input[type="datetime-local"], main input[type="time"], main select, main textarea {
  width: 100%; margin-top: .3rem; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: var(--r-field, 12px); background: #fff; color: var(--ink); font: inherit;
}
main input:focus, main select:focus, main textarea:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: var(--lime); }
main input[type="checkbox"] { width: auto; margin: 0; }
.court-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }

/* Buttons (ace: button[type=submit], .ghost, .secondary, .sm) */
main button[type="submit"] { padding: .65rem 1.3rem; border: 0; border-radius: 999px; background: var(--court); color: #fff; font-weight: 800; cursor: pointer; }
main button[type="submit"]:hover { background: var(--court-dark); }
.ghost, button.ghost, button.secondary, button.sm, .sm { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.ghost:hover, button.ghost:hover, button.secondary:hover { background: var(--soft); }

/* Tabellen */
main table { width: 100%; border-collapse: collapse; }
main th, main td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
main th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Generische Listen-Eintraege (.entry aus platzwart.js) */
.entry { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .6rem; }
.entry .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--soft); color: var(--ink); }

/* Impersonate-Banner (platzwart) */
.banner-impersonate { background: #f5c518; color: #2a2300; }

/* ---- Info: Beitrags-Akkordeon (info.js) ---- */
.post-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; overflow: hidden; }
.post-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: none; border: 0; cursor: pointer; text-align: left; }
.post-title { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.post-meta { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.post-chevron { color: var(--muted); transition: transform .2s ease; flex: 0 0 auto; }
.post-item.open .post-chevron, .post-toggle[aria-expanded="true"] .post-chevron { transform: rotate(180deg); }
.post-body { padding: 0 1.2rem 1.2rem; color: var(--ink); line-height: 1.6; }

/* ---- Courts: Datums-Nav, Pro-Platz-Karten, Slots, Reservierungen ---- */
.courts-day-nav-card .courts-date-nav, .courts-date-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.courts-date-nav input[type="date"] { width: auto; }
.per-court-section { margin-top: 1rem; }
/* Max. 3 Plätze nebeneinander (User 2026-06-16) — breitere Karten = Platz fuer
   Bucher-Namen; 4./5. Platz brechen in die naechste Reihe um. */
.per-court-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1024px) { .per-court-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .per-court-grid { grid-template-columns: 1fr; } }
/* hidden-mobile: nur auf schmalen Screens verstecken (Tab-Umschaltung) */
@media (max-width: 680px)  { .per-court-card.hidden-mobile { display: none; } }
.per-court-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,30,50,.05); overflow: hidden; }
.pc-header { padding: .9rem 1.1rem; background: var(--court-dark); color: #fff; }
.pc-header-title { font-weight: 850; font-size: 1.05rem; }
.pc-header-meta { font-size: .82rem; opacity: .85; }
.pc-day { padding: .5rem 1.1rem; }
.pc-day-head { font-weight: 800; color: var(--ink); margin: .4rem 0; }
.pc-date { color: var(--muted); font-size: .85rem; }
.pc-slot-list { display: flex; flex-direction: column; gap: .35rem; padding: 0 1.1rem 1.1rem; }
.pc-slot-row { display: flex; align-items: center; gap: .7rem; }
.pc-slot { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pc-slot.pc-r-free { border-color: var(--lime); }
.pc-r-time { font-weight: 800; color: var(--ink); }
.pc-r-dur { color: var(--muted); font-size: .82rem; }
.pc-r-title { color: var(--ink); }
.pc-r-status { font-size: .78rem; font-weight: 700; }
.pc-reserve { padding: .4rem .9rem; border: 0; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 800; cursor: pointer; }

/* Platz-Tabs sind Mobile-only (Desktop zeigt alle Karten im Grid). */
.court-tabs { display: none; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
@media (max-width: 680px) { .court-tabs { display: flex; } }
.court-tab { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 700; cursor: pointer; }
.court-tab.active { background: var(--lime); color: var(--on-lime); border-color: transparent; }

.resv-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; overflow: hidden; background: var(--paper); }
.resv-group-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; cursor: pointer; font-weight: 700; color: var(--ink); }
.resv-group-body { padding: 0 1rem 1rem; }
.resv-chevron { color: var(--muted); }

/* Slot-Zustandsfarben (Belegungsplan + Legende) */
.cell-sample { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; border: 1px solid var(--line); }
.cell-sample.free, .free { background: var(--lime-soft); }
.cell-sample.mine, .mine { background: var(--court); }
.cell-sample.busy, .busy { background: #e6ebf4; }
.cell-sample.trainer, .trainer { background: #cfe0ff; }
.cell-sample.blocked, .blocked { background: #f3d3d0; }
.courts-legend-wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; font-size: .82rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }

/* M01: lange Spielernamen brechen in der Kachel um, statt herauszulaufen
   (KEIN overflow:hidden — wuerde die Positions-Pille oben abschneiden). */
.pyramid-cell .cell-first, .pyramid-cell .cell-last,
.rank-first, .rank-last { overflow-wrap: anywhere; word-break: break-word; }
.pyramid-cell .cell-last { hyphens: auto; }

/* M03: Dispute-Box / -Zitat neutral statt grellgelb */
.dispute-info { flex-basis: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; margin-top: .4rem; color: var(--ink); }
.dispute-quote { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; margin: .5rem 0; color: var(--ink); }

/* ============================================================
   MODAL + TOAST (ui.js: .modal-backdrop > .modal > h3 + .modal-body + .modal-actions).
   Fehlten im Sandbox-CSS -> Dialoge (Forderung bestaetigen, E-Mail/Passwort
   aendern, Buchen) rendern sonst ungestylt am Seitenende statt als Overlay.
   2026-06-16 (Fix: Fordern ging nicht).
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 18, 32, .55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--paper); color: var(--ink);
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 1.5rem 1.6rem; border-radius: 16px;
  box-shadow: 0 30px 80px rgba(2, 6, 18, .45);
}
.modal h3 { font-size: 1.25rem; font-weight: 850; margin: 0 0 .8rem; color: var(--ink); }
.modal-body { font-size: .95rem; line-height: 1.5; }
.modal-body label { display: block; font-weight: 650; margin-bottom: .7rem; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; margin-top: .3rem; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus { outline: 2px solid var(--lime); border-color: var(--lime); }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.3rem; }
.modal-actions button { padding: .6rem 1.2rem; border-radius: 999px; font-weight: 800; cursor: pointer; border: 1px solid transparent; }
.modal-actions .confirm { background: var(--court); color: #fff; }
.modal-actions .confirm:hover { background: var(--court-dark); }
.modal-actions .secondary, .modal-actions .cancel { background: #fff; color: var(--ink); border-color: var(--line); }
.modal-actions .secondary:hover, .modal-actions .cancel:hover { background: var(--soft); }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 2000; max-width: min(520px, calc(100vw - 2rem));
  padding: .72rem 1.1rem; border-radius: var(--radius);
  background: var(--ink); color: #fff; font-size: .9rem; font-weight: 650;
  box-shadow: 0 12px 30px rgba(2, 6, 18, .4);
}
.toast.err { background: var(--clay, #c2413b); }
.toast.ok { background: var(--court, #216b57); }

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 (mangel/16062026)
   Block B (App-Zeilen einzeilig + Buttons) + Block E (Ergebnis-Modal).
   Stylt die JS-generierten Klassen aus challenges.js / matches.js.
   ============================================================ */

/* B1 — Forderungen/Eingehend/Ergebnisse einzeilig auf Desktop, gestapelt
   nur mobil. .entry wird ab 761px Flex-Container: Titel+Meta links,
   Status/Buttons rechts. Bei zu langem Inhalt greift flex-wrap. */
@media (min-width: 761px) {
  .entry { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; }
  .entry > div:first-child {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .7rem;
    flex: 1 1 auto; min-width: 0;
  }
  .entry > div:first-child > .meta { margin-top: 0; }
  .entry .actions { margin-top: 0; flex: 0 0 auto; }
}

/* B2 — Aktions-Buttons Theme-konform. Primär (ohne Klasse: Annehmen,
   Bestätigen, Ergebnis eintragen, Stellungnahme) = gefüllt grün + Pill;
   Sekundär (.ghost/.secondary/.cancel: Ablehnen, Zurücknehmen, Strittig)
   = weiß. Behebt die ungestylten Default-Buttons (eckig/grau). */
.actions button {
  min-height: 38px; padding: .45rem 1rem; border-radius: 999px;
  border: 1px solid transparent; background: var(--court); color: #fff;
  font-weight: 800; cursor: pointer;
}
.actions button:hover { background: var(--court-dark); }
.actions button.ghost, .actions button.secondary, .actions button.cancel {
  background: #fff; color: var(--ink); border-color: var(--line);
}
.actions button.ghost:hover, .actions button.secondary:hover, .actions button.cancel:hover {
  background: var(--soft);
}

/* B3 — "Aktuelle Forderungen"/Feed-Zeilen randlos (User: kein Rand nötig).
   Dezente Fläche statt Rahmen; "accepted" über eine linke Akzentkante. */
.feed-row { border: none; background: var(--soft); }
.feed-row.is-accepted { border: none; box-shadow: inset 3px 0 0 var(--lime); }

/* E1 — Ergebnis-Modal: kompakte, runde Satz-Zeilen statt 100%-breiter
   Felder. Überschreibt .modal-body input (höhere Spezifität). Tiebreak-
   Feld (.tb-wrap) wird von matches.js bei 7:6/6:7 eingeblendet. */
.set-header { display: none; }
.set-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: .55rem;
  margin: .4rem 0; padding: .4rem .6rem; background: var(--soft);
  border: 1px solid var(--line); border-radius: 12px;
}
.set-row .set-label { min-width: 3.1rem; font-weight: 700; font-size: .88rem; color: var(--muted); }
.set-row .set-inputs, .set-row .tb-wrap { display: inline-flex; align-items: center; gap: .4rem; }
.set-row .colon { color: var(--muted); font-weight: 800; font-size: 1.1rem; }
.set-row input.score-input {
  width: 2.9rem; min-width: 0; flex: 0 0 auto; margin-top: 0;
  padding: .45rem .25rem; text-align: center; font-weight: 800; font-size: 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.set-row .tb-label {
  margin-left: .15rem; padding: .12rem .45rem; border-radius: 999px;
  background: var(--clay-soft); color: var(--clay); font-size: .64rem;
  font-weight: 800; letter-spacing: .03em;
}

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 — Block C (Pyramide)
   ============================================================ */

/* C1 — forderbare/geforderte Kacheln deutlich sichtbar (User: "sieht man
   schlecht"). Nur box-shadow animiert -> kein Konflikt mit Hover-Tilt. */
.pyramid-cell.target {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime), 0 8px 22px rgba(120, 200, 40, .4);
  animation: pyr-pulse 2.2s ease-in-out infinite;
}
@keyframes pyr-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--lime), 0 8px 22px rgba(120, 200, 40, .35); }
  50%      { box-shadow: 0 0 0 5px var(--lime-soft), 0 10px 30px rgba(120, 200, 40, .6); }
}
/* von mir gefordert (open-challenge) bzw. fordert mich (incoming) klar tinten */
.pyramid-cell.open-challenge {
  border-color: var(--lime); background: var(--lime-soft); box-shadow: 0 0 0 2px var(--lime);
}
.pyramid-cell.incoming-challenge {
  border-color: var(--clay); background: var(--clay-soft); box-shadow: 0 0 0 2px var(--clay);
}

/* C2 — Forder-Ball-Flug. pyramid.js (playBallAnimation) erzeugt .flying-ball
   im relativen #pyramidContainer und setzt --tx/--ty; die CSS dafür fehlte
   komplett -> Ball lag statisch im Flow ("hängt außerhalb"). */
.flying-ball {
  position: absolute; width: 28px; height: 28px; z-index: 60;
  pointer-events: none; will-change: transform;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3));
}
.flying-ball.fly { animation: ball-fly .7s cubic-bezier(.45, .05, .55, 1) forwards; }
@keyframes ball-fly {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  15%  { opacity: 1; }
  60%  { transform: translate(calc(var(--tx) * .6), calc(var(--ty) * .6 - 26px)) scale(1.1); }
  100% { transform: translate(var(--tx), var(--ty)) scale(.9); opacity: 1; }
}
/* Ziel-Kachel reagiert beim Aufprall (pyramid.js add 'react') */
.pyramid-cell.react { animation: cell-react .5s ease; }
@keyframes cell-react {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); box-shadow: 0 0 0 4px var(--lime); }
  100% { transform: scale(1); }
}

/* C3/N2 — Pyramide bei Überbreite horizontal scrollbar (statt über den Container
   zu ragen ODER Zwang-Liste). padding-top/-bottom/-sides geben der oberen
   Positions-Pille (.cell-pos, top:-9px) + den Kachel-Schatten Platz, damit sie
   vom overflow-Clipping NICHT abgeschnitten werden (Mangel N2 2026-06-16). */
#pyramidContainer .pyramid { max-width: 100%; overflow-x: auto; padding: 16px 12px 22px; }

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 — Block D (Platzbuchung)
   ============================================================ */

/* D2 — belegte Slot-Zelle kompakter, damit der Bucher-Name nicht umbricht
   (User: Schrift/Zahlen 1–2 Stufen kleiner, Buttons nicht zu groß). */
.pc-slot { padding: .45rem .7rem; gap: .5rem; }
.pc-slot-row { gap: .55rem; min-width: 0; }
.pc-r-time { font-size: .88rem; }
.pc-r-dur { font-size: .76rem; }
.pc-r-title { font-size: .8rem; line-height: 1.2; }
.pc-r-status { font-size: .74rem; }
.pc-reserve { padding: .32rem .8rem; font-size: .82rem; }

/* D3 — Datums-Navigation über die volle Kartenbreite (statt links geklebt):
   Datepicker dehnt sich, Pfeile/„Heute" liegen daneben. */
.courts-date-nav { gap: .6rem; }
.courts-date-nav input[type="date"] { flex: 1 1 auto; width: auto; min-width: 0; }

/* D5 — „Buchen"-Buttons auf Mobil nicht mehr full-width (waren viel zu groß). */
@media (max-width: 620px) {
  .pc-reserve { width: auto; min-height: 0; padding: .3rem .8rem; font-size: .82rem; }
}
/* D4 ist bereits korrekt umgesetzt: .court-tabs nur ≤680px sichtbar
   (Desktop zeigt alle Karten im Grid → Tabs ausgeblendet). */

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 — Block F (Mobile-Layout)
   ============================================================ */

/* F1 — App-artige Bottom-Navigation auf Mobil. Die .primary-nav wandert aus
   dem Header an den unteren Rand (Mein Bereich / Platzbuchung / Infos). */
@media (max-width: 640px) {
  /* Der Header darf auf Mobil keinen backdrop-filter haben: ein Filter macht
     ihn zum containing block für position:fixed-Nachkommen -> die Bottom-Nav
     würde sonst am Header statt am Viewport-Boden kleben. */
  body.page-app .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.page-app .primary-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    width: auto; margin: 0; gap: 0;
    display: flex; justify-content: space-around; align-items: stretch;
    padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(14, 31, 53, .12);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  body.page-app .primary-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 52px; min-width: 0; padding: .3rem 0;
    font-size: .66rem; font-weight: 700; line-height: 1.1; border-radius: 10px;
    white-space: nowrap; text-align: center;
  }
  body.page-app .primary-nav a::before { font-size: 1.3rem; line-height: 1; }
  body.page-app .primary-nav a[data-nav="app"]::before { content: "🏆"; }
  body.page-app .primary-nav a[data-nav="courts"]::before { content: "🎾"; }
  body.page-app .primary-nav a[data-nav="info"]::before { content: "ℹ️"; }
  body.page-app .primary-nav a[data-nav="admin"]::before { content: "⚙️"; }
  body.page-app .primary-nav a.active { background: var(--lime-soft); color: var(--on-lime-soft); }
  /* Platz für die fixe Leiste, damit der Inhalt nicht verdeckt wird */
  body.page-app main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body.page-app .landing-footer { margin-bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* F2 — konsistente Abstände im "Mein Bereich"-Dashboard: ausschließlich der
   grid-gap (14px) regelt den Abstand, Kind-Margins (.card margin-bottom u.ä.)
   raus. Verhindert, dass sich Margins zu einer Lücke zwischen Profilkarte und
   "Meine Platzbuchungen" summieren. */
.app-dashboard-shell > * { margin-top: 0; margin-bottom: 0; }

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 — Wetter-Streifen (weather.js renderStrip)
   War vertikal gestapelt + ungestylt ("billig"). Jetzt eine hochwertige
   horizontale Zeile: Ort/Temp links, 3-Tage-Vorschau (Karten) mittig,
   Link rechts. Mobil bricht die 3-Tage-Reihe sauber um.
   ============================================================ */
.weather-host { padding: .9rem 1.3rem; align-items: stretch; }
.weather-strip-main {
  flex: 1 1 100%; display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
}
.weather-place { display: flex; align-items: center; gap: .9rem; }
.weather-main-icon { font-size: 2.6rem; line-height: 1; }
.weather-place > div { display: flex; flex-direction: column; line-height: 1.15; }
.weather-place small { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.weather-place strong { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.weather-place > div > span { font-size: .82rem; color: var(--muted); }
.weather-mini-list { display: flex; align-items: stretch; gap: .5rem; }
/* B1 (2026-06-18, User-Wunsch "moderner"): saubere weiße Kacheln mit weichem
   Schatten statt durchscheinender Rahmen-Boxen; "Heute" dezent hervorgehoben. */
.weather-mini-day {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  min-width: 66px; padding: .55rem .75rem; border-radius: 14px;
  background: #fff; border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(16, 40, 34, .07);
  transition: transform .12s ease, box-shadow .12s ease;
}
.weather-mini-day:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 40, 34, .12); }
.weather-mini-day:first-child {
  background: var(--court, #1f7a54);
  box-shadow: 0 3px 10px rgba(31, 122, 84, .28);
}
.weather-mini-day:first-child strong,
.weather-mini-day:first-child em { color: #fff; }
.weather-mini-day strong { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.weather-mini-day span { font-size: 1.4rem; line-height: 1.05; }
.weather-mini-day em { font-style: normal; font-size: .98rem; font-weight: 800; color: var(--ink); }
.weather-attribution { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--court); white-space: nowrap; text-decoration: none; }
.weather-attribution:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .weather-strip-main { gap: 1rem; }
  .weather-mini-list { width: 100%; justify-content: space-between; }
  .weather-attribution { margin-left: 0; }
}

/* ============================================================
   MÄNGELBEHEBUNG 2026-06-16 — Block "neuneu" (mangel/16062026neuneu)
   Spätere Regeln -> gewinnen gegen frühere Duplikate (Dateiende-Konvention).
   ============================================================ */

/* M2 — Forderungen/Eingehend/Ergebnisse: ALLES in EINER Zeile auf Desktop.
   B1 (oben) hatte flex-wrap:wrap -> der Name brach um ("gegen Stefan"/"Hofer"),
   weil Flex-Items unter Druck bis zur längsten-Wort-Breite schrumpfen. Jetzt
   nowrap + Namen/Meta nicht umbrechen. Mobil (≤760px) bleibt gestapelt. */
/* Eigentliche Umbruch-Ursache: .fam (Nachname) erbt display:block von der
   generischen Regel ".entry span { display:block }" -> der Nachname rutscht in
   eine 2. Zeile ("gegen Stefan"/"Hofer"). .fam muss inline bleiben und die
   Schrift des Namens erben (statt muted/kleiner). Gilt auf ALLEN Breiten. */
.entry .fam { display: inline; color: inherit; font-size: inherit; }
.entry > div:first-child > strong { white-space: nowrap; }

@media (min-width: 761px) {
  .entry { flex-wrap: nowrap; align-items: center; }
  .entry > div:first-child {
    flex-wrap: nowrap; min-width: 0; overflow: hidden;
  }
  .entry > div:first-child > .meta {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .entry .actions { white-space: nowrap; }
}

/* M5 — Öffentliche Feeds "Aktuelle Forderungen" + "Letzte Ergebnisse" exakt
   gleich breit + gleiches Aussehen: volle Containerbreite, identische
   Zeilen-Optik und Schriftgrößen für beide. */
.feed-panel { width: 100%; box-sizing: border-box; }
.feed-row { width: 100%; box-sizing: border-box; font-size: .92rem; }
.feed-row-challenge, .feed-row-result {
  background: var(--soft); border: none; border-radius: var(--radius);
}
.feed-main, .feed-main strong { font-size: .92rem; }
.feed-row .feed-main { flex: 1 1 auto; min-width: 0; }

/* M7 — "Plätze im Überblick" in einen weißen Container wie auf "Mein Bereich".
   .per-court-section war ohne .card-Fläche direkt auf dem Seitenhintergrund. */
.per-court-section {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20, 30, 50, .05);
  padding: 1.2rem 1.3rem; margin-bottom: 1rem;
}
.per-court-section > .section-title { margin-top: 0; }

/* M3 — Pyramide bei vielen Spielern: Auto-Fit + zentriert (statt horizontal
   scrollen). pyramid.js misst die breiteste Reihe und skaliert via transform.
   .pyramid-scale zentriert (flex) und kappt die unskalierte Layout-Höhe. */
#pyramidContainer .pyramid { overflow-x: visible; max-width: none; }
.pyramid-scale {
  display: flex; justify-content: center;
  width: 100%; overflow: hidden;
}
.pyramid-scale > .pyramid { flex: 0 0 auto; }

/* M4 — Dashboard-Akkordeons (Meine Platzbuchungen + Feeds): einheitlich,
   standardmäßig geschlossen, unter der Pyramide. <details>/<summary>. */
.dash-accordion {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20, 30, 50, .05);
  padding: .4rem 1.1rem; margin-top: 14px;
}
.dash-accordion > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: .6rem; padding: .65rem 0;
  font-size: 1.05rem; font-weight: 800; color: var(--ink);
}
.dash-accordion > summary::-webkit-details-marker { display: none; }
.dash-accordion > summary::after {
  content: "⌄"; font-size: 1.2rem; color: var(--muted);
  transition: transform .2s ease;
}
.dash-accordion[open] > summary::after { transform: rotate(180deg); }
.dash-accordion[open] > summary { margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
/* Feed-Panels sind jetzt selbst die Akkordeon-Boxen -> kein doppelter Rahmen
   auf den inneren Zeilen-Abstand. */
.feed-panel.dash-accordion { padding: .4rem 1.1rem; }
.feed-panel.dash-accordion > .feed-heading { margin: 0; }

/* N3 (2026-06-16): Listen-Positions-Badges neutral-grau statt court-grün
   (User-Wunsch). Status-Pillen ('Du'/'forderbar'/'deine Forderung') bleiben
   farbig zur Orientierung; '.rank-row.me' behält seinen grünen Outline. */
.rank-pos { background: #e7ebf2; color: var(--ink); }

/* Bugfix 2026-06-17: /courts (Platzbuchung) + /info (Infos) erhalten denselben
   weißen Container wie /app — der Inhalt ist jetzt in .app-dashboard-shell
   gewrappt. Bereits-weiße Flächen DARIN flach machen (kein Weiß-auf-Weiß);
   farbige Akzente (Wetter-Streifen teal) bleiben. */
.app-dashboard-shell > .per-court-section,
.app-dashboard-shell > .panel {
  background: transparent; border: 0; box-shadow: none; padding: 0;
}
.app-dashboard-shell > .courts-day-section > .courts-day-header {
  background: transparent; border: 0; box-shadow: none; padding-left: 0; padding-right: 0;
}
