:root {
  --pink-1: #ffe8f0;
  --pink-2: #ffc4d8;
  --pink-3: #f58aaf;
  --pink-4: #da5d8a;
  --ink: #2e2330;
  --muted: #6e5e70;
  --silver: #c8ced8;
  --panel: #fff7fa;
  --line: #3b283b;
  --shadow: #bd6a8e;
}

body.dark-theme {
  --pink-1: #08090b;
  --pink-2: #151719;
  --pink-3: #d11b3d;
  --pink-4: #9cff57;
  --ink: #f6f0e8;
  --muted: #7c8388;
  --silver: #252a2e;
  --panel: #101214;
  --line: #f6f0e8;
  --shadow: #d11b3d;
  color: var(--ink);
  background: #08090b;
}

body.dark-theme::before {
  background:
    linear-gradient(90deg, rgba(156, 255, 87, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(209, 27, 61, 0.06) 1px, transparent 1px),
    #08090b;
  background-size: 42px 42px, 42px 42px, auto;
}

body.dark-theme .ufo-field {
  display: none;
}

.card-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.card-field span {
  position: absolute;
  width: 54px;
  height: 76px;
  border: 2px solid rgba(246, 240, 232, 0.18);
  border-radius: 8px;
  background: rgba(18, 20, 22, 0.64);
  transform: rotate(-10deg);
}

.card-field span::before {
  position: absolute;
  top: 10px;
  left: 12px;
  content: "";
  width: 14px;
  height: 14px;
  background: #d11b3d;
  transform: rotate(45deg);
}

.card-field span:nth-child(1) { left: 8%; top: 14%; }
.card-field span:nth-child(2) { left: 24%; top: 76%; transform: rotate(11deg) scale(0.72); }
.card-field span:nth-child(3) { left: 64%; top: 9%; transform: rotate(8deg) scale(0.8); }
.card-field span:nth-child(4) { left: 84%; top: 34%; transform: rotate(-16deg) scale(0.66); }
.card-field span:nth-child(5) { left: 44%; top: 48%; transform: rotate(14deg) scale(0.58); }
.card-field span:nth-child(6) { left: 74%; top: 78%; transform: rotate(-7deg) scale(0.74); }
.card-field span:nth-child(7) { left: 4%; top: 84%; transform: rotate(6deg) scale(0.62); }
.card-field span:nth-child(8) { left: 92%; top: 10%; transform: rotate(16deg) scale(0.58); }

body.dark-theme .topbar {
  background: rgba(8, 9, 11, 0.92);
  border-bottom-color: rgba(156, 255, 87, 0.32);
}

body.dark-theme .brand-mark,
body.dark-theme .icon-button,
body.dark-theme .topbar nav a,
body.dark-theme button,
body.dark-theme input,
body.dark-theme select,
body.dark-theme .story-grid article,
body.dark-theme .game-panel,
body.dark-theme .leaderboard,
body.dark-theme .wallet-box,
body.dark-theme .chart-box,
body.dark-theme .airdrop-panel,
body.dark-theme .skin-card,
body.dark-theme .case-modal-card,
body.dark-theme .story-modal-card {
  color: #f6f0e8;
  border-color: #f6f0e8;
  background: #101214;
  box-shadow: 5px 5px 0 #d11b3d;
}

body.dark-theme .topbar nav a:hover,
body.dark-theme button:hover,
body.dark-theme .buy-link:hover,
body.dark-theme .airdrop-bot-link:hover,
body.dark-theme .arcade-tabs button.active,
body.dark-theme .leaderboard-tabs button.active,
body.dark-theme .market-tabs button.active {
  color: #08090b;
  background: #9cff57;
  box-shadow: 5px 5px 0 #f6f0e8;
}

body.dark-theme .hero {
  min-height: 92vh;
  background: #08090b;
}

body.dark-theme .hero h1 {
  color: #f6f0e8;
  text-shadow: 6px 6px 0 #d11b3d;
}

body.dark-theme .ticker,
body.dark-theme .eyebrow,
body.dark-theme .phase,
body.dark-theme .soon-tag,
body.dark-theme .market-balance strong,
body.dark-theme .airdrop-stats strong,
body.dark-theme .online-head span {
  color: #9cff57;
}

body.dark-theme .hero-portrait,
body.dark-theme .gallery figure,
body.dark-theme .airdrop-image {
  background: #101214;
  border-color: #f6f0e8;
  box-shadow: 12px 12px 0 #d11b3d;
}

body.dark-theme .chipi-portrait img,
body.dark-theme .gallery img,
body.dark-theme .airdrop-image img {
  filter: contrast(1.08) saturate(0.92);
}

body.dark-theme .gallery figcaption,
body.dark-theme footer {
  color: #f6f0e8;
  background: #101214;
  border-color: #f6f0e8;
}

body.dark-theme canvas {
  background: #08090b;
}

.blackjack-controls {
  display: grid;
  grid-template-columns: minmax(116px, 0.9fr) minmax(96px, 0.8fr) repeat(5, minmax(82px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.blackjack-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.blackjack-controls select,
.blackjack-controls input,
.blackjack-controls button {
  min-height: 44px;
  width: 100%;
  border: 2px solid #f6f0e8;
  color: #f6f0e8;
  background: #08090b;
}

.blackjack-controls button {
  cursor: pointer;
}

.blackjack-controls button:nth-of-type(3) {
  border-color: #9cff57;
}

.blackjack-controls button:nth-of-type(4) {
  border-color: #d11b3d;
}

.blackjack-meta {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 0.52fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.blackjack-meta p,
.blackjack-meta ul {
  min-height: 58px;
  margin: 0;
  padding: 12px;
  border: 2px solid rgba(246, 240, 232, 0.44);
  background: #0b0d0f;
}

.blackjack-meta ul {
  display: grid;
  gap: 8px;
  list-style: none;
}

.blackjack-meta li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #f6f0e8;
  font-size: 13px;
}

.blackjack-meta li span {
  color: #9cff57;
}

body.dark-theme .leaderboard li,
body.dark-theme .online-box li,
body.dark-theme .inventory-card,
body.dark-theme .history-card {
  color: #f6f0e8;
  background: #0b0d0f;
  border-color: rgba(246, 240, 232, 0.34);
}

body.dark-theme .pilot-score,
body.dark-theme .online-dot.playing,
body.dark-theme .skin-price {
  background: #9cff57;
  color: #08090b;
}

body.dark-theme .skin-tier,
body.dark-theme .online-dot {
  background: #d11b3d;
  color: #f6f0e8;
}

body.dark-theme .wallet,
body.dark-theme .airdrop,
body.dark-theme .market,
body.dark-theme .arcade,
body.dark-theme .story {
  background: transparent;
}

@media (max-width: 860px) {
  .blackjack-controls,
  .blackjack-meta {
    grid-template-columns: 1fr 1fr;
  }

  .blackjack-controls label,
  .blackjack-controls input {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .blackjack-controls,
  .blackjack-meta {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--pink-1);
  font-family: "Space Mono", monospace;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-color: #ffd0df;
  opacity: 1;
}

.ufo-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ufo-field span {
  position: absolute;
  width: 82px;
  height: 28px;
  opacity: 0.16;
  transform: rotate(-8deg);
}

.ufo-field span::before {
  position: absolute;
  left: 50%;
  top: 0;
  width: 36px;
  height: 22px;
  content: "";
  transform: translateX(-50%);
  border: 3px solid var(--line);
  border-bottom: 0;
  border-radius: 36px 36px 0 0;
  background: #fff7fa;
}

.ufo-field span::after {
  position: absolute;
  left: 0;
  top: 14px;
  width: 82px;
  height: 22px;
  content: "";
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--silver);
  box-shadow:
    18px 8px 0 -4px var(--pink-3),
    38px 8px 0 -4px var(--pink-3),
    58px 8px 0 -4px var(--pink-3);
}

.ufo-field span:nth-child(1) {
  left: 6%;
  top: 15%;
}

.ufo-field span:nth-child(2) {
  left: 22%;
  top: 6%;
  transform: rotate(9deg) scale(0.72);
}

.ufo-field span:nth-child(3) {
  left: 76%;
  top: 12%;
  transform: rotate(-12deg) scale(0.92);
}

.ufo-field span:nth-child(4) {
  left: 88%;
  top: 31%;
  transform: rotate(11deg) scale(0.64);
}

.ufo-field span:nth-child(5) {
  left: 12%;
  top: 46%;
  transform: rotate(-3deg) scale(0.78);
}

.ufo-field span:nth-child(6) {
  left: 52%;
  top: 37%;
  transform: rotate(8deg) scale(0.58);
}

.ufo-field span:nth-child(7) {
  left: 71%;
  top: 55%;
  transform: rotate(-9deg) scale(0.82);
}

.ufo-field span:nth-child(8) {
  left: 27%;
  top: 69%;
  transform: rotate(13deg) scale(0.66);
}

.ufo-field span:nth-child(9) {
  left: 84%;
  top: 78%;
  transform: rotate(-6deg) scale(0.74);
}

.ufo-field span:nth-child(10) {
  left: 4%;
  top: 84%;
  transform: rotate(7deg) scale(0.56);
}

.ufo-field span:nth-child(11) {
  left: 43%;
  top: 91%;
  transform: rotate(-11deg) scale(0.7);
}

.ufo-field span:nth-child(12) {
  left: 61%;
  top: 8%;
  transform: rotate(4deg) scale(0.52);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.42;
}

.noise::before,
.noise::after {
  position: absolute;
  width: 4px;
  height: 4px;
  content: "";
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    42px 76px 0 rgba(255, 255, 255, 0.78),
    138px 24px 0 rgba(255, 255, 255, 0.78),
    244px 108px 0 rgba(255, 255, 255, 0.78),
    336px 42px 0 rgba(255, 255, 255, 0.78),
    472px 132px 0 rgba(255, 255, 255, 0.78),
    608px 66px 0 rgba(255, 255, 255, 0.78),
    730px 156px 0 rgba(255, 255, 255, 0.78),
    860px 92px 0 rgba(255, 255, 255, 0.78),
    1010px 32px 0 rgba(255, 255, 255, 0.78),
    1150px 118px 0 rgba(255, 255, 255, 0.78);
}

.noise::after {
  top: 190px;
  left: 32px;
  background: rgba(70, 45, 70, 0.18);
  box-shadow:
    62px 72px 0 rgba(70, 45, 70, 0.18),
    190px 122px 0 rgba(70, 45, 70, 0.18),
    310px 42px 0 rgba(70, 45, 70, 0.18),
    440px 172px 0 rgba(70, 45, 70, 0.18),
    590px 84px 0 rgba(70, 45, 70, 0.18),
    716px 144px 0 rgba(70, 45, 70, 0.18),
    842px 60px 0 rgba(70, 45, 70, 0.18),
    970px 174px 0 rgba(70, 45, 70, 0.18),
    1104px 92px 0 rgba(70, 45, 70, 0.18),
    1234px 138px 0 rgba(70, 45, 70, 0.18);
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(255, 232, 240, 0.9);
  border-bottom: 2px solid rgba(59, 40, 59, 0.16);
  backdrop-filter: blur(6px);
}

.brand,
.topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark,
.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.topbar nav a {
  min-height: 34px;
  padding: 7px 10px;
  border: 2px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.topbar nav a:hover {
  transform: translate(2px, 2px);
  background: #ffd7e6;
  box-shadow: 2px 2px 0 var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 112px 20px 46px;
  place-items: center;
  text-align: center;
}

.hero-copy {
  animation: heroReveal 0.8s ease 2.1s both;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink-4);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "VT323", monospace;
  font-size: clamp(68px, 13vw, 142px);
  line-height: 0.78;
  letter-spacing: 0;
  text-shadow: 5px 5px 0 #fff;
}

.ticker {
  margin: 16px 0 10px;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
}

.hero-portrait {
  width: min(70vw, 340px);
  margin: 4px 0 18px;
  overflow: hidden;
  border: 3px solid var(--line);
  background: var(--pink-2);
  box-shadow: 12px 12px 0 var(--shadow);
  animation: portraitBeam 0.8s steps(6) 2.7s both;
}

.hero-portrait img {
  display: block;
  width: calc(100% + 10px);
  image-rendering: pixelated;
}

.ufo-arrival {
  position: absolute;
  top: 78px;
  left: 50%;
  width: 260px;
  height: 230px;
  transform: translateX(-50%);
  animation: ufoFlight 2.6s ease-in-out both;
}

.ufo {
  position: absolute;
  left: 50%;
  top: 0;
  width: 150px;
  height: 54px;
  transform: translateX(-50%);
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--silver);
  box-shadow: 8px 8px 0 var(--shadow);
}

.ufo::before {
  position: absolute;
  left: 38px;
  top: -25px;
  width: 70px;
  height: 44px;
  content: "";
  border: 3px solid var(--line);
  border-bottom: 0;
  border-radius: 70px 70px 0 0;
  background: #f9fbff;
}

.ufo span,
.ufo span::before,
.ufo span::after {
  position: absolute;
  bottom: 13px;
  width: 10px;
  height: 10px;
  content: "";
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--pink-3);
}

.ufo span {
  left: 42px;
}

.ufo span::before {
  left: 30px;
  bottom: -2px;
}

.ufo span::after {
  left: 60px;
  bottom: -2px;
}

.beam {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 170px;
  height: 180px;
  transform: translateX(-50%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  background: rgba(255, 247, 250, 0.64);
  animation: beamPulse 0.7s steps(2) 1.3s 2 both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  animation: heroReveal 0.8s ease 3s both;
}

.ufo-button,
.tg-button,
.buy-link,
.wallet-box button,
.game-top button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ufo-button:hover,
.tg-button:hover,
.buy-link:hover,
.wallet-box button:hover,
.game-top button:hover,
.icon-button:hover {
  transform: translate(3px, 3px);
  background: #ffd7e6;
  box-shadow: 2px 2px 0 var(--shadow);
}

.game-top button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
  box-shadow: 5px 5px 0 var(--shadow);
}

.game-top button.active {
  background: #ffd7e6;
}

.ship-icon {
  width: 28px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--silver);
}

.hover-alien {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: 172px;
  padding: 9px 10px;
  transform: translateX(-50%) translateY(8px);
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hover-alien::before {
  display: block;
  width: 36px;
  height: 24px;
  margin: 0 auto 6px;
  content: "";
  border: 2px solid var(--line);
  border-radius: 50% 50% 45% 45%;
  background: var(--silver);
  box-shadow: inset 9px 7px 0 #f399bb;
}

.ufo-button:hover .hover-alien {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: grid;
  width: 34px;
  height: 52px;
  transform: translateX(-50%);
  place-items: start center;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 247, 250, 0.7);
}

.scroll-cue span {
  width: 6px;
  height: 10px;
  margin-top: 9px;
  background: var(--pink-4);
  animation: scrollDot 1.2s ease-in-out infinite;
}

section:not(.hero) {
  padding: 84px clamp(18px, 5vw, 72px);
}

.section-head {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}

h2 {
  margin-bottom: 12px;
  font-family: "VT323", monospace;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.92;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
}

.story-grid,
.game-layout,
.skin-grid,
.wallet,
.airdrop {
  display: grid;
  max-width: 1120px;
  margin: 0 auto;
  gap: 18px;
}

.story-grid {
  grid-template-columns: repeat(3, 1fr);
}

.story-grid article,
.game-panel,
.leaderboard,
.wallet-box {
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.story-grid article {
  padding: 22px;
}

.phase {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--pink-4);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.story-grid p,
.wallet p,
.airdrop p,
.game-hint {
  color: var(--muted);
  line-height: 1.65;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.gallery figure {
  position: relative;
  margin: 0;
  padding: 0;
  border: 2px solid var(--line);
  background: var(--pink-2);
  box-shadow: 10px 10px 0 var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery figure:hover,
.gallery figure:focus-visible {
  transform: translate(4px, 4px);
  box-shadow: 6px 6px 0 var(--shadow);
  outline: none;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  clip-path: inset(0 5px 5px 0);
  border: 0;
  background: var(--pink-2);
  image-rendering: pixelated;
  box-shadow: none;
}

.gallery figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff7fa;
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.gallery figcaption span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: #ffd7e6;
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(59, 40, 59, 0.28);
}

.story-modal[hidden] {
  display: none;
}

.story-modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 420px);
  gap: 22px;
  width: min(860px, 100%);
  padding: 22px;
  border: 2px solid var(--line);
  background: #fff7fa;
  box-shadow: 12px 12px 0 var(--shadow);
}

.story-modal-card figure {
  margin: 0;
  border: 2px solid var(--line);
  background: var(--pink-2);
  box-shadow: 8px 8px 0 var(--shadow);
  overflow: hidden;
}

.story-modal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  clip-path: inset(0 5px 5px 0);
  image-rendering: pixelated;
}

