* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Inter, "Segoe UI", sans-serif; color: #f8f4ff; background: #0b0c18; --gold: #ffcf69; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #87e8ff; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.live {
  min-height: 100svh;
  background:
    linear-gradient(126deg, transparent 0 83%, #2f1447 83.1% 84%, transparent 84.1%) fixed,
    linear-gradient(126deg, transparent 0 86%, #5f1649 86.1% 88%, #1d102d 88.1%) fixed,
    radial-gradient(ellipse at 48% 2%, #24173e, transparent 65%),
    #0b0c18;
}
.arena {
  width: min(88%, 1640px);
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(22px, 3.5vh, 50px) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.5vh, 32px);
}
.hero { position: relative; display: grid; justify-items: center; padding-bottom: clamp(2px, 1.2vh, 16px); }
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4em;
  text-transform: uppercase;
  color: #d9c5ee;
  font: 760 clamp(11px, 1.1vw, 19px)/1.4 "Segoe UI", sans-serif;
  letter-spacing: .18em;
}
.connection { display: inline-flex; align-items: center; gap: .55em; white-space: nowrap; }
.connection::before { content: ''; width: .65em; height: .65em; border-radius: 50%; background: #ffc878; }
.connection[data-state="online"]::before { background: #50f6b4; box-shadow: 0 0 .6em #50f6b46b; }
.wordmark {
  margin: .07em 0 0;
  display: inline-block;
  font: italic 1000 clamp(53px, min(9.5vw, 15vh), 166px)/.96 "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  letter-spacing: -.09em;
  transform: skewX(-5deg);
  text-decoration: none;
  color: #fff;
  padding: 0 .12em .045em 0;
  text-shadow: 0 .04em 0 #6d547c, 0 .11em .25em #0005;
}
.wordmark span { color: #ff55ab; text-shadow: 0 .04em 0 #9c286c, 0 0 .34em #ff2d9f35; }
.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.6vw, 26px);
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
.brand-badge {
  position: relative;
  display: block;
  flex: none;
  width: clamp(35px, 6.7vw, 116px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #f8f4ff;
  border-radius: 24%;
  background: #f8f8f6;
  box-shadow: 0 5px 24px #10081966;
}
.brand-badge img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 155%;
  height: 155%;
  transform: translate(-50%, -49%);
}
.boards { display: grid; gap: clamp(9px, 1.45vh, 18px); min-width: 0; }
.lane { --accent: #ff796d; --light: #ffb39e; --depth: #3a202b; min-width: 0; }
.tone-1 { --accent: #44d8ff; --light: #9cecff; --depth: #132f49; }
.tone-2 { --accent: #ad8bff; --light: #d7c2ff; --depth: #2a214d; }
.tone-3 { --accent: #42e5be; --light: #9af8df; --depth: #123b39; }
.lane-front {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.22fr) minmax(0, .92fr);
  align-items: center;
  min-height: clamp(73px, 12.5vh, 140px);
  position: relative;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--accent) 57%, #291839);
  border-radius: clamp(10px, 1.1vw, 19px);
  background: linear-gradient(115deg, var(--depth), #151020 78%);
  box-shadow: 0 6px 18px #0b071077;
}
.tone-3 .lane-front {
  border-width: 2px;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px #ffcf694d, 0 0 18px #ffcf6924, inset 0 0 0 1px #ffcf6930;
}
.lane-title {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: clamp(9px, 1.15vw, 22px);
  padding: 12px clamp(19px, 2.3vw, 44px) 12px clamp(12px, 1.5vw, 29px);
  border-radius: inherit;
  margin: 0;
  color: #160c23;
  background: linear-gradient(110deg, var(--light), var(--accent) 72%);
  clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 0 100%);
  font: 950 clamp(15px, 2.13vw, 43px)/1.03 "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.045em;
}
.lane-copy { min-width: 0; }
.lane-copy .lane-label { margin: 0; font: inherit; overflow-wrap: anywhere; }
.lane-copy .lane-label.is-long { font-size: .8em; }
.lane-subtitle {
  margin: .34em 0 0;
  font-size: .54em;
  font-weight: 730;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.lane-icon {
  display: grid;
  place-items: center;
  width: clamp(28px, 3.5vw, 62px);
  aspect-ratio: 1;
  flex: none;
  background: #160c23;
  color: var(--light);
  border-radius: 25%;
}
.lane-icon svg { width: 65%; }
.lane-identity {
  min-width: 0;
  margin-left: clamp(10px, 1.7vw, 32px);
  padding-block: 7px;
}
.handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 820;
  font-size: clamp(17px, 3.03vw, 60px);
  letter-spacing: -.045em;
}
.lane-prize {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px .55em;
  width: fit-content;
  max-width: 100%;
  margin-top: .28em;
  padding: .2em .55em .24em;
  border: 1px solid #c69443;
  border-radius: .43em;
  background: #302219;
  color: #ffe2a1;
  font-size: clamp(11px, 1.23vw, 24px);
  font-weight: 760;
  line-height: 1.17;
  overflow-wrap: anywhere;
}
.lane-prize strong {
  color: var(--gold);
  font-size: .76em;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lane-prize span { min-width: 0; }
.score {
  color: var(--light);
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: .13em;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  padding: .1em clamp(9px, 1.65vw, 32px) .12em .08em;
  font: 950 clamp(21px, 4.1vw, 82px)/1.08 "Arial Black", "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
}
.unit { font-size: .32em; letter-spacing: -.015em; }
.score-value { display: inline-grid; align-items: baseline; position: relative; }
.score-value > :is(.digits, .score-reserve) { grid-area: 1 / 1; text-align: right; }
.score-reserve { visibility: hidden; }
.empty { color: #c4b3d2; }
.handle.empty { font-size: clamp(15px, 2.1vw, 43px); font-weight: 650; }
.board-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.board-footer :is(button, a) {
  display: inline-flex;
  align-items: center;
  border: 1px solid #795c91;
  background: #1f142d;
  color: #e8dcf4;
  border-radius: 9px;
  min-height: 44px;
  padding: 8px 14px;
  font-weight: 650;
  text-decoration: none;
}
.board-footer :is(button, a):hover { background: #39224c; }
.board-footer span { font-size: 1.2em; margin-left: .25em; }
.more-ranks {
  list-style: none;
  padding: 3px 0 0;
  margin: 0 12px;
  border-inline: 1px solid var(--depth);
}
.rank-row { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; align-items: center; min-height: 45px; background: #190f25; border-bottom: 1px solid #301e42; padding-left: 12px; gap: 6px; }
.rank { color: var(--light); font-weight: 750; font-variant-numeric: tabular-nums; }
.rank-name { overflow-wrap: anywhere; font-weight: 700; }
.rank-row .score { font-size: clamp(19px, 2vw, 29px); }
.score-impact {
  --outer: #ff451d;
  --mid: #ff9a29;
  --core: #fff3ad;
  --score-time: 1.2s;
  position: relative;
  isolation: isolate;
}
.score-impact.cool { --outer: #285edb; --mid: #47ceff; --core: #e2fbff; }
.changing .digits { animation: ignite var(--score-time) ease-out both; }
.fire {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.fire-curtain {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 71% 48%, #fff3c854, transparent 62%),
    linear-gradient(108deg, color-mix(in srgb, var(--outer) 60%, #1a1124), var(--mid) 54%, var(--outer));
  animation: fire-cover var(--score-time) linear both;
}
.fire-wave, .fire-embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fire-wave {
  filter: drop-shadow(0 0 6px var(--core)) drop-shadow(0 0 13px var(--outer));
  animation: score-sweep var(--score-time) linear both;
}
.fire-silhouette { fill: var(--outer); }
.fire-middle { fill: var(--mid); }
.fire-core, .fire-embers circle { fill: var(--core); }
.fire-trails, .fire-embers path {
  fill: none;
  stroke: var(--core);
  stroke-width: 2.5px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.fire-trails { opacity: .62; }
.fire-embers { animation: score-embers var(--score-time) ease-out both; }
.fire-wash {
  position: absolute;
  inset: 18% -7% 12%;
  border-radius: 44%;
  background: radial-gradient(ellipse at 59% 55%, var(--core) 0 6%, var(--mid) 34%, var(--outer) 54%, transparent 72%);
  filter: blur(8px);
  animation: heat-wake var(--score-time) ease-out both;
}
.sparks { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--core); stroke-width: 2; stroke-linecap: round; }
@keyframes fire-cover {
  0%, 11% { transform: translateX(-105%); opacity: 0; }
  25% { transform: translateX(-56%); opacity: .56; }
  40%, 51% { transform: translateX(0); opacity: 1; }
  72% { transform: translateX(58%); opacity: .2; }
  87%, 100% { transform: translateX(105%); opacity: 0; }
}
@keyframes score-sweep {
  0%, 10% { transform: translate(-104%, 11%) scale(.7, .61); opacity: 0; }
  25% { transform: translate(-44%, 3%) scale(.94, .83); opacity: .93; }
  43% { transform: translate(0, -7%) scale(1.13, 1.02); opacity: 1; }
  52% { transform: translate(15%, -10%) scale(1.14, .93); opacity: 1; }
  72% { transform: translate(77%, -10%) scale(.82, .64); opacity: .45; }
  90%, 100% { transform: translate(113%, -15%) scale(.63, .47); opacity: 0; }
}
@keyframes heat-wake {
  0%, 10% { transform: translateX(-66%) scale(.62, .52); opacity: 0; }
  41%, 48% { transform: translateX(0) scale(1.08, .91); opacity: .84; }
  69% { transform: translateX(38%) scale(.91, .58); opacity: .25; }
  91%, 100% { transform: translateX(75%) scale(.82, .4); opacity: 0; }
}
@keyframes score-embers {
  0%, 20% { transform: translate(-26%, 8%) scale(.73); opacity: 0; }
  42% { opacity: .95; }
  74% { opacity: .66; }
  100% { transform: translate(28%, -24%) scale(1.09); opacity: 0; }
}
@keyframes ignite {
  0%, 100% { color: var(--light); opacity: 1; }
  14%, 31%, 64% { color: var(--core); opacity: 1; text-shadow: 0 0 .16em var(--mid), 0 0 .31em var(--outer); }
  42%, 51% { color: var(--core); opacity: .04; text-shadow: 0 0 .16em var(--mid); }
  85% { color: var(--light); text-shadow: 0 0 .09em var(--mid); }
}
.has-leader { animation: leader-frame 2s ease-out both; }
.celebration {
  position: absolute;
  z-index: 4;
  right: 1.5%;
  top: 2%;
  max-width: 63%;
  background: #211031;
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 0 1.8rem var(--depth);
  border-radius: 8px;
  padding: .38em .74em;
  display: grid;
  font-size: clamp(11px, 1.15vw, 20px);
  font-weight: 650;
  pointer-events: none;
  animation: leader-label 2s both;
}
.celebration strong { color: var(--light); letter-spacing: .08em; }
.celebration span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.leader-particles {
  --core: var(--light);
  position: absolute;
  inset: 0 0 auto auto;
  width: min(35%, 390px);
  height: 100%;
  pointer-events: none;
  animation: leader-particles 1.95s ease-out both;
}
@keyframes leader-particles {
  0%, 100% { opacity: 0; }
  25% { opacity: .7; }
  100% { transform: translateY(-14px) scale(1.1); }
}
@keyframes leader-label {
  0%, 100% { opacity: 0; transform: translateY(-9px); }
  12%, 88% { opacity: 1; transform: translateY(0); }
}
@keyframes leader-frame {
  25% { box-shadow: 0 0 24px var(--accent), inset 0 0 24px var(--depth); }
}
@media (max-width: 800px) {
  .arena { width: 94%; }
  .lane-front { min-height: clamp(74px, 12vh, 100px); }
  .lane-title { font-size: clamp(12px, 2.6vw, 21px); }
}
@media (max-width: 520px) {
  .arena { gap: 19px; }
  .hero .wordmark { font-size: clamp(36px, 11.35vw, 55px); }
  .lane-front { min-height: 74px; grid-template-columns: minmax(0, .93fr) minmax(0, .95fr) minmax(0, .75fr); }
  .lane-title { flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 8px 17px 8px 9px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
  .lane-icon { width: 22px; }
  .lane-identity { margin-left: 7px; }
  .handle { font-size: 16px; }
  .lane-subtitle { font-size: 10px; }
  .score { font-size: clamp(16px, 4.7vw, 24px); }
  .board-footer :is(button, a) { padding: 7px 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .fire, .leader-particles { display: none; }
}
