/* ==========================================================
   BRAND COLORS: change these to match your brand.
   Everything on the site pulls from these variables.
   ========================================================== */
:root {
  /* KLEO: diamond blue on deep navy, with a touch of mine-dirt gold */
  --brand: #4cc9ff;          /* main accent (buttons, highlights) */
  --brand-deep: #1a6fd6;     /* diamond outline blue */
  --brand-light: #c8f0ff;    /* diamond highlight */
  --brand-ink: #04203a;      /* text on top of --brand */
  --brand-soft: rgba(76, 201, 255, 0.14);
  --dirt: #c9963a;           /* mine gold, used sparingly */

  --bg: #060d1a;             /* page background */
  --surface: #0d1a2e;        /* cards */
  --surface-2: #13243d;      /* rows, inputs */
  --border: #1f3a5e;
  --text: #eaf6ff;
  --muted: #86a3c4;

  --gold: #f5c542;
  --silver: #c9d1df;
  --bronze: #d58a52;

  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
html { background: #050c1a; }   /* no white flash between pages */

/* ---------- Smooth page switches (cross-page View Transitions; browsers without it just load normally) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 0.18s ease both; }
::view-transition-new(root) { animation: page-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; translate: 0 10px; } }
/* the top bar stays put while the page underneath changes (its pill has already slid over, see renderNav) */
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header) { animation: none; }
::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; }
::view-transition-old(site-header) { display: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
/* arriving from one of our links (html.arrive, set in app.js): the fade above is the only entrance */
html.arrive .lb-hero > *, html.arrive .lb-pod, html.arrive .lb-timer, html.arrive .lb-calc, html.arrive .lb-table,
html.arrive .sd-hero > *, html.arrive .sd-table, html.arrive .rw-code, html.arrive .rw-perk,
html.arrive .home-logo-wrap, html.arrive .home-kicker, html.arrive .home-actions { animation: none; }
html.arrive .lb-gems { animation: arrive-gems 0.3s ease both; }
@keyframes arrive-gems { from { opacity: 0; } }
/* the content waits until it's fully rendered (body.loaded), then fades in at once: nothing jumps as data arrives */
html.arrive main, html.arrive .site-footer { transition: opacity 0.2s ease; }
html.arrive body:not(.loaded) main, html.arrive body:not(.loaded) .site-footer { opacity: 0; }

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(76, 201, 255, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header: floating liquid-glass nav ---------- */
.site-header {
  /* glass tuned for the dark pages */
  --glass-bg: rgba(8, 18, 34, 0.5);
  --glass-blur: 12px;
  --glass-ink: #eaf6ff;
  --glass-ink-soft: rgba(234, 246, 255, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.28);
  --glass-shadow: rgba(0, 0, 0, 0.45);
  --glass-active: rgba(255, 255, 255, 0.16);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 14px 0;
  pointer-events: none;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1200px;
}
.site-header .wrap > * { pointer-events: auto; }
/* Colour transitions only after the first paint */
.site-header.ready, .site-header.ready * { transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; }

.glass {
  position: relative;
  isolation: isolate;
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(180%);
  backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(180%);
  /* Chromium: real refraction through an SVG displacement filter (others keep the line above) */
  backdrop-filter: url(#liquid-glass) blur(var(--glass-blur)) saturate(185%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.75),
    inset 0 -1px 1px rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px var(--glass-edge),
    inset 0 0 20px rgba(255, 255, 255, 0.12),
    0 12px 32px -12px var(--glass-shadow),
    0 2px 6px -2px var(--glass-shadow);
}
/* Specular sheen across the top, plus a light band that sweeps across now and then */
.glass::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.15) 52%, transparent 62%) 0 0 / 300% 100% no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 42%,
      rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.14) 100%);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
  animation: glass-sweep 7s ease-in-out infinite;
}
@keyframes glass-sweep {
  0%, 55% { background-position: 120% 0, 0 0; }
  85%, 100% { background-position: -20% 0, 0 0; }
}
/* Jelly squish when you hover a glass control */
a.glass:hover, button.glass:hover { animation: glass-jelly 0.55s ease; }
@keyframes glass-jelly {
  0% { scale: 1 1; }
  30% { scale: 1.06 0.94; }
  55% { scale: 0.97 1.04; }
  75% { scale: 1.02 0.99; }
  100% { scale: 1 1; }
}
@media (prefers-reduced-motion: reduce) {
  .glass::before { animation: none; }
  a.glass:hover, button.glass:hover, .nav.glass a:hover { animation: none; }
}
/* Soft light that follows the cursor across the glass */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, 0.45), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}
.glass:hover::after { opacity: 1; }
/* ---------- Top bar: a clean frosted pill ---------- */
.site-header {
  --nav-bg: rgba(7, 15, 29, 0.62);
  --nav-line: rgba(255, 255, 255, 0.1);
  --nav-hover: rgba(255, 255, 255, 0.06);
  --nav-active: rgba(255, 255, 255, 0.12);
  --nav-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}
