/* Merglings — site styles. Tokens mirror handoff/README.md and the iOS DesignSystem. */

@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("../fonts/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg-deep: #0d0521;
  --bg-mid: #1a0a3d;
  --bg-top: #2d1b69;
  --panel: #1a0a3d;
  --panel-raised: #2d1b69;
  --border: #4a2a8c;
  --border-light: #5a3a8c;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.45);
  --yellow: #ffd84a;
  --yellow-dk: #8b6914;
  --pink: #ff6bd0;
  --pink-hot: #d63a8c;
  --green: #5be85d;
  --green-dk: #1b7a20;
  --blue: #3fb0e8;
  --blue-dk: #1e5c8a;
  --orange: #ffb347;
  --orange-dk: #9c5b0c;
  --red: #ff4a4a;
  --red-soft: #ff6b7a;
  --display: "Press Start 2P", "Courier New", monospace;
  --body: "VT323", "Courier New", monospace;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 60%, var(--bg-deep) 100%) fixed;
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.35;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--yellow); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.4; margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Starfield ---------- */
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#stars i {
  position: absolute; display: block; background: #fff; opacity: .55;
  animation: twinkle var(--d, 3s) ease-in-out var(--o, 0s) infinite alternate;
}
@keyframes twinkle { from { opacity: .15; } to { opacity: .8; } }

main, header.nav, footer { position: relative; z-index: 1; }

