/* ==========================================================================
   PUMPLIFT — styles
   Palette: neon pink, lime, ink black, white. Amber is reserved for hazards.
   ========================================================================== */
:root {
  --pink: #ff2e93; --pink-d: #b8136a; --pink-l: #ff8cc6;
  --lime: #c2fd12; --lime-d: #78a800; --lime-l: #e6ff9c;
  --white: #f7f7f2; --muted: #a6a6b8; --dim: #6e6e82;
  --ink: #0a0a0f; --ink2: #111118; --ink3: #191924; --ink4: #24243a; --line: #2e2e44;
  --amber: #ffc93c;
  --px: "Silkscreen", ui-monospace, monospace;
  --body: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  --r: 4px;
  --shadow: 4px 4px 0 var(--ink);
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--white); font: 16px/1.55 var(--body);
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow-x: hidden;
  overflow-x: clip;
}
html { overflow-x: clip; }
img, canvas { display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--lime); }
h1, h2, h3, h4 { font-family: var(--px); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
kbd { font: 700 .78em var(--px); background: var(--ink4); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 1px 5px; color: var(--white); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--ink); padding: 8px 12px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- buttons & chips */
.btn {
  --bg: var(--ink3); --fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--px); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  background: var(--bg); color: var(--fg); border: 3px solid var(--ink); border-radius: var(--r);
  padding: 13px 18px; box-shadow: var(--shadow); cursor: pointer; user-select: none;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
}
.btn:hover { filter: brightness(1.08); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; filter: grayscale(.7) brightness(.7); transform: none; box-shadow: var(--shadow); }
.btn-pink { --bg: var(--pink); --fg: var(--ink); }
.btn-lime { --bg: var(--lime); --fg: var(--ink); }
.btn-ghost { --bg: transparent; border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--white); box-shadow: none; transform: none; }
.btn-ghost:active { box-shadow: none; transform: translateY(1px); }
.btn-xl { font-size: 20px; padding: 18px 28px; }
.btn-sm { font-size: 12px; padding: 9px 12px; }
.btn-disabled { --bg: var(--ink3); --fg: var(--muted); border-style: dashed; border-color: var(--line); box-shadow: none; cursor: default; }
.btn-disabled:hover { transform: none; box-shadow: none; filter: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--lime); font: 600 14px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-flex; align-items: center; font: 700 11px/1 var(--px); text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px; border-radius: 3px; background: var(--ink4); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip-lime { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.chip-pink { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.chip-warn { background: transparent; color: var(--amber); border-color: rgba(255,201,60,.5); }

/* ---------- nav */
.nav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 20px;
  padding: 10px max(var(--gutter), calc((100vw - 1200px) / 2));
  background: rgba(10,10,15,.88); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; }
.brand-word { font: 700 20px var(--px); letter-spacing: .04em; }
.nav-links { display: flex; gap: 18px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--white); }
.nav-actions { margin-left: 8px; display: flex; gap: 8px; align-items: center; }
.icon-sm { width: 38px; height: 38px; box-shadow: 3px 3px 0 var(--ink); border-width: 2px; }
.icon-sm svg { width: 16px; height: 16px; }
.btn-wallet { --bg: var(--white); --fg: var(--ink); font-size: 13px; padding: 10px 14px; max-width: 220px; }
.btn-wallet .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.btn-wallet.connected { --bg: var(--lime); }
.btn-wallet.connected .dot { background: var(--ink); }
.btn-wallet.busy .dot { background: var(--pink); animation: blink .6s steps(2) infinite; }
#walletBtnText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- layout */
.section { padding: 88px max(var(--gutter), calc((100vw - 1200px) / 2)); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 46px); margin: 6px 0 14px; }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head strong { color: var(--white); }
.kicker { font: 700 13px var(--px); color: var(--pink); text-transform: uppercase; letter-spacing: .08em; }
.center { display: flex; justify-content: center; margin-top: 36px; }
.card { background: var(--ink2); border: 2px solid var(--ink4); border-radius: 6px; padding: 20px; }
.card-h { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.card-h2 { margin-top: 18px; }
.card-h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.card-h-row .card-h { margin: 0; }
.fine { color: var(--dim); font-size: 13px; margin-top: 12px; }
.sub-h { font-size: 20px; margin: 56px 0 18px; }

/* ---------- hero */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: 64px max(var(--gutter), calc((100vw - 1200px) / 2)) 56px;
}
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.7vw, 66px); line-height: 1.05; }
.hero h1 .hl { color: var(--lime); text-shadow: 4px 4px 0 var(--pink-d); }
.lead { font-size: 20px; color: var(--muted); margin: 20px 0 26px; max-width: 520px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ca-card { margin-top: 30px; background: var(--ink2); border: 2px solid var(--ink4); border-left: 4px solid var(--pink); border-radius: 6px; padding: 14px 16px; max-width: 560px; }
.ca-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.ca-label { font: 700 12px var(--px); text-transform: uppercase; letter-spacing: .06em; color: var(--white); }
.ca-row { display: flex; gap: 10px; align-items: center; }
.ca-text { flex: 1; min-width: 0; font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; color: var(--dim); overflow-wrap: anywhere; }
.ca-text.live { color: var(--lime); }
.ca-note { color: var(--dim); font-size: 13px; margin-top: 8px; }
.buy-row { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-social { display: flex; gap: 10px; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; background: var(--white); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .08s ease, box-shadow .08s ease; }
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--lime); }
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.off { opacity: .5; cursor: not-allowed; box-shadow: none; }
.hero-art { position: relative; }
.hero-stage {
  position: relative; aspect-ratio: 3 / 2; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, rgba(255,46,147,.22), transparent 60%), var(--ink3);
  box-shadow: 8px 8px 0 var(--pink-d);
}
#heroCanvas { width: 100%; height: 100%; }
.sticker { position: absolute; font: 700 12px var(--px); text-transform: uppercase; padding: 7px 10px; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
.sticker-a { top: 14px; left: 14px; background: var(--lime); color: var(--ink); transform: rotate(-3deg); }
.sticker-b { bottom: 14px; right: 14px; background: var(--white); color: var(--ink); transform: rotate(2deg); }

/* ---------- tape */
.tape { background: var(--lime); color: var(--ink); border-block: 3px solid var(--ink); overflow: hidden; transform: rotate(-1deg); margin: 10px -10px; }
.tape-track { display: flex; gap: 22px; width: max-content; padding: 10px 0; animation: tape 30s linear infinite; font: 700 16px var(--px); white-space: nowrap; }
.tape-track i { font-style: normal; color: var(--pink-d); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- play */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.game-col { display: flex; flex-direction: column; min-width: 0; width: 100%; max-width: max(560px, calc((100vh - 230px) * 1.6)); justify-self: center; }
.hud { scroll-margin-top: 72px; display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr .8fr; gap: 2px; background: var(--ink); border: 3px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; overflow: hidden; }
.hud-cell { background: var(--ink3); padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hud-k { font: 700 10px var(--px); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.hud-v { font: 700 17px var(--px); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; background: var(--ink); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--pink); transform-origin: left; }
.bar-lime i { background: var(--lime); }
.bar-load i { background: var(--lime); width: 0; }
.hud-v.mult { color: var(--lime); }
.hud-v.danger { color: var(--pink); }
.hud-time.low .hud-v { color: var(--pink); animation: blink .5s steps(2) infinite; }

.stage { position: relative; aspect-ratio: 384 / 240; background: var(--ink); border: 3px solid var(--ink); outline-offset: 0; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.stage:focus-visible { outline: 3px solid var(--lime); }
#game { width: 100%; height: 100%; image-rendering: pixelated; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(10,10,15,.72); backdrop-filter: blur(2px); }
.ov-card { text-align: center; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ov-card h3 { font-size: clamp(22px, 3.6vw, 34px); }
.ov-sub { color: var(--muted); }
.ov-keys { color: var(--dim); font-size: 13px; line-height: 1.9; }
.tut { background: var(--ink2); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--pink-d); border-radius: 8px; padding: 20px; }
.tut-art { width: 168px; height: 120px; border: 2px solid var(--ink4); border-radius: 4px; }
.tut-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--ink); border: 2px solid var(--pink); border-radius: 4px; padding: 8px 14px; text-align: center; display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: 92%; animation: drop .3s ease-out; pointer-events: none; }
.banner strong { font: 700 14px var(--px); color: var(--pink); text-transform: uppercase; }
.banner span { font-size: 13px; color: var(--white); }
.hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(10,10,15,.88); border: 2px solid var(--lime); color: var(--white); font: 700 12px var(--px); padding: 7px 12px; border-radius: 4px; width: max-content; max-width: 92%; text-align: center; pointer-events: none; }
.toasts { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; max-width: 60%; }
.toast { background: var(--ink); border: 2px solid var(--line); border-left: 4px solid var(--lime); color: var(--white); font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 4px; animation: slide .25s ease-out; }
.toast.bad { border-left-color: var(--pink); }
.toast.warn, .toast.rush { border-left-color: var(--amber); }
.toast.out { opacity: 0; transition: opacity .3s; }
.toasts-page { position: fixed; top: auto; bottom: 16px; right: 16px; z-index: 60; max-width: min(380px, calc(100vw - 32px)); }
.toasts-page .toast { box-shadow: var(--shadow); font-size: 14px; }

.goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--ink); border: 3px solid var(--ink); border-top: 0; border-radius: 0 0 8px 8px; overflow: hidden; }
.goals li { background: var(--ink2); padding: 8px 10px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.goals .box { flex: none; width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 2px; margin-top: 2px; display: grid; place-items: center; font: 700 10px var(--px); }
.goals li.done .box { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.goals li.failed { opacity: .5; }
.goals li.failed .box { border-color: var(--pink); color: var(--pink); }
.goals .g-l { display: block; color: var(--white); font-weight: 600; }
.goals .g-p { display: block; color: var(--dim); font-size: 12px; }

.game-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.bar-note { color: var(--dim); font-size: 13px; margin-left: auto; }

/* touch controls */
.touch { display: none; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pad { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--ink3); border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px var(--ink4), var(--shadow); flex: none; touch-action: none; }
.pad-arrow { position: absolute; color: var(--dim); font-size: 14px; pointer-events: none; }
.pad-arrow.up { top: 8px; left: 50%; transform: translateX(-50%); }
.pad-arrow.down { bottom: 8px; left: 50%; transform: translateX(-50%); }
.pad-arrow.left { left: 10px; top: 50%; transform: translateY(-50%); }
.pad-arrow.right { right: 10px; top: 50%; transform: translateY(-50%); }
.pad-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); pointer-events: none; }
.touch-btns { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 10px; align-items: center; }
.tbtn { font: 700 15px var(--px); border: 3px solid var(--ink); border-radius: 50%; box-shadow: var(--shadow); color: var(--ink); touch-action: none; -webkit-tap-highlight-color: transparent; }
.tbtn:active, .tbtn.on { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.tbtn-lift { width: 92px; height: 92px; background: var(--lime); grid-row: 1 / span 2; grid-column: 2; }
.tbtn-boost { width: 70px; height: 70px; background: var(--pink); font-size: 12px; }
.tbtn-boost.cool { filter: grayscale(.8) brightness(.6); }
.tbtn-horn { width: 52px; height: 52px; background: var(--white); font-size: 10px; justify-self: end; }
.touch-only { display: none; }
body.is-touch .touch { display: flex; order: 3; }
body.is-touch .goals { order: 4; margin-top: 12px; border-top: 3px solid var(--ink); border-radius: 8px; }
body.is-touch .game-bar { order: 5; }
body.is-touch .touch-only { display: block; }
body.is-touch .desk-only { display: none; }

/* side */
.side { display: flex; flex-direction: column; gap: 16px; }
.player-top { display: flex; align-items: center; gap: 12px; }
.player-avatar { width: 72px; height: 51px; background: var(--ink3); border: 2px solid var(--ink4); border-radius: 4px; }
.player-name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.player-title { font: 700 13px var(--px); color: var(--lime); text-transform: uppercase; }
.lp-row { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; }
.lp-v { font: 700 30px var(--px); color: var(--white); }
.lp-k { color: var(--muted); font-size: 14px; }
.rank-bar { height: 10px; background: var(--ink); border: 2px solid var(--ink4); border-radius: 3px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 8px, var(--lime-d) 8px 10px); transition: width .6s ease; }
.rank-next { color: var(--muted); font-size: 13px; margin-top: 6px; }
.player-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.player-stats div { background: var(--ink3); border-radius: 4px; padding: 8px 10px; }
.player-stats dt { font-size: 12px; color: var(--dim); }
.player-stats dd { margin: 0; font: 700 16px var(--px); }
.save-note { font-size: 12px; color: var(--dim); margin-top: 12px; }
.paints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paint { background: var(--ink3); border: 2px solid var(--ink4); border-radius: 4px; padding: 6px 4px 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; line-height: 1.2; text-align: center; }
.paint canvas { width: 48px; height: 34px; }
.paint[aria-checked="true"] { border-color: var(--lime); color: var(--white); background: var(--ink4); }
.paint:disabled { cursor: not-allowed; }
.paint:disabled canvas { filter: grayscale(1) brightness(.5); }
.paint .lock { font: 700 9px var(--px); color: var(--dim); text-transform: uppercase; }
.horns { display: flex; gap: 8px; flex-wrap: wrap; }
.horn { font: 600 13px var(--body); background: var(--ink3); color: var(--muted); border: 2px solid var(--ink4); border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.horn[aria-checked="true"] { border-color: var(--lime); color: var(--white); }
.horn:disabled { opacity: .5; cursor: not-allowed; }
.mini-ch { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.mini-ch li { font-size: 14px; }
.mini-ch .m-top { display: flex; justify-content: space-between; gap: 8px; }
.mini-ch .m-lp { font: 700 12px var(--px); color: var(--lime); white-space: nowrap; }
.mini-ch li.done .m-l { text-decoration: line-through; color: var(--dim); }
.mini-bar { height: 4px; background: var(--ink); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--pink); }

/* ---------- how */
.loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.loop-step { position: relative; background: var(--ink2); border: 2px solid var(--ink4); border-radius: 6px; padding: 18px; }
.loop-step canvas { height: 112px; width: auto; max-width: 100%; margin: 0 auto 14px; border-radius: 4px; border: 2px solid var(--ink4); }
.loop-step h3 { font-size: 18px; margin: 4px 0 8px; }
.loop-step p { color: var(--muted); font-size: 15px; }
.step-n { font: 700 12px var(--px); color: var(--pink); }
.combo-art { height: 112px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 14px; }
.combo-art span { font: 700 18px var(--px); color: var(--ink); background: var(--lime); border: 3px solid var(--ink); padding: 6px 8px; border-radius: 4px; animation: bounce 1.6s ease-in-out infinite; }
.combo-art span:nth-child(2) { background: var(--white); animation-delay: .2s; font-size: 22px; }
.combo-art span:nth-child(3) { background: var(--pink); animation-delay: .4s; font-size: 26px; }
.hazards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.hazard { display: flex; gap: 14px; align-items: flex-start; background: var(--ink2); border: 2px solid var(--ink4); border-left: 4px solid var(--amber); border-radius: 6px; padding: 14px; }
.hazard canvas { width: 96px; height: auto; flex: none; border-radius: 4px; border: 2px solid var(--ink4); }
.hazard h4 { font-size: 14px; margin-bottom: 6px; }
.hazard p { color: var(--muted); font-size: 14px; }
.load-demo { width: 80px; height: 18px; flex: none; background: var(--ink); border: 2px solid var(--ink4); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.load-demo i { display: block; height: 100%; background: var(--lime); animation: load 3s steps(12) infinite; }
@keyframes load { 0% { width: 5%; background: var(--lime); } 55% { background: var(--amber); } 85% { background: var(--pink); } 100% { width: 100%; background: var(--pink); } }

/* ---------- points */
.points-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.rules-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rules-table td { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rules-table td:last-child { text-align: right; font: 700 14px var(--px); white-space: nowrap; padding-left: 10px; }
.rules-table .pos { color: var(--lime); }
.rules-table .neg { color: var(--pink); }
.rules-table tr.group td { font: 700 11px var(--px); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding-top: 14px; border-bottom: 0; text-align: left; }
.ranks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ranks li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--ink3); border: 2px solid transparent; border-radius: 4px; font-size: 14px; }
.ranks li .r-n { font: 700 13px var(--px); }
.ranks li .r-u { color: var(--dim); font-size: 12px; display: block; }
.ranks li .r-lp { color: var(--muted); font: 700 12px var(--px); white-space: nowrap; }
.ranks li.reached .r-n { color: var(--lime); }
.ranks li.current { border-color: var(--lime); }
.challenges { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.challenges li { background: var(--ink3); border-radius: 4px; padding: 10px 12px; }
.challenges .c-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.challenges .c-l { font-weight: 600; font-size: 15px; }
.challenges .c-lp { font: 700 13px var(--px); color: var(--lime); white-space: nowrap; }
.challenges .c-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--dim); margin-top: 6px; }
.challenges .c-tag { color: var(--amber); }
.challenges li.done { border-left: 4px solid var(--lime); }
.challenges li.done .c-l::after { content: " ✓"; color: var(--lime); }
.challenges .mini-bar i { background: var(--lime); }
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.badge { display: flex; gap: 10px; align-items: center; background: var(--ink3); border: 2px solid var(--ink4); border-radius: 4px; padding: 10px; opacity: .55; }
.badge.have { opacity: 1; border-color: var(--pink); }
.badge .b-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); border: 2px solid var(--line); border-radius: 4px; font: 700 14px var(--px); color: var(--dim); }
.badge.have .b-ic { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.badge .b-n { font: 700 12px var(--px); display: block; }
.badge .b-d { font-size: 12px; color: var(--muted); display: block; line-height: 1.35; }
.rewards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.reward-now { border-color: var(--lime-d); }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; }
.ticks li b { color: var(--white); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; background: var(--lime); border: 2px solid var(--ink); }
.ticks-muted li::before { background: var(--ink4); border-color: var(--line); }
.ticks-pink li::before { background: var(--pink); }