.nav {
  display: flex;
  gap: 2px;
  padding: 4px;
}
.nav.glass {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--nav-line), var(--nav-shadow);
}
.nav.glass::before, .nav.glass::after { display: none; }
.nav a {
  position: relative;
  text-decoration: none;
  color: var(--glass-ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover { color: var(--glass-ink); background: var(--nav-hover); }
.nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav a.active { color: var(--glass-ink); }
/* one highlight pill under the current link; it glides to a clicked link before the page changes */
.nav { position: relative; }
.nav a { z-index: 1; }
.nav-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--nav-active);
  pointer-events: none;
}
.nav-pill.ready { transition: translate 0.2s cubic-bezier(0.45, 0, 0.2, 1), width 0.2s cubic-bezier(0.45, 0, 0.2, 1); }

/* Fixed header floats over content: give pages without the intro room at the top */
body:not([data-page="home"]) main { padding-top: 64px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Buttons & code ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:not(.ghost) {
  background: linear-gradient(180deg, var(--brand-light) -40%, var(--brand) 45%, var(--brand-deep) 140%);
  box-shadow: 0 6px 24px -8px var(--brand);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--brand);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  font-size: 0.98rem;
}
.code-chip small { color: var(--muted); font-weight: 600; }
.code-chip strong { color: var(--brand); letter-spacing: 0.04em; }

/* ---------- Hero ---------- */
main { flex: 1; }

.hero {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 32px;
}
.eyebrow {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  margin: 16px 0 12px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--brand); }

