/* =====================================================================
   ALIUS - "The Frost Codex" · v2
   Cinematic AAA dark-fantasy portal for a rev-238 RSPS.
   Frost-blue light · ember counterweight · treasure gold · obsidian depth
   Type: Cormorant Garamond (display) · Cinzel (wordmark)
         Hanken Grotesk (UI/body, also used for labels/data)
   ===================================================================== */

:root {
  /* surfaces */
  --void:  #04060d;
  --abyss: #070b15;
  --night: #0b1322;
  --line:    rgba(120, 165, 230, 0.12);
  --line-hi: rgba(143, 198, 255, 0.34);

  /* brand */
  --frost:        #4A9DFF;   /* signature Alius blue */
  --frost-bright: #9fd0ff;
  --ice:          #dcecff;
  --gold:         #f3c969;
  --gold-bright:  #ffe7a6;
  --gold-deep:    #b8862a;
  --ember:        #ff7a3c;
  --ember-bright: #ffb487;
  --ember-deep:   #b73417;

  /* ink */
  --head:  #f2f7ff;
  --text:  #c2d1ec;
  --muted: #707f9e;

  /* type */
  --display: "Cormorant Garamond", Georgia, serif;
  --crest:   "Cinzel", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "Hanken Grotesk", system-ui, sans-serif;

  --radius: 2px;
  --maxw: 1240px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--body);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: italic; }

/* =====================================================================
   ATMOSPHERIC LAYERS (fixed, behind everything)
   ===================================================================== */
#motes {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  transform: translateZ(0); will-change: transform;
}
.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(2,4,9,.6) 100%),
    radial-gradient(100% 100% at 50% 120%, rgba(2,4,9,.7), transparent 60%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nav, main, .footer, .rail, .scrollbar { position: relative; z-index: 2; }

/* =====================================================================
   SCROLL PROGRESS + SIDE RAIL
   ===================================================================== */
.scrollbar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scrollbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--frost), var(--frost-bright), var(--gold));
  box-shadow: 0 0 12px rgba(74,157,255,.8);
}
.rail {
  position: fixed; left: 26px; bottom: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  pointer-events: none;
}
.rail__mark {
  font-family: var(--crest); font-weight: 900; font-size: 1rem; letter-spacing: .1em;
  color: var(--frost-bright); opacity: .7;
}
.rail__line { width: 1px; height: 80px; background: linear-gradient(var(--frost), transparent); }
.rail__text {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .28em;
  color: var(--muted); writing-mode: vertical-rl; margin-bottom: 20px;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
/* sharp engraved plaques - crisp square corners + a clean gold frame */
.btn {
  display: inline-flex; align-items: center; gap: .65em;
  font-family: var(--body); font-weight: 700;
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 1em 1.85em; border-radius: 0;
  border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.9,.3,1), box-shadow .3s, background .3s, border-color .3s, color .2s;
  white-space: nowrap;
}
.btn .ico, .btn .arw { transition: transform .3s cubic-bezier(.2,.9,.3,1); }
.btn .arw { display: inline-block; }
/* hover light-sweep */
.btn::before {
  content: ""; position: absolute; top: 0; left: 0; width: 60%; height: 100%;
  transform: translateX(-200%) skewX(-18deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
}
.btn:hover::before { animation: btn-sweep .7s ease; }
@keyframes btn-sweep { from { transform: translateX(-200%) skewX(-18deg); } to { transform: translateX(320%) skewX(-18deg); } }

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }
.btn:hover .ico { transform: translateY(3px); }       /* download icon dips */
.btn:hover .arw { transform: translateX(5px); }        /* arrow slides on */
.btn--lg { font-size: .86rem; padding: 1.12em 2.25em; }

/* primary - forged frost steel (gold frame + inner dark line = engraved look) */
.btn--frost {
  background: linear-gradient(180deg, #2a5f9c 0%, #15406f 100%);
  color: #eef6ff; border-color: rgba(243,201,105,.85);
  box-shadow: inset 0 0 0 1px rgba(8,18,34,.55), inset 0 3px 0 rgba(190,222,255,.4), inset 0 -6px 12px rgba(0,0,0,.45), 0 8px 20px -9px rgba(74,157,255,.55);
}
.btn--frost:hover {
  background: linear-gradient(180deg, #316fb4 0%, #1b4e87 100%); border-color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(8,18,34,.45), inset 0 3px 0 rgba(190,222,255,.5), inset 0 -6px 12px rgba(0,0,0,.4), 0 12px 28px -9px rgba(74,157,255,.8);
}

/* gold treasure plaque */
.btn--gold {
  background: linear-gradient(180deg, #dcb257 0%, #97701d 100%);
  color: #1d1404; border-color: rgba(255,244,212,.9);
  box-shadow: inset 0 0 0 1px rgba(80,52,8,.4), inset 0 2px 0 rgba(255,247,218,.55), inset 0 -5px 10px rgba(0,0,0,.3), 0 8px 20px -9px rgba(243,201,105,.55);
}
.btn--gold:hover {
  background: linear-gradient(180deg, #ebc66c 0%, #ab8024 100%);
  box-shadow: inset 0 0 0 1px rgba(80,52,8,.35), inset 0 2px 0 rgba(255,247,218,.65), inset 0 -5px 10px rgba(0,0,0,.28), 0 12px 30px -9px rgba(243,201,105,.8);
}

/* secondary - engraved ghost */
.btn--ghost {
  background: linear-gradient(180deg, rgba(143,198,255,.07), rgba(143,198,255,.015));
  color: var(--ice); border-color: rgba(143,198,255,.3);
  box-shadow: inset 0 1px 0 rgba(180,215,255,.12);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  color: #fff; border-color: var(--frost-bright);
  background: linear-gradient(180deg, rgba(143,198,255,.13), rgba(143,198,255,.04));
}

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  transition: padding .3s, background .3s, border-color .3s, box-shadow .3s;
  border-bottom: 1px solid transparent;
}
/* permanent top scrim keeps the bar legible over the hero art */
.nav::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 132px; z-index: -1;
  pointer-events: none; transition: opacity .3s;
  background: linear-gradient(180deg, rgba(4,6,13,.9), rgba(4,6,13,0));
}
.nav.scrolled::before { opacity: 0; }
.nav.scrolled {
  padding-top: .55rem; padding-bottom: .55rem;
  background: rgba(7,11,22,.72); backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 44px -22px rgba(0,0,0,.9);
}

.brand { display: inline-flex; align-items: center; flex: 1 1 0; }
.brand__logo { height: 62px; width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); transition: filter .25s, transform .25s, height .3s; }
.brand:hover .brand__logo { filter: drop-shadow(0 2px 16px rgba(74,157,255,.55)); transform: translateY(-1px); }
.nav.scrolled .brand__logo { height: 52px; }
.brand__logo--footer { height: 88px; }

.nav__links { display: flex; align-items: center; gap: clamp(1.2rem, 2.2vw, 2.1rem); flex: 0 0 auto; }
.nav__links a {
  position: relative; font-family: var(--body); font-size: .78rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: rgba(221,231,248,.74); transition: color .2s;
}
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 0; height: 2px; background: var(--gold); box-shadow: 0 0 8px rgba(243,201,105,.6); transition: width .25s; }
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; flex: 1 1 0; }
.nav__actions .btn { height: 44px; padding-top: 0; padding-bottom: 0; }
.nav__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-hi); border-radius: 2px; color: var(--ice); transition: border-color .2s, background .2s, transform .2s; }
.nav__icon svg { width: 18px; height: 18px; fill: currentColor; }
.nav__icon:hover { border-color: var(--frost-bright); background: rgba(143,198,255,.1); transform: translateY(-2px); }
.nav__actions { display: flex; align-items: center; gap: .7rem; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; border-radius: 2px; background: var(--ice); transition: transform .3s, opacity .3s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   HERO - full-bleed key art (the gate of Alius)
   ===================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 7rem clamp(1.2rem, 6vw, 6rem) 4rem; overflow: hidden; isolation: isolate;
}

/* ---------- the key-art scene ---------- */
.vista { position: absolute; inset: 0; z-index: 0; }
.vista > * { position: absolute; }

/* background image: outer node = JS parallax (translate via --px/--py),
   inner node = slow ken-burns drift. Both over-scanned so edges never show. */
/* still, deep gradient field (replaces the moving portal video) */
.vista__bg {
  inset: -5%; transform: translate(var(--px, 0px), var(--py, 0px)); will-change: transform;
  background:
    radial-gradient(125% 95% at 70% 36%, rgba(26,50,92,.55), transparent 58%),
    radial-gradient(85% 70% at 16% 8%, rgba(74,157,255,.09), transparent 55%),
    linear-gradient(180deg, #0a1322 0%, #070d18 48%, #04060d 100%);
}

/* twin aura behind the relic - frost above, ember below: where fire meets frost */
.vista__glow {
  right: 6%; top: 50%; transform: translate(var(--px, 0px), calc(-50% + var(--py, 0px)));
  width: 42vw; max-width: 580px; height: 76vh; max-height: 760px;
  background:
    radial-gradient(46% 34% at 50% 24%, rgba(255,150,72,.26), transparent 70%),
    radial-gradient(52% 44% at 50% 74%, rgba(86,176,255,.26), transparent 72%);
  filter: blur(34px); animation: auraPulse 6.5s ease-in-out infinite;
}
@keyframes auraPulse { 0%,100% { opacity: .62; } 50% { opacity: 1; } }
@keyframes portalpulse { 0%,100% { opacity: .55; transform: scale(.98); } 50% { opacity: .95; transform: scale(1.04); } }

/* legibility + page-blend scrim (dark on the left for the text, dark at the bottom) */
.vista__scrim {
  inset: 0;
  background:
    linear-gradient(95deg, rgba(4,6,13,.92) 0%, rgba(4,6,13,.66) 26%, rgba(4,6,13,.18) 50%, transparent 66%),
    linear-gradient(180deg, rgba(4,6,13,.45) 0%, transparent 22%, transparent 52%, rgba(4,6,13,.72) 86%, var(--void) 100%);
}

/* rising magic motes (JS-spawned) */
.vista__embers { inset: 0; pointer-events: none; }
.ember-mote { position: absolute; border-radius: 50%; bottom: 22%; will-change: transform, opacity; }

/* ---------- the relic: a single 3D cache artifact, framed like a codex plate ---------- */
.hero__relic {
  position: absolute; z-index: 2; pointer-events: none;
  right: clamp(1.5rem, 6vw, 6rem); top: 50%; transform: translateY(-50%);
  width: min(42vw, 500px); height: min(74vh, 660px);
  display: grid; place-items: center;
}
/* gold corner brackets - codex framing, only two corners like the rest of the site */
.hero__relic::before, .hero__relic::after {
  content: ""; position: absolute; width: 34px; height: 34px; pointer-events: none;
  border: 0 solid rgba(243,201,105,.5);
}
.hero__relic::before { top: 3%; left: 3%; border-top-width: 1px; border-left-width: 1px; }
.hero__relic::after  { bottom: 3%; right: 3%; border-bottom-width: 1px; border-right-width: 1px; }
.hero__relic-mv {
  width: 100%; height: 100%; background: transparent; --poster-color: transparent;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)) drop-shadow(0 0 42px rgba(255,140,70,.26));
  animation: relicfloat 8s ease-in-out infinite;
}
@keyframes relicfloat { 0%,100% { transform: translateY(-2.2%); } 50% { transform: translateY(2.2%); } }
@media (prefers-reduced-motion: reduce) { .hero__relic-mv { animation: none; } }
@media (max-width: 980px) { .hero__relic { display: none; } }

