/* ==========================================================================
   CRIME CITY CREATURES — styles
   ========================================================================== */
:root {
  --bg: #0d0828;
  --bg-2: #150c38;
  --panel: #1d1349;
  --panel-2: #26195c;
  --line: #3a2a7c;
  --ink: #0b0f2a;
  --text: #f4f1ff;
  --muted: #bdb3e4;
  --blue: #2f7bff;
  --blue-2: #4a94ff;
  --purple: #5b2ea6;
  --lime: #d7ff3a;
  --sunset: #ff8a3d;
  --pink: #ff4fd8;
  --cyan: #33e6ff;
  --danger: #ff5a6e;
  --radius: 18px;
  --shadow: 0 6px 0 var(--ink);
  --display: "Bungee", "Impact", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(47,123,255,.22), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(91,46,166,.35), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--lime); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--panel-2); --c: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  font-family: var(--display); font-size: 15px; letter-spacing: .03em; text-decoration: none;
  color: var(--c); background: var(--b);
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  cursor: pointer; transition: transform .12s, box-shadow .12s, filter .12s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-lg { min-height: 54px; padding: 12px 24px; font-size: 17px; }
.btn-primary { --b: var(--blue); }
.btn-lime { --b: var(--lime); --c: var(--ink); }
.btn-ghost { --b: transparent; border-color: var(--muted); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; border-color: var(--text); }
.btn-copy { --b: var(--pink); --c: var(--ink); min-height: 40px; font-size: 13px; padding: 8px 14px; }
.btn-wallet { --b: var(--lime); --c: var(--ink); min-height: 42px; font-size: 13px; padding: 8px 14px; }
.btn[aria-disabled="true"], .btn:disabled { --b: #2a2250; --c: #8f86b8; border-color: #3a3170; box-shadow: none; cursor: not-allowed; transform: none; filter: none; }

.btn-icon {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px;
}
.btn-icon svg { width: 20px; height: 20px; fill: currentColor; }
.btn-icon:hover { border-color: var(--lime); color: var(--lime); }
.btn-icon[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-icon[aria-disabled="true"]:hover { border-color: var(--line); color: var(--text); }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13,8,40,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-size: 15px; }
.brand-ticker { font-family: var(--display); font-size: 12px; color: var(--lime); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; }
.site-nav > a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.wallet { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.wallet-addr { font-family: var(--display); font-size: 13px; color: var(--lime); padding: 6px 10px; border: 2px solid var(--lime); border-radius: 10px; }
.wallet-state { font-size: 13px; color: var(--muted); }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: var(--text); margin: 0 auto; position: relative; content: ""; transition: transform .2s; }
.burger::before { position: absolute; top: -6px; } .burger::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { font-family: var(--display); font-size: 13px; letter-spacing: .12em; color: var(--lime); margin-bottom: 12px; }
.logo-title { display: flex; flex-direction: column; font-size: clamp(42px, 6.4vw, 78px); line-height: .92; }
.logo-title span:first-child { color: var(--text); text-shadow: 4px 4px 0 var(--purple), 8px 8px 0 var(--ink); }
.logo-title span:last-child { color: var(--lime); text-shadow: 4px 4px 0 var(--blue), 8px 8px 0 var(--ink); }
.ticker-pill { display: inline-block; margin: 18px 0 18px; padding: 6px 14px; border: 3px solid var(--ink); border-radius: 999px; background: var(--sunset); color: var(--ink); font-family: var(--display); font-size: 18px; box-shadow: 0 4px 0 var(--ink); }
.ticker-pill span { font-family: var(--body); font-weight: 700; font-size: 15px; }
.headline { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 12px; }
.headline em { font-style: normal; color: var(--cyan); }
.sub { color: var(--muted); font-size: 19px; max-width: 34em; margin-bottom: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.ca-box {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  margin-top: 18px; padding: 14px 16px; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; max-width: 560px;
}
.ca-head { grid-column: 1 / -1; font-family: var(--display); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.ca-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.ca-box.is-empty .ca-value { color: var(--muted); font-family: var(--body); font-style: italic; }

.hero-art { position: relative; }
.city-svg { width: 100%; height: auto; border-radius: 28px; border: 4px solid var(--ink); box-shadow: 0 10px 0 var(--ink), 0 30px 80px rgba(47,123,255,.25); }
.hero-badge { position: absolute; left: -8px; bottom: 22px; transform: rotate(6deg); background: var(--lime); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; font-family: var(--display); font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center; }
.hero-badge span { background: var(--ink); color: var(--lime); padding: 2px 6px; border-radius: 6px; font-size: 11px; }
.neon-flicker { animation: flicker 5s infinite; }
.rain { animation: rain .8s linear infinite; }
.reflect { animation: shimmer 3s ease-in-out infinite alternate; }
#heroCreature { animation: bob 2.4s ease-in-out infinite; transform-origin: center; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .3; } 95% { opacity: .9; } 96% { opacity: .4; } }
@keyframes rain { from { transform: translateY(-30px); } to { transform: translateY(30px); } }
@keyframes shimmer { from { opacity: .6; } to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head.left { text-align: left; margin: 0; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 14px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 18px; }

/* ---------- Demo ---------- */
.demo-section { background: linear-gradient(180deg, transparent, rgba(47,123,255,.07) 30%, transparent); }
.game-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.game-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 360px; max-height: 78vh;
  border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; background: #070418;
  box-shadow: 0 8px 0 var(--ink), 0 0 0 2px var(--line);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.game-stage:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.game-stage.has-focus { box-shadow: 0 8px 0 var(--ink), 0 0 0 3px var(--lime); }
#gameCanvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }

.hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px; pointer-events: none; }
.hud-left { display: flex; flex-direction: column; gap: 6px; }
.hud-level { display: flex; align-items: center; gap: 8px; background: rgba(11,15,42,.82); border: 2px solid var(--line); border-radius: 12px; padding: 5px 8px; }
.lvl-badge { font-family: var(--display); font-size: 13px; color: var(--lime); }
.xpbar { width: 90px; height: 8px; background: #2a2250; border-radius: 99px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--lime)); transition: width .3s; }
.hud-crew { display: flex; gap: 4px; }
.hud-crew .slot { width: 36px; height: 36px; border-radius: 10px; background: rgba(11,15,42,.82); border: 2px solid var(--line); padding: 2px; }
.hud-crew .slot.empty { border-style: dashed; opacity: .6; }
.hud-mission { flex: 1; max-width: 360px; background: rgba(11,15,42,.88); border: 2px solid var(--sunset); border-radius: 12px; padding: 6px 10px; font-size: 14px; line-height: 1.3; }
.hud-mission:empty { display: none; }
.hud-mission b { font-family: var(--display); font-weight: 400; color: var(--sunset); font-size: 12px; display: block; letter-spacing: .05em; }
.hud-mission .timer { color: var(--lime); font-weight: 700; }
.hud-tag { background: rgba(11,15,42,.82); border: 2px solid var(--line); border-radius: 12px; padding: 5px 8px; font-size: 12px; font-weight: 700; color: var(--muted); }

.touch { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 10px; pointer-events: none; }
.touch button { pointer-events: auto; touch-action: none; border: 3px solid var(--ink); background: rgba(38,25,92,.85); color: var(--text); border-radius: 14px; font-family: var(--display); font-size: 16px; }
.touch button.pressed { background: var(--blue); }
.dpad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 2px; }
.dpad [data-dir="up"] { grid-column: 2; grid-row: 1; }
.dpad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.dpad [data-dir="right"] { grid-column: 3; grid-row: 2; }
.dpad [data-dir="down"] { grid-column: 2; grid-row: 3; }
.touch-actions { display: flex; gap: 10px; align-items: flex-end; }
.touch-actions button { width: 58px; height: 58px; font-size: 13px; }
.touch-actions .act-e { width: 72px; height: 72px; background: var(--lime); color: var(--ink); font-size: 22px; border-radius: 50%; }

.overlay { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 12px; background: rgba(7,4,24,.72); overflow-y: auto; }
.overlay > * { margin: auto; }
.overlay[hidden] { display: none; }
.ov-card { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 6px 0 var(--ink), 0 0 0 2px var(--line); }
.ov-card h3 { font-size: clamp(20px, 3vw, 28px); margin-bottom: 8px; }
.ov-card p { color: var(--muted); margin-bottom: 12px; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ov-title { text-align: center; }
.ov-title .logo-mini { font-family: var(--display); font-size: clamp(22px, 4vw, 34px); color: var(--lime); text-shadow: 3px 3px 0 var(--blue); margin-bottom: 6px; }
.ov-title .ov-actions { justify-content: center; }
.ov-title .starter { width: 110px; margin: 6px auto; }
.ov-small { font-size: 14px; }
.text-btn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 14px; }
.text-btn:hover { color: var(--text); }

.board-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.board-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 14px; }
.board-item h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 15px; }
.board-item p { grid-column: 1; margin: 0; font-size: 14px; }
.board-item .btn { grid-row: 1 / span 2; grid-column: 2; min-height: 40px; font-size: 13px; padding: 6px 12px; }
.board-item.done { border-color: var(--lime); }
.board-item.locked { opacity: .65; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); margin-left: 6px; vertical-align: middle; font-family: var(--body); }
.tag.ok { background: var(--lime); color: var(--ink); }
.tag.act { background: var(--sunset); color: var(--ink); }

