/* Stratar Season 1 site. Brand: SKILL.md section 8. One stylesheet for every page. */

@font-face {
  font-family: "Bungee";
  src: url("/fonts/bungee.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --basalt: #14121f;
  --ink: #0b0912;
  --dusk: #1a1430;
  --card: #1b1630;
  --card-line: #2c2442;
  --row-line: #241d38;
  --panel: #231b36;
  --line: #3a2e55;
  --terracotta: #c8553d;
  --sandstone: #e8c79a;
  --cream: #f6e3c4;
  --lime: #c6ff3d;
  --lime-dark: #7fa321;
  --lime-soft: #e4ff9a;
  --amber: #ffb13b;
  --pink: #ff6b9a;
  --lilac: #b79be8;
  --green: #3ddc84;
  --green-dark: #1b7f45;
  --yellow: #ffd23f;
  --yellow-dark: #8a6a10;
  --muted: #b5a7c6;
  --quiet: #8f8496;
  --soft: #d9cce6;
  --error: #ff8a73;
  --display: "Bungee", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --wrap: 1248px;
  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--basalt);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
canvas,
svg {
  display: block;
}
a {
  color: var(--lime);
}
a:hover {
  color: var(--lime-soft);
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--basalt);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

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

/* ---------- Header ---------- */
.hdr-shell {
  position: relative;
  z-index: 40;
}
.hdr {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
.brand-txt {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  color: var(--sandstone);
  text-shadow:
    0 3px 0 var(--terracotta),
    0 5px 0 var(--ink);
}
.cube {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
}
.cube > i {
  display: block;
}
/* A player's X picture over their cube (nav.js pfp): fades in once it loads. */
.pfp {
  position: relative;
  border-radius: 50%;
}
.pfp-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s;
}
.pfp-img.ok {
  opacity: 1;
}
.cube > i:nth-child(1) {
  height: 30%;
  background: var(--sandstone);
}
.cube > i:nth-child(2) {
  height: 22%;
  background: var(--terracotta);
}
.cube > i:nth-child(3) {
  height: 12%;
  background: var(--lime);
}
.cube > i:nth-child(4) {
  flex: 1;
}
.brand .cube {
  box-shadow: 0 3px 0 var(--ink);
}
.links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.lnk {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.lnk:hover {
  color: #fff;
  background: rgba(246, 227, 196, 0.06);
}
.lnk[aria-current="page"] {
  color: var(--lime);
}
.lnk[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
}
.acts {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}
.ib {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1.5px solid rgba(246, 227, 196, 0.22);
  background: rgba(20, 18, 31, 0.45);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.12s ease;
}
.ib:hover {
  border-color: var(--cream);
}
.ib:active {
  transform: translateY(2px);
}
.menu {
  display: none;
}
.menu .i-close,
.menu[aria-expanded="true"] .i-open {
  display: none;
}
.menu[aria-expanded="true"] .i-close {
  display: block;
}
.cta-sm {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--lime);
  color: var(--basalt);
  text-decoration: none;
  font-family: var(--display);
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--lime-dark);
  cursor: pointer;
}
.cta-sm:hover {
  color: var(--basalt);
  filter: brightness(1.05);
}
.cta-sm:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--lime-dark);
}
/* Signed in: the wallet chip replaces Connect wallet. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1c1730;
  color: var(--cream);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  max-width: 240px;
}
#who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.save-note {
  padding: 0 14px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.chip:hover {
  color: var(--cream);
  border-color: var(--cream);
}
.chip .cube {
  width: 32px;
  height: 32px;
}
.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Signed in: the chip and its Log out button sit side by side. */
[data-account]:not([data-drawer]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logout-drawer {
  margin-top: 10px;
}
.tick {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tick svg {
  width: 11px;
  height: 11px;
}
.dot-y {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}
.drawer {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 76px;
  z-index: 50;
  border-radius: 18px;
  background: #1b1630;
  border: 1px solid #322848;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  padding: 10px;
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.22s ease-out both;
}
.drawer a:not(.btn) {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
}
.drawer a[aria-current="page"] {
  color: var(--lime);
  background: rgba(198, 255, 61, 0.08);
}
.drawer .btn {
  margin-top: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border: none;
  border-radius: 14px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease;
}
.btn svg {
  flex: none;
}
.btn-lime {
  background: var(--lime);
  color: var(--basalt);
  box-shadow: 0 5px 0 var(--lime-dark);
}
.btn-lime:hover {
  color: var(--basalt);
  filter: brightness(1.05);
}
.btn-lime:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--lime-dark);
}
.btn-cream {
  background: var(--cream);
  color: var(--basalt);
  box-shadow: 0 5px 0 #b9a27e;
}
.btn-cream:hover {
  color: var(--basalt);
  filter: brightness(1.04);
}
.btn-cream:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #b9a27e;
}
.btn-out {
  background: transparent;
  border: 1.5px solid rgba(246, 227, 196, 0.3);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 700;
}
.btn-out:hover {
  border-color: var(--cream);
  color: var(--cream);
}
.btn-sec {
  min-height: 56px;
  background: #1c1730;
  border: 2px solid var(--line);
  color: var(--cream);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  padding: 0 22px;
}
.btn-sec:hover {
  border-color: var(--cream);
  color: var(--cream);
}
.btn-yellow {
  background: transparent;
  border: 2px solid var(--yellow);
  color: var(--yellow);
}
.btn-yellow:hover {
  background: rgba(255, 210, 63, 0.08);
  color: var(--yellow);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}
