/* =============================================================================
   Eagles Cup - Teilnehmer-Ansicht (mobile-first), baut auf design.css auf.
   ============================================================================= */
body.pub { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Kopf ----------
   Heller Header (08/2026-Redesign, siehe VERBESSERUNGEN.md §6): weisse Flaeche,
   Navy-Text, Hairline + Gold-Unterstrich statt vollflaechigem Navy-Verlauf. Die
   Beamer-Anzeige (screen.js/screen.html) behaelt bewusst den dunklen Look - dort
   ist Kontrast aus Halle/Distanz wichtiger als der ruhigere Alltagslook hier. */
.pub-head { background: var(--pub-head-bg); color: var(--pub-head-text); border-bottom: 1px solid var(--pub-head-border); box-shadow: var(--pub-head-shadow); position: relative; }
.pub-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); }
.pub-head-in { display: flex; align-items: center; gap: var(--s-3); max-width: 1080px; margin-inline: auto; padding: var(--s-3) var(--s-4); padding-top: calc(var(--s-3) + env(safe-area-inset-top, 0px)); }
.pub-logo { height: 44px; width: auto; flex: none; }
.pub-name { font-size: var(--fs-xl); font-weight: var(--fw-black); line-height: 1.1; letter-spacing: -.01em; color: var(--pub-head-text); }
.pub-sub { font-size: var(--fs-xs); color: var(--pub-head-sub); font-weight: var(--fw-bold); letter-spacing: .04em; margin-top: 1px; }
.live-ind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--pub-head-muted); background: color-mix(in srgb, var(--pub-head-text) 8%, transparent); border: 1px solid color-mix(in srgb, var(--pub-head-text) 14%, transparent); padding: 5px 10px; border-radius: var(--r-full); }
.live-ind .dot { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--pub-head-text) 35%, transparent); }
.live-ind.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.live-ind.on .dot { background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 60%, transparent); }
.tbar { display: flex; align-items: center; gap: var(--s-2); max-width: 1080px; margin-inline: auto; padding: 0 var(--s-4) var(--s-3); }
.tbar-label { display: inline-flex; align-items: center; gap: 6px; color: var(--pub-head-muted); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.tbar-sel { max-width: 320px; }

/* ---------- Navigation (Chips) ---------- */
.pub-nav { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: var(--s-2) var(--s-4); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; -webkit-overflow-scrolling: touch; }
.pub-nav::-webkit-scrollbar { display: none; }
/* Segmented-Look (08/2026-Redesign): ruhige Pills auf --surface-2; aktiv = weiss mit
   Navy-Text + Hairline + Schatten (wie iOS/Linear-Segmented-Control) statt vollflaechigem
   Gold/Navy-Block - Gold bleibt der 2-px-Unterstrich, dadurch wirkt es als Akzent statt
   als Flaechenfarbe. */
.nav-chip { flex: none; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem .85rem; border-radius: var(--r); border: 1px solid transparent; background: var(--surface-2); color: var(--text-soft); font: inherit; font-weight: var(--fw-bold); font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t); position: relative; }
.nav-chip small { font-weight: 600; font-size: 10px; color: var(--text-muted); letter-spacing: .02em; }
.nc-name { font-size: var(--fs-xs); line-height: 1.2; }
.nav-chip.active { background: var(--surface); border-color: var(--border); color: var(--brand); box-shadow: var(--sh-1); }
.nav-chip.active::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav-chip.active small { color: var(--text-muted); }
.nav-fix { flex-direction: row; align-items: center; gap: 6px; }
.nav-mine { border-style: dashed; }
.nav-mine.active { border-style: solid; }

/* ---------- Inhalt ---------- */
.pub-main { flex: 1; width: 100%; max-width: 1080px; margin-inline: auto; padding: var(--s-4) var(--s-4) var(--s-6); }
.section-title { display: flex; align-items: baseline; gap: var(--s-3); font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text); margin: var(--s-5) 2px var(--s-3); flex-wrap: wrap; }
.section-title:first-child { margin-top: 0; }
.section-note { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-muted); }

