/* =========================================================
   OSRS Memes
   Layout concept: a cinematic scroll film. A pinned hero zooms
   through a giant "99", then giant condensed type runs over
   low-poly Gielinor scenes, with the old game UI (stone panels,
   parchment chat, yellow overhead text) used as punctuation.
   ========================================================= */
:root {
  color-scheme: dark;

  /* colour */
  --ink: #0b0806;          /* page ground, warm near-black */
  --ink-2: #15100b;
  --ink-3: #201811;
  --bone: #efe6d6;         /* body text */
  --mute: #b3a58e;
  --gold: #ffd34d;
  --gold-hi: #fff1a6;
  --orange: #ff981f;       /* game UI orange */
  --ember: #e8432c;
  --stone: #3e3529;        /* game interface stone */
  --stone-hi: #5d5242;
  --stone-lo: #1f1a13;
  --parch: #dccba5;        /* chatbox parchment */
  --parch-lo: #c2ad82;
  --black: #000000;
  --white: #ffffff;
  --chat-blue: #0000ff;
  --npc-red: #800000;
  --link-blue: #0000a8;
  --fx-yellow: #ffff00;
  --fx-red: #ff0000;
  --fx-green: #00ff00;
  --fx-cyan: #00ffff;
  --fx-purple: #ff00ff;
  --fx-white: #ffffff;
  --accept: #00e000;
  --decline: #ff2a2a;
  --veil: rgba(11, 8, 6, 0.86);
  --line: rgba(239, 230, 214, 0.14);
  --grad-gold: linear-gradient(180deg, #fff6c2 0%, #ffd34d 36%, #ff981f 72%, #e8432c 100%);

  /* type */
  --f-display: 'Anton', Impact, 'Arial Narrow Bold', 'Helvetica Neue Condensed', sans-serif;
  --f-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --f-game: 'VT323', 'Lucida Console', 'Courier New', monospace;
  --t-sm: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  --t-base: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem);
  --t-lg: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  --t-game: clamp(1.15rem, 1rem + 0.4vw, 1.45rem);
  --t-h3: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  --t-h2: clamp(3.2rem, 2rem + 6vw, 8.5rem);

  /* layout */
  --gutter-l: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right, 0px));
  --max: 1360px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 12px; }
.noscript { position: fixed; inset: auto 0 0; margin: 0; padding: 16px; background: var(--parch); color: var(--black); font-family: var(--f-game); font-size: 1.3rem; text-align: center; z-index: 400; }