.shine {
  position: relative;
  overflow: hidden;
}
.shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shine 2.8s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.lime {
  color: var(--lime);
}
.h2 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05;
  color: var(--cream);
}
.lede {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: #e7dcf0;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.sec-head p {
  margin: 0;
  max-width: 400px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}
.section {
  padding-bottom: 96px;
}

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: min(780px, 100svh);
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--basalt) url("/images/hero.jpg") 70% 60% / cover no-repeat;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(20, 18, 31, 0.9) 0%,
    rgba(20, 18, 31, 0.5) 34%,
    rgba(20, 18, 31, 0) 56%
  );
}
.hero-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 18, 31, 0.55), rgba(20, 18, 31, 0));
}
.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(0deg, var(--basalt), rgba(20, 18, 31, 0));
}
.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding-bottom: 96px;
}
.live-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: rgba(35, 27, 54, 0.9);
  border: 1px solid var(--line);
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lime);
  animation: dot 0.75s ease-in-out infinite;
}
.hero-title {
  margin: 0;
  max-width: 640px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1;
  text-shadow: 0 6px 0 var(--basalt);
}
.hero-title .w {
  display: inline-block;
  animation: drop 0.7s cubic-bezier(0.3, 1.2, 0.5, 1) both;
}
.hero-title .w-run {
  color: var(--lime);
  animation:
    drop 0.7s cubic-bezier(0.3, 1.2, 0.5, 1) both,
    hopword 0.75s ease-in-out 1.5s infinite;
}
.hero-copy .lede {
  max-width: 460px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.fade {
  animation: fadeup 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* ---------- Worlds ---------- */
.worlds {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wcard {
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-line);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}
.wcard:hover {
  transform: translateY(-4px);
  border-color: #4a3e68;
}
.wcard img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--panel);
}
.wcard-body {
  padding: 16px 18px 20px;
}
.wnum {
  font-family: var(--display);
  font-size: 12px;
}
.wname {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.15;
}
.wdesc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Leaderboard table ---------- */
.board {
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  overflow: hidden;
}
.lb-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 130px 160px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 0 24px;
  border-top: 1px solid var(--row-line);
}
.lb-row:first-child {
  border-top: none;
}
.lb-head {
  min-height: 48px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--quiet);
}
.lb-row.top {
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.1), rgba(198, 255, 61, 0));
}
.lb-row.me {
  box-shadow: inset 4px 0 0 var(--lime);
}
.lb-rank {
  font-family: var(--display);
  font-size: 17px;
  color: var(--quiet);
}
.lb-runner {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  min-width: 0;
}
.lb-runner span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-depth {
  text-align: right;
  font-family: var(--display);
  font-size: 16px;
}
.lb-depth small {
  display: block;
  margin-top: 2px;
  font-family: var(--body);
  font-size: 11px;
  opacity: 0.6;
}
.lb-world {
  text-align: right;
  font-weight: 700;
  font-size: 14px;
}
.lb-empty {
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  border-top: 1px solid var(--row-line);
}
.lb-empty .cube {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  animation: hop 1.1s ease-in-out infinite;
}
.lb-empty b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
}
.lb-empty span {
  max-width: 420px;
  color: var(--muted);
}
.lb-loading {
  height: 64px;
  border-top: 1px solid var(--row-line);
  background: linear-gradient(90deg, transparent, rgba(246, 227, 196, 0.04), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

/* ---------- Bands ---------- */
.band {
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, #2b3a16 0%, var(--card) 55%);
  border: 1px solid rgba(198, 255, 61, 0.35);
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.band-copy {
  flex: 1 1 380px;
}
.band-copy p {
  margin: 12px 0 0;
  max-width: 480px;
  font-size: 16px;
  line-height: 1.55;
  color: #d6e6bc;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--row-line);
}
.footer-row {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 20px;
}
.footer-brand {
  font-family: var(--display);
  font-size: 16px;
  color: var(--sandstone);
}
.footer-tag {
  font-size: 14px;
  color: var(--quiet);
}
.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.footer-links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--cream);
}

/* ---------- Inner pages ---------- */
.page-glow {
  background: radial-gradient(100% 50% at 50% 0%, #251c3f 0%, var(--basalt) 70%) no-repeat;
}
.page-main {
  max-width: 1000px;
  padding-top: 40px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.page-title {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}
.lb-headrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.seg {
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-line);
}
.seg button {
  min-height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #c9bdd8;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.seg button[aria-selected="true"] {
  background: var(--lime);
  color: var(--basalt);
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.pc {
  border-radius: 20px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
  animation: pop 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.pc.p1 {
  padding-top: 32px;
  padding-bottom: 32px;
  background: linear-gradient(180deg, #2c3a15 0%, var(--card) 80%);
  border: 2px solid var(--lime);
  box-shadow: 0 0 50px rgba(198, 255, 61, 0.14);
}
.pc.p3 {
  border-color: #4a3420;
}
.pc .cube {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}
.pc.p1 .cube {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(198, 255, 61, 0.3);
}
.pc-rank {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
}
.pc.p1 .pc-rank {
  font-size: 40px;
  color: var(--lime);
}
.pc.p2 .pc-rank {
  color: var(--sandstone);
}
.pc.p3 .pc-rank {
  color: var(--amber);
}
.pc-name {
  max-width: 100%;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-depth {
  font-family: var(--display);
  font-size: 22px;
}
.pc.p1 .pc-depth {
  font-size: 26px;
}
.pc-world {
  font-size: 13px;
  font-weight: 700;
}
.cta-band {
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.12), rgba(198, 255, 61, 0.02));
  border: 1px solid rgba(198, 255, 61, 0.4);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-band > div {
  flex: 1 1 280px;
}
.cta-band b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
}
.cta-band span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #c9bdd8;
}

/* How to play */
.htp-hero {
  position: relative;
  overflow: hidden;
  background: url("/images/play.jpg") 50% 75% / cover no-repeat;
}
.htp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 18, 31, 0.88) 0%,
    rgba(20, 18, 31, 0.6) 50%,
    var(--basalt) 100%
  );
}
.htp-hero .wrap {
  position: relative;
}
.htp-intro {
  padding: 64px 0 80px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.htp-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1;
}
.htp-main {
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--basalt);
  font-family: var(--display);
  font-size: 14px;
  box-shadow: 0 4px 0 #b9a27e;
}
.or {
  color: var(--quiet);
  font-weight: 700;
}
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.tile {
  border-radius: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--card-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tile-icon {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tile-t {
  font-family: var(--display);
  font-size: 18px;
}
.tile-d {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.portal {
  width: 24px;
  height: 44px;
  border-radius: 50%;
  border: 5px solid var(--pink);
  box-shadow: 0 0 16px rgba(255, 107, 154, 0.55);
}
.coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--amber);
  border: 5px solid #ffe08a;
}
.depth-band {
  border-radius: 24px;
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(135deg, #2b3a16 0%, var(--card) 60%);
  border: 1px solid rgba(198, 255, 61, 0.35);
  display: flex;
  align-items: center;
  gap: 28px;
}
.depth-word {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  color: var(--lime);
}
.depth-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.depth-copy b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
}
.depth-copy span {
  font-size: 16px;
  line-height: 1.55;
  color: #d6e6bc;
}
.grid5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.mini {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-line);
  background: var(--card);
}
.mini img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.mini div {
  padding: 12px 14px;
  font-family: var(--display);
  font-size: 13px;
}