/* ---------- Live-Streifen ---------- */
.live-strip { background: color-mix(in srgb, var(--live) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--live) 30%, var(--border)); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); }
.live-hd { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-black); color: var(--live); text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-sm); margin-bottom: var(--s-2); }
.live-cards { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s-2) var(--s-3); }
.lc.mine { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.lc-meta { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.lc-row { display: flex; align-items: center; gap: var(--s-2); margin-top: 3px; }
.lc-tm { flex: 1; font-weight: var(--fw-bold); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-tm:last-child { text-align: right; }
.lc-tm.w { color: var(--ok); }
.lc-sc { font-weight: var(--fw-black); font-variant-numeric: tabular-nums; color: var(--live); flex: none; }

/* ---------- Tabellen ---------- */
.std-card { margin-bottom: var(--s-4); }
.std-wrap { overflow-x: auto; }
.std { width: 100%; border-collapse: collapse; }
.std th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: var(--fw-bold); text-align: center; padding: var(--s-2) var(--s-2); }
.std th.tm { text-align: left; }
.std td { padding: var(--s-2) var(--s-2); text-align: center; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; font-weight: var(--fw-med); }
.std td.tm { text-align: left; }
.std td.pts { font-weight: var(--fw-black); color: var(--text); }
.std tr[data-pick] { cursor: pointer; }
.std tbody tr:hover { background: var(--surface-2); }
.std .rk { width: 34px; }
.std .rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); font-weight: var(--fw-bold); font-size: var(--fs-xs); }
.std .tm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.std .tlogo { height: 26px; width: 26px; object-fit: contain; flex: none; }
.std .tnm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.std .medal { font-size: 20px; line-height: 1; }
/* Tabellenfuehrer: bewusst GOLD (Medaillen-Semantik, passt zum 🥇 in .medal) - dadurch
   unterscheidet sich der Spitzenreiter jetzt klar von "mein Verein" (blau) statt wie
   frueher fast gleich auszusehen. */
.std tr.top.r1 { background: color-mix(in srgb, var(--gold-500) 12%, transparent); }
.std tr.top .tnm { font-weight: var(--fw-bold); }
.std tr.mine { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.std tr.mine .tnm { color: var(--brand); font-weight: var(--fw-bold); }
.std .mine-star { color: var(--accent); width: 15px; height: 15px; }
.std .tie { color: var(--warn-ink); font-weight: var(--fw-black); }

/* ---------- Spiel-Karten ---------- */
.match-list { display: grid; gap: var(--s-2); margin-bottom: var(--s-3); }
.match { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s-3) var(--s-4); box-shadow: var(--sh-1); }
.match.mine { border-color: var(--border); box-shadow: inset 3px 0 0 var(--accent), var(--sh-1); }
/* Live-Zustand als linke Akzent-Kante statt kompletter Rahmenfaerbung - ruhiger,
   gleiche Sprache wie ".mine" (08/2026-Redesign). */
.match.live { border-color: var(--border); box-shadow: inset 3px 0 0 var(--live), var(--sh-1); }
.match.live.mine { box-shadow: inset 3px 0 0 var(--live), var(--sh-1); } /* live gewinnt vor "mein Verein" */
.m-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3); }
.m-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: var(--fw-bold); }
.m-team:last-child { flex-direction: row-reverse; text-align: right; }
.m-team .tlogo { height: 30px; width: 30px; object-fit: contain; flex: none; }
.m-team .tnm { overflow: hidden; text-overflow: ellipsis; }
.m-team.unres { color: var(--text-muted); font-style: italic; font-weight: var(--fw-med); }
.m-team.win .tnm { color: var(--ok); }
.m-team.mine .tnm { color: var(--brand); }
.winmark { color: var(--ok); width: 16px; height: 16px; flex: none; }
.m-time { text-align: center; font-weight: var(--fw-black); font-size: var(--fs-lg); color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1; }
.m-time small { display: block; font-size: 10px; color: var(--text-muted); font-weight: var(--fw-bold); margin-top: 2px; }
.m-score { text-align: center; font-weight: var(--fw-black); font-size: var(--fs-2xl); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.m-score.is-live { color: var(--live); }
.m-score .seven { display: block; font-size: 11px; color: var(--text-muted); font-weight: var(--fw-bold); margin-top: 2px; }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-3); }
.chip-live { background: color-mix(in srgb, var(--live) 15%, transparent); color: var(--live); }