.story-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  background: #ffd7e6;
  color: var(--ink);
  cursor: pointer;
}

.story-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding-right: 18px;
}

.story-copy h3 {
  margin: 0;
  font-family: "VT323", monospace;
  font-size: 40px;
}

.story-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.story-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.story-actions button {
  min-height: 42px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffd7e6;
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
}

.game-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
}

.game-panel {
  padding: 18px;
}

.arcade-tabs {
  display: inline-flex;
  margin-bottom: 14px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
}

.arcade-tabs button {
  min-width: 150px;
  min-height: 40px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.arcade-tabs button + button {
  border-left: 2px solid var(--line);
}

.arcade-tabs button.active {
  color: var(--ink);
  background: #ffd7e6;
  font-weight: 700;
}

.game-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.game-top input,
.game-top select {
  min-width: 160px;
  flex: 1;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.game-top select {
  flex: 0 1 150px;
  cursor: pointer;
}

canvas {
  display: block;
  width: 100%;
  max-height: 420px;
  border: 2px solid var(--line);
  background: #ffe2ec;
  touch-action: none;
}

.mobile-controls {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.mobile-controls button {
  min-height: 54px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffd7e6;
  box-shadow: 5px 5px 0 var(--shadow);
  font-weight: 700;
  touch-action: manipulation;
}

.coin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.coin-controls label,
.coin-side,
.coin-controls > button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.coin-controls label {
  padding-left: 12px;
}

.coin-controls select {
  min-height: 40px;
  border: 0;
  border-left: 2px solid var(--line);
  background: #fff7fa;
  color: var(--ink);
  padding: 0 10px;
}

.coin-controls input {
  width: 92px;
  min-height: 40px;
  border: 0;
  border-left: 2px solid var(--line);
  background: #fff7fa;
  color: var(--ink);
  padding: 0 10px;
  text-transform: uppercase;
}

.coin-controls > button {
  padding: 0 14px;
  background: #ffd7e6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.coin-side button {
  min-height: 40px;
  border: 0;
  border-left: 2px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  cursor: pointer;
}

.coin-side button:first-child {
  border-left: 0;
}

.coin-side button.active {
  background: #ffd7e6;
  color: var(--ink);
  font-weight: 700;
}

.coin-soon {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 2px solid var(--line);
  background: #ffe2ec;
  text-align: center;
}

.coin-preview {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 5px solid var(--line);
  background: #f4d06f;
  box-shadow: 8px 8px 0 var(--shadow);
  color: #fff7fa;
  font-family: "VT323", monospace;
  font-size: 70px;
}

.coin-soon h3 {
  margin: 0;
  font-family: "VT323", monospace;
  font-size: 48px;
}

.coin-soon p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.arcade-screen[hidden] {
  display: none;
}

.leaderboard {
  padding: 20px;
}

.leaderboard-status {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 10px 0 14px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.leaderboard-tabs button {
  min-height: 34px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.leaderboard-tabs button + button {
  border-left: 2px solid var(--line);
}

.leaderboard-tabs button.active {
  color: var(--ink);
  background: #ffd7e6;
  font-weight: 700;
}

.leaderboard ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(59, 40, 59, 0.18);
}

.pilot-rank {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(59, 40, 59, 0.2);
  background: #ffe2ec;
  color: var(--pink-4);
  font-size: 12px;
  font-weight: 700;
}

.pilot-score {
  font-weight: 700;
}

.leaderboard small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}

.online-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid rgba(59, 40, 59, 0.18);
}

.online-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.online-head h4 {
  margin: 0;
  font-size: 14px;
}

.online-head span {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border: 2px solid rgba(59, 40, 59, 0.2);
  background: #ffd7e6;
  color: var(--pink-4);
  font-size: 12px;
  font-weight: 700;
}

.online-box ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.online-box li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  padding: 8px;
  border: 1px solid rgba(59, 40, 59, 0.14);
  background: rgba(255, 226, 236, 0.42);
}

.online-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--line);
  background: #d8cad3;
}