/* ---------- Connect dialog ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(11, 9, 18, 0.74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade 0.3s ease-out both;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  border-radius: 24px;
  background: #1a152b;
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modal 0.5s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.modal-bar {
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--sandstone) 0 30%,
    var(--terracotta) 30% 52%,
    var(--lime) 52% 64%,
    var(--panel) 64%
  );
}
.modal-body {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-brand {
  font-family: var(--display);
  font-size: 18px;
  color: var(--sandstone);
}
.modal-x {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(246, 227, 196, 0.06);
  cursor: pointer;
}
.modal-x:hover {
  color: var(--cream);
}
.modal h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 6vw, 32px);
  line-height: 1.05;
}
.modal p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #c9bdd8;
}
.modal p.sub {
  margin-top: 10px;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: #221b38;
  animation: rise 0.5s ease-out both;
}
.steps li:nth-child(2) {
  animation-delay: 0.08s;
}
.steps li:nth-child(3) {
  animation-delay: 0.16s;
}
.step-n {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--lime);
  color: var(--basalt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 15px;
  box-shadow: 0 3px 0 var(--lime-dark);
}
.steps b {
  display: block;
  font-size: 16px;
}
.steps small {
  font-size: 14px;
  color: var(--muted);
}
.safe {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px !important;
  color: #9d90ae !important;
}
.safe svg {
  flex: none;
  margin-top: 2px;
}
.modal-err {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 138, 115, 0.1);
  border: 1px solid rgba(255, 138, 115, 0.4);
  color: var(--error) !important;
  font-size: 15px !important;
}
.check-head {
  display: flex;
  align-items: center;
  gap: 18px;
}
.check-spin {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-spin svg {
  position: absolute;
  inset: 0;
  animation: spin 2s linear infinite;
}
.check-spin .cube {
  width: 40px;
  height: 40px;
  animation: hop 1s ease-in-out infinite;
}
.check-head .wallet {
  margin-top: 6px;
  font-size: 16px;
  color: #c9bdd8;
}
.check-head .wallet b {
  color: var(--cream);
}
.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crow {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 14px;
  background: #221b38;
}
.crow-l {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--quiet);
  transition: color 0.2s ease;
}
.crow-l small {
  font-weight: 500;
  font-size: 15px;
}
.crow-i {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
}
.crow-i::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--lime);
  animation: spin 0.8s linear infinite;
  opacity: 0;
}
.crow.is-active .crow-i::before {
  opacity: 1;
}
.crow.is-active .crow-l,
.crow.is-done .crow-l {
  color: var(--cream);
}
.crow-i .tk {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: var(--lime);
  box-shadow: 0 3px 0 var(--lime-dark);
  display: none;
  align-items: center;
  justify-content: center;
}
.crow.is-done .crow-i .tk {
  display: flex;
  animation: pop-tick 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.crow.is-done .crow-i::before {
  opacity: 0;
}
.lost-cube {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  opacity: 0.6;
  filter: grayscale(0.7);
  align-self: center;
  animation: sway 3.2s ease-in-out 0.6s infinite;
}
.center {
  text-align: center;
  align-items: center;
}
.center .btn {
  align-self: stretch;
}

/* ---------- Card page ---------- */
.card-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.card-glow {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 1300px;
  height: 900px;
  margin: -450px 0 0 -650px;
  pointer-events: none;
  animation: breathe 5s ease-in-out infinite;
}
.is-approved .card-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(61, 220, 132, 0.22),
    rgba(61, 220, 132, 0) 60%
  );
}
.is-pending .card-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 210, 63, 0.16),
    rgba(255, 210, 63, 0) 60%
  );
}
.card-main {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 48px) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.badge {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.is-approved .badge {
  background: var(--green);
  color: #0b2a18;
}
.is-pending .badge {
  border: 1px solid var(--yellow);
  color: var(--yellow);
}
.card-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}
.is-approved .card-title em {
  font-style: normal;
  color: var(--green);
  text-shadow: 0 4px 0 var(--green-dark);
}
.is-pending .card-title em {
  font-style: normal;
  color: var(--yellow);
  text-shadow: 0 4px 0 var(--yellow-dark);
}
.thud {
  width: 100%;
  max-width: 840px;
}
.thud.go {
  animation: thud 0.35s ease-out 1.5s both;
}
.spot {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 675;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.is-approved .spot {
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(61, 220, 132, 0.35);
}
.is-pending .spot {
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 210, 63, 0.3);
}
.spot.go {
  animation: card-in 1s cubic-bezier(0.16, 1.1, 0.3, 1) both;
}
.spot img {
  position: absolute;
}
.spot-base {
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Stamp box: card.js STAMP (x 320, y 360, size 240) on the 1200 x 675 card. */
.spot-stamp {
  left: 26.67%;
  top: 53.33%;
  width: 20%;
  height: 35.56%;
  opacity: 0;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  transform: rotate(-13.75deg);
}
.go .spot-stamp {
  animation: stamp 0.42s cubic-bezier(0.55, 0, 0.8, 0.4) 1.1s both;
}
.spot-ring {
  position: absolute;
  left: 36.67%;
  top: 71.1%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 6px solid var(--green);
  opacity: 0;
  pointer-events: none;
}
.is-pending .spot-ring {
  border-color: var(--yellow);
}
.go .spot-ring {
  animation: ring 0.9s ease-out 1.5s both;
}
.spot-sweep {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 22%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 240, 0.22),
    rgba(255, 255, 255, 0)
  );
}
.go .spot-sweep {
  animation: sweep 1.2s ease-in-out 0.75s both;
}
.spot-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spot-loading .cube {
  width: 48px;
  height: 48px;
  animation: hop 1s ease-in-out infinite;
}
.card-note {
  margin: 4px 0 0;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--soft);
}
.card-note b {
  color: var(--cream);
}
.card-acts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.card-status {
  min-height: 24px;
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.card-status.ok {
  color: var(--lime);
}
.late {
  animation: rise 0.7s cubic-bezier(0.2, 1.1, 0.3, 1) 1.8s both;
}
.cta-glow {
  animation:
    rise 0.7s cubic-bezier(0.2, 1.1, 0.3, 1) 1.8s both,
    glow 2.2s ease-in-out 2.6s infinite;
}
.card-empty {
  max-width: 520px;
  margin: 10vh auto 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* ---------- Play ---------- */
.play {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ink) url("/images/play.jpg") 50% 70% / cover no-repeat;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.play-canvas,
.play-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.pause-menu {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 11, 23, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.pause-menu strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  margin-bottom: 10px;
  text-shadow: 0 5px 0 var(--ink);
}
.pause-menu .btn {
  min-width: 220px;
}
.pause-menu .delay {
  display: grid;
  grid-template-columns: auto 76px auto;
  align-items: center;
  justify-items: center;
  gap: 8px 10px;
  margin-top: 10px;
  max-width: 300px;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.pause-menu .delay .key {
  border: 0;
  cursor: pointer;
  font-size: 18px;
}
.pause-menu .delay output {
  font-family: var(--display);
  font-size: 15px;
}
.pause-menu .delay span,
.pause-menu .delay small {
  grid-column: 1 / -1;
  text-align: center;
  letter-spacing: 0;
  opacity: 0.7;
}
.play-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 70% at 50% 55%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.5) 100%
  );
}
.hud {
  background: rgba(20, 18, 31, 0.78);
  border: 1px solid rgba(246, 227, 196, 0.12);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hud-top,
.hud-bottom {
  position: absolute;
  left: max(12px, env(safe-area-inset-left), 2.5vw);
  right: max(12px, env(safe-area-inset-right), 2.5vw);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: hud-in 0.6s ease-out both;
}
.hud-top {
  top: max(16px, env(safe-area-inset-top));
  align-items: flex-start;
}
.hud-bottom {
  bottom: max(16px, env(safe-area-inset-bottom));
  animation-delay: 0.2s;
}
.hud-stat {
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--sandstone);
}
.hud-big {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}
.hud-world {
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hud-world .hud-label {
  color: var(--lime);
}
.pips {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pips i {
  width: 18px;
  height: 6px;
  background: rgba(246, 227, 196, 0.2);
}
.pips i.on {
  width: 28px;
  background: var(--lime);
}
.hud-coins {
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 18px;
}
.hud-coins .coin {
  width: 18px;
  height: 18px;
  border-width: 3px;
}
.hud .ib,
.hud-top .ib {
  width: 46px;
  height: 46px;
  background: rgba(20, 18, 31, 0.78);
  border: 2px solid rgba(246, 227, 196, 0.25);
}
.hud-bests {
  padding: 10px 16px;
  display: flex;
  gap: 22px;
  align-items: center;
}
.hud-bests small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--quiet);
}
.hud-bests b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
}
.hud-bests a {
  font-size: 14px;
  font-weight: 700;
}
.play-prompt {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
}
.play-prompt strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  text-shadow:
    0 5px 0 var(--ink),
    0 0 40px rgba(198, 255, 61, 0.25);
  animation: pulse 1.5s ease-in-out infinite;
}
.play-prompt > span {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #e7dcf0;
}
.play-prompt .key {
  height: 40px;
}
.spacer {
  flex: 1;
}

