/* ==========================================================================
   Home page + shared blocks (countdown, medals, spotlight, stream band)
   ========================================================================== */

/* ---------- countdown: each digit rolls on its own ---------- */
.cd-row { display: flex; gap: 8px; }
.cd { display: grid; justify-items: center; gap: 6px; min-width: 72px; padding: 13px 10px 11px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--highlight); }
.cd__n { display: flex; font: 700 28px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; transition: color 0.4s var(--ease); }
.dg { display: inline-grid; overflow: hidden; }
.dg i { grid-area: 1 / 1; font-style: normal; }
.dg .in { animation: dg-in 0.65s var(--ease) both; }
.dg .out { animation: dg-out 0.65s var(--ease) both; }
@keyframes dg-in { from { transform: translateY(-100%); } }
@keyframes dg-out { to { transform: translateY(100%); } }
.cd__l { color: var(--dim); font: 600 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.cd-row.is-ended .cd__n { color: var(--dim); }
.cd-row--sm { gap: 6px; }
.cd-row--sm .cd { flex: 1; min-width: 0; gap: 4px; padding: 9px 4px 8px; border-radius: var(--r-sm); background: var(--bg-2); border-color: var(--line); box-shadow: none; }
.cd-row--sm .cd__n { font-size: 18px; }
.cd-row--sm .cd__l { font-size: 9px; }

/* ---------- rank medals ---------- */
.medal { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font: 700 12px/1 var(--f-mono); }
.medal--1 { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: var(--ink); }
.medal--2 { background: linear-gradient(135deg, var(--silver-hi), var(--silver)); color: var(--ink); }
.medal--3 { background: linear-gradient(135deg, var(--bronze-hi), var(--bronze)); color: var(--ink); }

/* ---------- home hero: asymmetric editorial split ---------- */
.hero { padding-top: clamp(28px, 5vw, 56px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 52px); align-items: center; }
.hero__main { display: grid; justify-items: start; gap: 20px; text-align: left; }
.hero__meta { display: inline-flex; align-items: center; gap: 12px; }
.hero__mark .mark { width: 42px; }
.hero__mark .mark__chip { animation: chip-roll 1.4s var(--ease) backwards 0.1s; }
@keyframes chip-roll { from { transform: rotate(-180deg); } }
.hero__kicker { margin: 0; }
.hero__title { font: 800 clamp(38px, 5vw, 64px)/0.96 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; }
.hero__title .gold-text { display: block; margin-bottom: 0.06em; font-size: 1.38em; line-height: 0.92; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #ffe299 0%, var(--yolk) 55%, #e58e00 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text { max-width: 50ch; color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); line-height: 1.65; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero__code { display: inline-flex; align-items: center; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 20px 36px; width: 100%; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero__stats div { display: grid; gap: 4px; }
.hero__stats dt { color: var(--dim); font: 600 11px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.hero__stats dd { font: 800 24px/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- hero spotlight card ---------- */
.spot {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%), var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 32px 64px -32px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}
.spot::before { content: ''; position: absolute; top: -60px; right: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 176, 32, 0.16), transparent 68%); pointer-events: none; }
.spot__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.spot__title { display: grid; gap: 5px; }
.spot__pool-row { display: grid; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
.spot__pool { font: 800 clamp(32px, 3.6vw, 44px)/0.95 var(--f-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.spot__sub { margin-top: 4px; color: var(--muted); font-size: 13px; }
.spot__cd { display: grid; gap: 7px; }
.spot__list { border-top: 0 !important; }
.spot__list li:last-child { border-bottom: 0; padding-bottom: 2px; }
.spot__foot { padding-top: 4px; }

/* ---------- home: race cards ---------- */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 20px; }
.bcard {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 45%), var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: transform 0.45s var(--ease), border-color 0.35s var(--ease), box-shadow 0.45s var(--ease);
}
.bcard:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 28px 48px -28px rgba(0, 0, 0, 0.95); }
.bcard__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bcard__name { display: grid; gap: 4px; }
.bcard__badges { display: flex; align-items: center; gap: 6px; }
.bcard__tag { color: var(--dim); font-size: 13px; }
.bcard__hero { display: grid; gap: 4px; }
.bcard__pool { color: var(--yolk); font: 800 46px/0.95 var(--f-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.bcard__timer { display: grid; gap: 8px; }
.bcard__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bcard__list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bcard__who { display: grid; min-width: 0; }
.bcard__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.bcard__who span { color: var(--dim); font: 500 12px/1.3 var(--f-mono); }
.bcard__prize { color: var(--yolk); font: 700 14.5px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.bcard__label { color: var(--dim); font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- home: stream band (editorial dark + amber glow) ---------- */
.stream {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  padding: clamp(28px, 4.5vw, 44px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(520px 260px at 88% 20%, rgba(255, 176, 32, 0.16), transparent 68%),
    radial-gradient(420px 240px at 12% 90%, rgba(83, 252, 24, 0.08), transparent 68%),
    var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.stream__copy { display: grid; gap: 10px; max-width: 540px; }
.stream__copy .h2 { font-size: clamp(26px, 3.2vw, 36px); }
.stream__copy p { color: var(--muted); font-size: 15.5px; }
.stream__status { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted); font: 600 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.stream__status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.stream__status.is-live { background: rgba(255, 77, 90, 0.14); border-color: rgba(255, 77, 90, 0.32); color: #ff8a93; }
.stream__status.is-live::before { opacity: 1; animation: blink 1.4s var(--ease-io) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.stream__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stream .btn .plat { width: 1.15em; height: 1.15em; transform: none; }

/* ---------- page heads ---------- */
.page-head { display: grid; justify-items: start; gap: 12px; padding: clamp(8px, 2vw, 18px) 0 clamp(24px, 4vw, 36px); text-align: left; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__code { width: 100%; }
  .hero__code .codechip { width: 100%; justify-content: space-between; }
  .hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero__stats dt { font-size: 10px; }
  .hero__stats dd { font-size: 19px; }
  .cd-row { gap: 6px; }
  .cd { flex: 1; min-width: 0; padding: 11px 4px 10px; }
  .cd__n { font-size: 22px; }
  .bcard, .spot { padding: 20px; }
}