.online-dot.playing {
  background: #ff6fa6;
}

.online-box strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-box small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.online-empty {
  grid-template-columns: 1fr !important;
  color: var(--muted);
  font-size: 12px;
}

.market-balance,
.market-status {
  margin: 0;
  color: var(--muted);
}

.market-balance strong {
  color: var(--ink);
}

.market-status {
  margin-top: 8px;
  font-size: 13px;
}

.market-wallet {
  display: inline-flex;
  max-width: 620px;
  margin: 14px auto 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.82);
  box-shadow: 5px 5px 0 var(--shadow);
}

.market-wallet button {
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffd7e6;
  cursor: pointer;
  font-weight: 700;
}

.market-wallet span {
  color: var(--muted);
  font-size: 13px;
}

.restore-box,
.promo-box {
  display: flex;
  max-width: 620px;
  margin: 18px auto 0;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.promo-box {
  max-width: 560px;
  margin-top: 10px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.72);
  box-shadow: 5px 5px 0 var(--shadow);
}

.restore-box input,
.restore-box button,
.promo-box input,
.promo-box button {
  min-height: 46px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--panel);
}

.restore-box input,
.promo-box input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
}

.promo-box input {
  border: 0;
  background: transparent;
}

.restore-box button,
.promo-box button {
  padding: 10px 14px;
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.promo-box button {
  min-width: 190px;
  border-width: 0 0 0 2px;
  background: #ffd7e6;
  box-shadow: none;
  font-weight: 700;
}

.restore-box button:hover,
.promo-box button:hover {
  transform: translate(3px, 3px);
  background: #ffd7e6;
  box-shadow: 2px 2px 0 var(--shadow);
}

.market-tabs {
  display: inline-flex;
  margin: 18px auto 0;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
}

.market-tabs button {
  min-width: 98px;
  min-height: 42px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.market-tabs button + button {
  border-left: 2px solid var(--line);
}

.market-tabs button.active {
  color: var(--ink);
  background: #ffd7e6;
  font-weight: 700;
}

.sort-box {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 13px;
}

.sort-box[hidden] {
  display: none;
}

.sort-box select {
  min-height: 38px;
  padding: 8px 12px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.skin-grid {
  grid-template-columns: repeat(auto-fill, 270px);
  gap: 14px;
  justify-content: start;
  max-width: 1180px;
  width: min(1180px, calc(100vw - 40px));
}

.market-subhead {
  display: none;
}

.market-category-title {
  grid-column: 1 / -1;
  margin: 8px 0 2px;
  color: var(--pink-4);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.skin-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.skin-preview {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 2px solid rgba(59, 40, 59, 0.24);
  background: #ffe2ec;
}

.skin-preview canvas {
  width: 96px;
  height: 74px;
  border: 0;
  background: transparent;
}

.skin-card h3,
.skin-card p {
  margin: 0;
}

.skin-card p {
  color: var(--muted);
  max-height: 44px;
  overflow: hidden;
  line-height: 1.45;
}

.skin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skin-tier {
  color: var(--pink-4);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.skin-price {
  font-weight: 700;
}

.skin-actions {
  display: grid;
  gap: 8px;
}

.skin-card button {
  min-height: 40px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.skin-card button:hover:not(:disabled) {
  transform: translate(3px, 3px);
  background: #ffd7e6;
  box-shadow: 2px 2px 0 var(--shadow);
}

.skin-card button:disabled {
  cursor: default;
  opacity: 0.58;
}

.skin-card .sol-button {
  background: #ffe2ec;
}

.case-card.promo-match {
  background: #fff7fa;
  box-shadow: 8px 8px 0 #f06f9c;
}

.case-card .skin-preview canvas {
  width: 112px;
  height: 86px;
}

.promo-ready {
  padding: 7px 9px;
  border: 2px solid rgba(59, 40, 59, 0.25);
  color: var(--ink);
  background: #ffd7e6;
  font-size: 12px;
  font-weight: 700;
}

.case-drops {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid rgba(59, 40, 59, 0.28);
  color: var(--pink-4);
  background: #ffe2ec;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.peek-button {
  min-height: 36px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff7fa;
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
}

.case-modal[hidden] {
  display: none;
}

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(48, 31, 48, 0.28);
}

.case-modal-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px;
  border: 2px solid var(--line);
  background: #fff7fa;
  box-shadow: 10px 10px 0 var(--shadow);
}

.case-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.case-modal-head h3,
.case-modal-head p {
  margin: 0;
}

.case-modal-head button {
  width: 42px;
  height: 42px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffd7e6;
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
}

.case-modal-drops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.case-drop-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 2px solid rgba(59, 40, 59, 0.22);
  background: #ffe2ec;
}

.case-modal .case-drop-card canvas {
  display: block;
  width: 120px !important;
  max-width: 120px;
  height: 92px !important;
  max-height: 92px;
  justify-self: center;
  border: 2px solid rgba(59, 40, 59, 0.16);
  background: #ffe2ec;
  image-rendering: pixelated;
}

.case-drop-card div {
  display: grid;
  gap: 4px;
}

.case-drop-card span,
.case-drop-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.case-drop-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-roulette {
  display: grid;
  gap: 14px;
}

.roulette-window {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  border: 2px solid rgba(59, 40, 59, 0.24);
  background: #ffe2ec;
}

.roulette-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 3px;
  background: #f06f9c;
  transform: translateX(-50%);
}

.roulette-track {
  display: flex;
  gap: 10px;
  padding: 14px;
  transform: translateX(0);
  transition: transform 2.8s cubic-bezier(0.12, 0.76, 0.14, 1);
  will-change: transform;
}

.roulette-card {
  display: grid;
  flex: 0 0 132px;
  gap: 7px;
  padding: 8px;
  border: 2px solid rgba(59, 40, 59, 0.22);
  background: #fff7fa;
}

.roulette-card.winner {
  border-color: var(--line);
  background: #ffd7e6;
  box-shadow: 5px 5px 0 var(--shadow);
}

.case-modal .roulette-card canvas {
  display: block;
  width: 112px !important;
  max-width: 112px;
  height: 86px !important;
  max-height: 86px;
  justify-self: center;
  border: 2px solid rgba(59, 40, 59, 0.16);
  background: #ffe2ec;
  image-rendering: pixelated;
}

.roulette-card div {
  display: grid;
  gap: 3px;
}

.roulette-card span {
  color: var(--muted);
  font-size: 11px;
}

.roulette-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roulette-status {
  margin: 0;
  color: var(--muted);
}

.rare-drop,
.roulette-card.rare-drop {
  background: #fff1c8;
}

.rare-reveal .case-modal-card {
  animation: rarePulse 0.9s ease-in-out 3;
  box-shadow: 12px 12px 0 #f06f9c;
}

.rare-reveal .roulette-marker {
  background: #f4d06f;
}

.inventory-card button {
  min-height: 40px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
}

.inventory-card button:disabled {
  opacity: 0.58;
  cursor: default;
}

.inventory-empty,
.history-card {
  padding: 16px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.inventory-empty h3,
.inventory-empty p,
.history-card h3,
.history-card p {
  margin: 0;
}

.history-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.history-card canvas {
  width: 96px;
  height: 74px;
  border: 2px solid rgba(59, 40, 59, 0.18);
  background: #ffe2ec;
}

.history-card span,
.history-card p {
  color: var(--muted);
  font-size: 12px;
}

.history-card h3 {
  margin: 4px 0;
}

.history-card.rare-history {
  background: #fff1c8;
}

.coming-soon-card {
  opacity: 0.82;
}

.coming-soon-card .skin-preview {
  background: #ffd7e6;
}

.coming-soon-card button {
  min-height: 40px;
  border: 2px solid var(--line);
  color: var(--muted);
  background: #ffe2ec;
  box-shadow: none;
}

.wallet {
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.75fr);
  align-items: center;
  max-width: 1280px;
}

.trade-zone {
  display: grid;
  grid-template-columns: 300px minmax(520px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.wallet-box,
.chart-box {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.wallet-box p {
  margin: 0;
  word-break: break-word;
}

.buy-link {
  width: 100%;
}

.amount-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.amount-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.chart-box {
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chart-head h3 {
  margin: 0;
}

.chart-head strong,
.chart-head a,
.chart-head span {
  padding: 8px 10px;
  border: 2px solid var(--line);
  background: #fff;
  white-space: nowrap;
}

.chart-head .soon-tag {
  background: #ffd7e6;
  color: var(--ink);
  font-weight: 700;
}

.dex-wrap {
  position: relative;
  min-height: 560px;
  border: 2px solid var(--line);
  background: #ffe2ec;
}

.dex-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 560px;
  border: 0;
  background: #ffe2ec;
}

.dex-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--shadow);
}

.soon-chart {
  display: grid;
  place-items: center;
}

.soon-panel {
  display: grid;
  gap: 10px;
  width: min(320px, 82%);
  padding: 24px;
  border: 2px solid var(--line);
  background: var(--panel);
  text-align: center;
  box-shadow: 5px 5px 0 var(--shadow);
}

.soon-panel strong {
  font-family: "VT323", monospace;
  font-size: 44px;
}

.soon-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.chart-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.airdrop {
  grid-template-columns: 340px 1fr;
  align-items: center;
}

.airdrop-image {
  margin: 0;
  border: 2px solid var(--line);
  background: var(--pink-2);
  box-shadow: 12px 12px 0 var(--shadow);
  overflow: hidden;
}

.airdrop-image img {
  display: block;
  width: 100%;
  clip-path: inset(0 4px 5px 0);
  border: 0;
  image-rendering: pixelated;
}

.airdrop-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.airdrop-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.airdrop-stats span {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 2px solid rgba(59, 40, 59, 0.18);
  background: #ffe2ec;
  color: var(--muted);
  font-size: 12px;
}

.airdrop-stats strong {
  color: var(--ink);
  font-size: 18px;
}

.airdrop-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.airdrop-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff7fa;
}

.airdrop-panel button {
  min-height: 46px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffd7e6;
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
  font-weight: 700;
}

.airdrop-bot-link {
  display: inline-grid;
  min-height: 46px;
  place-items: center;
  padding: 12px 16px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #ffe2ec;
  box-shadow: 5px 5px 0 var(--shadow);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.airdrop-bot-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--shadow);
  background: #ffd0e2;
}

.airdrop-panel button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.airdrop-panel p {
  margin: 0;
}

.airdrop-panel code {
  display: block;
  max-width: 100%;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 2px solid rgba(59, 40, 59, 0.22);
  background: #ffe2ec;
  color: var(--ink);
}

.admin-page {
  padding: 54px 18px;
}

.admin-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  border: 2px solid var(--line);
  background: rgba(255, 247, 250, 0.94);
  box-shadow: 8px 8px 0 var(--shadow);
}