/* ---------- hero content (left-aligned over the open sky) ---------- */
.hero__inner { position: relative; z-index: 3; text-align: left; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ice);
  padding: .5em 1.05em; border: 1px solid var(--line-hi); border-radius: 2px;
  background: linear-gradient(180deg, rgba(74,157,255,.1), rgba(74,157,255,.03));
  box-shadow: inset 0 1px 0 rgba(180,215,255,.12);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #5fe6a0; box-shadow: 0 0 0 0 rgba(95,230,160,.7); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95,230,160,.6);} 70% { box-shadow: 0 0 0 9px rgba(95,230,160,0);} 100% { box-shadow: 0 0 0 0 rgba(95,230,160,0);} }

.hero__logo {
  width: clamp(230px, 30vw, 400px); height: auto; display: block; margin: 0 0 1.6rem -1.5%;
  filter: drop-shadow(0 8px 34px rgba(0,0,0,.65)) drop-shadow(0 0 22px rgba(74,157,255,.28));
}
.hero__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.02; letter-spacing: -.005em;
  color: var(--head); margin: 1.5rem 0 1.5rem;
  text-shadow: 0 2px 30px rgba(4,6,13,.7);
}
.hero__title .line { display: block; }
.hero__title em {
  font-style: italic; font-weight: 700;
  background: linear-gradient(100deg, #ff9a4d, #ffc170 42%, #ffe6b0 58%, #ffae5c);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 46px rgba(255,150,80,.45);
  animation: flow 7s linear infinite;
}
.hero__title em.frost {
  background: linear-gradient(100deg, var(--frost), var(--ice) 40%, #fff 55%, var(--frost-bright));
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 50px rgba(74,157,255,.4);
}
@keyframes flow { to { background-position: -220% 0; } }

.hero__sub { font-size: clamp(1.04rem, 1.6vw, 1.24rem); color: var(--text); max-width: 48ch; margin: 0 0 2.3rem; text-shadow: 0 1px 16px rgba(4,6,13,.8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: flex-start; }

/* live-count chip - slim, minimal, floats bottom-right of the scene */
.hud {
  position: absolute; z-index: 3; right: clamp(1rem, 5vw, 3.5rem); bottom: 3.4rem;
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .7em 1.1em;
  border: 1px solid var(--line-hi); border-radius: 2px;
  background: linear-gradient(180deg, rgba(12,22,40,.66), rgba(8,14,26,.66));
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -26px rgba(0,0,0,.9), inset 0 1px 0 rgba(143,198,255,.1);
  font-family: var(--body); font-size: .9rem; color: var(--muted); white-space: nowrap;
}
.hud__dot { width: 8px; height: 8px; border-radius: 50%; background: #5fe6a0; box-shadow: 0 0 10px #5fe6a0; animation: pulse 2.4s infinite; flex-shrink: 0; }
.hud__count { color: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; }

.hero__scroll {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .22em; color: var(--muted);
}
.hero__scroll i { width: 1px; height: 34px; background: linear-gradient(var(--frost-bright), transparent); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; top: -10px; left: 0; width: 1px; height: 10px; background: var(--ice); animation: scrolldown 1.8s ease-in-out infinite; }
@keyframes scrolldown { 0% { top: -10px; } 100% { top: 34px; } }

/* =====================================================================
   MARQUEE
   ===================================================================== */
.marquee {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(74,157,255,.05), transparent);
  overflow: hidden; padding: 1.15rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 2.2rem; width: max-content; animation: scroll 42s linear infinite reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--crest); font-weight: 600; font-size: 1.08rem; letter-spacing: .18em; color: rgba(224,238,255,.72); }
.marquee__track b { color: var(--gold); font-size: .65rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* =====================================================================
   SECTION HEADS
   ===================================================================== */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 5vw, 3.5rem); }
/* illuminated folio numeral, top-right of each section */
.section[data-num]::before {
  content: attr(data-num); position: absolute; z-index: -1; pointer-events: none;
  top: clamp(2rem, 5vw, 3.6rem); right: clamp(1.2rem, 5vw, 3.5rem);
  font-family: var(--display); font-weight: 700; font-style: italic; line-height: .8;
  font-size: clamp(5rem, 15vw, 13rem);
  color: transparent; -webkit-text-stroke: 1px rgba(243,201,105,.18);
}
.head { position: relative; max-width: 720px; margin-bottom: 3.2rem; }
/* editorial: left-aligned everywhere (kill the centered template look) */
.head--center { text-align: left; margin-inline: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: .85rem;
  font-family: var(--mono); font-weight: 600; font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.kicker::before { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.kicker--center { text-align: left; }
.head__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; color: var(--head); letter-spacing: -.005em;
}
.head__title em {
  font-style: italic; font-weight: 700;
  background: linear-gradient(100deg, var(--frost), var(--ice) 50%, var(--frost-bright));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.head__lead { margin-top: 1.2rem; font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.head__lead--center { margin-inline: 0; }

/* =====================================================================
   FEATURES - bento grid
   ===================================================================== */
.bento {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "feat feat tall"
    "g2   g3   tall"
    "wide wide wide";
}
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 2rem 1.9rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,28,48,.5), rgba(9,14,26,.5));
  transition: transform .4s cubic-bezier(.2,.9,.3,1), border-color .4s, box-shadow .4s;
}
.tile:hover { transform: translateY(-6px); border-color: var(--line-hi); box-shadow: 0 36px 70px -34px rgba(74,157,255,.45); }
.tile--feature { grid-area: feat; }
.tile--tall { grid-area: tall; }
.tile--wide { grid-area: wide; }
.tile:nth-child(3) { grid-area: g2; }
.tile:nth-child(4) { grid-area: g3; }

.tile__ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 2px; margin-bottom: 1.3rem; background: linear-gradient(180deg, rgba(74,157,255,.22), rgba(74,157,255,.05)); border: 1px solid var(--line-hi); flex-shrink: 0; }
.tile__ico svg { width: 26px; height: 26px; fill: var(--frost-bright); }
.tile__ico--gold { background: linear-gradient(180deg, rgba(243,201,105,.26), rgba(243,201,105,.05)); border-color: rgba(243,201,105,.45); }
.tile__ico--gold svg { fill: var(--gold-bright); }
.tile h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--head); margin-bottom: .5rem; line-height: 1.12; }
.tile p { font-size: .96rem; color: var(--muted); }
.tile--feature h3 { font-size: 2rem; }
.tile--feature { background: radial-gradient(120% 100% at 100% 0%, rgba(74,157,255,.16), transparent 55%), linear-gradient(180deg, rgba(16,28,48,.6), rgba(9,14,26,.6)); box-shadow: inset 0 1px 0 rgba(243,201,105,.35); }
.tile__glow { position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: var(--gold); filter: blur(76px); opacity: .22; }
.tile__badge { position: absolute; top: 1.3rem; right: 1.3rem; z-index: 1; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); border: 1px solid rgba(243,201,105,.45); background: rgba(243,201,105,.1); padding: .3em .7em; border-radius: 2px; }
.tile__list { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.tile__list li { font-size: .9rem; color: var(--text); padding-left: 1.2rem; position: relative; }
.tile__list li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: .58rem; top: .3em; }

/* gold metric footers - pinned to the bottom so tiles never feel empty */
.tile__foot { margin-top: auto; padding-top: 1.5rem; display: flex; align-items: baseline; gap: .55rem; }
.tile__stat { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--gold); text-shadow: 0 0 26px rgba(243,201,105,.3); }
.tile__foot > span { font-size: .82rem; color: var(--muted); }
.tile__tags { flex-wrap: wrap; align-items: flex-start; }
.tile__tags span { font-family: var(--mono); font-size: .68rem; letter-spacing: .03em; color: var(--gold-bright); border: 1px solid rgba(243,201,105,.28); background: rgba(243,201,105,.06); padding: .4em .75em; border-radius: 2px; }

/* wide tile: horizontal layout fills the full-width row */
.tile--wide { flex-direction: row; align-items: center; gap: clamp(1.4rem, 4vw, 3rem); }
.tile--wide .tile__ico { margin-bottom: 0; }
.tile--wide__main { flex: 1; min-width: 0; }
.tile--wide__main h3 { margin-bottom: .4rem; }
.tile__metrics { display: flex; gap: clamp(1.5rem, 4vw, 3rem); flex-shrink: 0; }
.tile__metrics > div { display: flex; flex-direction: column; }
.tile__metrics b { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--gold); text-shadow: 0 0 26px rgba(243,201,105,.3); }
.tile__metrics span { font-size: .8rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; }

