:root {
  /* Akzentfarbe: wird von /config.css (ACCENT) überschrieben */
  --club: #1f5f99;
  --club-dark: #16436b;
  --link: #1f5f99;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #16202c;
  --muted: #6a7686;
  --line: #e1e6ec;
  --live: #1f5f99;
  --done: #5a5f66;
  --called: #b86e00;
  --win-bg: #e4ecf5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --card: #19212b;
    --text: #eef2f6;
    --muted: #93a0b1;
    --line: #2a3542;
    --win-bg: #18304a;
    --live: #4a80b5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.35;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.brand { display: flex; align-items: center; gap: 10px; background: var(--club); color: #fff; border-radius: 12px 12px 0 0; padding: 6px 14px; }
.brand img { height: 36px; max-width: 90px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.brand b { font-size: 1.05rem; display: block; line-height: 1.2; }
.brand span { font-size: 0.72rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.08em; }
h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 22px 0 8px; }
.muted { color: var(--muted); }
.empty { margin: 4px 0; }

/* Turnierkopf */
.event {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  background: var(--card);
  border-radius: 0 0 12px 12px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.t-logo { height: 44px; max-width: 120px; object-fit: contain; border-radius: 6px; padding: 4px; }
.t-text { flex: 1; min-width: 200px; }
.event h1 { margin: 0; font-size: clamp(1.1rem, 3.4vw, 1.45rem); line-height: 1.25; }
.t-meta { color: var(--muted); font-size: 0.85rem; }
.t-meta:empty { display: none; }
.t-link { color: var(--link); font-weight: 600; text-decoration: none; white-space: nowrap; }
.t-links { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (max-width: 600px) { .t-links { align-items: flex-start; } }

.tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; }
.tools input[type=search] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}
.toggle { color: var(--muted); font-size: 0.9rem; display: flex; gap: 6px; align-items: center; cursor: pointer; }

/* Laufende Spiele */
.now { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.now-card { background: var(--club); color: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.now-card.idle { opacity: 0.75; }
.now-head { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--club-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.now-head .court { color: #fff; font-weight: 800; white-space: nowrap; }
.now-head .disc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-head .free { color: rgba(255,255,255,0.75); }
.now-head .badge { margin-left: auto; }
.now-head .badge.live { background: #fff; color: var(--club); }
.idle-last { padding: 6px 12px; font-size: 0.8rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.04em; }
.now-row.last { font-size: 0.92rem; }
.now-row.last .who { padding-top: 5px; padding-bottom: 5px; }
.now-row.last.winner .names:last-child::after { content: " ✓"; }
.now-row { flex: 1; display: flex; align-items: stretch; border-top: 1px solid rgba(255,255,255,0.18); }
.now-row.winner .names { font-weight: 700; }
.who { flex: 1; min-width: 0; padding: 7px 8px 7px 12px; display: flex; flex-direction: column; justify-content: center; }
.who .names { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .names.muted { color: rgba(255,255,255,0.7); }
.now-row .set, .now-row .pts { width: 36px; flex: none; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.now-row .set { color: rgba(255,255,255,0.7); }
.now-row .set.won { color: #fff; font-weight: 700; }
.now-row .pts { width: 48px; background: #fff; color: var(--club); font-weight: 800; font-size: 1.3rem; }
/* Federball neben den Namen: dieses Team schlägt auf (Aufschläger selbst nicht bekannt) */
.now-row.serve-team .who { position: relative; padding-right: 34px; }
.now-row.serve-team .who::after { content: ""; position: absolute; right: 8px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 15 4 3h16l-4 12'/%3E%3Cpath d='M10 15 9 3M14 15l1-12M12 15V3M5 8h14'/%3E%3Ccircle cx='12' cy='19' r='3.5' fill='%23ffffff'/%3E%3C/svg%3E") center / contain no-repeat; }

.badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; color: #fff; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.badge.live { background: var(--live); }
.badge.live::before { content: "● "; animation: blink 1.4s infinite; }
.badge.called { background: var(--called); }
.badge.done { background: var(--done); }
@keyframes blink { 50% { opacity: 0.25; } }

/* Ergebnisliste */
.games { display: flex; flex-direction: column; gap: 8px; }
.game { background: var(--card); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); border-left: 4px solid var(--done); }
.g-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.g-name { font-weight: 700; }
.g-meta { color: var(--muted); font-size: 0.85rem; }
.g-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.g-side { display: flex; flex-direction: column; padding: 4px 8px; border-radius: 6px; }
.g-side.home { text-align: right; }
.g-side.winner { background: var(--win-bg); font-weight: 700; }
.g-result { text-align: center; display: flex; flex-direction: column; min-width: 90px; }
.g-won { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.g-sets { font-size: 0.85rem; color: var(--muted); white-space: pre; font-variant-numeric: tabular-nums; }
.more { display: block; margin: 12px auto 0; font: inherit; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }

.foot { margin: 24px 0 8px; text-align: center; font-size: 0.85rem; }
.foot .tip { margin: 0 0 6px; }
.conn.ok { color: var(--muted); }
.conn.warn { color: var(--live); }

@media (max-width: 520px) {
  .wrap { padding: 10px; }
  .now { grid-template-columns: 1fr; }
  .g-body { grid-template-columns: 1fr; gap: 4px; }
  .g-side.home, .g-side.away { text-align: left; border-left: 3px solid var(--line); }
  .g-result { flex-direction: row; gap: 10px; align-items: baseline; justify-content: flex-start; padding: 0 8px; }
  .g-side.away { order: 3; }
}

/* Aufschläger (Punkt) und Rückschläger im Doppel (unterstrichen) */
.name.srv::before { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin: 0 0.4em 0.1em 0; border-radius: 50%; background: currentColor; vertical-align: middle; }
.name.rcv { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- Spielfeld-Ansicht (field.js) ---- */
.fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .fields-grid { grid-template-columns: 1fr; } }
.field-card { background: var(--club); color: #fff; border-radius: 12px; overflow: hidden; }
.field-head { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--club-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.field-head .court { font-weight: 800; white-space: nowrap; }
a.court, a.draw-link { color: inherit; text-decoration: none; }
a.draw-link { display: inline; }
a.draw-link:hover { text-decoration: underline; }
a.court:hover { text-decoration: underline; }
.field-head .disc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-head .badge { margin-left: auto; }
.field-head .badge.live { background: #fff; color: var(--club); }
.field {
  --court: #2f7a4d;
  position: relative;
  aspect-ratio: 1340 / 610;
  margin: 10px;
  background: var(--court);
  border-radius: 4px;
  container-type: inline-size;
  overflow: hidden;
}
.field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.f-lines rect, .f-lines line { fill: none; stroke: rgba(255,255,255,0.85); stroke-width: 4; }
.f-lines .f-net { stroke: #fff; stroke-width: 8; stroke-dasharray: 10 8; }
.f-arrow path { fill: none; stroke: #ffd84d; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.f-arrow marker path { fill: #ffd84d; stroke: none; }
.f-arrow circle.f-shuttle { fill: #ffd84d; stroke: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.f-arrow path.draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: f-draw 0.7s ease-out forwards; }
@keyframes f-draw { to { stroke-dashoffset: 0; } }
.fp {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 34%;
  padding: 0.2em 0.5em;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  background: color-mix(in srgb, #000 45%, var(--court));   /* deckend: der Pfeil läuft darunter */
  font-size: clamp(0.7rem, 3.2cqi, 1.4rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: left 0.5s, top 0.5s;
}
/* Aufschläger nur hinterlegt – Punkt und Unterstrich braucht es hier nicht, der Pfeil zeigt die Richtung */
.fp.srv { background: #ffd84d; color: #1a1a1a; font-weight: 700; }
.fp.srv-team { box-shadow: inset 0 0 0 2px #ffd84d; }
.fp.winner { font-weight: 700; }
.fp .flag { height: 0.75em; margin-right: 0.3em; vertical-align: -0.02em; }
.fp.winner::after { content: " ✓"; }
.fscore {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.6rem, 11cqi, 5.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
  pointer-events: none;
}
.fsets { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); pointer-events: none;
  font-size: clamp(0.65rem, 3.4cqi, 1.6rem); font-variant-numeric: tabular-nums; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,0.45); }
.fsets.center { top: 50%; transform: translate(-50%, -50%); font-size: clamp(0.9rem, 6cqi, 3rem); }
.fset { display: grid; grid-template-columns: 2.2em 0.8em 2.2em; color: rgba(255,255,255,0.7); }
.fset .l { text-align: right; }
.fset .c { text-align: center; }
.fset .r { text-align: left; }
.fset .won { color: #ffd84d; font-weight: 800; }
.fscore.left { left: 42%; }
.fscore.right { left: 58%; }
.fscore.bump { animation: f-bump 0.6s ease-out; }
@keyframes f-bump { 0% { transform: translate(-50%, -50%) scale(1.45); color: #ffd84d; } 100% { transform: translate(-50%, -50%) scale(1); } }
.field-foot { display: flex; gap: 12px; align-items: baseline; padding: 0 12px 10px; font-size: 0.85rem; min-height: 1.4em; }
.field-foot .f-sets { font-variant-numeric: tabular-nums; opacity: 0.9; white-space: pre; }
.field-foot .f-result { margin-left: auto; font-weight: 800; font-size: 1.1rem; }
.field-foot .muted { color: rgba(255,255,255,0.7); }
.field-card.finished .field { filter: saturate(0.6); }
.field-card.idle .field { filter: saturate(0.4) brightness(0.85); }
.f-idle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(0.9rem, 5cqi, 2.4rem); font-weight: 700; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.08em; }

/* Umschalter Karten/Spielfeld */
.viewswitch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.viewswitch button { font: inherit; font-size: 0.9rem; padding: 6px 12px; border: 0; background: var(--card); color: var(--text); cursor: pointer; }
.viewswitch button.on { background: var(--club); color: #fff; }
.viewswitch button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Spielern folgen (follow.js) ---- */
.pname { cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(rgba(245,184,0,0.35), rgba(245,184,0,0.35)) no-repeat left bottom / 0% 100%; border-radius: 3px; }
.pname:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.pname.pressing { background-size: 100% 100%; transition: background-size 0.6s linear; }
.pname.fav::before { content: "★ "; color: #f5b800; }
/* Aufschläger und gefolgt: Punkt vorne, Stern hinten */
.pname.fav.srv::before { content: ""; color: inherit; }
.pname.fav.srv::after { content: " ★"; color: #f5b800; }
.now-card.followed, .game.followed, .up.followed, .field-card.followed { box-shadow: 0 0 0 3px #f5b800; }
.now-card .club { font-size: 0.72rem; color: rgba(255,255,255,0.72); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-club { font-size: 0.78rem; color: var(--muted); font-weight: 400; }

.follow-box { background: var(--card); border-radius: 12px; padding: 8px 12px; margin-top: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fb-head h2 { margin: 0; font-size: 0.85rem; white-space: nowrap; }
.fb-head h2::before { content: "★ "; color: #f5b800; }
.fb-more { margin-left: auto; color: var(--link); text-decoration: none; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.fb-hint { margin: 4px 0 0; font-size: 0.82rem; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips:empty { display: none; }
.chip { font: inherit; font-size: 0.8rem; padding: 2px 9px; border-radius: 999px; border: 1px solid #f5b800; background: rgba(245,184,0,0.12); color: var(--text); cursor: pointer; }
.chip::before { content: "★ "; color: #f5b800; }
.chip::after { content: " ×"; color: var(--muted); }
.chip.club::before { content: "★ Verein: "; }
.fb-add { width: 12.5em; min-width: 0; font: inherit; font-size: 0.85rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); }
.fb-add:focus { width: 17em; outline: 2px solid var(--club); outline-offset: -1px; }
.fb-notify { font: inherit; font-size: 0.8rem; padding: 3px 9px; border-radius: 999px; border: 0; background: var(--club); color: #fff; cursor: pointer; white-space: nowrap; }
.fb-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.fb-list:empty { display: none; }
.fb-item { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 8px; background: var(--bg); font-size: 0.9rem; }
.fb-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.fb-top { display: flex; gap: 6px 8px; align-items: center; white-space: nowrap; }
.fb-court { font-weight: 700; font-variant-numeric: tabular-nums; }
.fb-name { color: var(--muted); font-size: 0.85rem; }
.fb-vs { flex: 1; min-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-score { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; gap: 8px; align-items: baseline; }
.fb-sets { color: var(--muted); font-size: 0.85rem; white-space: pre; }
.fb-cur { font-size: 1rem; padding: 0 6px; border-radius: 6px; background: var(--card); }
.fb-item .badge { font-size: 0.68rem; }
.fb-rest { font-size: 0.82rem; color: var(--link); text-decoration: none; padding: 0 10px; }
.fb-none { margin: 0; font-size: 0.85rem; }

/* Als Nächstes */
.upcoming { display: flex; flex-direction: column; gap: 6px; }
.up { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 10px; padding: 8px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.up-when { width: 4.6em; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.up-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.up-eta { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-plan { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Zeitplan-Schätzung */
.sched-chip { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; vertical-align: 1px; color: #fff; background: var(--muted); }
.sched-chip::before { content: "⏱ "; }
.sched-chip[hidden] { display: none; }
.sched-chip.ok, .up-delta.ok { background: #1d7a33; }
.sched-chip.warn, .up-delta.warn { background: #b86e00; }
.sched-chip.late, .up-delta.late { background: #c62828; }
.up-delta { display: inline-block; font-size: 0.7rem; font-weight: 700; color: #fff; padding: 0 6px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched-note { font-size: 0.82rem; color: var(--muted); margin: -4px 0 10px; }
.sched-note p { margin: 0 0 4px; }
.sched-note summary { cursor: pointer; }
.pl-sched { margin: 8px 0 0; }
.sched-note details p { margin: 4px 0 0; }
.up-main { flex: 1; min-width: 0; }
.up-name { font-size: 0.85rem; color: var(--muted); }
.up-teams { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.up-team .club { display: block; font-size: 0.75rem; color: var(--muted); }
.up-vs { color: var(--muted); }
@media (max-width: 520px) { .up-teams { flex-direction: column; } .up-vs { display: none; } }

/* Hinweise (Toasts) */
.toasts { position: fixed; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 24px)); }
.toast { background: var(--card); color: var(--text); border-left: 5px solid #f5b800; border-radius: 10px; padding: 10px 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 2px; cursor: pointer; animation: toast-in 0.25s ease-out; transition: opacity 0.5s; }
.toast.out { opacity: 0; }
.toast span { font-size: 0.9rem; color: var(--muted); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ---- Spieler-Seite (/spieler) ---- */
.back { color: var(--link); text-decoration: none; font-weight: 600; }
.tabs { display: flex; gap: 4px; margin: 16px 0 4px; overflow-x: auto; border-bottom: 2px solid var(--line); }
.tabs button { font: inherit; font-weight: 600; padding: 9px 14px; border: 0; background: none; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--club); }
[data-panel] { margin-top: 14px; }
.star { font: inherit; font-size: 1.25rem; line-height: 1; padding: 2px 6px; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; }
.star.on { color: #f5b800; }
.pl-cards { display: flex; flex-direction: column; gap: 12px; }
.pl-card { background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pl-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pl-who b { font-size: 1.05rem; }
.pl-who .muted { font-size: 0.85rem; }
.pl-status { font-size: 0.8rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.pl-status.live { background: var(--live); color: #fff; }
.pl-status.called { background: var(--called); color: #fff; }
.pl-status.next { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-top: 1px solid var(--line); }
.pl-item .badge { width: 8.6em; text-align: center; flex: none; }
.badge.won { background: #1d7a33; }
.badge.lost { background: var(--done); }
.badge.next { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.pl-mid { flex: 1; min-width: 0; }
.pl-event { font-size: 0.8rem; color: var(--muted); }
.pl-vs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-score { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: pre; }
.pl-score span { font-size: 0.78rem; color: var(--muted); }
.pl-empty { margin: 4px 0; }
.pl-rows { display: flex; flex-direction: column; gap: 6px; }
.pl-row { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 8px 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.pl-row.sub { box-shadow: none; background: var(--bg); margin: 4px 0 0 28px; }
.pl-rec { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; min-width: 3em; text-align: right; }
.pl-club summary { list-style: none; cursor: pointer; }
.pl-club summary::-webkit-details-marker { display: none; }
.pl-club[open] summary { box-shadow: 0 0 0 2px var(--line); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat b { font-size: 1.8rem; font-variant-numeric: tabular-nums; color: var(--link); }
.stat-label { font-weight: 700; }
.stat .muted { font-size: 0.82rem; }
.stat-split { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .pl-item { flex-wrap: wrap; }
  .pl-item .badge { width: auto; }
  .pl-score { flex-direction: row; gap: 8px; width: 100%; justify-content: flex-start; padding-left: 4px; }
}

/* Turnierbäume (/baum) */
.draw-pick { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 4px; }
.pick-row { display: flex; gap: 6px 10px; align-items: baseline; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pick-ev { font-weight: 700; min-width: 5.5em; flex: none; font-size: 0.9rem; }
.chip-btn { font-size: 0.85rem; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); text-decoration: none; white-space: nowrap; }
.chip-btn.on { background: var(--club); border-color: var(--club); color: #fff; }
.chip-btn.followed:not(.on) { border-color: #f5b800; }
.bracket-wrap { margin-bottom: 18px; }
.bracket-title { font-size: 0.95rem; margin: 14px 0 6px; color: var(--muted); }
.bracket-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.bracket { position: relative; }
.b-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
.b-lines path { fill: none; stroke: var(--line); stroke-width: 2; }
.b-round { position: absolute; top: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: center; }
.bm { position: absolute; box-sizing: border-box; background: var(--card); border-radius: 8px; padding: 3px 8px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08); border-left: 3px solid transparent; font-size: 0.85rem; overflow: hidden; }
.group-matches .bm { position: static; }
.bm.live { border-left-color: var(--club); }
.bm.bye { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bm.bye .bm-team.muted { font-style: italic; }
.bm.followed { box-shadow: 0 0 0 2px #f5b800; }
.bm-head { display: flex; justify-content: space-between; gap: 6px; font-size: 0.68rem; color: var(--muted); line-height: 1.3; }
.bm-court { color: var(--club); font-weight: 700; text-decoration: none; }
.bm-team { display: flex; justify-content: space-between; gap: 6px; line-height: 1.35; }
.bm-team.won { font-weight: 700; }
.bm-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bm-sets { display: flex; gap: 0; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; flex: none; }
/* feste, hinterlegte Spalten je Satz – die Zahlen beider Teams stehen genau untereinander */
.bm-sets { gap: 3px; }
.bm-sets span { width: 2em; text-align: center; background: var(--bg); border-radius: 4px; }
.bm-sets span.w { background: color-mix(in srgb, var(--club) 14%, var(--bg)); }
.bm-sets span.cur { background: var(--club); color: #fff; font-weight: 700; }   /* laufender Satz */
.bm-team + .bm-team { margin-top: 2px; }
.bm-sets .w { color: var(--text); font-weight: 700; }
.group-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--card); border-radius: 10px; overflow: hidden; }
.group-table th, .group-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.group-table th { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.group-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-table .club { display: block; font-size: 0.75rem; color: var(--muted); }
.group-table tr.followed td { background: rgba(245,184,0,0.12); }
.g-place { font-weight: 800; width: 2em; }
.group-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.table-scroll { overflow-x: auto; }

/* Statistik: Tabellen und Export */
.stat-export { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.stat-export button { font: inherit; font-size: 0.85rem; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; }
.stat-export button:hover { border-color: var(--club); }
.stat-table h3 { font-size: 0.95rem; margin: 22px 0 8px; }
.stat-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
@media print {
  body { background: #fff; }
  .tabs, .stat-export, .foot, .pl-sched, .brand img, .back, .toasts { display: none !important; }
  .stat, .group-table { box-shadow: none; border: 1px solid #ccc; }
  .stat-tiles { grid-template-columns: repeat(3, 1fr); }
  .stat-table { break-inside: avoid; }
}

/* Flagge der Nation vor dem Namen (Karten und Listen) */
.flag { height: 0.8em; width: auto; aspect-ratio: 4 / 3; margin-right: 0.35em; vertical-align: -0.05em; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
.day-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.day-pick[hidden] { display: none; }
.day-pick button { font: inherit; cursor: pointer; }

/* Handy-Seite /app */
body.app .app-wrap { max-width: 640px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.app-card { background: var(--card); border-radius: 12px; padding: 10px 12px; margin-top: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-small { font-size: 0.8rem; }
.app-btn { font: inherit; font-weight: 700; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--club); color: #fff; cursor: pointer; white-space: nowrap; }
.app-btn.off { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.app-btn:disabled { opacity: 0.5; }
.app-link-btn { font: inherit; font-size: 0.85rem; margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.app-more { color: var(--link); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.app-input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); }
.app-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.app-item { background: var(--bg); border-radius: 8px; padding: 6px 10px; }
.app-item.followed { box-shadow: inset 3px 0 0 #f5b800; }
.app-top { display: flex; align-items: center; gap: 8px; }
.app-top > :last-child:not(:first-child):not(.muted) { margin-left: auto; }
.app-score { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-vs { font-size: 0.95rem; margin-top: 2px; }
.app-nav { display: flex; justify-content: center; gap: 18px; margin: 16px 0 4px; font-size: 0.9rem; }
.app-nav a { color: var(--link); text-decoration: none; font-weight: 600; }
.app-nav a[hidden] { display: none; }

/* Spieler-Statistik (/spieler#p=Name) */
a.pl-link { color: inherit; text-decoration: none; }
a.pl-link:hover { text-decoration: underline; }
.pl-back { display: inline-block; margin: 12px 0 6px; }
.pl-profile-head { margin-bottom: 10px; }
.pl-name { margin: 0; font-size: 1.35rem; text-transform: none; letter-spacing: 0; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pl-name .flag { height: 0.85em; margin: 0; }
.pl-h3 { font-size: 0.95rem; margin: 22px 0 8px; }

/* Handy-Seite: Anzeigetafel je Court */
.app-board { padding: 6px 0 0 10px; overflow: hidden; }
.app-board .app-top { padding-right: 10px; margin-bottom: 2px; }
.ab-team { display: flex; align-items: center; gap: 0; min-height: 1.9em; }
.ab-team + .ab-team { border-top: 1px solid var(--line); }
.ab-team.won .ab-names { font-weight: 700; }
.ab-names { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.ab-set { width: 1.9em; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.ab-set.w { color: var(--text); font-weight: 700; }
.ab-pts { width: 2.3em; text-align: center; align-self: stretch; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; background: var(--club); color: #fff; }
.ab-srv::before { content: ""; display: inline-block; width: 0.42em; height: 0.42em; border-radius: 50%; background: currentColor; margin: 0 0.35em 0.1em 0; vertical-align: middle; }
.ab-srv-team::after { content: " 🏸"; font-size: 0.8em; }
.app-board .ab-team:last-child { padding-bottom: 0; }
