:root {
  --bg: #05080c;
  --surface: #0c131b;
  --surface-2: #142029;
  --ink: #f1f8fc;
  --muted: #9aaebc;
  --ice: #7fe3ff;
  --ice-ink: #031018;

  --display: 'Unbounded', 'Arial Black', sans-serif;
  --text: 'Manrope', system-ui, sans-serif;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --step-lead: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  --step-head: clamp(2.5rem, 1.4rem + 4.6vw, 6rem);
  --step-huge: clamp(4rem, 1rem + 9vw, 10rem);

  --m: clamp(16px, 2.6vw, 40px);
  --gap: clamp(112px, 12vw, 200px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 var(--step-body)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 900; }
h2 {
  font: 900 var(--step-head)/1.12 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
:focus-visible { outline: 3px solid var(--ice); outline-offset: 3px; }
::selection { background: var(--ice); color: var(--ice-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px;
  background: var(--ice); color: var(--ice-ink);
  font: 700 1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  contain: paint;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  padding: 0 var(--m) clamp(24px, 3vw, 40px);
  overflow: hidden;
  isolation: isolate;
}
.wind { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.court {
  position: absolute; z-index: -2;
  width: min(96vw, 1400px); right: -14vw; top: -6vh;
  fill: none; stroke: var(--ice); stroke-width: 2.5; opacity: .22;
  transform: rotate(-12deg);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; }
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; font: 500 1.25rem/1 var(--display); color: var(--muted); }
.lockup img { height: 34px; width: auto; }
.lockup img + span + img { height: 40px; }
.topbar-links { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.topbar-links a { text-decoration: none; font-weight: 700; transition: color .2s; }
.topbar-links a:hover { color: var(--ice); }
.menu-btn { display: none; }

/* Mazākos ekrānos saites nespiežam vienā rindā: poga atver pilnekrāna izvēlni. */
@media (max-width: 1100px) {
  .topbar { position: relative; z-index: 40; }
  .menu-btn {
    all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 12px;
    min-height: 44px; padding: 0 4px 0 16px; position: relative; z-index: 2;
    font: 700 .9375rem/1 var(--display); text-transform: uppercase;
  }
  .menu-btn:focus-visible { outline: 3px solid var(--ice); outline-offset: 3px; }
  .menu-icon, .menu-icon::before { display: block; width: 26px; height: 2px; background: currentColor; transition: transform .3s var(--ease); }
  .menu-icon { position: relative; transform: translateY(-4px); }
  .menu-icon::before { content: ""; position: absolute; top: 8px; }
  .menu-open .menu-icon { transform: translateY(0) rotate(45deg); }
  .menu-open .menu-icon::before { transform: translateY(-8px) rotate(-90deg); }
  .topbar-links {
    position: fixed; inset: 0; z-index: 1;
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    padding: 96px var(--m) 48px; background: var(--bg);
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .topbar-links a { font: 900 clamp(2rem, 1rem + 6vw, 3.75rem)/1.15 var(--display); text-transform: uppercase; letter-spacing: -0.02em; padding: 6px 0; }
  .topbar-links .live-badge { font-size: clamp(1.25rem, 1rem + 2vw, 2rem); margin-bottom: 12px; }
  .menu-open .topbar-links { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .menu-open .lockup { position: relative; z-index: 2; }
  body.menu-lock { overflow: hidden; }
}

.hero-body { align-self: end; position: relative; }
.title {
  font: 900 calc((100vw - 2 * var(--m)) / 8.4)/1.14 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
}
.title span { display: block; width: max-content; }
.title .t2 { color: var(--ice); }
.hero-row {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) auto; gap: 24px 40px; align-items: end;
}
.hero-sentence { max-width: 42ch; }
.hero-venue { font: 700 var(--step-lead)/1.1 var(--display); text-transform: uppercase; letter-spacing: -0.01em; }
.hero-date { margin-top: 6px; color: var(--ice); font-weight: 700; }

/* ---------- Skrejošā josla ---------- */
.ticker { background: var(--ice); color: var(--ice-ink); overflow: hidden; padding: 18px 0; contain: paint; }
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker span {
  font: 900 clamp(1.25rem, .9rem + 1.4vw, 2.25rem)/1 var(--display); text-transform: uppercase;
  padding-right: 1.4em; white-space: nowrap;
}
.ticker span::after { content: "✱"; margin-left: 1.4em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Formāts ---------- */
.format { padding: var(--gap) var(--m) 0; }
.format h2 { margin-bottom: clamp(40px, 5vw, 72px); }
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat {
  background: var(--surface); padding: clamp(24px, 2.6vw, 40px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: clamp(280px, 30vw, 440px);
  transition: transform .3s var(--ease), background-color .3s;
}
.stat:hover { transform: translateY(-6px); background: var(--surface-2); }
.stat dt { font: 900 var(--step-huge)/.9 var(--display); letter-spacing: -0.05em; white-space: nowrap; }
.stat dd { margin: 0; max-width: 34ch; }
.stat dd strong { display: block; font: 700 var(--step-lead)/1.1 var(--display); text-transform: uppercase; margin-bottom: 8px; }
.stat-ice { background: var(--ice); color: var(--ice-ink); }
.stat-ice:hover { background: var(--ink); }

/* ---------- Īpašie noteikumi ---------- */
.rules { padding: var(--gap) var(--m) 0; }
.rules h2 { margin-bottom: clamp(32px, 4vw, 56px); }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rule-list li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 40px; align-items: baseline;
  background: var(--surface); padding: clamp(24px, 3vw, 44px) clamp(20px, 2.6vw, 40px);
  transition: background-color .25s, transform .3s var(--ease);
}
.rule-list li:hover { background: var(--surface-2); transform: translateX(8px); }
.rule-list h3 { font: 900 clamp(1.5rem, 1rem + 2vw, 3rem)/1.12 var(--display); text-transform: uppercase; letter-spacing: -0.02em; }
.rule-list li:nth-child(odd) h3 { color: var(--ice); }
.rule-list p { font-size: var(--step-body); max-width: 52ch; }

/* ---------- Power-upi ---------- */
.powerups {
  margin-top: var(--gap);
  padding: clamp(80px, 9vw, 140px) var(--m);
  background: var(--ice); color: var(--ice-ink);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 96px);
}
.pu-head { display: grid; gap: 28px; align-content: start; }
.pu-head p { max-width: 38ch; }
.loop { position: relative; width: clamp(160px, 18vw, 260px); aspect-ratio: 1; margin-top: 12px; }
.loop svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loop circle { fill: none; stroke-width: 10; }
.loop-track { stroke: rgba(3, 16, 24, .15); }
.loop-run { stroke: var(--ice-ink); stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.loop-time { position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(2.25rem, 1.6rem + 2.4vw, 3.75rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.pu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.pu-list li { background: var(--ice-ink); color: var(--ink); }
.pu-list button {
  width: 100%; background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 24px;
  font: 700 clamp(1.25rem, .9rem + 1.3vw, 2.125rem)/1.1 var(--display); text-transform: uppercase; letter-spacing: -0.01em;
  transition: color .2s;
}
.pu-list button:hover { color: var(--ice); }
.pu-list button b { font-weight: 500; transition: transform .3s var(--ease); }
.pu-list button[aria-expanded="true"] { color: var(--ice); }
.pu-list button[aria-expanded="true"] b { transform: rotate(45deg); }
.pu-list p { padding: 0 24px 24px; max-width: 46ch; }
.pu-list button[aria-expanded="false"] + p { display: none; }

/* ---------- Tiešraide ---------- */
.stream { padding: var(--gap) var(--m) 0; }
.stream-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.stream-head h2 { display: flex; align-items: center; gap: .35em; }
.stream-head p { max-width: 40ch; color: var(--muted); }
.live-dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: #ff4d5e; flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
.stream-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; }
.stream-grid.with-vote { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.stream-player { aspect-ratio: 16 / 9; background: var(--surface); position: relative; overflow: hidden; }
.stream-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.stream-wait-big { font: 900 var(--step-head)/1.1 var(--display); text-transform: uppercase; letter-spacing: -0.03em; color: var(--ice); }
.stream-side { display: grid; gap: 8px; }
.side-block { background: var(--surface); padding: clamp(18px, 2vw, 28px); display: grid; gap: 14px; }
.side-block h3 { font: 900 1.0625rem/1.1 var(--display); text-transform: uppercase; color: var(--muted); }
.side-now { background: var(--ice); color: var(--ice-ink); }
.side-now h3 { color: var(--ice-ink); }
.now-game { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.now-game + .now-game { margin-top: 12px; }
.now-team { font: 700 clamp(.875rem, .7rem + .5vw, 1.125rem)/1.15 var(--display); text-transform: uppercase; }
.now-team.away { text-align: right; }
.now-score { font: 900 clamp(2rem, 1.4rem + 2vw, 3.25rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.now-meta { grid-column: 1 / -1; font-weight: 700; font-size: var(--step-small); }
.side-empty { font-weight: 700; }
.side-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-next li { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.side-next b { color: var(--ice); font-variant-numeric: tabular-nums; }
.standings.mini td, .standings.mini th { padding: 8px 4px; }

.live-badge[hidden] { display: none; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; color: #ff8a95; }
.live-badge .live-dot { width: 10px; height: 10px; }

/* Tiešraides izkārtojums: hero saraujas, straume nāk uzreiz augšā. */
.is-live .hero { min-height: 0; padding-bottom: clamp(20px, 2.4vw, 32px); }
.is-live .hero-body { align-self: start; }
.is-live .title { font-size: calc((100vw - 2 * var(--m)) / 15.4); line-height: 1.2; }
.is-live .title span { display: inline; width: auto; }
.is-live .hero-row { display: none; }
.is-live .court { opacity: .1; }
.is-live .stream { padding-top: clamp(32px, 4vw, 56px); }
.is-live .stream-head h2 { font-size: clamp(1.75rem, 1rem + 2.4vw, 3rem); }

/* ---------- Komandas ---------- */
.teams { padding: var(--gap) var(--m) 0; }
.teams-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.teams-head p { max-width: 30ch; color: var(--muted); }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.team {
  --c: var(--ice);
  position: relative; overflow: hidden;
  background: var(--surface); min-height: clamp(220px, 22vw, 320px);
  padding: clamp(20px, 2.2vw, 32px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  transition: transform .3s var(--ease);
}
.team:hover { transform: translateY(-6px); }
.team h3 { font: 900 clamp(1.5rem, 1rem + 1.6vw, 2.5rem)/1.05 var(--display); text-transform: uppercase; letter-spacing: -0.02em; }
.team-q { font: 900 clamp(5rem, 3rem + 6vw, 9rem)/.8 var(--display); color: var(--ice); opacity: .85; }
.team-empty h3 { color: var(--muted); font-size: clamp(1.125rem, .9rem + .8vw, 1.5rem); }
.team-real { background: var(--c); color: var(--ice-ink); }
.team-real.dark-c { color: var(--ink); }
.team-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.team-top img { width: 72px; height: 72px; object-fit: contain; }
.team-city { font-weight: 700; }
.team-players { font-size: var(--step-small); font-weight: 700; }

/* ---------- Spēles ---------- */
.games {
  padding: var(--gap) var(--m) 0;
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px clamp(24px, 4vw, 64px); align-items: start;
}
.games-main { display: grid; gap: clamp(32px, 4vw, 56px); }
.scoreboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.game {
  background: var(--surface); padding: 20px clamp(16px, 2vw, 28px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px 20px; align-items: center;
}
.game-team { font: 700 clamp(1rem, .8rem + .7vw, 1.5rem)/1.15 var(--display); text-transform: uppercase; overflow-wrap: anywhere; hyphens: auto; }
.game-team.away { text-align: right; }
.game .score { font: 900 clamp(2.25rem, 1.6rem + 2.6vw, 4rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; }
.game-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: var(--step-small); color: var(--muted); font-weight: 700; }
.game-live { background: var(--ice); color: var(--ice-ink); }
.game-live .game-meta { color: var(--ice-ink); }
.won { color: var(--ice); }
.game-live .won { color: var(--ice-ink); text-decoration: underline; text-decoration-thickness: 3px; }
.game-empty { background: var(--surface); padding: clamp(24px, 3vw, 40px); max-width: none; font-size: var(--step-lead); line-height: 1.35; font-weight: 700; }
.games-side { background: var(--surface); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 16px; position: sticky; top: 24px; }
.games-side h3 { font: 900 var(--step-lead)/1 var(--display); text-transform: uppercase; }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings th, .standings td { padding: 12px 4px; text-align: left; border-bottom: 2px solid var(--surface-2); }
.standings th { font-size: var(--step-small); color: var(--muted); }
.standings .num { text-align: right; }
.standings tbody tr:first-child td { color: var(--ice); font-weight: 700; }

/* ---------- Vieta ---------- */
.venue { padding: var(--gap) var(--m) 0; }
.venue h2 { font-size: clamp(2.25rem, .8rem + 6vw, 7.5rem); max-width: 14ch; line-height: 1.14; }
.venue-row {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
}
.venue-addr, .countdown { background: var(--surface); padding: clamp(24px, 3vw, 40px); }
.venue-addr { font: 700 var(--step-lead)/1.35 var(--display); }
.venue-addr a { display: inline-block; margin-top: 16px; font: 700 var(--step-body)/1 var(--text); color: var(--ice); }
.countdown { background: var(--ice); color: var(--ice-ink); display: grid; gap: 12px; align-content: space-between; }
.cd-big { font: 900 var(--step-head)/1 var(--display); text-transform: uppercase; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cd-small { font-weight: 700; }
.venue-note { margin-top: 24px; max-width: 60ch; }

/* ---------- Partneri ---------- */
.partners { padding: var(--gap) var(--m); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px; }
.partner-block { background: var(--surface); padding: clamp(24px, 3vw, 44px); display: grid; gap: 36px; align-content: space-between; min-height: 260px; }
.partner-block h3 { font: 900 var(--step-lead)/1 var(--display); text-transform: uppercase; }
.logo-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 64px); }
.logo-row img { height: clamp(40px, 4.4vw, 68px); width: auto; transition: transform .3s var(--ease); }
.logo-row-big img { height: clamp(48px, 5.4vw, 84px); }
.logo-row li:hover img { transform: scale(1.06) rotate(-2deg); }

/* ---------- Kājene ---------- */
.footer { background: var(--ice); color: var(--ice-ink); padding: clamp(32px, 4vw, 56px) var(--m) 24px; display: grid; gap: clamp(64px, 10vw, 160px); }
.foot-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-weight: 700; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.foot-mark { font: 900 calc((100vw - 2 * var(--m)) / 12.75)/1.2 var(--display); text-transform: uppercase; letter-spacing: -0.035em; white-space: nowrap; }
.foot-legal { font-size: var(--step-small); font-weight: 700; }

/* ---------- Kustība ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .title span { opacity: 0; transform: translateX(6vw); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.js .title .t2 { transition-delay: .12s; }
.js .hero.ready .title span { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .title span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ticker-track, .live-dot { animation: none; }
}

/* ---------- Planšete un telefons ---------- */
@media (max-width: 960px) {
  .powerups, .partners, .venue-row, .rule-list li, .stream-grid, .stream-grid.with-vote { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .hero-row { grid-template-columns: 1fr 1fr; }
  .hero-row .btn { grid-column: 1 / -1; justify-self: start; }
  .games-side { position: static; }
  .court { width: 170vw; right: -60vw; top: 6vh; }
}
@media (max-width: 600px) {
  .lockup img { height: 26px; }
  .lockup img + span + img { height: 30px; }
  .hero-row { grid-template-columns: 1fr; }
  .hero-row .btn { justify-self: stretch; }
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 0; gap: 28px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .team { min-height: 170px; }
  .pu-list button { padding: 18px; }
  .pu-list p { padding: 0 18px 20px; }
}

/* ---------- Komandas lapa ---------- */
.team-page .page-bar { padding: 22px var(--m); }
.team-hero {
  --c: var(--ice);
  background: var(--c); color: var(--ice-ink);
  padding: clamp(48px, 7vw, 120px) var(--m) clamp(32px, 4vw, 56px);
  display: grid; gap: 20px;
}
.team-hero.dark-c { color: var(--ink); }
.team-hero h1 { font: 900 clamp(2rem, .5rem + 7vw, 9rem)/1.1 var(--display); text-transform: uppercase; letter-spacing: -0.035em; overflow-wrap: break-word; }
.team-hero-city { display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: var(--step-lead); }
.team-hero-city img { width: 72px; height: 72px; object-fit: contain; }
.team-record { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 12px 0 0; }
.team-record dt { font-weight: 700; font-size: var(--step-small); }
.team-record dd { margin: 0; font: 900 var(--step-head)/1 var(--display); }
.roster { padding: var(--gap) var(--m) 0; }
.roster h2, .team-games h2 { margin-bottom: clamp(28px, 3vw, 48px); }
.roster-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.player { background: var(--surface); padding: 12px 12px 24px; display: grid; gap: 6px; align-content: start; transition: transform .3s var(--ease); }
.player:hover { transform: translateY(-6px); }
.player-photo { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; }
.player-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-photo span { font: 900 clamp(3rem, 2rem + 4vw, 6rem)/1 var(--display); color: var(--ice); }
.player h3 { font: 900 clamp(1.25rem, .9rem + 1.2vw, 2rem)/1.15 var(--display); text-transform: uppercase; letter-spacing: -0.02em; padding: 0 8px; }
.player p { padding: 0 8px; color: var(--muted); font-weight: 700; }
.player-empty h3 { color: var(--muted); font-size: 1.125rem; }
.team-games { padding: var(--gap) var(--m) var(--gap); display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(24px, 4vw, 64px); align-items: start; }
.team-games .game-team a { color: inherit; }
.footer-small { min-height: 0; display: block; padding: 32px var(--m); }
.footer-small a { color: inherit; }
a.team { color: inherit; text-decoration: none; }
a.team:focus-visible { outline-offset: 4px; }
.team-avatars { display: flex; margin-top: 12px; }
.team-avatars img, .team-avatars span { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c); margin-right: -10px; background: var(--surface-2); display: grid; place-items: center; font: 900 .75rem/1 var(--display); color: var(--ink); }
.team-more { font-weight: 700; font-size: var(--step-small); margin-top: 12px; }
@media (max-width: 960px) {
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-games { grid-template-columns: 1fr; }
}

/* ---------- Balsojums ---------- */
.vote { background: var(--surface); padding: clamp(18px, 2vw, 28px); display: grid; gap: 14px; }
.vote h3 { font: 900 1.0625rem/1.1 var(--display); text-transform: uppercase; color: var(--muted); }
.vote-status { font-weight: 700; }
.vote-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vote-btn {
  position: relative; width: 100%; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--surface-2); color: var(--ink); border: 0; padding: 14px 16px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  font: 700 1rem/1.2 var(--display); text-transform: uppercase;
  transition: transform .15s var(--ease);
}
.vote-btn:hover:not([disabled]) { transform: translateX(4px); }
.vote-btn:active:not([disabled]) { transform: scale(.98); }
.vote-btn[disabled] { cursor: default; }
.vote-btn .bar { position: absolute; inset: 0 auto 0 0; background: rgba(127, 227, 255, .22); transform-origin: left; transition: width .6s var(--ease); }
.vote-btn > span, .vote-btn > b { position: relative; }
.vote-btn b { font-variant-numeric: tabular-nums; }
.vote-btn.mine { background: var(--ice); color: var(--ice-ink); }
.vote-btn.mine .bar { background: rgba(3, 16, 24, .15); }
.vote-active { background: var(--ice); color: var(--ice-ink); padding: 16px; display: grid; gap: 6px; }
.vote-active strong { font: 900 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.1 var(--display); text-transform: uppercase; }
.now-clock { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 900 1.25rem/1 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Spēļu sadaļa: grupas, izslēgšanas spēles, grafiks ---------- */
.games { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); padding: var(--gap) var(--m) 0; }
.games-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.games-head p { max-width: 44ch; color: var(--muted); }
.games h3 { font: 900 var(--step-lead)/1.1 var(--display); text-transform: uppercase; margin-bottom: 20px; }
.now-block { background: var(--ice); color: var(--ice-ink); padding: clamp(24px, 3vw, 44px); display: grid; gap: 16px; }
.now-block h3 { font-size: 1.0625rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.now-block h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--alert, #ff4d5e); animation: pulse 1.6s ease-in-out infinite; }
.now-block .now-team { font-size: clamp(1.125rem, .8rem + 1.6vw, 2.5rem); }
.now-block .now-score { font-size: clamp(3rem, 1.6rem + 6vw, 8rem); }
.now-block .now-clock { display: flex; justify-content: space-between; gap: 16px; font: 900 clamp(1.25rem, 1rem + 1vw, 2rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.now-pu { text-transform: uppercase; }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.group { background: var(--surface); padding: clamp(20px, 2.4vw, 36px); }
.group-empty { color: var(--muted); font-weight: 700; }
.group .standings a { color: inherit; text-decoration: none; font-weight: 700; }
.group .standings a:hover { color: var(--ice); }
.group .standings tbody tr:first-child td { color: inherit; font-weight: 500; }
.group .standings tr.qualify td:first-child a { color: var(--ice); }
.bracket-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tie { background: var(--surface); padding: 20px; display: grid; gap: 10px; align-content: start; }
.tie h4 { font: 900 .9375rem/1.2 var(--display); text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.tie-row { display: flex; justify-content: space-between; gap: 12px; font: 700 clamp(1rem, .9rem + .4vw, 1.25rem)/1.2 var(--display); text-transform: uppercase; }
.tie-row span { min-width: 0; }
.tie-row b { flex: none; font-variant-numeric: tabular-nums; }
.tie-row.won { color: var(--ice); }
.tie-tbd .tie-row { color: var(--muted); font: 700 1rem/1.3 var(--text); text-transform: none; }
.tie-meta { font-size: var(--step-small); color: var(--muted); font-weight: 700; }
.tie-final { background: var(--ice); color: var(--ice-ink); }
.tie-final h4, .tie-final .tie-meta, .tie-final.tie-tbd .tie-row { color: var(--ice-ink); }
.tie-final .tie-row.won { color: var(--ice-ink); text-decoration: underline; text-decoration-thickness: 3px; }
.tie-live { outline: 3px solid var(--ice); outline-offset: -3px; }
/* Platums, ne ierīce: 4 kolonnas tikai tad, kad komandu nosaukumi tiešām ietilpst. */
@media (max-width: 1400px) { .bracket-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .bracket-list { grid-template-columns: minmax(0, 1fr); }
  .tie { padding: 18px 18px 16px; }
  .tie-row { font-size: 1.0625rem; }
  .tie-row span { min-width: 0; overflow-wrap: anywhere; }
}

/* ---------- Testa režīms ---------- */
.test-banner {
  position: sticky; top: 0; z-index: 50;
  background: #ffd166; color: #031018; text-align: center;
  font: 900 .9375rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em;
  padding: 12px var(--m);
}
.test-banner[hidden] { display: none; }

/* Partneru logo ved uz viņu mājaslapām. */
.logo-row a { display: block; border-radius: 4px; }
.logo-row a:focus-visible { outline: 3px solid var(--ice); outline-offset: 8px; }
.logo-row a:hover img { transform: scale(1.06) rotate(-2deg); }

/* Telefonā spēle ir kā tablo rinda: komanda kreisajā pusē, tās punkti labajā. */
@media (max-width: 640px) {
  .game { gap: 6px 12px; }
  .game-match, .now-game {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "home sh" "away sa" "meta meta";
    gap: 8px 16px;
  }
  .game-match .score, .now-score { display: contents; }
  .game-match .score i, .now-score i { display: none; }
  .game-match .game-team, .now-team { grid-area: home; text-align: left; font-size: 1.125rem; }
  .game-match .game-team.away, .now-team.away { grid-area: away; text-align: left; }
  .game-match .sh, .now-score .sh { grid-area: sh; }
  .game-match .sa, .now-score .sa { grid-area: sa; }
  .game-match .sh, .game-match .sa { font: 900 2rem/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
  .game-match .game-meta { grid-area: meta; margin-top: 6px; }
  .now-block .now-team { font-size: 1.25rem; }
  .now-block .now-score b { font: 900 3rem/.9 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
  .now-block h3 { flex-wrap: wrap; }
  .now-block .now-clock { flex-wrap: wrap; }
  /* Komandas lapā: pretinieks un rezultāts augšā, iznākums zem tiem. */
  .game-vs { grid-template-columns: minmax(0, 1fr) auto; }
  .game-vs .score { grid-row: span 2; align-self: start; font-size: 2.25rem; }
  .game-vs .game-team.away { grid-column: 1; grid-row: 2; text-align: left; font-size: .9375rem; }
  .game-vs .game-meta { margin-top: 6px; }
}