/* =====================================================================
   ILLUMINATED CORNER-BRACKETS - signature frame motif (echoes the logo)
   ===================================================================== */
.event, .tl__card { position: relative; }
.tile::before, .tile::after,
.post::before, .post::after,
.event::before, .event::after,
.tl__card::before, .tl__card::after {
  content: ""; position: absolute; width: 11px; height: 11px; z-index: 2; pointer-events: none;
  border: 0 solid rgba(243,201,105,.5); transition: border-color .35s, width .35s, height .35s;
}
.tile::before, .post::before, .event::before, .tl__card::before { top: 7px; left: 7px; border-top-width: 1px; border-left-width: 1px; }
.tile::after, .post::after, .event::after, .tl__card::after { bottom: 7px; right: 7px; border-bottom-width: 1px; border-right-width: 1px; }
.tile:hover::before, .tile:hover::after,
.post:hover::before, .post:hover::after,
.event:hover::before, .event:hover::after,
.tl:hover .tl__card::before, .tl:hover .tl__card::after { border-color: var(--gold-bright); width: 15px; height: 15px; }

/* =====================================================================
   GAME MODES
   ===================================================================== */
/* editorial ledger: numbered rows with rule lines, not a card grid */
.modes { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mode {
  position: relative; display: grid; grid-template-columns: 92px 1fr auto;
  align-items: center; gap: clamp(1rem, 3vw, 2.6rem);
  padding: 1.7rem clamp(.4rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  transition: background .35s, padding-left .35s;
}
.mode::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent, var(--frost)); box-shadow: 0 0 18px var(--accent, var(--frost)); transform: scaleY(0); transform-origin: top; transition: transform .4s; }
.mode:hover { background: linear-gradient(90deg, rgba(74,157,255,.05), transparent 70%); padding-left: clamp(1rem, 2.5vw, 2rem); }
.mode:hover::before { transform: scaleY(1); }
.mode--main     { --accent: var(--frost); }
.mode--iron     { --accent: #b9c6da; }
.mode--ultimate { --accent: #8fb2d6; }
.mode--hardcore { --accent: var(--ember); }
.mode--group    { --accent: var(--gold); }
.mode--hcgroup  { --accent: #ff8a6e; }
.mode__no { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--accent, var(--frost)); text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.mode__body h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--head); margin-bottom: .25rem; }
.mode__body p { font-size: .95rem; color: var(--muted); max-width: 54ch; }
.mode__tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent, var(--frost)); text-align: right; white-space: nowrap; }

/* experience rates - a distinct horizontal rate selector */
.xp { margin-top: clamp(2.8rem, 6vw, 4.5rem); }
.xp__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem 1.4rem; margin-bottom: 1.4rem; }
.xp__note { font-size: .92rem; color: var(--muted); }
.xp__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.xp__rate { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.5rem; background: linear-gradient(180deg, rgba(16,28,48,.5), rgba(9,14,26,.55)); transition: background .3s; }
.xp__rate::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent, var(--frost)); opacity: .65; transition: opacity .3s, box-shadow .3s; }
.xp__rate:hover { background: linear-gradient(180deg, rgba(22,38,64,.65), rgba(12,20,34,.6)); }
.xp__rate:hover::before { opacity: 1; box-shadow: 0 0 16px var(--accent, var(--frost)); }
.xp__rate--casual   { --accent: var(--frost); }
.xp__rate--standard { --accent: var(--frost-bright); }
.xp__rate--classic  { --accent: var(--gold); }
.xp__rate--extreme  { --accent: #ff8a6e; }
.xp__rate--realism  { --accent: var(--ember); }
.xp__mult { font-family: var(--display); font-weight: 700; font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--accent, var(--frost)); text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); flex-shrink: 0; }
.xp__body h4 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--head); margin-bottom: .15rem; }
.xp__body p { font-size: .86rem; color: var(--muted); }

/* =====================================================================
   ROADMAP - vertical timeline
   ===================================================================== */
.timeline { position: relative; max-width: none; margin: 0; padding-left: 2.4rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--gold), rgba(74,157,255,.55) 45%, var(--line) 100%); }
.tl { position: relative; padding-bottom: 1.3rem; }
.tl:last-child { padding-bottom: 0; }
.tl__node { position: absolute; left: -2.4rem; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--night); border: 2px solid rgba(143,198,255,.5); }
.tl--done .tl__node { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(243,201,105,.14), 0 0 12px rgba(243,201,105,.6); }
.tl--now .tl__node { border-color: var(--frost-bright); box-shadow: 0 0 0 4px rgba(74,157,255,.18), 0 0 12px rgba(74,157,255,.7); animation: pulse 2.4s infinite; }
.tl__card { border: 1px solid var(--line); border-radius: 2px; background: linear-gradient(180deg, rgba(16,28,48,.42), rgba(9,14,26,.45)); padding: 1.4rem 1.6rem; transition: border-color .3s, transform .3s, box-shadow .3s; }
.tl:hover .tl__card { border-color: var(--line-hi); transform: translateX(5px); box-shadow: 0 24px 50px -34px rgba(74,157,255,.4); }
.tl__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.tl__phase { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.tl__status { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: .35em .75em; border-radius: 2px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tl__status--done { color: #7be0a8; border-color: rgba(123,224,168,.4); background: rgba(123,224,168,.08); }
.tl__status--now { color: var(--frost-bright); border-color: var(--line-hi); background: rgba(74,157,255,.1); }
.tl__card h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--head); margin-bottom: .4rem; line-height: 1.1; }
.tl__card p { font-size: .95rem; color: var(--muted); }
.roadmap__cta { text-align: center; margin-top: 2.6rem; }

/* =====================================================================
   PLANNED EVENTS
   ===================================================================== */
.events__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.1rem; }
.event { display: flex; gap: 1.2rem; padding: 1.5rem 1.6rem; border: 1px solid var(--line); border-radius: 2px; background: linear-gradient(180deg, rgba(16,28,48,.42), rgba(9,14,26,.45)); transition: border-color .3s, transform .3s, box-shadow .3s; }
.event:hover { border-color: var(--line-hi); transform: translateY(-4px); box-shadow: 0 26px 50px -34px rgba(74,157,255,.4); }
.event__date { flex-shrink: 0; width: 64px; align-self: flex-start; text-align: center; border: 1px solid var(--line-hi); border-radius: 2px; overflow: hidden; background: rgba(8,14,26,.55); }
.event__mon { display: block; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #1d1404; font-weight: 700; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; padding: .32em 0; }
.event__day { display: block; font-family: var(--display); font-weight: 700; font-size: 1.85rem; line-height: 1.2; color: var(--head); }
.event__dow { display: block; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: .5em; }
.event__tag { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: .32em .65em; border: 1px solid var(--line); border-radius: 2px; margin-bottom: .55rem; color: var(--muted); }
.event__tag--xp   { color: var(--gold-bright); border-color: rgba(243,201,105,.4); background: rgba(243,201,105,.08); }
.event__tag--boss { color: var(--ember-bright); border-color: rgba(255,122,60,.4); background: rgba(255,122,60,.08); }
.event__tag--pvp  { color: var(--frost-bright); border-color: var(--line-hi); background: rgba(74,157,255,.1); }
.event__tag--comm { color: #7be0a8; border-color: rgba(123,224,168,.4); background: rgba(123,224,168,.08); }
.event__body h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--head); margin-bottom: .3rem; line-height: 1.12; }
.event__body p { font-size: .92rem; color: var(--muted); }
.events__note { text-align: center; margin-top: 2rem; font-size: .9rem; color: var(--muted); }
.events__note a { color: var(--frost-bright); }
.events__note a:hover { text-decoration: underline; }

/* =====================================================================
   STATS
   ===================================================================== */
.stats { border-block: 1px solid var(--line); background: radial-gradient(60% 160% at 50% 0%, rgba(74,157,255,.08), transparent), rgba(7,11,21,.6); }
.stats__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: clamp(2.6rem, 5vw, 4rem) clamp(1.2rem, 5vw, 3.5rem); }
.stats__cell { text-align: center; padding: 1rem; border-left: 1px solid var(--line); }
.stats__cell:first-child { border-left: 0; }
.stats__num { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; color: var(--frost-bright); font-variant-numeric: tabular-nums; text-shadow: 0 0 34px rgba(74,157,255,.4); }
.stats__cap { font-size: .85rem; color: var(--muted); margin-top: .55rem; display: block; }

/* =====================================================================
   STEPS
   ===================================================================== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; }
.step { position: relative; padding: 2.3rem 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(16,28,48,.4), rgba(9,14,26,.45)); transition: border-color .3s, transform .3s; }
.step:hover { border-color: var(--line-hi); transform: translateY(-4px); }
.step__no { font-family: var(--display); font-weight: 700; font-size: 2.8rem; background: linear-gradient(180deg, var(--frost-bright), rgba(74,157,255,.2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: block; margin-bottom: .5rem; }
.step h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--head); margin-bottom: .5rem; }
.step p { font-size: .96rem; color: var(--muted); }
.step__dl { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.chip { display: inline-flex; align-items: center; gap: .4em; font-size: .82rem; font-weight: 500; padding: .48em .9em; border-radius: 2px; border: 1px solid var(--line); color: var(--ice); background: rgba(143,198,255,.05); transition: border-color .2s, background .2s, transform .2s; }
.chip .ico { width: .95em; height: .95em; fill: var(--frost-bright); }
.chip:hover { border-color: var(--frost-bright); background: rgba(143,198,255,.12); transform: translateY(-2px); }

/* =====================================================================
   NEWS
   ===================================================================== */
