/* ============================================================
   SCREENS — title / driver / network / garage / results
   ============================================================ */

.screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  opacity: 0;
}
.screen.is-active { display: block; animation: screen-in var(--t-slow) var(--ease-out) forwards; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Centred modal-style screens */
.screen--center {
  display: none;
  place-items: center;
  padding: 24px;
}
.screen--center.is-active { display: grid; }

/* ---- Global corner rig (persistent across menu screens) ----- */

.rig {
  position: fixed;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rig--tr { top: 22px; right: 24px; }
.rig--tl { top: 22px; left: 24px; }
.rig--bl { bottom: 22px; left: 24px; }

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--f-display);
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--txt-hi);
  transform: skewX(-7deg);
}
.wordmark i { font-style: normal; color: var(--ember); }

.linkchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-hi);
  background: linear-gradient(155deg, rgba(30, 48, 104, 0.78), rgba(10, 20, 48, 0.9));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(50, 73, 154, 0.9), var(--lift-1);
  clip-path: polygon(11px 0%, 100% 0%, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0% 100%, 0% 11px);
  overflow: hidden;
  transition: color var(--t-fast), transform var(--t-med) var(--ease-out),
              box-shadow var(--t-med);
}
.linkchip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--chip-accent, var(--aqua));
  opacity: 0;
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med);
}
.linkchip > * { position: relative; z-index: 1; }
.linkchip:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--chip-accent, var(--aqua)),
              0 10px 30px rgba(2, 6, 18, 0.6),
              0 0 26px var(--chip-glow, var(--aqua-glow));
}
.linkchip:hover::before { opacity: 0.16; transform: translateY(0); }
.linkchip img { width: 18px; height: 18px; object-fit: contain; }
.linkchip svg { width: 16px; height: 16px; }

.linkchip--pump { --chip-accent: var(--mint); --chip-glow: var(--mint-glow); }
.linkchip--x    { --chip-accent: var(--txt-hi); --chip-glow: rgba(255, 255, 255, 0.35); padding: 0 16px; }

/* live status pill */
.statuspill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
  background: linear-gradient(155deg, rgba(23, 161, 119, 0.22), rgba(10, 20, 48, 0.9));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(70, 229, 176, 0.45);
  clip-path: polygon(11px 0%, 100% 0%, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0% 100%, 0% 11px);
}
.statuspill i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint-glow);
  animation: badge-pulse 2s var(--ease-in-out) infinite;
}
.statuspill.is-off { color: var(--txt-dim); box-shadow: inset 0 0 0 1px var(--line); background: rgba(10,20,48,0.9); }
.statuspill.is-off i { background: var(--txt-ghost); box-shadow: none; animation: none; }

/* ---- Step rail: where you are in the flow ------------------- */

.steprail {
  position: fixed;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 380;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.steprail.is-on { display: flex; }
.steprail__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 30px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-ghost);
  transition: color var(--t-med);
}
.steprail__item::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width var(--t-med) var(--ease-out);
}
.steprail__item.is-done { color: var(--txt-dim); }
.steprail__item.is-now  { color: var(--ember); }
.steprail__item.is-now::before { width: 34px; height: 2px; }

/* ============================================================
   01 — TITLE
   ============================================================ */

#s-title { display: none; }
#s-title.is-active { display: block; }

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero {
  position: absolute;
  left: clamp(26px, 6.5vw, 116px);
  top: 50%;
  transform: translateY(-56%);
  z-index: 10;
  max-width: min(660px, 52vw);
  pointer-events: none;
}
.hero > * { pointer-events: auto; }

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.hero__rule {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  box-shadow: var(--neon-pink);
}

/* ---- Wordmark ------------------------------------------------
   Two stacked lines, generous leading so nothing collides, and a
   real neon treatment: a cream top line lit from behind, a gradient
   bottom line with a light sweep running across it.
   -------------------------------------------------------------- */

.hero__title {
  font-family: var(--f-display);
  font-size: clamp(72px, 12.5vw, 205px);
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  transform: skewX(-8deg);
  margin-left: -0.03em;
}
.hero__title span { display: block; position: relative; }

/* "THE" is three letters against a five-letter mark, so it rides
   above as a letterspaced kicker rather than trying to balance
   SPEEX as an equal line. */