/* ---------- Pixel primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-size: 12px; letter-spacing: .5px; text-transform: uppercase;
  padding: 18px 26px; border: 0; cursor: pointer; text-decoration: none; color: #0a2a0c;
  background: var(--green);
  box-shadow: 0 5px 0 #000, inset 0 -5px 0 var(--green-dk), inset 0 3px 0 rgba(255,255,255,.45);
  transition: transform .06s, box-shadow .06s;
  user-select: none;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 #000, inset 0 -5px 0 var(--green-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 #000, inset 0 -5px 0 var(--green-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.blue { background: var(--blue); color: #06243a; box-shadow: 0 5px 0 #000, inset 0 -5px 0 var(--blue-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.blue:hover { box-shadow: 0 3px 0 #000, inset 0 -5px 0 var(--blue-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.blue:active { box-shadow: 0 0 0 #000, inset 0 -5px 0 var(--blue-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.orange { background: var(--orange); color: #3a1e00; box-shadow: 0 5px 0 #000, inset 0 -5px 0 var(--orange-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.orange:hover { box-shadow: 0 3px 0 #000, inset 0 -5px 0 var(--orange-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.orange:active { box-shadow: 0 0 0 #000, inset 0 -5px 0 var(--orange-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.yellow { background: var(--yellow); color: #3a2a00; box-shadow: 0 5px 0 #000, inset 0 -5px 0 var(--yellow-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.yellow:hover { box-shadow: 0 3px 0 #000, inset 0 -5px 0 var(--yellow-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.yellow:active { box-shadow: 0 0 0 #000, inset 0 -5px 0 var(--yellow-dk), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.sm { font-size: 9px; padding: 12px 16px; box-shadow: 0 3px 0 #000, inset 0 -4px 0 var(--green-dk), inset 0 2px 0 rgba(255,255,255,.45); }
.btn.sm.blue { box-shadow: 0 3px 0 #000, inset 0 -4px 0 var(--blue-dk), inset 0 2px 0 rgba(255,255,255,.45); }
.btn.sm:hover { transform: translateY(1px); }
.btn.sm:active { transform: translateY(3px); }
.btn.lg { font-size: 14px; padding: 22px 34px; }
.btn .apple { width: 18px; height: 18px; }

.panel { background: var(--panel); border: 2px solid var(--border); }
.panel.raised { background: var(--panel-raised); }

.eyebrow { font-family: var(--display); font-size: 10px; letter-spacing: 1px; color: var(--yellow); text-transform: uppercase; }
.eyebrow.pink { color: var(--pink); }
.eyebrow.green { color: var(--green); }
.eyebrow.blue { color: var(--blue); }
.title-stack {
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--pink-hot), 8px 8px 0 var(--bg-mid);
}
.title-stack.white { color: #fff; text-shadow: 3px 3px 0 var(--pink-hot), 6px 6px 0 var(--bg-mid); }

.badge {
  display: inline-block; font-family: var(--display); font-size: 7px; letter-spacing: .5px; padding: 5px 7px;
  color: #000; background: var(--yellow); text-transform: uppercase;
}
.badge.new { background: var(--green); }
.badge.hot { background: var(--red); color: #fff; }
.badge.sale { background: var(--orange); }
.badge.premium { background: var(--pink); }
.badge.exclusive { background: var(--blue); }
.badge.default { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 5, 33, .82); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border);
}
header.nav .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-family: var(--display); font-size: 12px; }
.brand img { width: 36px; height: 36px; border: 2px solid var(--border); }
.brand span { color: var(--yellow); text-shadow: 2px 2px 0 var(--pink-hot); }
nav.links { display: flex; gap: 18px; margin-left: auto; }
nav.links a { font-family: var(--display); font-size: 9px; color: var(--text-2); text-decoration: none; letter-spacing: .5px; padding: 8px 2px; border-bottom: 2px solid transparent; }
nav.links a:hover { color: var(--yellow); border-color: var(--yellow); }
header.nav .btn.sm { margin-left: 8px; }
.burger { display: none; margin-left: auto; background: none; border: 2px solid var(--border); color: #fff; font-family: var(--display); font-size: 9px; padding: 10px; cursor: pointer; }
@media (max-width: 900px) {
  nav.links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-deep); border-bottom: 2px solid var(--border); padding: 8px 20px 16px; }
  nav.links.open { display: flex; }
  nav.links a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .burger { display: block; }
  header.nav .btn.sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 120px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); margin: 18px 0 10px; animation: heroPulse 3.6s ease-in-out infinite; }
@keyframes heroPulse { 0%,100% { text-shadow: 4px 4px 0 var(--pink-hot), 8px 8px 0 var(--bg-mid); } 50% { text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 var(--bg-mid); } }
.hero .sub { font-family: var(--display); font-size: clamp(11px, 1.6vw, 16px); color: #fff; margin-bottom: 22px; line-height: 1.7; }
.hero .lead { font-size: 24px; color: var(--text-2); max-width: 520px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 20px; }
.hero .stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .stat { border: 2px solid var(--border); background: rgba(26,10,61,.8); padding: 10px 14px; font-family: var(--display); font-size: 8px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.hero .stat b { color: var(--yellow); font-weight: 400; font-size: 10px; }
.hero .stat img { width: 16px; height: 16px; }

/* Phone frame with playable board */
.phone {
  position: relative; margin: 0 auto; width: min(360px, 100%);
  background: #000; border: 4px solid #2b2140; border-radius: 34px; padding: 14px 12px 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 2px #0b0416;
}
.phone .screen { background: linear-gradient(180deg, var(--bg-top), var(--bg-mid) 70%, var(--bg-deep)); border-radius: 22px; padding: 30px 12px 16px; position: relative; overflow: hidden; }
.phone .notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 88px; height: 22px; background: #000; border-radius: 12px; }
.hud { display: flex; justify-content: space-between; align-items: stretch; gap: 8px; margin-bottom: 10px; }
.hud .box { flex: 1; border: 2px solid var(--border); background: var(--bg-mid); text-align: center; padding: 8px 4px; }
.hud .box small { display: block; font-family: var(--display); font-size: 7px; color: var(--yellow); letter-spacing: 1px; }
.hud .box.best small { color: var(--pink); }
.hud .box strong { display: block; font-family: var(--display); font-size: 12px; margin-top: 5px; font-weight: 400; }
.highest { display: flex; align-items: center; gap: 10px; border: 2px solid var(--border); background: var(--bg-mid); padding: 8px; margin-bottom: 10px; }
.highest .tile-mini { width: 40px; height: 40px; border: 2px solid; display: grid; place-items: center; }
.highest .tile-mini img { width: 28px; height: 28px; }
.highest .t { font-family: var(--display); font-size: 7px; color: var(--yellow); letter-spacing: 1px; }
.highest .n { font-family: var(--display); font-size: 10px; margin-top: 4px; }
.highest .s { font-family: var(--body); font-size: 15px; color: var(--text-2); margin-top: 2px; }

