/* =============================================================================
   Rolletto Fantasy — multi-sport design system

   Brand: Rolletto night navy + logo green, gold for prizes only.


   Rule:  the field is the interface. Each sport's surface is the one loud
          element on a page; everything around it stays quiet.
   ========================================================================== */

/* Type: Roboto everywhere, like rolletto.com (self-hosted, no third-party requests).
   Roboto Condensed only where space is tight (names on kits, plates). */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/roboto-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/roboto-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/roboto-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/roboto-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url(/static/fonts/roboto-latin-900-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url(/static/fonts/roboto-latin-ext-900-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-condensed-latin-ext-700-normal.woff2) format("woff2"); }
:root {
  --night: #071B2C;
  --deep: #04121F;
  --panel: #0B253B;
  --panel-2: #0F2E48;
  --panel-3: #143A5A;
  --line: #15385A;
  --line-2: #1E4A6E;
  --ink: #F2F6F9;
  --muted: #94AABF;
  --dim: #5F7A92;
  --brand: #6DE4AB;
  --brand-ink: #03261A;
  --brand-soft: rgba(109, 228, 171, .14);
  --gold: #F2D14C;
  --silver: #C6D3DD;
  --bronze: #CD8A4B;
  --danger: #EF6366;
  --warn: #F5B947;
  --live: #FF5A5F;

  --accent: var(--brand);          /* overridden per sport */
  --accent-soft: rgba(109, 228, 171, .14);

  --display: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tight: "Roboto Condensed", "Roboto", "Arial Narrow", sans-serif;

  --r-s: 6px;
  --r: 12px;
  --r-l: 20px;
  --maxw: 1240px;
  --header-top: 66px; --header-bar: 62px; --header: calc(var(--header-top) + var(--header-bar)); --bar: #091F32;
  --t: 180ms cubic-bezier(.3, .7, .2, 1);
  --shadow-field: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
}

