/* ═══════════════════════════════════════════════
   uSIGN — 1-bit pixel, dithered, serious
   ═══════════════════════════════════════════════ */

@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/pressstart2p-latin.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("assets/fonts/vt323-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #141414;
  --paper: #f7f5ef;
  --mid: #b9b6ac;
  --px: "Press Start 2P", monospace;
  --body: "VT323", monospace;
  --d25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23141414'/%3E%3C/svg%3E");
  --d50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23141414'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23141414'/%3E%3C/svg%3E");
  --d25-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23b9b6ac'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-anchor: none; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.35;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
}

/* film grain */
body::after {
  content: "";
  position: fixed; inset: -50px;
  pointer-events: none;
  z-index: 200;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-18px, 12px); }
  66% { transform: translate(14px, -20px); }
  100% { transform: translate(0, 0); }
}

::selection { background: var(--ink); color: var(--paper); }

img, canvas, svg { image-rendering: pixelated; }
a { color: inherit; }

/* ── type helpers ─────────────────────────────── */
.px { font-family: var(--px); line-height: 1.6; }

/* ── nav: a contained sharp bar ───────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: center;
  padding: 14px 12px 0;
  background: linear-gradient(var(--paper) 82%, transparent);
}
.nav-inner {
  display: flex; align-items: center; gap: 22px;
  width: min(980px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 10px 10px 10px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: var(--ink);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--px); font-size: 15px; letter-spacing: 1px; }
.nav-links { display: flex; gap: 18px; margin-left: 8px; }
.nav-links a {
  text-decoration: none; font-size: 21px; letter-spacing: 0.5px;
  border-bottom: 2px solid transparent; padding-bottom: 1px;
}
.nav-links a:hover { border-bottom-color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── pixel buttons ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--px); font-size: 13px; letter-spacing: 0.5px;
  color: var(--ink); text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 13px 20px 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: none;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-big { font-size: 15px; padding: 17px 28px 16px; box-shadow: 6px 6px 0 var(--ink); }
.btn-big:hover { box-shadow: 7px 7px 0 var(--ink); }
.btn-locked { opacity: 0.5; cursor: not-allowed; }
.btn-locked:hover, .btn-locked:active { transform: none; box-shadow: 4px 4px 0 var(--ink); }

.icon-btn {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer; padding: 0;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
a.icon-btn { text-decoration: none; }
.hidden { display: none !important; }

/* ── hero ─────────────────────────────────────── */
.hero {
  max-width: 900px; margin: 0 auto;
  padding: 56px 16px 24px;
  text-align: center;
  position: relative;
}
.tagline {
  font-family: var(--px); font-size: 11px; letter-spacing: 1px;
  display: inline-block;
  padding: 8px 14px 7px;
  border: 2px solid var(--ink);
  background: var(--paper);
  margin-bottom: 30px;
}
h1.title {
  font-family: var(--px);
  font-size: clamp(19px, 4.4vw, 40px);
  line-height: 1.55;
  margin: 0 0 26px;
  text-transform: uppercase;
}
h1 .inv {
  background: var(--ink); color: var(--paper);
  padding: 3px 8px 2px;
  display: inline-block;
}
.sub {
  max-width: 640px; margin: 0 auto 34px;
  font-size: 25px; line-height: 1.3;
}
.cta-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.stat-strip {
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 30px;
  font-family: var(--px); font-size: 9px; letter-spacing: 1px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 16px 8px;
  flex-wrap: wrap; justify-content: center;
}
.stat-strip i { font-style: normal; opacity: 0.4; }

/* the mascot */
.mascot { display: inline-block; }
.mascot-hero {
  position: absolute;
  right: clamp(0px, 6vw, 90px);
  top: 148px;
  z-index: 1;
  animation: mascotBob 2.8s steps(2) infinite;
}
@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.footer .mascot { margin-bottom: 12px; }