.hero__title .l1 {
  font-size: 0.30em;
  letter-spacing: 0.44em;
  line-height: 1;
  margin-bottom: 0.10em;
  margin-left: 0.1em;
  color: var(--txt-hi);
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(168, 244, 255, 0.5),
    0 0 52px rgba(53, 223, 240, 0.4);
  animation: neon-breathe 4.5s var(--ease-in-out) infinite;
}

.hero__title .l2 {
  margin-top: 0.02em;
  background: linear-gradient(178deg,
    #FFF6EC 2%, var(--gold-hi) 22%, var(--pink-hi) 52%, var(--pink) 78%, var(--pink-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 0 18px var(--pink-glow))
    drop-shadow(0 0 56px rgba(255, 63, 164, 0.4))
    drop-shadow(0 5px 0 rgba(7, 14, 34, 0.6));
}

/* the sweep: a bright band that crosses the lower line on a loop */
.hero__title .l2::after {
  content: attr(data-t);
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.92);
  -webkit-background-clip: initial;
  background-clip: initial;
  mask-image: linear-gradient(105deg, transparent 42%, #000 50%, transparent 58%);
  -webkit-mask-image: linear-gradient(105deg, transparent 42%, #000 50%, transparent 58%);
  mask-size: 300% 100%;
  -webkit-mask-size: 300% 100%;
  animation: title-sweep 5.5s var(--ease-in-out) 1.2s infinite;
  pointer-events: none;
}

@keyframes title-sweep {
  0%   { mask-position: 120% 0; -webkit-mask-position: 120% 0; opacity: 0; }
  8%   { opacity: 1; }
  38%  { mask-position: -60% 0; -webkit-mask-position: -60% 0; opacity: 1; }
  46%  { opacity: 0; }
  100% { mask-position: -60% 0; -webkit-mask-position: -60% 0; opacity: 0; }
}

@keyframes neon-breathe {
  0%, 100% { text-shadow:
      0 0 2px rgba(255,255,255,0.9), 0 0 24px rgba(168,244,255,0.45),
      0 0 62px rgba(53,223,240,0.35), 0 6px 0 rgba(7,14,34,0.55); }
  50%      { text-shadow:
      0 0 2px rgba(255,255,255,1), 0 0 34px rgba(168,244,255,0.6),
      0 0 88px rgba(53,223,240,0.5), 0 6px 0 rgba(7,14,34,0.55); }
}

.hero__tm {
  position: absolute;
  right: -0.34em;
  top: 0.06em;
  font-family: var(--f-ui);
  font-size: 0.13em;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--txt-dim);
  -webkit-text-fill-color: var(--txt-dim);
  filter: none;
}

.hero__sub {
  margin-top: 26px;
  max-width: 460px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--txt);
}
.hero__sub b { color: var(--gold); font-weight: 600; }
.hero__sub em { font-style: normal; color: var(--aqua); font-weight: 600; }

.hero__cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Contract chip ------------------------------------------
   Sits under the buttons where the eye lands next. Inert and calm
   while it says SOON; click-to-copy once there is an address. */
.castrip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  height: 42px;
  padding: 0 8px 0 16px;
  background: linear-gradient(140deg, rgba(255, 201, 60, 0.12), rgba(10, 20, 48, 0.85));
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 60, 0.4);
  clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
  cursor: default;
  transition: box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.castrip__k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #C9A44E;
}
.castrip__v {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFD75E;
  text-shadow: 0 0 12px var(--gold-glow);
}
.castrip__copy {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-ghost);
  padding: 6px 10px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.castrip.is-live { cursor: pointer; }
.castrip.is-live:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--gold), 0 0 24px rgba(255, 201, 60, 0.3);
}
.castrip.is-live .castrip__copy { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 201, 60, 0.45); }

