/* ═══ StatVenue beta 3 — JEDINÉ místo pro paletu a logo (VDW-4) ═══
   Antracit + zlatá. Zisk/výhra = zelená, ztráta = červená. */
:root, body, body.livesport-theme {
  --sv-bg: #110F0C;            /* antracit – pozadí stránky */
  --sv-bg-elevated: #17140F;   /* topbar, spodní lišta */
  --sv-card: #1D1A14;          /* karty */
  --sv-card-hover: #26211A;
  --sv-border: #3A2F1C;
  --sv-border-soft: rgba(240,205,130,0.11);
  --sv-text: #FBF6EA;          /* zápasy, statistiky */
  --sv-text-muted: #BDB19B;
  --sv-text-dim: #948873;
  --sv-gold: #D4AF37;          /* logo, hlavní tlačítka, vybraná záložka */
  --sv-gold-hover: #E2C158;
  --sv-gold-light: #F0D27A;
  --sv-gold-soft: rgba(212,175,55,0.12);
  --sv-gold-border: rgba(212,175,55,0.32);
  --sv-on-gold: #111111;
  --sv-green: #22C55E;  --sv-green-light: #4ADE80;  --sv-green-soft: rgba(34,197,94,0.14);
  --sv-red: #EF4444;    --sv-red-light: #F87171;    --sv-red-soft: rgba(239,68,68,0.14);

  /* napojení na stávající tokeny webu */
  --gg-brand-primary: var(--sv-gold);
  --gg-brand-primary-hover: var(--sv-gold-hover);
  --gg-brand-primary-light: var(--sv-gold-light);
  --gg-brand-primary-soft: var(--sv-gold-soft);
  --gg-brand-primary-border: var(--sv-gold-border);
  --gg-brand-primary-glow: rgba(212,175,55,0.35);
  --gg-brand-primary-on: var(--sv-on-gold);
  --gg-brand-secondary: var(--sv-bg);
  --gg-brand-secondary-elevated: var(--sv-bg-elevated);
  --gg-brand-secondary-surface: var(--sv-card);
  --bg-card: var(--sv-card);
  --bg-hover: var(--sv-card-hover);
  --gg-text: var(--sv-text);
  --gg-muted: var(--sv-text-muted);
  --text-primary: var(--sv-text);
  --text-muted: var(--sv-text-muted);
  --text-dim: var(--sv-text-dim);
}
html, body { background-color: var(--sv-bg); }

/* ── LOGO ───────────────────────────────────────────────
   Textové logo (dočasné). Po dodání souboru loga stačí v sv-brand.js
   nastavit LOGO_SRC – logo se vymění všude (topbar, footer). */
.topbar-mobile-brand > span, .gg-secondary-footer-logo > span, .site-footer-brand .site-footer-logo-mark,
.topbar-mobile-brand > span b, .gg-secondary-footer-logo > span b, .site-footer-brand b {
  color: var(--sv-gold) !important;
  background: none !important; -webkit-text-fill-color: currentColor;
}
.topbar-mobile-brand > span b, .gg-secondary-footer-logo > span b, .site-footer-brand b { color: var(--sv-gold-light) !important; }
img.sv-logo-image { display: block; height: 34px; width: auto; }
body .site-topbar img.sv-logo-image, body .site-topbar .topbar-mobile-brand img { height: 36px !important; width: 150px !important; min-width: 150px !important; max-width: 150px !important; object-fit: contain !important; object-position: left center !important; }

/* ── Zisk / ztráta: zelená a červená (ne zlatá) ── */
body[data-surface="results"] #summary-profit:not(.negative) { color: var(--sv-green-light) !important; }
body[data-surface="results"] #summary-profit.negative { color: var(--sv-red-light) !important; }
strong.is-pos, span.is-pos, .is-positive > strong { color: var(--sv-green-light) !important; }
strong.is-neg, span.is-neg { color: var(--sv-red-light) !important; }

/* ── Graf zisku (results): zelená ── */
body[data-surface="results"] .performance-chart .chart-end-group { color: var(--sv-green-light); }
body[data-surface="results"] .performance-chart.negative .chart-end-group { color: var(--sv-red-light); }
body[data-surface="results"] .performance-chart .chart-zone-profit { fill: rgba(34,197,94,.03); }
body[data-surface="results"] .performance-chart .chart-line-positive { filter: drop-shadow(0 2px 7px rgba(34,197,94,.22)); }

/* ── Volitelná ČERNĚJŠÍ varianta (výchozí VYPNUTÁ) ─────────────────────────
   Zapnutí: třída html.sv-black. Náhled: přidej ?theme=black (uloží se do sessionStorage), vypnutí ?theme=default.
   Jedno místo hodnot: tento blok. Povrchy stránek jdou přes --sv-bg / --sv-bg-2 / --sv-surface-1 / --sv-surface-2. */