/* Battle */
.battle { width: min(720px, 100%); max-height: 100%; overflow-y: auto; background: linear-gradient(180deg, #1a0f45, #0e0a2a); border: 3px solid var(--ink); border-radius: 20px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 6px 0 var(--ink), 0 0 0 2px var(--line); }
.bt-row { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 12px; }
.bt-row.me { grid-template-columns: 110px 1fr; }
.bt-art { width: 110px; height: 110px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.4)); }
.bt-art.hit { animation: hit .35s; }
@keyframes hit { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); filter: brightness(2); } 75% { transform: translateX(8px); } }
.bt-card { background: rgba(255,255,255,.05); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.bt-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--display); font-size: 16px; }
.bt-name small { font-family: var(--body); font-weight: 700; font-size: 13px; color: var(--muted); }
.type-chip { display: inline-block; font-family: var(--body); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; color: var(--ink); margin-top: 4px; }
.hpbar { height: 12px; border-radius: 99px; background: #2a2250; overflow: hidden; margin-top: 8px; border: 2px solid var(--ink); }
.hpbar i { display: block; height: 100%; background: var(--lime); transition: width .4s; }
.hpbar i.mid { background: #ffc94d; } .hpbar i.low { background: var(--danger); }
.hp-num { font-size: 13px; color: var(--muted); margin-top: 2px; }
.bt-status { font-size: 12px; color: var(--cyan); min-height: 16px; }
.bt-log { min-height: 48px; background: var(--ink); border-radius: 12px; padding: 10px 12px; font-weight: 500; }
.bt-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.move-btn { text-align: left; padding: 10px 12px; border-radius: 14px; border: 3px solid var(--ink); background: var(--panel-2); color: var(--text); cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.move-btn:hover:not(:disabled) { filter: brightness(1.15); }
.move-btn:disabled { opacity: .5; cursor: default; }
.move-btn b { display: block; font-family: var(--display); font-weight: 400; font-size: 14px; }
.move-btn span { font-size: 12px; color: var(--muted); }
.move-btn kbd { float: right; }
.bt-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Map */
.map-wrap { width: min(760px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; padding: 12px; }
.map-wrap canvas { flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; border-radius: 12px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

.toasts { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: max-content; max-width: 90%; }
.toast { background: var(--lime); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; font-weight: 700; font-size: 14px; box-shadow: 0 4px 0 var(--ink); animation: toastIn .25s; text-align: center; }
.toast.warn { background: var(--sunset); }
.toast.info { background: var(--cyan); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

.game-side { display: grid; gap: 16px; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { font-size: 16px; margin-bottom: 12px; color: var(--lime); }
.keys { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.keys li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.keys span { color: var(--muted); margin-left: auto; }
kbd { display: inline-block; min-width: 24px; padding: 2px 6px; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 6px; background: var(--text); color: var(--ink); font-family: var(--display); font-size: 11px; text-align: center; }
.hint { font-size: 13px; color: var(--muted); }
.stats { margin: 0 0 10px; display: grid; gap: 8px; }
.stats div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.stats dt { color: var(--muted); font-size: 14px; }
.stats dd { margin: 0; font-family: var(--display); font-size: 14px; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { position: relative; background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-num { position: absolute; top: 14px; right: 16px; font-family: var(--display); color: var(--line); font-size: 26px; }
.step-ico { width: 56px; height: 56px; margin-bottom: 14px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ---------- Creatures ---------- */
.creatures-section { background: linear-gradient(180deg, transparent, rgba(91,46,166,.18), transparent); }
.t-spark { color: #6aa8ff; } .t-scrap { color: var(--sunset); } .t-shadow { color: #b896ff; } .t-neon { color: var(--pink); }
.creature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.c-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.c-top { position: relative; padding: 18px 18px 6px; background: radial-gradient(circle at 50% 60%, var(--tc, #3d8bff) 0%, transparent 65%), var(--bg-2); }
.c-top svg { width: 150px; height: 150px; margin: 0 auto; filter: drop-shadow(0 8px 0 rgba(0,0,0,.35)); }
.c-card.undiscovered .c-top svg { filter: brightness(0) drop-shadow(0 0 2px rgba(255,255,255,.4)); opacity: .75; }
.c-state { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 2px solid var(--ink); background: var(--panel-2); color: var(--muted); }
.c-state.crew { background: var(--lime); color: var(--ink); }
.c-state.seen { background: var(--cyan); color: var(--ink); }
.c-rare { position: absolute; top: 12px; right: 12px; font-size: 11px; font-family: var(--display); color: var(--ink); background: var(--pink); padding: 3px 8px; border-radius: 8px; border: 2px solid var(--ink); }
.c-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.c-body h3 { font-size: 22px; }
.c-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.c-quote { color: var(--text); font-style: italic; font-size: 15px; }
.c-abil { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 6px; }
.c-abil li { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.c-abil b { display: block; color: var(--text); font-size: 14px; }

/* ---------- Missions ---------- */
.missions-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.activity-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.activity-tags span { border: 2px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.mission-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.m-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; background: var(--panel); border: 3px solid var(--ink); border-left: 8px solid var(--mc, var(--sunset)); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.m-card .m-ico { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); font-size: 30px; }
.m-card h3 { font-size: 18px; margin-bottom: 4px; }
.m-card p { color: var(--muted); font-size: 15px; }
.m-kind { font-size: 12px; font-weight: 700; color: var(--mc, var(--sunset)); text-transform: uppercase; letter-spacing: .08em; }
.m-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.m-status.ok { background: var(--lime); color: var(--ink); }

/* ---------- Token ---------- */
.token-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; background: linear-gradient(135deg, var(--panel), #2a0f4f 70%, #4a1a3f); border: 3px solid var(--ink); border-radius: 28px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 10px 0 var(--ink); }
.token-copy h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 14px; }
.token-copy > p:not(.eyebrow):not(.verify) { color: var(--muted); font-size: 18px; }
.verify { margin: 14px 0 18px; font-weight: 700; color: var(--sunset); }
.token-facts dl { margin: 0 0 18px; display: grid; gap: 10px; }
.token-facts dl div { display: flex; justify-content: space-between; gap: 10px; background: rgba(11,15,42,.5); border-radius: 12px; padding: 12px 14px; }
.token-facts dt { color: var(--muted); }
.token-facts dd { margin: 0; font-family: var(--display); font-size: 15px; }
.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--cyan); padding-left: 12px; }

/* ---------- Community ---------- */
.community-inner { text-align: center; display: grid; justify-items: center; gap: 12px; }
.community h2 { font-size: clamp(28px, 4vw, 44px); }
.community p { color: var(--muted); }
.social-row.big .btn-icon { min-height: 54px; padding: 10px 22px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; background: #09061d; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 24px; align-items: start; }
.footer-grid nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.footer-grid nav a { color: var(--muted); text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.footer-small { color: var(--muted); font-size: 14px; margin-top: 10px; }
.legal { margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal { padding: 0; border: none; background: transparent; color: var(--text); width: min(460px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(7,4,24,.75); }
.modal-inner { background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 8px 0 var(--ink); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head h2 { font-size: 18px; }
.modal-x { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; }
.modal-text { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.wallet-list { display: grid; gap: 10px; }
.wallet-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 700; cursor: pointer; text-decoration: none; text-align: left; width: 100%; }
.wallet-opt:hover { border-color: var(--lime); }
.wallet-opt small { color: var(--muted); font-weight: 500; }
.modal-error { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1em; }

.site-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 200; background: var(--lime); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 18px; font-weight: 700; box-shadow: 0 5px 0 var(--ink); transition: opacity .2s, transform .2s; }
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-toast.err { background: var(--danger); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .creature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .game-shell { grid-template-columns: 1fr; }
  .game-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 12px; }
  .wallet { margin: 8px 0 0; flex-wrap: wrap; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .missions-grid, .token-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 24px; }
  .section { padding: 56px 0; }
  .creature-grid, .steps, .game-side { grid-template-columns: 1fr; }
  .game-stage { aspect-ratio: 3 / 4; max-height: 82vh; min-height: 440px; border-radius: 16px; }
  .cta-row .btn { flex: 1 1 auto; }
  .ca-box { grid-template-columns: 1fr; }
  .m-card { grid-template-columns: 48px 1fr; }
  .m-card .m-ico { width: 48px; height: 48px; font-size: 24px; }
  .m-card .m-status { grid-column: 2; justify-self: start; }
  .bt-row, .bt-row.me { grid-template-columns: 1fr 76px; }
  .bt-row.me { grid-template-columns: 76px 1fr; }
  .bt-art { width: 76px; height: 76px; }
  .bt-moves { grid-template-columns: 1fr; }
  .hud-mission { font-size: 12px; }
  .board-item { grid-template-columns: 1fr; }
  .board-item .btn, .board-item > div { grid-row: auto !important; grid-column: 1 !important; justify-self: start; justify-content: flex-start !important; }
  .ov-card { padding: 16px; }
  .hud-tag { display: none; }
  .xpbar { width: 60px; }
  .brand-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Logo image */
.brand-logo { width: 40px; height: 40px; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); background: var(--panel); flex: none; }
.ca-value { user-select: all; word-break: break-all; }