/* ---------- Home: the KLEO logo on the navy page, two buttons ---------- */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 84px;
  padding-bottom: 70px;
  text-align: center;
}
.home-logo-wrap {
  position: relative;
  margin-top: min(15vw, 110px);   /* headroom for the crown floating above the K */
  width: min(560px, 84vw);
  animation: home-logo-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes home-logo-in { from { opacity: 0; translate: 0 18px; scale: 0.96; } }
.home-logo {
  position: relative;
  z-index: 1;   /* in front of the crown */
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 34px rgba(76, 201, 255, 0.4));
  animation: home-glow 5s ease-in-out 1.2s infinite;
}
/* the crystal brightens a touch as the light passes over it */
@keyframes home-glow {
  0%, 30%, 100% { filter: drop-shadow(0 10px 34px rgba(76, 201, 255, 0.4)); }
  15% { filter: drop-shadow(0 10px 34px rgba(76, 201, 255, 0.6)) brightness(1.12); }
}
/* the gold crown floating above the K, tilted like it's been tossed on (home, Leaderboard and Rewards logos) */
.logo-crown {
  position: absolute;
  left: -3%;
  bottom: 86%;   /* clear of the K's top edge, with a small gap, so it floats above rather than sitting on it */
  width: 24%;
  height: auto;
  z-index: 0;   /* behind the letters: the K covers the crown's rim */
  pointer-events: none;
  rotate: -14deg;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(245, 197, 66, 0.45));
  animation: logo-crown 4.5s ease-in-out infinite;
}
@keyframes logo-crown {
  0%, 100% { translate: 0 0; rotate: -14deg; }
  50% { translate: 0 -9.5%; rotate: -10deg; }   /* % of the crown's own height, so it bobs the same at any logo size (about 10px on home) */
}
/* a band of light that sweeps across the letters only (masked to the logo's shape) */
.home-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.9) 50%, transparent 58%) 130% 0 / 250% 100% no-repeat;
  -webkit-mask: url("/assets/kleo-logo.webp") center / 100% 100% no-repeat;
  mask: url("/assets/kleo-logo.webp") center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  animation: home-shine 5s ease-in-out 1.2s infinite;
}
@keyframes home-shine {
  0% { background-position: 130% 0; }
  30%, 100% { background-position: -30% 0; }
}
/* little four-point glints that pop on the facets */
.home-spark {
  --z: 1;
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: calc(clamp(28px, 5vw, 46px) * var(--z));
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 7%, rgba(210, 248, 255, 0.85) 14%, rgba(76, 201, 255, 0.4) 30%, transparent 64%);
  opacity: 0;
  animation: home-spark 3.4s ease-in-out var(--d) infinite;
}
.home-spark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(50% 0, 54% 46%, 100% 50%, 54% 54%, 50% 100%, 46% 54%, 0 50%, 46% 46%);
}
@keyframes home-spark {
  0%, 100% { opacity: 0; scale: 0.2; rotate: 0deg; }
  12% { opacity: 1; scale: 1; }
  24% { opacity: 0; scale: 0.3; rotate: 45deg; }
}
.home-kicker {
  margin: 18px 0 0;
  font-size: clamp(13px, 1.8vw, 16px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
  animation: lb-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  animation: lb-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}
/* the code reads "Kleo" even inside all-caps text */
.home-hero .code-name { text-transform: capitalize; }
.home-actions .lb-btn { min-height: 54px; padding: 14px 26px; font-size: 15px; border-radius: 999px; }
/* View Leaderboard: a dark glass pill whose crystal rim slowly turns, with a glowing arrow chip */
@property --cta-rim {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.home-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 14px 12px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 50, 90, 0.85), rgba(6, 14, 28, 0.9));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 32px -12px rgba(76, 201, 255, 0.9);
  transition: box-shadow 0.2s ease;
}
.home-cta::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--cta-rim), rgba(76, 201, 255, 0.25), #8fe3ff 25%, #fff 32%,
    rgba(76, 201, 255, 0.25) 45%, rgba(76, 201, 255, 0.25) 75%, #8fe3ff 92%, rgba(76, 201, 255, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: cta-rim 5s linear infinite;
}
@keyframes cta-rim { to { --cta-rim: 360deg; } }
.home-cta-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8fe3ff, var(--brand));
  color: var(--brand-ink);
  box-shadow: 0 0 14px -2px rgba(76, 201, 255, 0.8);
}
.home-cta-arrow svg { transition: transform 0.2s ease; }
.home-cta:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 38px -10px rgba(76, 201, 255, 1); }
.home-cta:hover .home-cta-arrow svg { transform: translateX(2px); }
.home-cta:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
/* socials under the buttons: a row of glass pills with icon + name */
.home-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  animation: lb-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
}
.home-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  background: rgba(6, 13, 26, 0.7);
  box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 0.18s ease, background-color 0.18s ease;
}
.home-social svg { color: var(--brand); }
.home-social:hover { background: rgba(76, 201, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.65), 0 0 18px -6px rgba(76, 201, 255, 0.8); }
.home-social:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
html.arrive .home-socials { animation: none; }
@media (max-width: 720px) {
  .home-socials { gap: 8px; }
  .home-social { padding: 10px; }
  .home-social span { display: none; }   /* icons only on phones so they fit on one line */
}
.home-legal {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 1;
  margin: 0;
  font-size: 12px;
  color: var(--lb-soft);
}
.home-legal a { color: inherit; }
@media (max-width: 720px) {
  .home-actions { flex-direction: column; align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .home-logo-wrap, .home-logo, .logo-crown, .home-shine, .home-kicker, .home-actions, .home-socials { animation: none; }
  .home-spark { display: none; }
  .home-cta::before { animation: none; }
  .home-cta-arrow svg { transition: none; }
}

.banner {
  display: block;
  width: 100%;
  aspect-ratio: 2000 / 1094;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px -24px var(--brand);
  margin-bottom: 32px;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 24px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 32px 0 8px;
}
.countdown .unit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 76px;
  padding: 12px 8px;
  text-align: center;
}
.countdown .num {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.1;
}
.countdown .lbl {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.countdown-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Section ---------- */
.section { padding-top: 32px; padding-bottom: 32px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head .meta { color: var(--muted); font-size: 0.88rem; }

/* ---------- Podium ---------- */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}
.podium-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  position: relative;
}
.podium-card.rank-1 {
  padding-top: 36px;
  padding-bottom: 32px;
  border-color: var(--gold);
  box-shadow: 0 0 40px -12px var(--gold);
}
.podium-card.rank-1 { order: 2; }
.podium-card.rank-2 { order: 1; }
.podium-card.rank-3 { order: 3; }

.medal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin: 0 auto 12px;
  color: #10131a;
}
.rank-1 .medal { background: var(--gold); }
.rank-2 .medal { background: var(--silver); }
.rank-3 .medal { background: var(--bronze); }

