/* hCoach Design-System – Weiß als Hauptfarbe, Rot (#D4122A) als Akzent.
   Tokens → Basis → Layout → Komponenten → Seiten (Tracker, Berichte). Kein Build-Schritt nötig. */

:root {
  color-scheme: light;
  --white: #ffffff;
  --paper: #faf8f8;
  --ink: #14161a;
  --ink-2: #4b515a;
  --ink-3: #6b7280;
  --line: #ece7e7;
  --line-2: #ddd5d5;
  --red: #d4122a;
  --red-dark: #a60e20;
  --red-soft: #fdecee;
  --red-softer: #fff6f7;
  --green: #12794a;
  --green-soft: #e6f4ec;
  --amber: #b35f00;
  --amber-soft: #fff3e0;
  --blue: #3d5a99;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .05), 0 6px 20px rgba(20, 22, 26, .06);
  --shadow-lg: 0 10px 40px rgba(20, 22, 26, .16);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 60px;
  --tab-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(212, 18, 42, .45); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.boot { display: grid; place-items: center; min-height: 100vh; gap: 8px; color: var(--ink-3); align-content: center; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 max(16px, env(safe-area-inset-left)); gap: 16px;
}
.topbar .brand { display: flex; align-items: center; height: 100%; }
.topbar .brand img { height: 26px; display: block; }
.topnav { display: flex; gap: 2px; margin-left: 8px; }
.topnav a {
  padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.topnav a:hover { background: var(--paper); color: var(--ink); }
.topnav a.active { color: var(--red); background: var(--red-soft); }
.topbar .spacer { flex: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 16px 96px; }
.container.narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-3); margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: none; justify-content: space-around;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem;
  font-weight: 600; color: var(--ink-3); text-decoration: none;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--red); }

@media (max-width: 860px) {
  .topnav { display: none; }
  .tabbar { display: flex; }
  .container { padding-top: 16px; }
  h1 { font-size: 1.45rem; }
}

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid.cols-2 { grid-template-columns: 1fr; } .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* ---------- Komponenten ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.raised { box-shadow: var(--shadow); border-color: transparent; }
.card.tint { background: var(--paper); }
.card h2, .card h3 { margin-bottom: .75em; }
.card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card.link:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--white); color: var(--ink); font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background .12s, border-color .12s, transform .05s; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper); border-color: transparent; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: .86rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-icon { padding: 0; width: 42px; }
.btn-icon.btn-sm { width: 34px; }
.btn-sso { justify-content: center; width: 100%; font-weight: 600; min-height: 46px; border-radius: var(--radius-sm); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.badge.red { background: var(--red-soft); color: var(--red-dark); border-color: transparent; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.ink { background: var(--ink); color: #fff; border-color: transparent; }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.result { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: .8rem; }
.result.W { background: var(--green-soft); color: var(--green); }
.result.L { background: var(--red-soft); color: var(--red-dark); }
.result.D { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line-2); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--white);
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(212, 18, 42, .15); }
.field .hint { color: var(--ink-3); font-size: .8rem; }
.field-error { color: var(--red-dark); font-size: .82rem; font-weight: 600; }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; margin-bottom: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 500; }
.alert-error { background: var(--red-soft); color: var(--red-dark); }
.alert-info { background: var(--paper); border: 1px solid var(--line); }
.alert-ok { background: var(--green-soft); color: var(--green); }
.alert-warn { background: var(--amber-soft); color: var(--amber); }

.segmented { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.segmented button, .segmented a {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--ink-2);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.segmented .on { background: var(--white); color: var(--red); box-shadow: 0 1px 4px rgba(20, 22, 26, .12); }
.segmented.red .on { background: var(--red); color: #fff; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--red); border-bottom-color: var(--red); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--ink); }
.table th.sorted { color: var(--red); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--red-softer); }
.table .r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: inherit; font-weight: 600; }

.avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red-soft); color: var(--red-dark);
  font-weight: 800; font-size: .85rem; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.ink { background: var(--ink); color: #fff; }
.shirt {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--red); color: #fff;
  font-weight: 800; font-variant-numeric: tabular-nums; font-size: .86rem; flex: none;
}
.shirt.gk { background: var(--ink); }