.admin-controls,
.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.admin-controls input,
.admin-controls button,
.admin-controls a {
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: #fff7fa;
  text-decoration: none;
}

.admin-controls button,
.admin-controls a {
  background: #ffd7e6;
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
}

.admin-summary span {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 10px;
  border: 2px solid rgba(59, 40, 59, 0.18);
  background: #ffe2ec;
  color: var(--muted);
  font-size: 12px;
}

.admin-summary strong {
  color: var(--ink);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(59, 40, 59, 0.18);
  text-align: left;
}

.admin-table th {
  color: var(--pink-4);
  font-size: 12px;
  text-transform: uppercase;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 32px 18px 44px;
  color: var(--muted);
  background: rgba(255, 232, 240, 0.82);
  border-top: 2px solid rgba(59, 40, 59, 0.16);
}

@keyframes ufoFlight {
  0% {
    transform: translate(-160%, -90px) rotate(-8deg);
    opacity: 0;
  }
  42% {
    transform: translate(-50%, 8px) rotate(2deg);
    opacity: 1;
  }
  72% {
    transform: translate(-50%, 8px) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: translate(74%, -120px) rotate(8deg);
    opacity: 0;
  }
}

@keyframes beamPulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@keyframes portraitBeam {
  from {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    filter: saturate(0.7);
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: saturate(1);
  }
}