html.sv-black, html.sv-black body, html.sv-black body.livesport-theme {
  --sv-bg: #000000;  --sv-bg-2: #0A0A0A;  --sv-bg-elevated: #0A0A0A;
  --sv-surface-1: #101010;  --sv-surface-2: #141414;
  --sv-card: #141414;  --sv-card-hover: #1C1C1C;
  --sv-border: #262626;  --sv-border-soft: rgba(255,255,255,0.08);
  --gg-brand-secondary: #000000;  --gg-brand-secondary-elevated: #0A0A0A;  --gg-brand-secondary-surface: #141414;
}
html.sv-black, html.sv-black body { background-color: #000000; }

/* ── Logo: vodorovné logo (ikona + nápis) z LOGO_BASE v sv-brand.js. Skryj textové logo dokud se nevymění (bez probliknutí). ── */
/* logo je v HTML (žádný visibility:hidden — ten způsoboval bliknutí hlavičky) */
body .gg-secondary-footer-logo[data-sv-logo], .site-footer-brand > a[data-sv-logo] {
  display: inline-flex !important; align-items: center; width: auto !important; max-width: none !important; gap: 0 !important; padding: 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important; flex: 0 0 auto;
}
body .topbar-mobile-brand[data-sv-logo] {
  display: flex !important; align-items: center; gap: 0 !important; padding: 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important;
  width: 150px !important; min-width: 150px !important; max-width: 150px !important; flex: 0 0 150px !important;
  height: 36px !important; min-height: 36px !important; max-height: 36px !important;
}
body .topbar-mobile-brand[data-sv-logo] picture, body .gg-secondary-footer-logo[data-sv-logo] picture, .site-footer-brand > a[data-sv-logo] picture { display: block; line-height: 0; }
body .topbar-mobile-brand[data-sv-logo] { width: 150px !important; min-width: 150px !important; max-width: 150px !important; flex: 0 0 150px !important; }
body .topbar-mobile-brand[data-sv-logo] img.sv-logo-image { height: 36px !important; min-height: 36px !important; max-height: 36px !important; width: 150px !important; min-width: 150px !important; max-width: 150px !important; object-fit: contain !important; object-position: left center !important; border-radius: 0 !important; }
body .gg-secondary-footer-logo[data-sv-logo] img.sv-logo-image, .site-footer-brand > a[data-sv-logo] img.sv-logo-image { height: 40px !important; width: auto !important; max-width: none !important; border-radius: 0 !important; }
@media (max-width: 380px) { body .topbar-mobile-brand[data-sv-logo] img.sv-logo-image { height: 36px !important; } }
/* logo bez rámečku/stínu (staré CSS dávalo ikoně rámeček) */
html body img.sv-logo-image, html body .sv-logo-image { box-shadow: none !important; border: 0 !important; background: none !important; outline: 0 !important; border-radius: 0 !important; }

/* ═══ Paleta a záře (feedback 29.11): teplé pozadí, zlatá JEN na CTA / aktivní nav / logo / názvy H1 ═══ */
/* Záře na html+body s vyšší specificitou — gg-layout-shell ji dříve vypínal (background-image:none), proto Predictions působily ploše/šedě. */
html, html:has(body.gg-layout-shell),
html body, html body.livesport-theme, html body.gg-layout-shell, html body.gg-layout-shell.livesport-theme,
html body.gg-public-page, html body.gg-landing-page {
  background-color: var(--sv-bg) !important;
  background-image: none !important;
}
/* jank3 (30.11): záře dřív byla background-attachment:fixed na html+body -> Chrome při každém scroll framu
   přemaloval celý viewport (sekání). Stejná záře je teď na pevné vrstvě html::before (kompozitor ji jen posouvá).
   Body je průhledné, aby záře prosvítala; barva pozadí je na html (stejná --sv-bg). */
html body, html body.livesport-theme, html body.gg-layout-shell, html body.gg-layout-shell.livesport-theme,
html body.gg-public-page, html body.gg-landing-page {
  background-color: transparent !important;
}
html::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh; height: 100lvh;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  background-color: transparent;
  background-image:
    radial-gradient(1200px 560px at 50% -160px, rgba(212,175,55,0.13), rgba(212,175,55,0) 72%),
    radial-gradient(760px 560px at 105% 22%, rgba(212,175,55,0.05), rgba(212,175,55,0) 70%),
    radial-gradient(700px 520px at -8% 60%, rgba(180,120,40,0.045), rgba(180,120,40,0) 70%);
  background-repeat: no-repeat;
}
html.sv-black::before {
  background-image: radial-gradient(1200px 420px at 50% -160px, rgba(212,175,55,0.08), rgba(212,175,55,0) 72%);
}
html.sv-black, html.sv-black body, html.sv-black body.livesport-theme { background-image: none !important; }
.gg-landing-hero { background-image: radial-gradient(820px 520px at 72% 46%, rgba(212,175,55,0.17), rgba(212,175,55,0) 70%), radial-gradient(520px 380px at 12% 30%, rgba(212,175,55,0.07), rgba(212,175,55,0) 70%); }

