:root {
  --void: #05060d;
  --glass: rgba(11, 13, 26, 0.56);
  --glass-deep: rgba(9, 10, 21, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #eeedf7;
  --dim: #8b8ea8;
  --faint: #5a5d75;
  --accent: #f7931a;
  --accent-hi: #ffab3d;
  --mint: #5cf2c4;
  --bad: #ff4d63;
  --spectrum: linear-gradient(90deg, #ff3355, #ff8a1e, #ffe14a, #3dff7a, #3de8ff, #b45cff);
  --display: "Anybody", "Unbounded", sans-serif;
  --body: "Geist", "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

#home {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "top top" "lead rail";
  column-gap: clamp(24px, 4vw, 64px);
  padding: calc(16px + env(safe-area-inset-top)) clamp(16px, 3.4vw, 48px) calc(28px + env(safe-area-inset-bottom));
  font-family: var(--body);
  color: var(--text);
}

#home[hidden] { display: none; }
#home > *:not(.home-scrim) { position: relative; }

.home-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 0% 100%, rgba(5, 6, 13, 0.94) 0%, rgba(5, 6, 13, 0.6) 45%, transparent 75%),
    radial-gradient(40% 60% at 100% 100%, rgba(5, 6, 13, 0.7) 0%, transparent 70%),
    linear-gradient(180deg, rgba(5, 6, 13, 0.82) 0%, rgba(5, 6, 13, 0) 22%, rgba(5, 6, 13, 0) 55%, rgba(5, 6, 13, 0.7) 100%);
}

/* top bar */

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 84px;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

#home .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

#home .brand .mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: conic-gradient(from 200deg, #ff3355, #ffe14a, #3dff7a, #3de8ff, #b45cff, #ff3355);
  box-shadow: 0 0 18px rgba(247, 147, 26, 0.35);
  transform: skewX(-12deg);
  animation: none;
}

.tabs {
  display: flex;
  gap: 2px;
  margin: 0 auto;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.tab {
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  background: transparent;
  color: var(--dim);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.tab:hover { color: var(--text); }
.tab.on { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.wallet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  background:
    linear-gradient(var(--glass-deep), var(--glass-deep)) padding-box,
    var(--spectrum) border-box;
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease;
}

.wallet:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(180, 92, 255, 0.25); }
.wallet:disabled { opacity: 0.7; cursor: progress; transform: none; }

.wallet.on {
  padding-left: 6px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.wallet-slot { position: relative; }

.socials {
  display: flex;
  align-items: center;
  gap: 4px;
}

.social {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--dim);
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s var(--ease);
}

.social svg { width: 16px; height: 16px; display: block; }
.social:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }

.nick-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 6;
  display: grid;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line-hi);
  border-radius: 14px;
  background: rgba(9, 10, 21, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.nick-menu[hidden] { display: none; }

.nick-menu button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.nick-menu button:hover { background: rgba(255, 255, 255, 0.07); }
.nick-menu button.out { color: #ff8d98; }

.profile-joined {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.tw-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.tw-card.on { grid-template-columns: auto minmax(0, 1fr) auto; }

.hold-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.hold-card.on { border-color: rgba(255, 196, 64, 0.45); background: rgba(255, 196, 64, 0.06); }
.hold-id { display: grid; min-width: 0; gap: 2px; }
.hold-id b { font-size: 14px; }
.hold-id small { color: var(--dim); font-size: 12px; line-height: 1.35; }
.hold-card strong { color: #ffc440; font-size: 20px; font-variant-numeric: tabular-nums; }

.hold-list {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hold-list li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.hold-list em { color: #ffc440; font-style: normal; font-weight: 700; }

.tw-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.tw-id { display: grid; min-width: 0; gap: 2px; }
.tw-id b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tw-id small { color: var(--dim); font-size: 12px; line-height: 1.35; }

.tw-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: #0b0b14;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tw-btn.ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
}

.tw-btn:disabled { opacity: 0.6; cursor: progress; }

body:has(#home:not([hidden])) #vol {
  top: calc(23px + env(safe-area-inset-top));
  right: clamp(16px, 3.4vw, 48px);
}

body:has(#home:not([hidden])) #mute {
  min-width: 64px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* lead */

.lead {
  grid-area: lead;
  align-self: end;
  container-type: inline-size;
  max-width: 980px;
  padding-bottom: 6px;
}

.lead > * { animation: rise 0.8s var(--ease) both; }
.lead > :nth-child(2) { animation-delay: 0.06s; }
.lead > :nth-child(3) { animation-delay: 0.14s; }
.lead > :nth-child(4) { animation-delay: 0.2s; }
.lead > :nth-child(5) { animation-delay: 0.26s; }
.lead > :nth-child(6) { animation-delay: 0.32s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.kicker .chip {
  padding: 5px 10px;
  border: 1px solid rgba(247, 147, 26, 0.45);
  border-radius: 8px;
  background: rgba(247, 147, 26, 0.1);
  color: var(--accent-hi);
}

.mega {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 10.4cqi, 150px);
  padding-right: 0.12em;
  font-style: italic;
  font-weight: 900;
  font-stretch: 150%;
  line-height: 0.84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 30%, #b9bdd6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(5, 6, 13, 0.6));
}

.streak {
  position: relative;
  width: min(64%, 620px);
  height: 7px;
  margin: 18px 0 0 0.6%;
  border-radius: 2px;
  background: var(--spectrum);
  background-size: 200% 100%;
  transform: skewX(-24deg);
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent);
  mask-image: linear-gradient(90deg, #000 55%, transparent);
  box-shadow: 0 0 24px rgba(61, 232, 255, 0.35);
  animation: rise 0.8s var(--ease) 0.14s both, flow 3.2s linear infinite;
}

@keyframes flow { to { background-position: -200% 0; } }

.lead-copy {
  max-width: 50ch;
  margin: 20px 0 0;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.55;
  color: #b4b7cc;
}

.lead-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

#home #homePlay,
#home #homeGarage {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  border-radius: 16px;
  padding: 0 30px;
  font-family: var(--display);
  font-size: 19px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}

#home #homePlay {
  border: 0;
  background: var(--accent);
  color: #140a00;
  box-shadow: 0 14px 40px rgba(247, 147, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#home #homePlay:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(247, 147, 26, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#homePlay .key {
  padding: 3px 7px;
  border: 1px solid rgba(20, 10, 0, 0.3);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}

#home #homeGarage {
  border: 1px solid var(--line-hi);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#home #homeGarage:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

.lead-hint {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

/* rail */

.rail {
  grid-area: rail;
  align-self: end;
  display: grid;
  gap: 10px;
  animation: rise 0.9s var(--ease) 0.2s both;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.status,
.count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.status {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.status[data-tone="on"] { color: var(--text); }
.status[data-tone="in"] { background: rgba(92, 242, 196, 0.14); color: var(--mint); }

.readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.readout div { min-width: 0; }

.readout dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.readout dd {
  margin: 4px 0 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 22px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-cta {
  width: 100%;
  margin-top: 14px;
  min-height: 42px;
  border: 1px dashed rgba(247, 147, 26, 0.5);
  border-radius: 12px;
  background: rgba(247, 147, 26, 0.08);
  color: var(--accent-hi);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.rail-cta:hover { background: rgba(247, 147, 26, 0.16); }
.rail-cta[hidden] { display: none; }

.ladder {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ladder li {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.ladder li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 22px;
  bottom: -8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.ladder li.open:not(:last-child)::before,
.ladder li.current:not(:last-child)::before { background: linear-gradient(var(--tint), rgba(255, 255, 255, 0.08)); }

.ladder .pip {
  width: 14px;
  height: 14px;
  border: 2px solid var(--tint);
  border-radius: 50%;
  background: var(--tint);
}

.ladder .nm { font-size: 14px; font-weight: 600; }

.ladder .st {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.ladder .current .pip { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tint) 25%, transparent), 0 0 16px var(--tint); }
.ladder .current .st { color: var(--text); }
.ladder .locked .pip { background: transparent; border-color: var(--faint); }
.ladder .locked .nm { color: var(--dim); }
.ladder .locked .st { color: var(--faint); }

.ladder .last .nm {
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.link:hover { text-decoration: underline; }

.toplist,
.board {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toplist li {
  display: grid;
  grid-template-columns: 18px 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}

.toplist .rk,
.board .rk {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.toplist .nm,
.board .nm {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toplist .sc,
.board .sc {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.toplist .me .nm { color: var(--accent-hi); }

.top-me {
  margin: 10px -16px -16px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 19px 19px;
  background: rgba(6, 8, 16, 0.55);
}

.top-me[hidden] { display: none; }

.top-me-label {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9d0dc;
}

.top-me-row {
  display: grid;
  grid-template-columns: auto 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.top-me .rk {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hi);
}

.top-me .nm { font-weight: 600; }
.top-me .sc { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.top-me .note { margin: 0; font-size: 13px; color: var(--dim); }

.muted {
  display: block !important;
  padding: 4px 0;
  font-size: 13px;
  color: var(--dim);
}

.ava {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, hsl(var(--h) 90% 66%), hsl(calc(var(--h) + 50) 85% 52%));
  color: #0b0b14;
  font-family: var(--display);
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
}

.ava.has-photo { background: #14141c; }
.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* overlays */

#veil {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(3, 4, 10, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade 0.25s ease both;
}

#veil[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } }

.drawer,
.modal {
  position: fixed;
  z-index: 9;
  border: 1px solid var(--line-hi);
  background: var(--glass-deep);
  color: var(--text);
  font-family: var(--body);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.drawer {
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100% - 24px));
  border-radius: 24px;
  overflow: hidden;
  animation: slide 0.36s var(--ease) both;
}

.drawer[hidden],
.modal[hidden] { display: none; }

@keyframes slide { from { opacity: 0; transform: translateX(40px); } }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 16px;
}

.over {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.drawer h2,
.modal h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-stretch: 130%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.drawer h2 { font-size: 34px; }
.modal h2 { display: flex; align-items: center; gap: 12px; font-size: 28px; }
.modal h2 .ava { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }

.x {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.x::before,
.x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}

.x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.x:hover { background: rgba(255, 255, 255, 0.12); }

.board-count {
  margin: 0;
  padding: 0 22px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.spots { padding: 0 22px 18px; }

.spots-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.spots-bar i {
  display: block;
  width: 0;
  min-width: 6px;
  height: 100%;
  border-radius: 99px;
  background: var(--spectrum);
  background-size: 460px 100%;
  transition: width 0.8s var(--ease);
}

.spots p {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.spots b { color: var(--text); }

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 0 22px 16px;
  list-style: none;
}

.podium:empty { display: none; }

.podium li {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 14px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.podium .p1 {
  order: 2;
  padding-top: 22px;
  border-color: transparent;
  background:
    linear-gradient(#11131f, #11131f) padding-box,
    var(--spectrum) border-box;
}

.podium .p2 { order: 1; }
.podium .p3 { order: 3; }

.podium .place {
  font-family: var(--display);
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  color: var(--dim);
}

.podium .p1 .place { color: var(--accent-hi); }
.podium .ava { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; }
.podium .p1 .ava { width: 48px; height: 48px; border-radius: 15px; font-size: 22px; }

.podium .nm {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium .sc {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.podium .me { box-shadow: 0 0 0 2px var(--accent); }

.drawer .board {
  flex: 1;
  align-content: start;
  min-height: 0;
  padding: 0 12px 12px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.board li {
  display: grid;
  grid-template-columns: 38px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 14px;
}

.board li:hover { background: rgba(255, 255, 255, 0.04); }
.board .ava { width: 28px; height: 28px; border-radius: 9px; }

.board .nm em {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  color: var(--faint);
}

.board li.me {
  background: rgba(247, 147, 26, 0.1);
  box-shadow: inset 0 0 0 1px rgba(247, 147, 26, 0.5);
}

.board .cutoff {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--spectrum);
  color: #0b0b14;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.board .cutoff em { font-style: normal; }

.empty {
  margin: 0;
  padding: 22px;
  color: var(--dim);
  font-size: 14px;
}

.me-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
}

.me-row[hidden] { display: none; }
.me-row .rk { font-family: var(--mono); font-size: 13px; color: var(--accent-hi); }
.me-row .nm { font-weight: 600; }
.me-row .sc { font-family: var(--mono); font-weight: 700; }
.me-row > .nm:first-child { grid-column: 1 / 4; color: var(--dim); }

.mini {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--accent);
  color: #140a00;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.faq {
  flex: 1;
  min-height: 0;
  padding: 0 22px 22px;
  overflow: auto;
}

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 16px;
  color: var(--dim);
  transition: transform 0.25s var(--ease), background 0.2s ease, color 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  background: rgba(247, 147, 26, 0.16);
  color: var(--accent-hi);
}

.faq summary:hover { color: #fff; }

.faq p {
  margin: -4px 0 18px;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.6;
  color: #a8abc2;
}

.faq a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.faq a:hover { color: #2ee6c5; }

.modal {
  left: 50%;
  top: 50%;
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 26px;
  overflow: auto;
  border-radius: 24px;
  transform: translate(-50%, -50%);
  animation: pop-in 0.32s var(--ease) both;
}

@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } }

.modal .x { position: absolute; top: 18px; right: 18px; }

#walletSheet.profile-screen[hidden] { display: none; }

#walletSheet.profile-screen {
  inset: 0;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 28px 20px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  transform: none;
  animation: fade 0.25s ease both;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(247, 147, 26, 0.12), transparent 55%),
    rgba(7, 8, 16, 0.94);
}

.profile-layout {
  width: min(640px, 100%);
  text-align: center;
}

.profile-layout h2 {
  justify-content: center;
  font-size: clamp(40px, 6vw, 64px);
}

.profile-avatar {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.profile-avatar.has-photo {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  background: #11131c;
}

.profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#walletSheet .wallet-stats { text-align: left; }
#walletSheet .readout { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#walletSheet .readout dd { overflow: visible; font-size: 28px; }

@media (max-width: 560px) {
  #walletSheet .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
.modal .over,
.modal h2 { padding-right: 48px; }

#walletSheet.profile-screen .over,
#walletSheet.profile-screen h2 {
  width: 100%;
  padding-right: 0;
  padding-left: 0;
  text-align: center;
}

.gate-points {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.gate-points li {
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #c4c7da;
}

.gate-points li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 9px 1px -16px;
  border-radius: 50%;
  background: var(--accent);
}

.modal-copy {
  margin: 12px 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #a8abc2;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line-hi);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(247, 147, 26, 0.18);
}

.field .at {
  font-family: var(--display);
  font-size: 20px;
  font-style: italic;
  font-weight: 800;
  color: var(--accent-hi);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
  outline: none;
}

.field input::placeholder { color: var(--faint); }

.field .len {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.field-help {
  min-height: 18px;
  margin: 10px 2px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.field-help.bad { color: var(--bad); }

.primary,
.secondary {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 120%;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s ease;
}

.primary {
  border: 0;
  background: var(--accent);
  color: #140a00;
  box-shadow: 0 12px 34px rgba(247, 147, 26, 0.3);
}

.primary:hover { background: var(--accent-hi); transform: translateY(-1px); }
.primary:disabled { opacity: 0.6; cursor: progress; transform: none; }

.secondary {
  margin-top: 14px;
  border: 1px solid var(--line-hi);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.secondary:hover { background: rgba(255, 255, 255, 0.1); }

.wallet-stats { display: grid; gap: 14px; margin-top: 20px; }

.wallet-stats .wl {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.wallet-stats .wl b { font-size: 15px; }
.wallet-stats .wl span { font-size: 13px; line-height: 1.45; color: var(--dim); }

.wallet-stats .wl.in {
  border-color: rgba(92, 242, 196, 0.4);
  background: rgba(92, 242, 196, 0.08);
}

.wallet-stats .wl.in b { color: var(--mint); }

.wallet-stats .readout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.wallet-stats .addr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px dashed var(--line-hi);
  border-radius: 12px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.wallet-stats .addr span { min-width: 0; word-break: break-all; }
.wallet-stats .addr em { flex: none; font-style: normal; color: var(--accent-hi); }
.wallet-stats .addr:hover { border-color: var(--accent); }

#notice {
  position: fixed;
  left: 50%;
  top: calc(84px + env(safe-area-inset-top));
  z-index: 12;
  max-width: min(520px, calc(100% - 28px));
  padding: 12px 18px;
  border: 1px solid var(--line-hi);
  border-radius: 14px;
  background: var(--glass-deep);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

#notice[data-tone="bad"] { border-color: rgba(255, 77, 99, 0.55); color: #ffc3cb; }
#notice[hidden] { display: none; }
#notice.show { animation: note-in 0.3s var(--ease) both; }

@keyframes note-in { from { opacity: 0; transform: translate(-50%, -10px); } }

#home button:focus-visible,
.drawer button:focus-visible,
.drawer summary:focus-visible,
.modal button:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

/* run over / pause */

#sheet {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(5, 6, 13, 0.35) 0%, rgba(5, 6, 13, 0.82) 100%);
  font-family: var(--body);
  color: var(--text);
  animation: endFade 0.35s ease both;
}

#sheet[hidden] { display: none; }

#sheet[data-kind="pause"] { background: rgba(5, 6, 13, 0.55); }

.end-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px 26px 22px;
  border: 1px solid var(--line-hi);
  border-radius: 28px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(247, 147, 26, 0.1), transparent 60%),
    rgba(10, 11, 22, 0.86);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: endRise 0.5s var(--ease) both;
}

.end-card::before {
  content: "";
  position: absolute;
  inset: 0 24px auto;
  height: 2px;
  border-radius: 2px;
  background: var(--spectrum);
  opacity: 0.35;
}

#sheet.record .end-card::before { opacity: 1; box-shadow: 0 0 22px rgba(255, 225, 74, 0.6); }

.end-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
}

.end-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.end-badge {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--spectrum);
  color: #120a02;
  font-family: var(--display);
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: endPop 0.6s var(--ease) 0.25s both;
}

.end-badge[hidden] { display: none; }

#sheet h1 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(44px, 9vw, 64px);
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

#sheet h1.num {
  font-size: clamp(76px, 16vw, 120px);
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(105deg, #ffe56a 0%, #ff9a1f 46%, #ff5c33 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#sheet.record h1.num {
  background: linear-gradient(100deg, #ffe14a 0%, #ff8a1e 34%, #ff3355 68%, #b45cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.end-unit {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffab3d;
}

.end-unit[hidden] { display: none; }

.end-bars { display: grid; gap: 8px; margin: 14px 0 0; }
.end-bars[hidden] { display: none; }

.end-row {
  --row-glow: #ffab3d;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--row-glow) 34%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--row-glow) 9%, transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.end-row[data-kind="run"] { --row-glow: #ffab3d; }
.end-row[data-kind="hold"] { --row-glow: #5cf2c4; }
.end-row.in { opacity: 1; transform: none; }
.end-row.filling { border-color: color-mix(in srgb, var(--row-glow) 70%, transparent); }
.end-row.done:not(.zero) { animation: rowPing 0.4s var(--ease); }
.end-row.zero { --row-glow: #7d7f99; }
.end-row.zero .end-row-math strong { color: var(--dim); }

@keyframes rowPing {
  40% { transform: scale(1.025); box-shadow: 0 0 22px color-mix(in srgb, var(--row-glow) 45%, transparent); }
}

.end-row-art { display: grid; place-items: center; width: 34px; height: 34px; color: var(--row-glow); }
.end-row-art svg { display: block; width: 34px; height: 34px; }
.end-row[data-kind="run"] .end-row-art svg,
.end-row[data-kind="hold"] .end-row-art svg { width: 24px; height: 24px; }

.end-row-copy { display: grid; min-width: 0; gap: 2px; }
.end-row-copy b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff3dc;
}
.end-row-copy small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.end-row-math { display: grid; justify-items: end; }
.end-row-math em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--row-glow);
}
.end-row-math strong {
  font-family: var(--display);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.end-row-bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.end-row-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--row-glow) 55%, #fff0), var(--row-glow));
  box-shadow: 0 0 10px color-mix(in srgb, var(--row-glow) 60%, transparent);
}

#sheet h1.num.pending { opacity: 0.16; }
#sheet h1.num.landed { animation: totalLand 0.5s var(--ease); }
@keyframes totalLand {
  0% { transform: scale(0.82); filter: drop-shadow(0 0 0 transparent); }
  55% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(255, 171, 61, 0.6)); }
  100% { transform: none; }
}

#sheet #copy,
#sheet #sting {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--dim);
}

#sheet #sting { margin-top: 4px; }
#sheet #sting[hidden],
#sheet #copy[hidden] { display: none; }

#sheet #copy.unlock {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--tint, var(--accent)) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tint, var(--accent)) 12%, transparent);
  color: var(--text);
  font-weight: 600;
}

#sheet #stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 18px 0 0;
}

#sheet #stats[hidden] { display: none; }

#sheet #stats div {
  min-width: 0;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

#sheet #stats span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

#sheet #stats strong {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

#sheet #stats div:first-child strong { color: #ffab3d; }
#sheet #stats div:last-child strong { color: #5cf2c4; }
#sheet #stats div:first-child { border-color: rgba(255, 171, 61, 0.28); background: rgba(247, 147, 26, 0.08); }
#sheet #stats div:last-child { border-color: rgba(92, 242, 196, 0.28); background: rgba(92, 242, 196, 0.07); }

#sheet #stats strong[data-digits="5"] { font-size: 20px; }
#sheet #stats strong[data-digits="6"] { font-size: 17px; }
#sheet #stats strong[data-digits="7"] { font-size: 15px; }
#sheet #stats strong[data-digits="8"] { font-size: 13px; }

#sheet h1.num { white-space: nowrap; }
#sheet h1.num[data-digits="5"] { font-size: 64px; font-stretch: 108%; }
#sheet h1.num[data-digits="6"] { font-size: 56px; font-stretch: 100%; }
#sheet h1.num[data-digits="7"] { font-size: 46px; font-stretch: 100%; }
#sheet h1.num[data-digits="8"] { font-size: 38px; font-stretch: 100%; }

.end-label {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.end-label[hidden] { display: none; }

.end-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 22px;
}

.end-actions:has(#alt[hidden]) { grid-template-columns: 1fr; }

.end-actions:has(#menuBtn:not([hidden])) {
  grid-template-columns: 1fr 1fr;
}

.end-actions:has(#menuBtn:not([hidden])) #go {
  grid-column: 1 / -1;
}

#sheet #go,
#sheet #alt,
#sheet #menuBtn {
  min-height: 54px;
  border-radius: 16px;
  padding: 0 22px;
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}

#sheet #go {
  border: 0;
  background: var(--accent);
  color: #140a00;
  box-shadow: 0 14px 40px rgba(247, 147, 26, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#sheet #go:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(247, 147, 26, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#sheet #alt,
#sheet #menuBtn {
  border: 1px solid rgba(92, 242, 196, 0.32);
  background: rgba(92, 242, 196, 0.08);
  color: #9af6dc;
}

#sheet #menuBtn {
  border-color: rgba(180, 92, 255, 0.4);
  background: rgba(180, 92, 255, 0.1);
  color: #d7b6ff;
}

#sheet #alt[hidden],
#sheet #menuBtn[hidden] { display: none; }
#sheet #alt:hover,
#sheet #menuBtn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

#sheet #go:focus-visible,
#sheet #alt:focus-visible,
#sheet #menuBtn:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

#sheet #hint {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  color: var(--faint);
}

@keyframes endFade {
  from { opacity: 0; }
}

@keyframes endRise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
}

@keyframes endPop {
  from { opacity: 0; transform: scale(0.6); }
}

/* about */

#about { width: min(520px, calc(100% - 24px)); }

.spike-stage {
  flex: none;
  padding: 0 16px 12px;
}

.spike-bays {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 92px;
}

#spikeView {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.spike-bay { display: block; min-width: 0; }

.spike-caps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: -8px;
  text-align: center;
}

.spike-caps b {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: 12px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 110%;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--spike, var(--text));
}

.spike-caps small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}

.about-body {
  flex: 1;
  min-height: 0;
  padding: 6px 22px 22px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.about-body h3 {
  margin: 16px 0 8px;
  font-family: var(--display);
  font-size: 18px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
}

.about-body h3:first-child { margin-top: 4px; }

.about-body p {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.45;
}

.spike-notes {
  display: grid;
  gap: 10px;
  margin: 0;
}

.spike-notes div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.spike-notes dt {
  font-family: var(--display);
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
}

.spike-notes dd {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
}

/* ranks */

.rank-badge {
  display: block;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rank-glow, #fff) 45%, transparent));
}

.rank-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--rank-glow, #fff) 30%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--rank-glow, #fff) 16%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--body);
  text-align: left;
}

button.rank-card { cursor: pointer; transition: border-color 0.2s ease, transform 0.2s var(--ease); }
button.rank-card:hover { border-color: color-mix(in srgb, var(--rank-glow, #fff) 60%, transparent); transform: translateY(-1px); }
button.rank-card:empty { display: none; }

.rank-art { display: grid; place-items: center; width: 56px; height: 56px; }

.rank-text { display: grid; gap: 3px; min-width: 0; }

.rank-text em {
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.rank-text b {
  overflow: hidden;
  font-family: var(--display);
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
  font-stretch: 115%;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: color-mix(in srgb, var(--rank-glow, #fff) 55%, #fff);
}

.rank-text small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.rank-bar {
  display: block;
  height: 5px;
  margin: 3px 0 1px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-bar i {
  display: block;
  min-width: 5px;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rank-glow, #fff) 55%, transparent), var(--rank-glow, #fff));
  box-shadow: 0 0 10px var(--rank-glow, #fff);
}

.rank-singularity .rank-text b,
.rank-card:has(.rank-singularity) .rank-text b {
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rank-card:has(.rank-singularity) .rank-bar i { background: var(--spectrum); }

.tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tier em {
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: color-mix(in srgb, var(--rank-glow, #fff) 60%, #fff);
}

.toplist li { grid-template-columns: 18px 24px minmax(0, 1fr) auto auto; }
.board li { grid-template-columns: 38px 28px minmax(0, 1fr) auto auto; }
.me-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.board .tier em { min-width: 64px; }

.podium .tier { flex-direction: column; gap: 3px; }
.podium .tier em { font-size: 9px; }

.wallet-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.wallet-tier .tier { gap: 12px; }
.wallet-tier .tier em { font-family: var(--display); font-size: 17px; font-style: italic; font-weight: 900; }
.wallet-tier small { font-family: var(--mono); font-size: 11px; color: var(--dim); }

#ranks .drawer-head { padding: 16px 18px 6px; }
#ranks .drawer h2 { font-size: 28px; }
#ranks .board-count { padding: 0 18px 8px; }

.ranks-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 0 10px 8px;
  overflow: hidden;
  list-style: none;
}

.ranks-list li {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0 8px 0 2px;
  border-radius: 10px;
}

.ranks-list .tier { justify-content: center; width: 30px; height: min(100%, 32px); }
.ranks-list .rank-badge { width: auto; height: 100%; }

.ranks-list .nm {
  overflow: hidden;
  font-family: var(--display);
  font-size: 14px;
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ranks-list .sc { font-family: var(--mono); font-size: 12px; color: var(--dim); }

.ranks-list .ahead .rank-badge { filter: grayscale(0.85) brightness(0.55); }
.ranks-list .ahead .nm { color: var(--dim); }
.ranks-list .done .nm { color: color-mix(in srgb, var(--rank-glow) 45%, #fff); }

.ranks-list .current {
  position: relative;
  background: color-mix(in srgb, var(--rank-glow) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rank-glow) 55%, transparent);
}

.ranks-list .rank-bar {
  position: absolute;
  left: 40px;
  right: 78px;
  bottom: 2px;
  height: 3px;
  margin: 0;
}

.ranks-list .current .nm { color: #fff; }
.ranks-list .current .sc { color: var(--text); }
.ranks-list .rank-singularity:not(.ahead) .nm { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }

#sheet[data-kind="dead"] .end-kicker { color: #ff8d98; }

#sheet .end-rank .rank-text em { color: #5cf2c4; }
#sheet .end-rank:not(:has(.rank-singularity)) .rank-text b { color: #ffe4b0; }
#sheet .end-rank .rank-bar i {
  background: linear-gradient(90deg, #f7931a, #5cf2c4);
  box-shadow: 0 0 10px rgba(92, 242, 196, 0.4);
}

#sheet .end-rank { margin: 8px 0 0; }
#sheet .end-rank[hidden] { display: none; }

#sheet .end-rank.up {
  animation: rankUp 0.9s var(--ease) both;
  border-color: color-mix(in srgb, var(--rank-glow) 70%, transparent);
}

#sheet .end-rank.up .rank-text em { color: #5cf2c4; font-weight: 700; }
#sheet .end-rank.up .rank-badge { animation: endPop 0.7s 0.15s var(--ease) both; }

@keyframes rankUp {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rank-glow) 60%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

#sheet .end-rank .rank-bar i { transition: none; }

.rank-up {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--rank-glow, #5cf2c4) 30%, transparent), transparent 46%),
    rgba(4, 6, 14, 0.9);
  backdrop-filter: blur(12px);
  cursor: pointer;
  animation: rankUpIn 0.5s var(--ease) both;
}

.rank-up[hidden] { display: none; }
.rank-up.out { animation: rankUpOut 0.34s ease both; }

.rank-up-rays {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 150vmax;
  height: 150vmax;
  translate: -50% -50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--rank-glow, #5cf2c4) 16%, transparent) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0 12%, transparent 42%);
  mask: radial-gradient(circle, #000 0 12%, transparent 42%);
  pointer-events: none;
  animation: rankRays 24s linear infinite;
}

.rank-up-sparks { position: absolute; inset: 0; pointer-events: none; }

.rank-up-sparks i {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  opacity: 0;
  animation: rankSpark 1.7s var(--d) cubic-bezier(0.15, 0.8, 0.3, 1) both;
}

.rank-up-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.rank-up-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #5cf2c4;
  animation: rankRise 0.6s 0.15s var(--ease) both;
}

.rank-up-art {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 0 30px var(--rank-glow, #5cf2c4));
  animation: rankBadgeIn 0.9s 0.2s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.rank-up-art svg { width: 100%; height: 100%; }

.rank-up h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 84px);
  font-style: italic;
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 20%, var(--rank-glow, #5cf2c4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px color-mix(in srgb, var(--rank-glow, #5cf2c4) 45%, transparent));
  animation: rankRise 0.7s 0.45s var(--ease) both;
}

.rank-up.singularity h2 { background-image: var(--spectrum); }

.rank-up-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: #c5cbe0;
  animation: rankRise 0.6s 0.65s var(--ease) both;
}

.rank-up-note b { color: #5cf2c4; }

.rank-up button {
  margin-top: 10px;
  padding: 12px 30px;
  border: 0;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 15px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0d16;
  background: linear-gradient(90deg, #f7931a, #5cf2c4);
  box-shadow: 0 10px 34px rgba(92, 242, 196, 0.28);
  cursor: pointer;
  animation: rankRise 0.6s 0.8s var(--ease) both;
}

.rank-up button:hover { filter: brightness(1.08); }

@keyframes rankUpIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rankUpOut { to { opacity: 0; } }
@keyframes rankRays { to { rotate: 360deg; } }
@keyframes rankRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rankBadgeIn {
  0% { opacity: 0; transform: scale(0.2) rotate(-28deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes rankSpark {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.2); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rank-up, .rank-up * { animation: none !important; }
  .rank-up-sparks { display: none; }
}

/* responsive */

@media (max-width: 1080px) {
  #home { grid-template-columns: minmax(0, 1fr) 300px; }
  .tab { padding: 8px 12px; }
}

@media (max-width: 860px) {
  #home {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(34dvh, 1fr) auto;
    grid-template-areas: "top" "lead" "rail";
    row-gap: 22px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .card.top { display: none; }
  .mega { font-size: clamp(40px, 11cqi, 110px); }
}

@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; margin-right: 0; padding-left: 12px; }
  .topbar .socials { margin-left: auto; }
  .topbar .wallet { margin-left: 0; }
  .tabs { order: 3; width: 100%; }
  .mega { font-size: clamp(30px, 9.6cqi, 80px); }
  body:has(#home:not([hidden])) #vol {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 6;
    flex-direction: column-reverse;
  }
  body:has(#home:not([hidden])) #vol:hover .vol-panel,
  body:has(#home:not([hidden])) #vol:focus-within .vol-panel,
  body:has(#home:not([hidden])) #vol.open .vol-panel {
    margin-top: 0;
    margin-bottom: 8px;
  }
  .tab { flex: 1; }
  .tabs .tab:first-child { display: none; }
  .rail { grid-template-columns: minmax(0, 1fr); }
  #home #homePlay, #home #homeGarage { flex: 1 1 140px; justify-content: center; padding: 0 18px; }
  #homePlay .key { display: none; }
  .podium .nm { font-size: 12px; }
  .board .tier em { display: none; }
}

.replay-bar {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  z-index: 7;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 150px);
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: var(--glass-deep);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
  white-space: nowrap;
  animation: replayIn 0.4s var(--ease) both;
}
.replay-bar[hidden] { display: none; }
.replay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 10px var(--bad);
  animation: replayBlink 1.2s ease-in-out infinite;
}
.replay-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.replay-who {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.replay-info { color: var(--accent-hi); font-family: var(--mono); font-size: 12px; }
.replay-btn {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #140b00;
  font: 700 12px var(--body);
  cursor: pointer;
}
.replay-btn.ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.replay-btn.danger { background: var(--bad); color: #fff; }
.replay-btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.replay-bar.good { border-color: color-mix(in srgb, var(--mint) 60%, transparent); }
.replay-bar.good .replay-info { color: var(--mint); }
.replay-bar.bad { border-color: var(--bad); box-shadow: 0 0 24px rgba(255, 77, 99, 0.35); }
.replay-bar.bad .replay-info { color: var(--bad); font-weight: 700; }

.board li.admin-row { grid-template-columns: 38px minmax(0, 1fr) auto auto; }
.board li.admin-row.banned { opacity: 0.55; }
.board li.admin-row.banned .nm { text-decoration: line-through; }
.no-replay {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--bad);
  vertical-align: middle;
}
.ban-btn {
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 77, 99, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--bad);
  font: 700 11px var(--body);
  cursor: pointer;
}
.ban-btn:hover { background: var(--bad); color: #fff; }
.admin-row.banned .ban-btn { border-color: var(--line-hi); color: var(--text); }
.ban-btn:disabled { opacity: 0.5; cursor: progress; }
.replay-btn:hover { filter: brightness(1.12); }
.replay-btn kbd {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
@keyframes replayIn { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes replayBlink { 50% { opacity: 0.35; } }

.watch-btn {
  flex: none;
  display: inline-grid;
  vertical-align: middle;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--line-hi);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.watch-btn svg { width: 10px; height: 10px; margin-left: 2px; fill: currentColor; }
.watch-btn:hover, .watch-btn:focus-visible { background: var(--accent); border-color: var(--accent); color: #140b00; }
.watch-btn:disabled { opacity: 0.5; cursor: progress; }

@media (max-height: 640px) and (min-width: 861px) {
  .lead-copy { display: none; }
  .card.top { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lead > *, .rail, .streak, .drawer, .modal, #veil, #notice.show,
  #sheet, .end-card, .end-badge, .replay-bar, .replay-dot { animation: none !important; }
}