/* Bottom telemetry strip */
.telemetry {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 12;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(7, 14, 34, 0.96), rgba(7, 14, 34, 0));
  backdrop-filter: blur(6px);
}
.telemetry__cell {
  flex: 1;
  padding: 16px clamp(16px, 3vw, 40px);
  border-right: 1px solid var(--line);
}
.telemetry__cell:last-child { border-right: 0; }
.telemetry__k {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-ghost);
}
.telemetry__v {
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--txt-hi);
}
.telemetry__v small { font-size: 11px; font-weight: 400; color: var(--txt-dim); margin-left: 4px; }
.telemetry__v.is-mint { color: var(--mint); text-shadow: var(--neon-mint); }
.telemetry__v.is-gold { color: var(--gold); text-shadow: var(--neon-gold); }
.telemetry__v.is-pink { color: var(--pink); text-shadow: var(--neon-pink); }
.telemetry__v.is-aqua { color: var(--aqua); text-shadow: var(--neon-aqua); }

/* the strip lights up under the cursor, one cell at a time */
.telemetry__cell {
  position: relative;
  transition: background var(--t-med);
}
.telemetry__cell::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 2px;
  background: var(--pink);
  opacity: 0;
  transition: opacity var(--t-med);
}
.telemetry__cell:hover { background: rgba(30, 48, 104, 0.35); }
.telemetry__cell:hover::after { opacity: 0.85; box-shadow: var(--neon-pink); }

.phase.is-done .phase__id { color: var(--mint); }
.phase.is-done .phase__tag { color: var(--mint); }

/* ---- Roadmap drawer ----------------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  background: rgba(4, 9, 26, 0.9);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  padding: 90px 24px 60px;
}
.drawer.is-open { display: block; animation: screen-in var(--t-med) var(--ease-out) forwards; }
.drawer__inner { max-width: 940px; margin: 0 auto; }
.drawer__close { position: fixed; top: 22px; right: 24px; z-index: 2; }

.phases { display: grid; gap: 1px; background: var(--line); margin-top: 30px; }
.phase {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 26px;
  padding: 26px 28px;
  background: var(--panel);
  transition: background var(--t-fast);
}
.phase:hover { background: var(--panel-2); }
.phase__id {
  font-family: var(--f-display);
  font-size: 40px;
  line-height: 0.85;
  color: var(--txt-ghost);
  transform: skewX(-7deg);
}
.phase.is-now .phase__id { color: var(--ember); }
.phase__name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-hi);
  margin-bottom: 9px;
}
.phase__body { font-size: 13.5px; line-height: 1.7; color: var(--txt-dim); max-width: 62ch; }
.phase__tag {
  display: inline-block;
  margin-left: 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ember);
  vertical-align: 2px;
}

/* ============================================================
   02 — DRIVER  /  03 — NETWORK
   ============================================================ */

.card { width: min(560px, 100%); }

.brief { padding: 18px 20px; margin-bottom: 24px; }
.brief__list { display: grid; gap: 11px; margin-top: 14px; }
.brief__row { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.brief__n {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ember);
  padding-top: 2px;
}
.brief__t { font-size: 13px; line-height: 1.55; color: var(--txt); }
.brief__t b { color: var(--txt-hi); font-weight: 600; }

.nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.node {
  position: relative;
  padding: 24px 22px 20px;
  text-align: left;
  transition: transform var(--t-med) var(--ease-out);
}
.node:hover { transform: translateY(-3px); }
.node:hover::before { background: var(--line-hot); }
.node__code {
  font-family: var(--f-display);
  font-size: 46px;
  line-height: 0.85;
  color: var(--txt-hi);
  transform: skewX(-7deg);
  display: inline-block;
}
.node__name {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.node__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.node__ping { display: flex; align-items: center; gap: 7px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 3px; background: var(--ice); border-radius: 1px; }
.bars i:nth-child(1) { height: 4px; }
.bars i:nth-child(2) { height: 7px; }
.bars i:nth-child(3) { height: 10px; }
.bars i:nth-child(4) { height: 13px; background: var(--line-hi); }
.node__pop { font-family: var(--f-mono); font-size: 15px; color: var(--txt-hi); }

/* ============================================================
   IDENTITY — wallet or guest
   ============================================================ */

.idpick {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
}

.idcard { padding: 20px 20px 18px; display: flex; flex-direction: column; }
.idcard--wallet::before { background: var(--line-hot); }
.idcard--guest::before  { background: var(--line); }

.idcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.idcard__title {
  font-family: var(--f-display);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--txt-hi);
  transform: skewX(-7deg);
}
.idcard__tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%);
}
.idcard__tag.is-live {
  color: var(--gold);
  background: rgba(255, 201, 60, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 60, 0.4);
}
.idcard__tag.is-off {
  color: var(--txt-dim);
  box-shadow: inset 0 0 0 1px var(--line-hi);
}