/* ---------- Privacy / 404 ---------- */
.doc {
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 96px;
}
.doc h1 {
  margin: 8px 0 24px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1;
}
.doc h2 {
  margin: 36px 0 10px;
  font-size: 20px;
}
.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--soft);
}
.doc ul {
  padding-left: 20px;
}
.lost {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
.lost-code {
  font-family: var(--display);
  font-size: clamp(80px, 18vw, 160px);
  line-height: 1;
  color: var(--panel);
  text-shadow: 0 6px 0 var(--ink);
}
.lost h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
}
.lost p {
  margin: 0 0 8px;
  color: var(--muted);
}

/* ---------- Enter screen + sound (home) ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(20, 18, 31, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    opacity 0.45s ease,
    visibility 0.45s;
}
.gate.is-leaving {
  opacity: 0;
  visibility: hidden;
}
.gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: gate-in 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.gate-logo {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 13vw, 96px);
  font-weight: 400;
  line-height: 1;
  color: var(--sandstone);
  text-shadow:
    0 5px 0 var(--terracotta),
    0 10px 0 var(--basalt);
}
.gate-tag {
  margin: 4px 0 10px;
  font-size: 18px;
  font-weight: 500;
}
.gate-enter {
  min-width: 260px;
  animation: gate-glow 2s ease-in-out 0.6s infinite;
}
.gate-quiet {
  min-height: 44px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: rgba(246, 227, 196, 0.7);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.gate-quiet:hover {
  color: var(--cream);
}
.sound-toggle .icon-off,
.sound-toggle.is-on .icon-on {
  display: block;
}
.sound-toggle .icon-on,
.sound-toggle.is-on .icon-off {
  display: none;
}
.sound-toggle:not(.is-on) {
  color: rgba(246, 227, 196, 0.55);
}
.sound-toggle.is-playing {
  border-color: var(--lime);
  color: var(--lime);
}
.sound-toggle.is-waiting {
  animation: sound-nudge 1.6s ease-in-out infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .worlds,
  .grid5 {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 240px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    -webkit-overflow-scrolling: touch;
  }
  .grid5 {
    grid-auto-columns: 200px;
  }
  .worlds > *,
  .grid5 > * {
    scroll-snap-align: start;
  }
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1120px) {
  .lnk {
    padding: 0 10px;
  }
  .lnk[aria-current="page"]::after {
    left: 10px;
    right: 10px;
  }
}
@media (max-width: 860px) {
  .links,
  .acts .cta-sm,
  .acts .chip,
  .acts .logout {
    display: none;
  }
  .menu {
    display: flex;
  }
  .acts {
    margin-left: auto;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  .hdr {
    height: 68px;
  }
  .brand-txt {
    font-size: 20px;
  }
  .drawer {
    top: 64px;
  }
  .hero {
    min-height: 560px;
    background-position: 62% 60%;
  }
  .hero-shade {
    background: linear-gradient(
      180deg,
      rgba(20, 18, 31, 0.2) 0%,
      rgba(20, 18, 31, 0.55) 45%,
      rgba(20, 18, 31, 0.92) 100%
    );
  }
  .hero-copy {
    justify-content: flex-end;
    padding-bottom: 40px;
    gap: 18px;
  }
  .hero-copy .lede {
    font-size: 16px;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    min-height: 52px;
    padding: 0 20px;
    font-size: 15px;
  }
  .section {
    padding-bottom: 72px;
  }
  .lb-row {
    grid-template-columns: 36px minmax(0, 1fr) 96px;
    padding: 0 16px;
  }
  .lb-world {
    display: none;
  }
  .lb-depth {
    font-size: 15px;
  }
  .podium {
    gap: 8px;
  }
  .pc {
    padding: 16px 8px;
    border-radius: 16px;
  }
  .pc.p1 {
    padding: 20px 8px;
  }
  .pc .cube {
    width: 40px;
    height: 40px;
  }
  .pc.p1 .cube {
    width: 54px;
    height: 54px;
  }
  .pc-name {
    font-size: 13px;
  }
  .pc-depth,
  .pc.p1 .pc-depth {
    font-size: 16px;
  }
  .pc-rank {
    font-size: 24px;
  }
  .pc.p1 .pc-rank {
    font-size: 30px;
  }
  .grid4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile {
    padding: 20px;
  }
  .depth-band {
    flex-direction: column;
    align-items: flex-start;
  }
  .htp-intro {
    padding: 40px 0 56px;
  }
  .htp-main {
    gap: 48px;
  }
  .modal {
    align-items: flex-end;
    padding: 12px 8px;
  }
  .modal-body {
    padding: 24px 20px 22px;
    gap: 18px;
  }
  .check-spin {
    width: 64px;
    height: 64px;
  }
  .card-acts > * {
    flex: 1 1 100%;
  }
  .hide-sm {
    display: none !important;
  }
  .hud-big {
    font-size: 24px;
  }
  .footer-links {
    margin-left: 0;
    width: 100%;
  }
}
@media (max-width: 380px) {
  .lb-row {
    grid-template-columns: 30px minmax(0, 1fr) 84px;
    gap: 8px;
  }
  .seg button {
    padding: 0 14px;
  }
}

/* ---------- Motion ---------- */
@keyframes drop {
  0% {
    transform: translateY(-90px) rotate(-12deg);
    opacity: 0;
  }
  60% {
    transform: translateY(10px) rotate(3deg);
    opacity: 1;
  }
  80% {
    transform: translateY(-4px) rotate(0);
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes hopword {
  0%,
  18%,
  82%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}
@keyframes fadeup {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.9);
    opacity: 0.3;
  }
}
@keyframes shine {
  0%,
  55% {
    transform: translateX(-160%) skewX(-20deg);
  }
  100% {
    transform: translateX(360%) skewX(-20deg);
  }
}
@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
@keyframes hop {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px) rotate(-8deg);
  }
  60% {
    transform: translateY(0) scale(1.08, 0.92);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pop-tick {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-25deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sway {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg) translateY(-6px);
  }
}
@keyframes breathe {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
@keyframes card-in {
  0% {
    opacity: 0;
    transform: perspective(1200px) translateY(160px) rotateX(-30deg) scale(0.82);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) translateY(0) rotateX(0) scale(1);
  }
}
@keyframes sweep {
  from {
    opacity: 1;
    transform: translateX(-120%) skewX(-18deg);
  }
  to {
    opacity: 1;
    transform: translateX(420%) skewX(-18deg);
  }
}
@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-55deg) scale(3);
  }
  70% {
    opacity: 1;
    transform: rotate(-11deg) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: rotate(-13.75deg) scale(1);
  }
}
@keyframes thud {
  0%,
  100% {
    transform: none;
  }
  20% {
    transform: translate(-6px, 5px);
  }
  45% {
    transform: translate(5px, -4px);
  }
  70% {
    transform: translate(-2px, 2px);
  }
}
@keyframes ring {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.4);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.6);
  }
}
@keyframes glow {
  0%,
  100% {
    box-shadow:
      0 5px 0 var(--lime-dark),
      0 0 0 0 rgba(198, 255, 61, 0);
  }
  50% {
    box-shadow:
      0 5px 0 var(--lime-dark),
      0 0 0 12px rgba(198, 255, 61, 0.18);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.98);
  }
}
@keyframes hud-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gate-glow {
  0%,
  100% {
    box-shadow:
      0 5px 0 var(--lime-dark),
      0 0 0 0 rgba(198, 255, 61, 0);
  }
  50% {
    box-shadow:
      0 5px 0 var(--lime-dark),
      0 0 0 10px rgba(198, 255, 61, 0.18);
  }
}
@keyframes sound-nudge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 255, 61, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.35);
    border-color: var(--lime);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition: none !important;
  }
}

