/* Mas Dhoani website (redesign, 8 Oct 2026). A night-sea game site: deep ink blues, the game's sunset gold and coral,
   the game's own pixel art at whole-pixel scales, calm type. Motion lives in js/motion.js and js/home.js; everything here
   works without it (and prefers-reduced-motion turns it off).
   Fonts are self-hosted (SIL Open Font License: /fonts/OFL-*.txt): Pixelify Sans (the game's display face), Atkinson
   Hyperlegible, Noto Sans Thaana. */
@font-face { font-family: 'Pixelify Sans'; font-display: swap; src: url('/fonts/PixelifySans-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url('/fonts/AtkinsonHyperlegible-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url('/fonts/AtkinsonHyperlegible-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans Thaana'; font-display: swap; src: url('/fonts/NotoSansThaana-thaana.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  /* the night sea */
  --ink-0: #040a13;
  --ink-1: #08111f;
  --ink-2: #0c192b;
  --ink-3: #112339;
  --ink-4: #183050;
  --line: rgba(140, 180, 230, 0.14);
  --line-2: rgba(140, 180, 230, 0.26);
  --text: #f4efe4;
  --text-2: #c9d4e1;
  --muted: #93a7be;
  /* the game's colours */
  --gold: #f2c230;
  --gold-hi: #ffd84a;
  --gold-pale: #fff0a0;
  --gold-lo: #b8860b;
  --gold-ink: #241604;
  --ember: #ff8a5c;
  --rose: #e2647f;
  --sea: #1aa3d4;
  --teal: #4fd1c5;
  --outline: #25131a;
  --ok: #4fd18b;
  --warn: #f2b84b;
  --bad: #ff7a7a;
  --info: #7fc8ff;
  --mythic-a: #ff8ae8;
  --mythic-b: #ffd84a;
  --mythic-c: #6ee7d8;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Pixelify Sans', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --thaana: 'Noto Sans Thaana', 'MV Faruma', 'Faruma', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* the pixel frame: dark outline, a gold line, a dark inner line, stepped corners (9-slice, 3 px border) */
  --frame-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cg fill='%2325131a'%3E%3Crect x='2' width='5' height='1'/%3E%3Crect x='2' y='8' width='5' height='1'/%3E%3Crect y='2' width='1' height='5'/%3E%3Crect x='8' y='2' width='1' height='5'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%23f2c230'%3E%3Crect x='2' y='1' width='5' height='1'/%3E%3Crect x='2' y='7' width='5' height='1'/%3E%3Crect x='1' y='2' width='1' height='5'/%3E%3Crect x='7' y='2' width='1' height='5'/%3E%3C/g%3E%3Cg fill='%230b1526'%3E%3Crect x='2' y='2' width='5' height='1'/%3E%3Crect x='2' y='6' width='5' height='1'/%3E%3Crect x='2' y='2' width='1' height='5'/%3E%3Crect x='6' y='2' width='1' height='5'/%3E%3C/g%3E%3C/svg%3E");
  --frame-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cg fill='%2325131a'%3E%3Crect x='2' width='5' height='1'/%3E%3Crect x='2' y='8' width='5' height='1'/%3E%3Crect y='2' width='1' height='5'/%3E%3Crect x='8' y='2' width='1' height='5'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%23416a96'%3E%3Crect x='2' y='1' width='5' height='1'/%3E%3Crect x='2' y='7' width='5' height='1'/%3E%3Crect x='1' y='2' width='1' height='5'/%3E%3Crect x='7' y='2' width='1' height='5'/%3E%3C/g%3E%3Cg fill='%230b1526'%3E%3Crect x='2' y='2' width='5' height='1'/%3E%3Crect x='2' y='6' width='5' height='1'/%3E%3Crect x='2' y='2' width='1' height='5'/%3E%3Crect x='6' y='2' width='1' height='5'/%3E%3C/g%3E%3C/svg%3E");
  /* stepped corners for buttons and plates */
  --notch: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip;
  background: var(--ink-1); color: var(--text);
  font: 400 17px/1.62 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, video, canvas { max-width: 100%; }
img { height: auto; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold-hi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-pale); }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
.dv { font-family: var(--thaana); direction: rtl; unicode-bidi: isolate; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.tnum { font-variant-numeric: tabular-nums; }
.hide, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; clip-path: none; z-index: 99; padding: 10px 14px; background: var(--gold); color: var(--gold-ink); border-radius: 8px; font-weight: 700; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.01em; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 4.2vw, 2.9rem); letter-spacing: 0.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(1.04rem, 1.4vw, 1.16rem); color: var(--text-2); max-width: 60ch; }
.hl { color: var(--gold-hi); }
/* the eyebrow: small capitals between two gold rules with pixel tips, like the logo's */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi); font-weight: 700; margin-bottom: 12px; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: linear-gradient(90deg, transparent 0 2px, var(--gold) 2px); box-shadow: -2px 0 0 0 transparent; }
.eyebrow::after { content: ''; width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); margin-left: -4px; order: -1; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(6, 13, 24, 0.82); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid var(--line); transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease); }
.home .top { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(4, 10, 19, 0.55), rgba(4, 10, 19, 0)); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.home .top.is-solid { background: rgba(6, 13, 24, 0.86); border-bottom-color: var(--line); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; max-width: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.02em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.4); }
.brand:hover { color: var(--gold-hi); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--gold-hi); }
.nav .btn { margin-left: 8px; }
.nav a.btn, .nav a.btn:hover { color: var(--gold-ink); }
.nav a.btn[aria-current="page"] { color: var(--gold-ink); }
.home .top:not(.is-solid) .nav a:not(.btn), .home .top:not(.is-solid) .brand { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.6); color: #fff; }
.hdr-maker { display: flex; align-items: center; padding-left: 14px; border-left: 1px solid var(--line); }
.hdr-maker img { display: block; width: 62px; height: 42px; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 9px; font-size: 0.92rem; }
  .nav .btn { padding: 8px 12px; margin-left: 4px; }
}
@media (max-width: 359px) { .nav .btn { display: none; } }