/* K.o.-Runden */
.ko-round { margin-bottom: var(--s-4); }
.ko-round-title { font-weight: var(--fw-bold); color: var(--text-soft); margin: 0 2px var(--s-2); }

/* Ehrung */
.award { margin-top: var(--s-5); }
.award-in { display: flex; align-items: center; gap: var(--s-4); background: var(--header-grad); color: #fff; padding: var(--s-4) var(--s-5); }
/* Ehrungs-Karte liegt auf dunklem Navy-Verlauf -> HELLES Gold (gold-300), nicht der
   dunkle Akzent, sonst kein Kontrast. */
.award-ic { width: 34px; height: 34px; color: var(--gold-300); flex: none; }
.award-t { font-size: var(--fs-xs); font-weight: var(--fw-black); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-300); }
.award-x { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-top: 2px; }

/* Regeln (Markdown) */
.rules-md { line-height: 1.65; }
.rules-md h3, .rules-md h4, .rules-md h5 { color: var(--brand); margin: var(--s-4) 0 var(--s-2); }
.rules-md h3:first-child { margin-top: 0; }
.rules-md p { margin: 0 0 var(--s-3); }
.rules-md ul, .rules-md ol { margin: 0 0 var(--s-3); padding-left: 1.4em; }
.rules-md li { margin: 3px 0; }
.rules-md code { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; font-family: var(--font-mono); font-size: .9em; }
.rules-md hr { border: none; border-top: 1px solid var(--border); margin: var(--s-4) 0; }
.rules-md a { color: var(--brand); font-weight: var(--fw-bold); }

/* ---------- Mein Verein ---------- */
.myteam-head { margin-bottom: var(--s-4); }
.myteam-row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.myteam-row h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.mt-star { color: var(--accent); }
.myteam-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--s-2); }
.pick-search { position: relative; margin-bottom: var(--s-3); }
.pick-search .input { padding-left: 40px; }
.search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.pick-list { display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: none; border-top: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-weight: var(--fw-bold); cursor: pointer; text-align: left; width: 100%; }
.pick-row:first-child { border-top: none; }
.pick-row:hover { background: var(--surface-2); }
.pick-ic { color: var(--text-muted); flex: none; }
.pick-go { margin-left: auto; color: var(--text-muted); flex: none; }

/* ---------- Anmelde-Banner ---------- */
.reg-banner { display: flex; align-items: center; gap: var(--s-2); background: var(--header-grad); color: #fff; border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); font-weight: var(--fw-bold); box-shadow: var(--sh-1); text-decoration: none; }
.reg-banner:hover { text-decoration: none; box-shadow: var(--sh-2); }
.reg-banner span { flex: 1; }
.reg-banner .ic { color: var(--gold-300); } /* auf dunklem Banner -> helles Gold */

/* ---------- Favoriten-Stern + Toast ---------- */
.fav-star { background: none; border: none; padding: 10px; margin: -8px; cursor: pointer; color: var(--text-muted); display: inline-flex; flex: none; border-radius: var(--r-full); -webkit-tap-highlight-color: transparent; }
.fav-star .ic { width: 22px; height: 22px; }
.fav-star:active { transform: scale(.9); }
/* Stern folgt dem Akzent (blau): alles, was er markiert - .match.mine, .std tr.mine,
   .ft-card - ist ebenfalls blau. Ein goldener Stern auf blauen Markierungen waere
   inkonsistent. */
.fav-star:hover { color: var(--accent); }
.fav-star.on, .fav-star.half { color: var(--accent); }
.fav-star.on .ic { fill: var(--accent); }
.fav-star.half .ic { fill: color-mix(in srgb, var(--accent) 45%, transparent); }
.std .fav-star { margin-left: auto; }
.pub-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(10px); background: var(--navy-700); color: #fff; padding: 10px 18px; border-radius: var(--r-full); font-weight: var(--fw-bold); font-size: var(--fs-sm); box-shadow: var(--sh-3); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center; }
.pub-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 641px) { .pub-toast { bottom: 24px; } }