.kpi { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.kpi .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .95rem; font-weight: 700; color: var(--ink-3); }
.kpi .l { color: var(--ink-3); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.kpi.red { background: var(--red); color: #fff; border-color: var(--red); }
.kpi.red .l { color: rgba(255, 255, 255, .85); }
.kpi .d { font-size: .8rem; color: var(--ink-3); margin-top: 2px; }

.bar { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.bar.ink > i { background: var(--ink); }
.meter-row { display: grid; grid-template-columns: 130px 1fr 118px; gap: 10px; align-items: center; margin: 8px 0; font-size: .88rem; }
.meter-row .t { font-weight: 600; }
.meter-row .v { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.empty { text-align: center; padding: 44px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.empty h3 { margin-bottom: 6px; }
.empty .ill { margin: 0 auto 12px; width: 72px; opacity: .95; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: .85rem; cursor: pointer; }
.chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.insight { padding: 10px 14px; border-left: 4px solid var(--red); background: var(--red-softer); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 8px; font-weight: 500; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.legend i { display: inline-block; vertical-align: -2px; margin-right: 5px; }

/* Toast & Modal */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 20px); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 861px) { .toasts { bottom: 24px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; pointer-events: auto; }
.toast.error { background: var(--red); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
dialog.modal { border: 0; padding: 0; border-radius: 18px; width: min(560px, 94vw); max-height: 92vh; box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(20, 22, 26, .5); }
dialog.modal .m-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
dialog.modal .m-head h2 { margin: 0; }
dialog.modal .m-body { padding: 16px 22px 22px; overflow: auto; max-height: calc(92vh - 70px); }
dialog.modal.wide { width: min(860px, 96vw); }
.menu { position: absolute; right: 0; top: 46px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 60; }
.menu a, .menu button { display: flex; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; text-align: left; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; align-items: center; gap: 8px; }
.menu a:hover, .menu button:hover { background: var(--paper); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .label { padding: 6px 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.relative { position: relative; }
.team-switch { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; cursor: pointer; max-width: 240px; }
.team-switch .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-switch .shirt { min-width: 26px; height: 26px; }

/* ---------- Auth & Installer ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: var(--red); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-aside img.logo { height: 34px; width: auto; align-self: flex-start; }
.auth-aside h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.1; max-width: 14ch; margin: 0 0 14px; }
.auth-aside p { opacity: .92; max-width: 40ch; font-size: 1.05rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-weight: 600; }
.auth-aside li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: rgba(255, 255, 255, .22); font-size: .8rem; }
.auth-aside .court-bg { position: absolute; right: -80px; bottom: -60px; width: 520px; opacity: .13; pointer-events: none; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); }
.auth-card .logo-m { display: none; height: 30px; margin-bottom: 24px; }
.auth-card h1 { font-size: 1.7rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); margin: 18px 0; font-size: .82rem; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card .logo-m { display: block; }
}
body.install, body.error-page { background: var(--paper); display: grid; place-items: start center; padding: 32px 16px; }
.install-card, body.error-page main { width: min(560px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
body.error-page main { text-align: center; }
body.error-page h1 { font-size: 4rem; color: var(--red); margin: 16px 0 0; }
.install-card h1 { margin-top: 16px; }
.install-card h2 { margin-top: 24px; font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 16px 0; font-size: .9rem; }
.checks li.ok { color: var(--green); } .checks li.bad { color: var(--red); font-weight: 700; }

/* ---------- Spielfeld, Tor & Tracker ---------- */
.court-svg { width: 100%; height: auto; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.court-svg .floor { fill: #fff; }
.court-svg .line { stroke: #14161a; stroke-width: .12; fill: none; }
.court-svg .area { fill: var(--red-soft); stroke: #14161a; stroke-width: .12; }
.court-svg .dash { stroke: #14161a; stroke-width: .1; stroke-dasharray: .5 .35; fill: none; }
.court-svg .goalpost { stroke: var(--red); stroke-width: .28; fill: none; stroke-linecap: round; }
.court-svg .zone-label { font-size: .95px; font-weight: 800; fill: var(--ink-3); text-anchor: middle; }
.court-svg .tap { cursor: crosshair; }
.court-svg .pt { stroke: #fff; stroke-width: .12; }
.court-svg .draft { stroke: #14161a; stroke-width: .15; fill: #fff; }
.goal-svg { width: 100%; height: auto; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.goal-svg .net { fill: #fff; stroke: none; }
.goal-svg .grid { stroke: var(--line-2); stroke-width: .03; fill: none; }
.goal-svg .frame { stroke: var(--red); stroke-width: .16; fill: none; stroke-linecap: square; }
.goal-svg .ground { stroke: var(--ink); stroke-width: .06; }
.goal-svg .cellnum { font-size: .42px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: var(--ink); }
.goal-svg .cellsub { font-size: .24px; font-weight: 700; text-anchor: middle; fill: var(--ink-3); }

.tracker { display: grid; grid-template-columns: 210px minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.tracker .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.tracker .panel h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 8px; }
.scoreboard {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 10px 16px;
}
.scoreboard .team { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; min-width: 0; }
.scoreboard .team.opp { justify-content: flex-end; text-align: right; }
.scoreboard .team span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard .mid { text-align: center; }
.scoreboard .score { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.scoreboard .score b { color: var(--red); background: #fff; border-radius: 8px; padding: 0 10px; margin: 0 2px; display: inline-block; }
.scoreboard .clock { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem; margin-top: 4px; }
.scoreboard .clock button { cursor: pointer; }
.clock-btn { background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 999px; height: 32px; padding: 0 12px; font-weight: 800; }
.clock-btn.live { background: var(--red); }
.sidetoggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.sidetoggle button { min-height: 46px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--white); font-weight: 800; cursor: pointer; }
.sidetoggle button.on { background: var(--red); border-color: var(--red); color: #fff; }
.sidetoggle button.on.opp { background: var(--ink); border-color: var(--ink); }
.roster { display: grid; gap: 6px; max-height: 52vh; overflow: auto; }
.roster button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--white); text-align: left; font-weight: 700; cursor: pointer;
}
.roster button.on { border-color: var(--red); background: var(--red-soft); }
.roster button .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.roster button .cnt { color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.roster button.susp { opacity: .55; }
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.res-grid button { min-height: 56px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--white); font-weight: 800; font-size: .95rem; cursor: pointer; display: grid; place-items: center; gap: 0; line-height: 1.1; }
.res-grid button small { font-weight: 600; font-size: .68rem; color: var(--ink-3); }
.res-grid button.goal { background: var(--red); border-color: var(--red); color: #fff; grid-column: span 4; min-height: 64px; font-size: 1.15rem; }
.res-grid button.goal small { color: rgba(255, 255, 255, .85); }
.res-grid button:active { transform: scale(.97); }
.res-grid button[disabled] { opacity: .4; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.quick button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--white); font-weight: 700; font-size: .78rem; cursor: pointer; padding: 2px; line-height: 1.15; }
.quick button.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chiprow button { padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--white); font-weight: 700; font-size: .8rem; cursor: pointer; }
.chiprow button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.draft-line { font-size: .88rem; font-weight: 700; min-height: 38px; padding: 8px 10px; background: var(--paper); border-radius: 10px; margin-bottom: 10px; }
.draft-line b { color: var(--red); }
.log { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.log .ev { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; font-size: .86rem; border: 1px solid var(--line); background: var(--white); }
.log .ev.goal { border-color: var(--red); background: var(--red-softer); }
.log .ev .t { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log .ev .pending { color: var(--amber); font-weight: 700; font-size: .72rem; }
.susp-list { display: flex; gap: 6px; flex-wrap: wrap; }
.susp { display: inline-flex; gap: 6px; align-items: center; background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: .82rem; }
.susp.opp { background: var(--red); color: #fff; }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.sync-pill.pending { background: var(--amber-soft); color: var(--amber); }
.sync-pill.offline { background: var(--red-soft); color: var(--red-dark); }
.sync-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tracker-court-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tracker-goal-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; }
.tracker .col-right { display: grid; gap: 12px; }
@media (max-width: 1100px) {
  .tracker { grid-template-columns: 180px minmax(0, 1fr); }
  .tracker .col-right { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tracker { grid-template-columns: 1fr; }
  .tracker .col-right { grid-template-columns: 1fr; }
  .roster { grid-template-columns: repeat(2, 1fr); max-height: none; }
  .scoreboard { grid-template-columns: 1fr; text-align: center; }
  .scoreboard .team, .scoreboard .team.opp { justify-content: center; }
  .scoreboard .score { font-size: 2.2rem; }
}

/* Berichte */
.report-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.report-head .team { font-size: 1.15rem; font-weight: 800; }
.report-head .team.opp { text-align: right; }
.report-head .final { text-align: center; font-size: 3rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.report-head .final small { display: block; font-size: .8rem; color: var(--ink-3); letter-spacing: 0; font-weight: 600; margin-top: 6px; }
@media (max-width: 600px) { .report-head { grid-template-columns: 1fr; text-align: center; } .report-head .team.opp { text-align: center; } }
.chart-box { width: 100%; }
.chart-box svg text { font-family: var(--font); }
.pt-goal { fill: var(--red); } .pt-saved { fill: var(--ink); } .pt-missed { fill: #fff; stroke: #8a8f98; } .pt-post { fill: var(--amber); } .pt-blocked { fill: var(--blue); }
.player-hero { display: flex; gap: 18px; align-items: center; }
.player-hero .shirt-xl { width: 76px; height: 76px; border-radius: 20px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; flex: none; }
.player-hero.gk .shirt-xl { background: var(--ink); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--red-softer); text-decoration: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-pill { font-weight: 800; font-variant-numeric: tabular-nums; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; font-weight: 800; font-size: 1.25rem; background: var(--paper); border: 1px dashed var(--line-2); padding: 8px 14px; border-radius: 10px; display: inline-block; }
.hero { padding: 28px; border-radius: 20px; background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; position: relative; overflow: hidden; }
.hero h1, .hero h2 { color: #fff; } .hero p { opacity: .92; max-width: 52ch; }
.hero .btn { background: #fff; color: var(--red); border-color: #fff; }
.hero .court-bg { position: absolute; right: -40px; top: -30px; width: 340px; opacity: .15; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; margin-right: 8px; font-size: .85rem; }
.pub-top { background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.pub-top img { height: 24px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--paper), #f1ecec, var(--paper)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

@media print {
  .topbar, .tabbar, .actions, .btn, .toasts, .segmented, .tabs { display: none !important; }
  .container { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; }
  body { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.goalrow { background: var(--red-softer); }
body.loading { cursor: progress; }
body.loading .topbar { background-image: linear-gradient(90deg, transparent, var(--red), transparent); background-size: 30% 2px; background-repeat: no-repeat; background-position: -30% 100%; animation: load 1s linear infinite; }
@keyframes load { to { background-position: 130% 100%; } }

.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 760px) { .insights { grid-template-columns: 1fr; } }
.auth-aside .court-bg { width: 380px; right: -60px; bottom: -40px; opacity: .1; }
.segmented svg, svg.sm, .clock-btn svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.tracker-court-wrap .court-svg { max-height: 66vh; }
.tracker-goal-wrap .goal-svg { max-height: 30vh; }
@media (max-width: 760px) { .tracker-court-wrap .court-svg, .tracker-goal-wrap .goal-svg { max-height: none; } }
.list-item > svg { width: 22px; height: 22px; flex: none; }
.empty .ill svg { width: 64px; height: 64px; color: var(--red); }
.scoreboard .segmented { background: rgba(255, 255, 255, .14); border-color: transparent; }
.scoreboard .segmented button { color: #fff; }
.scoreboard .segmented .on { background: #fff; color: var(--red); }

.ph { background: #fff3b0; color: #5c4a00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal h1 { margin-bottom: .3em; } .legal h2 { margin-top: 1.7em; font-size: 1.15rem; } .legal ul { padding-left: 1.2em; } .legal li { margin-bottom: .4em; }
.app-footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .82rem; text-align: center; }
.app-footer a { color: var(--ink-3); } .app-footer a:hover { color: var(--red); }
@media (max-width: 860px) { .app-footer { margin-bottom: 20px; } }

/* Landingpage */
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px max(20px, 4vw); position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); z-index: 20; border-bottom: 1px solid var(--line); }
.lp-nav nav { display: flex; gap: 18px; align-items: center; } .lp-nav nav a:not(.btn) { color: var(--ink-2); font-weight: 600; font-size: .92rem; }
@media (max-width: 700px) { .lp-nav nav a:not(.btn) { display: none; } }
.lp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 56px max(20px, 5vw) 40px; max-width: 1280px; margin: 0 auto; }
.lp-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.05; margin: 16px 0; letter-spacing: -.03em; }
.lp-hero h1 .red { color: var(--red); } .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 54ch; }
.lp-hero-img img, .lp-shot { width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: block; }
@media (max-width: 900px) { .lp-hero { grid-template-columns: 1fr; padding-top: 32px; } }
.lp-section { max-width: 1200px; margin: 0 auto; padding: 56px max(20px, 4vw); } .lp-section > h2, .lp-free h2, .lp-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 28px; }
.lp-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; } .lp-split h2 { text-align: left !important; }
@media (max-width: 900px) { .lp-split { grid-template-columns: 1fr; } }
.lp-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; margin-bottom: 12px; } .lp-ic svg { width: 24px; height: 24px; }
.lp-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; } .lp-list li::before { content: "✓"; color: var(--red); font-weight: 800; margin-right: 10px; }
.lp-free { background: var(--red); color: #fff; } .lp-free .lead { color: rgba(255,255,255,.92); text-align: center; margin: -12px auto 28px; }
.lp-pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 16px; padding: 20px; text-align: center; font-weight: 700; } .lp-pill strong { display: block; font-size: 2.2rem; line-height: 1; margin-bottom: 8px; } .lp-pill small { font-weight: 500; opacity: .85; }
.price { font-size: 2.2rem; font-weight: 800; margin: 6px 0; } .price small { font-size: .9rem; font-weight: 600; }
.lp-cta { text-align: center; padding: 64px 20px; background: var(--paper); }
.lp-foot { text-align: center; padding: 32px 20px 48px; }

/* Druck / PDF-Export */
.print-only { display: none; }
@page { size: A4; margin: 12mm; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-only { display: block !important; }
  .print-head { display: flex !important; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--red); padding-bottom: 8px; margin-bottom: 14px; }
  .print-head img { height: 26px; } .print-head .t { text-align: right; font-weight: 700; } .print-head .t small { display: block; color: var(--ink-3); font-weight: 500; }
  .grid.cols-4 { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .grid.cols-2, .split, .insights { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
  .grid.cols-3 { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stack { gap: 10px; } .card { padding: 12px; } .page-head { margin-bottom: 8px; } .page-head .actions, .page-head a.muted, [data-filters], .app-footer { display: none !important; }
  .chart-box { max-height: 60mm; } .kpi .v { font-size: 1.4rem; } .insight { padding: 4px 8px; margin-bottom: 4px; font-size: .8rem; }
  .alert-warn, .toasts, dialog { display: none !important; } .table { font-size: .72rem; } .table th { white-space: normal; } .meter-row { margin: 4px 0; } .table td, .table th { padding: 4px 6px; } body { font-size: 11px; }
  .app-footer, .lp-nav { display: none !important; }
  .card, .kpi, .report-head { break-inside: avoid; box-shadow: none !important; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  .court-svg { max-height: 85mm; } .goal-svg { max-height: 55mm; }
  [data-view], [data-side], [data-res], .chips, .segmented { display: none !important; }
  a { color: inherit; text-decoration: none; }
}

/* Taktik-Board */
.tactic-board .court-svg { max-height: 78vh; margin: 0 auto; }
.tactic-board .tk { cursor: grab; transition: transform .9s ease-in-out; } .tactic-board .tk.dragging { transition: none; cursor: grabbing; }
.tactic-board .court-svg.erase .ln { cursor: pointer; } .tactic-board .court-svg.erase .ln:hover path:first-child { stroke: var(--red); opacity: .5; }
.chip svg { width: 14px; height: 14px; vertical-align: -2px; }
@media print { .tactic-board .tk { transition: none; } [data-tools], .chips[data-frames] { display: none !important; } }

/* Abwehr-Erfassung */
.def-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.def-btn { width: 100%; min-height: 70px; border-radius: 14px; border: 2px solid; font-weight: 800; font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; line-height: 1.15; }
.def-btn small { font-weight: 600; font-size: .7rem; opacity: .85; }
.def-btn.plus { background: var(--green); border-color: var(--green); color: #fff; } .def-btn.minus { background: var(--red); border-color: var(--red); color: #fff; }
.def-btn:active { transform: scale(.97); }
.def-roster { grid-template-columns: repeat(3, 1fr); max-height: none; }
.def-roster button { min-height: 44px; padding: 4px 6px; font-size: .82rem; }
.tracker.focus-defense { grid-template-columns: minmax(0, 1fr); }
.tracker.focus-defense > .panel[data-left], .tracker.focus-defense > .tracker-court-wrap, .tracker.focus-defense .tracker-goal-wrap { display: none; }
.tracker.focus-defense .col-right { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.tracker.focus-defense .def-roster { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .tracker.focus-defense .col-right { grid-template-columns: 1fr; } .def-roster { grid-template-columns: repeat(2, 1fr); } }
.def-roster, .tracker.focus-defense .def-roster { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }

/* 7m-Duell */
.goal-mini{width:150px}
.goal-mini .goal-svg{width:100%;height:auto;display:block}
.shirt.ink{background:var(--ink);color:#fff}

/* Schalter (Funktionen ein/aus) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-of-type { border-top: 0; }
.switch-row span { display: grid; gap: 2px; }
.switch-row small { font-size: .82rem; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; border: 0; }
.switch::after { 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,.3); transition: transform .15s; }
.switch:checked { background: var(--red); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 3px solid rgba(212,18,42,.35); outline-offset: 2px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* Torwart-Fokus: nur Tor + Ergebnis + Torwart-Bilanz */
.tracker.focus-gk > .tracker-court-wrap [data-court] { display: none; }
.tracker.focus-gk .sidetoggle { display: none; }
.tracker.focus-gk { grid-template-columns: 250px minmax(0, 1fr); }
.tracker.focus-gk > .tracker-court-wrap { grid-column: 2; grid-row: 2; }
.tracker.focus-gk > .panel[data-left] { grid-row: 2 / span 2; }
.tracker.focus-gk .col-right { grid-column: 2; }
.tracker.focus-gk .tracker-goal-wrap .goal-svg { max-height: 300px; }
.tracker.no-goal [data-goal], .tracker.no-goal [data-assist-hint] { display: none; }
.gk-tally { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.gk-tally > div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.gk-tally b { display: block; font-size: 1.3rem; }
.gk-tally small { color: var(--ink-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }

.gk-heat { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .gk-heat { grid-template-columns: 1fr; } }

/* Wartungsseite */
.boot.maintenance { text-align: center; padding: 24px; color: var(--ink); }
.boot.maintenance h1 { font-size: 1.8rem; margin: 10px 0 0; }
.boot.maintenance p { max-width: 480px; margin: 0 auto; }
@media print { .no-print { display: none !important; } }

/* Ligatabelle */
.table.league tr.own-row td { background: var(--red-50, #fdeced); }
.table.league tr.own-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ===== Spielbericht: Tabs, Ereigniszeilen, Vergleichsbalken ===== */
.gtabs { position: sticky; top: calc(var(--nav-h) + 6px); z-index: 20; display: flex; gap: 4px; overflow-x: auto; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin: 0 0 16px; box-shadow: 0 2px 10px rgba(20, 22, 26, .05); scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.gtabs a { flex: none; padding: 9px 14px; border-radius: 10px; font-weight: 700; color: var(--ink-3); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.gtabs a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.gtabs a.on { background: var(--red); color: #fff; }
.gtabs .tabn { background: rgba(20, 22, 26, .09); border-radius: 99px; padding: 0 7px; font-size: .72rem; line-height: 1.55; font-variant-numeric: tabular-nums; }
.gtabs a.on .tabn { background: rgba(255, 255, 255, .28); }
.gpanel { min-height: 240px; }

.evlist { display: grid; }
.evrow { display: grid; grid-template-columns: 64px 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.evrow:last-child { border-bottom: 0; }
.evrow:hover { background: var(--red-softer); }
.evrow.tone-goal { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-softer), transparent 45%); }
.evrow.tone-save { border-left-color: var(--ink); }
.evrow.tone-miss { border-left-color: #a7a9af; }
.evrow.tone-turnover { border-left-color: var(--amber); }
.evrow.tone-penalty { border-left-color: var(--ink); background: var(--paper); }
.ev-time { display: grid; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ev-mark { display: grid; place-items: center; font-size: 1.05rem; }
.ev-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ev-score { background: var(--ink); color: #fff; border-radius: 7px; padding: 0 7px; font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-who { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.ev-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; align-items: center; }
.chip { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; font-size: .76rem; color: var(--ink-2); white-space: nowrap; }
.ev-minis { display: flex; gap: 8px; align-items: center; }
.mini-goal { width: 92px; } .mini-goal svg { width: 100%; height: auto; display: block; }
.mini-court { width: 62px; } .mini-court svg { width: 100%; height: auto; display: block; }
.shirt.ink { background: var(--ink); }
@media (max-width: 680px) {
  .evrow { grid-template-columns: 52px 22px minmax(0, 1fr); padding: 10px 12px; }
  .ev-minis { grid-column: 3; }
  .ev-minis:empty { display: none; }
  .evrow { position: relative; }
  .evrow > button { position: absolute; top: 4px; right: 4px; }
  .evrow:has(> button) .ev-main { padding-right: 30px; }
}

.vs-row { display: grid; grid-template-columns: 56px 1fr 150px 1fr 56px; gap: 8px; align-items: center; margin: 10px 0; font-size: .92rem; }
.vs-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.vs-row .vs-v:first-child { text-align: right; }
.vs-l { text-align: center; color: var(--ink-3); font-weight: 600; font-size: .82rem; }
.vs-bar { height: 12px; background: var(--paper); border-radius: 99px; display: flex; overflow: hidden; }
.vs-bar.left { justify-content: flex-end; }
.vs-bar i { display: block; border-radius: 99px; }
.vs-bar.left i { background: var(--red); } .vs-bar.right i { background: var(--ink); }
@media (max-width: 680px) { .vs-row { grid-template-columns: 40px 1fr 96px 1fr 40px; gap: 5px; font-size: .84rem; } }

.perf .perf-card { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .1s, box-shadow .15s; }
.perf .perf-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20, 22, 26, .1); }
.perf .perf-card .l { margin-bottom: 4px; }
.perf .perf-card .who { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-top: 4px; }
.perf .perf-card.red { background: var(--red); color: #fff; border-color: var(--red); } .perf .perf-card.red .l, .perf .perf-card.red .d { color: rgba(255, 255, 255, .88); }
.perf .perf-card.warn { border-color: #f1d6b0; background: #fffaf3; }
.pick-row:hover td { background: var(--red-softer); }
@media print { .gpanel { min-height: 0; } .evrow { break-inside: avoid; } }

/* Spiel-Kopf */
.match-hero { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; padding: 22px 24px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--red-softer)); box-shadow: 0 4px 18px rgba(20, 22, 26, .05); }
.mh-team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mh-team.opp { justify-content: flex-end; }
.mh-badge { flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.mh-badge.ink { background: var(--ink); }
.mh-name { font-size: 1.2rem; font-weight: 800; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.mh-sub { color: var(--ink-3); font-weight: 600; font-size: .85rem; }
.mh-mid { text-align: center; }
.mh-score { display: flex; gap: 12px; align-items: baseline; justify-content: center; font-weight: 800; font-size: 3.2rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mh-score i { font-style: normal; color: var(--ink-3); font-weight: 600; }
.mh-score b.fade { color: var(--ink-3); }
.mh-pills { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 5px; align-items: center; padding: 3px 11px; border-radius: 99px; background: var(--white); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.pill.win { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.loss { background: var(--red-soft); color: var(--red-dark); border-color: transparent; }
.pill.live { background: var(--red); color: #fff; border-color: transparent; }
.mh-meta { display: flex; gap: 10px 18px; justify-content: center; flex-wrap: wrap; margin: 12px 0 16px; color: var(--ink-3); font-size: .86rem; font-weight: 600; }
.evlist.collapsed .evrow:nth-child(n+9) { display: none; }
@media (max-width: 680px) {
  .match-hero { grid-template-columns: 1fr 1fr; padding: 16px; }
  .mh-mid { grid-column: 1 / -1; grid-row: 1; }
  .mh-team { gap: 8px; flex-direction: column; text-align: center; } .mh-team.opp { flex-direction: column-reverse; justify-content: flex-end; } .mh-badge { width: 42px; height: 42px; font-size: .95rem; border-radius: 12px; } .mh-name { font-size: 1rem; }
  .mh-team.opp > div { text-align: center !important; }
  .mh-score { font-size: 2.6rem; }
}
@media print { .evlist.collapsed .evrow:nth-child(n+9) { display: grid; } }

/* Video-Clip-Link je Ereignis */
.chip.clip { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.chip.clip:hover { background: var(--red); border-color: var(--red); text-decoration: none; }
@media print { .chip.clip { display: none; } }

/* Spielvorbereitung */
.prep-glance > .card { min-width: 0; }
.prep-trow { display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; background: var(--paper); }
.prep-trow.own { background: var(--red-softer); }
.prep-trow .pos { font-weight: 800; }
.prep-trow .nm { font-weight: 700; overflow-wrap: anywhere; }
.prep-trow .muted { grid-column: 2; }
.plan-item { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.plan-item:first-child { border-top: 0; }
.plan-area { font-weight: 800; font-size: .84rem; color: var(--ink-2); white-space: nowrap; }
.plan-text { line-height: 1.5; }
.plan-top { background: var(--red-softer); border: 1px solid var(--red-soft, #f3c4ca); border-radius: 14px; padding: 4px 14px; margin-bottom: 8px; }
.plan-top .plan-item { border-top-color: rgba(214, 17, 40, .15); }
.plan-item.prio1 .plan-text { font-weight: 700; }
.prep-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prep-bar i { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.prep-notes-print { white-space: pre-wrap; }
@media (max-width: 680px) { .plan-item { grid-template-columns: 1fr; gap: 2px; } }
@media print { #notes { display: none; } .prep-notes-print { display: block; } }
.prep-threat .goal-mini { width: 100%; max-width: 230px; }
.prep-threat .goal-mini + .muted { margin-top: 2px; }
@media (max-width: 760px) { .prep-glance { grid-template-columns: minmax(0, 1fr) !important; } }

/* Berichte */
.delta { display: inline-flex; gap: 3px; align-items: center; font-weight: 700; font-size: .8rem; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.delta.good { background: var(--green-soft); color: var(--green); }
.delta.bad { background: var(--red-soft); color: var(--red-dark); }
.delta.flat { background: var(--paper); color: var(--ink-3); }
.kpi.red .delta { background: rgba(255, 255, 255, .22); color: #fff; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--red-softer); }
.hl-card { display: block; text-decoration: none; color: inherit; }
.period-bar { padding: 12px 14px; margin-top: 12px; }
@media print { .period-bar { display: none; } tr.clickable:hover td { background: none; } }

/* ===== Auswahlmenüs & Dropdowns (schicker) ===== */
select.input, .field select, select.cs-native-fallback {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
select.input:hover, .field select:hover { border-color: #c9bfbf; }
select.input:disabled, .field select:disabled { background-color: var(--paper); cursor: not-allowed; opacity: .7; }
select.cs-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }

.cs-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; background: var(--white); font-weight: 600; }
.cs-btn.input, .field .cs-btn { width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); transition: border-color .12s, box-shadow .12s, background .12s; }
.cs-btn:hover { border-color: #c9bfbf; background: var(--paper); }
.cs-btn:focus-visible, .cs-btn[aria-expanded="true"] { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(212, 18, 42, .15); background: var(--white); }
.cs-btn:disabled { background: var(--paper); cursor: not-allowed; opacity: .7; }
.cs-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-label.cs-placeholder { color: var(--ink-3); font-weight: 500; }
.cs-chev { flex: none; color: var(--ink-3); transition: transform .18s ease; }
.cs-btn[aria-expanded="true"] .cs-chev { transform: rotate(180deg); color: var(--red); }
.field.invalid .cs-btn { border-color: var(--red); }

.cs-pop { position: fixed; z-index: 400; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 2px 6px rgba(20, 22, 26, .06), 0 18px 48px rgba(20, 22, 26, .2); animation: cs-in .14s ease-out; transform-origin: top center; scrollbar-width: thin; }
.cs-pop.up { transform-origin: bottom center; animation-name: cs-in-up; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cs-in-up { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.cs-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink); }
.cs-opt .cs-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-opt .cs-check { flex: none; opacity: 0; color: var(--red); }
.cs-opt.act { background: var(--paper); }
.cs-opt.on { color: var(--red-dark); background: var(--red-softer); }
.cs-opt.on .cs-check { opacity: 1; }
.cs-opt.dis { opacity: .45; cursor: not-allowed; }
.cs-group { padding: 8px 12px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.cs-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--line); }

/* Kopf-Menüs (Team, Konto) */
.menu { top: calc(100% + 8px); min-width: 260px; max-width: min(340px, 92vw); padding: 8px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(20, 22, 26, .06), 0 18px 48px rgba(20, 22, 26, .18); animation: cs-in .14s ease-out; transform-origin: top right; }
.menu::before { content: ""; position: absolute; top: -6px; right: 18px; width: 12px; height: 12px; background: var(--white); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); border-top-left-radius: 3px; }
.menu a, .menu button { padding: 10px 12px; border-radius: 10px; font-weight: 600; transition: background .1s; }
.menu a svg, .menu button svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.menu a:hover svg, .menu button:hover svg { color: var(--red); }
.menu hr { margin: 6px 4px; }
.menu .label { padding: 8px 12px 4px; }
.menu button.on { background: var(--red-softer); color: var(--red-dark); }
.menu .menu-head { display: flex; gap: 12px; align-items: center; padding: 8px 10px 10px; }
.menu .menu-head .avatar { width: 42px; height: 42px; }
.menu .menu-head strong { display: block; line-height: 1.2; }
.menu .menu-head small { color: var(--ink-3); font-weight: 500; overflow-wrap: anywhere; }
.menu .menu-item-end { margin-left: auto; color: var(--red); display: inline-flex; }
.menu .menu-danger:hover { background: var(--red-soft); color: var(--red-dark); }
.menu .menu-danger:hover svg { color: var(--red-dark); }
.menu .lang-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 8px 8px; }
.menu .lang-row button { justify-content: center; border: 1.5px solid var(--line-2); width: auto; }
.menu .lang-row button.on { border-color: var(--red); }
.team-switch { transition: border-color .12s, box-shadow .12s; padding-right: 10px; }
.team-switch:hover { border-color: #c9bfbf; box-shadow: 0 1px 4px rgba(20, 22, 26, .08); }
.team-switch[aria-expanded="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(212, 18, 42, .12); }
.team-switch .cs-chev { color: var(--ink-3); }
.team-switch[aria-expanded="true"] .cs-chev { transform: rotate(180deg); color: var(--red); }
.avatar { cursor: pointer; border: 2px solid transparent; transition: border-color .12s, box-shadow .12s; }
button.avatar:hover, button.avatar[aria-expanded="true"] { border-color: var(--red); }
@media (prefers-reduced-motion: reduce) { .menu, .cs-pop { animation: none; } .cs-chev { transition: none; } }

.alert-success { background: var(--green-soft); color: var(--green); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.menu[data-menu-panel="team"] { max-height: min(70vh, 520px); overflow-y: auto; scrollbar-width: thin; }

/* ===== Landingpage (Erweiterung) ===== */
html { scroll-padding-top: 76px; }
.lp-nav nav { flex-wrap: wrap; justify-content: flex-end; }
.lp-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.lp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #e3c9cd; }
.lp-steps-wrap { background: var(--paper); max-width: none; }
.lp-steps-wrap > h2, .lp-steps-wrap > .grid { max-width: 1200px; margin-left: auto; margin-right: auto; }
.lp-step { text-align: center; padding: 8px 12px; }
.lp-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 1.25rem; margin-bottom: 12px; box-shadow: 0 6px 16px rgba(212, 18, 42, .3); }
.lp-split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .lp-split.rev > :first-child { order: 0; } }
.lp-split .lp-shot { border-radius: 16px; }
.lp-faq { max-width: 860px; }
.faq { border: 1px solid var(--line); border-radius: 14px; background: var(--white); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--red); transition: transform .15s; flex: none; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq[open] { border-color: #e3c9cd; box-shadow: var(--shadow); }
.faq p { margin: 0; padding: 0 18px 16px; line-height: 1.6; }
@media (max-width: 640px) { .lp-section .grid.cols-3, .lp-section .grid.cols-2 { grid-template-columns: minmax(0, 1fr) !important; } .lp-hero .actions .btn { flex: 1 1 auto; justify-content: center; } }
