:root {
  --bg: #f1ede4;
  --surface: #faf8f2;
  --surface-2: #e9e4da;
  --ink: #292923;
  --muted: #6f6d65;
  --line: #c8c1b6;
  --accent: #ad604d;
  --accent-dark: #854536;
  --accent-soft: #ead8d0;
  --yellow: var(--accent);
  --coral: var(--accent);
  --pink: var(--accent);
  --mint: var(--accent-soft);
  --cyan: var(--surface-2);
  --blue: var(--accent);
  --violet: var(--accent);
  --lime: var(--accent-soft);
  --orange: var(--accent);
  --night: #302e2b;
  --paw-neutral: rgba(72, 70, 63, .18);
  --paw-accent: rgba(156, 94, 74, .21);
  --editorial: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Trebuchet MS", "Segoe UI Variable Text", Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.cat-pattern {
  position: fixed;
  z-index: 0;
  inset: -10vh -8vw;
  overflow: hidden;
  color: rgba(60, 63, 55, .022);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 24px;
  font-weight: 400;
  line-height: 92px;
  word-spacing: 54px;
  pointer-events: none;
  user-select: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
}

.site-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 78px minmax(560px, 1fr) minmax(310px, 350px);
  align-items: stretch;
  height: 72px;
  border-bottom: 1px solid var(--ink);
  background: rgba(241, 237, 228, .95);
  backdrop-filter: blur(14px);
}

.mini-mark {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -.1em;
}

.trade-links {
  display: grid;
  grid-template-columns: 1.25fr .82fr .92fr 1.12fr .82fr;
  gap: 6px;
  padding: 8px;
}

.trade-link {
  display: grid;
  min-width: 0;
  cursor: pointer;
  place-items: center;
  padding: 0 10px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.58), 0 2px 0 rgba(36,37,31,.18);
  font-family: var(--mono);
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: .01em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.trade-link:hover {
  z-index: 1;
  filter: saturate(1.08) brightness(1.02);
  transform: translateY(-1px);
}

.trade-link:active {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 1px 0 rgba(36,37,31,.16);
  transform: translateY(1px);
}

.trade-link--buy {
  background: var(--accent);
  color: #fffaf3;
  font-size: 16px;
}
.trade-link--chart,
.trade-link--x { background: var(--surface-2); }
.trade-link--ca { background: var(--surface); }
.trade-link--ticker { background: var(--accent-soft); }

.market {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: stretch;
  border-left: 1px solid var(--ink);
  background: var(--surface);
}

.market > span {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 8px 13px;
}

.market > span + span {
  border-left: 1px solid var(--line);
}

.market small,
.market__live {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.market strong {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
}

.market strong.up { color: var(--ink); }
.market strong.down { color: var(--accent-dark); }

.market__live {
  position: absolute !important;
  z-index: 1;
  top: 10px;
  right: 10px;
  left: auto;
  display: flex !important;
  grid-template-columns: none !important;
  gap: 6px !important;
  align-items: center;
  padding: 0 !important;
  color: var(--accent-dark);
}

.market__live + span {
  border-left: 0 !important;
}

.market__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(173,96,77,.12);
}

.market.market--fresh .market__live i {
  animation: live-pulse .65s ease;
}

@keyframes live-pulse {
  50% { transform: scale(1.6); }
}

.product {
  display: grid;
  grid-template-areas:
    "intro"
    "tiers"
    "workspace";
  grid-template-rows: 78px 76px minmax(0, 1fr);
  gap: 10px;
  width: min(1480px, calc(100% - 28px));
  height: calc(100svh - 72px);
  min-height: 640px;
  margin: 0 auto;
  padding: 10px 0 12px;
}

.intro {
  grid-area: intro;
  display: grid;
  grid-template-columns: minmax(480px, auto) 1fr;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.intro h1 {
  margin: 0;
  font-size: clamp(44px, 4.25vw, 66px);
  font-family: var(--editorial);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .94;
  white-space: nowrap;
}

.intro h1 span {
  display: inline-block;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: -.1em;
  white-space: nowrap;
}

.intro > p {
  justify-self: end;
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  text-align: right;
}

.challenge-banner {
  position: static;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 520px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--violet);
  box-shadow: 0 8px 25px rgba(36,37,31,.15);
}

.intro.has-challenge > p { display: none; }

.challenge-banner span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.challenge-banner strong {
  font-size: 13px;
}

.workspace {
  grid-area: workspace;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
  gap: 10px;
  min-height: 0;
}

.game-shell,
.cat-console,
.tier-rail {
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: rgba(250, 248, 242, .94);
  box-shadow: 0 14px 38px rgba(35,36,42,.09);
}

.game-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 56px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(360px, 1.25fr);
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.game-header > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-content: center;
  padding: 10px 16px;
}

.game-header h2 {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  margin: 0;
  font-family: var(--editorial);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1;
}

.game-header p {
  grid-column: 1 / -1;
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.micro-label,
.game-hud span,
.result-stats span,
.loadout-line > span,
.tier-progress span,
.wallet__foot,
.device-best {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}

.game-hud > div {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 8px 13px;
}

.game-hud > div + div {
  border-left: 1px solid var(--line);
}

.game-hud strong {
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
}

.game-arena {
  --cat-x: 50%;
  --cat-y: 62%;
  --cat-angle: 0deg;
  position: relative;
  min-height: 0;
  overflow: hidden;
  outline: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: none;
  background:
    radial-gradient(circle at 16% 12%, rgba(173, 96, 77, .13) 0, transparent 27%),
    radial-gradient(circle at 82% 78%, rgba(121, 113, 99, .09) 0, transparent 30%),
    linear-gradient(145deg, #faf8f2, #eee9df);
}

.game-arena * {
  -webkit-user-select: none;
  user-select: none;
}

.game-arena:focus-visible {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.game-grid {
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: radial-gradient(circle, rgba(41,41,35,.18) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.laser-dot {
  --laser-px: 0px;
  --laser-py: 0px;
  --laser-tool-angle: 145deg;
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #fff 0 8%, #ff7771 18%, #ef2727 53%, #bd0909 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.92),
    0 0 0 4px rgba(239,39,39,.09),
    0 0 11px 3px rgba(225,20,20,.36);
  opacity: 1;
  pointer-events: none;
  transform: translate3d(var(--laser-px), var(--laser-py), 0) translate(-50%, -50%);
  will-change: transform;
}

.laser-dot::before,
.laser-dot::after {
  position: absolute;
  left: 50%;
  content: "";
  pointer-events: none;
  transform-origin: left center;
}

.laser-dot::before {
  z-index: -1;
  top: calc(50% - .5px);
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244,30,30,.82), rgba(225,20,20,.22) 74%, transparent 100%);
  box-shadow: 0 0 3px rgba(229,23,23,.28);
  opacity: .72;
  transform: rotate(var(--laser-tool-angle));
}

.laser-dot::after {
  z-index: 2;
  top: calc(50% - 5px);
  width: 34px;
  height: 10px;
  border: 1px solid rgba(12,13,12,.78);
  border-radius: 3px 999px 999px 3px;
  background:
    radial-gradient(circle at 47% 24%, #ff4e48 0 1.25px, #85110f 1.45px 2px, transparent 2.2px),
    linear-gradient(180deg, #777974 0, #343633 22%, #171817 53%, #080908 62%, #3e403c 100%);
  box-shadow:
    inset 3px 0 0 #b8bab5,
    inset 5px 0 0 #4b4d49,
    inset -3px 0 0 rgba(0,0,0,.48),
    0 2px 4px rgba(17,18,16,.22);
  transform: rotate(var(--laser-tool-angle)) translateX(23px);
}

.toy-target {
  --ring-px: 0px;
  --ring-py: 0px;
  --ring-life: 1;
  --toy-tilt: 0deg;
  --toy-face: 1;
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  width: clamp(58px, 7vw, 82px);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  filter: drop-shadow(0 7px 6px rgba(20,18,28,.22));
  transform: translate3d(var(--ring-px), var(--ring-py), 0) translate(-50%, -50%) scale(var(--ring-life)) rotate(var(--toy-tilt)) scaleX(var(--toy-face));
  transform-origin: center;
  will-change: transform;
}

.toy-target::after { content: none; }

.toy-target--mouse { width: clamp(64px, 7.4vw, 88px); }
.toy-target--fish { width: clamp(68px, 7.8vw, 94px); }

.toy-target canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  filter: saturate(1.06) contrast(1.02);
}

.toy-target.is-hit {
  animation: toy-hit .22s ease-out forwards;
}

@keyframes toy-hit {
  to { opacity: 0; transform: translate3d(var(--ring-px), var(--ring-py), 0) translate(-50%, -50%) scale(1.45) rotate(calc(var(--toy-tilt) + 12deg)) scaleX(var(--toy-face)); }
}

.runner-cat,
.runner-cat canvas,
.runner-cat span {
  border: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none;
}

.runner-cat {
  --trail-power: 0;
  --trail-angle: 0deg;
  --trail-sway: 0px;
  --trail-pulse: 0;
  --trail-ink: rgba(32, 33, 29, .68);
  --trail-accent: rgba(173, 96, 77, .86);
  --trail-haze: rgba(173, 96, 77, .14);
  position: absolute;
  z-index: 7;
  top: var(--cat-y);
  left: var(--cat-x);
  width: 226px;
  height: 126px;
  isolation: isolate;
  pointer-events: none;
  filter: drop-shadow(0 7px 5px rgba(20,18,28,.15));
  transform: translate(-50%, -50%) rotate(var(--cat-angle));
  transform-origin: center;
  will-change: top, left, transform;
}

.runner-cat canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.runner-gear--back { z-index: 0; }
.runner-cat span { z-index: 1; }
.runner-gear--front { z-index: 2; }

.runner-cat span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 76px;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: -.1em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(30,31,27,.08);
  transform: translate(-50%, -50%);
}

.runner-cat.is-pouncing {
  animation: runner-pounce .22s ease-out;
}

.runner-cat.is-missing {
  animation: runner-miss .28s linear;
}

@keyframes runner-pounce {
  50% { filter: drop-shadow(0 10px 7px rgba(20,18,28,.2)) brightness(1.08); }
}

@keyframes runner-miss {
  25%, 75% { transform: translate(-50%, -50%) rotate(calc(var(--cat-angle) - 3deg)); }
  50% { transform: translate(-50%, -50%) rotate(calc(var(--cat-angle) + 3deg)); }
}

.game-message {
  position: absolute;
  z-index: 12;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 3px;
  max-width: 370px;
  padding: 10px 12px;
  border: 1px solid rgba(36,37,31,.45);
  border-radius: 10px;
  background: rgba(250,248,242,.9);
  box-shadow: 0 7px 24px rgba(36,37,31,.09);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.game-message strong {
  font-size: 14px;
  font-weight: 750;
}

.game-message span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
  text-transform: uppercase;
}

.game-shell.is-running .game-message {
  display: none;
}

.game-controls {
  display: grid;
  grid-template-columns: 1fr 190px;
  min-height: 56px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.game-controls > div {
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 16px;
}

.game-controls strong,
.game-controls span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.game-controls span { color: var(--muted); }

.game-controls button,
.wallet__control button,
.wallet__use,
.card-actions button {
  cursor: pointer;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 800;
  text-transform: uppercase;
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}

.game-controls button {
  border-width: 0 0 0 1px;
  background: var(--accent);
  color: #fffaf3;
  font-size: 14px;
}

.game-controls button:hover:not(:disabled),
.wallet__control button:hover,
.wallet__use:hover,
.card-actions button:hover:not(:disabled) {
  filter: saturate(1.12) brightness(1.03);
  transform: translateY(-1px);
}

.game-controls button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.cat-console {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.wallet {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(250,248,242,.96);
}

.wallet__heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.wallet__heading h2 {
  margin: 2px 0 0;
  font-family: var(--editorial);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
}

.wallet__use {
  min-width: 72px;
  min-height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 12px;
}

.wallet__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  min-height: 43px;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
}

.wallet__control:focus-within {
  box-shadow: 0 0 0 3px rgba(173,96,77,.16);
}

.wallet__control input {
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.wallet__control input::placeholder { color: #8b8981; }

.wallet__control button {
  border-width: 0 0 0 1.5px;
  background: var(--accent);
  color: #fffaf3;
  font-size: 13px;
}

.wallet__control button:disabled,
.wallet__control input:disabled {
  cursor: wait;
  opacity: .62;
}

.wallet__foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  min-height: 12px;
  font-size: 10px;
}

.wallet__foot small { color: var(--muted); }

#wallet-status {
  color: #15815b;
  text-align: right;
}

#wallet-status.error { color: #b43f3a; }

.result-card {
  display: grid;
  grid-template-rows: minmax(118px, .72fr) minmax(0, 1.28fr);
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

.cat-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 22% 24%, rgba(173,96,77,.12), transparent 31%),
    linear-gradient(135deg, rgba(250,248,242,.8), rgba(203,195,181,.22));
}

.cat-object {
  position: relative;
  display: grid;
  width: 100%;
  height: 150px;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: center;
}

.cat-object.cat-object--arrive {
  animation: cat-arrive .45s cubic-bezier(.2,.8,.2,1);
}

.cat-object.cat-object--boop {
  animation: cat-boop .44s cubic-bezier(.2,.85,.25,1);
}

@keyframes cat-arrive {
  from { opacity: 0; transform: translateY(12px) rotate(-1deg); }
}

@keyframes cat-boop {
  0%, 100% { transform: translate(0,0) rotate(0); }
  42% { transform: translate(-9px,-5px) rotate(-1.2deg); }
  68% { transform: translate(5px,-2px) rotate(.7deg); }
}

.cat-glyph {
  position: relative;
  z-index: 2;
  cursor: pointer;
  padding: 0 .08em .12em 0;
  border: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none;
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: clamp(76px, 7.2vw, 106px);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: -.1em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(30,31,27,.08);
}

.cat-glyph:focus-visible {
  text-shadow:
    0 2px 0 rgba(30,31,27,.08),
    0 0 0.12em rgba(173,96,77,.7),
    0 0 0.28em rgba(173,96,77,.3);
}

.cat-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  pointer-events: none;
}

.cat-canvas--back { z-index: 1; }
.cat-canvas--front { z-index: 3; }

.paw-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.paw {
  --rotation: 0deg;
  position: absolute;
  width: 8px;
  height: 7px;
  border-radius: 55% 55% 45% 45%;
  background: var(--ink);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rotation));
  animation: paw-fade 1.1s ease;
}