.news { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.1rem; }
.post { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(16,28,48,.45), rgba(9,14,26,.45)); padding: 1.8rem; display: flex; flex-direction: column; gap: .8rem; transition: border-color .3s, transform .3s, box-shadow .3s; }
.post:hover { border-color: var(--line-hi); transform: translateY(-4px); box-shadow: 0 30px 56px -34px rgba(74,157,255,.45); }
.post--feature { grid-row: span 2; justify-content: flex-end; min-height: 340px; background: radial-gradient(120% 90% at 80% 0%, rgba(74,157,255,.2), transparent 60%), linear-gradient(180deg, rgba(16,28,48,.55), rgba(9,14,26,.75)); }
.post__shine { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: var(--frost); filter: blur(70px); opacity: .35; }
.post__tag { align-self: flex-start; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: .35em .85em; border-radius: 2px; border: 1px solid var(--line-hi); color: var(--frost-bright); background: rgba(74,157,255,.08); position: relative; }
.post__tag--new { color: var(--gold); border-color: rgba(243,201,105,.4); background: rgba(243,201,105,.08); }
.post__body { position: relative; display: flex; flex-direction: column; gap: .45rem; }
.post__date { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.post h3 { font-family: var(--display); font-weight: 600; color: var(--head); font-size: 1.35rem; line-height: 1.1; }
.post--feature h3 { font-size: 2.1rem; }
.post p { font-size: .95rem; color: var(--muted); }
.post__more { color: var(--frost-bright); font-weight: 600; font-size: .9rem; margin-top: .3rem; }

/* =====================================================================
   JOIN CTA
   ===================================================================== */
.join { padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 5vw, 3.5rem); }
.join__panel { position: relative; overflow: hidden; max-width: var(--maxw); margin: 0 auto; text-align: center;
  padding: clamp(3.8rem, 9vw, 6.5rem) clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line-hi);
  background:
    linear-gradient(90deg, transparent, var(--gold-bright), transparent) no-repeat center top / 170px 2px,
    radial-gradient(72% 130% at 50% -12%, rgba(74,157,255,.24), transparent 62%),
    radial-gradient(60% 70% at 50% 125%, rgba(243,201,105,.07), transparent 70%),
    linear-gradient(180deg, #0b1730, #070d18);
}
/* signature ornate corner-brackets framing the finale */
.join__panel::before, .join__panel::after { content: ""; position: absolute; width: 26px; height: 26px; border: 0 solid rgba(243,201,105,.6); pointer-events: none; }
.join__panel::before { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.join__panel::after { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }
.join__logo { position: relative; width: clamp(160px, 22vw, 240px); height: auto; margin: 0 auto 1.7rem; filter: drop-shadow(0 6px 26px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(74,157,255,.28)); }
.join__panel .kicker { position: relative; }
.join__panel h2 { position: relative; font-family: var(--display); font-weight: 600; font-size: clamp(2.4rem, 6vw, 4.6rem); color: var(--head); margin-bottom: .7rem; line-height: 1.0; }
.join__panel h2 em { font-style: italic; font-weight: 700; background: linear-gradient(100deg, var(--gold), var(--gold-bright)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.join__panel p { position: relative; color: var(--text); font-size: 1.12rem; margin: 0 auto 2.1rem; max-width: 52ch; }
.join__cta { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; }
.join__panel .join__trust { position: relative; margin-top: calc(2.7rem + 17px); display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .55rem; }
.join__tag { display: inline-flex; align-items: center; gap: .55em; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); background: rgba(16,28,48,.4); padding: .62em .95em; }
.join__tag--live { color: var(--ice); border-color: var(--line-hi); }
.join__count { font-family: var(--mono); font-weight: 700; letter-spacing: .06em; color: var(--gold-bright); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { border-top: 1px solid var(--line); background: var(--abyss); padding: clamp(3rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 3.5rem) 2rem; }
.footer__top { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.footer__brand { max-width: 320px; }
.footer__brand .brand { margin-bottom: 1rem; }
.footer__brand p { font-size: .92rem; color: var(--muted); }
.footer__col h4 { font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); margin-bottom: 1rem; }
.footer__col a { display: block; font-size: .92rem; color: var(--muted); padding: .3rem 0; transition: color .2s, padding-left .2s; }
.footer__col a:hover { color: var(--frost-bright); padding-left: .35rem; }
.footer__bottom { max-width: var(--maxw); margin: 1.6rem auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: var(--muted); }
.footer__dev { font-family: var(--mono); color: var(--frost); }

/* =====================================================================
   ENTRANCE + REVEAL
   ===================================================================== */
.stagger { opacity: 0; transform: translateY(24px); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * .12s + .1s); }
@keyframes rise { to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
/* gentle cascade for grids */
.bento .reveal.in:nth-child(2) { transition-delay: .06s; }
.bento .reveal.in:nth-child(3) { transition-delay: .12s; }
.modes .reveal.in:nth-child(2) { transition-delay: .07s; }
.modes .reveal.in:nth-child(3) { transition-delay: .14s; }
.modes .reveal.in:nth-child(4) { transition-delay: .21s; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1080px) {
  .rail { display: none; }
}
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "feat feat" "tall tall" "g2 g3" "wide wide"; }
  .news { grid-template-columns: 1fr; }
  .post--feature { grid-row: auto; min-height: 240px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; }
  /* Open mobile menu: the nav itself wraps into one cohesive drawer; links then
     actions flow in normal order under a single background (no absolute panels). */
  .nav.open { flex-wrap: wrap; row-gap: 0; background: rgba(6,10,20,.98); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); box-shadow: 0 26px 52px -28px rgba(0,0,0,.75); }
  .nav.open .nav__links { display: flex; flex-direction: column; align-items: flex-start; gap: 1.15rem; flex: 0 0 100%; width: 100%; order: 2; margin-top: 1.1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
  .nav.open .nav__actions { display: flex; flex-direction: column; align-items: stretch; gap: .7rem; flex: 0 0 100%; width: 100%; order: 3; margin-top: 1.2rem; padding-bottom: .4rem; }
  .nav.open .nav__actions .btn { justify-content: center; }
  .nav.open .nav__icon { width: 100%; }

  .hud { display: none; }

  .bento { grid-template-columns: 1fr; grid-template-areas: "feat" "tall" "g2" "g3" "wide"; }
  .tile--wide { flex-direction: column; align-items: flex-start; }
  .tile--wide .tile__ico { margin-bottom: 1.3rem; }
  .tile__metrics { gap: 2rem; margin-top: 1.2rem; }
  .mode { grid-template-columns: 54px 1fr; gap: .4rem 1.2rem; }
  .mode__tag { grid-column: 2; justify-self: start; text-align: left; margin-top: .2rem; }

  .stats__grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 0; }
  .stats__cell:nth-child(odd) { border-left: 0; }
  .stats__cell:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (max-width: 460px) {
  .footer__top { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* =====================================================================
   SUB-PAGES - shared page banner + active nav
   ===================================================================== */
.nav__links a.is-active { color: #fff; }
.nav__links a.is-active::after { width: 100%; }

.pagehead { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(8.5rem, 15vw, 12rem) clamp(1.2rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 3.5rem); }
.pagehead::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(110% 80% at 50% -25%, rgba(74,157,255,.12), transparent 58%); }
.pagehead__inner { position: relative; max-width: 820px; }
.pagehead h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; color: var(--head); margin: .2rem 0; }
.pagehead h1 em { font-style: italic; font-weight: 700; background: linear-gradient(100deg, var(--frost), var(--ice) 50%, var(--frost-bright)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pagehead__lead { margin-top: 1rem; font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.pagewrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 3.5rem) clamp(5rem, 10vw, 8rem); }

/* shared toolbar (tabs + search) */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab { font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .65em 1.15em; border: 1px solid var(--line); background: rgba(143,198,255,.03); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.tab:hover { color: var(--ice); border-color: var(--line-hi); }
.tab.is-active { color: #1d1404; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-color: var(--gold-bright); }
.field { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: rgba(143,198,255,.04); padding: 0 .9em; }
.field svg { width: 16px; height: 16px; fill: var(--muted); flex-shrink: 0; }
.field input { background: none; border: 0; color: var(--ice); font-family: var(--body); font-size: .92rem; padding: .7em 0; outline: none; min-width: 180px; }
.field input::placeholder { color: var(--muted); }

/* =====================================================================
   HISCORES
   ===================================================================== */
/* ---- The Champions' Ledger ---- */
@keyframes hsIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hs__tagmode { font-family: var(--mono); font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; color: var(--frost-bright); border: 1px solid var(--line-hi); padding: .2em .5em; white-space: nowrap; }
.hs__empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }

/* top-3 podium */
/* top-3 emphasis within the ledger - gold / silver / bronze rank numerals */
.lrow.lrow--1 { background: linear-gradient(90deg, rgba(243,201,105,.08), transparent 60%); }
.lrow--1 .lrank { color: var(--gold); text-shadow: 0 0 16px rgba(243,201,105,.5); }
.lrow--2 .lrank { color: #cdd7e6; }
.lrow--3 .lrank { color: var(--ember-bright); }
.lrow--1 .lscore { color: var(--gold-bright); }
.lrow--1 .lav { border-color: var(--gold); box-shadow: 0 0 10px rgba(243,201,105,.5); }
.lrow--2 .lav { border-color: #cdd7e6; }
.lrow--3 .lav { border-color: var(--ember-bright); }

/* editorial ledger */
.ledger { border-top: 1px solid var(--line-hi); }
.ledger__head, .lrow { display: grid; grid-template-columns: 64px 38px minmax(0,1fr) auto; align-items: center; gap: 1rem; }
.ledger__head { padding: .55rem 1rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ledger__head span:last-child { text-align: right; }
.lrow { position: relative; padding: .9rem 1rem; border-bottom: 1px solid var(--line); transition: background .25s, padding-left .25s; animation: hsIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * .03s); }
.ledger.searching .lrow { animation: none; }
.lrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .25s, box-shadow .25s; }
.lrow:hover { background: linear-gradient(90deg, rgba(74,157,255,.08), transparent 62%); padding-left: 1.5rem; }
.lrow:hover::before { background: var(--frost); box-shadow: 0 0 12px var(--frost); }
.lrow:hover .lrank { color: var(--gold); }
.lrank { font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.7rem; line-height: 1; text-align: center; color: rgba(143,198,255,.34); transition: color .25s; }
.lav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-hi); background: radial-gradient(circle at 50% 35%, rgba(74,157,255,.4), rgba(9,14,26,.85)); }
.lname { display: flex; align-items: center; gap: .7rem; min-width: 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--head); }
.lscore { text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--ice); font-variant-numeric: tabular-nums; }
.lscore small { display: block; font-family: var(--body); font-weight: 400; font-size: .72rem; color: var(--muted); }
.hs__filters { display: flex; flex-wrap: wrap; gap: .9rem 1.8rem; align-items: flex-start; margin-bottom: 1.3rem; }
.hs__group { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.hs__group[hidden] { display: none; }
.hs__label { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hchips { display: flex; flex-wrap: wrap; gap: .4rem; }
.hchip { font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .5em .8em; border: 1px solid var(--line); background: rgba(143,198,255,.03); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.hchip:hover { color: var(--ice); border-color: var(--line-hi); }
.hchip.is-active { color: var(--frost-bright); border-color: var(--frost); background: rgba(74,157,255,.12); }
.hs__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between; margin-top: 1.2rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; margin-top: 1.6rem; }
.pager__btn { font-family: var(--mono); font-size: .72rem; min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 .7em; border: 1px solid var(--line); background: rgba(143,198,255,.03); color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.pager__btn:hover:not(:disabled) { color: var(--ice); border-color: var(--line-hi); }
.pager__btn.is-active { color: #1d1404; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-color: var(--gold-bright); }
.pager__btn:disabled { opacity: .3; cursor: default; }
.pager__gap { color: var(--muted); padding: 0 .2em; }

/* =====================================================================
   STORE
   ===================================================================== */
.store__note { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); margin-bottom: 1.8rem; }
.store__note svg { width: 18px; height: 18px; fill: var(--frost-bright); flex-shrink: 0; }
.store__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1.2rem; }
.product {
  position: relative; display: flex; flex-direction: column; padding: 2rem 1.7rem 1.7rem;
  border: 1px solid var(--line); --rarity: var(--frost);
  background: radial-gradient(130% 80% at 50% -12%, color-mix(in srgb, var(--rarity) 13%, transparent), transparent 58%), linear-gradient(180deg, rgba(16,28,48,.5), rgba(9,14,26,.6));
  transition: transform .35s cubic-bezier(.2,.9,.3,1), border-color .35s, box-shadow .35s;
}
.product[data-cat="ranks"]     { --rarity: var(--gold); }
.product[data-cat="bonds"]     { --rarity: var(--frost); }
.product[data-cat="cosmetics"] { --rarity: var(--ember); }
.product[data-cat="boosts"]    { --rarity: #5fe6a0; }
/* rarity bar (top) */
.product__bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--rarity), transparent); opacity: .65; transition: opacity .35s, box-shadow .35s; }
/* signature gold corner-brackets */
.product::before, .product::after { content: ""; position: absolute; width: 13px; height: 13px; border: 0 solid rgba(243,201,105,.5); pointer-events: none; transition: width .35s, height .35s, border-color .35s; }
.product::before { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.product::after { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }
.product:hover { transform: translateY(-7px); border-color: color-mix(in srgb, var(--rarity) 55%, var(--line)); box-shadow: 0 38px 72px -38px color-mix(in srgb, var(--rarity) 65%, transparent); }
.product:hover .product__bar { opacity: 1; box-shadow: 0 0 16px var(--rarity); }
.product:hover::before, .product:hover::after { width: 18px; height: 18px; border-color: var(--gold-bright); }
.product__ribbon { position: absolute; top: 1.3rem; right: 1.3rem; z-index: 1; font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: #1d1404; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); padding: .35em .65em; }
.product__tier { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rarity); margin-bottom: 1rem; }
.product__ico { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 1.1rem; border: 1px solid color-mix(in srgb, var(--rarity) 55%, var(--line)); background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--rarity) 28%, transparent), rgba(9,14,26,.45)); box-shadow: inset 0 0 20px -6px var(--rarity); }
.product__mv { width: 100%; height: 112px; margin-bottom: 1.1rem; position: relative; overflow: hidden;
  background: radial-gradient(58% 60% at 50% 42%, color-mix(in srgb, var(--rarity) 9%, transparent), transparent 70%); }