.podium-card .name {
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-card .wagered-lbl {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 12px;
}
.podium-card .wagered {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.podium-card .prize {
  display: inline-block;
  margin-top: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Table ---------- */
.table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  display: grid;
  grid-template-columns: 64px 1fr 1fr 120px;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.row:first-child { border-top: 0; }
.row.head {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  background: var(--surface-2);
}
.row .rank { font-weight: 800; color: var(--muted); }
.row .player {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .right { text-align: right; }
.row .prize-cell { color: var(--brand); font-weight: 700; }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Cards grid (rewards / past) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.past-board { margin-bottom: 28px; }
.past-board .section-head h3 { margin: 0; font-size: 1.05rem; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

/* ---------- Slot Deck ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.deck-stage {
  --card-w: 250px;
  --card-h: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 8vw, 96px);
  padding-top: 16px;
  padding-bottom: 8px;
  perspective: 1400px;
}
.deck-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.deck {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 18px;
}
.deck:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.deck-card, .card-back {
  border-radius: 18px;
  background:
    repeating-linear-gradient(45deg, rgba(76, 201, 255, 0.07) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(-45deg, rgba(76, 201, 255, 0.07) 0 2px, transparent 2px 16px),
    radial-gradient(circle at 50% 40%, #16365e, #0a1830 70%);
  box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.35), inset 0 0 0 8px rgba(6, 13, 26, 0.6),
    inset 0 0 0 9px rgba(76, 201, 255, 0.25), 0 14px 30px -14px rgba(0, 0, 0, 0.7);
}
.deck-card { position: absolute; inset: 0; transition: transform 0.25s ease; }
.deck-card:nth-child(1) { transform: translate(8px, 8px) rotate(2deg); }
.deck-card:nth-child(2) { transform: translate(6px, 6px) rotate(-1.5deg); }
.deck-card:nth-child(3) { transform: translate(4px, 4px) rotate(1deg); }
.deck-card:nth-child(4) { transform: translate(2px, 2px) rotate(-0.5deg); }
.deck-card.top { background-image: none; display: grid; place-items: center; }
.deck-card.top, .card-back { position: absolute; inset: 0; }
.deck-card.top::after, .card-back img {
  content: "";
  width: 72%;
  aspect-ratio: 2 / 1;
  background: url("/assets/kleo-logo-sm.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 14px rgba(76, 201, 255, 0.35));
}
.deck-card.top {
  background:
    repeating-linear-gradient(45deg, rgba(76, 201, 255, 0.07) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(-45deg, rgba(76, 201, 255, 0.07) 0 2px, transparent 2px 16px),
    radial-gradient(circle at 50% 40%, #16365e, #0a1830 70%);
}
.card-back { display: grid; place-items: center; }
.card-back img { height: auto; object-fit: contain; background: none; }
.deck:hover .deck-card.top { transform: translateY(-6px) rotate(-1deg); }
.deck.shuffling .deck-card { animation: deck-shuffle 0.5s ease; }
.deck.shuffling .deck-card:nth-child(odd) { animation-direction: reverse; }
@keyframes deck-shuffle {
  0% { translate: 0 0; }
  25% { translate: -26px -4px; rotate: -6deg; }
  50% { translate: 22px 2px; rotate: 5deg; }
  75% { translate: -8px 0; rotate: -2deg; }
  100% { translate: 0 0; rotate: 0deg; }
}
.deck.low .deck-card:nth-child(-n+3) { opacity: 0; }
.deck-count { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

.reveal {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
}
.reveal-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px dashed var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}
.slot-card {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.slot-card.flying { transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.slot-card.flying .card-inner { transition: transform 0.75s cubic-bezier(0.3, 1.3, 0.5, 1) 0.1s; }
.slot-card.face-down .card-inner { transform: rotateY(180deg); }
.slot-card.shown { animation: card-float 5s ease-in-out 1.2s infinite; }
@keyframes card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
.slot-card.leaving {
  z-index: 1;
  transition: transform 0.45s ease-in, opacity 0.45s ease-in;
  transform: translate(60%, -12%) rotate(14deg);
  opacity: 0;
}
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.card-back { transform: rotateY(180deg); }
.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #4cc9ff, #1a6fd6 55%, #0a2a5c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 24px 50px -20px rgba(0, 0, 0, 0.75);
}
.slot-card[data-provider="other"] .card-front {
  background: linear-gradient(160deg, hsl(var(--hue) 85% 62%), hsl(calc(var(--hue) + 25) 70% 34%) 55%, hsl(calc(var(--hue) + 40) 65% 16%));
}
.slot-card[data-provider="pragmatic"] .card-front { background: linear-gradient(160deg, #ffb347, #ff5e3a 45%, #8f0f37); }
.slot-card[data-provider="hacksaw"] .card-front { background: linear-gradient(160deg, #3a3a3a, #121212 60%, #000); }
.slot-card[data-provider="nolimit"] .card-front { background: linear-gradient(160deg, #7b3cff, #2f0e7a 55%, #0b6b5a); }
/* Liquid-glass sheen gliding over the card face */
.card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.35) 47%, rgba(255, 255, 255, 0.08) 53%, transparent 65%) 0 0 / 300% 100% no-repeat,
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, 0.35), transparent 40%);
  animation: glass-sweep 6s ease-in-out infinite;
  pointer-events: none;
}
.card-corner {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.15;
  opacity: 0.85;
  text-align: center;
}
.card-corner.bottom { top: auto; left: auto; bottom: 12px; right: 14px; transform: rotate(180deg); }
.card-provider {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.slot-card[data-provider="hacksaw"] .card-provider { color: #f5f544; }
.card-name {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}
.card-play {
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-blur: 4px;
  --glass-edge: rgba(255, 255, 255, 0.5);
  --glass-shadow: rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}
.card-note { font-size: 0.68rem; opacity: 0.75; max-width: 90%; }

.deck-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-top: 28px;
  padding-bottom: 8px;
}
.deck-btn {
  --glass-bg: rgba(76, 201, 255, 0.16);
  --glass-blur: 10px;
  --glass-edge: rgba(76, 201, 255, 0.5);
  --glass-shadow: rgba(0, 0, 0, 0.5);
  border: 0;
  padding: 14px 28px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.deck-link {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: underline;
  cursor: pointer;
}
.deck-link:hover { color: var(--text); }
.history { display: flex; flex-wrap: wrap; gap: 10px; }
.history-empty { color: var(--muted); }
.history-chip {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.history-chip { box-shadow: inset 0 0 0 1px hsl(var(--hue, 200) 80% 62%); }
.history-chip:hover { background: var(--surface); }

/* Provider filter: one dropdown with a checkbox per provider */
.provider-filter { display: flex; justify-content: center; padding-top: 4px; padding-bottom: 8px; position: relative; z-index: 5; }
.pf-dd { position: relative; width: min(420px, 100%); }
.pf-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px 12px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.pf-trigger:hover { box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.55); }
.pf-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.pf-trigger[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px rgba(76, 201, 255, 0.12); }
.pf-trigger-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pf-trigger-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pf-trigger-value { font-size: 0.98rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-trigger.is-empty .pf-trigger-value { color: #ff8a8a; }
.pf-chevron { flex: none; color: var(--muted); transition: transform 0.25s ease, color 0.2s ease; }
.pf-trigger[aria-expanded="true"] .pf-chevron { transform: rotate(180deg); color: var(--brand); }

.pf-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 10px;
  border-radius: 16px;
  background: #0b1729;
  box-shadow: inset 0 0 0 1px var(--border), 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  animation: pf-open 0.18s ease;
}
@keyframes pf-open { from { opacity: 0; translate: 0 -6px; } }
.pf-panel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 2px 2px 10px; border-bottom: 1px solid var(--border); }
.pf-search {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}
.pf-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
.pf-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.pf-search input:focus { outline: none; }
.pf-search input::-webkit-search-cancel-button { filter: invert(0.7); }
.pf-actions { display: flex; gap: 4px; }
.pf-action {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.pf-action:hover { background: var(--brand-soft); }
.pf-action:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pf-list {
  display: flex;
  flex-direction: column;
  max-height: min(340px, 50vh);
  overflow-y: auto;
  padding-top: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.pf-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pf-option[hidden] { display: none; }
.pf-option:hover { background: var(--surface-2); }
.pf-option input { position: absolute; opacity: 0; pointer-events: none; }
.pf-box {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px var(--border);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.pf-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--hue) 75% 60%); }
.pf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-count { color: var(--muted); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-option:has(input:checked) { color: var(--text); }
.pf-option:has(input:checked) .pf-box { background: var(--brand); box-shadow: none; }
.pf-option:has(input:checked) .pf-box::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid var(--brand-ink);
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}
.pf-option:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; }
.pf-nomatch { margin: 0; padding: 16px 10px; color: var(--muted); font-size: 0.9rem; text-align: center; }
@media (prefers-reduced-motion: reduce) { .pf-panel { animation: none; } }
.deck:disabled { cursor: not-allowed; opacity: 0.45; }
.deck-btn:disabled { cursor: not-allowed; opacity: 0.5; }
@media (max-width: 720px) {
  .deck-stage { --card-w: 150px; --card-h: 210px; gap: 20px; }
  .deck-stage .card-name { font-size: 1.05rem; }
  .card-front { gap: 8px; padding: 18px 10px; }
  .card-play { padding: 8px 12px; font-size: 0.76rem; }
  .card-note { display: none; }
  .deck-card, .card-back, .card-face, .reveal-empty, .deck { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot-card.flying, .slot-card.flying .card-inner, .slot-card.leaving, .deck-card { transition: none; }
  .slot-card.shown, .deck.shuffling .deck-card, .card-front::after { animation: none; }
}

/* ---------- Maintenance (page listed in "maintenance" in config.json) ---------- */
body.maint main, body.maint .site-footer { filter: blur(12px) saturate(0.8); pointer-events: none; user-select: none; }
.maint-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;   /* above the page, below the top bar so the menu still works */
  display: grid;
  place-items: center;
  padding: 90px 16px 40px;
  overflow-y: auto;   /* short screens can scroll to the buttons */
  background: radial-gradient(60% 60% at 50% 45%, rgba(5, 12, 26, 0.35), rgba(5, 12, 26, 0.75));
  animation: maint-in 0.4s ease both;
}
@keyframes maint-in { from { opacity: 0; } }
.maint-card {
  width: min(520px, 100%);
  padding: 32px 28px 28px;
  border-radius: 24px;
  text-align: center;
  background: radial-gradient(80% 60% at 50% 0%, rgba(76, 201, 255, 0.16), transparent 70%), linear-gradient(180deg, rgba(20, 40, 70, 0.92), rgba(8, 17, 32, 0.95));
  box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.35), 0 30px 70px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(76, 201, 255, 0.5);
}
.maint-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(76, 201, 255, 0.3), rgba(6, 13, 26, 0.9) 72%);
  box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.55), 0 0 28px -6px rgba(76, 201, 255, 0.9);
  color: var(--brand);
}
.maint-title {
  margin: 16px 0 8px;
  font-family: "Anton", "Teko", sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d9f6ff 22%, #8fe3ff 48%, #4cc9ff 70%, #2a8ae8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #0c3a73) drop-shadow(0 0 22px rgba(76, 201, 255, 0.45));
}
.maint-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: rgba(234, 246, 255, 0.72); }
.maint-code { color: var(--brand); }
/* "Kleo" is always written "Kleo", even inside uppercase buttons and labels */
.as-written { text-transform: none; }
.maint-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.maint-actions .lb-btn { border-radius: 999px; min-height: 50px; }
.maint-home { padding: 12px 26px; }
/* ---------- Coming soon (page listed in "comingSoon" in config.json) ----------
   No card: the teaser sits straight on a darker veil over the blurred page, in the
   leaderboard's own type: crystal prize pool, gold "opens soon", an empty crowned podium. */