[data-sprite] { display: inline-block; line-height: 0; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { width: 100%; height: auto; }

.eyebrow {
  margin: 0;
  font-family: var(--f-game);
  font-size: var(--t-game);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  text-shadow: 1px 1px 0 var(--black);
}
.display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-wrap: balance;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { margin: 0; max-width: 56ch; color: var(--mute); font-size: var(--t-lg); }
.section-head { display: grid; gap: 14px; padding-block: clamp(80px, 12vh, 140px) clamp(32px, 6vh, 64px); }

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.78em 1.4em; border: 0; border-radius: 999px;
  font-family: var(--f-body); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.pill--gold { background: var(--gold); color: var(--ink); }
.pill--gold:hover { background: var(--gold-hi); transform: translateY(-2px); }
.pill--ghost { background: rgba(255, 255, 255, 0.08); color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill--ghost:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.pill:active { transform: translateY(0) scale(0.98); }

/* close "x" button used by overlays */
.xbtn {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); cursor: pointer; z-index: 3;
}
.xbtn::before, .xbtn::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px;
  background: var(--bone); transform: translate(-50%, -50%) rotate(45deg);
}
.xbtn::after { transform: translate(-50%, -50%) rotate(-45deg); }
.xbtn:hover { background: rgba(0, 0, 0, 0.8); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  background: var(--black); font-family: var(--f-game); color: var(--white);
  transition: opacity 0.6s ease, visibility 0.6s;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__title { margin: 0; font-size: 1.45rem; text-align: center; }
.loader__bar { width: min(304px, 82vw); height: 34px; padding: 2px; border: 2px solid #8c1111; }
.loader__track { position: relative; width: 100%; height: 100%; }
.loader__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #8c1111; }
.loader__text { position: relative; display: grid; place-items: center; height: 100%; font-size: 1.2rem; white-space: nowrap; }
.loader__skip { margin-top: 8px; background: none; border: 0; color: #7d7d7d; font-family: var(--f-game); font-size: 1.1rem; cursor: pointer; text-decoration: underline; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background-color 0.4s, box-shadow 0.4s;
}
.nav.is-solid { background: rgba(11, 8, 6, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__hat { width: 34px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.6)); transition: transform 0.3s var(--ease); }
.nav__logo:hover .nav__hat { transform: rotate(-8deg) translateY(-2px); }
.nav__word {
  font-family: var(--f-display); font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav__right { display: flex; align-items: center; gap: 12px; }
.burger {
  position: relative; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--bone); transition: transform 0.3s var(--ease); }
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 27px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: center; gap: 32px;
  padding: calc(var(--nav-h) + 24px) var(--gutter-r) 32px var(--gutter-l);
  background:
    radial-gradient(80% 60% at 80% 20%, rgba(232, 67, 44, 0.22), transparent 70%),
    radial-gradient(60% 50% at 10% 90%, rgba(255, 152, 31, 0.16), transparent 70%),
    var(--ink);
  animation: menuIn 0.45s var(--ease);
}
@keyframes menuIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu__list a {
  display: inline-block; font-family: var(--f-display); font-size: clamp(2.6rem, 1.6rem + 5vw, 6.2rem);
  line-height: 1; text-transform: uppercase; text-decoration: none; color: var(--bone);
  transition: color 0.2s, transform 0.3s var(--ease);
}
.menu__list a:hover, .menu__list a:focus-visible { color: var(--gold); transform: translateX(10px); }
.menu__foot { margin: 0; font-family: var(--f-game); font-size: 1.2rem; color: var(--mute); }

/* ---------- XP tracker ---------- */
.xp {
  position: fixed; z-index: 58;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 4px);
  right: var(--gutter-r);
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px;
  background: var(--stone); border: 2px solid var(--stone-lo); border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--stone-hi), 0 8px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--f-game); color: var(--white); line-height: 1;
  transition: opacity 0.5s, transform 0.5s var(--ease);
}
body.is-loading .xp { opacity: 0; transform: translateY(-10px); }
.xp__icon { width: 28px; }
.xp__meta { display: grid; gap: 2px; }
.xp__skill { font-size: 0.95rem; color: var(--orange); }
.xp__lvl { font-size: 1.15rem; color: var(--fx-yellow); }
.xp__lvl b { font-weight: 400; }
.xp__total { min-width: 8.5ch; text-align: right; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.xp.is-up { animation: xpPulse 0.6s ease; }
@keyframes xpPulse { 30% { box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 4px rgba(255, 211, 77, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45); } }
.xp__drops { position: absolute; right: 10px; top: 100%; width: 0; height: 0; }
.xp-drop {
  position: absolute; right: 0; top: 64px; display: flex; align-items: center; gap: 4px;
  white-space: nowrap; font-size: 1.25rem; color: var(--white); text-shadow: 1px 1px 0 var(--black);
  animation: xpDrop 1.2s ease-out forwards;
}
.xp-drop .sprite { width: 16px; }
@keyframes xpDrop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-62px); opacity: 0; } }
.xp__burst { position: absolute; left: 20px; top: 50%; width: 0; height: 0; }
.spark {
  position: absolute; width: 6px; height: 6px; background: var(--c, var(--gold));
  animation: spark 0.9s ease-out forwards;
}
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity: 0; } }

.levelup {
  position: fixed; z-index: 57;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: var(--gutter-r);
  width: min(360px, calc(100vw - 32px));
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--parch); color: var(--black);
  border: 3px solid var(--stone); box-shadow: inset 0 0 0 2px var(--parch-lo), 0 14px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--f-game); font-size: 1.22rem; line-height: 1.15;
  animation: levelIn 0.4s var(--ease);
}
.levelup p { margin: 0; display: grid; gap: 4px; }
.levelup__l1 { color: var(--link-blue); }
@keyframes levelIn { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }

/* ---------- chat effects (overhead text) ---------- */
.fx { color: var(--fx-c, var(--fx-yellow)); }
.fx--yellow { --fx-c: var(--fx-yellow); }
.fx--red { --fx-c: var(--fx-red); }
.fx--green { --fx-c: var(--fx-green); }
.fx--cyan { --fx-c: var(--fx-cyan); }
.fx--purple { --fx-c: var(--fx-purple); }
.fx--white { --fx-c: var(--fx-white); }
.fx .w { display: inline-block; white-space: nowrap; }
.fx .w > span { display: inline-block; }
.fx--wave .w > span { animation: fxWave 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s); }
.fx--wave2 .w > span { animation: fxWave2 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s); }
.fx--shake .w > span { animation: fxShake 0.3s steps(2) infinite; animation-delay: calc(var(--i) * -0.05s); }
@keyframes fxWave { 0%, 100% { transform: translateY(-0.12em); } 50% { transform: translateY(0.12em); } }
@keyframes fxWave2 { 0%, 100% { transform: translate(-0.06em, -0.12em); } 50% { transform: translate(0.06em, 0.12em); } }
@keyframes fxShake { 0% { transform: translate(0, -0.09em); } 50% { transform: translate(0.05em, 0.09em); } 100% { transform: translate(-0.05em, 0); } }
.fx--flash1 { animation: fxFlash1 0.6s steps(1) infinite; }
.fx--flash2 { animation: fxFlash2 0.6s steps(1) infinite; }
.fx--flash3 { animation: fxFlash3 0.6s steps(1) infinite; }
@keyframes fxFlash1 { 0% { color: #ff0000; } 50% { color: #ffff00; } }
@keyframes fxFlash2 { 0% { color: #00ffff; } 50% { color: #0000ff; } }
@keyframes fxFlash3 { 0% { color: #00ff00; } 50% { color: #00a000; } }
.fx--glow1 { animation: fxGlow1 2.4s linear infinite; }
.fx--glow2 { animation: fxGlow2 2.4s linear infinite; }
.fx--glow3 { animation: fxGlow3 2.4s linear infinite; }
@keyframes fxGlow1 { 0%, 100% { color: #ff0000; } 33% { color: #ffff00; } 66% { color: #00ff00; } }
@keyframes fxGlow2 { 0%, 100% { color: #ff0000; } 33% { color: #ff00ff; } 66% { color: #0000ff; } }
@keyframes fxGlow3 { 0%, 100% { color: #ffffff; } 33% { color: #00ff00; } 66% { color: #00ffff; } }
.fx--scroll { display: block; width: 100%; overflow: hidden; white-space: nowrap; }
.fx--scroll > span { display: inline-block; padding-left: 100%; animation: fxScroll 6s linear infinite; }
@keyframes fxScroll { to { transform: translateX(-100%); } }

/* ---------- faux screenshots ---------- */
.shot {
  position: relative; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden;
  container-type: inline-size;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 8px; background: var(--ink-3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.shot__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.shot__stage { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1.6cqi; padding: 4cqi 4% 9%; }
.shot--chat .shot__stage { padding-bottom: 2.5cqi; }
.shot__overhead {
  width: 100%; text-align: center; font-family: var(--f-game);
  font-size: clamp(15px, 6.6cqi, 52px); line-height: 1.05;
  text-shadow: 0.08em 0.08em 0 var(--black);
}
.shot__player { width: clamp(22px, 7cqi, 56px); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35)); }
.chat {
  position: relative;
  padding: 2.2cqi 3cqi 2.6cqi;
  background: linear-gradient(180deg, rgba(220, 203, 165, 0.94), rgba(194, 173, 130, 0.97));
  border-top: max(2px, 0.7cqi) solid var(--stone);
  font-family: var(--f-game); font-size: clamp(13px, 4.5cqi, 30px); line-height: 1.12; color: var(--black);
}
.chat__line { margin: 0; overflow-wrap: anywhere; }
.chat__line b { font-weight: 400; color: var(--black); }
.chat__line span { color: var(--chat-blue); }
.chat__line--game { color: var(--black); }
.chat__line--red { color: #b00000; }

/* ---------- hero ---------- */
.hero { position: relative; height: 430vh; background: var(--ink); }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__scene, .hero__layer, .hero__mask, .hero__shade { position: absolute; inset: 0; }
.hero__layer { will-change: transform; transform-origin: 50% 62%; }
.hero__layer svg { width: 100%; height: 100%; }
.hero__mask { width: 100%; height: 100%; }
.hero__shade {
  background: linear-gradient(180deg, rgba(11, 8, 6, 0.55) 0%, rgba(11, 8, 6, 0.1) 30%, rgba(11, 8, 6, 0.15) 55%, rgba(11, 8, 6, 0.92) 100%);
  opacity: 0;
}
.hero__intro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 5vh) var(--gutter-r) calc(5vh + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  text-align: center; pointer-events: none;
}
.hero__hint { margin: 0; display: grid; justify-items: center; gap: 10px; font-family: var(--f-game); font-size: var(--t-game); color: var(--bone); letter-spacing: 0.06em; text-transform: uppercase; }
.hero__arrow { width: 14px; height: 14px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
.hero__title {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.2vh, 24px);
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) var(--gutter-r) 4vh var(--gutter-l);
  text-align: center;
}
.js .hero__title { opacity: 0; pointer-events: none; }
.js .hero__title.is-live { pointer-events: auto; }
.wordmark { margin: 0; display: grid; justify-items: center; font-family: var(--f-display); font-weight: 400; line-height: 0.8; text-transform: uppercase; }
.wordmark span {
  display: block;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.04em 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}
.wordmark__top { font-size: clamp(6rem, 25vw, 22rem); letter-spacing: 0.015em; }
.wordmark__bot { font-size: clamp(3.7rem, 15.4vw, 13.6rem); letter-spacing: 0.06em; margin-right: -0.06em; }
.hero__tag { margin: 0; font-family: var(--f-game); font-size: clamp(1.5rem, 1rem + 2vw, 2.7rem); line-height: 1; text-shadow: 2px 2px 0 var(--black); }
.hero__release, .hero__ctas { opacity: var(--rp, 1); transform: translateY(calc((1 - var(--rp, 1)) * 24px)); }
.hero__release { display: grid; gap: 4px; }
.hero__out { margin: 0; font-family: var(--f-display); font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1; color: var(--white); }
.hero__soon { margin: 0; font-family: var(--f-game); font-size: var(--t-game); color: var(--bone); text-shadow: 1px 1px 0 var(--black); }
.hero__count { color: var(--fx-yellow); font-variant-numeric: tabular-nums; }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 20vh; background: linear-gradient(180deg, transparent, var(--ink)); pointer-events: none; }
.hero--static { height: auto; }
.hero--static .hero__sticky { position: relative; height: 100svh; min-height: 560px; }
.hero--static .hero__mask, .hero--static .hero__intro { display: none; }
.hero--static .hero__shade { opacity: 1; }
.hero--static .hero__title { opacity: 1; pointer-events: auto; }

/* ---------- story ---------- */
.story { padding-block: clamp(110px, 20vh, 240px) clamp(60px, 10vh, 120px); }
.story .wrap { display: grid; gap: 28px; }
.story__text {
  margin: 0; max-width: 26ch;
  font-family: var(--f-body); font-weight: 600;
  font-size: clamp(1.9rem, 1.1rem + 3.1vw, 4.4rem); line-height: 1.08; letter-spacing: -0.012em;
  text-wrap: pretty;
}
.story__text em { font-style: normal; color: var(--gold); }

/* ---------- cast ---------- */
.char {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(90px, 14vh, 170px);
}
.char__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 50% at 74% 40%, color-mix(in srgb, var(--c1) 34%, transparent), transparent 72%),
    radial-gradient(70% 60% at 15% 100%, color-mix(in srgb, var(--c3) 95%, transparent), transparent 75%),
    linear-gradient(180deg, var(--ink) 0%, var(--c3) 42%, var(--c3) 60%, var(--ink) 100%);
}
.char--flip .char__bg {
  background:
    radial-gradient(55% 50% at 26% 40%, color-mix(in srgb, var(--c1) 34%, transparent), transparent 72%),
    radial-gradient(70% 60% at 85% 100%, color-mix(in srgb, var(--c3) 95%, transparent), transparent 75%),
    linear-gradient(180deg, var(--ink) 0%, var(--c3) 42%, var(--c3) 60%, var(--ink) 100%);
}
.char__inner {
  max-width: var(--max); margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas: "head head" "body art" "shots shots";
  column-gap: clamp(24px, 5vw, 80px); row-gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.char--flip .char__inner { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); grid-template-areas: "head head" "art body" "shots shots"; }
.char__head { grid-area: head; min-width: 0; }
.char--flip .char__head { text-align: right; }
.char__role { margin: 0 0 0.3em; font-family: var(--f-game); font-size: var(--t-game); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c1); text-shadow: 1px 1px 0 var(--black); }
.char__role span { color: var(--mute); }
.char__name {
  margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(4rem, 1.6rem + 11.5vw, 14rem); line-height: 0.84; letter-spacing: 0.005em;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, var(--c2) 8%, var(--c1) 62%, color-mix(in srgb, var(--c1) 70%, var(--black)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.03em 0 rgba(0, 0, 0, 0.6));
}
.char__body { grid-area: body; display: grid; gap: 22px; min-width: 0; }
.char__quote { margin: 0; font-family: var(--f-game); font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.4rem); line-height: 1.1; text-shadow: 2px 2px 0 var(--black); }
.char__bio { margin: 0; max-width: 54ch; font-size: var(--t-lg); line-height: 1.5; color: var(--bone); }
.char__stats {
  margin: 0; max-width: 560px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  background: var(--stone-lo); border: 2px solid var(--stone-lo); border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.char__stats div { padding: 10px 12px; background: var(--stone); box-shadow: inset 0 0 0 1px var(--stone-hi); min-width: 0; }
.char__stats dt { font-family: var(--f-game); font-size: 1.05rem; color: var(--orange); line-height: 1.1; }
.char__stats dd { margin: 2px 0 0; font-family: var(--f-game); font-size: 1.55rem; color: var(--fx-yellow); line-height: 1; overflow-wrap: anywhere; }
.char__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; gap: 0.4em; align-items: baseline;
  padding: 6px 12px; border: 1px solid var(--black); border-radius: 2px; cursor: pointer;
  background: #5d5447; box-shadow: inset 0 0 0 1px #7a6f5f;
  font-family: var(--f-game); font-size: 1.3rem; line-height: 1.1; color: var(--white); text-shadow: 1px 1px 0 var(--black);
  transition: background-color 0.15s;
}
.opt b { font-weight: 400; color: var(--fx-yellow); }
.opt:hover { background: #6e6455; }
.char__art { grid-area: art; position: relative; display: grid; place-items: center; min-height: clamp(260px, 34vw, 480px); }
.char__art::before {
  content: ''; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c1) 50%, transparent), transparent 66%);
}
.char__sprite { position: relative; width: min(78%, 400px); filter: drop-shadow(0 34px 30px rgba(0, 0, 0, 0.55)); }
.char__sprite .sprite { animation: bob 4.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-2deg); } }
.char__shots { grid-area: shots; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }

.js .char .char__name, .js .char .char__body, .js .char .char__shots .shot { transition: transform 1s var(--ease), opacity 1s var(--ease); }
.js .char:not(.is-in) .char__name { transform: translateY(14%); opacity: 0.001; }
.js .char:not(.is-in) .char__body { transform: translateY(40px); opacity: 0.001; }
.js .char:not(.is-in) .char__shots .shot { transform: translateY(60px); opacity: 0.001; }
.js .char .char__shots .shot:nth-child(2) { transition-delay: 0.12s; }

/* ---------- places ---------- */
.places { position: relative; background: var(--ink); }
.places__pin {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3.5vh, 36px);
  padding-block: calc(var(--nav-h) + 12px) 28px; overflow: hidden;
}
.places__head { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: grid; gap: 10px; }
.places__head .display { font-size: clamp(2.8rem, 1.8rem + 4.6vw, 6.8rem); }
.places__viewport { width: 100%; }
.places__track {
  display: flex; gap: clamp(16px, 2vw, 28px); width: max-content;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  will-change: transform;
}
.place {
  position: relative; flex: 0 0 auto; overflow: hidden;
  width: min(80vw, 1060px); height: min(62vh, 600px); min-height: 380px;
  border-radius: 12px; background: var(--ink-3);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.place__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.place__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 8, 6, 0.9) 0%, rgba(11, 8, 6, 0.62) 40%, rgba(11, 8, 6, 0) 76%); }
