/* ==========================================================================
   PUMPKIN RUN — styles
   ========================================================================== */
:root {
  --bg: #0f0a16;
  --bg-2: #160f20;
  --panel: #1c1428;
  --panel-2: #241a34;
  --line: #3a2a52;
  --ink: #f6efff;
  --muted: #c3b5da;
  --dim: #8f80a8;
  --purple: #5b2a86;
  --purple-hi: #8b52c8;
  --orange: #ff7a1a;
  --orange-hi: #ffa64d;
  --orange-lo: #c9500e;
  --yellow: #ffd23f;
  --yellow-hi: #fff1a8;
  --green: #7ee04a;
  --red: #ff5a4a;
  --f-pixel: "Press Start 2P", ui-monospace, monospace;
  --f-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 64px;
  --radius: 4px;
  --focus: 0 0 0 3px var(--bg), 0 0 0 6px var(--yellow);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--orange-hi); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 2px 6px; margin: 0 2px;
  font: 10px/1.4 var(--f-pixel); text-align: center; color: var(--ink);
  background: var(--panel-2); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 3px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--orange); color: #1a0b02; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 14px; background: var(--yellow); color: #1a0b02; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); }

/* ------------------------------------------------------------ buttons */
.btn {
  --b: var(--line); --bg-b: var(--panel-2); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 18px;
  font: 11px/1.2 var(--f-pixel); letter-spacing: .5px; text-transform: uppercase; text-decoration: none;
  color: var(--fg); background: var(--bg-b);
  border: 3px solid var(--b); border-radius: var(--radius);
  box-shadow: 0 4px 0 #07040b;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .08s, box-shadow .08s, background-color .15s, filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #07040b; }
.btn:focus-visible { box-shadow: 0 4px 0 #07040b, var(--focus); }
.btn .ico { width: 14px; height: 14px; fill: currentColor; shape-rendering: crispEdges; }
.btn--primary {
  --b: #ffe08a; --bg-b: linear-gradient(180deg, var(--yellow) 0 18%, var(--orange) 18% 82%, var(--orange-lo) 82%); --fg: #1a0b02;
  background: var(--bg-b);
  box-shadow: 0 4px 0 #6b2a05, 0 0 24px rgba(255, 122, 26, .35);
}
.btn--primary:active { box-shadow: 0 1px 0 #6b2a05; }
.btn--primary:focus-visible { box-shadow: 0 4px 0 #6b2a05, var(--focus); }
.btn--ghost { --b: var(--purple-hi); --bg-b: rgba(36, 26, 52, .85); }
.btn--danger { --b: var(--red); --bg-b: #3a1420; }
.btn--sm { min-height: 38px; padding: 8px 12px; font-size: 9px; }
.btn--xl { min-height: 58px; padding: 16px 28px; font-size: 15px; }
.btn--xl .ico { width: 16px; height: 16px; }
.btn:disabled, .btn.is-disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed; filter: grayscale(.7) brightness(.8); transform: none; box-shadow: 0 4px 0 #07040b;
}
.btn--primary.is-disabled { filter: saturate(.55) brightness(.85); }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  background: rgba(15, 10, 22, .75); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; fill: var(--ink); shape-rendering: crispEdges; }
.icon-btn:hover { border-color: var(--purple-hi); }

/* ------------------------------------------------------------ chips */
.chip {
  display: inline-block; padding: 5px 8px; font: 8px/1.2 var(--f-pixel); letter-spacing: .5px; text-transform: uppercase;
  border: 2px solid currentColor; border-radius: 3px; vertical-align: middle;
}
.chip--planned { color: var(--purple-hi); background: rgba(139, 82, 200, .12); }
.chip--live { color: var(--green); background: rgba(126, 224, 74, .1); }
.chip--soon { color: var(--yellow); background: rgba(255, 210, 63, .08); }
.chip--demo { color: var(--orange-hi); background: rgba(255, 122, 26, .12); }

/* ------------------------------------------------------------ header */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(15, 10, 22, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid #22182f;
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 100%; width: min(1180px, 100% - 32px); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(255, 122, 26, .55)); }
.brand__text { display: grid; line-height: 1.15; }
.brand__text strong { font: 12px/1.2 var(--f-pixel); letter-spacing: .5px; }
.brand__text small { font: 9px/1.4 var(--f-pixel); color: var(--orange); }
.topbar__nav { display: flex; gap: 6px; margin-left: auto; }
.topbar__nav a { padding: 8px 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; border-radius: 3px; }
.topbar__nav a:hover { color: var(--ink); background: rgba(139, 82, 200, .14); }
.btn--wallet { --b: var(--orange); --bg-b: #2a1408; font-size: 9px; min-height: 40px; padding: 8px 14px; white-space: nowrap; }
.topbar__nav + .btn--wallet { margin-left: 4px; }
.btn__dot { width: 8px; height: 8px; background: var(--dim); box-shadow: 0 0 0 2px #07040b; }
.btn--wallet.is-connected { --b: var(--green); --bg-b: #142410; }
.btn--wallet.is-connected .btn__dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.btn--wallet.is-busy .btn__dot { background: var(--yellow); animation: blink 1s steps(1) infinite; }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(760px, calc(100svh - var(--header-h)));
  display: grid; align-items: center;
  padding: 56px 0 96px;
  background: #1a0e2a;
}
.hero__scene { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(15, 10, 22, .92) 0%, rgba(15, 10, 22, .6) 45%, rgba(15, 10, 22, .1) 75%),
    linear-gradient(180deg, rgba(15, 10, 22, 0) 60%, var(--bg) 100%);
}
.hero__moon {
  position: absolute; z-index: -2; top: 9%; right: 9%;
  width: clamp(70px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, #f0c96e 0 7%, transparent 8%),
    radial-gradient(circle at 64% 62%, #f0c96e 0 10%, transparent 11%),
    radial-gradient(circle at 58% 26%, #f0c96e 0 4%, transparent 5%),
    radial-gradient(circle at 40% 40%, #fff6d6, #ffe6a0 60%, #f0c96e);
  box-shadow: 0 0 40px 10px rgba(255, 220, 140, .35), 0 0 120px 40px rgba(255, 180, 90, .15);
  animation: moonGlow 6s ease-in-out infinite alternate;
}
@keyframes moonGlow { to { box-shadow: 0 0 56px 16px rgba(255, 220, 140, .45), 0 0 160px 60px rgba(255, 180, 90, .2); } }

.hero__bats { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bat {
  position: absolute; width: 42px; height: 18px;
  background: var(--bat-sheet) 0 0 / 200% 100% no-repeat; image-rendering: pixelated;
  animation: flap .28s steps(1) infinite, drift 14s ease-in-out infinite alternate;
}
.bat--1 { top: 18%; right: 26%; }
.bat--2 { top: 32%; right: 12%; width: 28px; height: 12px; animation-duration: .24s, 11s; animation-delay: 0s, -4s; }
.bat--3 { top: 12%; left: 46%; width: 34px; height: 15px; animation-duration: .31s, 17s; animation-delay: 0s, -9s; }
@keyframes flap { 50% { background-position: 100% 0; } }
@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(-40px, 14px); } 100% { transform: translate(24px, -10px); } }

.fog { position: absolute; left: -50%; width: 200%; pointer-events: none; }
.fog--back {
  bottom: 18%; height: 120px; z-index: -1; opacity: .5;
  background: radial-gradient(ellipse 18% 50% at 20% 50%, rgba(196, 176, 230, .28), transparent 70%),
              radial-gradient(ellipse 14% 40% at 55% 60%, rgba(196, 176, 230, .22), transparent 70%),
              radial-gradient(ellipse 20% 45% at 85% 45%, rgba(196, 176, 230, .25), transparent 70%);
  animation: fogDrift 38s linear infinite alternate;
}
.fog--front {
  bottom: -30px; height: 160px; z-index: 1; opacity: .55;
  background: radial-gradient(ellipse 22% 50% at 10% 60%, rgba(196, 176, 230, .3), transparent 70%),
              radial-gradient(ellipse 18% 45% at 45% 55%, rgba(196, 176, 230, .26), transparent 70%),
              radial-gradient(ellipse 22% 50% at 78% 60%, rgba(196, 176, 230, .3), transparent 70%);
  animation: fogDrift 26s linear infinite alternate-reverse;
}
@keyframes fogDrift { to { transform: translateX(25%); } }

.hero__inner {
  position: relative; z-index: 2;
  width: min(1120px, 100% - 32px); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 10px/1.6 var(--f-pixel); color: var(--orange-hi); letter-spacing: .5px; }
.eyebrow__dot { width: 8px; height: 8px; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: blink 1.6s steps(1) infinite; }
.hero__title {
  margin-top: 18px;
  font: clamp(30px, 5.6vw, 64px)/1.18 var(--f-pixel);
  color: var(--ink);
  text-shadow: 4px 4px 0 #2a1340, 0 0 30px rgba(139, 82, 200, .5);
}
.hero__title span { color: var(--orange); text-shadow: 4px 4px 0 #5a1f04, 0 0 34px rgba(255, 122, 26, .55); }
.hero__sub { margin-top: 20px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__ca {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 24px; padding: 8px 12px;
  text-align: left; cursor: pointer;
  background: rgba(15, 10, 22, .7); border: 2px dashed var(--line); border-radius: var(--radius);
}
.hero__ca:hover { border-color: var(--orange); }
.hero__ca-ico { flex: none; width: 14px; height: 14px; fill: var(--muted); shape-rendering: crispEdges; }
.hero__ca-label { font: 9px var(--f-pixel); color: var(--dim); }
.hero__ca-value { min-width: 0; font: 10px/1.4 var(--f-pixel); color: var(--yellow); word-break: break-all; }
.hero__ca-value:not(.is-placeholder) { font: 14px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.hero__socials { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.hero__socials-label { font: 9px var(--f-pixel); color: var(--dim); text-transform: uppercase; margin-left: 4px; }
.social-ico {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: rgba(36, 26, 52, .85); border: 3px solid var(--purple-hi); border-radius: var(--radius);
  box-shadow: 0 4px 0 #07040b; transition: transform .08s, border-color .15s, background-color .15s;
}
.social-ico svg { width: 18px; height: 18px; fill: var(--ink); shape-rendering: crispEdges; }
.social-ico:hover { border-color: var(--orange); background: #2a1408; }
.social-ico:active { transform: translateY(3px); box-shadow: 0 1px 0 #07040b; }
.social-ico:focus-visible { box-shadow: 0 4px 0 #07040b, var(--focus); }
.social-ico.is-disabled { opacity: .45; cursor: not-allowed; }
.hero__note { margin-top: 12px; font-size: 14px; color: var(--dim); }

.hero__art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero__glow {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 40, .45), rgba(255, 140, 40, .12) 45%, transparent 70%);
  animation: lanternGlow 3.2s ease-in-out infinite alternate;
}
.hero__pumpkin {
  position: relative; width: clamp(180px, 24vw, 300px); height: auto; aspect-ratio: 1;
  filter: drop-shadow(0 10px 0 rgba(7, 4, 11, .55)) drop-shadow(0 0 24px rgba(255, 140, 40, .5));
  animation: bob 1.6s steps(4) infinite alternate;
}
.hero__shadow { width: 46%; height: 18px; margin-top: -6px; border-radius: 50%; background: rgba(7, 4, 11, .55); filter: blur(4px); }
@keyframes bob { to { transform: translateY(-10px); } }
@keyframes lanternGlow { 0% { opacity: .75; transform: scale(.96); } 60% { opacity: 1; } 100% { opacity: .85; transform: scale(1.04); } }
@keyframes blink { 50% { opacity: .2; } }

/* ------------------------------------------------------------ sections */
.section { position: relative; padding: 88px 0; }
.section__head { text-align: center; margin-bottom: 36px; }
.kicker { font: 10px/1.6 var(--f-pixel); color: var(--orange-hi); letter-spacing: 1px; text-transform: uppercase; }
.section__title { margin-top: 12px; font: clamp(20px, 3.4vw, 32px)/1.3 var(--f-pixel); text-shadow: 3px 3px 0 #2a1340; }
.section__lede { max-width: 40em; margin: 14px auto 0; color: var(--muted); }

.section--game { padding-top: 40px; background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.section--board { background: var(--bg-2); }
.section--token { background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(91, 42, 134, .35), transparent 70%), var(--bg); }
.section--utility { background: var(--bg-2); }

/* ------------------------------------------------------------ game stage */
.stage {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 16 / 9; max-height: 74vh; margin-inline: auto;
  background: #0d0718;
  border: 4px solid #2c1f40; border-radius: 6px;
  box-shadow: 0 0 0 4px #07040b, 0 24px 60px rgba(0, 0, 0, .55), 0 0 80px rgba(255, 122, 26, .12);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.stage:focus-visible { box-shadow: 0 0 0 4px #07040b, 0 0 0 8px var(--yellow); }
@supports (aspect-ratio: 1) { .stage { max-width: calc(74vh * 16 / 9); } }
.stage__canvas { width: 100%; height: 100%; cursor: pointer; }

.hud {
  position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none;
}
.hud__stat {
  display: grid; gap: 3px; padding: 6px 9px; min-width: 64px;
  background: rgba(15, 10, 22, .72); border: 2px solid rgba(91, 42, 134, .7); border-radius: 3px;
}
.hud__stat span { font: 7px/1 var(--f-pixel); color: var(--dim); letter-spacing: .5px; }
.hud__stat b { font: 12px/1 var(--f-pixel); color: var(--ink); font-weight: 400; }
.hud__stat--candy b { color: #ff7fdc; }
.stage__tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
#muteBtn .snd-on { display: none; }
#muteBtn.is-on .snd-on { display: inline; }
#muteBtn.is-on .snd-off { display: none; }
#muteBtn.is-on { border-color: var(--orange); }

.stage[data-state="title"] .hud, .stage[data-state="over"] .hud { opacity: .0; }

.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 14px;
  background: radial-gradient(ellipse at center, rgba(15, 10, 22, .55), rgba(15, 10, 22, .85));
}
.overlay[hidden] { display: none; }
.overlay__card {
  display: grid; justify-items: center; gap: 12px; max-width: 460px; width: 100%;
  padding: clamp(14px, 3vw, 26px); text-align: center;
  background: rgba(28, 20, 40, .92); border: 3px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 0 #07040b;
}
.overlay__kicker { font: 9px/1.5 var(--f-pixel); color: var(--orange-hi); }
.overlay__title { font: clamp(18px, 3.4vw, 28px)/1.2 var(--f-pixel); color: var(--ink); text-shadow: 3px 3px 0 #5a1f04; }
.overlay__card--over .overlay__title { color: var(--yellow); }
.overlay__badge { font: 9px var(--f-pixel); color: #1a0b02; background: var(--yellow); padding: 5px 8px; animation: blink 1s steps(1) infinite; }
.overlay__best { font: 9px var(--f-pixel); color: var(--dim); }
.overlay__best b { color: var(--yellow); font-weight: 400; }
.overlay__stats { display: flex; gap: 18px; margin: 0; }
.overlay__stats div { display: grid; gap: 4px; }
.overlay__stats dt { font: 7px var(--f-pixel); color: var(--dim); text-transform: uppercase; }
.overlay__stats dd { margin: 0; font: 11px var(--f-pixel); }
.overlay__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.overlay__status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.overlay__status.is-error { color: #ff9a8f; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.keys em { color: var(--dim); font-style: normal; }
.keys__or { margin: 0 6px 0 2px; color: var(--dim); }

/* touch controls */
.touchpad { display: none; gap: 12px; margin-top: 14px; }
.touchpad__btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 72px; font: 13px var(--f-pixel); letter-spacing: 1px;
  border: 3px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink);
  box-shadow: 0 5px 0 #07040b; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.touchpad__btn svg { width: 20px; height: 20px; fill: currentColor; shape-rendering: crispEdges; }
.touchpad__btn--jump { flex: 1.4; border-color: #ffe08a; background: var(--orange); color: #1a0b02; box-shadow: 0 5px 0 #6b2a05; }
.touchpad__btn.is-down { transform: translateY(4px); box-shadow: 0 1px 0 #07040b; }
.controls-hint { margin-top: 16px; text-align: center; font-size: 14px; color: var(--dim); }
.controls-hint > span { display: block; margin-bottom: 4px; color: var(--muted); }
.only-coarse { display: none !important; }
@media (pointer: coarse) {
  .touchpad { display: flex; }
  .only-coarse { display: block !important; }
  .only-fine { display: none !important; }
}

/* ------------------------------------------------------------ leaderboard */
.board-mode { max-width: 40em; margin: 14px auto 0; font-size: 15px; color: var(--muted); }
.board {
  background: var(--panel); border: 3px solid var(--line); border-radius: 6px; overflow: hidden;
  box-shadow: 0 6px 0 #07040b;
}
.board__table { width: 100%; border-collapse: collapse; }
.board__table th {
  padding: 12px 16px; text-align: left; font: 8px var(--f-pixel); color: var(--dim); text-transform: uppercase;
  background: var(--panel-2); border-bottom: 2px solid var(--line);
}
.board__table td { padding: 12px 16px; border-bottom: 1px solid #2a1f3a; font-size: 16px; }
.board__table tr:last-child td { border-bottom: 0; }
.board__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.board__table td.num { font: 12px var(--f-pixel); color: var(--yellow); }
.board__table .rank { font: 11px var(--f-pixel); color: var(--muted); width: 70px; }
.board__table .wallet { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.board__table .wallet em { font: 8px var(--f-pixel); font-style: normal; color: var(--green); }
.board__table .date { color: var(--dim); font-size: 14px; }
.board__table tr.top--1 .rank { color: var(--yellow); }
.board__table tr.top--2 .rank { color: #d9d2ea; }
.board__table tr.top--3 .rank { color: var(--orange-hi); }
.board__table tr.is-me { background: rgba(126, 224, 74, .07); }
.board__table tr.skeleton td i { display: block; height: 14px; border-radius: 2px; background: linear-gradient(90deg, #241a34, #34264a, #241a34); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.board__state { display: grid; justify-items: center; gap: 12px; }
.board__state:not(:empty) { padding: 22px 16px; }
.board__empty, .board__loading { color: var(--muted); text-align: center; }
.board__loading { display: inline-flex; align-items: center; gap: 10px; }
.board__error { color: #ff9a8f; text-align: center; }
.board__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: 15px; color: var(--muted); }

.spinner {
  display: inline-block; width: 14px; height: 14px; flex: none;
  border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ token */
.token-card {
  display: grid; gap: 22px; padding: clamp(20px, 4vw, 36px);
  background: var(--panel); border: 3px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 0 #07040b, 0 0 60px rgba(255, 122, 26, .08);
}
.token-card__label { font: 9px var(--f-pixel); color: var(--dim); text-transform: uppercase; }
.ca { display: flex; align-items: stretch; gap: 10px; margin-top: -12px; }
.ca__value {
  flex: 1; min-width: 0; display: flex; align-items: center; padding: 12px 14px;
  font: 13px/1.5 var(--f-pixel); color: var(--yellow); word-break: break-all;
  background: #120c1b; border: 2px dashed var(--purple-hi); border-radius: var(--radius);
}
.ca__value:not(.is-placeholder) { font: 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.ca__copy { flex: none; }
.token-card__actions { display: flex; }
.token-card__actions .btn { width: 100%; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.facts div { padding: 12px; background: #120c1b; border: 2px solid #2a1f3a; border-radius: var(--radius); text-align: center; }
.facts dt { font: 7px var(--f-pixel); color: var(--dim); text-transform: uppercase; }
.facts dd { margin: 8px 0 0; font: 11px var(--f-pixel); color: var(--ink); }
.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn--social { --b: var(--purple-hi); --bg-b: #1a1226; }
.btn--social small { font: 7px var(--f-pixel); color: var(--dim); }

/* ------------------------------------------------------------ utility */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 22px;
  background: var(--panel); border: 3px solid var(--line); border-radius: 8px; box-shadow: 0 6px 0 #07040b;
}
.card .chip { align-self: flex-start; }
.card__title { font: 12px/1.5 var(--f-pixel); color: var(--orange-hi); }
.card p { font-size: 15px; color: var(--muted); }
.skins { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.skins figure { margin: 0; display: grid; justify-items: center; gap: 6px; flex: 1; padding: 10px 4px; background: #120c1b; border: 2px solid #2a1f3a; border-radius: var(--radius); }
.skins canvas { width: 40px; height: 40px; opacity: .9; }
.skins figcaption { font: 7px var(--f-pixel); color: var(--dim); text-transform: uppercase; }

/* ------------------------------------------------------------ footer */
.footer { padding: 48px 0 40px; background: #0a0610; border-top: 2px solid #22182f; }
.footer__inner { display: grid; gap: 18px; }
.footer__disclaimer { max-width: 62em; font-size: 14px; color: var(--dim); }
.footer__copy { font: 8px var(--f-pixel); color: #6f6188; }

/* ------------------------------------------------------------ modal */
.modal {
  width: min(440px, 100% - 32px); padding: 0; color: var(--ink);
  background: var(--panel); border: 3px solid var(--line); border-radius: 8px; box-shadow: 0 8px 0 #07040b, 0 30px 80px rgba(0, 0, 0, .6);
}
.modal::backdrop { background: rgba(7, 4, 11, .72); backdrop-filter: blur(3px); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 2px solid var(--line); }
.modal__title { font: 12px var(--f-pixel); }
.modal__body { display: grid; gap: 14px; padding: 18px; }
.modal__text { color: var(--muted); }
.modal__text--wait { display: flex; align-items: center; gap: 12px; }
.modal__sub { font-size: 14px; color: var(--dim); }
.modal__addr { display: block; padding: 10px 12px; font: 13px/1.4 ui-monospace, Menlo, monospace; word-break: break-all; background: #120c1b; border: 2px solid #2a1f3a; border-radius: var(--radius); }
.modal__row { display: flex; flex-wrap: wrap; gap: 8px; }
.modal__error { padding: 10px 12px; color: #ffb3aa; background: rgba(255, 90, 74, .1); border: 2px solid rgba(255, 90, 74, .5); border-radius: var(--radius); font-size: 15px; }
.modal__note { margin: 0; padding: 14px 18px 18px; font-size: 13px; color: var(--dim); border-top: 2px solid #2a1f3a; }
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wallet-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px;
  text-align: left; font-weight: 500; font-size: 16px;
  background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.wallet-opt:hover { border-color: var(--orange); }
.wallet-opt img { width: 28px; height: 28px; border-radius: 6px; image-rendering: auto; }
.wallet-opt small { margin-left: auto; font-size: 12px; color: var(--dim); }
.wallet-opt__mono { display: grid; place-items: center; width: 28px; height: 28px; font: 11px var(--f-pixel); background: var(--purple); border-radius: 6px; }

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 16px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  font-size: 15px; color: var(--ink); background: var(--panel-2); border: 2px solid var(--orange); border-radius: var(--radius);
  box-shadow: 0 6px 0 #07040b; transition: transform .25s ease, visibility 0s .25s; pointer-events: none;
}
.toast.is-shown { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease, visibility 0s; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .topbar__nav { display: none; }
  .btn--wallet { margin-left: auto; }
}
@media (max-width: 760px) {
  .hero { padding: 36px 0 72px; min-height: auto; }
  .hero::before { background: linear-gradient(180deg, rgba(15, 10, 22, .55) 0%, rgba(15, 10, 22, .78) 55%, var(--bg) 100%); }
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .hero__art { order: -1; min-height: 190px; }
  .hero__pumpkin { width: 150px; }
  .hero__sub { margin-inline: auto; }
  .hero__actions, .hero__socials { justify-content: center; }
  .hero__moon { top: 4%; right: 6%; width: 60px; }
  .section { padding: 64px 0; }
  .board__foot { flex-direction: column; align-items: stretch; text-align: center; }
  .hud__stat { min-width: 0; padding: 4px 6px; }
  .hud__stat span { font-size: 6px; }
  .hud__stat b { font-size: 10px; }
  .icon-btn { width: 34px; height: 34px; }
  .overlay__card { gap: 8px; }
  .keys { font-size: 12px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .brand__text small { display: none; }
  .brand__text strong { font-size: 10px; }
  .btn--wallet { padding: 8px 10px; gap: 8px; }
  .eyebrow__dot { display: none; }
  .facts { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .facts dd { font-size: 9px; }
  .ca { flex-direction: column; }
  .socials { grid-template-columns: 1fr; }
  .hide-xs { display: none; }
  .board__table th, .board__table td { padding: 10px; }
  .overlay__kicker, .overlay__best, .keys { display: none; }
  .stage { border-width: 3px; }
  .btn--xl { font-size: 13px; padding: 14px 20px; }
}
@media (max-width: 400px) {
  .topbar .brand__text { display: none; }
  .overlay__stats { gap: 10px; }
  .overlay__card--over .overlay__title { font-size: 16px; }
  .overlay__actions .btn { min-height: 38px; padding: 8px 10px; font-size: 9px; }
}

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .bat { animation: none; }
}