.idcard__body {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--txt);
  margin-bottom: 16px;
  flex: 1;
}

.idcard__wallets { display: grid; gap: 7px; }
.idcard__note {
  margin-top: 11px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--txt-dim);
  min-height: 1em;
}
.idcard__note a { color: var(--aqua); text-decoration: underline; }

/* one row per detected extension */
.walletbtn {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  text-align: left;
  background: var(--void-2);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out),
              background var(--t-fast);
}
.walletbtn:hover {
  transform: translateY(-2px);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--w-tint, var(--aqua)),
              0 0 20px color-mix(in srgb, var(--w-tint, #35DFF0) 35%, transparent);
}
.walletbtn[disabled] { opacity: 0.55; pointer-events: none; }
.walletbtn__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--w-tint, var(--aqua));
  box-shadow: 0 0 10px var(--w-tint, var(--aqua));
}
.walletbtn__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-hi);
}
.walletbtn__go {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.walletbtn:hover .walletbtn__go { color: var(--w-tint, var(--aqua)); }

.statuspill.is-wallet {
  color: var(--gold);
  background: linear-gradient(155deg, rgba(216, 155, 14, 0.22), rgba(10, 20, 48, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 201, 60, 0.45);
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
}
.statuspill.is-wallet i { background: var(--gold); box-shadow: 0 0 12px var(--gold-glow); }

@media (max-width: 720px) {
  .idpick { grid-template-columns: 1fr; }
}

/* ============================================================
   04 — GARAGE
   ============================================================ */

#s-garage { display: none; }
#s-garage.is-active { display: block; }

#garageCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.garage__hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-ghost);
  pointer-events: none;
}
.garage__hint svg { width: 14px; height: 14px; }

.dock {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 316px;
  padding: 22px 20px;
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--lift-2);
}
.dock--l { left: clamp(20px, 3vw, 46px); }
.dock--r { right: clamp(20px, 3vw, 46px); }

.dock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dock__body { overflow-y: auto; flex: 1; padding-right: 4px; margin-right: -4px; }
.dock__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.group + .group { margin-top: 20px; }
.group__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.group__label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Car identity block */
.ident__cls {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ember);
}
.ident__name {
  font-family: var(--f-display);
  font-size: 40px;
  line-height: 0.86;
  text-transform: uppercase;
  color: var(--txt-hi);
  transform: skewX(-7deg);
  margin: 6px 0 4px;
}
.ident__desc { font-size: 12px; line-height: 1.6; color: var(--txt-dim); }

.stats { display: grid; gap: 9px; }

.chassis-nav {
  position: absolute;
  left: 50%;
  top: clamp(80px, 12vh, 130px);
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chassis-nav__dot {
  width: 22px;
  height: 3px;
  background: var(--line-hi);
  transform: skewX(-24deg);
  transition: background var(--t-fast), width var(--t-fast);
}
.chassis-nav__dot.is-active { background: var(--ember); width: 40px; }

/* ============================================================
   LEADERBOARD
   ============================================================ */

.lb {
  width: min(760px, 100%);
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
}
.lb__note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--txt);
  background: var(--ember-wash);
  box-shadow: inset 0 0 0 1px var(--line-hot);
  clip-path: polygon(0% 0%, calc(100% - 9px) 0%, 100% 9px, 100% 100%, 0% 100%);
}
.lb__note b { color: var(--ember-hi); font-weight: 600; }

/* Season strip — the three numbers a returning player looks for */
.lb__season {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-bottom: 18px;
}
.lb__season-cell { background: var(--panel-2); padding: 11px 14px; }
.lb__season-v {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 700;
  color: var(--txt-hi);
  line-height: 1;
}
.lb__season-v.is-none { color: var(--txt-ghost); }
.lb__season-cell:first-child .lb__season-v { color: var(--cyan); }
.lb__season-cell:last-child  .lb__season-v { color: var(--magenta); }