/* graduated ruler strip, like a sign workshop bench */
.ruler {
  margin-top: 56px;
  height: 16px;
  border-top: 3px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 50px);
  background-size: 100% 6px, 100% 12px;
  background-repeat: no-repeat;
  background-position: 0 0, 0 0;
}

/* dithered clouds, like the reference art, drifting in steps */
.cloud {
  position: absolute; z-index: -1;
  opacity: 0.75;
  pointer-events: none;
  animation: drift 46s steps(46) infinite alternate;
}
.cloud:nth-of-type(2) { animation-duration: 60s; animation-direction: alternate-reverse; }
.cloud-c { animation-duration: 38s; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(46px); }
}

/* blinking pixel stars */
.pxstar {
  position: absolute; z-index: -1;
  font-family: var(--px); font-size: 11px;
  color: var(--ink);
  pointer-events: none;
  animation: twinkle 2.6s steps(2) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.8; }
}

/* blinking caret */
.caret {
  display: inline-block;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ── the board ────────────────────────────────── */
.board-wrap {
  max-width: 980px;
  margin: 30px auto 0;
  padding: 0 16px;
}
.board-shell {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}
.board-hud {
  display: flex; align-items: center; gap: 16px;
  border-bottom: 3px solid var(--ink);
  padding: 12px 14px;
  flex-wrap: wrap;
}
.hud-title { font-family: var(--px); font-size: 13px; letter-spacing: 1px; }
.hud-bar {
  flex: 1 1 160px;
  height: 18px;
  border: 2px solid var(--ink);
  padding: 2px;
  display: flex; gap: 2px;
  min-width: 140px;
}
.hud-bar i {
  flex: 1;
  background: var(--ink);
}
.hud-bar i.off { background: transparent; }
.hud-slots { font-size: 21px; white-space: nowrap; }
.hud-hearts { display: flex; gap: 6px; }
.hud-hearts svg {
  width: 18px; height: 18px;
  animation: hop 3.2s steps(2) infinite;
}
.hud-hearts svg:nth-child(2) { animation-delay: 0.4s; }
.hud-hearts svg:nth-child(3) { animation-delay: 0.8s; }
@keyframes hop {
  0%, 90%, 100% { transform: translateY(0); }
  94% { transform: translateY(-2px); }
}

.board-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.board-stage {
  position: relative;
  padding: 16px;
  border-right: 3px solid var(--ink);
  background:
    var(--d25-light);
  background-size: 8px 8px;
}
/* live stat chips floating on the stage */
.chip {
  position: absolute;
  font-family: var(--px); font-size: 8px; letter-spacing: 0.5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 8px 5px;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100% - 40px);
  overflow: hidden; text-overflow: ellipsis;
}
.chip::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--ink);
  margin-right: 6px;
  animation: caret 1.2s steps(1) infinite;
}
.chip-tl { top: 8px; left: 8px; }
.chip-br { bottom: 8px; right: 8px; }
#board-canvas, #app-board-canvas {
  display: block;
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--ink);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='%23141414'%3E%3Crect x='8' y='0' width='2' height='6'/%3E%3Crect x='8' y='12' width='2' height='6'/%3E%3Crect x='0' y='8' width='6' height='2'/%3E%3Crect x='12' y='8' width='6' height='2'/%3E%3C/g%3E%3Cg fill='%23f7f5ef'%3E%3Crect x='8' y='2' width='2' height='2'/%3E%3Crect x='8' y='14' width='2' height='2'/%3E%3Crect x='2' y='8' width='2' height='2'/%3E%3Crect x='14' y='8' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") 9 9, crosshair;
}
.board-side {
  display: flex; flex-direction: column;
  min-width: 0;
}