.product__mv model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.product__ico svg { width: 30px; height: 30px; fill: var(--rarity); }
.product h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--head); margin-bottom: .35rem; }
.product__desc { font-size: .92rem; color: var(--muted); margin-bottom: 1.4rem; }
.product__price { display: flex; align-items: baseline; gap: .4em; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.product__amt { color: var(--rarity); text-shadow: 0 0 24px color-mix(in srgb, var(--rarity) 35%, transparent); }
.product__price span { font-family: var(--body); font-weight: 500; font-size: .85rem; color: var(--muted); letter-spacing: 0; }
.product .btn { margin-top: 1.1rem; justify-content: center; }
.product .btn .ico { width: 1.05em; height: 1.05em; fill: currentColor; }
.product .btn.added { background: linear-gradient(180deg, #5fe6a0, #2faa6b); color: #04221a; border-color: #9af0c4; }

/* cart button + badge (toolbar) */
.cartbtn { position: relative; display: inline-flex; align-items: center; gap: .55em; font-family: var(--body); font-weight: 600; font-size: .82rem; color: var(--ice); border: 1px solid var(--line-hi); background: rgba(143,198,255,.05); padding: .7em 1.1em; cursor: pointer; transition: border-color .2s, background .2s; }
.cartbtn:hover { border-color: var(--frost-bright); background: rgba(143,198,255,.12); }
.cartbtn svg { width: 18px; height: 18px; fill: currentColor; }
.cartbtn__count { min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; font-family: var(--mono); font-size: .64rem; font-weight: 700; color: #1d1404; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.cartbtn__count[hidden] { display: none; }

/* cart drawer */
.cart-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(2,4,9,.6); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.cart-backdrop.open { opacity: 1; visibility: visible; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(404px, 92vw); z-index: 90; display: flex; flex-direction: column; background: linear-gradient(180deg, #0b1730, #070d18); border-left: 1px solid var(--line-hi); box-shadow: -30px 0 80px -30px rgba(0,0,0,.9); transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.9,.3,1); }
.cart.open { transform: none; }
.cart::before, .cart::after { content: ""; position: absolute; width: 16px; height: 16px; border: 0 solid rgba(243,201,105,.5); pointer-events: none; }
.cart::before { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.cart::after { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 1.6rem 1.1rem; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--head); }
.cart__close { background: none; border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; cursor: pointer; transition: color .2s, border-color .2s; }
.cart__close:hover { color: var(--ice); border-color: var(--line-hi); }
.cart__deliver { padding: 1.1rem 1.6rem; border-bottom: 1px solid var(--line); }
.cart__label { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: .55rem; }
.cart__items { flex: 1; overflow-y: auto; padding: 0 1.6rem; }
.citem { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); animation: hsIn .35s ease both; }
.citem__name { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--head); }
.citem__unit { font-size: .76rem; color: var(--muted); margin-top: .1rem; }
.citem__line { grid-column: 2; text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
.citem__qty { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; border: 1px solid var(--line); }
.citem__qty button { width: 30px; height: 30px; background: none; border: 0; color: var(--ice); cursor: pointer; font-size: 1.05rem; line-height: 1; transition: background .2s; }
.citem__qty button:hover { background: rgba(143,198,255,.12); }
.citem__qty span { min-width: 32px; text-align: center; font-family: var(--mono); font-size: .8rem; }
.citem__rm { grid-column: 2; justify-self: end; background: none; border: 0; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; transition: color .2s; }
.citem__rm:hover { color: var(--ember-bright); }
.cart__empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 3rem 2rem; }
.cart__foot { padding: 1.3rem 1.6rem 1.6rem; border-top: 1px solid var(--line-hi); }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.1rem; }
.cart__total span { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cart__total b { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--gold); }
.cart__foot .btn { width: 100%; justify-content: center; }
.cart__foot .btn[disabled] { opacity: .4; pointer-events: none; }
.cart__secure { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-top: .9rem; font-size: .74rem; color: var(--muted); }
.cart__secure svg { width: 14px; height: 14px; fill: var(--frost-bright); }
.cart__clear { display: block; margin: 0 0 1rem auto; background: none; border: 0; color: var(--muted); font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color .2s; }
.cart__clear:hover { color: var(--ember-bright); }
.cart__clear[hidden] { display: none; }

/* checkout success state */
.cart__success { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: .35rem; padding: 2.5rem 2rem; }
.cart__check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem; border: 1px solid #5fe6a0; background: radial-gradient(circle at 50% 32%, rgba(95,230,160,.28), rgba(9,14,26,.6)); box-shadow: 0 0 30px -4px rgba(95,230,160,.6); animation: cart-pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.cart__check svg { width: 38px; height: 38px; fill: none; stroke: #7be0a8; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; stroke-dashoffset: 32; animation: cart-draw .45s .28s ease forwards; }
@keyframes cart-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cart-draw { to { stroke-dashoffset: 0; } }
.cart__success h3 { font-family: var(--display); font-weight: 600; font-size: 1.9rem; color: var(--head); }
.cart__success p { font-size: .95rem; color: var(--muted); max-width: 28ch; }
.cart__success p b { color: var(--gold-bright); }
.cart__success small { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: #7be0a8; margin-top: .6rem; }

/* currency selector (toolbar) */
.toolbar__right { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.curr { position: relative; display: inline-flex; }
.curr select { appearance: none; -webkit-appearance: none; font-family: var(--body); font-weight: 600; font-size: .82rem; color: var(--ice); background: rgba(143,198,255,.05); border: 1px solid var(--line-hi); padding: .72em 2.4em .72em 1em; cursor: pointer; }
.curr select:hover { border-color: var(--frost-bright); }
.curr::after { content: ""; position: absolute; right: 1em; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.curr select option { background: #0b1322; color: var(--ice); }

/* cart: sum lines, promo, agreement, payment badges */
.cart__sumline { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: .55rem; }
.cart__sumline b { color: var(--text); font-weight: 600; }
.cart__sumline--disc, .cart__sumline--disc b { color: #7be0a8; }
.cart__promo { display: flex; gap: .5rem; margin-bottom: .7rem; }
.cart__promo .field { flex: 1; }
.cart__apply { border: 1px solid var(--line-hi); background: rgba(143,198,255,.05); color: var(--ice); font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; padding: 0 1.1em; cursor: pointer; transition: border-color .2s, background .2s; }
.cart__apply:hover { border-color: var(--frost-bright); background: rgba(143,198,255,.12); }
.cart__promo-msg { font-size: .74rem; margin: -.2rem 0 .7rem; }
.cart__promo-msg:empty { display: none; }
.cart__promo-msg.ok { color: #7be0a8; }
.cart__promo-msg.err { color: var(--ember-bright); }
.cart__agree { display: flex; align-items: flex-start; gap: .6rem; margin: .5rem 0 1rem; font-size: .8rem; line-height: 1.4; color: var(--text); cursor: pointer; }
.cart__agree input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex-shrink: 0; margin-top: .12rem; border: 1px solid var(--line-hi); background: rgba(143,198,255,.05); cursor: pointer; position: relative; transition: background .2s, border-color .2s; }
.cart__agree input:checked { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-color: var(--gold-bright); }
.cart__agree input:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #1d1404; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cart__agree a { color: var(--frost-bright); }
.cart__agree.shake { animation: cart-shake .4s; }
@keyframes cart-shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }
.cart__pay { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .9rem; }
.cart__pay span { font-family: var(--mono); font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: .4em .55em; }

/* =====================================================================
   VOTE
   ===================================================================== */
.vote__banner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2rem; justify-content: space-between; padding: 1.8rem; border: 1px solid var(--line-hi); background: radial-gradient(80% 160% at 0% 0%, rgba(74,157,255,.12), transparent 60%), linear-gradient(180deg, rgba(16,28,48,.5), rgba(9,14,26,.55)); margin-bottom: 2rem; }
.vote__banner h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; color: var(--head); }
.vote__banner p { font-size: .92rem; color: var(--muted); margin-top: .2rem; }
.vote__streak { display: flex; align-items: center; gap: 1rem; }
.vote__streaknum { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--gold); text-shadow: 0 0 24px rgba(243,201,105,.4); }
.vote__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.vsite { display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16,28,48,.45), rgba(9,14,26,.5)); transition: border-color .3s, transform .3s; }
.vsite:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.vsite__no { font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.9rem; line-height: 1; color: var(--frost-bright); flex-shrink: 0; width: 2ch; text-align: center; }
.vsite__body { flex: 1; min-width: 0; }
.vsite__body h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--head); }
.vsite__body p { font-size: .82rem; color: var(--gold-bright); font-family: var(--mono); letter-spacing: .03em; margin-top: .15rem; }
.vsite .btn { flex-shrink: 0; }