/* ---------- Vereins-Picker (gruppiert) ---------- */
.pick-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.pick-name small { font-weight: 600; font-size: var(--fs-xs); color: var(--text-muted); }
.pick-cats { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); white-space: nowrap; flex: none; }
.pick-club-hd { background: var(--surface-2); }
.pick-sub { padding-left: var(--s-6); }
.pick-done { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }

/* ---------- Favoriten-Team-Blöcke ---------- */
.ft-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: var(--s-4); }
.ft-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); box-shadow: var(--sh-1); }
.ft-hd { display: flex; align-items: center; gap: var(--s-2); }
.ft-name { font-weight: var(--fw-black); font-size: var(--fs-lg); color: var(--brand); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ft-rankline { display: flex; align-items: center; gap: var(--s-2); margin: 4px 0 var(--s-2); font-size: var(--fs-sm); flex-wrap: wrap; }
.ft-rank { font-weight: var(--fw-black); color: var(--text); }
.ft-body { display: flex; flex-direction: column; gap: 4px; }
.ft-line { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); }
.ft-line b { font-variant-numeric: tabular-nums; }
.ft-line.is-live { color: var(--live); }
.ft-ic { width: 15px; height: 15px; flex: none; color: var(--text-muted); }
.ft-line.is-live .ft-ic { color: var(--live); }

/* ---------- Übersicht (Start-Reiter) ---------- */
.ov-status { margin-bottom: var(--s-4); }
.ov-status-main { font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--text); }
.ov-status-sub { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-bold); margin-top: 2px; }
.ov-fav-cta { display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); cursor: pointer; font: inherit; color: var(--text); margin-bottom: var(--s-4); }
.ov-cta-ic { width: 28px; height: 28px; color: var(--accent); flex: none; }
.ov-cta-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ov-cta-tx b { font-weight: var(--fw-black); }
.ov-cta-tx small { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; }
.ov-halls { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.ov-hall { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-full); padding: 5px 12px; font: inherit; font-weight: var(--fw-bold); font-size: var(--fs-xs); color: var(--text-soft); cursor: pointer; }
.ov-hall.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.ov-cats { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ov-cat { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--sh-1); transition: border-color var(--t), box-shadow var(--t); }
.ov-cat:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.ov-cat-hd { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.ov-cat-name { font-weight: var(--fw-black); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ov-bar { height: 7px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.ov-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy-400), var(--brand)); transition: width .4s; }
.ov-cat-meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); margin-top: 6px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-bold); }
.ov-lead { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

/* ---------- Fuß ---------- */
.pub-foot { text-align: center; padding: var(--s-5) var(--s-4); color: var(--text-muted); font-size: var(--fs-sm); }
.pub-foot a { color: var(--text-soft); font-weight: var(--fw-bold); }
.pub-foot-brand { margin-top: 6px; font-size: var(--fs-xs); }

/* ---------- Mobil: Nav als Bottom-Bar ---------- */
@media (max-width: 640px) {
  .pub-head-in { padding-block: var(--s-2); }
  .pub-logo { height: 38px; }
  .pub-name { font-size: var(--fs-lg); }
  .std .hide-sm { display: none; }
  .std th, .std td { padding: var(--s-2) 5px; }
  .m-score { font-size: var(--fs-xl); }
  .pub-main { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .pub-nav {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-bottom: none; border-top: 1px solid var(--border);
    padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 16px var(--shadow-color); z-index: 40;
  }
  .nav-chip { font-size: var(--fs-xs); padding: .45rem .7rem; }
  .nav-chip small { display: none; }
  .nc-name { font-size: 11px; }
}
@media (min-width: 641px) {
  .m-team .tnm, .lc-tm { font-size: var(--fs-lg); }
}