/* ---------- board */
.board-wrap { padding: 0; overflow: hidden; }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 2px solid var(--ink4); }
.tabs { display: flex; gap: 4px; background: var(--ink); padding: 4px; border-radius: 4px; }
.tab { font: 700 13px var(--px); background: transparent; color: var(--muted); border: 0; border-radius: 3px; padding: 8px 12px; cursor: pointer; text-transform: uppercase; }
.tab[aria-selected="true"] { background: var(--pink); color: var(--ink); }
.board-body { min-height: 220px; }
.board-wrap .fine { padding: 0 16px 16px; }
.lb { width: 100%; border-collapse: collapse; }
.lb th { font: 700 11px var(--px); color: var(--dim); text-transform: uppercase; text-align: left; padding: 10px 16px; }
.lb td { padding: 10px 16px; border-top: 1px solid var(--ink4); font-size: 15px; }
.lb td.num, .lb th.num { text-align: right; }
.lb td.rank { font: 700 14px var(--px); width: 48px; }
.lb tr.me td { background: rgba(194,253,18,.08); }
.lb tr.me td.wallet::after { content: "  YOU"; font: 700 10px var(--px); color: var(--lime); }
.lb tr:nth-child(1) td.rank { color: var(--pink); }
.lb tr:nth-child(2) td.rank { color: var(--lime); }
.lb tr:nth-child(3) td.rank { color: var(--white); }
.lb .wallet { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty { display: grid; place-items: center; text-align: center; gap: 12px; padding: 36px 16px; }
.empty canvas { width: 144px; height: 102px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); max-width: 420px; }
.elig { margin-top: 16px; }
.elig-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.elig-list li { display: flex; align-items: center; gap: 8px; background: var(--ink3); border-radius: 4px; padding: 8px 12px; font-size: 14px; color: var(--muted); }
.elig-list li::before { content: "–"; font: 700 12px var(--px); width: 18px; height: 18px; display: grid; place-items: center; border-radius: 3px; background: var(--ink); color: var(--dim); }
.elig-list li.ok { color: var(--white); }
.elig-list li.ok::before { content: "✓"; background: var(--lime); color: var(--ink); }