/* vote - status ledger */
.vstatus { position: relative; display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line-hi); margin-bottom: 2.4rem; }
.vstatus::before, .vstatus::after { content: ""; position: absolute; width: 16px; height: 16px; border: 0 solid rgba(243,201,105,.55); pointer-events: none; z-index: 2; }
.vstatus::before { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.vstatus::after { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }
.vcell { position: relative; background: linear-gradient(180deg, rgba(16,28,48,.62), rgba(9,14,26,.66)); padding: 1.5rem 1.6rem; display: flex; flex-direction: column; justify-content: center; gap: .55rem; min-width: 0; }
.vcell--id { background: radial-gradient(90% 160% at 0% 0%, rgba(74,157,255,.13), transparent 62%), linear-gradient(180deg, rgba(16,28,48,.62), rgba(9,14,26,.66)); }
.vcell__label { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.vcell__val { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--head); display: flex; align-items: baseline; gap: .4rem; }
.vcell__val small { font-family: var(--body); font-weight: 500; font-size: .82rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.vcell--points .vcell__val { color: var(--gold); text-shadow: 0 0 22px rgba(243,201,105,.32); }
.vcell--streak .vcell__val { color: var(--frost-bright); }
.vcell__bar { height: 5px; background: rgba(143,198,255,.1); margin-top: .15rem; overflow: hidden; }
.vcell__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--frost), var(--frost-bright)); box-shadow: 0 0 12px rgba(74,157,255,.5); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.vcell__hint { font-family: var(--body); font-size: .76rem; color: var(--muted); }
.vcell .field { margin: 0; }
.vcell__greet { font-family: var(--display); font-weight: 600; font-size: 1.45rem; color: var(--head); line-height: 1.1; }
.vcell__greet em { font-style: italic; color: var(--gold-bright); }

/* vote - site cooldown states */
.vsite--done { border-color: rgba(95,210,150,.28); background: linear-gradient(180deg, rgba(18,34,28,.42), rgba(9,16,14,.5)); }
.vsite--done:hover { transform: none; border-color: rgba(95,210,150,.4); }
.vsite--done .vsite__no { color: #7fe0a6; font-style: normal; }
.vsite__body p.is-done { color: #7fe0a6; }
.vsite__cd { flex-shrink: 0; display: inline-flex; align-items: center; gap: .5em; font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink); white-space: nowrap; border: 1px solid rgba(95,210,150,.3); padding: .82em 1em; background: rgba(95,210,150,.06); }
.vsite__cd svg { width: 13px; height: 13px; fill: #7fe0a6; flex-shrink: 0; }
.vsite__cd b { color: #cfeede; font-weight: 600; }
.btn.is-flash { animation: voteflash .5s ease; }
@keyframes voteflash { 0% { box-shadow: 0 0 0 0 rgba(74,157,255,.5); } 100% { box-shadow: 0 0 0 16px rgba(74,157,255,0); } }

/* vote - reward tiers */
.vsec { margin-top: clamp(3rem, 6vw, 4.6rem); }
.vsec__head { margin-bottom: 1.6rem; }
.vsec__head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--head); line-height: 1.05; }
.vsec__head h2 em { font-style: italic; color: var(--gold-bright); }
.vsec__head p { font-size: .94rem; color: var(--muted); margin-top: .35rem; max-width: 52ch; }
.rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.reward { position: relative; display: flex; flex-direction: column; padding: 1.6rem 1.5rem 1.4rem; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16,28,48,.46), rgba(9,14,26,.52)); transition: border-color .3s, transform .3s; }
.reward::before, .reward::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid rgba(243,201,105,.45); opacity: 0; transition: opacity .3s; }
.reward::before { top: 7px; left: 7px; border-top-width: 1px; border-left-width: 1px; }
.reward::after { bottom: 7px; right: 7px; border-bottom-width: 1px; border-right-width: 1px; }
.reward--ok { border-color: rgba(243,201,105,.4); transform: translateY(-3px); }
.reward--ok::before, .reward--ok::after { opacity: 1; }
.reward__cost { font-family: var(--display); font-weight: 700; font-size: 1.95rem; line-height: 1; color: var(--gold); }
.reward__cost small { font-family: var(--mono); font-weight: 500; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-top: .35rem; }
.reward h4 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--head); margin: .85rem 0 1.2rem; }
.reward .btn { margin-top: auto; width: 100%; justify-content: center; }
.reward__need { margin-top: auto; font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; color: var(--muted); text-align: center; padding: .85em; border: 1px dashed var(--line); }
.reward__need b { color: var(--gold-bright); }

/* store - rank ladder note (ranks are reached by cumulative donation, not bought directly) */
.product__earn { margin-top: auto; font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); padding: .85em; text-align: center; }
.product__pts { font-family: var(--display); font-weight: 700; font-style: italic; color: var(--gold-bright); }

/* store - donation detail modal (reuses .pmodal / .pcard / .pcard__scroll / .pcard__head / .pstats / .psection / .pbosses) */
.product { cursor: pointer; }
.product__view { display: block; text-align: right; font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: .1rem 0 .9rem; transition: color .25s; }
.product:hover .product__view { color: var(--gold-bright); }
.pcrest svg { width: 38px; height: 38px; fill: var(--gold-bright); }
.psection .btn--lg { width: 100%; justify-content: center; }
.psection .btn .ico { width: 1.05em; height: 1.05em; fill: currentColor; flex-shrink: 0; }
.dchips { display: flex; flex-wrap: wrap; gap: .55rem; }
.dchip { font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line-hi); padding: .55em .85em; background: rgba(16,28,48,.4); }
.dnote { margin-top: 1.1rem; font-size: .82rem; color: var(--muted); }
.dnote strong { color: var(--gold-bright); }

/* donation modal - illuminated treasure treatment */
.pcard--store { background:
  radial-gradient(85% 55% at 50% -12%, rgba(243,201,105,.16), transparent 60%),
  radial-gradient(120% 80% at 0% 0%, rgba(74,157,255,.07), transparent 55%),
  linear-gradient(180deg, rgba(13,22,40,.97), rgba(7,11,21,.98)); }

/* gold emblem (coin for bonds, crown for ranks) */
.dcoin { flex-shrink: 0; position: relative; width: 90px; height: 90px; display: grid; place-items: center; border: 1px solid rgba(243,201,105,.6); background: radial-gradient(72% 72% at 50% 30%, rgba(243,201,105,.32), rgba(243,201,105,.05) 72%), linear-gradient(160deg, rgba(46,36,15,.85), rgba(18,14,7,.92)); box-shadow: inset 0 0 32px rgba(243,201,105,.22), 0 0 46px rgba(243,201,105,.12); }
.dcoin::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(243,201,105,.22); }
.dcoin svg { width: 46px; height: 46px; fill: var(--gold-bright); filter: drop-shadow(0 0 10px rgba(243,201,105,.5)); }
.dcoin model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }

/* header badge (Best value / Most popular) */
.dbadge { font-family: var(--mono); font-size: .58rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: .42em .75em; color: #1a1306; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); box-shadow: 0 0 16px rgba(243,201,105,.35); }

/* value meter on points-per-$1 */
.dmeter { height: 4px; margin-top: .55rem; background: rgba(143,198,255,.1); }
.dmeter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); box-shadow: 0 0 10px rgba(243,201,105,.5); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.pstat--gold b { color: var(--gold-bright); }

