@font-face {
  font-family: "VT323";
  src: url("assets/fonts/vt323-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #0a1730;
  --paper: #fff6df;
  --sea1: #1b4fb0;
  --sea2: #2f6fd6;
  --sand1: #d8b25c;
  --sand2: #c79a3f;
  --gulp-yellow: #ffcf3f;
  --gulp-red: #c0392b;
  --panel-bg: #123a7a;
  --radius: 0px;
  --font-display: "VT323", "Courier New", monospace;
  --font-body: "Space Mono", "Courier New", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  image-rendering: pixelated;
}
body.no-js { overflow: auto; height: auto; }
img { max-width: 100%; display: block; image-rendering: pixelated; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--paper); color: var(--ink); padding: 10px 16px;
}
.skip-link:focus { left: 0; }

/* ---------- custom pixel cursor ---------- */
@media (pointer: fine) {
  body.cursor-ready, body.cursor-ready a, body.cursor-ready button { cursor: none; }
}
#cursorSprite {
  position: fixed; top: 0; left: 0; width: 48px; height: 48px;
  transform: translate(-999px, -999px);
  background: url("assets/cursor-fry.png") center/contain no-repeat;
  image-rendering: pixelated;
  pointer-events: none; z-index: 9998;
}
#cursorSprite.stolen { background-image: url("assets/cursor-hand.png"); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: repeating-linear-gradient(90deg, #0a1730 0 8px, #0d1e3d 8px 16px);
  border-bottom: 3px solid var(--gulp-yellow);
  font-family: var(--font-display); font-size: 20px;
}
.hud-left { display: flex; align-items: center; gap: 8px; }
.hud-mark {
  width: 20px; height: 20px;
  background: var(--gulp-yellow);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}
.hud-word { color: var(--gulp-yellow); letter-spacing: 0.02em; }
.hud-mid { display: flex; align-items: baseline; gap: 8px; margin-left: 10px; }
.hud-label { font-size: 13px; font-family: var(--font-body); opacity: 0.75; }
.hud-value { color: var(--paper); font-size: 22px; }
.hud-nav { display: flex; gap: 4px; margin-left: auto; }
.hud-nav button {
  background: none; border: 2px solid transparent; color: var(--paper);
  font-family: var(--font-display); font-size: 18px; padding: 4px 10px; cursor: pointer;
}
.hud-nav button:hover { border-color: var(--gulp-yellow); color: var(--gulp-yellow); }
@media (max-width: 760px) { .hud-nav { display: none; } .hud-mid { margin-left: 4px; } }

.ca-pill {
  display: flex; align-items: center; gap: 6px;
  background: #06122a; border: 2px solid var(--gulp-yellow);
  padding: 4px 10px; font-family: var(--font-body); font-size: 11px; color: var(--paper);
  cursor: pointer;
}
.ca-pill span:first-child { opacity: 0.6; }
.ca-pill.is-copied { background: var(--gulp-yellow); color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px;
  padding: 10px 22px; border: 3px solid var(--ink); text-decoration: none;
  cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s linear, box-shadow 0.08s linear;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--gulp-yellow); color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-text { background: none; border-color: transparent; box-shadow: none; text-decoration: underline; color: var(--paper); opacity: 0.8; }
.btn-text:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- horizontal arcade track ---------- */
#viewport {
  position: fixed; inset: 0; overflow: hidden;
  padding-top: 54px;
}
#track {
  display: flex; height: 100%; width: max-content;
  will-change: transform;
}
.panel {
  width: 100vw; height: 100%; flex: none;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px clamp(16px, 5vw, 60px);
  overflow-y: auto;
}
body.no-js .panel { height: auto; min-height: 60vh; }

/* ---------- hero ---------- */
#hero { text-align: center; background: var(--panel-bg); }
.boardwalk-sky {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(var(--sea1), var(--sea1)) 0 0 / 100% 80%,
    repeating-linear-gradient(90deg, var(--sand1) 0 24px, var(--sand2) 24px 48px) 0 80% / 100% 20%;
  background-repeat: no-repeat;
  opacity: 0.55;
}
.hero-stage { position: relative; z-index: 1; width: min(58vw, 360px); margin-bottom: 6px; }
.hero-bird {
  width: 100%;
  filter: drop-shadow(6px 6px 0 rgba(4, 10, 24, 0.55));
}
.hero-bird { animation: heroBob 1.8s steps(4) infinite; }
@keyframes heroBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.ticker {
  position: relative; z-index: 1;
  font-size: clamp(64px, 14vw, 148px);
  line-height: 0.85;
  color: var(--gulp-yellow);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 14px;
}
.hero-sub { position: relative; z-index: 1; font-size: 15px; opacity: 0.9; max-width: 42ch; margin: 0 0 4px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.panel-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--font-display); font-size: 18px; opacity: 0.7; z-index: 1; }

