:root {
  --bg: #0b0716;
  --bg-2: #120a24;
  --ink: #f3ecff;
  --muted: #d6cfe0;
  --gold: #f1cd74;
  --gold-2: #c9922f;
  --gold-soft: #d8b65f;
  --head: "Cormorant Garamond", Georgia, "Noto Serif CJK SC", "Songti SC", "Yu Mincho", "Batang", serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei", "Malgun Gothic", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.22, .9, .25, 1);
  --cursor: image-set(url(/assets/cursor.png) 1x, url(/assets/cursor@2x.png) 2x) 1 1, auto;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.58 var(--body); overflow-x: clip; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, .hero-info__name, .hero-card__name { font-variant-numeric: lining-nums; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: #1a0f00; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh-Hans), :lang(zh-Hant) { line-break: strict; }
:lang(ja) { --head: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "MS Mincho", serif; }
:lang(ko) { --head: "Noto Serif KR", "AppleMyungjo", "Batang", serif; }
:lang(zh-Hans) { --head: "Noto Serif SC", "Songti SC", "SimSun", serif; }
:lang(zh-Hant) { --head: "Noto Serif TC", "Songti TC", "PMingLiU", serif; }

/* The tutorial gauntlet from the game as the pointer (mouse devices only). */
@media (hover: hover) and (pointer: fine) {
  html, a, button, [role="tab"], .lf { cursor: var(--cursor); }
}

/* ---------- loader: compass + aurora, no artwork ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 50%, #170c2e 0%, #0a0616 55%, #050309 100%);
  transition: opacity .9s var(--ease), visibility .9s;
}
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; }
.loader__aurora { position: absolute; inset: -30%; filter: blur(60px); opacity: .75; mix-blend-mode: screen;
  background:
    radial-gradient(30% 22% at 35% 40%, rgba(120,70,255,.55), transparent 70%),
    radial-gradient(26% 20% at 66% 58%, rgba(60,200,255,.35), transparent 70%),
    radial-gradient(24% 18% at 55% 30%, rgba(241,205,116,.25), transparent 70%);
  animation: aurora 14s ease-in-out infinite alternate; }
@keyframes aurora { 0% { transform: rotate(0deg) scale(1); } 100% { transform: rotate(40deg) scale(1.15); } }
.loader__stars { position: absolute; inset: 0; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 76%, #ffe9b0 50%, transparent 51%), radial-gradient(1px 1px at 88% 66%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 8%, #cfe9ff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 6% 58%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 88%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 44%, #ffe9b0 50%, transparent 51%);
  background-size: 420px 420px; animation: twinkle 3.2s ease-in-out infinite alternate; }
.loader__stars--b { background-size: 610px 610px; background-position: 140px 90px; animation-delay: -1.6s; opacity: .5; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }
.loader__compass { position: absolute; width: min(506px, 88vmin); aspect-ratio: 1; }
.compass { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 14px rgba(241,205,116,.35)); }
.compass circle { fill: none; }
.compass__ticks { stroke: rgba(241,205,116,.36); stroke-width: 6; stroke-dasharray: 1.2 15.03; transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.compass__ring { stroke: rgba(241,205,116,.14); stroke-width: 1; }
.compass__progress { stroke: url(#cg); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1081; stroke-dashoffset: 1081; transform: rotate(-90deg); transform-origin: 200px 200px; transition: stroke-dashoffset .5s var(--ease); }
.compass__inner { transform-origin: 200px 200px; animation: spin 24s linear infinite reverse; }
.compass__dash { stroke: rgba(160,190,255,.22); stroke-width: 1; stroke-dasharray: 2 10; }
.compass__card { fill: url(#cg); opacity: .8; }
.compass__needle { transform-origin: 200px 200px; animation: needle 3.6s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } }
.loader__logo { position: relative; width: min(330px, 66vw); filter: brightness(1.12); animation: loaderLogo 2.4s ease-in-out infinite; }
@keyframes loaderLogo { 50% { filter: brightness(1.18) drop-shadow(0 0 22px rgba(123,231,255,.55)); transform: scale(1.025); } }
body.is-leaving .loader__compass { animation: compassOut .9s var(--ease) forwards; }
@keyframes compassOut { to { transform: scale(1.35); opacity: 0; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top));
  transition: background .4s, backdrop-filter .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid { background: rgba(7, 5, 18, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: rgba(255,255,255,.07); padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--body); letter-spacing: .28em; }
.brand b { font-weight: 700; color: var(--gold); margin-left: .5em; }
.brand__star { width: 22px; height: 22px; fill: var(--gold); filter: drop-shadow(0 0 8px rgba(241,205,116,.7)); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav a { position: relative; font-weight: 500; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:hover, .nav a.is-current { color: var(--ink); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.lang { position: relative; }
.lang__btn { display: flex; align-items: center; gap: 7px; padding: 9px 13px; min-height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); transition: border-color .3s, color .3s; }
.lang__btn:hover, .lang.is-open .lang__btn { color: var(--gold); border-color: rgba(241,205,116,.5); }
.lang__btn svg { width: 16px; height: 16px; fill: currentColor; }
.lang__menu { position: absolute; right: 0; top: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; width: 220px; max-height: min(70vh, 520px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: rgba(16,10,32,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(241,205,116,.22); border-radius: 14px; box-shadow: 0 24px 60px -16px rgba(0,0,0,.9);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu button { width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.lang__menu button:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.lang__menu button.is-active { color: var(--gold); background: rgba(241,205,116,.1); }
.btn-mini {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14px; letter-spacing: .04em;
  color: #f1d58a; background: #171022; border: 1px solid #b99547; box-shadow: 0 6px 18px -8px rgba(0,0,0,.8);
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.btn-mini:hover { transform: translateY(-1px); color: #1d1200; background: linear-gradient(180deg, #ffe6a3, var(--gold) 45%, var(--gold-2)); border-color: transparent; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.hero__bg { position: absolute; inset: -3%; z-index: -4; will-change: transform; }
.hero__art { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.06); filter: saturate(1.05); }
body.is-ready .hero__art { animation: kenburns 2.4s var(--ease) forwards, drift 13s ease-in-out 2.4s infinite alternate; }
@keyframes kenburns { from { transform: scale(1.06); filter: brightness(.35) saturate(.8) blur(4px); } to { transform: scale(1); filter: brightness(1) saturate(1.05) blur(0); } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.035); } }
.hero__motes { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.hero__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% 52%, rgba(11,7,22,0), rgba(11,7,22,.5) 100%),
    linear-gradient(180deg, rgba(11,7,22,.55) 0%, rgba(11,7,22,0) 22%, rgba(11,7,22,0) 55%, rgba(11,7,22,.85) 86%, var(--bg) 100%); }
.hero__content::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -150px; width: 820px; height: 560px; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5,3,16,.7) 0%, rgba(5,3,16,.42) 45%, rgba(5,3,16,.14) 75%, transparent 100%); }
.hero__content { position: relative; text-align: center; padding: 0 var(--gutter); margin-top: 18vh; display: flex; flex-direction: column; align-items: center; }
.hero__logo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo-shine { position: relative; display: block; width: min(664px, 82vw); }
.logo-shine img { width: 100%; filter: drop-shadow(0 8px 30px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(123,231,255,.35)); }
.logo-shine::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.95) 48%, transparent 60%) no-repeat; background-size: 250% 100%; background-position: 160% 0;
  -webkit-mask: url(/assets/logo.webp) center / contain no-repeat; mask: url(/assets/logo.webp) center / contain no-repeat; mix-blend-mode: overlay; }
body.is-ready .logo-shine::after { animation: shine 1.1s ease-in-out 1.6s 1 both; }
.hero__logo:hover .logo-shine::after { animation: shine2 1.1s ease-in-out 1 both; }
@keyframes shine { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes shine2 { from { background-position: 160% 0; } to { background-position: -60% 0; } }
/* Subtitle: the game's UI face, tight tracking, gold ink, short rules either side. */
.hero__subtitle { display: inline-flex; align-items: center; gap: 14px; font: 700 clamp(15px, 1.7vw, 21px)/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.hero__subtitle > span { background: linear-gradient(180deg, #fff6dc 0%, #f1cd74 55%, #c99a3e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 6px rgba(0,0,0,.9)); }
.hero__subtitle i { display: block; width: clamp(28px, 4vw, 54px); height: 1px; background: linear-gradient(90deg, transparent, #e2b65b); position: relative; }
.hero__subtitle i:last-child { background: linear-gradient(270deg, transparent, #e2b65b); }
.hero__subtitle i::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; rotate: 45deg; background: #e2b65b; }
.hero__subtitle i:first-child::after { right: -2px; } .hero__subtitle i:last-child::after { left: -2px; }
.hero__tagline { margin: 20px 0 30px; max-width: 34ch; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: #e6e0ea; text-shadow: 0 2px 12px rgba(0,0,0,.95); }

.hero__logo, .hero__tagline, .hero .play-btn, .scroll-hint, .topbar { opacity: 0; }
body.is-ready .topbar { animation: fadeDown .9s var(--ease) 1.4s forwards; }
body.is-ready .hero__logo { animation: logoIn 1.4s var(--ease) .5s forwards; }
body.is-ready .hero__tagline { animation: fadeUp 1s var(--ease) 1.2s forwards; }
body.is-ready .hero .play-btn { animation: fadeUp 1s var(--ease) 1.45s forwards; }
body.is-ready .scroll-hint { animation: fadeUp 1s var(--ease) 2.2s forwards; }
@keyframes logoIn { from { opacity: 0; transform: scale(1.18); filter: blur(14px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

.scroll-hint { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: -2px; width: 5px; height: 12px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: drip 2s var(--ease) infinite; }
@keyframes drip { from { top: -12px; } to { top: 44px; } }

/* ---------- play button ---------- */
.play-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 16px; overflow: hidden;
  padding: 19px 50px 19px 36px; min-width: 356px; border-radius: 20px; color: #fff;
  background: linear-gradient(180deg, #1c1236, #0d0820); border: 1px solid rgba(241,205,116,.7);
  box-shadow: 0 0 0 4px rgba(241,205,116,.07), 0 0 28px rgba(229,190,91,.28), 0 18px 40px -16px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.play-btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,230,170,.35) 50%, transparent 70%); transform: translateX(-120%); animation: btnSheen 7s ease-in-out infinite; }
.play-btn::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--a, 0deg), transparent 0 70%, #fff3c9 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: border 4s linear infinite; }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes border { to { --a: 360deg; } }
@keyframes btnSheen { 0%, 78% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.play-btn:hover { transform: translateY(-3px); box-shadow: 0 0 0 6px rgba(241,205,116,.1), 0 0 36px rgba(229,190,91,.42), 0 22px 44px -16px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.18); }
.play-btn__icon { width: 46px; height: 46px; flex: none; position: relative; }
.play-btn__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; position: relative; }
.play-btn__text small { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--gold); }
.play-btn__text b { font-size: 33px; font-weight: 600; letter-spacing: .01em; }

/* ---------- section basics ---------- */
section { position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 14px; margin: 0 0 12px; font: 700 clamp(15px, 1.15vw, 17px)/1.2 var(--head); letter-spacing: .2em; text-transform: uppercase; color: #e9c877; text-shadow: 0 0 18px rgba(241,205,116,.25); }
.kicker::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, #e2b65b); }
.kicker.center { display: flex; justify-content: center; }
.kicker.center::after { content: ""; width: 34px; height: 1px; background: linear-gradient(270deg, transparent, #e2b65b); }
.title { text-wrap: balance; margin: 0 0 22px; font: 700 clamp(34px, 4.2vw, 60px)/1.02 var(--head);
  background: linear-gradient(180deg, #fffaf0 30%, #e8c97f); -webkit-background-clip: text; background-clip: text; color: transparent; }
:lang(ja) .title, :lang(ko) .title, :lang(zh-Hans) .title, :lang(zh-Hant) .title { line-height: 1.18; letter-spacing: .02em; }
.lead { color: var(--muted); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.58; max-width: 46ch; }
.lead.center { margin-left: auto; margin-right: auto; }
[data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity .48s cubic-bezier(.22,.61,.36,1), transform .48s cubic-bezier(.22,.61,.36,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

.seam { position: relative; height: 0; z-index: 4; pointer-events: none; }
.seam::before { content: ""; position: absolute; left: 50%; top: 0; width: 9px; height: 150px; translate: -50% -50%;
  background:
    radial-gradient(circle at 50% 50%, #d7b260 0 3px, rgba(215,178,96,.35) 3.5px, transparent 7px) center / 9px 14px no-repeat,
    linear-gradient(transparent, rgba(215,178,96,.24) 30%, rgba(215,178,96,.24) 70%, transparent) center / 1px 100% no-repeat;
  filter: drop-shadow(0 0 6px rgba(215,178,96,.45)); }

/* ---------- heroes ---------- */
.heroes { padding: clamp(96px, 11vw, 150px) 0; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0, var(--bg-2) 160px, var(--bg-2) calc(100% - 160px), var(--bg) 100%); }
.heroes__glow { position: absolute; width: 900px; height: 900px; right: -8%; top: 50%; translate: 0 -50%; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow, rgba(241,205,116,.35)), transparent 62%); filter: blur(30px); transition: background 1s var(--ease); pointer-events: none; }
.heroes__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-info { margin: 40px 0 16px; min-height: 150px; }
.hero-info__rarity { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 700 18px/1.1 var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--rarity, var(--gold)); text-shadow: 0 0 16px color-mix(in srgb, var(--rarity, #f1cd74) 45%, transparent); }
.hero-info__rarity::before { content: ""; width: 8px; height: 8px; rotate: 45deg; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hero-info__name { margin: 0; font: 700 clamp(56px, 8vw, 116px)/.9 var(--head); letter-spacing: .02em; color: #fff; text-shadow: 0 0 40px var(--hero-glow, rgba(241,205,116,.4)); }
.ch { display: inline-block; opacity: 0; transform: translateY(.4em) rotate(6deg); animation: chIn .7s var(--ease) forwards; }
@keyframes chIn { to { opacity: 1; transform: none; } }
.hero-info__role { margin: 12px 0 0; color: #d0c8db; font: 600 16px/1.2 var(--head); letter-spacing: .16em; text-transform: uppercase; }
.hero-thumbs { display: flex; gap: 10px; }
.hero-thumb { flex: none; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; position: relative; opacity: .55; filter: saturate(.45); transition: opacity .3s, filter .3s, transform .3s var(--ease), box-shadow .3s; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover { opacity: .9; filter: none; transform: translateY(-3px); }
.hero-thumb.is-active { opacity: 1; filter: none; box-shadow: 0 0 0 2px #d7b65b, 0 0 6px rgba(215,182,91,.2); transform: translateY(-3px); }
.hero-stage { justify-self: center; width: min(550px, 100%); perspective: 1100px; }
.hero-card { position: relative; aspect-ratio: 2 / 3; border-radius: 22px; overflow: hidden; background: #000; transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.95), 0 0 70px -20px var(--hero-glow, rgba(241,205,116,.5)); }
.hero-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0; transform: translateX(14px); transition: opacity .6s ease-out, transform .6s ease-out; }
.hero-card__img.is-active { opacity: 1; transform: none; }
/* light follows the tilt */
.hero-card__shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(60% 50% at var(--lx, 50%) var(--ly, 30%), rgba(255,255,255,.45), transparent 70%); }
.hero-card__frame { position: absolute; inset: 10px; border-radius: 14px; border: 1px solid rgba(255,236,190,.3); box-shadow: inset 0 0 40px rgba(0,0,0,.6); pointer-events: none; }
.hero-card__frame::before, .hero-card__frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1.5px solid rgba(241,205,116,.75); }
.hero-card__frame::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.hero-card__frame::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.hero-card__sweep { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%); transform: translateX(-100%); pointer-events: none; }
.hero-card.is-switching .hero-card__sweep { animation: sweep 1.1s var(--ease); }
@keyframes sweep { to { transform: translateX(100%); } }
.hero-card__caption { display: none; }
.hero-progress { margin-top: 18px; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.hero-progress span { display: block; height: 100%; width: 0; background: var(--rarity, var(--gold)); box-shadow: 0 0 10px var(--rarity, var(--gold)); }

/* ---------- final ---------- */
.final { min-height: 640px; display: grid; place-items: center; overflow: hidden; text-align: center; padding: 72px var(--gutter); isolation: isolate; }
.final__bg { position: absolute; inset: 0; z-index: -1; }
.final__bg img { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.final__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(11,7,22,.45) 14%, rgba(11,7,22,.55) 70%, #06030d 100%), radial-gradient(60% 60% at 50% 55%, rgba(11,7,22,.55), transparent 80%); }
.final__content { position: relative; display: flex; flex-direction: column; align-items: center; }
.final__content::before { content: ""; position: absolute; z-index: -1; inset: -90px -140px; pointer-events: none; background: radial-gradient(closest-side, rgba(7,5,18,.62), transparent); }
.final__logo { width: min(380px, 70vw); margin-bottom: 20px; filter: drop-shadow(0 0 30px rgba(123,231,255,.35)); }
.final .lead { margin-bottom: 34px; color: #e3d8f7; text-shadow: 0 2px 10px rgba(0,0,0,.9); }

/* ---------- footer ---------- */
.footer { padding: 40px 0 26px; background: #06030d; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand b { color: var(--ink); letter-spacing: .08em; }
.footer__brand p { margin: 2px 0 0; }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; transition: color .3s; }
.footer__links a:hover { color: var(--gold); }
.footer__copy { text-align: center; margin: 24px 0 0; font-size: 12px; line-height: 18px; opacity: .85; }
.footer__copy a:hover { color: var(--gold); }

/* ---------- lucky find (the in-game sparkle) ---------- */
.lf-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.lf { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; padding: 0; pointer-events: auto; border-radius: 50%; }
.lf[hidden], .lf-ring[hidden], .lf-lumi[hidden] { display: none; }
.lf img { position: absolute; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; }
.lf__glow { width: 120px; }
.lf__rays { width: 150px; opacity: .8; }
.lf__core { width: 74px; }
.lf__orbit { width: 18px; }
.lf:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.lf-ring { position: absolute; width: 150px; margin: -75px 0 0 -75px; pointer-events: none; }
.lf-lumi { position: absolute; width: 150px; margin: -110px 0 0 -75px; pointer-events: none; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)) drop-shadow(0 0 22px rgba(255,210,150,.45)); }
.lf-spark { position: absolute; width: 22px; margin: -11px 0 0 -11px; pointer-events: none; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5,3,12,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s ease-out; }
.modal__card { position: relative; width: min(440px, 100%); margin-top: 80px; padding: 118px 32px 30px; text-align: center; border-radius: 24px;
  background: radial-gradient(120% 80% at 50% 0%, #2a1650 0%, #140b28 55%, #0c0719 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 0 0 1px #665485, 0 40px 90px -20px rgba(0,0,0,.95), 0 0 80px -10px rgba(155,107,255,.45);
  animation: cardIn .55s cubic-bezier(.2,1.3,.4,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
.modal__lumi { position: absolute; left: 50%; top: -92px; width: 150px; height: 205px; translate: -50% 0; perspective: 700px; animation: modalLumi 3s ease-in-out infinite; }
.modal__lumi img { position: relative; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 70%;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.55)) drop-shadow(0 0 26px rgba(255,210,150,.4)); will-change: transform; }
.modal__halo { position: absolute; left: 50%; top: 55%; width: 210px; height: 210px; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,214,140,.45), rgba(190,140,255,.18) 55%, transparent); opacity: .55; transition: opacity .3s, transform .3s; }
.modal__lumi.is-flash .modal__halo { opacity: 1; transform: scale(1.18); }
.modal__spark { position: absolute; left: 50%; top: 55%; width: 20px; margin: -10px 0 0 -10px; pointer-events: none; }
@keyframes modalLumi { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.modal__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--muted); transition: color .2s, background .2s; }
.modal__x:hover { color: #fff; background: rgba(255,255,255,.08); }
.modal__title { margin: 0 0 18px; font: 700 clamp(28px, 4vw, 36px)/1.1 var(--head); color: #fff; }
.modal__body { margin: 0 0 32px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.code { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 22px; border-radius: 16px; background: linear-gradient(180deg, rgba(6,3,14,.85), rgba(20,12,36,.85)); border: 1px solid rgba(241,205,116,.55); box-shadow: 0 0 30px -8px rgba(241,205,116,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.code__value { flex: 1; text-align: left; font: 700 28px/1 var(--body); letter-spacing: .14em; color: #ffe39c; text-shadow: 0 0 18px rgba(241,205,116,.45); user-select: all; }
.code__copy { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; color: #1d1200; background: linear-gradient(180deg, #ffe6a3, var(--gold) 45%, var(--gold-2)); transition: transform .2s; white-space: nowrap; }
.code__copy:hover { transform: translateY(-1px); }
.code__copy.is-done { background: linear-gradient(180deg, #c9f7d6, #6fd99a); }
.modal__how { margin: 16px 0 22px; font-size: 14px; color: var(--muted); }
.modal__play { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 999px; font-weight: 600; color: #f1d58a; border: 1px solid #b99547; background: #171022; transition: background .25s, color .25s; }
.modal__play:hover { color: #1d1200; background: linear-gradient(180deg, #ffe6a3, var(--gold) 45%, var(--gold-2)); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .heroes__grid { grid-template-columns: 1fr; gap: 0; }
  .heroes__intro { display: contents; }
  .heroes__intro .kicker { order: 1; } .heroes__intro .title { order: 2; margin-bottom: 26px; }
  .hero-stage { order: 3; width: min(420px, 100%); }
  .hero-info { display: none; }
  /* identity lives on the card itself on phones */
  .hero-card { aspect-ratio: 3 / 4; border-radius: 20px; }
  .hero-card__caption { display: block; position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 22px 22px; z-index: 2;
    background: linear-gradient(transparent, rgba(7,4,16,.65) 40%, rgba(7,4,16,.92)); }
  .hero-card__caption .hero-info__rarity { margin-bottom: 4px; font-size: 14px; gap: 8px; }
  .hero-card__caption .hero-info__rarity::before { width: 6px; height: 6px; }
  .hero-card__name { margin: 0; font: 700 44px/1 var(--head); color: #fff; text-shadow: 0 0 30px var(--hero-glow, rgba(241,205,116,.4)); }
  .hero-card__caption .hero-info__role { margin-top: 6px; font-size: 14px; }
  .hero-thumbs { order: 4; margin-top: 18px; gap: 10px; overflow-x: auto; padding: 6px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; justify-content: flex-start; }
  .hero-thumbs::-webkit-scrollbar { display: none; }
  .hero-thumb { width: 54px; height: 54px; scroll-snap-align: start; }
  .heroes__glow { right: 50%; translate: 50% -40%; width: 560px; height: 560px; }
  .hero-progress { margin-top: 12px; }
  .final { min-height: 0; padding: 88px var(--gutter) 96px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; line-height: 1.5; }
  .brand span { display: none; }
  .btn-mini { padding: 0 14px; font-size: 13px; }
  .play-btn { min-width: 0; padding: 14px 32px 14px 22px; border-radius: 18px; }
  .play-btn__icon { width: 38px; height: 38px; }
  .play-btn__text b { font-size: 25px; }
  .play-btn__text small { font-size: 11px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .modal__card { padding: 108px 20px 24px; border-radius: 22px; }
  .modal__lumi { width: 132px; height: 180px; top: -78px; }
  .code__value { font-size: 22px; }
  .lf { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
  .lf__glow { width: 96px; } .lf__rays { width: 120px; } .lf__core { width: 60px; }
}
@media (max-aspect-ratio: 4/5) {
  .hero { place-items: end center; }
  .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgba(18,10,42,.12); }
  .hero__content { margin-top: 0; padding-bottom: max(104px, calc(env(safe-area-inset-bottom) + 92px)); }
  .logo-shine { width: min(440px, 80vw); }
  .hero__tagline { margin: 12px 0 14px; }
  .hero__shade { background: linear-gradient(180deg, rgba(9,5,21,.45) 0%, rgba(9,5,21,0) 16%, rgba(9,5,21,0) 50%, rgba(9,5,21,.86) 76%, #090515 92%); }
  .hero__art { object-position: 50% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__logo, .hero__tagline, .hero .play-btn, .scroll-hint, .topbar, [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__art { transform: none; }
}