.cs-overlay { background: radial-gradient(70% 65% at 50% 48%, rgba(4, 9, 18, 0.55), rgba(4, 9, 18, 0.88)); }
.cs-wrap { width: min(560px, 100%); text-align: center; }
.cs-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 6px;
  font-family: "Teko", sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand);
}
.cs-kicker::before, .cs-kicker::after { content: ""; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, rgba(76, 201, 255, 0.8)); }
.cs-kicker::after { transform: scaleX(-1); }
.cs-title { margin: 0; }
.cs-pot { font-size: clamp(76px, 15vw, 132px); }
.cs-pot.cs-pot-word { font-size: clamp(50px, 13vw, 104px); }   /* "Leaderboard" while there's no prize amount yet */
.cs-opens {
  display: block;
  margin-top: 2px;
  font-family: "Teko", sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.6vw, 36px);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff3c2, #f5c542 55%, #c98d14);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90, 55, 0, 0.9));
}

/* the empty podium: 2nd · 1st · 3rd, each with its crown, its prize and a plinth */
.cs-podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 34px auto 0; }
.cs-spot { --metal: 201, 209, 223; display: flex; flex-direction: column; align-items: center; width: 128px; }
.cs-spot.r1 { --metal: 245, 197, 66; }
.cs-spot.r3 { --metal: 213, 138, 82; }
.cs-spot .lb-crown { position: static; width: 64px; transform: rotate(var(--tilt, 0deg)); transition: none; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 12px rgba(var(--metal), 0.45)); }
.cs-spot.r1 .lb-crown { width: 84px; }
.cs-spot.r2 .lb-crown { --tilt: -8deg; }
.cs-spot.r3 .lb-crown { --tilt: 8deg; }
.cs-prize { margin-top: 6px; font-family: "Teko", sans-serif; font-weight: 700; font-size: 30px; line-height: 1; color: rgb(var(--metal)); }
.cs-spot.r1 .cs-prize { font-size: 38px; text-shadow: 0 0 18px rgba(245, 197, 66, 0.5); }
.cs-open { margin-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(234, 246, 255, 0.45); }
.cs-plinth {
  display: grid;
  place-items: center;
  align-self: stretch;
  height: 44px;
  margin-top: 10px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(var(--metal), 0.22), rgba(var(--metal), 0.04) 85%);
  box-shadow: inset 0 1.5px 0 rgba(var(--metal), 0.85), inset 0 0 0 1px rgba(var(--metal), 0.18);
  font-family: "Anton", sans-serif;
  font-size: 22px;
  color: rgba(var(--metal), 0.55);
}
.cs-spot.r1 .cs-plinth { height: 66px; font-size: 28px; }
.cs-spot.r3 .cs-plinth { height: 32px; }
.cs-podium { border-bottom: 1px solid rgba(76, 201, 255, 0.25); }