.lb__cols,
.lb__row {
  display: grid;
  grid-template-columns: 48px 1fr 62px 104px 84px;
  align-items: center;
  gap: 12px;
}
.lb__cols {
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
}
.lb__cols div {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-ghost);
}
.lb__cols div:nth-child(n + 3),
.lb__row  > *:nth-child(n + 3) { text-align: right; }

.lb__gap {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--txt-ghost);
}
.lb__gap.is-lead { color: var(--gold); }

/* Pinned self row when the player is outside the visible table */
.lb__pin {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-hi);
}
.lb__empty {
  padding: 26px 16px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--txt-dim);
}
.lb__empty b { color: var(--txt-hi); font-weight: 600; }

/* flex:1 + min-height:0 is what actually lets a flex child scroll
   instead of forcing the panel to grow past its cap */
.lb__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 4px; }

.lb__row {
  position: relative;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(35, 53, 110, 0.55);
  transition: background var(--t-fast);
}
.lb__row:hover { background: var(--panel-2); }
.lb__row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: transparent;
}
.lb__row.is-podium::before { background: var(--ember); }
.lb__row.is-you { background: var(--ice-wash); }
.lb__row.is-you::before { background: var(--ice); }

.lb__rank {
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1;
  color: var(--txt-ghost);
  transform: skewX(-7deg);
}
.lb__row.is-podium .lb__rank { color: var(--ember); }
.lb__row:nth-child(1) .lb__rank { font-size: 32px; }

.lb__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb__sigil {
  width: 30px; height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--void);
  clip-path: polygon(7px 0%, 100% 0%, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0% 100%, 0% 7px);
}
.lb__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* the payout address, so a name alone is never the whole identity */
.lb__addr {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--txt-dim);
  letter-spacing: 0.02em;
}
.lb__addr.is-guest { color: var(--txt-ghost); font-style: italic; }
.lb__runs { font-family: var(--f-mono); font-size: 12px; color: var(--txt-dim); }
.lb__time { font-family: var(--f-mono); font-size: 15px; font-weight: 700; color: var(--txt-hi); }
.lb__row.is-podium .lb__time { color: var(--ember-hi); }

/* ============================================================
   RESULTS
   ============================================================ */

.result { width: min(620px, 100%); text-align: left; }
.result__flag {
  font-family: var(--f-display);
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--txt-hi);
  transform: skewX(-7deg);
}
.result__flag em { font-style: normal; color: var(--ember); }

.result__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 26px 0 8px;
  background: var(--line);
}
.result__cell { background: var(--panel-2); padding: 18px 16px; }
.result__k {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--txt-ghost);
}
.result__v {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--txt-hi);
  line-height: 1;
}
.result__v.is-hot { color: var(--ember); }
.result__v small { font-size: 12px; color: var(--txt-dim); font-weight: 400; }

.result__pb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-hi);
  background: var(--ember-wash);
  box-shadow: inset 0 0 0 1px var(--line-hot);
}
.result__cta { display: flex; gap: 10px; }

/* ============================================================
   LOADER
   ============================================================ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  place-items: center;
  background: var(--void);
}
#loader.is-on { display: grid; }

.loader__box { width: min(420px, 82vw); text-align: left; }
.loader__title {
  font-family: var(--f-display);
  font-size: 26px;
  text-transform: uppercase;
  color: var(--txt-hi);
  transform: skewX(-7deg);
  margin-bottom: 20px;
}
.loader__track { height: 3px; background: var(--panel-3); overflow: hidden; }
.loader__fill {
  height: 100%;
  width: 0%;
  background: var(--ember);
  transition: width 220ms var(--ease-out);
}
.loader__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-ghost);
}
.loader__pct { color: var(--ember); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1180px) {
  .dock { width: 280px; }
  .steprail { display: none !important; }
}
@media (max-width: 980px) {
  .hero { top: auto; bottom: 190px; transform: none; }
  .dock {
    position: absolute;
    top: auto;
    transform: none;
    width: auto;
    max-height: 38vh;
  }
  .dock--l { left: 14px; right: 14px; bottom: 200px; }
  .dock--r { left: 14px; right: 14px; bottom: 14px; }
  .garage__hint { display: none; }
  .result__grid { grid-template-columns: 1fr; }
  .telemetry__cell:nth-child(n + 4) { display: none; }
}