/* spend-on chips get a gold marker */
.dchip { display: inline-flex; align-items: center; }
.dchip::before { content: "◆"; color: var(--gold); font-size: .72em; margin-right: .55em; opacity: .8; }

/* refined gold CTA - price tag + light sweep */
.dbuy { position: relative; overflow: hidden; justify-content: space-between; padding-left: 1.3em; padding-right: 1.3em; background: linear-gradient(180deg, #f6d889, #e6bd62 52%, #cd9c34); border-color: rgba(243,201,105,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 34px -16px rgba(243,201,105,.7); }
.dbuy::after { content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 32%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-18deg); transition: left .65s ease; pointer-events: none; }
.dbuy:hover::after { left: 135%; }
.dbuy:hover { transform: translateY(-2px); }
.dbuy__main { display: inline-flex; align-items: center; gap: .6em; }
.dbuy__price { font-family: var(--display); font-weight: 700; font-size: 1.1em; padding: .08em .6em; border: 1px solid rgba(26,19,6,.28); background: rgba(26,19,6,.14); }

/* vote - monthly top voters (reuses .ledger / .lrow grid spirit) */
.vtop { border: 1px solid var(--line); }
.vtop__row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: .95rem 1.4rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(16,28,48,.32), rgba(9,14,26,.36)); transition: background .25s; }
.vtop__row:last-child { border-bottom: 0; }
.vtop__row:hover { background: linear-gradient(180deg, rgba(74,157,255,.06), rgba(9,14,26,.36)); }
.vtop__row--you { background: linear-gradient(90deg, rgba(243,201,105,.1), rgba(9,14,26,.36)); border-left: 2px solid var(--gold); }
.vtop__rank { font-family: var(--display); font-weight: 700; font-style: italic; font-size: 1.6rem; line-height: 1; color: var(--muted); text-align: center; }
.vtop__row:nth-child(1) .vtop__rank { color: #f3c969; font-style: normal; }
.vtop__row:nth-child(2) .vtop__rank { color: #cdd6e4; font-style: normal; }
.vtop__row:nth-child(3) .vtop__rank { color: #d8a06a; font-style: normal; }
.vtop__name { font-family: var(--display); font-weight: 600; font-size: 1.18rem; color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtop__name span { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-hi); padding: .25em .55em; margin-left: .7rem; vertical-align: middle; }
.vtop__votes { font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; color: var(--gold-bright); white-space: nowrap; }
.vtop__votes b { font-family: var(--display); font-size: 1.15rem; color: var(--head); margin-right: .35em; }

/* =====================================================================
   PLAY / DOWNLOAD
   ===================================================================== */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.dlcard { display: flex; flex-direction: column; align-items: flex-start; padding: 1.8rem 1.6rem; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16,28,48,.5), rgba(9,14,26,.55)); transition: transform .35s, border-color .35s, box-shadow .35s; }
.dlcard:hover { transform: translateY(-6px); border-color: var(--line-hi); box-shadow: 0 34px 64px -36px rgba(74,157,255,.45); }
.dlcard--primary { border-color: rgba(243,201,105,.5); box-shadow: inset 0 1px 0 rgba(243,201,105,.35); }
.dlcard__ico { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 1.1rem; border: 1px solid var(--line-hi); background: linear-gradient(180deg, rgba(74,157,255,.2), rgba(74,157,255,.04)); }
.dlcard__ico svg { width: 26px; height: 26px; fill: var(--frost-bright); }
.dlcard--primary .dlcard__ico { border-color: rgba(243,201,105,.45); background: linear-gradient(180deg, rgba(243,201,105,.22), rgba(243,201,105,.04)); }
.dlcard--primary .dlcard__ico svg { fill: var(--gold-bright); }
.dlcard h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--head); }
.dlcard__note { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .3rem 0 1.3rem; }
.dlcard .btn { margin-top: auto; align-self: stretch; justify-content: center; }
.dlcard--soon { opacity: .62; }
.dlcard--soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.dlcard--soon .dlcard__ico svg { fill: var(--muted); }
.dlcard .btn[aria-disabled="true"] { cursor: default; pointer-events: none; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.spec { border: 1px solid var(--line); padding: 1.3rem 1.5rem; background: linear-gradient(180deg, rgba(16,28,48,.35), rgba(9,14,26,.4)); }
.spec h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .55rem; }
.spec p { font-size: .94rem; color: var(--text); }
.spec p span { color: var(--muted); }