.cs-copy { max-width: 400px; margin: 22px auto 0; font-size: 15.5px; line-height: 1.6; color: rgba(234, 246, 255, 0.7); }
.cs-copy b { color: var(--gold); }
.cs-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; }
.cs-cta { min-width: 240px; min-height: 52px; border-radius: 999px; font-size: 15px; }
.cs-link { color: rgba(234, 246, 255, 0.75); font-size: 14px; font-weight: 600; text-decoration: none; }
.cs-link span { display: inline-block; color: var(--brand); transition: translate 0.2s ease; }
.cs-link:hover { color: #fff; }
.cs-link:hover span { translate: 3px 0; }
.cs-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 480px) {
  .cs-podium { gap: 8px; }
  .cs-spot { width: 96px; }
  .cs-spot .lb-crown { width: 50px; }
  .cs-spot.r1 .lb-crown { width: 66px; }
  .cs-prize { font-size: 25px; }
  .cs-spot.r1 .cs-prize { font-size: 31px; }
  .cs-kicker { font-size: clamp(13px, 4.2vw, 16px); letter-spacing: 0.16em; white-space: nowrap; gap: 10px; }
  .cs-opens { font-size: clamp(21px, 6.6vw, 28px); letter-spacing: 0.08em; text-wrap: balance; }
  .cs-kicker::before, .cs-kicker::after { width: 24px; }
}