@keyframes heroReveal {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scrollDot {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

@keyframes rarePulse {
  0%,
  100% {
    transform: translate(0, 0);
  }
  45% {
    transform: translate(3px, 3px);
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar nav {
    gap: 10px;
    font-size: 13px;
  }

  .topbar nav a {
    min-height: 32px;
    padding: 6px 8px;
  }

  .story-grid,
  .gallery,
  .game-layout,
  .wallet,
  .trade-zone,
  .airdrop {
    grid-template-columns: 1fr;
  }

  .skin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-modal-card {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }

  .story-copy {
    padding-right: 0;
  }

  .airdrop-image {
    max-width: 360px;
    margin: 0 auto;
  }

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

@media (max-width: 520px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .topbar nav a {
    font-size: 12px;
  }

  .hero {
    padding-top: 92px;
  }

  .hero-portrait {
    width: min(88vw, 360px);
  }

  .ufo-arrival {
    width: 190px;
  }

  .ufo {
    width: 124px;
  }

  .ufo::before {
    left: 28px;
  }

  .gallery {
    gap: 10px;
  }

  .story-modal-card {
    padding: 14px;
  }

  .story-copy h3 {
    font-size: 32px;
  }

  .mobile-controls {
    display: grid;
  }

  .skin-grid {
    grid-template-columns: 1fr;
  }

  .restore-box,
  .promo-box,
  .market-wallet {
    flex-direction: column;
  }

  .promo-box button {
    min-width: 0;
    border-width: 2px 0 0;
  }

  .case-modal-drops {
    grid-template-columns: 1fr;
  }

  section:not(.hero) {
    padding: 62px 16px;
  }
}