.place__body {
  position: absolute; left: 0; bottom: 0; top: 0; width: min(560px, 100%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: clamp(20px, 3.5vw, 48px);
}
.place__region { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--f-game); font-size: var(--t-game); text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange); text-shadow: 1px 1px 0 var(--black); }
.place__icon { width: 26px; }
.place__name {
  margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.8rem, 1.6rem + 5vw, 7rem); line-height: 0.88;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.5));
}
.place__tag { margin: 0; font-weight: 700; font-size: var(--t-lg); color: var(--white); line-height: 1.25; }
.place__desc { margin: 0; color: var(--bone); max-width: 46ch; }
.places__progress { width: min(320px, 60vw); height: 3px; margin-inline: auto; background: var(--line); border-radius: 3px; overflow: hidden; }
.places__progress span { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.places--native .places__viewport { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 8px; }
.places--native .place { scroll-snap-align: center; }
.places--native .places__progress { display: none; }

/* ---------- meme wall ---------- */
.memes { padding-bottom: clamp(60px, 10vh, 120px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  background: transparent; font-family: var(--f-game); font-size: 1.3rem; line-height: 1; color: var(--bone);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { border-color: var(--gold); }
.filter[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.wall { columns: 3 300px; column-gap: 22px; }
.meme {
  break-inside: avoid; margin: 0 0 22px;
  background: var(--ink-2); border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: memeIn 0.5s var(--ease) both;
}
@keyframes memeIn { from { opacity: 0; transform: translateY(16px); } }
.meme__open { display: block; color: inherit; text-decoration: none; }
.meme__open .shot, .meme__open .cap { border-radius: 0; box-shadow: none; }
.meme--chat .shot { aspect-ratio: 4 / 3; }
.meme__open:hover .shot__bg { transform: scale(1.05); }
.meme__open:hover .cap__sprite { transform: translateY(-6px) rotate(-4deg); }
.meme__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px 14px; }
.meme__title { margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: 1.4rem; letter-spacing: 0.02em; line-height: 1.1; min-width: 0; }
.meme__tag { font-family: var(--f-game); font-size: 1.1rem; color: var(--orange); text-transform: uppercase; white-space: nowrap; }
.meme__gz { color: var(--fx-green); margin-left: 6px; }
.meme__img { width: 100%; height: auto; }

.cap {
  position: relative; aspect-ratio: 1; max-width: 100%; overflow: hidden;
  container-type: inline-size;
  display: grid; align-content: center; justify-items: center; gap: 3cqi; text-align: center;
  padding: 8cqi;
  background: radial-gradient(circle at 50% 30%, var(--c1), var(--c2) 78%);
}
.cap::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 4px); pointer-events: none; }
.cap__sprite { width: 30cqi; filter: drop-shadow(0 2cqi 0 rgba(0, 0, 0, 0.35)); transition: transform 0.5s var(--ease); }
.cap__big { margin: 0; font-family: var(--f-display); font-size: var(--big, 26cqi); line-height: 0.88; text-transform: uppercase; color: var(--white); text-shadow: 0 1.2cqi 0 rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
.cap__small { margin: 0; font-family: var(--f-game); font-size: clamp(14px, 6.8cqi, 44px); line-height: 1; color: var(--fx-yellow); text-shadow: 0.08em 0.08em 0 var(--black); }

/* ---------- trailer ---------- */
.trailer { padding-block: clamp(60px, 10vh, 120px); }
.trailer__frame {
  position: relative; aspect-ratio: 16 / 9; max-width: 100%; min-height: 340px; overflow: hidden;
  border-radius: 14px; background: var(--ink-3) center / cover no-repeat;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.trailer__frame::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 50%, rgba(11, 8, 6, 0.2), rgba(11, 8, 6, 0.8)); }
.trailer__overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.trailer__overlay .display { font-size: clamp(3rem, 1.6rem + 7vw, 9rem); }
.play {
  position: relative; width: clamp(76px, 9vw, 110px); aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--gold); box-shadow: 0 0 0 10px rgba(255, 211, 77, 0.18), 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.play span { position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%); border-left: 26px solid var(--ink); border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.play:hover { transform: scale(1.06); box-shadow: 0 0 0 16px rgba(255, 211, 77, 0.2), 0 20px 50px rgba(0, 0, 0, 0.5); }
.trailer__note { margin: 0; font-family: var(--f-game); font-size: var(--t-game); color: var(--bone); text-shadow: 1px 1px 0 var(--black); }

/* ---------- pre-order ---------- */
.preorder { padding-block: clamp(60px, 10vh, 120px); }
.preorder__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.preorder__box {
  position: relative; display: grid; gap: 18px; justify-items: start;
  padding: clamp(24px, 4vw, 56px); border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 211, 77, 0.1), rgba(232, 67, 44, 0.06) 50%, rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 211, 77, 0.25);
}
.preorder__box .display { font-size: clamp(2.8rem, 1.8rem + 4vw, 6rem); }
.price { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--f-game); font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.9rem); line-height: 1; color: var(--fx-yellow); text-shadow: 2px 2px 0 var(--black); font-variant-numeric: tabular-nums; }
.price__coins { width: 44px; }
.includes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.includes li { position: relative; padding-left: 26px; }
.includes li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.platforms { margin: 0; font-size: var(--t-sm); color: var(--mute); max-width: 44ch; }
.preorder__art { position: relative; display: grid; place-items: center; min-height: 320px; }
.preorder__art::before { content: ''; position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(232, 67, 44, 0.4), transparent 65%); }
.preorder__cape { position: relative; width: min(70%, 340px); filter: drop-shadow(0 30px 30px rgba(0, 0, 0, 0.5)); }
.preorder__cape .sprite { animation: bob 5s ease-in-out infinite; }