/* topbar: jemná teplá linka, ne zlatý rámeček; search zlato jen v :focus-within */
html body .site-topbar { border-bottom: 1px solid rgba(240,205,130,0.10) !important; background-color: rgba(23,20,15,0.96) !important; }
html body .site-topbar .topbar-search-form { border-color: rgba(255,255,255,0.10) !important; box-shadow: none !important; }
html body .site-topbar .topbar-search-form:focus-within { border-color: rgba(212,175,55,0.55) !important; box-shadow: 0 0 0 3px rgba(212,175,55,0.12); }

/* karty: teplý neutrální okraj, bez zlatého „klikni na mě“ */
.pick-card, .summary-card, .gg-beta-pick-card, .performance-panel, .gg-live-pick, .research-note, .gg-product-frame, .model-results-filter,
.predictions-board, .gg-mat-sidebar, .doc-article, .gg-record-shell, .gg-simpromo, .gg-sim-card, .gg-fav-signin-gate__perk, .gg-telegram-card,
.nt-laliga-metric, .nt-laliga-trend-card, .nt-laliga-overview-panel, .nt-next-match {
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.summary-card, .performance-panel, .research-note, .gg-record-shell, .gg-mat-sidebar, .predictions-board, .gg-simpromo, .doc-article {
  background-image: none;
}
.pick-card:hover, .gg-beta-pick-card:hover, .nt-next-match:hover { box-shadow: 0 14px 34px rgba(0,0,0,0.34); }

/* H1 krémová (názvy), H2 stejná rodina — ne zlatá */
html body main h1, html body .gg-landing-hero h1 { color: #FBF1D3; text-shadow: 0 0 36px rgba(212,175,55,0.16); }
html body main h2:not([class*="card"]):not([class*="modal"]) { color: #F7EFD8 !important; }

/* zlatá = aktivní nav + primární vyplněné CTA */
html body .site-topbar .topbar-nav > a.active, html body .site-topbar .topbar-nav > a[aria-current="page"] { color: var(--sv-gold-light) !important; }
html body .site-topbar .topbar-nav > a.active span, html body .site-topbar .topbar-nav > a[aria-current="page"] span { color: var(--sv-gold-light) !important; }
html body .bottom-nav a.active, html body .bottom-nav a[aria-current="page"] { color: var(--sv-gold) !important; }

/* sekundární odkazy/tlačítka: tlumené, zlato jen hover */
html body .card-actions a, html body .card-actions button,
html body .pick-card .card-actions a, html body .pick-card .card-actions button,
html body #refresh, html body .feed-footer button, html body .research-note a {
  color: var(--sv-text-muted) !important;
}
html body .card-actions a:hover, html body .card-actions button:hover,
html body #refresh:hover, html body .feed-footer button:hover, html body .research-note a:hover {
  color: var(--sv-gold) !important;
}

/* neaktivní market badge „Model building“: neutrální, ne zlatý */
html body .market-tabs .market-building em,
html body button.market-building em {
  color: var(--sv-text-dim) !important;
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.10) !important;
}

html body main hr, html body .gg-section-rule { border-color: rgba(240,205,130,0.12); }
html body ::selection { background: rgba(212,175,55,0.35); color: #fff; }
html body { scrollbar-color: #5a4a22 #17140F; }

/* Favorites pryč z UX (soubory na disku zůstávají) */
html body .nav-favorites,
html body .gg-topbar-favorites,
html body a[href="favorites.html"],
html body a[href="/favorites.html"],
html body a[href$="/favorites.html"],
html body a[href$="favorites.html"] { display: none !important; }

/* ═══ pevný slot loga — nikdy neseskočit při chybě načtení ═══ */
@font-face{font-family:"Plus Jakarta Sans";src:url("/assets/fonts/plus-jakarta-sans-latin-400-800.woff2") format("woff2");font-style:normal;font-weight:400 800;font-display:optional}
.league-logo-badge,
.gg-team-logo-wrap,
.gg-team-logo-sm-wrap,
.gg-team-logo-strip-wrap,
.ls-team-logo,
.gg-v2-team-logo,
.tm-crest,
.team-avatar,
.gg-mat-league-logo,
span[class*="team-logo"] {
  position: relative;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}
.league-logo-badge,
.gg-team-logo-wrap,
.ls-team-logo,
.gg-v2-team-logo,
.tm-crest,
.team-avatar {
  aspect-ratio: 1 / 1;
}
.league-logo-badge > img,
.gg-team-logo-wrap > img,
.ls-team-logo > img,
.gg-v2-team-logo > img,
.tm-crest > img,
.team-avatar > img,
.gg-team-logo,
.league-logo-badge-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sv-logo-fallback,
.gg-team-initials,
.league-logo-badge-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #c4b8a4;
  pointer-events: none;
}
.is-fallback > .sv-logo-fallback,
.is-fallback > .gg-team-initials,
.is-fallback > .league-logo-badge-fallback,
.gg-team-initials[style*="display: flex"],
.gg-team-initials[style*="display:flex"] {
  display: flex !important;
}
/* řádky zápasů: ať výška neseskočí, když se loga do/nenačtou */
.gg-mat-league-block,
.gg-mat-row,
.gg-match-row,
[data-match-id] {
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}