.board {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 14px;
  background: rgba(255,255,255,.06); padding: var(--gap); --gap: 8px; --cells: 4;
  outline: none; touch-action: none; user-select: none;
}
.board:focus-visible { box-shadow: 0 0 0 3px var(--yellow); }
.board .cells { position: absolute; inset: var(--gap); display: grid; grid-template-columns: repeat(var(--cells), 1fr); gap: var(--gap); }
.board .cells i { background: rgba(255,255,255,.07); border-radius: 8px; }
.board .tiles { position: absolute; inset: var(--gap); }
.tile {
  position: absolute; left: 0; top: 0;
  width: calc((100% - (var(--cells) - 1) * var(--gap)) / var(--cells));
  height: calc((100% - (var(--cells) - 1) * var(--gap)) / var(--cells));
  border-radius: 8px; border: 3px solid; display: grid; place-items: center;
  transition: transform .12s ease-out;
  will-change: transform;
}
.tile img { width: 68%; height: 68%; }
.tile .v { position: absolute; top: 3px; left: 5px; font-family: var(--display); font-size: 8px; opacity: .9; }
.tile.spawn { animation: tileSpawn .16s ease-out; }
.tile.merged { animation: tileMerge .22s ease-out; }
@keyframes tileSpawn { from { scale: 0; } 60% { scale: 1.12; } to { scale: 1; } }
@keyframes tileMerge { 0% { scale: 1; } 45% { scale: 1.22; } 100% { scale: 1; } }
.board .overlay {
  position: absolute; inset: 0; border-radius: 14px; background: rgba(13,5,33,.9); display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 16px; z-index: 2;
}
.board .overlay.show { display: flex; animation: fadeIn .2s ease-out; }
.board .overlay h3 { font-size: 14px; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink-hot); }
.board .overlay h3.red { color: var(--red); text-shadow: 3px 3px 0 #5a0d0d; }
.board .overlay img { width: 72px; height: 72px; animation: bob 1s ease-in-out infinite; }
.board .overlay p { font-size: 18px; color: var(--text-2); margin: 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.controls .hint { font-family: var(--display); font-size: 7px; line-height: 1.8; color: var(--text-2); }
.controls .hint b { color: var(--green); font-weight: 400; }
.dpad { display: grid; grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(3, 30px); gap: 3px; }
.dpad button { border: 2px solid var(--border); background: var(--panel-raised); color: var(--yellow); font-family: var(--display); font-size: 10px; cursor: pointer; padding: 0; }
.dpad button:active { background: var(--border); }
.dpad .u { grid-column: 2; grid-row: 1; } .dpad .l { grid-column: 1; grid-row: 2; }
.dpad .r { grid-column: 3; grid-row: 2; } .dpad .d { grid-column: 2; grid-row: 3; }
.dpad .c { grid-column: 2; grid-row: 2; background: var(--bg-deep); font-size: 7px; color: var(--text-3); }
.phone .skinlabel { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; font-family: var(--display); font-size: 7px; padding: 6px 10px; background: var(--yellow); color: #000; letter-spacing: 1px; }
.board.auto::after { content: "● DEMO · TAKE OVER"; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); font-family: var(--display); font-size: 6px; letter-spacing: 1px; color: #000; background: var(--green); padding: 4px 8px; z-index: 3; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Monster parade */
.parade { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; pointer-events: none; overflow: hidden; }
.parade .ground { position: absolute; left: 0; right: 0; bottom: 18px; height: 4px; background: rgba(255,255,255,.18); }
.parade img { position: absolute; bottom: 22px; width: 64px; height: 64px; left: -90px; animation: walk var(--t, 24s) linear var(--delay, 0s) infinite, bob .55s ease-in-out infinite alternate; }
@keyframes walk { from { left: -90px; } to { left: 105%; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-9px); } }
@keyframes bobBig { from { transform: translateY(0); } to { transform: translateY(-16px); } }

@media (max-width: 900px) {
  .hero { padding: 40px 0 120px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap > * { min-width: 0; }
  .hero .lead { font-size: 21px; }
}
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; line-height: 1.6; }
  .btn.lg { font-size: 11px; padding: 16px 18px; width: 100%; }
  .hero .ctas { flex-direction: column; }
  .hero .stat { font-size: 7px; padding: 8px 10px; }
  .phone { padding: 10px 8px 14px; }
  .phone .screen { padding: 26px 8px 12px; }
  .sec-head h2 { font-size: 16px; }
  section { padding: 60px 0; }
  .page .panel { padding: 28px 16px; }
  .page h1 { font-size: 15px; }
  .page p, .page li { font-size: 19px; }
  .page .mascot { width: 64px; height: 64px; }
}

/* ---------- Sections ---------- */
section { padding: 90px 0; }
section.tight { padding: 60px 0; }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(18px, 3vw, 30px); margin-top: 14px; }
.sec-head p { font-size: 23px; color: var(--text-2); max-width: 640px; margin: 14px auto 0; }
.divider { height: 2px; background: var(--border); opacity: .6; }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
.rv.pop { transform: scale(.7); }
.rv.pop.in { transform: scale(1); transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); }