/* ---------- trade window (submit form) ---------- */
.submit { padding-bottom: clamp(80px, 12vh, 140px); }
.trade {
  max-width: 900px; padding: clamp(14px, 2vw, 22px);
  background:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0 3px, transparent 3px 7px),
    var(--stone);
  border: 3px solid var(--stone-lo); border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--stone-hi), 0 30px 70px rgba(0, 0, 0, 0.5);
  font-family: var(--f-game); color: var(--white);
}
.trade__title { text-align: center; font-size: 1.6rem; color: var(--orange); text-shadow: 1px 1px 0 var(--black); margin-bottom: 12px; }
.trade__title b { font-weight: 400; color: var(--white); }
.trade__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trade__panel {
  margin: 0; min-width: 0; display: grid; gap: 6px; align-content: start;
  padding: 14px; border: 2px solid var(--stone-lo); border-radius: 2px;
  background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.trade__panel legend, .trade__legend { padding: 0; margin: 0 0 6px; font-size: 1.4rem; color: var(--orange); text-shadow: 1px 1px 0 var(--black); }
.trade__panel legend { float: left; width: 100%; }
.trade label { font-size: 1.2rem; color: var(--bone); margin-top: 6px; }
.trade input, .trade textarea {
  width: 100%; padding: 8px 10px; border: 2px solid var(--stone-lo); border-radius: 2px;
  background: #241d15; color: var(--fx-yellow);
  font-family: var(--f-game); font-size: 1.35rem; line-height: 1.15;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4);
}
.trade textarea { resize: vertical; min-height: 96px; }
.trade input::placeholder, .trade textarea::placeholder { color: #8a7c63; }
.trade input[type="file"] { color: var(--bone); font-size: 1.1rem; padding: 6px; }
.trade input:focus-visible, .trade textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; }
.trade__offer { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trade__offer li { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; color: var(--fx-yellow); }
.trade__offer li span { width: 32px; flex: 0 0 auto; }
.trade__offer i { font-style: normal; color: var(--mute); }
.trade__value { margin: 10px 0 0; font-size: 1.2rem; color: var(--white); }
.trade__status { margin: 14px 0 10px; text-align: center; font-size: 1.35rem; color: var(--fx-cyan); min-height: 1.4em; }
.trade.is-armed .trade__status { color: var(--fx-yellow); }
.trade.is-armed .trade__panel { box-shadow: inset 0 0 0 2px var(--accept); }
.trade__btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.tbtn {
  min-width: 140px; padding: 8px 18px; cursor: pointer;
  border: 2px solid var(--stone-lo); border-radius: 2px;
  background: linear-gradient(180deg, var(--stone-hi), var(--stone));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-family: var(--f-game); font-size: 1.45rem; line-height: 1.1; text-shadow: 1px 1px 0 var(--black);
}
.tbtn--accept { color: var(--accept); }
.tbtn--decline { color: var(--decline); }
.tbtn:hover { filter: brightness(1.15); }
.tbtn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- footer ---------- */
.foot { padding-block: 64px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--ink-2); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.foot__brand p { margin: 0; color: var(--mute); }
.foot__word { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; text-transform: uppercase; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent !important; margin-bottom: 8px !important; }
.foot__links { display: grid; gap: 6px; }
.foot__links a { text-decoration: none; color: var(--bone); width: fit-content; }
.foot__links a:hover { color: var(--gold); }
.foot__rating { display: flex; gap: 14px; align-items: flex-start; }
.foot__rating p { margin: 0; font-size: var(--t-sm); color: var(--mute); }
.rating { flex: 0 0 auto; display: grid; justify-items: center; width: 64px; padding: 6px 4px; background: var(--white); color: var(--black); border: 3px solid var(--black); box-shadow: 0 0 0 2px var(--white); }
.rating b { font-family: var(--f-display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.rating span { font-family: var(--f-body); font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
.foot__legal { margin-top: 40px; font-size: var(--t-sm); color: var(--mute); max-width: var(--max); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.lightbox__backdrop { position: absolute; inset: 0; background: var(--veil); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade 0.3s; }
@keyframes fade { from { opacity: 0; } }
.lightbox__panel {
  position: relative; width: min(1100px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  background: var(--ink-2); border-radius: 14px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), inset 0 0 0 1px var(--line);
  animation: pop 0.35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.98); } }
.lightbox__media { min-width: 0; background: var(--black); display: grid; align-items: center; }
.lightbox__media .shot, .lightbox__media .cap { border-radius: 0; box-shadow: none; width: 100%; }
.lightbox__info { display: grid; align-content: center; gap: 14px; padding: clamp(20px, 3vw, 40px); padding-bottom: 72px; }
.lightbox__tag { margin: 0; font-family: var(--f-game); font-size: 1.3rem; text-transform: uppercase; color: var(--orange); }
.lightbox__title { margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase; font-size: var(--t-h3); line-height: 0.95; }
.lightbox__cap { margin: 0; color: var(--bone); font-size: var(--t-lg); }
.lightbox__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.lightbox__url { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink); color: var(--bone); font-family: var(--f-game); font-size: 1.1rem; }
.lightbox__nav { position: absolute; bottom: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); cursor: pointer; }
.lightbox__nav::before { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-left: 2px solid var(--bone); border-bottom: 2px solid var(--bone); }
.lightbox__nav--prev { right: 70px; }
.lightbox__nav--prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.lightbox__nav--next { right: 16px; }
.lightbox__nav--next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- trailer player ---------- */
.tv { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; }
.tv__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.9); animation: fade 0.3s; }
.tv__screen {
  position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; max-height: calc(100svh - 32px);
  background: var(--black) center / cover no-repeat; border-radius: 10px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8); animation: pop 0.35s var(--ease);
}
.tv__screen::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.tv__conn {
  position: absolute; left: 4%; top: 6%; padding: 6px 14px;
  background: var(--black); border: 1px solid var(--white);
  font-family: var(--f-game); font-size: clamp(1.1rem, 0.9rem + 1vw, 1.7rem); line-height: 1.2; color: var(--white); text-align: center;
}
.tv__end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; animation: fade 0.5s; }
.tv__big { margin: 0; font-family: var(--f-display); font-size: clamp(2.4rem, 1.4rem + 5vw, 6rem); line-height: 0.95; text-transform: uppercase; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tv__small { margin: 0 0 8px; color: var(--bone); font-size: var(--t-lg); }

/* ---------- NPC dialogue ---------- */
.dialog {
  position: fixed; z-index: 85;
  left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px 18px;
  background: var(--parch); color: var(--black);
  border: 4px solid var(--stone); border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--parch-lo), 0 20px 60px rgba(0, 0, 0, 0.6);
  font-family: var(--f-game); cursor: pointer;
  animation: dialogIn 0.3s var(--ease);
}
@keyframes dialogIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.dialog__head { width: 64px; justify-self: center; }
.dialog__text { display: grid; gap: 4px; text-align: center; }
.dialog__name { margin: 0; font-size: 1.45rem; color: var(--npc-red); line-height: 1; }
.dialog__line { margin: 0; font-size: 1.45rem; line-height: 1.15; min-height: 2.3em; display: grid; place-items: center; }
.dialog__next { justify-self: center; background: none; border: 0; padding: 2px 6px; cursor: pointer; font-family: var(--f-game); font-size: 1.3rem; color: var(--chat-blue); }
.dialog__next:hover { color: var(--white); background: var(--chat-blue); }
.dialog.is-player .dialog__name { color: var(--link-blue); }