/* ---------- buttons ---------- */
.btn {
  --c: var(--gold-ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px; border: 0; border-radius: 0; clip-path: var(--notch);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 52%, #d9a21c 100%);
  color: var(--c); font: 700 1rem/1.1 var(--font); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(120, 70, 0, 0.45);
  transition: transform 0.18s var(--ease), filter 0.2s ease, background-color 0.2s ease;
}
.btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 66%); transform: translateX(-120%); transition: transform 0.7s var(--ease); }
.btn:hover { color: var(--c); filter: brightness(1.05); transform: translateY(-1px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-off { cursor: not-allowed; filter: grayscale(0.7) brightness(0.7); transform: none; }
.btn[disabled]::after, .btn.is-off::after { display: none; }
.btn.ghost { background: rgba(8, 17, 31, 0.35); color: var(--text); box-shadow: inset 0 0 0 2px var(--line-2); }
.btn.ghost::after { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.12) 48%, transparent 66%); }
.btn.ghost:hover { background: rgba(24, 48, 80, 0.6); color: var(--text); box-shadow: inset 0 0 0 2px rgba(242, 194, 48, 0.6); }
.btn.quiet { background: var(--ink-4); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 2px 0 rgba(255, 255, 255, 0.06); }
.btn.quiet:hover { background: #21406a; color: var(--text); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 2px rgba(255, 122, 122, 0.5); }
.btn.danger:hover { color: #ffb0b0; }
.btn.ok { background: linear-gradient(180deg, #8ff0b8, var(--ok) 55%, #2a9d62); color: #062011; }
.btn.small { min-height: 36px; padding: 7px 14px; font-size: 0.92rem; }
.btn.big { min-height: 52px; padding: 13px 26px; font-size: 1.05rem; }
.btn.mega { min-height: 64px; padding: 18px 40px; font-size: 1.25rem; font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; }
.btn.wide { width: 100%; }
.btn .sub { font-weight: 400; opacity: 0.8; font-size: 0.85rem; }
.btn.shimmer::after { animation: sweep 3.2s 1.2s var(--ease) infinite; }
@keyframes sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-hi); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- surfaces ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(24, 48, 80, 0.55), rgba(12, 25, 43, 0.75)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.card.flat { background: var(--ink-2); }
.card.grid { align-content: start; }
.section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.note { border: 1px solid var(--line-2); border-left: 3px solid var(--gold); background: rgba(17, 35, 57, 0.75); border-radius: var(--radius-s); padding: 12px 14px; color: var(--text-2); }
.note.warn { border-left-color: var(--warn); }
.note.bad { border-left-color: var(--bad); }
.note.ok { border-left-color: var(--ok); }
.note p:last-child { margin-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid var(--line-2); color: var(--text-2); background: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.s-open { color: var(--warn); }
.pill.s-paid { color: var(--info); }
.pill.s-confirmed { color: var(--ok); }
.pill.s-rejected, .pill.s-revoked { color: var(--bad); }
.pill.s-cancelled, .pill.s-expired { color: var(--muted); }
.tag-mythic { display: inline-block; padding: 2px 9px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #1b0f1d; background: linear-gradient(90deg, var(--mythic-a), var(--mythic-b), var(--mythic-c), var(--mythic-a)); background-size: 200% 100%; clip-path: var(--notch); animation: mythicSlide 4s linear infinite; }
.grid { display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.cols-2 { grid-template-columns: 1fr; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rw-row { color: var(--gold-hi); }
@media (min-width: 860px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

/* the pixel frame round game footage and art */
.frame { position: relative; margin: 0; border: 12px solid transparent; border-image: var(--frame-gold) 3 / 12px / 0 stretch; image-rendering: pixelated; background: #000; background-clip: padding-box; }
.frame.blue, .frame.muted { border-image-source: var(--frame-blue); }
.frame .clip { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #0a1626; }
@media (max-width: 600px) { .frame { border-width: 9px; border-image-width: 9px; } }
/* a plate in the game's style: dark, gold text */
.plate { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); font: 400 clamp(0.9rem, 2.4vw, 1.1rem) var(--display); letter-spacing: 0.06em; color: var(--gold-hi); background: rgba(10, 20, 38, 0.88); padding: 6px 14px; clip-path: var(--notch); white-space: nowrap; text-shadow: 0 2px 0 var(--outline); box-shadow: inset 0 0 0 2px rgba(242, 194, 48, 0.5); }

/* ---------- motion helpers (js/motion.js adds .is-in, and .in-view while a [data-progress] section is on screen) ---------- */
/* nothing animates off screen: a section's looping animations wait until it is in view */
.js [data-progress]:not(.in-view) :is(.taps i, .plate, .tug i, .lamps i, .bubbles i, .px-sprite, .stars, .row i, .appicon, .st-art img, .pin, .vs, .rw-coin, .rw-coin img),
.js [data-progress]:not(.in-view) :is(.reward-strip)::after,
.js [data-progress]:not(.in-view) :is(.leg, .shop-teaser, .btn)::before, .js [data-progress]:not(.in-view) .btn::after,
.js .hero:not(.in-view) :is(.lg, .catch-hint, .scroll-cue i), .js .hero:not(.in-view) :is(.ring, .scroll-cue i)::after { animation-play-state: paused !important; }
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-stagger] > * { opacity: 0; transform: translateY(24px) scale(0.97); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 0.1s); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-stagger] { opacity: 1; transform: none; }

/* ======================================================================= HOME ======================================== */
/* ---------- the hero: sticky stage over a taller section, so the scroll can sink the view (js/home.js) ---------- */
.hero { position: relative; height: 175vh; height: 175svh; background: #0a1626; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-poster img, .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster img { object-fit: cover; object-position: 100% 50%; }
@media (max-aspect-ratio: 10/11) { .hero-poster img { object-position: 0% 50%; } }
.hero-sea { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; opacity: 0; transition: opacity 0.6s ease; touch-action: pan-y; }
.hero.is-live .hero-sea { opacity: 1; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(4, 10, 19, 0.62) 0%, rgba(4, 10, 19, 0.36) 30%, rgba(4, 10, 19, 0) 52%), linear-gradient(0deg, rgba(4, 10, 19, 0.55), rgba(4, 10, 19, 0) 26%); }
.hero-copy { position: absolute; inset: 0; pointer-events: none; padding: calc(64px + clamp(20px, 6vh, 70px)) var(--gutter) 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; will-change: transform, opacity; }
.hero-copy a, .hero-copy button { pointer-events: auto; }
.hero-text { margin-top: clamp(14px, 3vh, 28px); max-width: min(520px, 44vw); }
.tagline { font-size: clamp(1.1rem, 1.7vw, 1.4rem); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(0, 0, 0, 0.6); margin: 0 0 22px; font-weight: 700; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.start { justify-content: flex-start; }
.dl-note { margin: 14px 0 0; color: var(--text-2); font-size: 0.92rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
@media (max-aspect-ratio: 10/11) {
  .hero-shade { background: linear-gradient(180deg, rgba(4, 10, 19, 0.5) 0%, rgba(4, 10, 19, 0) 26%), linear-gradient(0deg, rgba(4, 10, 19, 0.82) 0%, rgba(4, 10, 19, 0.2) 38%, rgba(4, 10, 19, 0) 52%); }
  .hero-copy { align-items: center; text-align: center; padding-top: calc(64px + 2vh); }
  .hero-text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: max(28px, env(safe-area-inset-bottom)); top: auto; max-width: none; margin: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-text .cta { justify-content: center; }
  .tagline { margin-bottom: 18px; }
}
@media (max-aspect-ratio: 10/11) and (max-height: 700px) { .dl-note { display: none; } }

/* the logo, Kandu Crest, in parts (one image, js/home.js sets --px: a whole number of device pixels per logo pixel) */
.logo { --px: 2px; position: relative; width: calc(256 * var(--px)); height: calc(130 * var(--px)); flex: 0 0 auto; filter: drop-shadow(0 6px 0 rgba(4, 10, 19, 0.35)) drop-shadow(0 10px 26px rgba(0, 0, 0, 0.5)); }
@media (max-width: 1100px) { .logo { --px: 1.5px; } }
@media (max-aspect-ratio: 10/11) { .logo { --px: 1.25px; } }
.lg { position: absolute; display: block; background: url('/img/brand/wordmark-1x.webp') no-repeat; background-size: calc(256 * var(--px)) calc(130 * var(--px)); image-rendering: pixelated; image-rendering: crisp-edges;
  left: calc(var(--x) * var(--px)); top: calc(var(--y) * var(--px)); width: calc(var(--w) * var(--px)); height: calc(var(--h) * var(--px)); background-position: calc(var(--x) * var(--px) * -1) calc(var(--y) * var(--px) * -1); }
.lg.crest { --x: 103; --y: 0; --w: 50; --h: 50; }
.lg.rule.l { --x: 0; --y: 30; --w: 103; --h: 7; transform-origin: 100% 50%; }
.lg.rule.r { --x: 153; --y: 30; --w: 103; --h: 7; transform-origin: 0 50%; }
.lg.lt { --y: 52; --h: 32; }
.lg.dv { --x: 83; --y: 84; --w: 89; --h: 46; }
.lg.shine { --x: 0; --y: 52; --w: 256; --h: 78; background: linear-gradient(100deg, transparent 0 40%, rgba(255, 255, 240, 0.85) 48%, transparent 56%) no-repeat; background-size: 300% 100%; background-position: 120% 0;
  -webkit-mask: url('/img/brand/wordmark-1x.webp') no-repeat 0 calc(-52 * var(--px)) / calc(256 * var(--px)) calc(130 * var(--px)); mask: url('/img/brand/wordmark-1x.webp') no-repeat 0 calc(-52 * var(--px)) / calc(256 * var(--px)) calc(130 * var(--px)); opacity: 0.9; mix-blend-mode: soft-light; }
/* the intro (CSS only, so it starts with the first paint; reduced motion: none) */
@media (prefers-reduced-motion: no-preference) {
  /* (the Thaana title is there from the first paint: it is the page's largest picture, so the page counts as drawn at once;
     the rules run out from the crest, the crest drops in and the letters fall into place above it) */
  .logo .rule { animation: ruleOut 0.8s 0.15s var(--ease) both; }
  .logo .crest { animation: crestIn 0.9s 0s var(--ease-back) both; }
  .logo .lt { animation: dropIn 0.6s calc(0.25s + var(--i) * 0.05s) var(--ease-back) both; }
  .logo .dv { animation: dvGlow 3.2s 1.2s ease-in-out infinite; }
  .logo .shine { animation: shine 1.3s 0.95s var(--ease) both, shineIdle 8s 6s ease-in-out infinite; }
  .hero-text { animation: heroRise 0.9s 0.1s var(--ease) both; }
  .catch { animation: fadeIn 0.8s 1.2s ease both; }
  .scroll-cue { animation: fadeUp 0.9s 1.1s var(--ease) both; }
}
@keyframes ruleOut { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes crestIn { 0% { transform: translateY(-60%) scale(0.4) rotate(-25deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes dropIn { 0% { transform: translateY(-120%); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes dvGlow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(255, 216, 74, 0.55)); } }
@keyframes heroRise { from { transform: translateY(16px); } to { transform: none; } }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes shineIdle { 0%, 82% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* tap the fish: the hint (a button, for keyboards too) and the catch count */
.catch { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; transform: translate3d(70vw, 72vh, 0); width: max-content; white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: opacity 0.3s ease; will-change: transform; }
.catch-hint { pointer-events: auto; position: relative; display: inline-flex; align-items: center; gap: 8px; font: 700 0.86rem var(--font); letter-spacing: 0.04em; color: var(--gold-ink); background: var(--gold-hi); border: 0; padding: 7px 12px 7px 10px; clip-path: var(--notch); cursor: pointer; box-shadow: inset 0 -2px 0 rgba(120, 70, 0, 0.4); animation: hintBob 2.4s ease-in-out infinite; }
.catch-hint .ring { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold-ink); position: relative; }
.catch-hint .ring::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--gold-ink); animation: ping 1.4s ease-out infinite; }
.catch.is-done .catch-hint { display: none; }
.catch.no-hint:not(.is-done), .catch.away { visibility: hidden; }
.catch-count { margin: 0; display: none; align-items: center; gap: 8px; font: 400 1rem var(--display); color: #fff; background: rgba(6, 13, 24, 0.72); padding: 5px 12px; clip-path: var(--notch); text-shadow: 0 1px 0 #000; }
.catch-count img { width: 28px; height: 12px; }
.catch.is-done { left: auto; right: var(--gutter); top: auto; bottom: 24px; transform: none !important; }
.catch.is-done .catch-count { display: inline-flex; }
@media (max-aspect-ratio: 10/11) { .catch.is-done { left: 12px; right: auto; bottom: auto; top: calc(var(--sea-y, 50vh) + 14px); } }
.plus { position: absolute; z-index: 4; pointer-events: none; font: 400 1.25rem var(--display); color: var(--gold-hi); text-shadow: 0 2px 0 var(--outline), 0 0 12px rgba(255, 216, 74, 0.6); animation: plus 1.1s var(--ease) forwards; white-space: nowrap; transform: translate(-50%, -50%); }
.plus.gold { font-size: 1.5rem; color: #fff6c8; }
@keyframes plus { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 18% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -220%) scale(1); } }
@keyframes hintBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.scroll-cue i { width: 2px; height: 34px; background: linear-gradient(180deg, var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: -12px; width: 2px; height: 12px; background: #fff; animation: drip 1.8s ease-in infinite; }
@keyframes drip { to { transform: translateY(46px); } }
@media (max-aspect-ratio: 10/11) { .scroll-cue { display: none; } }

/* ---------- the story chapters ---------- */
/* (below the first screen, the browser lays a section out only when it comes near: a fast first paint) */
.story > .ch, .trailer, .beta-cta, .get { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.story { position: relative; background: linear-gradient(180deg, #0a1626 0, var(--ink-1) 340px); }
.ch { position: relative; isolation: isolate; padding: clamp(80px, 12vh, 140px) 0; overflow: hidden; }
.ch-grid { display: grid; gap: clamp(32px, 6vw, 90px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ch-grid { grid-template-columns: 1.05fr 0.95fr; } .ch-grid.flip > .ch-copy { order: 2; } }
.ch-copy { position: relative; max-width: 600px; }
.ch-n { display: block; margin: 0 0 6px; font: 400 clamp(3.2rem, 6.5vw, 5.4rem)/0.85 var(--display); color: transparent; -webkit-text-stroke: 1px rgba(242, 194, 48, 0.45); transform: translateY(calc((0.5 - var(--p, 0.5)) * 50px)); pointer-events: none; user-select: none; }
.ch-head { max-width: 760px; margin-bottom: clamp(30px, 5vw, 56px); position: relative; }
.ch-media { position: relative; display: flex; justify-content: center; }
.ch-media .frame { width: min(100%, 330px); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: var(--text-2); }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 8px; height: 8px; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: 0 0 10px var(--gold); }
.tilt { transform: perspective(1200px) rotateY(calc((var(--p, 0.5) - 0.5) * -14deg)) rotateX(calc((var(--p, 0.5) - 0.5) * 6deg)) translateY(calc((0.5 - var(--p, 0.5)) * 40px)); transition: transform 0.12s linear; }
.ch-media .frame:not(.tilt) { transform: translateY(calc((0.5 - var(--p, 0.5)) * 50px)); }

/* 01 tap: taps landing anywhere on the screen */
.taps i { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid rgba(255, 216, 74, 0.95); box-shadow: 0 0 18px rgba(255, 216, 74, 0.5); opacity: 0; pointer-events: none; }
.taps i:nth-child(1) { left: 30%; top: 46%; animation: tap 1.5s 0.2s ease-out infinite; }
.taps i:nth-child(2) { left: 66%; top: 58%; animation: tap 1.5s 0.7s ease-out infinite; }
.taps i:nth-child(3) { left: 46%; top: 72%; animation: tap 1.5s 1.2s ease-out infinite; }
@keyframes tap { 0% { transform: scale(0.3); opacity: 0; } 12% { opacity: 1; } 60% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }
.ch-tap .plate { bottom: 9%; animation: platePulse 1s steps(2) infinite; }
@keyframes platePulse { 50% { color: #fff; } }

/* 02 race: two clips and the tug of war */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; max-width: 560px; margin: 0 auto; }
.duo .frame { width: 100%; }
.duo .f-a { transform: translateY(calc((0.5 - var(--p, 0.5)) * 70px)) rotate(-2deg); }
.duo .f-b { transform: translateY(calc(40px + (var(--p, 0.5) - 0.5) * 70px)) rotate(2deg); }
.tug { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; }
.vs { font: 400 clamp(1.6rem, 4vw, 2.4rem) var(--display); color: #fff; background: linear-gradient(180deg, var(--rose), #a3304e); padding: 6px 14px; clip-path: var(--notch); text-shadow: 0 3px 0 var(--outline); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.tug .bar { position: relative; width: 120px; height: 10px; background: linear-gradient(90deg, var(--gold) 50%, var(--rose) 50%); clip-path: var(--notch); box-shadow: inset 0 0 0 2px var(--outline); }
.tug .bar i { position: absolute; top: -3px; left: 50%; width: 10px; height: 16px; margin-left: -5px; background: #fff; box-shadow: 0 0 0 2px var(--outline); animation: tugKnot 2.6s ease-in-out infinite; }
@keyframes tugKnot { 0%, 100% { transform: translateX(-34px); } 45% { transform: translateX(30px); } 70% { transform: translateX(10px); } }

/* 03 the campaign: night, and a row of lamps beyond the reef */
.ch.dark { background: radial-gradient(120% 70% at 70% 30%, #13213d 0%, #070d1a 60%, #04080f 100%); }
.lamps { position: absolute; left: 0; right: 0; top: 18%; height: 40px; pointer-events: none; }
@media (max-width: 899px) { .lamps { top: 34px; } }
.lamps .horizon { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(160, 190, 230, 0.25) 20%, rgba(160, 190, 230, 0.25) 80%, transparent); }
.lamps i { position: absolute; top: calc(50% - 3px); width: 4px; height: 4px; background: #ffe7a6; box-shadow: 0 0 6px 2px rgba(255, 200, 110, 0.9), 0 0 22px 6px rgba(255, 170, 60, 0.35); opacity: calc(var(--on, 0) * 0.9); transform: translateY(calc(var(--bob, 0) * 1px)); animation: lampFlicker 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * -0.37s); }
.lamps i:nth-of-type(1) { left: 54%; --k: 1; --on: clamp(0, calc(var(--p, 0) * 6 - 1.2), 1); }
.lamps i:nth-of-type(2) { left: 59%; --k: 2; --on: clamp(0, calc(var(--p, 0) * 6 - 1.5), 1); }
.lamps i:nth-of-type(3) { left: 64%; --k: 3; --on: clamp(0, calc(var(--p, 0) * 6 - 1.8), 1); }
.lamps i:nth-of-type(4) { left: 69%; --k: 4; --on: clamp(0, calc(var(--p, 0) * 6 - 2.1), 1); }
.lamps i:nth-of-type(5) { left: 74%; --k: 5; --on: clamp(0, calc(var(--p, 0) * 6 - 2.4), 1); }
.lamps i:nth-of-type(6) { left: 79%; --k: 6; --on: clamp(0, calc(var(--p, 0) * 6 - 2.7), 1); }
.lamps i:nth-of-type(7) { left: 84%; --k: 7; --on: clamp(0, calc(var(--p, 0) * 6 - 3), 1); }
.lamps i:nth-of-type(8) { left: 89%; --k: 8; --on: clamp(0, calc(var(--p, 0) * 6 - 3.3), 1); }
/* the passage lamp, far left: dark first, relit as the chapter comes to the middle */
.lamps i:nth-of-type(9) { left: 8%; top: calc(50% - 14px); width: 6px; height: 6px; --k: 0; --on: clamp(0, calc(var(--p, 0) * 5 - 2), 1); background: #fff3c4; box-shadow: 0 0 10px 4px rgba(255, 220, 140, 0.95), 0 0 50px 18px rgba(255, 190, 90, 0.35); animation: none; }
@keyframes lampFlicker { 0%, 100% { filter: brightness(1); } 40% { filter: brightness(0.7); } 55% { filter: brightness(1.15); } }
.ch-campaign .quote { font: 400 clamp(1.3rem, 2.6vw, 1.7rem) var(--display); color: #ffe7a6; text-shadow: 0 0 22px rgba(255, 190, 90, 0.5); margin: 4px 0 0; }
.frame.glow { box-shadow: 0 0 80px rgba(255, 190, 90, 0.16); }

/* 04 free dives: bubbles rising through the chapter */
.ch-dive { background: linear-gradient(180deg, var(--ink-1) 0%, #0a2238 50%, var(--ink-1) 100%); }
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubbles i { position: absolute; bottom: -20px; width: 6px; height: 6px; border-radius: 50%; border: 2px solid rgba(200, 240, 255, 0.35); animation: rise linear infinite; }
.bubbles i:nth-child(odd) { width: 10px; height: 10px; }
.bubbles i:nth-child(1) { left: 6%; animation-duration: 11s; } .bubbles i:nth-child(2) { left: 14%; animation-duration: 8s; animation-delay: -3s; }
.bubbles i:nth-child(3) { left: 22%; animation-duration: 13s; animation-delay: -6s; } .bubbles i:nth-child(4) { left: 33%; animation-duration: 9s; animation-delay: -1s; }
.bubbles i:nth-child(5) { left: 47%; animation-duration: 12s; animation-delay: -8s; } .bubbles i:nth-child(6) { left: 58%; animation-duration: 10s; animation-delay: -4s; }
.bubbles i:nth-child(7) { left: 66%; animation-duration: 14s; animation-delay: -2s; } .bubbles i:nth-child(8) { left: 74%; animation-duration: 9.5s; animation-delay: -7s; }
.bubbles i:nth-child(9) { left: 82%; animation-duration: 12.5s; animation-delay: -5s; } .bubbles i:nth-child(10) { left: 90%; animation-duration: 10.5s; animation-delay: -9s; }
.bubbles i:nth-child(11) { left: 96%; animation-duration: 8.5s; animation-delay: -2.5s; } .bubbles i:nth-child(12) { left: 40%; animation-duration: 15s; animation-delay: -11s; }
@keyframes rise { from { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(10px, -55vh); } to { transform: translate(-6px, -110vh); opacity: 0; } }

/* 05 the trench: darker the further you scroll, and the depth gauge */
.ch-trench { background: linear-gradient(180deg, var(--ink-1), color-mix(in srgb, #01040a calc(var(--p, 0) * 100%), #0a1d33)); }
.ch-trench .ch-media { gap: 18px; align-items: center; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 10px; align-self: stretch; justify-content: center; }
.g-track { position: relative; width: 6px; flex: 1; max-height: 420px; min-height: 200px; background: repeating-linear-gradient(180deg, rgba(140, 180, 230, 0.35) 0 2px, transparent 2px 22px), linear-gradient(180deg, #2a6aa0, #0a1830 30%, #000); clip-path: var(--notch); }
.g-mark { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 18px; height: 6px; margin: -3px 0 0 -9px; background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); }
.g-read { font: 400 1.05rem var(--display); color: var(--gold-hi); white-space: nowrap; min-width: 8ch; text-align: center; }
.zones { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; counter-reset: z; }
.zones li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); background: rgba(8, 17, 31, 0.5); clip-path: var(--notch); transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease; color: var(--muted); }
.zones li b { color: var(--text-2); font-weight: 700; }
.zones li.is-on { border-color: rgba(242, 194, 48, 0.6); background: rgba(242, 194, 48, 0.08); color: var(--gold-hi); }
.zones li.is-on b { color: var(--gold-hi); }
.frame.deep { box-shadow: 0 0 120px rgba(26, 163, 212, 0.12); }
@media (max-width: 899px) { .gauge { display: none; } }

/* 06 legends */
.legends { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.leg { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto auto 1fr; column-gap: 16px; padding: 18px; background: linear-gradient(160deg, rgba(24, 48, 80, 0.65), rgba(8, 17, 31, 0.9)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.leg::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(120deg, var(--mythic-a), var(--mythic-b), var(--mythic-c), var(--mythic-a)); background-size: 300% 300%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.leg.mythic::before { opacity: 1; animation: mythic 6s ease infinite; }
.leg.legendary { border-color: rgba(242, 194, 48, 0.45); }
.leg-art { grid-row: 1 / span 5; width: 96px; height: 96px; display: grid; place-items: center; position: relative; background: radial-gradient(50% 50% at 50% 60%, rgba(255, 216, 74, 0.25), transparent 70%); }
.leg.mythic .leg-art { background: radial-gradient(50% 50% at 50% 60%, rgba(255, 138, 232, 0.28), transparent 70%); }
.px-sprite { width: 96px; height: 96px; background: url('/img/scene/legends.webp') no-repeat; background-size: 384px 576px; background-position: 0 calc(var(--row) * -96px); image-rendering: pixelated; image-rendering: crisp-edges; animation: idle 0.9s steps(4) infinite; filter: drop-shadow(0 0 6px rgba(255, 216, 74, 0.55)); }
.leg.mythic .px-sprite { animation: idle 0.9s steps(4) infinite, auraPulse 1.6s ease-in-out infinite; }
@keyframes idle { from { background-position-x: 0; } to { background-position-x: -384px; } }
@keyframes auraPulse { 0%, 100% { filter: drop-shadow(0 0 5px #ff8ae8); } 50% { filter: drop-shadow(0 0 9px #ffd84a); } }
.leg .tier { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); }
.leg.mythic .tier { background: linear-gradient(90deg, var(--mythic-a), var(--mythic-b), var(--mythic-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.leg b { font-size: 1.12rem; line-height: 1.2; }
.leg .dv { color: var(--gold-hi); font-size: 0.98rem; text-align: left; }
.leg .era { color: var(--muted); font-size: 0.85rem; }
.leg .bio { grid-column: 1 / -1; margin-top: 12px; color: var(--text-2); font-size: 0.93rem; line-height: 1.5; }
@keyframes mythic { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes mythicSlide { to { background-position: -200% 0; } }

/* 07 the species wall (js/home.js draws it) */
.ch-species { padding-bottom: clamp(60px, 9vh, 110px); }
.count { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.wall { position: relative; height: clamp(300px, 46vh, 460px); -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wall-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; cursor: crosshair; }
.wall-tip { position: absolute; z-index: 2; transform: translate(-50%, -130%); pointer-events: none; padding: 6px 12px; background: rgba(6, 13, 24, 0.92); border: 1px solid var(--line-2); clip-path: var(--notch); font-size: 0.88rem; white-space: nowrap; }
.wall-tip b { color: var(--text); } .wall-tip span { color: var(--muted); margin-left: 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.wall-note { margin-top: 18px; color: var(--muted); text-align: center; }

/* 08 the chart */
.chart { width: min(100%, 360px); aspect-ratio: 324 / 600; overflow: hidden; background: #0d2648; border-image-source: var(--frame-blue); }
.chart-zoom { position: absolute; inset: 0; transform-origin: 58% 36%; transform: scale(calc(1 + var(--z, 0) * 2.6)); opacity: calc(1 - var(--g, 0) * 0.6); filter: saturate(calc(1 - var(--g, 0) * 0.4)); }
.chart-zoom img { display: block; width: 100%; height: 100%; }
.grounds-card { position: absolute; left: 0; right: 0; top: 50%; box-shadow: 0 0 0 2px #25131a, 0 0 0 4px rgba(242, 194, 48, 0.8), 0 18px 50px rgba(0, 0, 0, 0.6); transform: translateY(-50%) scale(calc(0.86 + var(--g, 0) * 0.14)); opacity: var(--g, 0); aspect-ratio: 324 / 150; }
.grounds-card img { display: block; width: 100%; height: 100%; }
.pin { position: absolute; left: calc(var(--x) / 324 * 100%); top: calc(var(--y) / 150 * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); opacity: 0; animation: ping 1.8s ease-out infinite; }
.pin.home { border-color: var(--gold-hi); animation-duration: 1.2s; }
.chart.is-ground .pin { opacity: 1; }
.pin:nth-of-type(2) { animation-delay: 0.3s; } .pin:nth-of-type(3) { animation-delay: 0.6s; } .pin:nth-of-type(4) { animation-delay: 0.9s; } .pin:nth-of-type(5) { animation-delay: 1.2s; }
.credit { color: var(--muted); font-size: 0.86rem; }
.credit a { color: var(--text-2); }

/* ---------- the trailer ---------- */
.trailer { position: relative; padding: clamp(90px, 14vh, 160px) 0; overflow: hidden; background: #050b15; }
.trailer-amb { position: absolute; inset: -10%; background: url('/video/trailer-poster.webp') center / cover no-repeat; filter: blur(60px) saturate(1.3); opacity: 0.32; transform: scale(calc(1.1 + var(--p, 0.5) * 0.15)); }
.trailer::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, transparent, #050b15 90%); pointer-events: none; }
.trailer-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; justify-items: center; text-align: center; }
@media (min-width: 900px) { .trailer-grid { grid-template-columns: 1fr auto 1fr; text-align: left; } .tr-copy { grid-column: 1; justify-self: end; max-width: 380px; } .tr-video { grid-column: 2; } }
.tr-video .frame { width: min(86vw, 380px); }
.vbtn { position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; display: grid; place-items: center; border: 0; background: rgba(6, 13, 24, 0.78); color: #fff; clip-path: var(--notch); cursor: pointer; }
.vbtn svg { width: 22px; height: 22px; fill: currentColor; }
.vbtn .i-play { display: none; }
.vbtn.is-paused .i-play { display: block; } .vbtn.is-paused .i-pause { display: none; }
.vbtn:hover { background: var(--gold); color: var(--gold-ink); }

/* ---------- join the beta ---------- */
.beta-cta { position: relative; padding: clamp(110px, 18vh, 200px) 0; overflow: hidden; text-align: center; background: radial-gradient(90% 80% at 50% 110%, #1a2c52 0%, #0a1426 55%, #040812 100%); isolation: isolate; }
.night { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.night .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 28% 12%, #cfe0ff, transparent), radial-gradient(2px 2px at 44% 30%, #fff, transparent), radial-gradient(1px 1px at 61% 16%, #fff, transparent), radial-gradient(1px 1px at 72% 34%, #cfe0ff, transparent), radial-gradient(2px 2px at 86% 20%, #fff, transparent), radial-gradient(1px 1px at 92% 42%, #fff, transparent), radial-gradient(1px 1px at 6% 46%, #fff, transparent), radial-gradient(1px 1px at 36% 48%, #cfe0ff, transparent), radial-gradient(1px 1px at 54% 8%, #fff, transparent); animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.6; } to { opacity: 1; } }
.night .moon { position: absolute; right: 14%; top: 14%; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff9e6, #e8dcb8 60%, #c9b98e); box-shadow: 0 0 40px 10px rgba(255, 240, 200, 0.18); clip-path: polygon(30% 0, 70% 0, 70% 6%, 85% 6%, 85% 15%, 94% 15%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 85%, 85% 85%, 85% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 15% 94%, 15% 85%, 6% 85%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 15%, 15% 15%, 15% 6%, 30% 6%); }
.night .row { position: absolute; left: 0; right: 0; bottom: 22%; height: 2px; }
.night .row i { position: absolute; bottom: 0; width: 4px; height: 4px; background: #ffe7a6; box-shadow: 0 0 8px 3px rgba(255, 200, 110, 0.8); animation: lampFlicker 2.8s ease-in-out infinite; }
.night .row i:nth-child(1) { left: 12%; } .night .row i:nth-child(2) { left: 21%; animation-delay: -0.7s; } .night .row i:nth-child(3) { left: 30%; animation-delay: -1.3s; }
.night .row i:nth-child(4) { left: 70%; animation-delay: -0.4s; } .night .row i:nth-child(5) { left: 79%; animation-delay: -1.9s; } .night .row i:nth-child(6) { left: 88%; animation-delay: -1s; } .night .row i:nth-child(7) { left: 50%; width: 6px; height: 6px; background: #fff3c4; box-shadow: 0 0 14px 6px rgba(255, 220, 140, 0.9), 0 0 60px 20px rgba(255, 190, 90, 0.25); }
.beta-in { position: relative; max-width: 860px; }
.beta-in h2 { font-size: clamp(2.2rem, 6.5vw, 4.6rem); line-height: 1.02; margin-bottom: 20px; }
.beta-in .lead { margin: 0 auto 30px; }
.beta-note { display: inline-block; margin: 0 0 24px; padding: 8px 14px; background: rgba(6, 13, 24, 0.7); border: 1px solid var(--line-2); clip-path: var(--notch); color: var(--text); }

/* ---------- get the game + the shop ---------- */
.get { padding: clamp(70px, 10vh, 120px) 0; }
.get-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .get-grid { grid-template-columns: 1.15fr 0.85fr; } }
.dl { display: flex; gap: 22px; align-items: flex-start; padding: clamp(20px, 3vw, 32px); }
.dl h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.appicon { width: 96px; height: 96px; border-radius: 22px; flex: 0 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4); image-rendering: pixelated; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (max-width: 480px) { .appicon { width: 72px; height: 72px; border-radius: 17px; } .dl { gap: 14px; } }
.dl-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.shop-teaser { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; text-decoration: none; color: var(--text); padding: clamp(20px, 3vw, 28px); overflow: hidden; }
.shop-teaser::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(120deg, var(--mythic-a), var(--mythic-b), var(--mythic-c), var(--mythic-a)); background-size: 300% 300%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: mythic 6s ease infinite; pointer-events: none; }
.shop-teaser:hover { color: var(--text); }
.shop-teaser:hover .st-go i { transform: translateX(4px); }
.st-art { position: relative; width: 132px; height: 92px; display: grid; place-items: center; }
.st-art .boat { width: 128px; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); animation: float 4s ease-in-out infinite; }
.st-art .coin { position: absolute; right: 0; top: 0; width: 26px; animation: coin 3s ease-in-out infinite; }
.st-body { display: grid; gap: 4px; }
.st-h { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.15; }
.st-go { margin-top: 6px; color: var(--gold-hi); font-weight: 700; }
.st-go i { display: inline-block; font-style: normal; transition: transform 0.3s var(--ease); }
@keyframes coin { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes coinSpin { 0%, 84% { transform: rotateY(0); } 92% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }

/* ---------- footer ---------- */
.foot { position: relative; border-top: 1px solid var(--line); background: var(--ink-0); color: var(--muted); font-size: 0.92rem; }
.foot .wrap { padding-top: 40px; padding-bottom: 36px; display: grid; gap: 22px; grid-template-columns: 1.4fr 1fr 1fr; }
.foot .f-h, .foot h4 { color: var(--text-2); font: 700 0.8rem var(--font); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 7px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--gold-hi); text-decoration: underline; }
.foot .mark { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.2rem; margin-bottom: 8px; }
.foot .mark img { width: 32px; height: 32px; border-radius: 8px; }
.foot .mark .dv { font-size: 1.05rem; color: var(--gold-hi); }
@media (max-width: 700px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .wrap > :first-child { grid-column: 1 / -1; } }
/* "A product of MV Digital Tools", on every page */
.foot .maker { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px 0 0; padding-top: 30px; border-top: 1px solid var(--line); text-align: center; text-decoration: none; }
.foot .maker span { font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.foot .maker img { display: block; width: 150px; height: auto; transition: transform 0.4s var(--ease), filter 0.4s; }
.foot a.maker:hover { text-decoration: none; }
.foot a.maker:hover img { transform: translateY(-2px); filter: drop-shadow(0 6px 18px rgba(0, 189, 234, 0.35)); }
.foot .credits { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 0.8rem; color: #7489a1; }
.foot .credits a { color: #9db0c6; text-decoration: underline; }
.foot-min .wrap { grid-template-columns: 1fr; }
.foot-min .maker { margin: 0; padding-top: 0; border-top: 0; }

/* ======================================================================= INNER PAGES ================================= */
/* a living strip of sea at the top of the inner pages: the game's sunset sky, its cloud bank drifting, and the sea with
   its slow swell (sky-sunset.webp and uw.webp, the scene's own sheets), at a whole-pixel scale --k */
.page-hero { --k: 2; --sea: 30%; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #6f8ea6; isolation: isolate; }
@media (min-width: 1153px) { .page-hero { --k: 3; } }
@media (min-width: 1729px) { .page-hero { --k: 4; } }
.page-hero .ph-sky, .page-hero .ph-cloud { position: absolute; z-index: -3; left: 50%; width: calc(576px * var(--k)); height: calc(324px * var(--k)); margin-left: calc(-288px * var(--k)); bottom: calc(var(--sea) - 49px * var(--k)); background: url('/img/scene/sky-sunset.webp') 0 0 / 100% 300% no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; }
.page-hero .ph-cloud { background: url('/img/scene/sky-sunset.webp') 0 100% / 100% 300% no-repeat, url('/img/scene/sky-sunset.webp') 0 50% / 100% 300% no-repeat; animation: cloudDrift 40s ease-in-out infinite alternate; }
.page-hero .ph-sea { position: absolute; z-index: -2; left: 0; right: 0; bottom: 0; height: var(--sea); background: #077eab; overflow: hidden; }
.page-hero .ph-sea::before { content: ''; position: absolute; left: 50%; top: 0; width: calc(576px * var(--k)); height: calc(324px * var(--k)); margin-left: calc(-288px * var(--k)); background: url('/img/scene/uw.webp') 0 0 / 100% 500% no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; animation: seaDrift 9s ease-in-out infinite alternate; }
.page-hero .ph-sea::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(70, 40, 90, 0.28), rgba(8, 17, 31, 0.85)); border-top: 1px solid rgba(255, 236, 214, 0.75); }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 10, 19, 0.6), rgba(4, 10, 19, 0.15) 60%, rgba(4, 10, 19, 0)), linear-gradient(180deg, rgba(4, 10, 19, 0.25), rgba(4, 10, 19, 0) 40%); pointer-events: none; }
.page-hero .wrap { padding-top: clamp(44px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 84px); }
.page-hero h1 { color: #fff; text-shadow: 0 3px 0 rgba(4, 10, 19, 0.45), 0 6px 22px rgba(0, 0, 0, 0.55); margin-bottom: 10px; }
.page-hero .eyebrow { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.page-hero .lead { color: #f2f6fa; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.6); }
.page-hero .tagline { display: inline-block; font-weight: 400; font-size: clamp(1.02rem, 1.6vw, 1.2rem); background: rgba(5, 11, 20, 0.6); padding: 8px 14px; clip-path: var(--notch); margin: 0; text-shadow: none; }
@keyframes cloudDrift { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@keyframes seaDrift { from { transform: translateX(-6px); } to { transform: translateX(6px); } }

/* ---------- shop ---------- */
/* (room kept for what the server sends, so nothing jumps when it arrives) */
#pack-slot:has(> .loading) { min-height: 620px; }
#boli-slot:empty { min-height: 230px; }
#me-slot:has(> .loading) { min-height: 200px; }
@media (max-width: 759px) { #pack-slot:has(> .loading) { min-height: 960px; } }
@media (max-width: 999px) { #boli-slot:empty { min-height: 640px; } }
.page-acct main { min-height: calc(100vh - 64px); }
.shop-top { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .shop-top { grid-template-columns: 1fr 340px; } }
@media (max-width: 899px) { .shop-top #me-slot { order: -1; } }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 46px; height: 46px; border-radius: 10px; background: var(--ink-4); display: grid; place-items: center; border: 1px solid var(--line-2); flex: 0 0 auto; }
.who .avatar img { width: 24px; }
.who b { display: block; }
.balance { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.balance img { width: 26px; animation: coin 4s ease-in-out infinite; }

/* the Liberators' Pack: a mythic card that shimmers */
.pack { position: relative; border-radius: 18px; padding: 2px; background: linear-gradient(120deg, var(--mythic-a), var(--mythic-b), var(--mythic-c), var(--mythic-a)); background-size: 300% 300%; animation: mythic 7s ease infinite; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 138, 232, 0.12); }
.pack-in { position: relative; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 90% at 85% 0%, #2c1c4e 0%, #131b38 45%, #0a1428 100%); display: grid; grid-template-columns: 1fr; }
.pack-in::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.10) 47%, rgba(255, 216, 74, 0.08) 50%, transparent 62%); background-size: 250% 100%; animation: packSheen 5.5s ease-in-out infinite; }
@keyframes packSheen { 0% { background-position: 130% 0; } 55%, 100% { background-position: -40% 0; } }
@media (min-width: 760px) { .pack-in { grid-template-columns: 1.05fr 1fr; } }
.pack-art { position: relative; min-height: 240px; display: grid; place-items: center; align-content: center; padding: 22px; background: radial-gradient(60% 60% at 50% 45%, rgba(255, 216, 74, 0.2), transparent 70%), linear-gradient(180deg, rgba(23, 18, 54, 0.4), rgba(8, 14, 30, 0.9)); overflow: hidden; }
.pack-art .rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 216, 74, 0.08) 0 8deg, transparent 8deg 20deg); animation: spin 60s linear infinite; }
.pack-art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(2px 2px at 20% 30%, #fff6c8, transparent), radial-gradient(2px 2px at 70% 20%, #ff8ae8, transparent), radial-gradient(2px 2px at 82% 64%, #6ee7d8, transparent), radial-gradient(2px 2px at 30% 74%, #ffd84a, transparent), radial-gradient(1px 1px at 55% 50%, #fff, transparent); animation: motes 3.6s ease-in-out infinite alternate; }
@keyframes motes { from { opacity: 0.35; transform: translateY(4px); } to { opacity: 1; transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.pack-art .boat { position: relative; width: 256px; max-width: 100%; animation: float 5s ease-in-out infinite; }
.pack-art .crew { position: relative; display: flex; gap: 6px; justify-content: center; align-items: flex-end; margin-top: -10px; }
.pack-art .crew img { width: 56px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px rgba(255, 138, 232, 0.6)); }
.pack-art .rod { position: absolute; right: 16px; bottom: 14px; width: 60px; transform: rotate(8deg); filter: drop-shadow(0 0 6px rgba(255, 216, 74, 0.7)); }
.pack-body { position: relative; padding: 22px; }
.pack-body h2 { margin-bottom: 6px; }
.pack-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.pack-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.045); }
.pack-list .nm { font-weight: 700; }
.pack-list .dv { margin-left: auto; color: var(--gold-hi); font-size: 0.98rem; }
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
.price { font-size: 2.1rem; font-weight: 700; letter-spacing: 0.01em; }
.was { color: var(--muted); text-decoration: line-through; }
.off { color: #1b0f1d; background: var(--mythic-b); padding: 2px 9px; font-weight: 700; font-size: 0.9rem; clip-path: var(--notch); }
.countdown { color: var(--gold-hi); font-weight: 700; }

/* the boli packs: every card the same height, each part in the same row across the grid; 6 across on wide screens,
   3x2 on tablets, 2x3 on phones. The cowry (boli) floats and turns. */
.packs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
@media (min-width: 600px) { .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .packs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.boli-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 32px 12px 14px; position: relative; height: 100%; min-width: 0; transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s; }
.boli-card:hover { transform: translateY(-4px); border-color: rgba(242, 194, 48, 0.45); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(242, 194, 48, 0.08); }
.boli-card .shell { height: 66px; flex: 0 0 66px; display: grid; place-items: center; position: relative; }
.boli-card .shell::before { content: ''; position: absolute; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 216, 74, 0.28), transparent 70%); animation: glowPulse 2.6s ease-in-out infinite; }
.boli-card .shell { animation: coin 3.4s ease-in-out infinite; }
.boli-card .shell img { position: relative; width: 52px; animation: coinSpin 5s ease-in-out infinite; }
.boli-card:nth-child(2n) .shell, .boli-card:nth-child(2n) .shell img { animation-delay: -1.1s; } .boli-card:nth-child(3n) .shell, .boli-card:nth-child(3n) .shell img { animation-delay: -2.7s; }
.boli-card .shell.big img { width: 65px; }
@keyframes glowPulse { 0%, 100% { opacity: 0.6; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }
.boli-card .amt { font-size: 1.6rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.boli-card .amt small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.boli-card .mvr { color: var(--text-2); white-space: nowrap; }
.boli-card .note-slot { min-height: 1.45em; line-height: 1.45; font-size: 0.86rem; color: var(--muted); }
.boli-card .badge { position: absolute; top: 0; right: 12px; font-size: 0.75rem; font-weight: 700; line-height: 1.5; color: var(--gold-ink); background: var(--gold-hi); border-radius: 0 0 6px 6px; padding: 2px 9px 3px; white-space: nowrap; }
.boli-card .btn { margin-top: auto; width: 100%; white-space: nowrap; padding-left: 8px; padding-right: 8px; font-size: 0.95rem; }

.orders { display: grid; gap: 10px; }
.order { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 13px 15px; border-radius: 11px; background: var(--ink-2); border: 1px solid var(--line); }
.order .ref { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 700; letter-spacing: 0.06em; }
.order .what { color: var(--text-2); }
.order .meta { grid-column: 1 / -1; color: var(--muted); font-size: 0.88rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.how ol, .how ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }

/* the payment screen */
.pay { display: grid; gap: 14px; }
.refbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #071120; border: 1px dashed rgba(242, 194, 48, 0.55); }
.refbox .code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 1.7rem; font-weight: 700; letter-spacing: 0.12em; color: var(--gold-hi); }
.paytext { white-space: pre-line; overflow-wrap: anywhere; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
label.field { display: grid; gap: 6px; font-weight: 700; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
label.field input, label.field textarea, label.field select { font-weight: 400; }
input[type="text"], input[type="search"], input[type="date"], input[type="email"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: #071120; border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; min-height: 46px; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: rgba(242, 194, 48, 0.7); box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.15); outline: none; }
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6f8399; }
.acct { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.acct .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acct .k { color: var(--muted); font-size: 0.86rem; }
.acct .v { font-weight: 700; overflow-wrap: anywhere; }
.acct .num { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 1.15rem; letter-spacing: 0.04em; }
.paysteps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.slipbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.wa { background: #1faa59; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.btn.wa:hover { color: #fff; }
.btn.vb { background: #7360f2; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.btn.vb:hover { color: #fff; }

/* ---------- dialogs (a bottom sheet on phones) ---------- */
dialog.sheet { border: 1px solid var(--line-2); border-radius: 18px; padding: 0; background: linear-gradient(180deg, #112339, #0b1729); color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65); }
dialog.sheet[open] { animation: sheetIn 0.42s var(--ease); }
dialog.sheet::backdrop { background: rgba(2, 6, 12, 0.74); backdrop-filter: blur(3px); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
dialog.sheet .sheet-in { padding: 22px; overflow: auto; max-height: calc(100vh - 34px); }
dialog.sheet .sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
dialog.sheet .x { background: none; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 9px; width: 38px; height: 38px; cursor: pointer; font-size: 1.2rem; line-height: 1; flex: 0 0 auto; }
dialog.sheet .x:hover { border-color: var(--gold); color: var(--gold-hi); }
dialog.sheet .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 600px) {
  dialog.sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; border-bottom: 0; }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
}

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: #183050; color: var(--text); border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 18px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-weight: 700; animation: fadeUp 0.35s var(--ease); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(242, 194, 48, 0.25); border-top-color: var(--gold); animation: spin 0.9s linear infinite; display: inline-block; vertical-align: middle; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 0; }

/* sign-in card */
.signin { display: grid; gap: 12px; }
.signin-h { font-family: var(--font); font-weight: 700; font-size: 1.15rem; letter-spacing: 0; margin: 0; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px 10px 12px; border-radius: 10px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font: 700 1rem var(--font); cursor: pointer; transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.gbtn:hover { background: #f3f5f7; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); transform: translateY(-1px); }
.gbtn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.gbtn svg { width: 20px; height: 20px; }

/* ---------- my account ---------- */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile .face { width: 76px; height: 76px; border-radius: 16px; background: radial-gradient(circle at 50% 60%, rgba(26, 163, 212, 0.35), var(--ink-4)); border: 1px solid var(--line-2); display: grid; place-items: center; }
.profile .face img { width: 56px; animation: float 4s ease-in-out infinite; }
.profile .name { font-size: 1.55rem; font-weight: 700; }
.lvl { display: inline-block; font-weight: 700; color: var(--gold-ink); background: var(--gold-hi); padding: 1px 9px; font-size: 0.85rem; margin-left: 8px; vertical-align: middle; clip-path: var(--notch); }
.stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { padding: 16px; border-radius: 12px; background: linear-gradient(180deg, rgba(24, 48, 80, 0.4), rgba(12, 25, 43, 0.8)); border: 1px solid var(--line); transition: transform 0.3s var(--ease), border-color 0.3s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.stat .v { font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.stat .v small { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.stat .k { color: var(--muted); font-size: 0.88rem; }
.catches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.catches li { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 9px; background: var(--ink-2); border: 1px solid var(--line); }
.catches .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.catches .kg { margin-left: auto; font-weight: 700; white-space: nowrap; }
.catches .sub { color: var(--muted); font-size: 0.86rem; }
.t-common { background: #ffffff; } .t-uncommon { background: #9df59d; } .t-rare { background: #7fc8ff; }
.t-epic { background: #c49bff; } .t-legendary { background: #ffd84a; } .t-mythic { background: #ff8ae8; box-shadow: 0 0 8px #ff8ae8; }

/* ---------- legal pages ---------- */
.legal { max-width: 800px; }
.legal h1 { margin-top: 40px; }
.legal h2 { font-family: var(--font); font-weight: 700; font-size: 1.3rem; margin: 38px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); letter-spacing: 0; }
.legal h3 { margin: 22px 0 6px; }
.legal .meta { color: var(--muted); margin-bottom: 22px; }
.legal li { margin-bottom: 6px; }
.legal .summary { background: linear-gradient(180deg, rgba(24, 48, 80, 0.55), rgba(12, 25, 43, 0.8)); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 18px 20px 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; margin: 0 0 16px; background: var(--ink-2); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.table-wrap table { min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--ink-3); }
tr:last-child td { border-bottom: 0; }
section.dv-summary { direction: rtl; text-align: right; font-family: var(--thaana); font-size: 1.1rem; line-height: 2; background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; padding: 6px 20px 10px; margin-top: 38px; }
section.dv-summary h2 { border-top: 0; font-family: var(--thaana); }
section.dv-summary ul { padding-right: 22px; padding-left: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
form.request { display: grid; gap: 14px; background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 10px 0 18px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: 4px; }
.choice { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-weight: 400; }
.choice input { margin-top: 6px; accent-color: var(--gold); width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- back office (simpler, the same language) ---------- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; }
.admin-tabs button { font: 700 0.95rem var(--font); color: var(--text-2); background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 14px; cursor: pointer; min-height: 40px; transition: border-color 0.2s, color 0.2s; }
.admin-tabs button:hover { border-color: rgba(242, 194, 48, 0.5); color: var(--text); }
.admin-tabs button[aria-selected="true"] { color: var(--gold-ink); background: var(--gold-hi); border-color: var(--gold-hi); }
.admin-tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.8rem; }
.aorder { display: grid; gap: 8px; padding: 15px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.aorder.is-paid { border-color: rgba(127, 200, 255, 0.55); box-shadow: inset 3px 0 0 var(--info); }
.aorder .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.aorder .ref { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-hi); }
.aorder .amt { font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.totals + p { margin-top: 10px; }
.aorder .facts { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--text-2); font-size: 0.93rem; }
.aorder .facts b { color: var(--text); }
.aorder .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.aorder.is-many { border-color: rgba(255, 196, 92, 0.5); box-shadow: inset 3px 0 0 var(--warn); }
.aorder .who { font-size: 1.2rem; font-weight: 700; color: var(--text); overflow-wrap: anywhere; unicode-bidi: isolate; }
.pid { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.86rem; overflow-wrap: anywhere; }
.pill.r-open { color: var(--warn); } .pill.r-dismissed, .pill.r-done { color: var(--muted); } .pill.r-renamed { color: var(--info); } .pill.r-banned { color: var(--bad); }
.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; min-width: 0; }
.exportbar { display: flex; flex-wrap: wrap; gap: 8px; }
.exportbar input { flex: 1 1 150px; width: auto; }
.totals { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tbl { width: 100%; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.loglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.93rem; }
.loglist li { padding: 8px 12px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); }
.preview { white-space: pre-line; }
.admin-page .page-hero .wrap { padding-top: 26px; padding-bottom: 22px; }

/* ---------- beta testers ---------- */
.beta-hero .wrap { padding-top: clamp(48px, 8vw, 90px); padding-bottom: clamp(40px, 7vw, 76px); }
.beta-note { display: inline-block; }
.needs { padding-left: 20px; }
.needs li { margin-bottom: 10px; }
.beta-state { border-radius: 12px; padding: 18px; border: 1px solid var(--line-2); background: var(--ink-2); animation: fadeUp 0.5s var(--ease); }
.beta-state .big { font-family: var(--display); font-size: 1.9rem; line-height: 1.15; margin-bottom: 6px; }
.beta-state.ok { border-color: rgba(79, 209, 139, 0.55); box-shadow: inset 4px 0 0 var(--ok), 0 0 40px rgba(79, 209, 139, 0.08); }
.beta-state.ok .big { color: var(--ok); }
.beta-state.wait { box-shadow: inset 4px 0 0 var(--warn); }
.beta-state.wait .big { color: var(--warn); }
.beta-state.off { box-shadow: inset 4px 0 0 var(--muted); }
.beta-state p:last-child { margin-bottom: 0; }
ol.steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
ol.steps.later { opacity: 0.7; }
.step-act { margin-top: 10px; }
.beta-perks { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; max-width: 980px; }
@media (max-width: 640px) { .beta-perks { grid-template-columns: 1fr; } }
.perk { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: rgba(5, 11, 20, 0.6); border: 1px solid var(--line); clip-path: var(--notch); color: var(--text-2); font-size: 0.93rem; }
.perk img { flex: 0 0 auto; }
.ttable { width: 100%; font-size: 0.93rem; }
.ttable td { vertical-align: middle; }
.ttable .em { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.88rem; overflow-wrap: anywhere; }
.trow { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.trow .top1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.trow .em { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-wrap: anywhere; font-weight: 700; }
.pill.t-pending { color: var(--warn); } .pill.t-approved { color: var(--ok); } .pill.t-waitlist { color: var(--info); } .pill.t-removed { color: var(--muted); }

/* ---------- the tester reward (the owner, 8 Oct 2026): a perk on /beta/ and Home, and an approved tester's progress ---------- */
.reward, .reward-strip { position: relative; display: flex; gap: 16px; align-items: center; isolation: isolate; overflow: hidden; color: var(--text); }
.reward { grid-column: 1 / -1; padding: 18px 20px; background: linear-gradient(120deg, rgba(36, 22, 4, 0.92), rgba(12, 22, 40, 0.92) 60%); clip-path: var(--notch); box-shadow: inset 0 0 0 2px rgba(242, 194, 48, 0.75); }
.reward::after, .reward-strip::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 216, 74, 0.16) 48%, transparent 60%); background-size: 260% 100%; animation: packSheen 4.5s ease-in-out infinite; pointer-events: none; }
.rw-coin { flex: 0 0 auto; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 216, 74, 0.35), rgba(255, 216, 74, 0) 68%); animation: coin 3.2s ease-in-out infinite; }
.rw-coin img { width: 52px; animation: coinSpin 4s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 216, 74, 0.6)); }
.rw-body { display: grid; gap: 4px; }
.rw-eyebrow { display: block; margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi); }
.rw-h { margin: 0; font: 400 clamp(1.25rem, 2.6vw, 1.6rem)/1.2 var(--display); color: #fff; }
.rw-h b { color: var(--gold-hi); font-weight: 400; }
.rw-h .num { font-family: var(--font); font-weight: 700; font-size: 0.92em; }
.rw-sub { margin: 0; color: var(--text-2); }
.rw-fine { display: block; margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
.rw-fine a { color: var(--text-2); }
.page-hero .rw-fine, .page-hero .rw-sub { text-shadow: none; }
.reward-strip { max-width: 680px; margin: 0 auto 30px; padding: 14px 18px; text-align: left; background: rgba(36, 22, 4, 0.55); clip-path: var(--notch); box-shadow: inset 0 0 0 2px rgba(242, 194, 48, 0.6); }
.reward-strip p { margin: 0; display: grid; gap: 4px; }
.reward-strip b { font-size: 1.05rem; color: #fff; }
.reward-strip .rw-coin { width: 60px; height: 60px; }
@media (max-width: 520px) { .reward, .reward-strip { flex-direction: column; align-items: flex-start; } }
/* an approved tester's progress (GET /testers/me reward; hidden when the server doesn't send it) */
.rw-card { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: linear-gradient(160deg, rgba(36, 22, 4, 0.7), rgba(12, 25, 43, 0.9)); border: 1px solid rgba(242, 194, 48, 0.55); }
.rw-card .rw-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rw-card .rw-top b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; color: var(--gold-hi); }
.rw-races { display: flex; gap: 8px; flex-wrap: wrap; }
.rw-dot { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(8, 17, 31, 0.8); clip-path: var(--notch); box-shadow: inset 0 0 0 2px var(--line-2); font: 700 0.92rem var(--font); color: var(--muted); }
.rw-dot.on { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); box-shadow: inset 0 -3px 0 rgba(120, 70, 0, 0.45); }
.rw-card.is-paid { border-color: rgba(79, 209, 139, 0.6); box-shadow: 0 0 40px rgba(79, 209, 139, 0.08); }
.rw-card.is-paid .rw-dot.on { background: linear-gradient(180deg, #8ff0b8, var(--ok)); color: #062011; }
.rw-meter { height: 8px; background: rgba(8, 17, 31, 0.8); clip-path: var(--notch); overflow: hidden; }
.rw-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transition: width 0.8s var(--ease); }

/* ---------- reduced motion: everything still, nothing hidden ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1; transform: none; }
  .hero { height: 100vh; height: 100svh; }
  .tilt, .duo .f-a, .duo .f-b, .ch-media .frame:not(.tilt), .ch-n, .chart-zoom, .grounds-card, .trailer-amb { transform: none; }
  .chart-zoom { opacity: 0.4; } .grounds-card { opacity: 1; } .chart .pin { opacity: 1; }
  .lamps i { opacity: 0.9; }
  .px-sprite { background-position-x: 0; }
}