/* ---------- shared section chrome ---------- */
.section-kicker { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gulp-yellow); text-align: center; margin-bottom: 6px; }
.section-title { font-size: clamp(36px, 6vw, 64px); text-align: center; margin-bottom: 18px; }
.section-title.small { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }

/* ---------- flock cards (pixel-bracket frame, no glow) ---------- */
#flock { background: var(--panel-bg); }
.flock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1100px; width: 100%; }
@media (max-width: 900px) { .flock-grid { grid-template-columns: repeat(2, 1fr); } }
.flock-card { text-align: center; }
.pixel-frame {
  position: relative; padding: 8px; background: #06122a;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 3px var(--ink), 5px 5px 0 var(--ink);
}
.pixel-frame::before, .pixel-frame::after,
.pixel-frame > img { display: block; width: 100%; }
.pixel-frame {
  clip-path: polygon(
    0 10px, 10px 10px, 10px 0,
    calc(100% - 10px) 0, calc(100% - 10px) 10px, 100% 10px,
    100% calc(100% - 10px), calc(100% - 10px) calc(100% - 10px), calc(100% - 10px) 100%,
    10px 100%, 10px calc(100% - 10px), 0 calc(100% - 10px)
  );
}
.flock-name { font-family: var(--font-display); font-size: 24px; margin: 10px 0 2px; text-transform: uppercase; color: var(--gulp-yellow); }
.flock-tag { font-size: 12px; opacity: 0.8; margin: 0 0 8px; min-height: 2.4em; }
.flock-stats { display: flex; flex-direction: column; gap: 4px; font-size: 10px; text-align: left; }
.flock-stats span { display: flex; align-items: center; gap: 6px; }
.flock-stats i { flex: 1; height: 8px; background: #06122a; border: 1px solid var(--paper); position: relative; }
.flock-stats i::after { content: ""; position: absolute; inset: 1px; width: var(--v); background: var(--gulp-red); }

/* ---------- minigame ---------- */
.panel-game { background: var(--panel-bg); }
.game-hud { width: 100%; max-width: 900px; text-align: center; }
.game-stats { display: flex; gap: 20px; justify-content: center; font-family: var(--font-display); font-size: 20px; margin-bottom: 10px; }
.game-stats b { color: var(--gulp-yellow); }
.game-field {
  position: relative; width: min(92vw, 900px); height: min(48vh, 420px);
  background: repeating-linear-gradient(45deg, #0d2454 0 12px, #0a1c40 12px 24px);
  border: 3px solid var(--paper);
  margin-top: 12px; cursor: none;
  overflow: hidden;
}
.game-idle-hint { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; opacity: 0.7; margin: 0; text-align: center; padding: 0 20px; }
.food-crumb {
  position: absolute; width: 14px; height: 14px; background: var(--gulp-yellow);
  border: 2px solid var(--ink); transform: translate(-50%, -50%);
  pointer-events: none;
}
.game-result {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(4, 10, 24, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px; text-align: center;
}
.game-result[hidden] { display: none; }
.game-rank { font-family: var(--font-display); font-size: 44px; color: var(--gulp-yellow); margin: 0; }
.game-rank-sub { margin: 0 0 6px; opacity: 0.8; font-size: 13px; }
#resultCanvas { width: min(48vw, 220px); border: 3px solid var(--paper); }
.game-result-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sign-wrap { margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.no-feeding-sign {
  background: var(--paper); color: var(--ink); border: 4px solid var(--gulp-red);
  padding: 10px 16px; font-family: var(--font-display);
}
.no-feeding-sign p { margin: 0; font-size: 20px; line-height: 1.05; text-align: center; }
.dont-click-btn {
  background: var(--gulp-red); color: var(--paper); border: 3px solid var(--ink);
  font-family: var(--font-display); font-size: 16px; padding: 10px 16px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.dont-click-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

/* full-screen easter egg blackout */
#blackout {
  position: fixed; inset: 0; z-index: 9000; background: #030712;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s linear;
  text-align: center; padding: 20px;
}
#blackout.is-on { opacity: 1; pointer-events: auto; }
#blackout .feather-field {
  position: absolute; inset: 0; overflow: hidden;
}
#blackout .feather {
  position: absolute; width: 26px; height: 26px;
  background: url("assets/sprite-runner-a.png") center/contain no-repeat;
  image-rendering: pixelated; opacity: 0;
}
#blackout.is-on .feather { animation: featherFall 1.1s steps(6) forwards; }
@keyframes featherFall {
  0% { opacity: 0; transform: translateY(-40px) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 1; transform: translateY(60vh) rotate(180deg); }
}
#blackout .ca-reveal {
  position: relative; z-index: 2; background: var(--paper); color: var(--ink);
  border: 4px solid var(--gulp-yellow); padding: 22px 26px; font-family: var(--font-display);
  font-size: 22px; max-width: 90vw; word-break: break-all;
}

/* ---------- tokenomics menu board ---------- */
#tokenomics { background: var(--panel-bg); }
.menu-board {
  width: min(90vw, 640px);
  background: #06122a; border: 4px double var(--gulp-yellow);
  padding: 28px clamp(16px, 4vw, 34px);
}
.menu-line {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display); font-size: 22px;
  padding: 8px 0; text-transform: uppercase;
}
.menu-line span:first-child { white-space: nowrap; }
.menu-line span:last-child { white-space: nowrap; color: var(--gulp-yellow); }
.menu-line i {
  flex: 1; border-bottom: 2px dotted rgba(255,246,223,0.5); height: 0; margin: 0 4px 6px;
}
.menu-special span:last-child { color: var(--gulp-red); }