/* sub-page responsive */
@media (max-width: 640px) {
  .ledger__head, .lrow { grid-template-columns: 44px minmax(0,1fr) auto; gap: .8rem; }
  .ledger__head span:nth-child(2), .lrow .lav { display: none; }
  .lrank { font-size: 1.4rem; }
  .lname { font-size: 1.1rem; overflow: hidden; }
  .lrow .hs__tagmode { display: none; }
  .lscore { font-size: 1.05rem; white-space: nowrap; }
  .lscore small { font-size: .68rem; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar__right { justify-content: space-between; }
  .field input { min-width: 0; width: 100%; }
  .vstatus { grid-template-columns: 1fr 1fr; }
  .vstatus .vcell--id { grid-column: 1 / -1; }
  .vtop__row { grid-template-columns: 44px minmax(0,1fr) auto; gap: .8rem; padding: .85rem 1.1rem; }
  .vtop__rank { font-size: 1.35rem; }
}

/* =====================================================================
   PLAYER CODEX - hiscores detail modal
   ===================================================================== */
.ledger .lrow { cursor: pointer; }
.ledger .lrow:hover .lname { color: var(--gold-bright); }

.pmodal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: hidden; background: rgba(4,6,13,.8); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); opacity: 0; visibility: hidden; transition: opacity .3s ease; }
.pmodal.is-open { opacity: 1; visibility: visible; }
.pcard { position: relative; display: flex; flex-direction: column; width: min(840px, 100%); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow: hidden; border: 1px solid var(--line-hi); background: radial-gradient(120% 80% at 0% 0%, rgba(74,157,255,.1), transparent 55%), linear-gradient(180deg, rgba(13,22,40,.97), rgba(7,11,21,.98)); box-shadow: 0 40px 130px rgba(0,0,0,.62); transform: translateY(18px) scale(.985); transition: transform .38s cubic-bezier(.2,.85,.25,1); }
.pcard__scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(243,201,105,.45) rgba(143,198,255,.05); }
.pcard__scroll::-webkit-scrollbar { width: 11px; }
.pcard__scroll::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.pcard__scroll::-webkit-scrollbar-track { background: rgba(143,198,255,.04); border-left: 1px solid var(--line); }
.pcard__scroll::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(243,201,105,.55), rgba(243,201,105,.28)); background-clip: padding-box; border: 3px solid transparent; border-left-width: 4px; }
.pcard__scroll::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(243,201,105,.8), rgba(243,201,105,.45)); background-clip: padding-box; border: 3px solid transparent; border-left-width: 4px; }
.pmodal.is-open .pcard { transform: none; }
.pcard::before, .pcard::after { content: ""; position: absolute; width: 20px; height: 20px; border: 0 solid rgba(243,201,105,.6); pointer-events: none; z-index: 3; }
.pcard::before { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.pcard::after { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.pcard__close { position: absolute; top: 1.1rem; right: 1.1rem; z-index: 4; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(9,14,26,.6); color: var(--muted); font-size: 1rem; cursor: pointer; transition: border-color .25s, color .25s, transform .25s; }
.pcard__close:hover { border-color: var(--gold); color: var(--gold-bright); transform: rotate(90deg); }

.pcard__head { flex-shrink: 0; display: flex; align-items: center; gap: 1.4rem; padding: clamp(1.6rem, 4vw, 2.4rem); padding-right: 4rem; border-bottom: 1px solid var(--line); }
.pcrest { flex-shrink: 0; width: 76px; height: 76px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-style: italic; font-size: 2.6rem; color: var(--gold-bright); border: 1px solid rgba(243,201,105,.4); background: radial-gradient(70% 70% at 50% 30%, rgba(243,201,105,.16), transparent 70%), linear-gradient(180deg, rgba(16,28,48,.6), rgba(9,14,26,.7)); box-shadow: inset 0 0 24px rgba(243,201,105,.12); }
.pcard__id { flex: 1; min-width: 0; }
.pcard__id h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.04; color: var(--head); overflow: hidden; text-overflow: ellipsis; }
.pcard__tags { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.pmode { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; padding: .35em .7em; border: 1px solid var(--line-hi); color: var(--frost-bright); }
.pmode[data-m="HCIM"] { color: #ff8a6e; border-color: rgba(255,138,110,.4); }
.pmode[data-m="HCGIM"] { color: #ff8a6e; border-color: rgba(255,138,110,.4); }
.pmode[data-m="Ironman"] { color: #cdd6e4; }
.pmode[data-m="UIM"] { color: #8fb2d6; border-color: rgba(143,178,214,.4); }
.pmode[data-m="GIM"] { color: #7fe0a6; border-color: rgba(127,224,166,.4); }
.pmode[data-m="Main"] { color: var(--gold-bright); border-color: rgba(243,201,105,.4); }

/* combat-level medallion - the focal point */
.pcombat { flex-shrink: 0; position: relative; width: 98px; height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; border: 1px solid rgba(243,201,105,.5); background: radial-gradient(72% 72% at 50% 32%, rgba(243,201,105,.18), transparent 72%), linear-gradient(180deg, rgba(16,28,48,.62), rgba(9,14,26,.72)); box-shadow: inset 0 0 28px rgba(243,201,105,.14), 0 0 34px rgba(243,201,105,.09); }
.pcombat::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(243,201,105,.2); pointer-events: none; }
.pcombat b { font-family: var(--display); font-weight: 700; font-size: 2.55rem; line-height: 1; color: var(--gold-bright); text-shadow: 0 0 20px rgba(243,201,105,.42); }
.pcombat span { font-family: var(--mono); font-size: .53rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.pstat { background: linear-gradient(180deg, rgba(16,28,48,.4), rgba(9,14,26,.45)); padding: 1.15rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.pstat span { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pstat b { font-family: var(--display); font-weight: 700; font-size: 1.65rem; line-height: 1; color: var(--head); }
.pstat--rank b { color: var(--gold); }

.psection { padding: clamp(1.5rem, 3.5vw, 2.2rem) clamp(1.6rem, 4vw, 2.4rem); }
.psection + .psection { border-top: 1px solid var(--line); }
.psection h3 { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; display: flex; align-items: center; gap: .8rem; }
.psection h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(243,201,105,.35), transparent); }
.pskills { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pskill { position: relative; background: linear-gradient(180deg, rgba(16,28,48,.38), rgba(9,14,26,.42)); padding: .62rem .7rem .78rem; display: flex; flex-direction: column; align-items: flex-start; gap: .34rem; }
.pskill > span:first-child { font-family: var(--mono); font-size: .56rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pskill b { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--head); }
.pskill__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(143,198,255,.08); }
.pskill__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--frost), var(--frost-bright)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.pskill--max { background: linear-gradient(180deg, rgba(243,201,105,.12), rgba(9,14,26,.42)); }
.pskill--max b { color: var(--gold-bright); text-shadow: 0 0 14px rgba(243,201,105,.35); }
.pskill--max .pskill__bar i { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); box-shadow: 0 0 8px rgba(243,201,105,.5); }
.pskill--total { background: linear-gradient(180deg, rgba(243,201,105,.16), rgba(9,14,26,.42)); }
.pskill--total span { color: var(--gold); }
.pskill--total b { color: var(--gold-bright); }
.pbosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pboss { background: linear-gradient(180deg, rgba(16,28,48,.38), rgba(9,14,26,.42)); padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.pboss span { font-family: var(--body); font-size: .9rem; color: var(--ink); }
.pboss b { font-family: var(--mono); font-size: .85rem; color: var(--gold-bright); flex-shrink: 0; }
.pboss--top { background: linear-gradient(180deg, rgba(243,201,105,.1), rgba(9,14,26,.42)); }
.pboss--top span { color: var(--head); }
.pboss--top b::after { content: " ★"; color: var(--gold); }

/* staggered entrance - illuminates the page section by section on open */
@keyframes codexrise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes codexseal { 0% { opacity: 0; transform: scale(.78); } 62% { transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pmodal.is-open .pcrest { animation: codexrise .55s both; }
  .pmodal.is-open .pcombat { animation: codexseal .6s both .08s; }
  .pmodal.is-open .pstat,
  .pmodal.is-open .pskill,
  .pmodal.is-open .pboss { animation: codexrise .5s both; animation-delay: calc(var(--i, 0) * 20ms); }
}

@media (max-width: 640px) {
  .pcard__head { flex-direction: column; text-align: center; padding-right: clamp(1.6rem, 4vw, 2.4rem); gap: 1rem; }
  .pcard__tags { justify-content: center; }
  .pstats { grid-template-columns: 1fr; }
  .pstat { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .pstat b { font-size: 1.4rem; }
}

/* =====================================================================
   BETA LAUNCH - countdown landing (beta.html)
   ===================================================================== */
.launch__top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem clamp(1rem, 4vw, 3rem); }
.hero--launch { justify-content: center; text-align: center; }
/* warm ember glow rising from below to balance the frost vista (fire meets frost) */
.hero--launch::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 78%, rgba(243,160,70,.16), transparent 70%); }
.launch__inner { position: relative; z-index: 3; max-width: 920px; margin: 0 auto; text-align: center; }
.launch__logo { width: clamp(210px, 40vw, 400px); height: auto; margin: 0 auto 1.3rem; display: block; filter: drop-shadow(0 8px 34px rgba(0,0,0,.6)); }
.launch__inner .eyebrow { justify-content: center; margin: 0 auto; }
.launch__inner h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 5.5vw, 3.1rem); line-height: 1.05; color: var(--head); margin: 1rem 0 0; }
.launch__inner h1 em { font-style: italic; color: var(--gold-bright); }
.launch__lead { margin: 1.3rem auto 0; max-width: 50ch; text-align: center; }
.launch__lead .fire { color: var(--gold-bright); font-style: italic; }
.launch__lead .frost { color: var(--frost-bright); font-style: italic; }
.launch__date { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--frost-bright); margin-top: 1.3rem; }

/* ---- the countdown seal: one bracketed panel with ticking digits ---- */
.cd { position: relative; display: inline-flex; flex-wrap: wrap; justify-content: center; margin: 1.9rem auto 0;
  border: 1px solid var(--line-hi); background: linear-gradient(180deg, rgba(16,28,48,.7), rgba(9,14,26,.76));
  box-shadow: 0 0 90px -14px rgba(243,201,105,.2), 0 34px 90px -44px rgba(0,0,0,.85), inset 0 1px 0 rgba(143,198,255,.08); }
.cd::before, .cd::after { content: ""; position: absolute; width: 20px; height: 20px; border: 0 solid rgba(243,201,105,.65); pointer-events: none; z-index: 2; }
.cd::before { top: 9px; left: 9px; border-top-width: 1px; border-left-width: 1px; }
.cd::after { bottom: 9px; right: 9px; border-bottom-width: 1px; border-right-width: 1px; }
.cd__cell { position: relative; overflow: hidden; padding: clamp(1.1rem, 2.6vw, 1.7rem) clamp(1.1rem, 3.2vw, 2.1rem); border-right: 1px solid var(--line); min-width: clamp(82px, 15vw, 116px); }
.cd__cell:last-child { border-right: 0; }
.cd__cell--sec { background: radial-gradient(120% 100% at 50% 115%, rgba(74,157,255,.16), transparent 72%); }
.cd__num { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7.5vw, 4.6rem); line-height: 1; color: var(--head); font-variant-numeric: tabular-nums; }
.cd__cell--sec .cd__num { color: var(--frost-bright); text-shadow: 0 0 28px rgba(74,157,255,.55); }
.cd__label { font-family: var(--mono); font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: .6rem; }
@keyframes cdtick { 0% { transform: translateY(.34em); opacity: .12; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) { .cd__num.is-tick { animation: cdtick .45s cubic-bezier(.2,.85,.25,1); } }
.launch__livebanner { font-family: var(--display); font-weight: 700; font-style: italic; font-size: clamp(2rem, 6vw, 3.2rem); color: var(--gold-bright); text-shadow: 0 0 34px rgba(243,201,105,.45); padding: clamp(1.1rem,2.6vw,1.7rem) clamp(1.6rem,4vw,2.6rem); white-space: nowrap; }

/* ---- progress: ember -> frost, anticipation building ---- */
.launch__progress { max-width: 440px; margin: 1.5rem auto 0; }
.launch__track { height: 6px; background: rgba(143,198,255,.09); border: 1px solid var(--line); overflow: hidden; }
.launch__track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--gold) 55%, var(--frost-bright)); box-shadow: 0 0 16px rgba(243,201,105,.5); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.launch__pct { display: flex; justify-content: space-between; gap: 1rem; margin-top: .65rem; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.launch__pct b { color: var(--gold-bright); font-weight: 600; }

.notify { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-top: 1.9rem; }
.notify .field { margin: 0; min-width: min(340px, 82vw); }
.notify .btn { height: 48px; }
.notify__msg { margin-top: .9rem; min-height: 1.2em; font-size: .86rem; letter-spacing: .01em; color: var(--gold-bright); }
.launch__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.7rem; }

@media (max-width: 460px) {
  .cd__cell { flex: 1 1 50%; min-width: 0; }
  .cd__cell:nth-child(2) { border-right: 0; }
}

/* 3D model viewer (model-viewer web component) */
.mv-wrap { position: relative; border: 1px solid var(--line-hi); background: radial-gradient(90% 80% at 50% 30%, rgba(74,157,255,.08), transparent 60%), linear-gradient(180deg, rgba(16,28,48,.55), rgba(9,14,26,.6)); }
.mv-wrap::before, .mv-wrap::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid rgba(243,201,105,.55); pointer-events: none; z-index: 2; }
.mv-wrap::before { top: 9px; left: 9px; border-top-width: 1px; border-left-width: 1px; }
.mv-wrap::after { bottom: 9px; right: 9px; border-bottom-width: 1px; border-right-width: 1px; }
.mv-wrap model-viewer { width: 100%; height: clamp(380px, 60vh, 600px); background: transparent; --poster-color: transparent; }
.mv-hint { margin-top: .9rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); }
.mv-grid .mv-wrap { display: flex; flex-direction: column; }
.mv-grid .mv-wrap model-viewer { height: clamp(300px, 40vh, 420px); }
.mv-cap { margin: 0; padding: .55rem 1rem 1.05rem; text-align: center; font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* inline 3D item preview on vote reward cards */
.reward__mv { position: relative; width: 100%; height: 150px; margin: -.2rem 0 1rem; border: 1px solid var(--line);
  background: radial-gradient(78% 72% at 50% 36%, rgba(243,201,105,.12), transparent 64%); overflow: hidden; }
.reward__mv model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.reward__mv--none { display: grid; place-items: center; }
.reward__mv--none svg { width: 44px; height: 44px; fill: var(--muted); opacity: .55; }
.reward--ok .reward__mv { border-color: rgba(243,201,105,.4); }
.reward__sub { font-size: .82rem; color: var(--muted); margin: -.55rem 0 1.15rem; }

/* 3D cosmetic preview inside the bond detail modal */
.dunlock { display: flex; gap: 1rem; align-items: center; }
.dunlock__mv { flex: 0 0 132px; height: 132px; border: 1px solid var(--line);
  background: radial-gradient(78% 72% at 50% 38%, rgba(243,201,105,.14), transparent 64%); overflow: hidden; }
.dunlock__mv model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.dunlock .dchips { flex: 1 1 auto; margin: 0; }
@media (max-width: 520px) { .dunlock { flex-direction: column; align-items: stretch; } .dunlock__mv { width: 100%; flex-basis: 150px; } }