/* Cooldown popup (play.js coolDown) */
.cooldown h2 {
  font-family: var(--display);
  font-size: 28px;
  color: var(--cream);
  margin: 0;
}
.cool-time {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  text-align: center;
  color: var(--lime);
}

/* ---------- Apply for Whitelist (apply.html, js/apply.js) ---------- */
.apply-body {
  background: var(--ink);
}
.apply {
  position: relative;
  min-height: calc(100vh - 80px);
  overflow: hidden;
  isolation: isolate;
}
/* The sky: drifting strata, a slow light beam, dust and a vignette. */
.apply-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(198, 255, 61, 0.12), transparent 60%),
    radial-gradient(90% 60% at 85% 20%, rgba(183, 155, 232, 0.14), transparent 60%),
    linear-gradient(180deg, #0b0912 0%, #14121f 55%, #1a1430 100%);
}
.apply-beam {
  position: absolute;
  top: -30%;
  left: 50%;
  width: 60vmax;
  height: 140%;
  transform: translateX(-50%) rotate(12deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(232, 199, 154, 0.07) 40%,
    rgba(198, 255, 61, 0.1) 50%,
    rgba(232, 199, 154, 0.07) 60%,
    transparent
  );
  filter: blur(18px);
  animation: apply-beam 14s ease-in-out infinite alternate;
}
.apply-strata {
  position: absolute;
  inset: auto -10% -6% -10%;
  height: 62%;
}
.apply-strata i {
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  animation: apply-drift 18s ease-in-out infinite alternate;
}
.apply-strata i:nth-child(1) {
  bottom: 52%;
  background: linear-gradient(180deg, rgba(232, 199, 154, 0.22), transparent);
  animation-duration: 22s;
}
.apply-strata i:nth-child(2) {
  bottom: 38%;
  background: linear-gradient(180deg, rgba(200, 85, 61, 0.3), transparent);
  animation-duration: 19s;
  animation-delay: -4s;
}
.apply-strata i:nth-child(3) {
  bottom: 24%;
  background: linear-gradient(180deg, rgba(183, 155, 232, 0.24), transparent);
  animation-duration: 25s;
  animation-delay: -8s;
}
.apply-strata i:nth-child(4) {
  bottom: 10%;
  background: linear-gradient(180deg, rgba(255, 177, 59, 0.2), transparent);
  animation-duration: 21s;
  animation-delay: -2s;
}
.apply-strata i:nth-child(5) {
  bottom: -6%;
  background: linear-gradient(180deg, rgba(198, 255, 61, 0.14), #0b0912 70%);
  animation-duration: 27s;
}
.apply-dust {
  position: absolute;
  inset: -40px 0 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(246, 227, 196, 0.7), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(198, 255, 61, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 47% 14%, rgba(246, 227, 196, 0.5), transparent),
    radial-gradient(1px 1px at 63% 52%, rgba(183, 155, 232, 0.8), transparent),
    radial-gradient(2px 2px at 78% 30%, rgba(246, 227, 196, 0.5), transparent),
    radial-gradient(1px 1px at 88% 76%, rgba(198, 255, 61, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 6% 84%, rgba(255, 177, 59, 0.6), transparent),
    radial-gradient(1px 1px at 36% 40%, rgba(246, 227, 196, 0.6), transparent);
  animation: apply-dust 30s linear infinite alternate;
}
.apply-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 90% at 50% 40%, transparent 55%, rgba(11, 9, 18, 0.85));
}
.apply-inner {
  position: relative;
  max-width: 760px;
  padding-top: clamp(40px, 8vh, 88px);
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.apply-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.apply-eyebrow {
  animation: fadeup 0.8s 0.1s ease-out both;
}
.apply-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-shadow:
    0 0 32px rgba(198, 255, 61, 0.25),
    0 6px 0 rgba(0, 0, 0, 0.35);
}
.apply-ch {
  display: inline-block;
  animation: apply-ch 0.9s calc(0.25s + var(--d) * 0.035s) cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.apply-word {
  display: inline-block;
  white-space: nowrap;
}
.apply-lede {
  margin: 0;
  max-width: 560px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.6;
  animation: fadeup 0.9s 0.9s ease-out both;
}
/* The form card: glass over the sky, with a slowly turning glowing edge. */
.apply-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 24px;
  background: rgba(27, 22, 48, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(198, 255, 61, 0.16);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: apply-card 1s 1.1s cubic-bezier(0.2, 1, 0.3, 1) both;
}
@property --apply-turn {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.apply-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(
    from var(--apply-turn),
    transparent 0 60%,
    rgba(198, 255, 61, 0.75) 75%,
    rgba(232, 199, 154, 0.5) 85%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: apply-turn 8s linear infinite;
}
.apply-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 52px;
  animation: fadeup 0.7s calc(1.4s + var(--i) * 0.15s) ease-out both;
}
.apply-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 13px;
  color: var(--lime);
  background: rgba(198, 255, 61, 0.08);
  border: 1px solid rgba(198, 255, 61, 0.25);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}