/* ---------- game messages ---------- */
.gamechat {
  position: fixed; z-index: 120;
  left: var(--gutter-l); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 32px));
  display: grid; gap: 6px; pointer-events: none;
  transition: bottom 0.3s var(--ease);
}
.dialog:not([hidden]) ~ .gamechat { bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
.menu:not([hidden]) ~ .xp, .menu:not([hidden]) ~ .levelup { opacity: 0; pointer-events: none; }
.gamechat__msg {
  margin: 0; padding: 5px 12px;
  background: var(--parch); color: var(--black);
  border: 2px solid var(--stone); border-radius: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-family: var(--f-game); font-size: 1.3rem; line-height: 1.15;
  animation: msgIn 0.3s var(--ease);
  transition: opacity 0.5s, transform 0.5s;
}
.gamechat__msg.is-out { opacity: 0; transform: translateX(-12px); }
.gamechat__msg--blue { color: var(--link-blue); }
.gamechat__msg--red { color: #b00000; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- click crosses ---------- */
.xcross { position: fixed; z-index: 300; width: 16px; height: 16px; margin: -8px 0 0 -8px; pointer-events: none; animation: xcross 0.42s steps(4) forwards; }
.xcross::before, .xcross::after {
  content: ''; position: absolute; left: 50%; top: 0; width: 3px; height: 100%; margin-left: -1.5px;
  background: currentColor; outline: 1px solid var(--black); transform: rotate(45deg);
}
.xcross::after { transform: rotate(-45deg); }
.xcross--yellow { color: var(--fx-yellow); }
.xcross--red { color: var(--fx-red); }
@keyframes xcross { from { transform: scale(1.2); } to { transform: scale(0.35); opacity: 0.7; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .char__inner, .char--flip .char__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "art" "body" "shots";
  }
  .char--flip .char__head { text-align: left; }
  .char__art { min-height: 220px; }
  .char__sprite { width: min(56%, 260px); }
  .preorder__grid { grid-template-columns: minmax(0, 1fr); }
  .preorder__art { min-height: 220px; order: -1; }
  .preorder__cape { width: min(46%, 220px); }
  .foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot__brand { grid-column: 1 / -1; }
  .lightbox__panel { grid-template-columns: minmax(0, 1fr); }
  .lightbox__info { padding-bottom: 76px; }
  .levelup:not([hidden]) ~ .gamechat { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .nav__trailer { display: none; }
  .nav__word { font-size: 1.3rem; }
  .xp { padding: 4px 8px 4px 5px; gap: 6px; }
  .xp__icon { width: 22px; }
  .xp__skill { font-size: 0.85rem; }
  .xp__lvl { font-size: 1rem; }
  .xp__total { font-size: 1.1rem; min-width: 7.5ch; }
  .char__shots { grid-template-columns: minmax(0, 1fr); }
  .char__stats dd { font-size: 1.3rem; }
  .trade__cols { grid-template-columns: minmax(0, 1fr); }
  .place { width: 86vw; height: 64svh; min-height: 420px; }
  .place__shade { background: linear-gradient(0deg, rgba(11, 8, 6, 0.92) 0%, rgba(11, 8, 6, 0.55) 50%, rgba(11, 8, 6, 0) 80%); }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .dialog { grid-template-columns: 48px minmax(0, 1fr); padding: 12px; }
  .dialog__head { width: 44px; }
  .levelup { font-size: 1.08rem; padding: 10px 12px; grid-template-columns: 32px minmax(0, 1fr); }
  .xp__drops { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fx--scroll > span { padding-left: 0; }
}