/* ---------- token */
.token-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; }
.cos-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cos { background: var(--ink3); border: 2px dashed var(--line); border-radius: 4px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.cos canvas { width: 72px; height: 51px; }
.cos b { font: 700 9px var(--px); color: var(--amber); text-transform: uppercase; }
.fair { border-color: var(--pink-d); }
.tba { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tba div { display: flex; justify-content: space-between; gap: 10px; background: var(--ink3); border-radius: 4px; padding: 8px 10px; font-size: 14px; }
.tba dt { color: var(--dim); }
.tba dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }

/* ---------- crew */
.crew-card { display: flex; gap: 28px; align-items: center; background: var(--pink); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 28px; box-shadow: 8px 8px 0 var(--lime-d); }
.crew-art { width: 216px; height: 144px; flex: none; background: var(--ink); border: 3px solid var(--ink); border-radius: 6px; }
.crew-card h2 { font-size: clamp(24px, 3.6vw, 38px); }
.crew-card p { margin: 10px 0 20px; font-size: 18px; font-weight: 500; }
.social { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-social { --bg: var(--ink); --fg: var(--white); font-size: 14px; flex-wrap: wrap; }
.btn-social svg { width: 18px; height: 18px; }
.btn-social .soon { display: none; font: 600 11px var(--body); text-transform: none; color: var(--muted); letter-spacing: 0; }
.btn-social.off { cursor: not-allowed; filter: none; opacity: .75; }
.btn-social.off .soon { display: inline; }

/* ---------- footer */
.footer { padding: 40px max(var(--gutter), calc((100vw - 1200px) / 2)) 48px; border-top: 2px solid var(--ink4); background: var(--ink2); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.footer-links { display: flex; gap: 18px; align-items: center; }
.footer-links a { color: var(--lime); font-weight: 600; font-size: 14px; }
.disclaimer { color: var(--dim); font-size: 13px; max-width: 900px; }
.copy { color: var(--dim); font-size: 12px; margin-top: 14px; }

/* ---------- dialogs */
.dlg { background: var(--ink2); color: var(--white); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--pink-d); padding: 24px; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.dlg-wide { width: min(780px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(5,5,8,.75); backdrop-filter: blur(3px); }
.dlg h3 { font-size: 22px; margin: 4px 30px 10px 0; }
.dlg h4 { font-size: 12px; text-transform: uppercase; color: var(--dim); margin: 16px 0 8px; letter-spacing: .06em; }
.dlg-sub { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.dlg-x { position: absolute; right: 12px; top: 12px; margin: 0; }
.dlg-x button { background: var(--ink3); color: var(--white); border: 2px solid var(--line); border-radius: 4px; width: 34px; height: 34px; cursor: pointer; font-size: 14px; }
.dlg { position: fixed; }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--ink3); border: 2px solid var(--ink4); border-radius: 6px; padding: 12px; color: var(--white); font: 600 16px var(--body); cursor: pointer; text-align: left; text-decoration: none; }
.wallet-opt:hover { border-color: var(--lime); }
.wallet-opt img, .wallet-opt .w-ic { width: 32px; height: 32px; border-radius: 6px; background: var(--ink4); flex: none; }
.wallet-opt small { margin-left: auto; color: var(--dim); font-size: 12px; }
.w-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 10px 0; }
.w-state .w-big { font: 700 18px var(--px); }
.w-state p { color: var(--muted); font-size: 14px; }
.w-state.err .w-big { color: var(--pink); }
.w-state.ok .w-big { color: var(--lime); }
.spinner { width: 28px; height: 28px; border: 4px solid var(--ink4); border-top-color: var(--pink); border-radius: 50%; animation: spin .8s linear infinite; }
.addr { font: 600 13px ui-monospace, Menlo, monospace; background: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; overflow-wrap: anywhere; color: var(--lime); }
.res-score { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 14px; }
.res-score span { font: 700 48px var(--px); color: var(--lime); text-shadow: 3px 3px 0 var(--pink-d); }
.res-score small { color: var(--muted); }
.res-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.res-stats div { background: var(--ink3); border-radius: 4px; padding: 8px; text-align: center; }
.res-stats b { display: block; font: 700 18px var(--px); }
.res-stats span { font-size: 11px; color: var(--dim); }
.res-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.res-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.res-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.res-table td:last-child { text-align: right; font: 700 13px var(--px); padding-left: 8px; white-space: nowrap; }
.res-table tr.total td { border-bottom: 0; font-weight: 700; color: var(--lime); padding-top: 8px; }
.res-goals { list-style: none; padding: 0; margin: 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.res-goals li { color: var(--dim); }
.res-goals li.done { color: var(--white); }
.res-goals li::before { content: "✕ "; color: var(--pink); font-weight: 700; }
.res-goals li.done::before { content: "✓ "; color: var(--lime); }
.res-rank { margin-top: 14px; }
.res-rank .rank-bar { margin: 6px 0; }
.res-rank p { font-size: 13px; color: var(--muted); }
.res-rank .promo { color: var(--lime); font: 700 14px var(--px); }
.res-extras { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.res-board { margin-top: 18px; background: var(--ink3); border-radius: 6px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.res-board b { color: var(--white); }

/* ---------- animation */
@keyframes blink { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }
@keyframes bounce { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- responsive */
@media (max-width: 1040px) {
  .play-grid { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .loop { grid-template-columns: repeat(2, 1fr); }
  .token-grid { grid-template-columns: 1fr 1fr; }
  .token-grid .card:first-child { grid-column: 1 / -1; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 28px; }
  .hero-art { order: -1; }
  .hero h1 { font-size: clamp(25px, 7.6vw, 54px); }
  .lead { font-size: 18px; }
  .points-grid, .rewards, .token-grid, .res-cols { grid-template-columns: minmax(0, 1fr); }
  .rules-table td:last-child { white-space: normal; }
  .card { padding: 16px; }
  .hud { grid-template-columns: repeat(4, 1fr); }
  .hud-boost { display: none; }
  .hud-v { font-size: 14px; }
  .hud-cell { padding: 6px 7px; }
  .goals { grid-template-columns: 1fr; }
  .goals li { padding: 6px 10px; }
  .goals .g-l, .goals .g-p { display: inline; }
  .goals .g-p::before { content: " · "; }
  #ovStart .ov-sub, #ovStart .ov-keys, #ovStart .kicker { display: none; }
  #ovStart .ov-card { gap: 8px; }
  #ovStart .btn-xl { font-size: 15px; padding: 13px 18px; }
  #ovTutorial, #ovPause { position: fixed; z-index: 70; }
  .stage .banner { top: 6px; padding: 5px 10px; }
  .hint { bottom: 6px; font-size: 10px; padding: 5px 8px; }
  .crew-card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .crew-art { width: 144px; height: 96px; }
  .res-stats { grid-template-columns: repeat(3, 1fr); }
  .brand-word { font-size: 17px; }
  .bar-note { display: none; }
  .ca-row { flex-wrap: wrap; }
  .ca-row .btn { width: 100%; }
}
@media (max-width: 520px) {
  .loop { grid-template-columns: 1fr; }
  .btn-xl { font-size: 17px; padding: 16px 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .brand-mark { width: 38px; height: 38px; }
  .btn-wallet { font-size: 11px; padding: 9px 10px; max-width: 150px; }
  .pad { width: 132px; height: 132px; }
  .tbtn-lift { width: 84px; height: 84px; }
  .sticker { font-size: 10px; }
  .banner strong { font-size: 12px; } .banner span { font-size: 12px; }
  .toasts { max-width: 80%; }
  .toast { font-size: 12px; }
  .dlg { padding: 18px; }
}
@media (max-width: 420px) {
  .brand-word { display: none; }
  .nav { gap: 10px; }
  .btn-wallet { max-width: 120px; }
  .icon-sm { width: 34px; height: 34px; }
  .nav-actions { gap: 6px; }
  .eyebrow { font-size: 13px; }
}
#tbaCa { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--lime); text-align: left; }
.tba div:has(#tbaCa) { flex-direction: column; gap: 4px; }