/* ---------- how to buy tickets ---------- */
#buy { background: var(--panel-bg); }
.ticket-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 1000px; margin-bottom: 30px; }
.ticket {
  width: 190px; background: var(--paper); color: var(--ink);
  padding: 16px 14px; text-align: center; position: relative;
  clip-path: polygon(
    0 0, 100% 0, 100% 100%, 0 100%,
    0 60%, 6px 55%, 0 50%, 6px 45%, 0 40%
  );
}
.ticket-num { display: inline-block; font-family: var(--font-display); font-size: 26px; background: var(--gulp-red); color: var(--paper); width: 30px; height: 30px; line-height: 30px; margin-bottom: 8px; }
.ticket p { font-family: var(--font-display); font-size: 18px; margin: 0 0 4px; text-transform: uppercase; }
.ticket small { font-size: 10px; opacity: 0.75; }
.buy-ca-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  background: #06122a; border: 3px solid var(--paper); padding: 10px 10px 10px 18px;
  font-family: var(--font-display); font-size: 16px;
}
.buy-ca-value { font-family: var(--font-body); font-size: 12px; background: #0a1730; color: var(--paper); border: 2px solid var(--gulp-yellow); padding: 8px 12px; cursor: pointer; }

/* ---------- footer sign panel ---------- */
.panel-footer { background: var(--panel-bg); }
.footer-sign {
  background: var(--paper); color: var(--ink); border: 6px solid var(--gulp-red);
  padding: 30px clamp(20px, 5vw, 46px); text-align: center; max-width: 480px;
}
.footer-sign-title { font-family: var(--font-display); font-size: 34px; margin: 0; letter-spacing: 0.02em; }
.footer-sign-sub { font-size: 12px; opacity: 0.7; margin: 2px 0 18px; }
.footer-socials { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; }
.social-slot {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink);
  display: grid; place-items: center; position: relative; color: var(--ink);
}
.social-slot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 3px solid var(--gulp-red); clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%);
  transform: rotate(45deg); opacity: 0; transition: opacity 0.15s;
}
.footer-ca { font-family: var(--font-body); font-size: 10px; opacity: 0.75; word-break: break-all; }
.footer-disclaimer { font-size: 10px; opacity: 0.55; margin-top: 10px; }

/* ---------- progress dots ---------- */
.panel-dots {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 400;
  display: flex; gap: 8px;
}
.panel-dots span {
  width: 10px; height: 10px; background: rgba(255,246,223,0.35); border: 2px solid var(--ink);
}
.panel-dots span.is-active { background: var(--gulp-yellow); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-bird { animation: none; }
  #blackout.is-on .feather { animation: none; opacity: 0.9; }
  #track { transition: none !important; }
}