.apply-field:focus-within .apply-num {
  background: var(--lime);
  color: var(--basalt);
  box-shadow: 0 0 24px rgba(198, 255, 61, 0.55);
}
.apply-field.bad .apply-num {
  background: rgba(255, 138, 115, 0.12);
  border-color: rgba(255, 138, 115, 0.5);
  color: var(--error);
  box-shadow: none;
}
.apply-label {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.3;
  color: var(--cream);
  min-height: 38px;
  display: flex;
  align-items: center;
}
.apply-hint {
  margin-top: -6px;
  font-size: 13px;
  color: var(--muted);
}
.apply-field input,
.apply-field textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 9, 18, 0.7);
  color: var(--cream);
  font: 16px/1.5 var(--body);
  outline: none;
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.apply-field textarea {
  min-height: 140px;
}
.apply-field input::placeholder,
.apply-field textarea::placeholder {
  color: var(--quiet);
}
.apply-field input:focus,
.apply-field textarea:focus {
  border-color: var(--lime);
  background: rgba(11, 9, 18, 0.9);
  box-shadow:
    0 0 0 4px rgba(198, 255, 61, 0.14),
    0 0 36px rgba(198, 255, 61, 0.12);
}
.apply-field.bad input,
.apply-field.bad textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 138, 115, 0.12);
}
.apply-count {
  align-self: flex-end;
  margin-top: -2px;
  font-size: 12px;
  color: var(--quiet);
}
.apply-count b {
  color: var(--soft);
  font-weight: 500;
}
.apply-err {
  font-size: 13px;
  color: var(--error);
}
.apply-err:empty {
  display: none;
}
.apply-err-form {
  margin: 0;
  text-align: center;
}
.apply-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.apply-send {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  font-size: 17px;
  animation: fadeup 0.7s 1.95s ease-out both;
}
.apply-send::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: apply-shine 3.2s 2.6s ease-in-out infinite;
}
.apply-send[aria-busy="true"] {
  filter: saturate(0.6);
  cursor: progress;
}
.apply-send[aria-busy="true"] .apply-send-txt {
  animation: breathe 1.2s ease-in-out infinite;
}
.apply-fine {
  margin: -6px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--quiet);
  animation: fadeup 0.7s 2.05s ease-out both;
}
/* The "application sent" moment. */
.apply-done {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: radial-gradient(80% 70% at 50% 45%, rgba(36, 29, 56, 0.92), rgba(11, 9, 18, 0.97));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: fade 0.35s ease-out both;
}
.apply-done.out {
  animation: apply-out 0.35s ease-in both;
}
.apply-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(228, 255, 154, 0.9),
    rgba(198, 255, 61, 0.25) 30%,
    transparent 60%
  );
  animation: apply-flash 1.1s ease-out both;
}
.apply-done-stage {
  position: relative;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.apply-rings {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 0;
  height: 0;
}
.apply-rings i {
  position: absolute;
  left: -40px;
  top: -40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  opacity: 0;
  animation: apply-ring 1.8s 0.55s cubic-bezier(0.1, 0.6, 0.3, 1) both;
}
.apply-rings i:nth-child(2) {
  animation-delay: 0.75s;
  border-color: var(--sandstone);
}
.apply-rings i:nth-child(3) {
  animation-delay: 0.95s;
  border-color: var(--lilac);
}
.apply-done-cube {
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 30px rgba(198, 255, 61, 0.5));
  animation: apply-land 0.9s 0.1s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.apply-done-stage .eyebrow {
  animation: fadeup 0.6s 0.9s ease-out both;
}
.apply-done-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 8vw, 52px);
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 0 40px rgba(198, 255, 61, 0.35);
  animation: apply-stamp 0.6s 1s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.apply-done-text {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.6;
  animation: fadeup 0.7s 1.3s ease-out both;
}
.apply-done-btn {
  margin-top: 8px;
  min-width: 200px;
  animation: fadeup 0.7s 1.55s ease-out both;
}
@keyframes apply-ch {
  from {
    opacity: 0;
    transform: translateY(0.7em) rotateX(70deg) scale(0.9);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes apply-card {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes apply-turn {
  to {
    --apply-turn: 360deg;
  }
}
@keyframes apply-beam {
  from {
    transform: translateX(-62%) rotate(9deg);
    opacity: 0.7;
  }
  to {
    transform: translateX(-38%) rotate(15deg);
    opacity: 1;
  }
}
@keyframes apply-drift {
  from {
    transform: translateX(-3%) scaleY(1);
  }
  to {
    transform: translateX(3%) scaleY(1.08);
  }
}
@keyframes apply-dust {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(40px);
  }
}
@keyframes apply-shine {
  0%,
  60% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}
@keyframes apply-flash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes apply-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(5);
  }
}
@keyframes apply-land {
  0% {
    opacity: 0;
    transform: translateY(-220px) rotate(-25deg) scale(0.6);
  }
  55% {
    opacity: 1;
    transform: translateY(0) rotate(4deg) scale(1.08, 0.9);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes apply-stamp {
  from {
    opacity: 0;
    transform: scale(1.6);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes apply-out {
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}
@media (max-width: 560px) {
  .apply-field {
    padding-left: 0;
  }
  .apply-num {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .apply-label {
    min-height: 0;
  }
  .apply-lede {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .apply *,
  .apply-done,
  .apply-done * {
    animation: none !important;
    transition: none !important;
  }
}