/* ---------- 404 (404.html) ---------- */
.nf-hero { padding-bottom: 70px; }
.nf-hero .lb-logo-wrap { width: clamp(180px, 26vw, 260px); margin: 56px auto 8px; }
.nf-text { max-width: 440px; margin: 14px auto 0; color: rgba(234, 246, 255, 0.68); font-size: 16px; line-height: 1.6; }
.nf-hero .home-actions .lb-btn { min-height: 54px; padding: 14px 26px; font-size: 15px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .maint-overlay { animation: none; } }

/* ---------- Footer ---------- */
/* A dark panel under a glowing crystal line: brand + code, page links, socials, then the 18+ note. */
.site-footer {
  --ft-soft: rgba(234, 246, 255, 0.6);
  --ft-line: rgba(76, 201, 255, 0.16);
  position: relative;
  margin-top: 88px;
  padding: 44px 0 26px;
  background:
    radial-gradient(600px 160px at 50% 0%, rgba(26, 111, 214, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(5, 12, 26, 0.6), rgba(3, 7, 15, 0.92));
  color: var(--ft-soft);
  font-size: 14px;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 201, 255, 0.7) 30%, rgba(245, 197, 66, 0.7) 50%, rgba(76, 201, 255, 0.7) 70%, transparent);
  box-shadow: 0 0 14px rgba(76, 201, 255, 0.6);
}
.ft-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 40px;
}
/* the brand block sits centred against the Pages and Socials columns */
.ft-brand { align-self: center; }
/* footer logo with the same floating crown as the big logos (room above for it) */
.ft-logo-wrap { position: relative; display: block; width: 132px; margin-top: 30px; }
.ft-logo { position: relative; z-index: 1; display: block; width: 132px; height: auto; filter: drop-shadow(0 6px 18px rgba(76, 201, 255, 0.3)); }
.ft-brand p { margin: 10px 0 0; line-height: 1.6; }
.ft-brand p strong { color: var(--brand); }