.paw::before,
.paw::after {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.paw::before { left: 0; }
.paw::after { right: 0; }

@keyframes paw-fade {
  15%, 60% { opacity: .6; }
  to { opacity: 0; transform: translate(-50%, -65%) rotate(var(--rotation)); }
}

.rare-sighting {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248,246,238,.9);
  backdrop-filter: blur(4px);
}

.rare-sighting img {
  width: min(62%, 250px);
  image-rendering: pixelated;
}

.result-card__data {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 8px;
  min-height: 0;
  padding: 11px 13px;
  overflow: hidden;
}

.identity {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: end;
}

.identity .micro-label {
  grid-column: 1 / -1;
}

.identity strong {
  overflow: hidden;
  color: var(--accent-dark);
  font-family: var(--editorial);
  font-size: clamp(21px, 2.15vw, 29px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity > span:last-child {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.result-stats {
  display: grid;
  grid-template-columns: 1.2fr .7fr .8fr;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.result-stats > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  min-height: 57px;
  padding: 7px 9px;
}

.result-stats > div + div { border-left: 1px solid var(--line); }

.result-stats strong {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-stats__run {
  background: var(--accent-soft);
}

.result-stats__run strong {
  font-size: 19px;
}

.result-stats small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loadout-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  min-height: 30px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--surface-2);
}

.loadout-line strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tier-progress {
  display: grid;
  gap: 5px;
}

.tier-progress > div:first-child {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.tier-progress strong {
  font-family: var(--mono);
  font-size: 10px;
}

.progress-track {
  overflow: hidden;
  height: 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #e8e5dc;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .55s ease;
}

.device-best {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding-top: 1px;
}

.device-best strong { color: var(--ink); }

.device-best small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.card-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: .01em;
}

.card-actions button:nth-child(1) { background: var(--accent-soft); }
.card-actions button:nth-child(2) { background: var(--surface); }
.card-actions button:nth-child(3) { background: var(--accent); color: #fffaf3; }
.card-actions button:nth-child(4) { background: var(--surface); }

.card-actions button:disabled {
  cursor: not-allowed;
  filter: grayscale(.6);
  opacity: .45;
}

.tier-rail {
  grid-area: tiers;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 7px;
  box-shadow: 0 9px 24px rgba(35,36,42,.07);
}

.tier-rail__title {
  display: grid;
  align-content: center;
  padding: 0 10px;
}

.tier-rail__title h2 {
  margin: 3px 0 0;
  font-family: var(--editorial);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.tier-ruler {
  min-width: 0;
  overflow: hidden;
}

.tier-grid {
  --ladder-progress: 0%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 4px 0 15px;
  list-style: none;
}

.tier-grid::before,
.tier-grid::after {
  position: absolute;
  z-index: 0;
  bottom: 8px;
  left: 5%;
  height: 1px;
  content: "";
}

.tier-grid::before {
  right: 5%;
  background: var(--line);
}

.tier-grid::after {
  width: var(--ladder-progress);
  height: 2px;
  background: var(--accent);
}

.tier-grid:has(> [data-tier="1"].is-current) { --ladder-progress: 10%; }
.tier-grid:has(> [data-tier="2"].is-current) { --ladder-progress: 20%; }
.tier-grid:has(> [data-tier="3"].is-current) { --ladder-progress: 30%; }
.tier-grid:has(> [data-tier="4"].is-current) { --ladder-progress: 40%; }
.tier-grid:has(> [data-tier="5"].is-current) { --ladder-progress: 50%; }
.tier-grid:has(> [data-tier="6"].is-current) { --ladder-progress: 60%; }
.tier-grid:has(> [data-tier="7"].is-current) { --ladder-progress: 70%; }
.tier-grid:has(> [data-tier="8"].is-current) { --ladder-progress: 80%; }
.tier-grid:has(> [data-tier="9"].is-current) { --ladder-progress: 90%; }

.tier-grid li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1px 5px;
  align-content: center;
  min-width: 0;
  padding: 2px 7px 8px;
  border: 0;
  background: transparent;
}

.tier-grid li::before {
  position: absolute;
  z-index: 2;
  bottom: -11px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--tier);
  content: "";
  transform: translateX(-50%);
}

.tier-grid li > span {
  position: absolute;
  top: 2px;
  right: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.tier-grid strong {
  grid-column: 1 / -1;
  grid-row: 1;
  overflow: hidden;
  padding-right: 18px;
  font-family: var(--mono);
  font-size: clamp(10px, .78vw, 12px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.tier-grid small {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--mono);
  font-size: 9px;
}

.tier-grid em {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.tier-grid li.is-current {
  color: var(--accent-dark);
}

.tier-grid li.is-current::before {
  bottom: -14px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface);
}

.tier-grid li.is-next {
  background: transparent;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 170px;
  padding: 13px 15px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  box-shadow: 0 10px 28px rgba(36,37,31,.16);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
  text-transform: uppercase;
}

.toast > span:first-child {
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.1em;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1100px) and (min-height: 720px) {
  html,
  body {
    overflow: hidden;
  }
}

@media (min-width: 901px) and (max-height: 800px) {
  .wallet {
    gap: 4px;
    padding: 8px 10px;
  }

  .wallet__heading .micro-label { display: none; }
  .wallet__heading h2 { font-size: 16px; }
  .wallet__use { min-height: 28px; }
  .wallet__control { min-height: 38px; }
  .wallet__foot { font-size: 9.5px; }

  .result-card {
    grid-template-rows: 100px minmax(0, 1fr);
  }

  .cat-object { height: 100px; }
  .cat-glyph { font-size: 74px; }

  .result-card__data {
    gap: 3px;
    padding: 6px 10px;
  }

  .identity .micro-label { display: none; }
  .identity strong { font-size: 22px; }
  .identity > span:last-child { font-size: 9.5px; }

  .result-stats > div {
    min-height: 44px;
    padding: 4px 6px;
  }

  .result-stats span { font-size: 9.5px; }
  .result-stats strong { font-size: 11px; }
  .result-stats__run strong { font-size: 17px; }

  .loadout-line {
    min-height: 24px;
    padding: 5px 7px;
  }

  .tier-progress { gap: 3px; }

  .card-actions {
    gap: 5px;
    padding: 6px;
  }

  .card-actions button { min-height: 32px; }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 70px minmax(510px, 1fr) 285px;
  }

  .trade-link {
    padding: 0 5px;
    font-size: 13.5px;
  }

  .trade-link--buy { font-size: 14px; }

  .market > span { padding: 8px 9px; }
  .market strong { font-size: 16px; }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .game-header {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .tier-rail {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .tier-rail__title h2 { font-size: 15px; }
}

@media (max-width: 920px) {
  .cat-pattern {
    color: rgba(60,63,55,.018);
  }

  .site-header {
    height: 106px;
    grid-template-columns: 62px 1fr;
    grid-template-rows: 58px 48px;
  }

  .mini-mark {
    font-size: 20px;
  }

  .trade-links {
    gap: 4px;
    padding: 6px;
  }

  .trade-link {
    min-height: 46px;
    padding: 0 4px;
    border-radius: 7px;
    font-size: 11.5px;
    line-height: 1.05;
  }

  .trade-link--buy { font-size: 12px; }

  .market {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .market__live {
    top: 7px;
    right: 8px;
    left: auto;
  }

  .market > span {
    align-content: center;
    padding: 7px 18px;
    text-align: center;
  }

  .market small,
  .market__live { font-size: 9px; }
  .market strong { font-size: 16px; }

  .product {
    grid-template-areas:
      "intro"
      "workspace"
      "tiers";
    grid-template-rows: auto auto auto;
    gap: 8px;
    width: calc(100% - 16px);
    height: auto;
    min-height: 0;
    padding: 9px 0 12px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 76px;
    padding: 4px 2px;
  }

  .intro h1 {
    font-size: clamp(36px, 9.7vw, 54px);
  }

  .intro > p {
    justify-self: start;
    max-width: none;
    font-size: 13px;
    text-align: left;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .game-shell {
    height: min(590px, calc(100svh - 198px));
    min-height: 460px;
  }

  .cat-console {
    height: 505px;
  }

  .tier-rail {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 6px;
  }

  .tier-rail__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
  }

  .tier-rail__title h2 {
    margin: 0;
    font-size: 14px;
  }

  .tier-ruler {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .tier-grid {
    grid-template-columns: repeat(10, 92px);
    width: max-content;
    min-width: 920px;
  }

  .tier-grid strong { font-size: 10.5px; }
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .mini-mark { display: none; }

  .trade-links {
    grid-column: 1 / -1;
    grid-template-columns: 1.1fr .78fr .82fr 1.12fr .7fr;
    gap: 3px;
    padding: 5px 4px;
  }

  .trade-link {
    padding: 0 2px;
    font-size: 12.5px;
    font-weight: 800;
  }

  .trade-link--buy { font-size: 13px; }

  .market > span { padding: 7px 8px; }
  .market__live {
    right: 7px;
    left: auto;
  }

  .intro {
    min-height: 72px;
  }

  .intro h1 {
    font-size: clamp(34px, 10.2vw, 42px);
    white-space: normal;
  }

  .intro h1 span {
    white-space: nowrap;
  }

  .intro > p {
    font-size: 12px;
  }

  .game-shell {
    grid-template-rows: auto minmax(0, 1fr) 54px;
    height: 430px;
    min-height: 0;
  }

  .game-header {
    grid-template-columns: 1fr;
    min-height: 91px;
  }

  .game-header > div:first-child {
    min-height: 40px;
    padding: 7px 10px;
  }

  .game-header h2 {
    font-size: 21px;
  }

  .game-hud {
    min-height: 51px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .game-hud > div {
    gap: 3px;
    padding: 6px 8px;
  }

  .game-hud span { font-size: 10px; }
  .game-hud strong { font-size: 18px; }

  .runner-cat {
    width: 188px;
    height: 106px;
  }

  .runner-cat span {
    font-size: 62px;
  }

  .toy-target {
    width: 62px;
  }

  .game-message {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    padding: 8px 10px;
  }

  .game-message strong { font-size: 12px; }
  .game-message span { font-size: 9.5px; }

  .game-controls {
    grid-template-columns: 1fr 128px;
  }

  .game-controls > div { padding: 7px 10px; }
  .game-controls strong,
  .game-controls span { font-size: 9.5px; }
  .game-controls button { font-size: 12px; }

  .cat-console {
    height: 390px;
  }

  .wallet {
    padding: 10px;
  }

  .wallet__heading h2 { font-size: 16px; }

  .result-card {
    grid-template-rows: minmax(0, 1fr);
  }

  .cat-stage { display: none; }

  .result-card__data {
    gap: 3px;
    padding: 6px 10px;
  }

  .identity .micro-label { display: none; }
  .identity strong { font-size: 20px; }
  .identity > span:last-child { font-size: 9.5px; }

  .result-stats > div {
    min-height: 44px;
    padding: 4px 6px;
  }

  .result-stats span { font-size: 10px; }
  .result-stats strong { font-size: 11.5px; }
  .result-stats__run strong { font-size: 17px; }

  .loadout-line {
    min-height: 24px;
    padding: 5px 7px;
  }

  .tier-progress { gap: 3px; }

  .card-actions button {
    min-height: 34px;
    font-size: 12.5px;
  }

  .tier-grid li {
    padding: 6px 5px;
  }

  .tier-grid strong {
    font-size: 10.5px;
  }

  .tier-grid small {
    font-size: 9.5px;
  }

  .challenge-banner {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    max-width: none;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }
}

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

}

/* Theme and progressive reveal states. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource-variable/space-grotesk/files/space-grotesk-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #f4f2ec;
  --surface: #fbfaf6;
  --surface-2: #ece9e1;
  --ink: #171815;
  --muted: #706f68;
  --line: #d1cdc2;
  --line-dark: #aaa69c;
  --focus: #3156c8;
  --accent: #171815;
  --accent-dark: #171815;
  --accent-soft: #e8e4da;
  --sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --editorial: var(--sans);
  --mono: "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html,
body {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: var(--bg);
  font-family: var(--sans);
}

button,
input {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cat-pattern {
  inset: 0;
  color: rgba(23, 24, 21, .017);
  font-size: 22px;
  line-height: 110px;
  word-spacing: 72px;
  transform: none;
}

.site-shell {
  min-height: 100svh;
}

.site-header {
  display: block;
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(244, 242, 236, .94);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 360px;
  align-items: stretch;
  width: min(1440px, 100%);
  height: 100%;
  margin: 0 auto;
}

.mini-mark {
  border-right: 1px solid var(--line);
  font-size: 22px;
}

.trade-links {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
}

.trade-link {
  display: grid;
  flex: 0 0 auto;
  min-width: 88px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -.01em;
  text-transform: none;
}

.trade-link:hover {
  border-color: var(--ink);
  background: var(--surface);
  filter: none;
  transform: none;
}

.trade-link:active {
  box-shadow: none;
  transform: translateY(1px);
}

.trade-link--buy {
  min-width: 116px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
}

.trade-link--buy:hover {
  background: #2b2c28;
  color: #fff;
}

.trade-link--chart,
.trade-link--x,
.trade-link--ca,
.trade-link--ticker {
  background: transparent;
}

.market {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: transparent;
}

.market > span {
  gap: 3px;
  padding: 12px 14px 8px;
}

.market > span + span {
  border-left: 1px solid var(--line);
}

.market small,
.market__live {
  font-size: 10.5px;
}

.market strong {
  font-size: 16px;
  font-weight: 650;
}

.market__live {
  top: 5px;
  right: 8px;
  bottom: auto;
  left: auto;
}

.market__live i {
  background: #b85d4f;
}

.product {
  display: grid;
  grid-template-areas: "intro";
  grid-template-rows: auto;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  height: auto;
  min-height: calc(100svh - 64px);
  margin: 0 auto;
  padding: clamp(42px, 7vh, 86px) 0;
}

.intro {
  grid-area: intro;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  justify-items: center;
  width: min(900px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.intro__copy {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.intro h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(48px, 5.2vw, 68px);
  font-weight: 570;
  letter-spacing: -.065em;
  line-height: .96;
  white-space: nowrap;
}

.intro h1 span {
  font-weight: 400;
  transition: transform .22s ease;
}

.intro h1:hover span {
  transform: translateY(-2px) rotate(-1deg);
}

.intro__copy p,
.intro > p {
  justify-self: center;
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.wallet {
  display: grid;
  gap: 10px;
  width: min(720px, 100%);
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(251, 250, 246, .9);
  box-shadow: 0 16px 42px rgba(30, 29, 26, .065);
  text-align: left;
}

.wallet__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.wallet__heading > div {
  display: grid;
  gap: 3px;
}

.wallet__heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.micro-label,
.game-hud span,
.result-stats span,
.loadout-line > span,
.wallet__foot {
  font-size: 10.5px;
  letter-spacing: .055em;
}

.wallet__use {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
}

.wallet__use:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.wallet__quick-actions {
  display: grid;
  min-width: 88px;
  align-self: stretch;
  gap: 0 !important;
  justify-items: stretch;
}

.wallet__quick-actions .wallet__use {
  width: 100%;
  min-height: 25px;
  padding: 0 9px;
}

.wallet__quick-actions .wallet__use:first-child {
  border-radius: 6px 6px 0 0;
}

.wallet__quick-actions .wallet__use + .wallet__use {
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
}

.wallet__use--demo {
  color: var(--accent-dark);
}

.wallet__use:disabled {
  cursor: wait;
  opacity: .46;
}

.wallet__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  min-height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.wallet__control input {
  min-width: 0;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.wallet__control input::placeholder {
  color: #636159;
}

.wallet__control button {
  border: 0;
  border-left: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  text-transform: lowercase;
}

.wallet__control button:hover {
  background: #2c2d29;
}

.wallet__foot {
  display: flex;
  min-height: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.wallet__foot small,
#wallet-status {
  font-size: 10.5px;
}

#wallet-status {
  color: #377e62;
}

#wallet-status:empty {
  display: none;
}

.challenge-banner {
  grid-column: auto;
  grid-row: auto;
  justify-self: center;
  max-width: 720px;
  margin: -12px 0 0;
  padding: 9px 12px;
  border-color: var(--line-dark);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.site-shell.has-cat .product {
  grid-template-areas:
    "intro"
    "experience";
  grid-template-rows: auto auto;
  gap: 18px;
  align-items: start;
  width: min(1320px, calc(100% - 32px));
  min-height: 0;
  padding: 16px 0 28px;
}

.site-shell.has-cat .intro {
  display: grid;
  grid-template-columns: minmax(350px, .78fr) minmax(530px, 1.22fr);
  gap: 26px;
  width: 100%;
  margin: 0;
  text-align: left;
}

.site-shell.has-cat .intro__copy {
  gap: 0;
  justify-items: start;
}

.site-shell.has-cat .intro h1 {
  font-size: clamp(38px, 3.5vw, 50px);
}

.site-shell.has-cat .intro__copy p {
  display: none;
}

.site-shell.has-cat .wallet {
  grid-template-columns: 1fr;
  gap: 7px 10px;
  width: 100%;
  padding: 10px;
  border-color: var(--line);
  border-radius: 9px;
  box-shadow: none;
}

.site-shell.has-cat .wallet__heading {
  display: none;
}

.site-shell.has-cat .wallet__heading .micro-label {
  display: none;
}

.site-shell.has-cat .wallet__heading h2 {
  max-width: 88px;
  font-size: 15px;
}

.site-shell.has-cat .wallet__use {
  align-self: center;
}

.site-shell.has-cat .wallet__control {
  min-height: 42px;
}

.site-shell.has-cat .wallet__foot {
  grid-column: 1;
}

.experience {
  grid-area: experience;
  display: grid;
  gap: 14px;
  align-items: start;
  justify-content: center;
  width: 100%;
  animation: experience-in .38s cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes experience-in {
  from { opacity: 0; transform: translateY(10px); }
}

.experience:not(.has-game) {
  grid-template-columns: minmax(0, 760px);
}

.experience.has-game {
  grid-template-columns: minmax(390px, 430px) minmax(0, 1fr);
}

.cat-console,
.game-shell {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: rgba(251, 250, 246, .96);
  box-shadow: 0 12px 28px rgba(38, 34, 29, .07);
  overflow: hidden;
}

.cat-console {
  display: grid;
  grid-template-rows: auto auto auto;
  height: auto;
}

.result-card {
  display: grid;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}

.experience:not(.has-game) .result-card {
  grid-template-columns: minmax(330px, .95fr) minmax(0, 1.05fr);
  grid-template-rows: 360px;
}

.experience.has-game .result-card {
  grid-template-columns: 1fr;
  grid-template-rows: 238px auto;
}

.cat-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(23,24,21,.035), transparent 42%),
    var(--surface);
}

.experience:not(.has-game) .cat-stage {
  border-right: 1px solid var(--line);
}

.experience.has-game .cat-stage {
  border-bottom: 1px solid var(--line);
}

.cat-object {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.cat-glyph {
  font-size: clamp(88px, 8vw, 124px);
  text-shadow: none;
}

.experience.has-game .cat-glyph {
  font-size: clamp(78px, 6vw, 104px);
}

.cat-caption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: center;
}

.result-card__data {
  display: grid;
  grid-auto-rows: max-content;
  gap: 14px;
  align-content: center;
  min-height: 0;
  padding: 22px;
  overflow: visible;
}

.experience.has-game .result-card__data {
  gap: 11px;
  align-content: start;
  padding: 16px;
}

.identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: end;
}

.identity .micro-label {
  grid-column: 1 / -1;
  display: block;
}

.identity strong {
  color: var(--ink);
  font-family: var(--sans);
  overflow: visible;
  font-size: clamp(24px, 2.1vw, 28px);
  font-weight: 620;
  letter-spacing: -.045em;
  line-height: 1.04;
  white-space: normal;
}

.identity > span:last-child {
  padding: 5px 7px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  text-transform: none;
}

.result-stats {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.result-stats > div {
  gap: 4px;
  min-height: 76px;
  padding: 11px 12px;
  background: transparent;
}

.result-stats > div + div {
  border-left: 1px solid var(--line);
}

.result-stats strong {
  font-size: 15px;
}

.result-stats small {
  font-size: 10.5px;
}

.result-stats__run {
  background: rgba(23, 24, 21, .025) !important;
}

.result-stats__run strong {
  font-size: 21px;
}

.loadout-line {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.loadout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.gear-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.gear-chip--more {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.gear-chip--empty {
  color: var(--muted);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.card-actions button {
  min-height: 43px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--muted) !important;
  box-shadow: none;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-transform: lowercase;
}

.card-actions button + button {
  border-left: 1px solid var(--line);
}

.card-actions button:hover:not(:disabled) {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}

.discovery {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.discovery span {
  color: var(--muted);
  font-size: 12px;
}

.discovery strong {
  font-size: 13px;
  font-weight: 620;
}

.discovery:hover:not(:disabled) {
  background: var(--ink);
  color: var(--surface);
}

.discovery:hover:not(:disabled) span {
  color: #c9c8c2;
}

.game-shell {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) 54px;
  height: 560px;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(210px, .85fr) minmax(360px, 1.15fr);
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.game-header > div:first-child {
  padding: 10px 14px;
}

.game-header h2 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 610;
  letter-spacing: -.04em;
}

.game-hud > div {
  padding: 8px 12px;
}

.game-hud strong {
  font-size: 18px;
}

.game-arena {
  min-height: 0;
  background:
    radial-gradient(circle at 56% 45%, rgba(23,24,21,.028), transparent 38%),
    linear-gradient(180deg, #f8f7f2, #f2efe8);
}

.game-grid {
  opacity: .22;
}

.game-message {
  max-width: 340px;
  padding: 10px 12px;
  border-color: var(--line-dark);
  border-radius: 8px;
  background: rgba(251,250,246,.91);
  box-shadow: 0 8px 20px rgba(24,24,22,.07);
}

.game-controls {
  grid-template-columns: 1fr 190px;
  min-height: 0;
}

.game-controls > div {
  padding: 8px 14px;
}

.game-controls button {
  border: 0;
  border-left: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  text-transform: lowercase;
}

.toast {
  border-color: var(--line-dark);
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
}

@media (max-width: 1100px) {
  .site-header__inner {
    grid-template-columns: 50px minmax(0, 1fr) 318px;
  }

  .trade-links {
    gap: 4px;
    padding: 8px;
  }

  .trade-link {
    min-width: 72px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .trade-link--buy { min-width: 100px; font-size: 12.5px; }
  .market > span { padding-right: 9px; padding-left: 9px; }

  .site-shell.has-cat .intro {
    grid-template-columns: minmax(310px, .7fr) minmax(500px, 1.3fr);
    gap: 16px;
  }

  .experience.has-game {
    grid-template-columns: 380px minmax(0, 1fr);
  }

  .game-header {
    grid-template-columns: 205px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .cat-pattern { color: rgba(23,24,21,.013); }

  .site-header {
    height: calc(108px + env(safe-area-inset-top));
  }

  .site-header__inner {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: 54px 54px;
    width: 100%;
  }

  .mini-mark {
    grid-row: 1;
  }

  .trade-links {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1.15fr .8fr .9fr 1.08fr .62fr;
    gap: 4px;
    padding: 6px;
  }

  .trade-link,
  .trade-link--buy {
    min-width: 0;
    height: 42px;
    padding: 0 5px;
    font-size: 12px;
  }

  .market {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-left: 0;
  }

  .market > span {
    padding: 8px 18px;
    text-align: center;
  }

  .product {
    width: min(760px, calc(100% - 24px));
    min-height: calc(100svh - 108px);
    padding: 30px 0;
  }

  .intro {
    gap: 22px;
  }

  .intro h1 {
    font-size: clamp(42px, 9vw, 56px);
  }

  .site-shell.has-cat .product {
    width: min(760px, calc(100% - 20px));
    padding: 14px 0 24px;
  }

  .site-shell.has-cat .intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-shell.has-cat .intro__copy {
    justify-items: center;
  }

  .site-shell.has-cat .intro h1 {
    font-size: clamp(35px, 7vw, 44px);
  }

  .site-shell.has-cat .wallet {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .experience.has-game {
    grid-template-columns: 1fr;
  }

  .experience.has-game .result-card {
    grid-template-columns: minmax(300px, .86fr) minmax(0, 1.14fr);
    grid-template-rows: 330px;
  }

  .experience.has-game .cat-stage {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .experience.has-game .result-card__data {
    align-content: center;
    padding: 20px;
  }

  .game-shell {
    height: 530px;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    grid-template-columns: 1fr;
  }

  .mini-mark {
    display: none;
  }

  .trade-links {
    grid-column: 1;
  }

  .trade-link,
  .trade-link--buy {
    font-size: 11.5px;
  }

  .product {
    width: calc(100% - 20px);
    padding: 24px 0;
  }

  .intro h1 {
    font-size: clamp(36px, 10.8vw, 48px);
  }

  .intro__copy p {
    max-width: 410px;
    font-size: 13.5px;
  }

  .wallet {
    gap: 9px;
    padding: 13px;
  }

  .wallet__heading h2 {
    font-size: 16px;
  }

  .wallet__foot {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .site-shell.has-cat .wallet {
    grid-template-columns: 1fr;
  }

  .site-shell.has-cat .wallet__heading {
    grid-row: auto;
  }

  .site-shell.has-cat .wallet__heading h2 {
    max-width: none;
  }

  .site-shell.has-cat .wallet__foot {
    grid-column: 1;
  }

  .experience:not(.has-game) .result-card,
  .experience.has-game .result-card {
    grid-template-columns: 1fr;
    grid-template-rows: 230px auto;
  }

  .experience:not(.has-game) .cat-stage,
  .experience.has-game .cat-stage {
    display: grid;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cat-console {
    height: auto;
  }

  .result-card__data,
  .experience.has-game .result-card__data {
    gap: 11px;
    align-content: start;
    padding: 15px;
  }

  .identity strong {
    font-size: 24px;
  }

  .result-stats > div {
    min-height: 70px;
    padding: 9px 10px;
  }

  .card-actions button {
    min-height: 42px;
    font-size: 10.5px;
  }

  .game-shell {
    grid-template-rows: 108px minmax(0, 1fr) 54px;
    height: 520px;
  }

  .game-header {
    grid-template-columns: 1fr;
    grid-template-rows: 54px 54px;
  }

  .game-header > div:first-child {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 8px 12px;
  }

  .game-header h2 {
    grid-column: auto;
    grid-row: auto;
    font-size: 21px;
  }

  .game-header .micro-label,
  .game-header p {
    display: none;
  }

  .game-hud {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .game-hud > div {
    padding: 7px 8px;
  }

  .game-controls {
    grid-template-columns: minmax(0, 1fr) 132px;
  }
}

@media (max-width: 430px) {
  .trade-links {
    gap: 3px;
    padding: 5px 4px;
  }

  .trade-link,
  .trade-link--buy {
    padding: 0 2px;
    font-size: 10.5px;
  }

  .market > span {
    padding: 8px;
  }

  .market small,
  .market__live {
    font-size: 9.5px;
  }

  .market strong {
    font-size: 14px;
  }

  .intro {
    gap: 18px;
  }

  .intro h1,
  .site-shell.has-cat .intro h1 {
    font-size: clamp(33px, 10vw, 40px);
  }

  .wallet__control {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .wallet__control input {
    padding: 0 10px;
    font-size: 11.5px;
  }

  .cat-glyph,
  .experience.has-game .cat-glyph {
    font-size: 82px;
  }

  .identity {
    align-items: center;
  }

  .identity strong {
    font-size: 22px;
  }

  .result-stats strong {
    font-size: 13px;
  }

  .game-shell {
    height: 500px;
  }

  .runner-cat {
    width: 180px;
    height: 104px;
  }

  .runner-cat span {
    font-size: 60px;
  }
}

/* Identity and game-state details. */

/* The DOM node is retained for compatibility; its text is visually replaced
   by a quiet, code-native paw texture. */
.cat-pattern {
  inset: 0;
  overflow: hidden;
  background-color: transparent;
  background-image:
    radial-gradient(ellipse 8px 7px at 25px 31px, rgba(49, 86, 200, .023) 0 64%, transparent 69%),
    radial-gradient(circle 3.2px at 15px 21px, rgba(23, 24, 21, .020) 0 68%, transparent 74%),
    radial-gradient(circle 3.4px at 22px 16px, rgba(49, 86, 200, .021) 0 68%, transparent 74%),
    radial-gradient(circle 3.2px at 30px 17px, rgba(23, 24, 21, .019) 0 68%, transparent 74%),
    radial-gradient(circle 3px at 36px 23px, rgba(49, 86, 200, .020) 0 68%, transparent 74%),
    radial-gradient(ellipse 7px 6px at 88px 75px, rgba(23, 24, 21, .014) 0 64%, transparent 70%),
    radial-gradient(circle 2.8px at 78px 66px, rgba(49, 86, 200, .015) 0 68%, transparent 74%),
    radial-gradient(circle 2.9px at 86px 61px, rgba(23, 24, 21, .014) 0 68%, transparent 74%),
    radial-gradient(circle 2.8px at 94px 63px, rgba(49, 86, 200, .014) 0 68%, transparent 74%);
  background-size: 128px 108px;
  color: transparent;
  font-size: 0;
  line-height: 0;
  word-spacing: 0;
}

.trade-link--manifesto {
  min-width: 94px;
}

.trade-link--theme {
  min-width: 92px;
  background: var(--surface-2);
}

#market-change.up {
  color: #1d7a52;
}

#market-change.down {
  color: #b43f3a;
}

/* Mirroring lives on the positioning wrapper, so the glyph and both gear
   canvases always face together. */
.runner-cat.is-facing-left {
  transform: translate(-50%, -50%) rotate(var(--cat-angle)) scaleX(-1);
}

.runner-cat.is-facing-left.is-missing {
  animation-name: runner-miss-left;
}

@keyframes runner-miss-left {
  25%, 75% { transform: translate(-50%, -50%) rotate(calc(var(--cat-angle) - 3deg)) scaleX(-1); }
  50% { transform: translate(-50%, -50%) rotate(calc(var(--cat-angle) + 3deg)) scaleX(-1); }
}

.runner-cat.is-catnipped {
  --trail-ink: rgba(66, 179, 94, .78);
  --trail-accent: rgba(241, 194, 62, .66);
  --trail-haze: rgba(64, 169, 91, .13);
  filter:
    drop-shadow(0 7px 5px rgba(20, 18, 28, .13))
    drop-shadow(0 0 9px rgba(64, 169, 91, .40));
}

.runner-cat::before,
.runner-cat::after {
  position: absolute;
  z-index: 0;
  right: 77%;
  content: "";
  opacity: var(--trail-power);
  pointer-events: none;
  transform-origin: right center;
  transition: opacity 55ms linear, transform 60ms linear;
  will-change: opacity, transform;
}

.runner-cat::before {
  top: 27%;
  width: clamp(64px, 6.2vw, 88px);
  height: 58px;
  background:
    linear-gradient(90deg, transparent 0 7%, var(--trail-accent) 32%, transparent 36% 45%, var(--trail-accent) 51%, var(--trail-ink) 100%) 100% 2px / 100% 3px no-repeat,
    linear-gradient(90deg, transparent 0 13%, var(--trail-ink) 42%, transparent 47% 58%, var(--trail-accent) 64% 100%) 100% 18px / 68% 2px no-repeat,
    linear-gradient(90deg, transparent 0 5%, var(--trail-accent) 38%, transparent 43% 51%, var(--trail-ink) 58% 100%) 100% 39px / 84% 3px no-repeat,
    linear-gradient(90deg, transparent 0 18%, var(--trail-ink) 52%, transparent 58% 70%, var(--trail-accent) 78% 100%) 100% 55px / 50% 2px no-repeat;
  filter: drop-shadow(-5px 0 3px rgba(173, 96, 77, .20));
  transform:
    translateX(6px)
    translateY(var(--trail-sway))
    rotate(var(--trail-angle))
    scaleX(calc(.18 + var(--trail-power) + var(--trail-pulse)));
}

.runner-cat::after {
  top: 31%;
  right: 79%;
  width: clamp(48px, 5vw, 68px);
  height: 48px;
  background:
    radial-gradient(ellipse 9px 2.2px at 92% 17%, var(--trail-accent) 0 55%, transparent 68%),
    radial-gradient(ellipse 7px 1.8px at 57% 47%, var(--trail-ink) 0 55%, transparent 70%),
    radial-gradient(ellipse 6px 1.6px at 76% 82%, var(--trail-accent) 0 55%, transparent 70%),
    linear-gradient(90deg, transparent 0 18%, var(--trail-haze) 66%, transparent 100%);
  clip-path: polygon(0 50%, 100% 2%, 100% 98%);
  transform:
    translateX(4px)
    translateY(calc(0px - var(--trail-sway)))
    rotate(calc(var(--trail-angle) * .55))
    scaleX(calc(.12 + var(--trail-power) - var(--trail-pulse)));
}

.runner-cat.is-catnipped::before {
  filter: drop-shadow(-9px 0 5px rgba(64, 169, 91, .34));
}

@media (prefers-reduced-motion: reduce) {
  .runner-cat::before,
  .runner-cat::after {
    transition: opacity 55ms linear, transform 60ms linear !important;
  }
}

.toy-target--feather {
  width: clamp(62px, 7.4vw, 88px);
  filter: drop-shadow(0 7px 6px rgba(20, 18, 28, .18));
}

.toy-target--catnip {
  width: clamp(58px, 7vw, 82px);
  filter:
    drop-shadow(0 7px 6px rgba(20, 18, 28, .16))
    drop-shadow(0 0 8px rgba(64, 169, 91, .30));
}

.manifesto {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.manifesto:target {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.manifesto__scrim {
  position: absolute;
  inset: 0;
  background: rgba(19, 20, 18, .42);
  backdrop-filter: blur(5px);
}

.manifesto__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(620px, calc(100svh - 40px));
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(18, 19, 17, .20);
}

.manifesto__header {
  display: flex;
  min-height: 48px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.manifesto__header a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
}

.manifesto__body {
  padding: clamp(28px, 6vw, 52px);
}

.manifesto__glyph {
  margin: 0 0 30px;
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -.1em;
  line-height: 1;
}

.manifesto__body h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 560;
  letter-spacing: -.055em;
  line-height: .98;
}

.manifesto__body > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

html:has(.manifesto:target),
body:has(.manifesto:target) {
  overflow: hidden;
}

.manifesto__header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--surface);
}

@media (max-width: 920px) {
  .trade-links {
    grid-template-columns: 1.16fr .72fr .78fr .84fr 1.02fr .42fr 1.08fr 1.14fr;
  }

  .trade-link--manifesto,
  .trade-link--theme {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .trade-link,
  .trade-link--buy {
    min-width: 0;
    padding-right: 1px;
    padding-left: 1px;
    font-size: 11px;
    letter-spacing: -.025em;
  }

  .manifesto {
    align-items: end;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .manifesto__panel {
    max-height: calc(100svh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
  }

  .manifesto__body {
    padding: 30px 24px 38px;
  }
}

/* Playfield, navigation, and footer layout. */

.cat-pattern {
  background-image:
    radial-gradient(ellipse 12px 9px at 33px 43px, rgba(49, 86, 200, .052) 0 62%, transparent 68%),
    radial-gradient(circle 4.6px at 18px 28px, rgba(23, 24, 21, .046) 0 68%, transparent 75%),
    radial-gradient(circle 4.9px at 28px 20px, rgba(49, 86, 200, .048) 0 68%, transparent 75%),
    radial-gradient(circle 4.7px at 40px 22px, rgba(23, 24, 21, .043) 0 68%, transparent 75%),
    radial-gradient(circle 4.3px at 49px 31px, rgba(49, 86, 200, .045) 0 68%, transparent 75%),
    radial-gradient(ellipse 10px 8px at 131px 116px, rgba(23, 24, 21, .036) 0 62%, transparent 69%),
    radial-gradient(circle 4px at 118px 102px, rgba(49, 86, 200, .038) 0 68%, transparent 75%),
    radial-gradient(circle 4.2px at 128px 95px, rgba(23, 24, 21, .034) 0 68%, transparent 75%),
    radial-gradient(circle 4px at 139px 98px, rgba(49, 86, 200, .036) 0 68%, transparent 75%),
    radial-gradient(circle 3.8px at 147px 107px, rgba(23, 24, 21, .032) 0 68%, transparent 75%);
  background-size: 184px 158px;
}

.site-header__inner {
  grid-template-columns: 64px minmax(0, 1fr) 360px;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
}

.mini-mark {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  width: 64px;
  min-width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  place-self: stretch;
  margin: 0;
  padding: 0 .12em 2px 0;
  border-right: 1px solid var(--line);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -.12em;
  line-height: 1;
  text-align: center;
}

.trade-links {
  grid-column: 2;
  grid-row: 1;
}

.market {
  grid-column: 3;
  grid-row: 1;
}

.site-shell:not(.has-cat) .product {
  min-height: calc(100svh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.site-shell.has-cat .product {
  width: min(1440px, calc(100% - 24px));
}

.experience.has-game {
  grid-template-columns: minmax(380px, 410px) minmax(0, 1fr);
  gap: 12px;
}

.game-shell {
  height: 620px;
}

.card-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top-color: var(--line-dark);
}

.card-actions button {
  min-width: 0;
  min-height: 46px;
  padding: 0 8px;
  background: var(--surface) !important;
  color: var(--ink) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.card-actions button + button {
  border-left: 1px solid var(--line-dark);
}

.card-actions button:hover:not(:disabled) {
  background: var(--ink) !important;
  color: var(--surface) !important;
}

.card-actions button:focus-visible {
  position: relative;
  z-index: 2;
  outline-color: var(--focus);
  outline-offset: -3px;
}

.card-actions button:disabled {
  color: var(--muted) !important;
  opacity: .52;
}

@media (min-width: 681px) {
  .card-actions:has(#game-again[hidden]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site-footer {
  position: relative;
  z-index: 2;
  min-height: 46px;
  border-top: 1px solid var(--line);
  background: rgba(244, 242, 236, .88);
  backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}

.site-footer__inner {
  display: flex;
  width: min(1440px, 100%);
  min-height: 45px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding-right: max(16px, env(safe-area-inset-right));
  padding-left: max(16px, env(safe-area-inset-left));
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p strong {
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.1em;
}

.site-footer nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-footer nav a {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 4px;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  border-bottom-color: currentColor;
}

@media (max-width: 1100px) {
  .site-header__inner {
    grid-template-columns: 58px minmax(0, 1fr) 318px;
  }

  .mini-mark {
    width: 58px;
    min-width: 58px;
  }

  .experience.has-game {
    grid-template-columns: minmax(350px, 380px) minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .site-header__inner {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .mini-mark {
    width: 58px;
    min-width: 58px;
    height: 54px;
  }

  .market {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-shell:not(.has-cat) .product {
    min-height: calc(100svh - 154px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .site-shell.has-cat .product {
    width: min(800px, calc(100% - 20px));
  }

  .experience.has-game {
    grid-template-columns: 1fr;
  }

  .game-shell {
    height: 600px;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    grid-template-columns: 1fr;
  }

  .trade-links {
    grid-column: 1;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-actions button:nth-child(odd) {
    border-left: 0;
  }

  .card-actions button:nth-child(n + 3) {
    border-top: 1px solid var(--line-dark);
  }

  .game-shell {
    height: 580px;
  }

  .site-footer__inner {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .site-footer nav {
    gap: 14px;
  }
}

@media (max-width: 430px) {
  .game-shell {
    height: 560px;
  }

  .site-footer p {
    display: none;
  }

  .site-footer nav {
    width: 100%;
    justify-content: space-between;
  }
}

/* Full-height page flow and manifesto. */
.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
}

.site-header,
.site-footer {
  flex: 0 0 auto;
}

.product {
  flex: 0 0 auto;
}

.site-footer {
  position: relative;
  width: 100%;
  margin-top: auto;
}

.site-shell:not(.has-cat) .product {
  min-height: calc(100svh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: calc(100dvh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.site-shell:not(.has-cat) .intro {
  transform: translateY(clamp(-68px, -5vh, -40px));
}

.manifesto__panel {
  width: min(640px, 100%);
}

.manifesto__copy {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  color: #56564f;
  font-family: var(--editorial);
  font-size: 17px;
  letter-spacing: -.012em;
  line-height: 1.58;
}

.manifesto__copy p {
  margin: 0;
}

@media (max-width: 920px) {
  .site-shell:not(.has-cat) .product {
    min-height: calc(100svh - 154px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 154px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .site-shell:not(.has-cat) .intro {
    transform: translateY(-34px);
  }
}

@media (max-width: 680px) {
  .site-shell:not(.has-cat) .intro {
    transform: translateY(-22px);
  }
}

@media (max-width: 430px) {
  .site-shell:not(.has-cat) .intro {
    transform: translateY(-16px);
  }

  .manifesto__copy {
    gap: 13px;
    font-size: 15.5px;
  }
}

/* Whole-paw SVG texture; positioned paw nodes below replace it. */
.cat-pattern {
  isolation: isolate;
  background-image: none;
}

.cat-pattern::before {
  position: absolute;
  content: "";
  inset: -45vmax;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='340' viewBox='0 0 420 340'%3E%3Cg fill='%233156c8' fill-opacity='.095' transform='translate(58 58) rotate(30)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%23171815' fill-opacity='.078' transform='translate(298 136) rotate(-30) scale(.9)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%233156c8' fill-opacity='.082' transform='translate(146 286) rotate(-24) scale(.82)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 420px 340px;
}

.cat-pattern::after {
  content: none;
}

.game-shell {
  height: 720px;
  max-height: none;
}

@media (max-width: 1100px) {
  .game-shell {
    height: 680px;
  }
}

@media (max-width: 920px) {
  .game-shell {
    height: 670px;
  }
}

@media (max-width: 680px) {
  .game-shell {
    height: 630px;
  }
}

@media (max-width: 430px) {
  .game-shell {
    height: 610px;
  }
}

.game-arena:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(49, 86, 200, .48);
}

.manifesto__panel {
  scrollbar-width: thin;
  scrollbar-color: var(--line-dark) transparent;
}

.manifesto__panel::-webkit-scrollbar {
  width: 8px;
}

.manifesto__panel::-webkit-scrollbar-track {
  background: transparent;
}

.manifesto__panel::-webkit-scrollbar-thumb {
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--line-dark);
}

/* Midnight terminal theme -------------------------------------------------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10110f;
  --surface: #191a17;
  --surface-2: #24251f;
  --ink: #f0ede3;
  --muted: #aaa79d;
  --line: #34362f;
  --line-dark: #62645b;
  --focus: #7897ff;
  --accent: #f0ede3;
  --accent-dark: #df816a;
  --accent-soft: #352720;
  --paw-neutral: rgba(218, 212, 199, .16);
  --paw-accent: rgba(223, 126, 98, .22);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

body,
.site-header,
.site-footer,
.wallet,
.cat-console,
.game-shell,
.cat-stage,
.game-arena,
.game-message,
.manifesto__panel {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

html[data-theme="dark"] .site-header {
  background: rgba(16, 17, 15, .92);
}

html[data-theme="dark"] .site-footer {
  background: rgba(16, 17, 15, .88);
}

html[data-theme="dark"] .wallet,
html[data-theme="dark"] .cat-console,
html[data-theme="dark"] .game-shell {
  background: rgba(25, 26, 23, .97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .cat-stage {
  background:
    radial-gradient(circle at 50% 48%, rgba(240, 237, 227, .065), transparent 43%),
    var(--surface);
}

html[data-theme="dark"] .cat-canvas,
html[data-theme="dark"] .runner-cat canvas {
  filter:
    drop-shadow(0 0 .65px rgba(240, 237, 227, .72))
    drop-shadow(0 4px 7px rgba(0, 0, 0, .24));
}

html[data-theme="dark"] .result-stats__run {
  background: rgba(240, 237, 227, .035) !important;
}

html[data-theme="dark"] .game-arena {
  background:
    radial-gradient(circle at 56% 45%, rgba(120, 151, 255, .075), transparent 40%),
    radial-gradient(circle at 18% 16%, rgba(223, 129, 106, .055), transparent 27%),
    linear-gradient(180deg, #20211d, #141512);
}

html[data-theme="dark"] .game-grid {
  opacity: .32;
  background-image: radial-gradient(circle, rgba(240, 237, 227, .16) 1px, transparent 1px);
}

html[data-theme="dark"] .game-message {
  border-color: var(--line-dark);
  background: rgba(25, 26, 23, .91);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .30);
}

html[data-theme="dark"] .game-arena:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(120, 151, 255, .40);
}

html[data-theme="dark"] .runner-cat {
  --trail-ink: rgba(240, 237, 227, .74);
  --trail-accent: rgba(223, 129, 106, .90);
  --trail-haze: rgba(223, 129, 106, .17);
}

html[data-theme="dark"] .runner-cat.is-catnipped {
  --trail-ink: rgba(111, 213, 139, .84);
  --trail-accent: rgba(248, 206, 79, .80);
  --trail-haze: rgba(83, 196, 113, .18);
}

html[data-theme="dark"] .rare-sighting {
  background: rgba(17, 18, 16, .91);
}

html[data-theme="dark"] .manifesto__scrim {
  background: rgba(4, 5, 4, .68);
}

html[data-theme="dark"] .manifesto__panel {
  box-shadow: 0 28px 76px rgba(0, 0, 0, .46);
}

html[data-theme="dark"] .manifesto__copy {
  color: var(--muted);
}

html[data-theme="dark"] .wallet__control input::placeholder {
  color: #8b8981;
}

html[data-theme="dark"] .wallet__control input:-webkit-autofill,
html[data-theme="dark"] .wallet__control input:-webkit-autofill:hover,
html[data-theme="dark"] .wallet__control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface) inset;
}

html[data-theme="dark"] #wallet-status {
  color: #68c997;
}

html[data-theme="dark"] #wallet-status.error,
html[data-theme="dark"] #market-change.down {
  color: #e4776c;
}

html[data-theme="dark"] #market-change.up {
  color: #68c997;
}

html[data-theme="dark"] .trade-link--buy:hover,
html[data-theme="dark"] .wallet__control button:hover {
  background: #d8d4ca;
  color: #171815;
}

html[data-theme="dark"] .discovery:hover:not(:disabled) span {
  color: #4f5049;
}

html[data-theme="dark"] .cat-pattern::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='340' viewBox='0 0 420 340'%3E%3Cg fill='%237897ff' fill-opacity='.13' transform='translate(58 58) rotate(30)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%23f0ede3' fill-opacity='.085' transform='translate(298 136) rotate(-30) scale(.9)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%237897ff' fill-opacity='.11' transform='translate(146 286) rotate(-24) scale(.82)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .site-footer,
  .wallet,
  .cat-console,
  .game-shell,
  .cat-stage,
  .game-arena,
  .game-message,
  .manifesto__panel {
    transition-duration: .001ms;
  }
}

@media (max-width: 680px) {
  .card-actions:has(#game-again[hidden]) #share-run {
    grid-column: 1 / -1;
  }
}

/* Typography and surface styling. */

:root {
  --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--ui);
}

.intro h1,
.wallet__heading h2,
.identity strong,
.game-header h2,
.manifesto__body h2 {
  font-family: var(--sans);
}

.trade-link,
.wallet__control button,
.card-actions button,
.discovery,
.game-controls button,
.site-footer {
  font-family: var(--ui);
}

.cat-pattern {
  -webkit-mask-image: radial-gradient(ellipse 54% 45% at 50% 47%, transparent 0 20%, rgba(0, 0, 0, .26) 43%, #000 76%);
  mask-image: radial-gradient(ellipse 54% 45% at 50% 47%, transparent 0 20%, rgba(0, 0, 0, .26) 43%, #000 76%);
}

.site-shell:not(.has-cat) .intro__copy {
  width: min(720px, 100%);
  justify-items: start;
  text-align: left;
}

.site-shell:not(.has-cat) .intro__copy p {
  justify-self: start;
  text-align: left;
}

.trade-links {
  gap: 0;
}

.trade-link:not(.trade-link--buy) {
  position: relative;
  min-width: auto;
  padding-right: 12px;
  padding-left: 12px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.trade-link:not(.trade-link--buy)::after {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: .68;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .16s ease;
}

.trade-link:not(.trade-link--buy):hover,
.trade-link:not(.trade-link--buy):focus-visible {
  border-color: transparent;
  background: transparent;
}

.trade-link:not(.trade-link--buy):hover::after,
.trade-link:not(.trade-link--buy):focus-visible::after {
  transform: scaleX(1);
}

.trade-link--buy {
  border-radius: 4px;
}

.wallet,
.cat-console,
.game-shell,
.manifesto__panel {
  border-radius: 8px;
}

.wallet,
.cat-console,
.game-shell,
html[data-theme="dark"] .wallet,
html[data-theme="dark"] .cat-console,
html[data-theme="dark"] .game-shell {
  box-shadow: none;
}

.wallet__control {
  border-radius: 3px;
}

.wallet__use,
.wallet__quick-actions .wallet__use:first-child,
.wallet__quick-actions .wallet__use + .wallet__use {
  border-radius: 2px;
}

.result-stats {
  border-radius: 0;
}

.identity > span:last-child {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  line-height: 1.2;
}

.loadout-chips {
  display: block;
  line-height: 1.6;
}

.gear-chip {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: normal;
}

.gear-chip + .gear-chip::before {
  color: var(--muted);
  content: " · ";
}

.gear-chip--more {
  color: var(--ink);
}

.game-message {
  border-radius: 3px;
}

.experience {
  animation: none;
}

.wallet__heading .micro-label,
.identity .micro-label,
.game-header .micro-label {
  font-weight: 600;
  letter-spacing: .015em;
  text-transform: none;
}

.card-actions #game-again:not([hidden]) {
  background: var(--ink) !important;
  color: var(--surface) !important;
}

.card-actions #game-again:hover:not(:disabled) {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}

.card-actions:has(#share-run[hidden]):has(#game-again[hidden]) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .trade-link:not(.trade-link--buy) {
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
  }

  .trade-link:not(.trade-link--buy)::after {
    right: 4px;
    left: 4px;
  }
}

@media (max-width: 680px) {
  .site-shell:not(.has-cat) .intro__copy {
    justify-items: center;
    text-align: center;
  }

  .site-shell:not(.has-cat) .intro__copy p {
    justify-self: center;
    text-align: center;
  }
}

/* Mobile tap geometry and modal scroll containment. */
@media (max-width: 430px) {
  .trade-links {
    grid-template-columns:
      minmax(64px, 1.25fr)
      minmax(40px, .72fr)
      minmax(42px, .76fr)
      minmax(44px, .9fr)
      minmax(48px, 1fr)
      minmax(38px, .62fr)
      minmax(52px, 1.02fr)
      minmax(54px, 1.08fr);
    gap: 0;
    padding: 5px 4px;
  }

  .trade-link,
  .trade-link--buy,
  .trade-link:not(.trade-link--buy) {
    min-width: 44px;
    height: 44px;
    padding-right: 1px;
    padding-left: 1px;
    touch-action: manipulation;
  }
}

@media (max-width: 365px) {
  .site-header {
    height: calc(152px + env(safe-area-inset-top));
  }

  .site-header__inner {
    grid-template-rows: 98px 54px;
  }

  .trade-links {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    grid-template-rows: repeat(2, 44px);
    gap: 2px;
  }

  .site-shell:not(.has-cat) .product {
    min-height: calc(100svh - 198px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 198px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

/* Wood floor and woven rug playfield. */
.game-arena {
  background:
    repeating-linear-gradient(90deg, transparent 0 136px, rgba(43, 27, 18, .18) 136px 138px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 7px),
    linear-gradient(118deg, #9b7658 0%, #866247 52%, #72513d 100%);
}

.game-grid {
  inset: clamp(18px, 4.5vw, 46px) clamp(16px, 4.5vw, 54px);
  border: 1px solid rgba(57, 53, 43, .36);
  border-radius: 10px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .1), transparent 34%),
    repeating-linear-gradient(0deg, rgba(41, 41, 35, .032) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #c8c0aa, #b8b099);
  background-size: auto;
  box-shadow:
    0 12px 25px rgba(42, 28, 20, .2),
    inset 0 0 0 5px rgba(250, 248, 242, .22),
    inset 0 0 0 6px rgba(65, 62, 51, .17);
  opacity: 1;
  pointer-events: none;
  -webkit-mask-image: none;
  mask-image: none;
}

html[data-theme="dark"] .game-arena {
  background:
    repeating-linear-gradient(90deg, transparent 0 136px, rgba(0, 0, 0, .28) 136px 138px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 7px),
    linear-gradient(118deg, #3b2c23 0%, #2c211b 55%, #211916 100%);
}

html[data-theme="dark"] .game-grid {
  border-color: rgba(184, 176, 151, .24);
  background:
    radial-gradient(circle at 35% 25%, rgba(240, 237, 227, .045), transparent 36%),
    repeating-linear-gradient(0deg, rgba(240, 237, 227, .018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(240, 237, 227, .012) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #3d443b, #30362f);
  background-size: auto;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .35),
    inset 0 0 0 5px rgba(240, 237, 227, .035),
    inset 0 0 0 6px rgba(177, 186, 162, .16);
  opacity: 1;
}

/* Light and dark palettes for the SVG texture above. */
.cat-pattern::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='340' viewBox='0 0 420 340'%3E%3Cg fill='%239c6a58' fill-opacity='.09' transform='translate(58 58) rotate(30)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%236f786a' fill-opacity='.072' transform='translate(298 136) rotate(-30) scale(.9)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%239c6a58' fill-opacity='.078' transform='translate(146 286) rotate(-24) scale(.82)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3C/svg%3E");
}

html[data-theme="dark"] .cat-pattern::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='340' viewBox='0 0 420 340'%3E%3Cg fill='%23c48670' fill-opacity='.145' transform='translate(58 58) rotate(30)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%239aa48f' fill-opacity='.11' transform='translate(298 136) rotate(-30) scale(.9)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3Cg fill='%23c48670' fill-opacity='.128' transform='translate(146 286) rotate(-24) scale(.82)'%3E%3Cellipse cx='0' cy='11' rx='13' ry='10'/%3E%3Cellipse cx='-15' cy='-4' rx='4.5' ry='5.7' transform='rotate(-28 -15 -4)'/%3E%3Cellipse cx='-6' cy='-15' rx='4.7' ry='5.9' transform='rotate(-10 -6 -15)'/%3E%3Cellipse cx='6' cy='-15' rx='4.7' ry='5.9' transform='rotate(10 6 -15)'/%3E%3Cellipse cx='15' cy='-4' rx='4.5' ry='5.7' transform='rotate(28 15 -4)'/%3E%3C/g%3E%3C/svg%3E");
}

/* JS renders PAW_TRACKS as positioned nodes; share cards reuse those coordinates. */
.cat-pattern {
  inset: 0;
  overflow: hidden;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.cat-pattern::before,
.cat-pattern::after {
  content: none;
}

.patrol-paw {
  position: absolute;
  width: 48px;
  height: 52px;
  color: var(--paw-neutral);
  opacity: var(--paw-opacity);
  transform: translate(-50%, -50%) rotate(var(--paw-angle)) scale(var(--paw-scale-x), var(--paw-scale));
  transform-origin: center;
  pointer-events: none;
}

.patrol-paw--accent {
  color: var(--paw-accent);
}

.patrol-paw svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
}

@media (max-width: 600px) {
  .patrol-paw {
    width: 38px;
    height: 41px;
  }
}

/* Live chart: a top-layer view that does not stretch the one-page layout. */
.chart-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 84px rgba(18, 19, 17, .28);
  color: var(--ink);
}

.chart-dialog:not([open]) {
  display: none;
}

.chart-dialog::backdrop {
  background: rgba(19, 20, 18, .48);
  backdrop-filter: blur(6px);
}

.chart-dialog__panel {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.chart-dialog__header {
  display: flex;
  min-height: 54px;
  flex: 0 0 54px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px 0 17px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.chart-dialog__identity,
.chart-dialog__actions {
  display: flex;
  align-items: center;
}

.chart-dialog__identity {
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.chart-dialog__identity strong {
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Arial Unicode MS", var(--mono);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -.1em;
  line-height: 1;
}

.chart-dialog__identity small {
  margin-left: 7px;
  color: var(--muted);
  font: inherit;
  opacity: 1;
}

.chart-dialog__actions {
  gap: 5px;
}

.chart-dialog__actions a,
.chart-dialog__actions button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.chart-dialog__actions a {
  padding: 0 12px;
}

.chart-dialog__actions button {
  width: 44px;
  padding: 0;
  cursor: pointer;
}

.chart-dialog__actions a:hover,
.chart-dialog__actions button:hover {
  background: var(--surface-2);
}

.chart-dialog__viewport {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  background: var(--bg);
}

.chart-dialog__viewport iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity .16s ease;
}

.chart-dialog__viewport iframe.is-ready {
  opacity: 1;
}

.chart-dialog__loading {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chart-dialog__loading[hidden] {
  display: none;
}

.chart-dialog__loading i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c48670;
  box-shadow: 0 0 0 4px rgba(196, 134, 112, .12);
  animation: chart-pulse 1.1s ease-in-out infinite alternate;
}

.chart-dialog__loading[data-state="error"] {
  color: var(--accent-dark);
}

.chart-dialog__loading[data-state="error"] i {
  animation: none;
  background: currentColor;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

@keyframes chart-pulse {
  to { opacity: .38; transform: scale(.78); }
}

html.chart-is-open,
html.chart-is-open body {
  overflow: hidden;
}

.site-footer nav button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
}

.site-footer nav button:hover,
.site-footer nav button:focus-visible {
  border-bottom-color: currentColor;
}

html[data-theme="dark"] .chart-dialog {
  box-shadow: 0 30px 90px rgba(0, 0, 0, .56);
}

html[data-theme="dark"] .chart-dialog::backdrop {
  background: rgba(4, 5, 4, .72);
}

@media (max-width: 680px) {
  .chart-dialog {
    inset: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    max-height: none;
    margin: 0;
    border-radius: 9px;
  }

  .chart-dialog__header {
    padding-right: 6px;
    padding-left: 13px;
  }

  .chart-dialog__identity small,
  .chart-dialog__actions a span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-dialog__viewport iframe,
  .chart-dialog__loading i {
    animation: none;
    transition: none;
  }
}

/* In-arena start prompt. */
.game-controls {
  grid-template-columns: 1fr;
}

.game-start-hint {
  position: absolute;
  z-index: 14;
  bottom: 20px;
  left: 50%;
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 0 var(--surface), 0 0 12px var(--surface);
  text-transform: lowercase;
  transform: translate(-50%, 4px);
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.game-shell.is-ready .game-start-hint {
  opacity: .88;
  transform: translate(-50%, 0);
  visibility: visible;
  transition-delay: 0s;
}

.game-shell.is-ready .game-message {
  display: none;
}

.toy-target.is-start-toy {
  isolation: isolate;
  min-width: 44px;
  cursor: none;
  pointer-events: auto;
}

.toy-target.is-start-toy canvas {
  position: relative;
  z-index: 1;
  animation: start-toy-breathe 1.75s cubic-bezier(.45, 0, .25, 1) infinite;
  transform-origin: center;
}

.toy-target.is-start-toy::after {
  position: absolute;
  z-index: 0;
  inset: 8%;
  border: 1px solid rgba(196, 134, 112, .62);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(196, 134, 112, .26);
  content: "";
  opacity: .18;
  pointer-events: none;
  animation: start-toy-halo 1.75s cubic-bezier(.45, 0, .25, 1) infinite;
}

.toy-target.is-start-toy:focus-visible {
  outline: 2px solid #d94b43;
  outline-offset: 6px;
}

@keyframes start-toy-breathe {
  0%, 100% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
  48% {
    filter: brightness(1.13) saturate(1.08) drop-shadow(0 0 5px rgba(255, 255, 255, .3));
    transform: scale(1.08);
  }
}

@keyframes start-toy-halo {
  0%, 100% { opacity: .14; transform: scale(.88); }
  48% { opacity: .58; transform: scale(1.16); }
}

html[data-theme="dark"] .toy-target.is-start-toy::after {
  border-color: rgba(240, 237, 227, .48);
  box-shadow: 0 0 20px rgba(240, 237, 227, .16);
}

@media (max-width: 560px) {
  .game-start-hint {
    bottom: 14px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-start-hint {
    transition: none;
  }

  .toy-target.is-start-toy canvas,
  .toy-target.is-start-toy::after {
    animation: none;
  }

  .toy-target.is-start-toy::after {
    opacity: .38;
  }
}

/* Desktop landing-page laser cursor. */
@media (hover: hover) and (pointer: fine) {
  .site-shell:not(.has-cat),
  .site-shell:not(.has-cat) * {
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAE5ElEQVR42uVXTWgUZxh+v5/5ZmZnf82PRhstOkK7weYQCR4KKZSmemihFW0PllYEryKC4MGD7UGEYo/Fg16KUhUtFAQVvLYpuIcortisNhE0aeJmnZ3dzMw3883XQ0m6M7P5WdtCoXPbmX3nfd7nfb73fQbg/36hVw2U+/aR0pMnePH30NatIbp6VfxrACQAmjBNlmNMUQlRQIi2sTkALjn3UaXCEYD8RwCEpqlahqEj38drLo0QWavXndenpryVgKDVqq6aZoYyRl+1VaGui0KpZCOAsCMAEgC/HBzMdlT1CmxUGGvsLJX8+CO6XOWrJXcdR6GULsULzoVqGLztn4VAJudpCVBHAGJFBlajPeA8JRynSyDEkoUSX0GohlMpu21hihLmx8etVk0kAPy2ZYtWMIxU/D4OAmx7XjcSIrOqshFaAEWZ0zUtSJwSXXdRqbSw9N549fl8XosHOa5LXc/rX0tyAAApZYoGQb/XbCZYsjhXZUveKADTZO36LoXoCoTo6CT4YYhlEPS208PzoSGtrQirhDAlfoxcNw1CpOPvUYaH0/lTpz5CfX1vAQCE1eqThTNnvl+4fbu2FIuQ6tl2Qc1kaq2xOoCSACABkMUYBRGdpoEQXfHk2dOnBx9funh28sMPMkShIPwAQl3fPvTTzzvVW7e+rR07dneJYoTyABABgB2HSACCAMRfdI+MkPh49ZpNFqc+NTpamLhw4ax4XMlseP89yG/uh9yGXtCAbfxlu5lTdu8+lD58uL+1Fe208KBYJBENPJibS/SeUhrvCKSOH//Um/g1s37/ftj49Tew4fMvoNC/CdLdaWDp9OZgbOxy6uDBzyLtIiQBwGg2cQRAkXPU5uiR+L1n1669SxQFeKkEzo8/AJ14BHo2C5hSIAoF+9y5u7inZ2dEkG1mxpa+PhQBgBhLLAxJSGJ+9x854gjfB3duDqxLF6FRqYBTr0MYBH9q4flzLhFSW2NYECTmAZqelhERlnRdmo4TFSBjPvDYdK3VHoYI9Tr1eoEoFNy6DcL3wbE8cC2LG19+9SbYdjnCgK57yR4YYYSBoVIpYSYYxp6CcYQF58qVy8Pj9x41q/Pz1swsWDO/gzUzC/WZp3xbynhbGx39hN+5c3mp/whJFSC5I3p6wsQofmGa2fgO8DxvnfC8Quu9ruvXPyam+Y5748b5+okT4wAAmaNHt+kHDhySs7MP5/bs+a6ljbZhGLPxnVAYH3+ZABDu2qXX63U90qswRK5tvxZfPtmTJ9/Q9+49hLLZQQAA6TiP+c2b51tnAMVYaJr2NKQ0wmKWUg/fu9dMAJAA2NqxIxefBzwMVdRsbvKl7MhDMk2bpowtJBbSwIC16B9xbDeHOca8dlqQhvGMEOKvJTHFWCybHIC3mlfUiRNCYYg8ztcFnOeX3YSE2BlVfRGnfdEZ5e7fj5gS2sajhTKfb1jz85l4KyTGkmlalWlaNfB9PfA8FSkKBs4l0TRXIcSVGMtwGXA5IZqrOqKlZMUiswgxlrPfnV7ZbNbBY2NOYtou62rKZV5hrAGESPibhjQH0GiXfE3fBRIAzxaLKRWAdZo7B8ChXHbitK+JgVZNrC+XG7mBAStLqScVJVytYg+AV3TdRuVyY6Xkr/xtKEdG6OTkJF3caAAAU9PTstrdLdp5///09QfW7y3pqG5hVwAAAABJRU5ErkJggg==") 16 16, auto !important;
  }

  .site-shell:not(.has-cat) input,
  .site-shell:not(.has-cat) textarea,
  .site-shell:not(.has-cat) [contenteditable="true"] {
    cursor: text !important;
  }
}

/* Daily board ------------------------------------------------------------ */

.game-controls {
  grid-template-columns: minmax(0, 1fr) auto;
}

.game-controls .game-controls__board {
  min-width: 116px;
  padding: 0 17px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: lowercase;
}

.game-controls .game-controls__board:hover {
  background: var(--surface-2);
  filter: none;
}

.game-controls .game-controls__board:focus-visible,
.leaderboard-dialog button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
}

.leaderboard-dialog {
  position: fixed;
  inset: 0;
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 28px 76px rgba(18, 19, 17, .26);
  color: var(--ink);
}

.leaderboard-dialog:not([open]) {
  display: none;
}

.leaderboard-dialog:focus {
  outline: none;
}

.leaderboard-dialog::backdrop {
  background: rgba(19, 20, 18, .52);
  backdrop-filter: blur(5px);
}

.leaderboard-dialog__panel {
  display: flex;
  max-height: min(760px, calc(100dvh - 32px));
  flex-direction: column;
  background: var(--surface);
}

.leaderboard-dialog[open] .leaderboard-dialog__panel {
  animation: leaderboard-arrive .16s ease-out both;
}

.leaderboard-dialog__header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 16px;
  padding: 20px 14px 17px 20px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-dialog__heading {
  min-width: 0;
}

.leaderboard-dialog__eyebrow {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.leaderboard-dialog__eyebrow .micro-label {
  color: var(--ink);
}

.leaderboard-dialog__eyebrow time::before {
  margin-right: 9px;
  color: var(--line-dark);
  content: "/";
}

.leaderboard-dialog__header h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -.045em;
  line-height: 1;
}

.leaderboard-dialog__header p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.leaderboard-dialog__close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.leaderboard-dialog__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.leaderboard-dialog__body {
  min-height: 190px;
  padding: 12px 14px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-dark) transparent;
  scrollbar-width: thin;
}

.leaderboard-status {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .03em;
  line-height: 1.4;
  text-align: center;
  text-transform: lowercase;
}

.leaderboard-status[hidden],
.leaderboard-status:empty,
.leaderboard-status[data-state="ready"] {
  display: none;
}

.leaderboard-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-dark);
}

.leaderboard-status[data-state="loading"] i {
  animation: leaderboard-pulse .85s ease-in-out infinite alternate;
}

.leaderboard-status[data-state="empty"] {
  color: var(--muted);
}

.leaderboard-status[data-state="empty"] i {
  background: var(--line-dark);
}

.leaderboard-status[data-state="error"] {
  color: var(--accent-dark);
}

.leaderboard-status[data-state="error"] i {
  background: currentColor;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.leaderboard-status button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.leaderboard-status button:hover {
  color: var(--ink);
}

.leaderboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list > li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  min-height: 41px;
  gap: 10px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 84%, var(--surface-2));
}

.leaderboard-list > li[data-rank="1"] {
  min-height: 78px;
  padding: 10px 13px;
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent-dark);
}

.leaderboard-list > li[data-rank="2"],
.leaderboard-list > li[data-rank="3"] {
  grid-column: auto;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 62px;
  gap: 7px;
  padding: 8px;
  background: var(--surface-2);
}

.leaderboard-list > li[data-rank="2"] .leaderboard-row__identity small,
.leaderboard-list > li[data-rank="3"] .leaderboard-row__identity small {
  font-size: 10px;
}

.leaderboard-list > li.is-current {
  background: var(--accent-soft);
}

.leaderboard-row__rank {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.leaderboard-row__identity {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.leaderboard-row__identity strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row__identity small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row__score {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.leaderboard-list > li[data-rank="1"] .leaderboard-row__rank {
  font-size: 13px;
}

.leaderboard-list > li[data-rank="1"] .leaderboard-row__identity strong {
  font-size: 17px;
  font-weight: 720;
}

.leaderboard-list > li[data-rank="1"] .leaderboard-row__score {
  font-size: 20px;
}

.leaderboard-list > li[data-rank="2"] .leaderboard-row__identity strong,
.leaderboard-list > li[data-rank="3"] .leaderboard-row__identity strong {
  font-size: 14px;
  font-weight: 700;
}

.leaderboard-list > li[data-rank="2"] .leaderboard-row__score,
.leaderboard-list > li[data-rank="3"] .leaderboard-row__score {
  font-size: 15px;
}

.leaderboard-current {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  min-height: 62px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: var(--surface-2);
  box-shadow: 0 -8px 20px color-mix(in srgb, var(--surface) 86%, transparent);
}

.leaderboard-current__rank {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.leaderboard-current__identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.leaderboard-current__identity small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

html:not([data-theme="dark"]) .leaderboard-current__identity small {
  color: #57564f;
}

.leaderboard-current__identity strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-current__score {
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.leaderboard-current__result {
  display: grid;
  min-width: 76px;
  gap: 2px;
  justify-items: end;
}

.leaderboard-current__result small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.leaderboard-current__action {
  min-width: 112px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  font-size: 11.5px;
  font-weight: 680;
  cursor: pointer;
}

.leaderboard-current__action:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.leaderboard-dialog__footer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 48px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.leaderboard-dialog__footer p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-dialog__footer > span {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: baseline;
}

.leaderboard-dialog__footer small,
.leaderboard-dialog__footer strong {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-dialog__footer small {
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.leaderboard-dialog__footer strong {
  color: var(--ink);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .leaderboard-dialog {
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
}

html[data-theme="dark"] .leaderboard-dialog::backdrop {
  background: rgba(4, 5, 4, .74);
}

html.leaderboard-is-open,
html.leaderboard-is-open body {
  overflow: hidden;
}

@keyframes leaderboard-arrive {
  from { opacity: .7; transform: translateY(5px); }
}

@keyframes leaderboard-pulse {
  to { opacity: .32; transform: scale(.75); }
}

@media (max-width: 680px) {
  .leaderboard-dialog {
    inset: auto 0 0;
    width: 100%;
    max-height: min(88vh, 720px);
    max-height: min(88dvh, 720px);
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 13px 13px 0 0;
  }

  .leaderboard-dialog__panel {
    max-height: min(88vh, 720px);
    max-height: min(88dvh, 720px);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .leaderboard-dialog__header {
    padding: 17px max(10px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  }

  .leaderboard-dialog__header h2 {
    font-size: 27px;
  }

  .leaderboard-dialog__body {
    min-height: 160px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .leaderboard-dialog__footer {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .game-controls .game-controls__board {
    min-width: 104px;
    padding-right: 11px;
    padding-left: 11px;
  }
}

@media (max-width: 430px) {
  .leaderboard-list {
    grid-template-columns: 1fr;
  }

  .leaderboard-list > li[data-rank="2"],
  .leaderboard-list > li[data-rank="3"] {
    grid-column: 1;
    min-height: 52px;
  }

  .leaderboard-current {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .leaderboard-current__action {
    grid-column: 2 / 4;
    width: 100%;
  }

  .leaderboard-dialog__footer {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 14px;
  }

  .leaderboard-dialog__footer p {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard-dialog[open] .leaderboard-dialog__panel,
  .leaderboard-status[data-state="loading"] i {
    animation: none;
  }
}

/* Ranked course geometry: one 1000:560 stage at every viewport size. */
.game-shell {
  height: auto !important;
  grid-template-rows: auto auto 56px;
}

.game-arena {
  --arena-scale: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 560;
}

.runner-cat {
  width: calc(226px * var(--arena-scale));
  height: calc(126px * var(--arena-scale));
}

.runner-cat span {
  font-size: calc(76px * var(--arena-scale));
}

.toy-target,
.toy-target--yarn,
.toy-target--catnip {
  width: calc(80px * var(--arena-scale));
}

.toy-target--mouse { width: calc(88px * var(--arena-scale)); }
.toy-target--fish { width: calc(94px * var(--arena-scale)); }

@media (max-width: 560px) {
  .game-shell {
    grid-template-rows: auto auto minmax(54px, auto);
  }
}

/* Welcoming entry state --------------------------------------------------- */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 13px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: 700 11px/1 var(--mono);
  transform: translateY(-150%);
  transition: transform .15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.wallet__use i {
  display: inline-block;
  margin-left: 3px;
  font-style: normal;
  transition: transform .15s ease;
}

.wallet__use--demo:hover i,
.wallet__use--demo:focus-visible i {
  transform: translateX(2px);
}

.site-shell:not(.has-cat) .product {
  padding-top: clamp(30px, 5vh, 62px);
  padding-bottom: clamp(30px, 5vh, 62px);
}

.site-shell:not(.has-cat) .intro {
  position: relative;
  isolation: isolate;
  width: min(800px, 100%);
  gap: 21px;
  transform: translateY(clamp(-38px, -3vh, -20px));
}

.site-shell:not(.has-cat) .intro::before {
  position: absolute;
  z-index: -1;
  width: min(980px, 100vw);
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(173, 96, 77, .045), rgba(173, 96, 77, .014) 42%, transparent 72%);
  content: "";
  pointer-events: none;
}

.site-shell:not(.has-cat) .intro__copy {
  width: min(760px, 100%);
  gap: 14px;
}

.site-shell:not(.has-cat) .intro h1 {
  font-size: clamp(52px, 5.7vw, 74px);
}

.site-shell:not(.has-cat) .intro__copy p {
  max-width: 650px;
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 16px;
  line-height: 1.5;
}

.site-shell:not(.has-cat) .wallet {
  width: min(760px, 100%);
  gap: 14px;
  padding: 20px;
  border-color: color-mix(in srgb, var(--line-dark) 74%, var(--ink));
  background: rgba(251, 250, 246, .94);
  box-shadow: 0 22px 64px rgba(33, 29, 24, .09), inset 0 1px rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .site-shell:not(.has-cat) .wallet {
  border-color: rgba(240, 237, 227, .2);
  background: rgba(23, 24, 21, .94);
  box-shadow: 0 26px 76px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .035);
}

.site-shell:not(.has-cat) .wallet__heading {
  align-items: center;
  gap: 22px;
}

.site-shell:not(.has-cat) .wallet__heading h2 {
  font-size: 21px;
  line-height: 1.15;
}

.site-shell:not(.has-cat) .wallet__quick-actions {
  display: flex;
  min-width: 0;
  align-self: auto;
  gap: 8px !important;
  justify-items: initial;
}

.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use,
.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use:first-child,
.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use + .wallet__use {
  width: auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use:first-child {
  color: var(--muted);
}

.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use--demo {
  border-color: rgba(156, 106, 88, .42);
  background: rgba(156, 106, 88, .1);
  color: #835141;
}

html[data-theme="dark"] .site-shell:not(.has-cat) .wallet__quick-actions .wallet__use--demo {
  border-color: rgba(196, 134, 112, .38);
  background: rgba(196, 134, 112, .11);
  color: #d39983;
}

.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use:hover,
.site-shell:not(.has-cat) .wallet__quick-actions .wallet__use:focus-visible {
  border-color: var(--ink);
  background: var(--surface-2);
  color: var(--ink);
}

.site-shell:not(.has-cat) .wallet__control {
  grid-template-columns: minmax(0, 1fr) 108px;
  min-height: 52px;
  border-radius: 5px;
}

.site-shell:not(.has-cat) .wallet__control:focus-within {
  border-color: #a76550;
  box-shadow: 0 0 0 3px rgba(173, 96, 77, .14);
}

.site-shell:not(.has-cat) .wallet__control input {
  font-size: 14px;
}

.site-shell:not(.has-cat) .wallet__control button {
  font-size: 14px;
}

.site-shell:not(.has-cat) .wallet__foot {
  min-height: 20px;
}

.site-shell:not(.has-cat) .wallet__foot small,
.site-shell:not(.has-cat) #wallet-status {
  font-size: 11px;
}

@media (max-width: 680px) {
  .site-shell:not(.has-cat) .product {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .site-shell:not(.has-cat) .intro {
    gap: 17px;
    transform: translateY(-12px);
  }

  .site-shell:not(.has-cat) .intro::before {
    width: 110vw;
    height: 390px;
  }

  .site-shell:not(.has-cat) .intro h1 {
    font-size: clamp(38px, 10.8vw, 52px);
  }

  .site-shell:not(.has-cat) .intro__copy p {
    max-width: 34ch;
    font-size: 14.5px;
  }

  .site-shell:not(.has-cat) .wallet {
    gap: 12px;
    padding: 15px;
  }

  .site-shell:not(.has-cat) .wallet__heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    justify-content: stretch;
  }

  .site-shell:not(.has-cat) .wallet__heading h2 {
    font-size: 19px;
  }

  .site-shell:not(.has-cat) .wallet__quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .site-shell:not(.has-cat) .wallet__quick-actions .wallet__use,
  .site-shell:not(.has-cat) .wallet__quick-actions .wallet__use:first-child,
  .site-shell:not(.has-cat) .wallet__quick-actions .wallet__use + .wallet__use {
    width: 100%;
    min-height: 44px;
  }

  .site-shell:not(.has-cat) .wallet__control {
    grid-template-columns: minmax(0, 1fr) 94px;
    min-height: 50px;
  }

  .site-shell:not(.has-cat) .wallet__control input {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 16px;
  }

  .site-shell:not(.has-cat) .wallet__control button {
    font-size: 13px;
  }

  .site-shell:not(.has-cat) .wallet__foot {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .wallet__use i {
    transition: none;
  }
}
