:root {
  --bg: #f4f5f8; --surface: #ffffff; --surface2: #eef0f5; --text: #151a2d; --muted: #646b80;
  --line: #dde1ea; --accent: #0f2a5f; --accent-ink: #ffffff; --gold: #c9971c; --gold-soft: #fbf1d6;
  --live: #d6263b; --win: #127a3e; --q: #e3f4e9; --shadow: 0 1px 3px rgba(15, 25, 50, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1120; --surface: #161b2e; --surface2: #1f2640; --text: #e9ecf5; --muted: #98a0b8;
    --line: #2a3250; --accent: #f0c24b; --accent-ink: #141414; --gold: #f0c24b; --gold-soft: #2e2817;
    --live: #ff5468; --win: #4fd486; --q: #173325; --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; margin-bottom: .6rem; }
h3 { font-size: .95rem; margin-bottom: .5rem; }
small { font-weight: 400; }
.muted { color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(16px, 3vw, 32px); background: #0f2a5f; color: #fff; }
.top .muted { color: #c3cbe0; }
.brand { display: flex; gap: .8rem; align-items: center; min-width: 0; }
.logo { font-size: 2rem; color: #f0c24b; }
.top h1 { font-size: clamp(1.05rem, 2.4vw, 1.5rem); }
.top p { margin: .2rem 0 0; font-size: .85rem; }
.conn { display: flex; align-items: center; gap: .4rem; font-size: .8rem; white-space: nowrap; }
.conn .dot { width: .6rem; height: .6rem; border-radius: 50%; background: #aaa; }
.conn.ok .dot { background: #34d17a; box-shadow: 0 0 0 3px rgba(52, 209, 122, .25); }
.conn.err .dot { background: #ff5468; }
.conn.local .dot { background: #f0c24b; }

.tabs { display: flex; gap: .25rem; padding: 0 clamp(16px, 3vw, 32px); background: #0f2a5f; overflow-x: auto; position: sticky; top: 0; z-index: 5; }
.tabs button { background: none; border: 0; color: #c3cbe0; padding: .75rem 1rem; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.active { color: #fff; border-bottom-color: #f0c24b; }

main { max-width: 1200px; margin: 0 auto; padding: 1.25rem clamp(16px, 3vw, 32px) 2rem; }
.tab { display: none; }
.tab.active { display: block; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem 1rem; text-align: center; margin-bottom: 1rem; box-shadow: var(--shadow); }
.hero.is-live { border-color: var(--live); box-shadow: 0 0 0 2px color-mix(in srgb, var(--live) 25%, transparent); }
.hero-label { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.hero-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.hero-team { font-size: clamp(1.1rem, 3.5vw, 2rem); font-weight: 700; overflow-wrap: anywhere; }
.hero-team:first-child { text-align: right; }
.hero-team:last-child { text-align: left; }
.hero-score { font-size: clamp(2.2rem, 8vw, 4.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-score span { margin: 0 .2em; color: var(--muted); }
.champ { font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 800; color: var(--gold); margin: .3rem 0; }

.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px; vertical-align: middle; letter-spacing: .03em; }
.badge.live { background: var(--live); color: #fff; animation: pulse 1.6s infinite; }
.badge.done { background: var(--surface2); color: var(--muted); }
@keyframes pulse { 50% { opacity: .55; } }

.mlist { list-style: none; margin: 0; padding: 0; }
.mlist li { display: grid; grid-template-columns: 3.2rem 2.6rem 1fr; gap: .5rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.mlist li:first-child { border-top: 0; }
.time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.tag { font-size: .75rem; font-weight: 700; background: var(--surface2); border-radius: 6px; text-align: center; padding: .1rem .2rem; }
.vs { min-width: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .4rem; }
.vh { text-align: right; min-width: 0; }
.va { min-width: 0; }
.vh .team { flex-direction: row-reverse; }
.vsc { text-align: center; }
.rshort { display: none; }
.team.tbd { color: var(--muted); font-style: italic; }
.team.win { font-weight: 700; color: var(--win); }
.team.lose { opacity: .7; }
.score { display: inline-block; min-width: 3.2rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface2); border-radius: 6px; padding: .05rem .4rem; }
.score.empty { color: var(--muted); font-weight: 400; }
.score.live { background: var(--live); color: #fff; }
.pen { display: block; font-size: .7rem; color: var(--muted); text-align: center; }

.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
select, input, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; }
textarea { width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: .45rem .9rem; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.sm { padding: .3rem .65rem; font-size: .85rem; }
.btn.danger { border-color: var(--live); }
.btn.ghost.danger { color: var(--live); }
.btn.danger:not(.ghost) { background: var(--live); color: #fff; }

.phase-h { margin: 1.4rem 0 .6rem; font-size: 1.1rem; }
.phase-h:first-child { margin-top: 0; }
.plan { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.plan th, .plan td { padding: .5rem .6rem; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.plan th { background: var(--surface2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-top: 0; }
.plan .r { text-align: right; }
.plan .c { text-align: center; white-space: nowrap; }
.plan .no { color: var(--muted); font-variant-numeric: tabular-nums; width: 2.5rem; }
.plan .time small { color: var(--muted); }
.plan tr.current td { background: var(--gold-soft); }
.plan tr.final td { font-weight: 600; }
.plan tr.sep td { background: var(--surface2); color: var(--muted); font-size: .85rem; text-align: center; }
.break { text-align: center; color: var(--muted); font-size: .9rem; padding: .7rem; margin: 1rem 0 0; border: 1px dashed var(--line); border-radius: 10px; }

.grid-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.grid-tables .card { margin: 0; }
.legend { grid-column: 1 / -1; font-size: .85rem; }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings th, .standings td { padding: .35rem .3rem; text-align: center; border-top: 1px solid var(--line); }
.standings th { font-size: .75rem; color: var(--muted); border-top: 0; }
.standings .name { text-align: left; overflow-wrap: anywhere; }
.standings th:nth-child(2) { text-align: left; }
.standings tr.q td { background: var(--q); }
.standings .pts { font-weight: 800; }
.tnote { font-size: .8rem; margin: .5rem 0 0; }

.bracket { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.round { display: flex; flex-direction: column; min-width: 200px; }
.round-matches { display: flex; flex-direction: column; justify-content: space-around; gap: .6rem; flex: 1; }
.kmatch { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; box-shadow: var(--shadow); }
.kmatch.live { border-color: var(--live); }
.kmatch.final { border: 2px solid var(--gold); }
.kmeta { font-size: .72rem; color: var(--muted); margin-bottom: .3rem; }
.krow { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; }
.krow b { font-variant-numeric: tabular-nums; }
.krow.win { color: var(--win); font-weight: 700; }
.krow.win .team { color: inherit; }
.kpen { font-size: .72rem; color: var(--muted); }

.subtabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.subtabs button { font: inherit; background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: .4rem .8rem; border-radius: 99px; cursor: pointer; }
.subtabs button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.warn { background: var(--gold-soft); border: 1px solid var(--gold); padding: .6rem .8rem; border-radius: 8px; font-size: .9rem; }
.rrow { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .7rem; margin-bottom: .6rem; }
.rrow.live { border-color: var(--live); }
.rrow.done { opacity: .85; }
.rmeta { font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.rteams { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rname { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.rname.r { text-align: right; }
.rteams input, .rpen input { width: 3.6rem; text-align: center; font-weight: 700; }
.rrow.big .rteams { font-size: 1.2rem; }
.rrow.big .rteams input { width: 4.2rem; font-size: 1.5rem; }
.rrow.big .btn.sm { font-size: 1.2rem; padding: .3rem .8rem; }
.rpen { margin-top: .5rem; font-size: .9rem; }
.ractions { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.teamgrid .card { margin: 0; }
.tl { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.tl span { width: 2rem; font-weight: 700; color: var(--muted); }
.tl input { flex: 1; min-width: 0; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; align-items: end; margin-bottom: 1rem; }
.setgrid label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
.login form { display: flex; gap: .5rem; flex-wrap: wrap; }

.foot { text-align: center; font-size: .8rem; padding: 0 16px 2rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: #151a2d; color: #fff; padding: .7rem 1.1rem; border-radius: 10px; transition: transform .25s; z-index: 20; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .rlong { display: none; }
  .rshort { display: inline; font-weight: 700; }
  .mlist .vs { grid-template-columns: 1fr auto; row-gap: .15rem; }
  .mlist .vh { text-align: left; grid-row: 1; grid-column: 1; }
  .mlist .vh .team { flex-direction: row; }
  .mlist .va { grid-row: 2; grid-column: 1; }
  .mlist .vsc { grid-row: 1 / span 2; grid-column: 2; }
  .conn #connText { display: none; }
}

@media print {
  .tabs, .toolbar, .foot, .conn, .badge, .evlist { display: none !important; }
  .top { background: none; color: #000; padding: 0 0 .5rem; }
  .top .muted { color: #333; }
  body { background: #fff; color: #000; font-size: 11px; }
  main { padding: 0; max-width: none; }
  .tab { display: none !important; }
  #tab-plan { display: block !important; }
  .plan { border-radius: 0; }
  .plan tr.current td { background: none; }
  .phase-h { break-after: avoid; }
}

/* Tore & Karten */
.card-ico { display: inline-block; width: .62em; height: .85em; border-radius: 2px; vertical-align: -0.1em; margin-right: .15em; }
.card-ico.y { background: #f2c200; }
.card-ico.r { background: #d6263b; }
.evlist { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .9rem; font-weight: 400; }
.hero .evlist { font-size: clamp(.8rem, 1.6vw, 1rem); color: var(--muted); }
.evlist li { padding: .1rem 0; }
.evlist.admin li { display: flex; align-items: center; gap: .35rem; }
.evlist .x { margin-left: auto; background: none; border: 0; color: var(--live); cursor: pointer; font: inherit; padding: 0 .3rem; }
.evdetails { margin-top: .6rem; }
.evdetails summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.evpanel { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin-top: .7rem; }
.evside { background: var(--surface2); border-radius: 8px; padding: .6rem; min-width: 0; }
.evside h4 { margin: 0 0 .4rem; font-size: .9rem; overflow-wrap: anywhere; }
.evin { display: flex; gap: .4rem; }
.evin .evnr { width: 4rem; }
.evin .evname { flex: 1; min-width: 0; }
.evbtns { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.stat .nr { display: inline-block; min-width: 1.8rem; font-size: .75rem; font-weight: 700; color: var(--muted); }
.stat tr.lead td { background: var(--gold-soft); font-weight: 700; }
.stat td.name.muted { font-size: .85rem; }

/* Vereinslogos */
.team { display: inline-flex; align-items: center; gap: .4em; vertical-align: middle; max-width: 100%; }
.tname { min-width: 0; overflow-wrap: break-word; }
.tlogo { width: 1.5em; height: 1.5em; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface2); }
.tlogo.none { display: inline-block; }
.plan td.r .team { flex-direction: row-reverse; }
.hero-team .team { flex-direction: column; gap: .5rem; }
.hero-team .tlogo { width: clamp(3.5rem, 9vw, 6rem); height: clamp(3.5rem, 9vw, 6rem); }
.rname.r .team { flex-direction: row-reverse; }
.logoup { cursor: pointer; display: inline-flex; }
.logoup .tlogo { width: 2.2rem; height: 2.2rem; }
.logoup .tlogo.none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px dashed var(--line); font-weight: 700; }
.tl .x { background: none; border: 0; color: var(--live); cursor: pointer; }
.kmatch .krow .team { min-width: 0; }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--live); }

/* Wettbewerbe (Senioren, U21, Ü30, Ü40) */
.comps { display: flex; gap: .4rem; padding: 0 clamp(16px, 3vw, 32px) .6rem; background: #0f2a5f; overflow-x: auto; }
.comps:empty { display: none; }
.comps button { font: inherit; font-weight: 600; font-size: .9rem; background: rgba(255, 255, 255, .08); color: #c3cbe0; border: 1px solid rgba(255, 255, 255, .18); padding: .3rem .8rem; border-radius: 99px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.comps button.active { background: #f0c24b; color: #141414; border-color: #f0c24b; }
.comps .badge { font-size: .6rem; }
.adm-comp { margin: -.4rem 0 .8rem; }
.adm-comp b { color: var(--text); }
@media print { .comps { display: none !important; } }
.grid-tables .card, .cols .card { overflow-x: auto; }
@media (max-width: 640px) { .grid-tables { grid-template-columns: 1fr; } .standings th, .standings td { padding: .35rem .2rem; } }

/* Spieldetails: Klick auf ein beendetes Spiel */
[data-match] { cursor: pointer; }
.mlist li[data-match]:hover, .plan tr[data-match]:hover td { background: var(--surface2); }
.kmatch[data-match]:hover { border-color: var(--accent); }
.md-back { position: fixed; inset: 0; background: rgba(8, 12, 28, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.md { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem 1rem 1rem; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.md-close { position: absolute; top: .5rem; right: .5rem; background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: .3rem .5rem; }
.md .hero-label { padding: 0 1.5rem; }
.md-sum { margin: .4rem 0 1rem; }
.md-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; text-align: left; }
.md-side { background: var(--surface2); border-radius: 10px; padding: .6rem .8rem; min-width: 0; }
.md-side h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .6rem 0 .1rem; }
.md-side h3:first-child { margin-top: 0; }
.md-side .evlist { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .md-cols { grid-template-columns: 1fr; } .md { padding: 1.2rem .8rem .8rem; } }
.md-side h4 { margin: 0 0 .5rem; font-size: .95rem; }

/* K.-o.-Baum als Pyramide: Finale in der Mitte, Platz 3 darunter */
.round-matches.final-col { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto 1fr; gap: 0; }
.final-col .kmatch.final { grid-row: 2; }
.final-col .kmatch.p3 { grid-row: 3; align-self: start; margin-top: .8rem; }

/* ---------- Handy ---------- */
.lbl-short { display: none; }
.ko-hint { display: none; font-size: .8rem; margin: 0 0 .6rem; }
@media (max-width: 640px) {
  /* Kopf kompakter */
  .top { padding: .7rem 16px; gap: .6rem; }
  .logo { font-size: 1.5rem; }
  .top h1 { font-size: 1rem; }
  .top p { font-size: .75rem; }
  .comps { padding: 0 16px .5rem; }
  /* Reiter: kurze Namen, passen nebeneinander */
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .tabs { padding: 0 8px; gap: 0; }
  .tabs button { flex: 1 0 auto; padding: .7rem .45rem; font-size: .9rem; }
  #tab-plan .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  #tab-plan .toolbar select { width: 100%; min-width: 0; }
  #tab-plan .toolbar .btn { display: none; }
  main { padding: 1rem 12px 2rem; }
  .card { padding: .8rem; }

  /* Spielplan als Liste: Zeit | Gruppe | Heim über Gast | Ergebnis */
  .plan, .plan tbody { display: block; }
  .plan thead { display: none; }
  .plan tr { display: grid; grid-template-columns: 2.9rem 2rem minmax(0, 1fr) auto; column-gap: .5rem; row-gap: .2rem; align-items: center; padding: .55rem .6rem; border-top: 1px solid var(--line); }
  .plan tbody tr:first-child { border-top: 0; }
  .plan td { padding: 0; border: 0; font-size: .92rem; }
  .plan td.no { display: none; }
  .plan .time small { display: none; }
  .plan td.time { grid-column: 1; grid-row: 1 / span 2; }
  .plan td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; text-align: center; }
  .plan td.r { grid-column: 3; grid-row: 1; text-align: left; }
  .plan td.r .team { flex-direction: row; }
  .plan td:nth-child(6) { grid-column: 3; grid-row: 2; }
  .plan td.c { grid-column: 4; grid-row: 1 / span 2; }
  .plan tr.sep td { grid-column: 1 / -1; }
  .plan tr.current, .plan tr[data-match]:hover { background: var(--gold-soft); }
  .plan tr[data-match]:hover { background: var(--surface2); }
  .plan .badge { display: block; width: max-content; margin: .2rem auto 0; font-size: .6rem; }
  .plan .score { min-width: 2.8rem; }
  .phase-h small { display: block; margin-top: .2rem; font-size: .8rem; }

  /* K.-o.-Baum: eine Runde pro Bildschirm, nächste schaut rein, Wischen rastet ein */
  .bracket { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 78%; scroll-snap-type: x mandatory; gap: .8rem; }
  .round { min-width: 0; scroll-snap-align: start; }
  .ko-hint { display: block; }

  /* Turnierleitung: Heim und Gast je eine Zeile mit − Tore + */
  .rteams { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .45rem; }
  .rrow:not(.big) .rteams { grid-template-columns: minmax(0, 1fr) auto; }
  .rteams > span:not(.rname) { display: none; }
  .rname.r { grid-row: 1; grid-column: 1; text-align: left; }
  .rname.r .team { flex-direction: row; }
  .rname:not(.r) { grid-row: 2; grid-column: 1; }
  .rteams [data-inc="h"][data-d="-1"] { grid-row: 1; grid-column: 2; }
  .rteams [data-k="h"] { grid-row: 1; grid-column: 3; }
  .rteams [data-inc="h"][data-d="1"] { grid-row: 1; grid-column: 4; }
  .rteams [data-inc="a"][data-d="-1"] { grid-row: 2; grid-column: 2; }
  .rteams [data-k="a"] { grid-row: 2; grid-column: 3; }
  .rteams [data-inc="a"][data-d="1"] { grid-row: 2; grid-column: 4; }
  .rrow:not(.big) .rteams [data-k] { grid-column: 2; }
  .rrow.big .rteams { font-size: 1.05rem; }
  .rrow.big .rteams input { width: 3.4rem; font-size: 1.35rem; padding: .35rem .2rem; }
  .rrow.big .btn.sm { font-size: 1.2rem; padding: .35rem .75rem; min-height: 2.6rem; }
  .ractions .btn { flex: 1 1 auto; }
  .delaybox .ractions .btn { flex: 1 1 22%; padding: .45rem .2rem; }
  .subtabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
  .subtabs button { white-space: nowrap; }
  input, select, textarea { font-size: 16px; } /* verhindert Zoom beim Antippen auf dem iPhone */
}

/* Tor-Animation */
.goal-fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.goal-track { position: absolute; left: 0; right: 0; bottom: 14vh; height: 3.5rem; }
.goal-ball { position: absolute; left: 0; bottom: 0; font-size: 3rem; line-height: 1; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); animation: goal-roll 2.6s cubic-bezier(.3, .1, .4, 1) forwards; }
@keyframes goal-roll {
  0% { transform: translateX(-4rem) rotate(0deg); }
  100% { transform: translateX(calc(100vw + 1rem)) rotate(900deg); }
}
.goal-label { position: absolute; left: 50%; top: 22vh; transform: translate(-50%, 0) scale(.6); opacity: 0; max-width: calc(100% - 32px); text-align: center; background: var(--live); color: #fff; padding: .6rem 1.2rem; border-radius: 99px; font-size: 1.15rem; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); animation: goal-pop 3s ease forwards; }
.goal-label b { font-weight: 900; letter-spacing: .06em; margin-right: .2rem; }
.goal-label span { font-variant-numeric: tabular-nums; font-weight: 800; margin-left: .3rem; }
@keyframes goal-pop {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  20%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -1rem) scale(1); }
}
@media (max-width: 640px) { .goal-label { font-size: 1rem; border-radius: 16px; padding: .5rem 1rem; } .goal-ball { font-size: 2.6rem; } }

/* Ball rollt über das Ergebnis in der Live-Ansicht */
.hero-ball { position: absolute; z-index: 40; pointer-events: none; font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); animation: hero-roll 1.8s linear forwards; }
@keyframes hero-roll {
  0% { transform: translateX(var(--from)) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateX(var(--to)) rotate(720deg); opacity: 0; }
}
.goal-pop { display: inline-block; animation: goal-num 1.2s ease-out forwards; }
@keyframes goal-num {
  0% { transform: scale(1.8); color: var(--live); }
  50% { transform: scale(.95); color: var(--live); }
  100% { transform: scale(1); color: var(--text); }
}

/* Alle Spiele einer Mannschaft (Klick auf die Tabelle) */
.standings tr[data-teamview] { cursor: pointer; }
.standings tr[data-teamview]:hover td { background: var(--surface2); }
.md-backbtn { position: absolute; top: .55rem; left: .6rem; background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; padding: .3rem; max-width: calc(100% - 4rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md:has(.md-backbtn) { padding-top: 2.4rem; }
.md-teamhead { margin: .2rem 0 .3rem; }
.md-games { text-align: left; }
.md-games .mlist li[data-match]:hover { background: var(--surface2); }
.md-scorers { text-align: left; margin-top: .8rem; }
.md-hint { font-size: .8rem; margin: .6rem 0 0; }