.ft-col h2 {
  margin: 4px 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
nav.ft-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
nav.ft-col a { color: var(--ft-soft); text-decoration: none; font-weight: 600; transition: color 0.18s ease; }
nav.ft-col a:hover, nav.ft-col a[aria-current] { color: var(--brand); }
.ft-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  border-radius: 12px;
  background: rgba(6, 13, 26, 0.75);
  box-shadow: inset 0 0 0 1px var(--ft-line);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 0.18s ease, background-color 0.18s ease;
}
.ft-socials svg { color: var(--brand); }
.ft-socials a:hover { background: rgba(76, 201, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.6), 0 0 18px -6px rgba(76, 201, 255, 0.8); }
nav.ft-col a:focus-visible, .ft-socials a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.ft-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--ft-line);
}
.ft-age {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(76, 201, 255, 0.7), 0 0 14px -4px rgba(76, 201, 255, 0.7);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}
.ft-disclaimer { flex: 1; margin: 0; font-size: 12.5px; line-height: 1.55; }
.ft-disclaimer strong { color: #fff; }
.ft-disclaimer a { color: var(--brand); }
.ft-copy { flex: none; font-size: 12.5px; font-weight: 600; }

/* The footer flame phoenix. At rest: dimmed, wings slightly lowered, tail gathered.
   On hover / focus / tap (.lit): the wings open, the tail fans, a warm glow swells
   and embers drift up. Smooth eases, no bounce. */
.ft-phoenix { flex: none; display: block; width: 62px; height: 62px; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.ft-phoenix .ph { width: 100%; height: 100%; overflow: visible; }
.ph * { transform-box: view-box; }
.ph-bird { filter: saturate(0.7) brightness(0.88); transition: filter 0.5s ease; }
.ph-wing { transform-origin: 56px 50px; rotate: 10deg; transition: rotate 0.65s cubic-bezier(0.25, 0.8, 0.25, 1); }
.ph-tail { transform-origin: 60px 76px; scale: 0.85 0.9; transition: scale 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.ph-glow { opacity: 0.2; transform-origin: 60px 56px; scale: 0.8; transition: opacity 0.5s ease, scale 0.6s ease; }
.ph-embers circle { fill: #ffd56e; opacity: 0; transform-box: fill-box; }

.ft-phoenix:is(:hover, :focus-visible, .lit) .ph-bird { filter: saturate(1.1) brightness(1.08); }
.ft-phoenix:is(:hover, :focus-visible, .lit) .ph-wing { rotate: -6deg; }
.ft-phoenix:is(:hover, :focus-visible, .lit) .ph-tail { scale: 1; }
.ft-phoenix:is(:hover, :focus-visible, .lit) .ph-glow { opacity: 1; scale: 1; animation: ph-glow 1.8s ease-in-out 0.5s infinite alternate; }
@keyframes ph-glow { from { opacity: 0.75; } to { opacity: 1; } }

/* embers: each drifts up and a little sideways on its own timing */
.ph-embers circle:nth-child(1) { --dx: -5px; animation-delay: 0s; }
.ph-embers circle:nth-child(2) { --dx: 5px; animation-delay: 0.4s; }
.ph-embers circle:nth-child(3) { --dx: -3px; animation-delay: 0.8s; }
.ph-embers circle:nth-child(4) { --dx: 3px; animation-delay: 1.1s; }
.ph-embers circle:nth-child(5) { --dx: -4px; animation-delay: 0.25s; }
.ph-embers circle:nth-child(6) { --dx: 4px; animation-delay: 0.65s; }
.ph-embers circle:nth-child(7) { --dx: -2px; animation-delay: 0.95s; }
.ph-embers circle:nth-child(8) { --dx: 2px; animation-delay: 1.3s; }
.ft-phoenix:is(:hover, :focus-visible, .lit) .ph-embers circle { animation-name: ph-ember; animation-duration: 1.6s; animation-timing-function: ease-out; animation-iteration-count: infinite; }
@keyframes ph-ember {
  0% { opacity: 0; translate: 0 0; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: var(--dx) -26px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-wing, .ph-tail, .ph-glow, .ph-bird { transition: none; }
  .ft-phoenix:is(:hover, :focus-visible, .lit) :is(.ph-glow, .ph-embers circle) { animation: none; }
}

@media (max-width: 720px) {
  .site-footer { margin-top: 64px; padding-top: 34px; }
  .ft-main { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .ft-brand { grid-column: 1 / -1; }
  .ft-bottom { flex-wrap: wrap; align-items: flex-start; }
  .ft-disclaimer { flex-basis: calc(100% - 56px); }
  .ft-copy { flex: 1; align-self: center; padding-left: 56px; }   /* copyright and phoenix share the last line */
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .site-header { padding: 10px 0; }
  .site-header .wrap { justify-content: center; }
  .nav { width: 100%; }
  /* five links on a phone: the text scales with the screen so they always fit */
  .nav a { flex: 1 1 auto; min-width: 0; text-align: center; padding: 9px 3px; font-size: clamp(0.6rem, 2.95vw, 0.78rem); }

  .podium { grid-template-columns: 1fr; }
  .podium-card.rank-1 { order: 1; }
  .podium-card.rank-2 { order: 2; }
  .podium-card.rank-3 { order: 3; }

  .row {
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .steps { grid-template-columns: 1fr; }
  .countdown .unit { min-width: 64px; }
  .countdown .num { font-size: 1.5rem; }
}