[data-sport="football"]     { --accent: #6DE4AB; --accent-soft: rgba(109, 228, 171, .14); }
[data-sport="basketball"]   { --accent: #F59E42; --accent-soft: rgba(245, 158, 66, .15); }
[data-sport="cricket"]      { --accent: #7DD3FC; --accent-soft: rgba(125, 211, 252, .14); }
[data-sport="tennis"]       { --accent: #D4F25C; --accent-soft: rgba(212, 242, 92, .14); }
[data-sport="horse_racing"] { --accent: #E9C46A; --accent-soft: rgba(233, 196, 106, .15); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--ink);
  font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .4em; letter-spacing: .005em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #9af0c6; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t); white-space: nowrap;
}
.btn:hover { background: var(--panel-3); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: transparent; color: #04170F; }
.btn--primary:hover { background: var(--accent); filter: brightness(1.08); color: #04170F; }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: .9rem; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(4, 18, 31, .88); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.site-header__top { height: var(--header-top); }
.site-header__in { height: 100%; display: flex; align-items: center; gap: 14px; }
/* second row: every sport, always fully visible (like the menu bar on rolletto.com) */
.sportbar { position: relative; background: var(--bar); border-top: 1px solid rgba(255, 255, 255, .04); }
.sportbar__in { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 6px; height: var(--header-bar); }
.sportbar a { position: relative; z-index: 2; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; padding-top: 5px;
  color: #fff; font: 700 1rem var(--body); letter-spacing: .01em; white-space: nowrap; transition: color .3s; -webkit-tap-highlight-color: transparent; }
.sportbar a > svg { position: relative; width: 22px; height: 22px; flex-shrink: 0; color: var(--muted); transition: color .3s, filter .3s; overflow: visible; }
.sportbar a:hover > svg { color: var(--ink); }
.sportbar a[aria-current="page"] { color: var(--brand); }
.sportbar a[aria-current="page"] > svg { color: var(--brand); filter: drop-shadow(0 0 6px rgba(109, 228, 171, .75)); }
.sportbar a:focus-visible { outline: none; }
.sportbar a:focus-visible > span { text-decoration: underline; text-underline-offset: 4px; }
.sportbar a.is-pop > svg { animation: swPop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes swPop { 0% { transform: translateY(8px) scale(.6); } 60% { transform: translateY(-4px) scale(1.18); } 100% { transform: none; } }
/* the green wave: drawn by sportbar.js; without script the current sport keeps a plain green underline */
.sportbar__in:not(.has-wave) a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brand); }
.sw__wave { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* exactly Rolletto's green (the green of the logo); the soft glow is the same green, so the line keeps its colour */
.sw__line { fill: none; stroke: var(--brand); stroke-width: 2.4; filter: drop-shadow(0 0 3px rgba(109, 228, 171, .5)); }
.sw__ghost { position: absolute; z-index: 3; pointer-events: none; color: var(--brand); animation: swRise .6s cubic-bezier(.2, .7, .3, 1) forwards; filter: drop-shadow(0 0 6px rgba(109, 228, 171, .6)); }
.sw__ghost svg { width: 100%; height: 100%; display: block; }
@keyframes swRise { to { transform: translateY(-34px) scale(.8); opacity: 0; } }
@media (max-width: 760px) {
  .sportbar__in { gap: 0; padding: 0 4px; }
  .sportbar a { flex-direction: column; gap: 3px; font-size: .68rem; font-weight: 600; letter-spacing: 0; padding: 4px 1px 9px; }
  .sportbar a > svg { width: 22px; height: 22px; }
}
@media (max-width: 370px) { .sportbar a { font-size: .6rem; } .sportbar a > svg { width: 20px; height: 20px; } }
@media (prefers-reduced-motion: reduce) { .sportbar a.is-pop > svg, .sw__ghost { animation-duration: .01ms; } }
.logo { display: flex; align-items: center; color: var(--ink); flex-shrink: 0; }
.logo img { height: 46px; width: auto; display: block; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.flag { width: 22px; height: 15px; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); display: block; }
.langpick { position: relative; }
.langpick summary { list-style: none; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); font: 600 .85rem var(--body); cursor: pointer; user-select: none; }
.langpick summary::-webkit-details-marker { display: none; }
.langpick summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.langpick[open] summary { border-color: var(--accent); }
.langpick ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; margin: 0; padding: 6px; list-style: none; min-width: 200px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.langpick a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); font-size: .9rem; }
.langpick a b { font: 700 .85rem var(--display); width: 24px; }
.langpick a span { color: var(--muted); }
.langpick a:hover, .langpick a[aria-current] { background: var(--panel-2); }
.langpick a[aria-current] b { color: var(--accent); }
.userchip { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--panel); }
.userchip img { width: 30px; height: 30px; border-radius: 50%; }
.userchip span { font-weight: 600; font-size: .9rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
@media (max-width: 640px) {
  .userchip span, .header-tools .hide-sm { display: none; }
  .logo img { height: 40px; }
}

.subnav { border-bottom: 1px solid var(--line); background: var(--deep); }
.subnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav a { padding: 12px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--deep); padding: 44px 0 28px; color: var(--muted); font-size: .92rem; position: relative; z-index: 1; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer__top { display: grid; gap: 28px 24px; grid-template-columns: 1fr 1fr; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: 14px; justify-items: start; }
.site-footer__brand p { margin: 0; max-width: 34ch; }
.site-footer__brand .logo img { height: 46px; }
.site-footer__col .site-footer__h { font: 700 .82rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
@media (min-width: 900px) { .site-footer__top { grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr; } .site-footer__brand { grid-column: auto; } }
.site-footer__rg { display: flex; gap: 14px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.site-footer__rg p { margin: 0; flex: 1 1 320px; font-size: .86rem; line-height: 1.5; }
.site-footer__rg .age { margin: 0; flex-shrink: 0; }
.ssl { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.ssl svg { width: 14px; height: 14px; color: var(--brand); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 18px; font-size: .82rem; }
.site-footer__bottom p { margin: 0; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--ink); transition: background .15s, color .15s, transform .15s; }
.social a:hover { background: var(--brand); color: #04170F; transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.rolletto-link { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(109, 228, 171, .1);
  border: 1px solid rgba(109, 228, 171, .35); color: var(--ink); font: 700 .85rem var(--display); letter-spacing: .02em; white-space: nowrap; }
.rolletto-link img { width: 24px; height: 24px; border-radius: 6px; }
.rolletto-link .ext { width: 11px; height: 11px; color: var(--brand); }
.rolletto-link:hover { background: rgba(109, 228, 171, .2); color: var(--ink); }
.rolletto-link--lg { height: 44px; padding: 0 18px; font-size: .95rem; }
.rolletto-link--lg img { width: 28px; height: 28px; }
@media (max-width: 640px) { .site-header .rolletto-link { padding: 0 10px; font-size: .82rem; height: 34px; } }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--muted); font: 700 .8rem var(--display); margin-right: 8px; vertical-align: middle; }

/* ── Flash / toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--night); font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: all var(--t); pointer-events: none; max-width: calc(100% - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-err { background: var(--danger); color: #fff; }

/* =============================================================================
   Home
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding: 40px 0 0; }
.hero__grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; padding-bottom: 40px; } }
.hero__kicker { color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero h1 { max-width: 12ch; }
.hero__sub { color: var(--muted); font-size: 1.12rem; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__banner { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; }
.hero__banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 20%, rgba(7, 27, 44, .55) 60%, rgba(7, 27, 44, .2)), linear-gradient(0deg, var(--night), transparent 40%); }

/* The stage: one live field per sport, switched by the tabs under it. */
.stage { position: relative; }
.stage__tabs { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.stage__tab {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600;
}
.stage__tab svg { width: 18px; height: 18px; }
.stage__tab[aria-selected="true"] { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); }
.stage__tab[aria-selected="true"] svg { color: var(--accent); }
.stage__view { position: relative; aspect-ratio: 16 / 11; perspective: 1400px; }
.stage__scene { position: absolute; inset: 0; opacity: 0; transition: opacity 450ms ease; pointer-events: none; }
.stage__scene.is-on { opacity: 1; pointer-events: auto; }
.stage__floor {
  position: absolute; left: 6%; right: 6%; top: 4%; bottom: 2%; border-radius: 18px; background-size: 100% 100%;
  transform: rotateX(38deg); transform-origin: 50% 100%; box-shadow: var(--shadow-field);
}
.stage__floor--round { left: 18%; right: 18%; border-radius: 50%; }
.stage__floor--track { left: 0; right: 0; top: 6%; bottom: 6%; transform: none; background-size: cover; background-position: 60% bottom; }
.stage__glow { position: absolute; inset: -10% 0 auto; height: 60%; background: radial-gradient(50% 60% at 50% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.stage__tokens { position: absolute; inset: 0; }
.stage__tokens .tok { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.stage__caption { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); background: rgba(4, 18, 31, .82); backdrop-filter: blur(6px); padding: 8px 16px; border-radius: 999px; font-weight: 600; white-space: nowrap; font-size: .95rem; }
.stage__caption a { color: var(--ink); }

.section { padding-top: 56px; }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section__head h2 { margin: 0; }
.section__head a { margin-left: auto; font-weight: 600; }

/* Sport blocks on home: a strip per sport with its leagues as scoreboard rows. */
.sportblock { display: grid; gap: 0; border-top: 1px solid var(--line); padding: 24px 0; }
@media (min-width: 900px) { .sportblock { grid-template-columns: 300px 1fr; gap: 32px; } }
.sportblock__id { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sportblock__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.sportblock__icon svg { width: 30px; height: 30px; }
.sportblock h3 { font-size: 1.7rem; margin: 0; }
.sportblock h3 a { color: var(--ink); }
.sportblock p { color: var(--muted); margin: 4px 0 0; font-size: .95rem; }

.leagues { display: grid; gap: 2px; }
.league {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--panel); border-radius: 4px; color: var(--ink); transition: background var(--t);
}
.leagues .league:first-child { border-radius: var(--r) var(--r) 4px 4px; }
.leagues .league:last-child { border-radius: 4px 4px var(--r) var(--r); }
.leagues .league:only-child { border-radius: var(--r); }
.league:hover { background: var(--panel-2); color: var(--ink); }
.league__logo { width: 44px; height: 44px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.league__logo img { width: 34px; height: 34px; object-fit: contain; }
.league__logo--text { background: var(--panel-3); color: var(--accent); font: 700 .9rem var(--display); }
.league__name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.league__meta { color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.league__meta b { color: var(--ink); font-weight: 600; }
.league__side { display: flex; align-items: center; gap: 14px; text-align: right; }
.league__rank { font-family: var(--display); font-size: 1.1rem; }
.league__rank small { display: block; color: var(--muted); font-family: var(--body); font-size: .75rem; }
@media (max-width: 560px) { .league__side .btn { display: none; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--panel-3); color: var(--muted); }
.pill--open { background: var(--accent-soft); color: var(--accent); }
.pill--live { background: rgba(255, 90, 95, .16); color: var(--live); }
.pill--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.pill--demo { background: rgba(242, 209, 76, .14); color: var(--gold); }
@keyframes pulse { 50% { opacity: .3; } }

.how { display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 820px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { list-style: none; counter-increment: step; position: relative; padding-left: 58px; }
.how li::before { content: counter(step); position: absolute; left: 0; top: -4px; font: 800 2.6rem/1 var(--display); color: var(--accent); }
.how h3 { margin-bottom: 6px; }
.how p { color: var(--muted); margin: 0; }
.how { padding: 0; margin: 0; }

/* ── Tables (leaderboards) ───────────────────────────────────────────── */
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; color: var(--dim); font-weight: 600; font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.board td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.board tr.is-me td { background: var(--accent-soft); }
.board .r { text-align: right; }
.board .rank { width: 52px; font: 700 1.1rem var(--display); color: var(--muted); }
.board tr:nth-child(1) .rank { color: var(--gold); }
.board tr:nth-child(2) .rank { color: var(--silver); }
.board tr:nth-child(3) .rank { color: var(--bronze); }
.board .pts { font: 700 1.2rem var(--display); }
.mgr { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mgr img { width: 30px; height: 30px; border-radius: 50%; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--panel); border-radius: var(--r); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 7px 14px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); }

/* ── Sport hub ───────────────────────────────────────────────────────── */
.hub-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hub-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; transform: scale(1.04); }
.hub-hero__bg--surface { opacity: .35; filter: saturate(1.1); background-size: 120% auto; }
.hub-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, var(--night) 25%, rgba(7, 27, 44, .6) 70%, rgba(7, 27, 44, .3)), linear-gradient(0deg, var(--night), transparent 50%); }
.hub-hero__in { position: relative; z-index: 2; padding-top: 54px; padding-bottom: 40px; }
.hub-hero__icon { width: 56px; height: 56px; color: var(--accent); margin-bottom: 14px; }
.hub-hero p { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.hub-hero .hub-hero__lead { color: var(--ink); font-size: 1.15rem; font-weight: 500; margin: 6px 0 18px; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hub-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
@media (min-width: 760px) { .hub-facts { grid-template-columns: 1fr 1fr; gap: 12px 18px; } }
.hub-facts li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(7, 27, 44, .72);
  border: 1px solid rgba(109, 228, 171, .16); font-weight: 500; font-size: .96rem; line-height: 1.35; backdrop-filter: blur(4px); }
.hub-facts svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: var(--brand); }
.hub-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.hub-grid > * { min-width: 0; }
@media (min-width: 980px) { .hub-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.side-card { background: var(--panel); border-radius: var(--r-l); padding: 20px; }
.side-card h3, .side-card .side-card__h { margin-bottom: 12px; font-size: 1.3rem; }
.mini-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-board li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 8px 4px; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.mini-board b { font-family: var(--display); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { cursor: pointer; padding: 16px 0; font: 700 1.2rem var(--display); list-style: none; display: flex; justify-content: space-between; }
.accordion summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.accordion details[open] summary::after { content: "−"; }
.accordion .body { color: var(--muted); padding-bottom: 18px; max-width: 72ch; }

.score-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.score-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.score-table td:last-child { text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.neg { color: var(--danger); }
.posv { color: var(--brand); }

/* ── Fixtures ────────────────────────────────────────────────────────── */
.fx-round { margin-bottom: 28px; }
.fx-round h3, .fx-round .fx-round__h { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
h2.h3 { font-size: 1.3rem; }
.fx { display: grid; grid-template-columns: 80px minmax(0, 1fr) 90px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; background: var(--panel); border-radius: 4px; margin-bottom: 2px; }
.fx__time { color: var(--muted); font-size: .85rem; }
.fx__team { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.fx__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx__team--home { justify-content: flex-end; text-align: right; }
.fx__team img { width: 26px; height: 26px; object-fit: contain; }
.fx__score { text-align: center; font: 700 1.3rem var(--display); }
.fx--race { grid-template-columns: 80px 1fr auto; }
@media (max-width: 560px) { .fx { grid-template-columns: 52px minmax(0, 1fr) 64px minmax(0, 1fr); padding: 10px; font-size: .9rem; } .fx__team img { display: none; } }

/* ── Forms (sign-in) ─────────────────────────────────────────────────── */
.auth-card { max-width: 460px; margin: 60px auto; background: var(--panel); border-radius: var(--r-l); padding: 34px 28px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .92rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--deep);
  color: var(--ink); padding: 10px 14px; font: 500 1rem var(--body);
}
.input:focus { outline: none; border-color: var(--accent); }
.form-err { color: var(--danger); font-weight: 600; margin-bottom: 12px; }
.gbtn { width: 100%; background: #fff; color: #1f1f1f; border: 0; }
.gbtn:hover { background: #f1f1f1; color: #1f1f1f; }
.gbtn svg { width: 20px; height: 20px; }

/* =============================================================================
   Builder
   ========================================================================== */
.bld { padding-top: 20px; padding-bottom: 40px; }
.bld__bar {
  position: sticky; top: var(--sticky-top, var(--header)); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 12px 0; background: linear-gradient(var(--night) 80%, transparent);
}
.stat { display: grid; line-height: 1.05; }
.stat small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.stat b { font: 700 1.55rem var(--display); }
.stat b.is-over { color: var(--danger); }
.bld__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bld__round { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bld__round h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0; }
.bld__round select { width: auto; min-height: 38px; }
.countdown { font-family: var(--display); font-weight: 700; color: var(--accent); }
.notice { padding: 12px 16px; border-radius: var(--r); background: var(--panel); color: var(--muted); margin: 10px 0; }
.notice--warn { background: rgba(245, 185, 71, .12); color: var(--warn); }
.bld__grid { display: grid; gap: 22px; margin-top: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1080px) { .bld__grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--panel); font-size: .82rem; font-weight: 600; color: var(--muted); }
.chip.is-ok { color: var(--accent); background: var(--accent-soft); }
.chip.is-bad { color: var(--danger); background: rgba(239, 99, 102, .12); }

/* Field stage */
.field-stage { position: relative; perspective: 1600px; margin: 0 auto; width: 100%; }
.field-stage__surface {
  position: absolute; inset: 0; background-size: 100% 100%; border-radius: 16px; box-shadow: var(--shadow-field);
  transform-origin: 50% 100%;
}
.field-stage--pitch, .field-stage--court, .field-stage--tennis { aspect-ratio: 7 / 8.6; max-width: 760px; margin-top: -13%; }
.field-stage--oval { margin-top: -4%; }
.field-stage--pitch .field-stage__surface, .field-stage--court .field-stage__surface, .field-stage--tennis .field-stage__surface { transform: rotateX(22deg) scale(.96); }
.field-stage--oval { aspect-ratio: 1 / 1; max-width: 720px; }
.field-stage--oval .field-stage__surface { border-radius: 50%; transform: rotateX(18deg) scale(.97); }
.field-stage__lights { position: absolute; inset: -6% -2% auto; height: 40%; background: radial-gradient(40% 70% at 50% 0%, rgba(255, 255, 255, .12), transparent 70%); pointer-events: none; }
.field-stage__slots { position: absolute; inset: 0; }
.slotrow { position: absolute; left: 4%; right: 4%; display: flex; justify-content: space-evenly; transform: translateY(-50%); }

/* Player token: kit or photo, name plate, value line */
.tok {
  --size: clamp(52px, 10.5vw, 82px);
  display: grid; justify-items: center; gap: 0; width: calc(var(--size) * 1.45); background: none; border: 0; padding: 0; cursor: pointer;
  position: relative; transition: transform var(--t); -webkit-tap-highlight-color: transparent;
}
.tok:hover { transform: translateY(-3px); }
.field-stage__slots .slot-abs { position: absolute; transform: translate(-50%, -50%); }
.field-stage__slots .slot-abs .tok:hover { transform: translateY(-3px); }
.tok__kit { width: var(--size); height: var(--size); position: relative; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.tok__kit svg, .tok__kit img { width: 100%; height: 100%; }
.tok__kit img.photo { border-radius: 50%; object-fit: cover; background: linear-gradient(160deg, #24506f, #0d2a40); border: 3px solid rgba(255, 255, 255, .9); }
.tok__kit img.photo--team { object-fit: contain; padding: 14%; background: #fff; }
.tok__plate {
  margin-top: -6px; min-width: 100%; max-width: 150%; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
  display: grid; position: relative; z-index: 1;
}
.tok__name { background: #F6F8FA; color: #08192A; font: 700 clamp(.72rem, 1.6vw, .9rem)/1.25 var(--tight); padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok__val { background: #0A2236; color: #fff; font: 600 clamp(.68rem, 1.4vw, .82rem)/1.3 var(--tight); padding: 1px 6px; text-align: center; white-space: nowrap; }
.tok__val.is-pts { background: var(--accent); color: #04170F; }
.tok__badge { position: absolute; top: -2px; right: 8%; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 .8rem var(--display); background: #0A0A0A; color: #fff; border: 2px solid #fff; }
.tok__badge--c { background: var(--gold); color: #1D1600; border-color: #1D1600; }
.tok__badge--v { background: #fff; color: #08192A; border-color: #08192A; }
.tok__flag { position: absolute; top: 0; left: 8%; z-index: 2; background: var(--danger); color: #fff; border-radius: 4px; font: 700 .65rem var(--display); padding: 1px 4px; }
.tok--empty .tok__kit { opacity: .95; }
.tok--empty .tok__name { background: rgba(4, 18, 31, .75); color: #fff; backdrop-filter: blur(4px); }
.tok.is-swap .tok__kit { animation: bob 1s ease-in-out infinite; }
.tok.is-target .tok__kit::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px dashed var(--accent); }
.tok.is-dim { opacity: .35; }
.tok.is-new .tok__name::before { content: "● "; color: var(--brand); }
@keyframes bob { 50% { transform: translateY(-6px); } }

.bench { margin: 16px auto 0; max-width: 760px; padding: 14px 10px 10px; border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .06); }
.bench__label { font: 700 .95rem var(--display); color: var(--muted); padding: 0 8px 4px; }
.bench__row { display: flex; justify-content: space-evenly; }
.bench .tok { --size: clamp(46px, 9vw, 66px); }

/* Side panel (desktop) / list view */
.side { display: grid; gap: 14px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.side .side-card { padding: 16px; }
.lineup-list { list-style: none; margin: 0; padding: 0; }
.lineup-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: .92rem; }
.lineup-list .p { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.mini-kit { width: 34px; height: 34px; }
.mini-kit svg, .mini-kit img { width: 34px; height: 34px; }
.mini-kit img { border-radius: 50%; object-fit: cover; }

/* Racing card */
.racecard { display: grid; gap: 10px; }
.race {
  position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  min-height: 96px; padding: 12px 16px; border-radius: var(--r); overflow: hidden; cursor: pointer; border: 0; text-align: left; color: var(--ink);
  background: linear-gradient(90deg, rgba(4, 18, 31, .92) 0%, rgba(4, 18, 31, .72) 55%, rgba(4, 18, 31, .3)), url(/static/img/surfaces/track.svg) center/cover;
}
.race:hover { filter: brightness(1.1); }
.race__time { font: 800 1.5rem var(--display); line-height: 1; }
.race__time small { display: block; font: 600 .75rem var(--body); color: var(--muted); margin-top: 4px; }
.race__title { font: 700 1.15rem var(--display); }
.race__meta { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.race__pick { display: flex; align-items: center; gap: 12px; }
.race__pick .silk { width: 58px; height: 58px; }
.race__pick b { font: 700 1.1rem var(--display); display: block; }
.race__pick small { color: var(--muted); }
.race__empty { padding: 10px 16px; border: 2px dashed rgba(255, 255, 255, .3); border-radius: 999px; font-weight: 600; }
.race .tok__badge { position: static; display: inline-grid; margin-left: 6px; vertical-align: middle; }
.race.is-result .race__pts { font: 800 1.6rem var(--display); color: var(--accent); }
@media (max-width: 560px) { .race { grid-template-columns: 52px 1fr; } .race__pick { grid-column: 1 / -1; } }

/* Tennis draw strip */
.draw { max-height: 520px; overflow-y: auto; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.draw__col { min-width: 220px; }
.draw__col h4 { font-size: 1rem; color: var(--muted); }
.draw__m { background: var(--panel); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; font-size: .88rem; }
.draw__m div { display: flex; justify-content: space-between; gap: 8px; }
.draw__m .w { font-weight: 700; color: var(--accent); }

/* Picker drawer */
.drawer-bg { position: fixed; inset: 0; z-index: 60; background: rgba(2, 10, 18, .6); opacity: 0; pointer-events: none; transition: opacity var(--t); }
.drawer-bg.is-on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--deep);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
}
.drawer.is-on { transform: none; }
@media (max-width: 720px) {
  .drawer { top: auto; height: 86vh; height: 86dvh; width: 100%; padding-bottom: env(safe-area-inset-bottom); border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(100%); }
}
.drawer__head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.drawer__title { display: flex; align-items: center; gap: 10px; }
.drawer__title h3, .drawer__title h2 { margin: 0; flex: 1; font-size: 1.3rem; }
.drawer__filters { display: flex; gap: 8px; }
.drawer__filters select { flex: 1; min-height: 40px; }
.postabs { display: flex; gap: 4px; overflow-x: auto; }
.postabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.postabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #04170F; }
.drawer__list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.prow:hover { background: var(--panel); }
.prow[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.prow .mini-kit, .prow .mini-kit svg, .prow .mini-kit img { width: 44px; height: 44px; }
.prow .silk { width: 44px; height: 44px; }
.prow__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow__sub { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow__why { color: var(--danger); font-size: .78rem; font-weight: 600; }
.prow__nums { display: grid; text-align: right; line-height: 1.15; }
.prow__nums b { font: 700 1.15rem var(--display); }
.prow__nums small { color: var(--muted); font-size: .76rem; }
.drawer__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Action sheet / modal */
.sheet { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none;
  width: min(420px, calc(100% - 24px)); max-height: 86vh; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; background: var(--panel); border-radius: var(--r-l); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transition: all var(--t); }
.sheet.is-on { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.sheet__head { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.sheet__head h3, .sheet__head h2 { margin: 0; font-size: 1.5rem; }
.sheet__head .mini-kit, .sheet__head .mini-kit svg, .sheet__head .mini-kit img, .sheet__head .silk { width: 72px; height: 72px; }
.sheet__body { padding: 14px 18px 18px; display: grid; gap: 10px; }
.sheet__actions { display: grid; gap: 8px; }
.sheet__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet__stats div { background: var(--deep); border-radius: 10px; padding: 8px 10px; }
.sheet__stats small { display: block; color: var(--muted); font-size: .75rem; }
.sheet__stats b { font: 700 1.25rem var(--display); }
.xbtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--panel-2); cursor: pointer; font-size: 1.2rem; }

/* Message pages */
.msg { text-align: center; padding: 100px 16px; }
.msg h1 { font-size: clamp(2rem, 5vw, 3.2rem); }

/* Utility layout for content pages */
.page-head { padding-top: 34px; padding-bottom: 10px; }
.page-head p { color: var(--muted); max-width: 64ch; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1fr 1fr; } }
.prize-list { list-style: none; padding: 0; margin: 0; }
.prize-list li { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--panel); margin-bottom: 2px; border-radius: 4px; }
.prize-list li:first-child b { color: var(--gold); }
.prize-list b { font: 700 1.15rem var(--display); }

/* ── Racing: the home straight ─────────────────────────────────────── */
.track-stage { position: relative; aspect-ratio: 16 / 8.2; max-width: 100%; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-field); margin-bottom: 18px; }
.track-stage__bg { position: absolute; inset: 0; background: url(/static/img/surfaces/racecourse.svg) center bottom / cover no-repeat; }
.track-stage__lanes { position: absolute; inset: 0; }
.runner { position: absolute; transform: translate(0, -98%); background: none; border: 0; padding: 0; cursor: pointer; display: block; aspect-ratio: 603 / 402;
  pointer-events: none; }
.track-stage.is-intro .runner, .track-stage.is-intro .runner-tag { animation: runIn 900ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
.runner:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.runner__art { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.track-stage__lanes { cursor: pointer; }
.runner.is-hover .runner__art { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55)) drop-shadow(0 6px 8px rgba(0, 0, 0, .35)) brightness(1.08); }
.track-stage__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.track-stage__nums { position: absolute; inset: 0; pointer-events: none; }
.lane-no { position: absolute; left: 1.2%; transform: translateY(-50%); min-width: 1.6em; padding: 0 .35em; border-radius: 4px; text-align: center;
  background: rgba(255, 255, 255, .9); color: #0b1a2a; font: 800 clamp(.6rem, calc(var(--k) * 1.6vw), 1rem)/1.35 var(--display); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.runner__art svg, .runner__art img { display: block; width: 100%; height: 100%; animation: gallop 520ms ease-in-out infinite alternate; animation-delay: var(--d); }
.runner--empty .runner__art svg, .runner--empty .runner__art img { animation: none; }
.track-stage__tags { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.runner-tag { position: absolute; transform: translate(calc(-100% - 4px), -50%); pointer-events: auto; cursor: pointer; border: 0;
  white-space: nowrap; background: rgba(4, 18, 31, .86); color: #fff; backdrop-filter: blur(4px);
  border-radius: 999px; padding: 3px 12px 3px 4px; font: 600 .82rem/1.4 var(--body); display: inline-flex; gap: 6px; align-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.runner-tag b { font: 700 .82rem var(--display); background: var(--accent); color: #1D1600; border-radius: 999px; padding: 1px 8px; }
.runner-tag i { font-style: normal; color: var(--accent); font-family: var(--display); font-weight: 700; }
.runner-tag .tok__badge { position: static; width: 20px; height: 20px; font-size: .7rem; }
.runner-tag.is-right { transform: translate(4px, -50%); }
.runner-tag--empty { background: rgba(4, 18, 31, .6); border: 1px dashed rgba(255, 255, 255, .5); }
.runner-tag:hover { background: var(--accent); color: #1D1600; }
.runner-tag:hover b { background: #1D1600; color: var(--accent); }
@keyframes runIn { from { opacity: 0; translate: -40px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes gallop { from { transform: translateY(0) rotate(-.6deg); } to { transform: translateY(-3%) rotate(.8deg); } }
@media (max-width: 640px) { .track-stage { aspect-ratio: 4 / 3.4; } .track-stage__bg { background-position: 70% bottom; }
  .runner-tag { font-size: .72rem; padding-right: 8px; } .runner-tag .n { display: none; } }
.cloth { display: inline-grid; place-items: center; min-width: 30px; height: 34px; padding: 0 4px; border-radius: 4px; background: #F6F6F2; color: #111;
  font: 800 1.05rem var(--display); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); flex-shrink: 0; }
.cloth--sm { position: absolute; left: -6px; top: -4px; min-width: 20px; height: 20px; font-size: .75rem; z-index: 1; }
.prow .mini-kit { position: relative; }
.stage__track { position: absolute; left: 0; right: 0; top: 6%; bottom: 6%; border-radius: 18px; overflow: hidden; }
.stage__track .stage__floor--track { inset: 0; top: 0; bottom: 0; }
.stage__lanes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage__caption--top { top: 9%; bottom: auto; }
.home-runner { position: absolute; transform: translate(-50%, -98%); aspect-ratio: 603 / 402; pointer-events: none; }
.home-runner svg, .home-runner img { display: block; width: 100%; height: 100%; animation: gallop 520ms ease-in-out infinite alternate; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }

[data-sport="horse_racing"] .hub-hero__bg--surface { opacity: .9; background-size: cover; background-position: 70% 70%; }
.hub-hero__runners { position: absolute; inset: 0; z-index: 1; }
@media (max-width: 760px) { .hub-hero__runners { opacity: .35; } }
.score-table--grid td { text-align: center; font-family: var(--display); font-weight: 600; }
.score-table--grid td:first-child { text-align: left; font-family: var(--body); font-weight: 400; }
.score-table--grid tr:first-child td { color: var(--muted); font-size: .8rem; }

/* painted racehorse: fades in once its colours are painted */
img.racehorse { opacity: 0; transition: opacity .35s ease; user-select: none; -webkit-user-drag: none; }
img.racehorse.is-ready { opacity: 1; }
img.racehorse--ghost.is-ready { opacity: 1; filter: drop-shadow(0 0 1px rgba(255,255,255,.7)); }

/* 404 */
.notfound { text-align: center; padding: 72px 16px 40px; display: grid; justify-items: center; gap: 14px; }
.notfound__code { font: 800 clamp(5rem, 18vw, 9rem)/.9 var(--display); color: transparent; -webkit-text-stroke: 2px var(--brand); letter-spacing: .04em; }
.notfound h1 { margin: 0; }
.notfound p { max-width: 46ch; margin: 0 0 8px; }
.notfound__sports { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 14px; }
.notfound__sport { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--panel); color: var(--ink); font-weight: 600; }
.notfound__sport svg { width: 20px; height: 20px; color: var(--brand); }
.notfound__sport:hover { background: var(--panel-2); }
/* drifting sports icons behind everything (see drift.js) */
.bg-drift { position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none; display: block; transform: translateZ(0); backface-visibility: hidden; contain: strict; }
@media print { .bg-drift { display: none; } }
@media (max-width: 640px) {
  .langpick summary { padding: 0 9px; gap: 5px; }
  .langpick summary span { display: none; }
  .userchip { padding: 3px; }
  .userchip span { display: none; }
  .header-tools { gap: 6px; }
  .logo img { height: 40px; }
}
.header-tools > * { flex-shrink: 0; }
@media (max-width: 640px) { .site-header .rolletto-link .ext { display: none; } .site-header__in { gap: 10px; } }
@media (max-width: 380px) { .site-header .rolletto-link { padding: 0 8px; font-size: .76rem; } }
@media (max-width: 340px) { .site-header .rolletto-link { display: none; } }
/* ── Transfers page ───────────────────────────────────────────────── */
.tr .bld__round .muted { font-weight: 600; }
.tr-title { margin: 0 0 4px; font-size: 1.25rem; }
.tr-group { margin: 16px 0 6px; font: 700 .8rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.tr-row:has(.tr-row__label) { grid-template-columns: minmax(120px, 1.2fr) auto 1.4fr auto auto; }
.tr-row__label { font-size: .85rem; color: var(--muted); }
.tr-row__label b { color: var(--accent); font-family: var(--display); margin-right: 4px; }
.tr-row__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tr-row__who .muted { font-size: .82rem; }
.tr-row__price { font-weight: 700; }
.tr-row.is-new { border-color: rgba(109, 228, 171, .5); background: rgba(109, 228, 171, .07); }
.tr-row.is-out { border-color: var(--accent); }
.tr-row .mini-kit { position: relative; }
.tr-pending { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.tr-pending li { display: grid; grid-template-columns: 1fr auto 1fr auto auto; gap: 8px; align-items: center; font-size: .9rem; }
.tr-pending .arrow { color: var(--muted); }
.neg { color: #f87171; } .pos { color: var(--brand); }
.tr-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tr-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.tr-hist li { display: grid; gap: 2px; }
@media (max-width: 640px) {
  .tr-row, .tr-row:has(.tr-row__label) { grid-template-columns: auto 1fr auto; }
  .tr-row__label { grid-column: 1 / -1; }
  .tr-row__price { display: none; }
}
.hub-runner { transform: translate(-50%, -70%); aspect-ratio: auto; }
.hub-runner img { height: auto; }
.score-table--grid tr:first-child td { white-space: nowrap; font-size: .78rem; }

@media (max-width: 760px) {
  :root { --header-top: 62px; --header-bar: 68px; }
  .site-header { position: relative; }
  :root { --sticky-top: 0px; }
}
/* ── Information pages (rules), laid out like rolletto.com/static/information ── */
.info { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; padding-top: 34px; padding-bottom: 20px; align-items: start; }
.info__nav { display: grid; gap: 10px; position: sticky; top: calc(var(--header) + 16px); }
.info__head { display: flex; align-items: center; gap: 10px; font: 700 1.35rem var(--body); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 4px; }
.info__head svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }
.info__nav a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-radius: 6px;
  background: var(--bar); color: #fff; font: 700 1rem var(--body); text-align: center; border: 1px solid transparent; transition: border-color var(--t), background var(--t); }
.info__nav a svg { width: 20px; height: 20px; color: var(--muted); }
.info__nav a:hover { border-color: rgba(109, 228, 171, .35); }
.info__nav a[aria-current="page"] { border-color: var(--brand); background: rgba(109, 228, 171, .06); }
.info__nav a[aria-current="page"] svg { color: var(--brand); }
.info__body { min-width: 0; font-size: 1.05rem; line-height: 1.6; }
.info__body h1 { font: 700 clamp(1.8rem, 3.2vw, 2.4rem)/1.15 var(--body); margin: 6px 0 18px; }
.info__lead { color: #dfe8ef; margin: 0 0 26px; max-width: 80ch; }
.info__sec { margin: 0 0 30px; }
.info__sec h2 { font: 700 1.2rem var(--body); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 12px; color: #fff; }
.info__sec h3 { font: 700 1.05rem var(--body); margin: 16px 0 8px; }
.info__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 80ch; }
.info__list li { position: relative; padding-left: 22px; color: #dfe8ef; }
.info__list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.info__rich { color: #dfe8ef; max-width: 80ch; }
.info__rich ul { padding-left: 20px; }
.info__body .score-table { max-width: 640px; }
@media (max-width: 860px) {
  .info { grid-template-columns: 1fr; gap: 18px; padding-top: 20px; }
  .info__nav { position: static; display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .info__head { display: none; }
  .info__nav a { min-height: 42px; white-space: nowrap; flex-shrink: 0; font-size: .92rem; }
}
/* hub: rules inside the page column */
.info__body--hub { font-size: 1rem; }
.info__body--hub .section__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* small phones: tables and lists keep inside the screen */
@media (max-width: 480px) {
  .board th, .board td { padding: 10px 6px; }
  .board .rank { width: 34px; font-size: 1rem; }
  .board .pts { font-size: 1.05rem; }
  .board .mgr { min-width: 0; }
  .board .mgr img { width: 24px; height: 24px; }
}

/* grid children may shrink below their content width, so nothing pushes the page sideways */
.bld__grid > *, .hub-grid > *, .side > *, .info > *, .grid > * { min-width: 0; }
.field-stage__lights { max-width: 100%; }
select.input, .input { max-width: 100%; min-width: 0; }
.drawer, .drawer-bg { max-width: 100vw; overflow-x: hidden; }

/* ── Blog ─────────────────────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }
.blog-hero { padding: 40px 0 8px; background: radial-gradient(900px 300px at 15% 0, var(--accent-soft, rgba(109, 228, 171, .12)), transparent 70%); }
.blog-hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.blog-hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: .92rem; background: var(--panel); }
.chips a svg { width: 18px; height: 18px; color: var(--accent); }
.chips a:hover { color: var(--ink); }
.chips a[aria-current] { background: var(--accent, var(--brand)); border-color: transparent; color: #04170F; }
.chips a[aria-current] svg { color: #04170F; }
.blog-list { padding-top: 28px; }
.post-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-l); overflow: hidden; border: 1px solid rgba(255, 255, 255, .04); transition: transform var(--t), border-color var(--t); }
.post-card:hover { transform: translateY(-2px); border-color: var(--accent-soft, var(--line)); }
.post-card__cover { display: block; aspect-ratio: 16 / 8; overflow: hidden; }
.post-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover { display: grid; place-items: center; width: 100%; height: 100%;
  background: radial-gradient(120% 140% at 85% 10%, var(--accent-soft, rgba(109, 228, 171, .16)), transparent 60%), linear-gradient(135deg, #0d2a42, #071B2C); }
.post-cover svg { width: 46%; height: 78%; color: var(--accent, var(--brand)); opacity: .9; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.post-card__body { padding: 16px 18px 20px; display: grid; gap: 8px; align-content: start; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; color: var(--muted); font-size: .82rem; }
.post-card__title { font: 700 1.2rem/1.25 var(--display); margin: 0; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--accent, var(--brand)); }
.post-card__excerpt { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.wrap--text { max-width: 820px; }
.post__head { padding: 40px 0 12px; background: radial-gradient(900px 320px at 10% 0, var(--accent-soft, rgba(109, 228, 171, .12)), transparent 70%); }
.post__head h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; }
.post__lead { font-size: 1.15rem; color: #dfe8ef; margin: 0 0 16px; line-height: 1.5; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .88rem; margin: 0; }
.post__cover { width: 100%; height: auto; border-radius: var(--r-l); margin: 18px 0 6px; }
.post__body { font-size: 1.06rem; line-height: 1.7; padding: 18px 0 8px; max-width: none; }
.post__body h2 { font: 700 1.45rem/1.25 var(--display); margin: 1.6em 0 .5em; color: #fff; }
.post__body h3 { font: 700 1.15rem/1.3 var(--display); margin: 1.3em 0 .4em; }
.post__body p { margin: 0 0 1em; }
.post__body ul, .post__body ol { margin: 0 0 1.1em; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.post__body ul li { position: relative; padding-left: 22px; }
.post__body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, var(--brand)); }
.post__body ol { counter-reset: n; }
.post__body ol li { position: relative; padding-left: 34px; counter-increment: n; }
.post__body ol li::before { content: counter(n); position: absolute; left: 0; top: .15em; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft, rgba(109, 228, 171, .15)); color: var(--accent, var(--brand)); font: 700 .8rem var(--display); }
.post__body strong { color: #fff; }
.post__body a { color: var(--accent, var(--brand)); text-decoration: underline; text-underline-offset: 3px; }
.cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 28px 0 8px; padding: 22px 24px;
  border-radius: var(--r-l); background: linear-gradient(120deg, var(--accent-soft, rgba(109, 228, 171, .14)), rgba(255, 255, 255, .02)); border: 1px solid var(--accent-soft, var(--line)); }
.cta-box h2 { font-size: 1.4rem; margin: 0 0 4px; }
.cta-box p { margin: 0; color: #dfe8ef; }
.side-posts { display: grid; gap: 12px; }
.side-posts a { display: grid; gap: 2px; color: var(--ink); font-weight: 600; line-height: 1.3; }
.side-posts small { color: var(--muted); font-weight: 400; }
.post-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
/* Long reading pages: the floating icons step back so text stays easy to read */
body:has(.post__body) .bg-drift, body:has(.info__body) .bg-drift { opacity: .4; }
.post-cover svg[aria-hidden] { color: var(--accent, var(--gold)); }

/* ── Sport switched off: "coming soon" ───────────────────────────────── */
.soon-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font: 700 .62rem/1.5 var(--body); letter-spacing: .04em;
  text-transform: uppercase; background: rgba(233, 196, 106, .16); color: var(--gold, #E9C46A); vertical-align: middle; }
.sportbar a.is-soon { opacity: .62; }
.sportbar a.is-soon:hover, .sportbar a.is-soon[aria-current] { opacity: 1; }
@media (max-width: 760px) { .sportbar .soon-badge { position: absolute; top: 6px; left: calc(50% + 8px); margin: 0; font-size: .5rem; padding: 0 4px; } .sportbar a[aria-current] .soon-badge { display: none; } }
.soon { padding: 70px 0 90px; text-align: center; background: radial-gradient(700px 360px at 50% 0, var(--accent-soft), transparent 70%); }
.soon__in { display: grid; justify-items: center; }
.soon__icon { width: 104px; height: 104px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 18px; }
.soon__icon svg { width: 58px; height: 58px; color: var(--accent); }
.soon__tag { display: inline-block; margin: 0 0 10px; padding: 4px 14px; border-radius: 999px; background: rgba(233, 196, 106, .16); color: var(--gold, #E9C46A);
  font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.soon h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.soon__text { color: #dfe8ef; font-size: 1.12rem; max-width: 52ch; margin: 0 auto 26px; line-height: 1.55; }
.soon__more { color: var(--muted); margin: 0 0 12px; }
.soon__chips { justify-content: center; }
.sportblock--soon .sportblock__icon { opacity: .6; }
.soon-row { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--r); background: var(--panel); border: 1px dashed rgba(233, 196, 106, .35); color: var(--muted); }
.soon-row b { color: var(--gold); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.soon-row:hover { background: var(--panel-2); color: var(--ink); }

/* Racing: a picked horse gallops in along its lane, a replaced one gallops out */
.track-stage .runner.is-arriving { animation: arrive 1150ms cubic-bezier(.12, .7, .22, 1) both; }
.runner.is-arriving .runner__art img, .runner.is-arriving .runner__art svg { animation-duration: 240ms; }
.runner.is-arriving .runner__art { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)) drop-shadow(-18px 2px 6px rgba(205, 170, 110, .35)); }
.track-stage .runner-tag.is-arriving { animation: tagIn 1300ms ease both; }
.runner--leaving { pointer-events: none !important; z-index: 9 !important; animation: leave 900ms cubic-bezier(.5, 0, .9, .5) both !important; }
.runner--leaving .runner__art img, .runner--leaving .runner__art svg { animation-duration: 240ms; }
@keyframes arrive {
  0%   { translate: var(--from, -400px) 0; opacity: 1; }
  78%  { translate: 10px 0; }
  100% { translate: 0 0; opacity: 1; }
}
@keyframes leave { from { translate: 0 0; opacity: 1; } 80% { opacity: 1; } to { translate: var(--to, 600px) 0; opacity: 0; } }
@keyframes tagIn { 0%, 55% { opacity: 0; scale: .85; } 100% { opacity: 1; scale: 1; } }

/* Page changes: the header stays put and the page underneath fades over in a moment
   (cross-document view transitions; browsers without them simply load the page). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
::view-transition-group(site-header) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