/* Evolution chain */
.chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.mon { text-align: center; padding: 16px 10px 14px; position: relative; }
.mon .tile-big { width: 96px; height: 96px; margin: 0 auto 10px; border: 3px solid; border-radius: 8px; display: grid; place-items: center; position: relative; transition: transform .2s; }
.mon:hover .tile-big { animation: bobBig .35s ease-in-out infinite alternate; }
.mon .tile-big img { width: 66px; height: 66px; }
.mon .tile-big .v { position: absolute; top: 4px; left: 6px; font-family: var(--display); font-size: 8px; }
.mon .stage { font-family: var(--display); font-size: 7px; color: var(--text-3); letter-spacing: 1px; }
.mon .name { font-family: var(--display); font-size: 11px; margin: 6px 0 4px; color: var(--yellow); }
.mon .species { font-size: 18px; color: var(--text-2); }
.mon.legend { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,216,74,.25), 0 0 30px rgba(255,216,74,.2); }
.mon .arrow { position: absolute; right: -14px; top: 52px; font-family: var(--display); color: var(--pink); font-size: 12px; z-index: 2; }
@media (max-width: 700px) { .mon .arrow { display: none; } }

/* Skins */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.skin { padding: 14px; cursor: pointer; transition: transform .15s, border-color .15s; border-color: var(--border); position: relative; }
.skin:hover { transform: translateY(-4px); border-color: var(--accent); }
.skin.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.skin .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.skin .head h3 { font-size: 10px; color: var(--accent); }
.skin .row { display: flex; gap: 8px; justify-content: space-between; background: rgba(0,0,0,.25); padding: 8px; }
.skin .row .t { flex: 1; aspect-ratio: 1; border: 2px solid; border-radius: 6px; display: grid; place-items: center; }
.skin .row .t img { width: 82%; height: 82%; }
.skin .row .t.glow { box-shadow: 0 0 10px var(--glow); }
.skin .kind { font-family: var(--display); font-size: 7px; color: var(--text-3); letter-spacing: 1px; margin: 12px 0 6px; }
.skin .kind.species { color: var(--green); }
.skin .tag { font-size: 18px; color: var(--text-2); min-height: 2.6em; margin: 0 0 12px; }
.skin .foot { display: flex; align-items: center; justify-content: space-between; }
.skin .price { font-family: var(--display); font-size: 9px; color: var(--yellow); display: flex; align-items: center; gap: 6px; }
.skin .price img { width: 14px; height: 14px; }
.skin .try { font-family: var(--display); font-size: 7px; padding: 9px 10px; border: 2px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; letter-spacing: .5px; }
.skin.active .try { background: var(--accent); color: #000; }
.skin:hover .row img { animation: bob .3s ease-in-out infinite alternate; }
.skin:hover .row .t:nth-child(2) img { animation-delay: .08s; }
.skin:hover .row .t:nth-child(3) img { animation-delay: .16s; }
.skin:hover .row .t:nth-child(4) img { animation-delay: .24s; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feat { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.feat .ic { width: 56px; height: 56px; display: grid; place-items: center; border: 2px solid var(--border); background: var(--panel-raised); }
.feat .ic img { width: 40px; height: 40px; }
.feat .ic.icons { width: auto; padding: 4px 6px; gap: 6px; grid-auto-flow: column; }
.feat .ic.icons img { width: 32px; height: 32px; }
.feat h3 { font-size: 11px; color: var(--yellow); }
.feat p { font-size: 20px; color: var(--text-2); margin: 0; }
.feat:hover .ic img { animation: bob .35s ease-in-out infinite alternate; }

/* Power-ups strip */
.pu-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 30px; }
.pu { padding: 14px; text-align: center; }
.pu img { width: 56px; height: 56px; margin: 0 auto 8px; }
.pu b { display: block; font-family: var(--display); font-size: 9px; font-weight: 400; margin-bottom: 4px; }
.pu span { font-size: 18px; color: var(--text-2); }
.pu:hover img { animation: spin .5s ease-in-out; }
@keyframes spin { 50% { transform: rotate(12deg) scale(1.15); } }

/* Daily / quests row */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.quest-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.q { display: flex; align-items: center; gap: 12px; border: 2px solid var(--border); background: rgba(0,0,0,.2); padding: 8px 10px; }
.q img { width: 28px; height: 28px; }
.q b { font-family: var(--display); font-size: 8px; font-weight: 400; color: #fff; }
.q span { font-size: 16px; color: var(--text-2); margin-left: auto; text-align: right; }
.q.done { border-color: var(--green); }
.q.done b { color: var(--green); }
.streak { display: flex; gap: 6px; margin-top: 14px; }
.streak i { flex: 1; aspect-ratio: 1; border: 2px solid var(--border); display: grid; place-items: center; font-family: var(--display); font-size: 7px; color: var(--text-3); background: rgba(0,0,0,.2); }
.streak i.on { background: var(--orange); color: #3a1e00; border-color: var(--orange-dk); }
.streak i.today { border-color: var(--yellow); color: var(--yellow); animation: blink 1.4s steps(2) infinite; }

/* Screens */
.screens { display: flex; gap: 22px; overflow-x: auto; padding: 20px 20px 34px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.screens figure { margin: 0; flex: 0 0 240px; scroll-snap-align: center; transition: transform .25s; }
.screens figure:hover { transform: translateY(-8px) rotate(-1.5deg); }
.screens figure img { border: 4px solid #2b2140; border-radius: 26px; background: #000; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.screens figcaption { text-align: center; font-family: var(--display); font-size: 8px; color: var(--text-2); margin-top: 12px; letter-spacing: 1px; }

/* Final CTA */
.cta-final { text-align: center; padding: 100px 0 80px; position: relative; overflow: hidden; }
.cta-final .dragon { width: 160px; height: 160px; margin: 0 auto 10px; animation: bobBig .9s ease-in-out infinite alternate; filter: drop-shadow(0 0 24px rgba(255,216,74,.5)); }
.cta-final h2 { font-size: clamp(18px, 3.4vw, 34px); margin: 10px 0 16px; }
.cta-final p { font-size: 24px; color: var(--text-2); max-width: 560px; margin: 0 auto 30px; }
.cta-final .orbit { position: absolute; width: 48px; height: 48px; opacity: .8; pointer-events: none; animation: float 6s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-30px) rotate(6deg); } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--yellow); color: #000; font-family: var(--display); font-size: 9px; padding: 14px 18px; box-shadow: 0 4px 0 #000; z-index: 50; transition: .25s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Footer */
footer { border-top: 2px solid var(--border); padding: 40px 0 60px; background: rgba(13,5,33,.6); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
footer h4 { font-size: 9px; color: var(--yellow); letter-spacing: 1px; margin-bottom: 14px; }
footer a { color: var(--text-2); text-decoration: none; display: block; font-size: 19px; padding: 3px 0; }
footer a:hover { color: var(--yellow); }
footer .about { font-size: 18px; color: var(--text-3); max-width: 380px; }
footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; font-family: var(--display); font-size: 7px; color: var(--text-3); letter-spacing: 1px; line-height: 2; }
@media (max-width: 700px) { footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Legal / text pages ---------- */
.page { padding: 50px 0 90px; }
.page .panel { max-width: 860px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 56px); }
.page h1 { font-size: clamp(16px, 3vw, 24px); line-height: 1.6; margin-bottom: 8px; }
.page .meta { font-family: var(--display); font-size: 8px; color: var(--text-3); letter-spacing: 1px; line-height: 2; margin-bottom: 30px; }
.page h2 { font-size: 12px; color: var(--yellow); margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); line-height: 1.7; }
.page h3 { font-size: 9px; color: var(--pink); margin: 24px 0 8px; letter-spacing: 1px; }
.page p, .page li { font-size: 21px; color: rgba(255,255,255,.85); }
.page ul, .page ol { padding-left: 26px; }
.page li { margin-bottom: 6px; }
.page table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 19px; }
.page th, .page td { border: 2px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.page th { font-family: var(--display); font-size: 8px; color: var(--yellow); background: rgba(0,0,0,.25); letter-spacing: 1px; }
.page .callout { border: 2px solid var(--green); background: rgba(91,232,93,.08); padding: 16px 18px; margin: 18px 0 26px; }
.page .callout.warn { border-color: var(--orange); background: rgba(255,179,71,.08); }
.page .callout p:last-child { margin: 0; }
.page .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.page .toc li { margin: 0; }
.page .toc a { font-family: var(--display); font-size: 7px; letter-spacing: .5px; text-decoration: none; color: var(--text-2); border: 2px solid var(--border); padding: 8px 10px; display: inline-block; }
.page .toc a:hover { color: var(--yellow); border-color: var(--yellow); }
.page .mascot { float: right; width: 96px; height: 96px; margin: 0 0 12px 18px; animation: bob 1s ease-in-out infinite alternate; }
.page .backrow { max-width: 860px; margin: 0 auto 18px; display: flex; align-items: center; gap: 14px; }
.page .backrow a.back { font-family: var(--display); font-size: 8px; color: var(--yellow); text-decoration: none; border: 2px solid var(--border); padding: 10px 12px; }
.page .backrow a.back:hover { border-color: var(--yellow); }
.page code { font-family: var(--body); background: rgba(0,0,0,.35); padding: 1px 6px; border: 1px solid var(--border); font-size: 19px; }
.page .faq details { border: 2px solid var(--border); background: rgba(0,0,0,.2); margin-bottom: 8px; }
.page .faq summary { cursor: pointer; font-family: var(--display); font-size: 9px; padding: 14px 16px; line-height: 1.6; list-style: none; }
.page .faq summary::before { content: "▸ "; color: var(--pink); }
.page .faq details[open] summary::before { content: "▾ "; }
.page .faq details > div { padding: 0 16px 14px; }
.page .faq details > div p:last-child { margin: 0; }
.page .contact-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 26px; }
.page .contact-card > div { border: 2px solid var(--border); background: rgba(0,0,0,.2); padding: 16px; }
.page .contact-card b { display: block; font-family: var(--display); font-size: 8px; color: var(--yellow); letter-spacing: 1px; margin-bottom: 8px; }
.page .contact-card a { word-break: break-all; }
.mono-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.mono-row .tile-mini { width: 44px; height: 44px; border: 2px solid; border-radius: 6px; display: grid; place-items: center; }
.mono-row .tile-mini img { width: 30px; height: 30px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
}