/* inspector */
.inspector {
  border-bottom: 3px solid var(--ink);
  padding: 14px 16px;
  min-height: 264px;
}
.ins-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.ins-slot { font-family: var(--px); font-size: 14px; }
.ins-state {
  font-family: var(--px); font-size: 9px; letter-spacing: 1px;
  padding: 5px 8px 4px;
  border: 2px solid var(--ink);
}
.ins-state.auction { background: var(--ink); color: var(--paper); }
.ins-rows { display: flex; flex-direction: column; gap: 3px; }
.ins-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 22px;
  border-bottom: 2px dotted var(--mid);
}
.ins-row .k { opacity: 0.65; }
.ins-row .v { text-align: right; white-space: nowrap; }
.ins-row .v.warn { animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.ins-empty {
  font-size: 22px; opacity: 0.6;
  padding: 30px 8px; text-align: center;
}
.ins-actions { margin-top: 12px; display: flex; gap: 10px; }
.ins-actions .btn { font-size: 11px; padding: 11px 14px 10px; flex: 1; }

/* event log */
.log {
  flex: 1;
  padding: 12px 16px 14px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  min-height: 170px;
}
.log-title {
  font-family: var(--px); font-size: 10px; letter-spacing: 1px;
  opacity: 0.7; margin-bottom: 8px;
}
.log-lines { display: flex; flex-direction: column; gap: 2px; font-size: 20px; }
.log-lines div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-lines div:first-child { animation: logIn 0.25s steps(2); }
@keyframes logIn { from { opacity: 0; } }

/* counters */
.counters {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 3px solid var(--ink);
}
.counter {
  padding: 14px 10px 12px;
  text-align: center;
  border-right: 3px solid var(--ink);
}
.counter:last-child { border-right: none; }
.counter b {
  display: block;
  font-family: var(--px); font-weight: 400;
  font-size: clamp(12px, 2.2vw, 18px);
  margin-bottom: 6px;
}
.counter span { font-size: 19px; opacity: 0.65; letter-spacing: 0.5px; }
.board-note {
  text-align: center;
  font-size: 20px;
  opacity: 0.6;
  margin: 12px 0 0;
}

/* ── ticker ───────────────────────────────────── */
.ticker {
  margin-top: 0;
  background: var(--ink); color: var(--paper);
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.ticker-track {
  display: inline-flex; align-items: center; gap: 34px;
  white-space: nowrap;
  padding: 12px 0 10px;
  font-family: var(--px); font-size: 11px; letter-spacing: 1px;
  animation: tick 36s linear infinite;
  will-change: transform;
}
.ticker-track i { font-style: normal; opacity: 0.5; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── sections ─────────────────────────────────── */
.section {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 16px 10px;
  scroll-margin-top: 80px;
}
.sec-head { margin-bottom: 34px; position: relative; }
.sec-bg {
  position: absolute; right: -8px; top: -44px;
  font-family: var(--px);
  font-size: clamp(80px, 16vw, 150px);
  color: var(--mid);
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}
.sec-kicker {
  font-family: var(--px); font-size: 10px; letter-spacing: 2px;
  opacity: 0.55; margin-bottom: 12px;
}
.sec-head h2 {
  font-family: var(--px); font-weight: 400;
  font-size: clamp(18px, 3.4vw, 28px);
  margin: 0;
  text-transform: uppercase;
}
.sec-head p { font-size: 24px; margin: 12px 0 0; max-width: 640px; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 18px 16px;
  position: relative;
}
/* corner rivets, the signboard signature */
.rule, .panel {
  background-image:
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 4px 4px;
  background-repeat: no-repeat;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
}
.panel-dark {
  background-image:
    linear-gradient(var(--paper), var(--paper)), linear-gradient(var(--paper), var(--paper)),
    linear-gradient(var(--paper), var(--paper)), linear-gradient(var(--paper), var(--paper));
}
.rule-ic {
  width: 28px; height: 28px;
  display: block;
  margin-bottom: 10px;
}
.rule-num {
  font-family: var(--px); font-size: 11px;
  background: var(--ink); color: var(--paper);
  display: inline-block;
  padding: 6px 9px 5px;
  margin-bottom: 14px;
}
.rule h3 {
  font-family: var(--px); font-weight: 400; font-size: 13px;
  line-height: 1.7;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.rule p { margin: 0; font-size: 22px; line-height: 1.3; }
.rule p b { font-weight: 400; background: var(--ink); color: var(--paper); padding: 0 4px; }

.panel {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px 22px 18px;
  margin-top: 18px;
}
.panel h3 {
  font-family: var(--px); font-weight: 400; font-size: 13px;
  margin: 0 0 12px; text-transform: uppercase;
}
.panel p { font-size: 23px; margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.panel-dark { background: var(--ink); color: var(--paper); }

/* the equilibrium formula */
.formula {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 26px 16px 22px;
}
.formula .f {
  font-family: var(--px); font-size: clamp(16px, 3.4vw, 26px);
}
.formula .f small { font-size: 0.55em; vertical-align: sub; }
.legend {
  display: flex; gap: 26px; flex-wrap: wrap; justify-content: center;
  font-size: 21px; opacity: 0.85;
}
.legend b { font-family: var(--px); font-size: 12px; font-weight: 400; }

/* lifecycle flow */
.flow {
  display: flex; align-items: stretch; gap: 0;
  flex-wrap: wrap;
  margin-top: 18px;
}
.flow-step {
  flex: 1 1 120px;
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 14px 10px 12px;
  text-align: center;
  position: relative;
  margin-right: 26px;
}
.flow-step:last-child { margin-right: 0; }
.flow-step::after {
  content: "";
  position: absolute; right: -22px; top: 50%;
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 13px solid var(--ink);
  transform: translateY(-50%);
}
.flow-step:last-child::after { display: none; }
.flow-step { animation: flowPulse 6s steps(1) infinite; }
.flow-step:nth-child(1) { animation-delay: 0s; }
.flow-step:nth-child(2) { animation-delay: 1.2s; }
.flow-step:nth-child(3) { animation-delay: 2.4s; }
.flow-step:nth-child(4) { animation-delay: 3.6s; }
.flow-step:nth-child(5) { animation-delay: 4.8s; }
@keyframes flowPulse {
  0%, 18% { outline: 3px solid var(--ink); outline-offset: 3px; }
  19%, 100% { outline: 3px solid transparent; outline-offset: 3px; }
}
.flow-step b {
  display: block;
  font-family: var(--px); font-weight: 400; font-size: 10px;
  line-height: 1.7; text-transform: uppercase;
  margin-bottom: 6px;
}
.flow-step span { font-size: 19px; opacity: 0.7; display: block; line-height: 1.2; }
.flow-step.dark { background: var(--ink); color: var(--paper); }

/* split table */
.split { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 22px; }
.split th, .split td { border: 2px solid var(--ink); padding: 8px 12px 6px; text-align: left; }
.split th { font-family: var(--px); font-size: 10px; letter-spacing: 1px; background: var(--ink); color: var(--paper); }

/* ── footer ───────────────────────────────────── */
.footer {
  margin-top: 80px;
  border-top: 3px solid var(--ink);
  padding: 34px 16px 44px;
  text-align: center;
}
.footer .brand-mark { margin: 0 auto 14px; width: 40px; height: 40px; }
.footer .brand-mark svg { width: 30px; height: 30px; }
.footer-line { font-family: var(--px); font-size: 12px; line-height: 1.9; margin: 0 0 8px; text-transform: uppercase; }
.footer-small { font-size: 20px; opacity: 0.6; margin: 0; }

/* ── toasts ───────────────────────────────────── */
.toasts {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 90; pointer-events: none;
  max-width: 92vw;
}
.toast {
  font-family: var(--px); font-size: 11px; line-height: 1.6;
  background: var(--ink); color: var(--paper);
  border: 3px solid var(--ink);
  outline: 2px solid var(--paper); outline-offset: -5px;
  padding: 12px 18px 11px;
  animation: tIn 0.2s steps(2);
  text-align: center;
}
@keyframes tIn { from { transform: translateY(-8px); opacity: 0; } }
.toast.out { opacity: 0; transition: opacity 0.2s steps(2); }

/* ══ app page ══ */
.app-wrap {
  max-width: 980px; margin: 0 auto;
  padding: 26px 16px 30px;
  display: flex; flex-direction: column; gap: 22px;
}
.banner {
  display: flex; gap: 14px; align-items: flex-start;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px 18px 14px;
  font-size: 23px;
}
.banner svg { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.banner b { font-family: var(--px); font-size: 12px; }
.badge {
  font-family: var(--px); font-size: 9px; letter-spacing: 1px;
  background: var(--ink); color: var(--paper);
  padding: 6px 9px 5px;
  white-space: nowrap;
}
.tag {
  font-family: var(--px); font-size: 8px; letter-spacing: 1px;
  border: 2px solid var(--ink);
  padding: 4px 7px 3px;
  white-space: nowrap;
}
.tag-dark { background: var(--ink); color: var(--paper); }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field label { font-family: var(--px); font-size: 9px; letter-spacing: 1px; opacity: 0.65; }
.input-row {
  display: flex; align-items: center; gap: 10px;
  border: 3px solid var(--ink);
  padding: 8px 12px;
}
.input-row input {
  flex: 1; min-width: 0;
  font-family: var(--body); font-size: 24px;
  background: none; border: none; outline: none; color: var(--ink);
}
.input-row .unit { font-family: var(--px); font-size: 10px; opacity: 0.6; }
.lock-note {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px;
  border: 2px dashed var(--ink);
  padding: 10px 12px;
  margin-top: 12px;
}
.lock-note svg { width: 18px; height: 18px; flex: none; }

.kv { display: flex; flex-direction: column; gap: 4px; }
.kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 22px;
  border-bottom: 2px dotted var(--mid);
  padding-bottom: 3px;
}
.kv-row .k { opacity: 0.65; }
.kv-empty { font-size: 22px; opacity: 0.6; text-align: center; padding: 24px 6px; }

/* wallet modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(20, 20, 20, 0.55);
  display: grid; place-items: center;
  padding: 14px;
}
.modal {
  width: min(420px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 20px;
}
.modal h2 { font-family: var(--px); font-weight: 400; font-size: 14px; margin: 0 0 8px; text-transform: uppercase; }
.modal .modal-sub { font-size: 21px; opacity: 0.75; margin: 0 0 16px; }
.w-opt {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: var(--px); font-size: 11px; color: var(--ink);
  text-align: left;
}
.w-opt:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.w-opt:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.w-opt:disabled { opacity: 0.45; cursor: not-allowed; }
.w-opt .w-name { flex: 1; }
.w-opt .w-note { font-size: 8px; opacity: 0.6; }
.modal-close {
  width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: var(--px); font-size: 10px; color: var(--ink); opacity: 0.6;
  padding: 8px; margin-top: 2px;
}
.modal-close:hover { opacity: 1; }
.status-dot { width: 8px; height: 8px; background: var(--paper); display: inline-block; margin-right: 8px; }

/* ── stepped reveals ─────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(10px); }
  .reveal.in { animation: stamp 0.3s steps(3) forwards; }
}
@keyframes stamp {
  0% { opacity: 0; transform: translateY(10px); }
  60% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* app launch status */
.standby {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--ink);
  margin-right: 8px;
  animation: caret 1.1s steps(1) infinite;
}

/* ── responsive ───────────────────────────────── */
@media (max-width: 860px) {
  .board-main { grid-template-columns: 1fr; }
  .board-stage { border-right: none; border-bottom: 3px solid var(--ink); }
  .rules { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .counters { grid-template-columns: 1fr; }
  .counter { border-right: none; border-bottom: 3px solid var(--ink); }
  .counter:last-child { border-bottom: none; }
}
@media (max-width: 900px) {
  .mascot-hero { position: static; display: block; margin: 0 auto 18px; animation: mascotBob 2.8s steps(2) infinite; }
}
@media (max-width: 520px) {
  body { font-size: 20px; }
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body::after, .ticker-track { animation: none !important; }
  html { scroll-behavior: auto; }
}
