/* Letter Legends: one page, laid out after lesa.app, in our sky blue.
   Ringold Soft for display (the GlitchYard house face, same as glitchyard.co), Nunito for everything else.
   Images are PLACEHOLDER boxes (.ph) for now: each says what art goes there. */
@font-face { font-family: 'Ringold'; src: url('assets/fonts/Ringold-Soft.woff') format('woff'); font-weight: 400; font-display: swap; }
:root {
  --sky: #1792FC; --sky-2: #2EA4FD; --sky-deep: #0C6FD8; --sky-ink: #0A4C9A;
  --sun: #FFC63B; --sun-deep: #F59E0B; --ink: #14123A; --paper: #fff; --mist: #F2F7FF;
  --green: #22B357; --blue: #1792FC; --pink: #E8458F; --gold: #F5A30B; --violet: #6B35D9;
  /* the logo's own colours: gold letters, blue LEGENDS, cream banner, deep-blue outline */
  --logo-gold: #F7DB6C; --logo-gold-2: #F2C85F; --logo-gold-3: #E9A93A; --logo-blue: #406CC9; --logo-blue-2: #4677DE; --logo-cream: #FBF0D0; --logo-deep: #27488D;
  --head: 'Ringold', 'Anton', Impact, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tick: 0px; /* the top ticker strip was removed; offsets that used it collapse to 0 */ --rail: 52px; --gut: clamp(16px, 3.4vw, 44px); --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; /* hiding the scrollbar during the intro never shifts the layout */ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--tick) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Lenis (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; padding: var(--tick) 0 0 var(--rail); background: var(--sky); color: var(--paper); font: 700 18px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ol { margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--paper); color: var(--ink); font-weight: 900; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* ── placeholders ── */
.ph { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 28px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 16px, rgba(255,255,255,.06) 16px 32px), var(--ph-bg, rgba(255,255,255,.14));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.ph[data-label]:not([data-label=""])::after { content: attr(data-label); max-width: 86%; padding: 8px 14px; border-radius: 999px; background: rgba(10,20,60,.28); color: #fff;
  font: 900 12px/1.25 var(--body); text-transform: uppercase; letter-spacing: .08em; text-align: center; }

/* ── buttons ── */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 900 16px/1 var(--body); transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s; }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(2px); }

/* ── rail + menu ── */
.rail { position: fixed; z-index: 30; top: var(--tick); bottom: 0; left: 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14px 0 18px; background: var(--sky-deep); box-shadow: 1px 0 0 rgba(255,255,255,.12); }
.rail__menu { display: grid; gap: 5px; width: 36px; height: 36px; place-content: center; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); cursor: pointer; }
.rail__menu i { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .25s; }
.rail__menu[aria-expanded="true"] i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.rail__menu[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.rail__menu[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.rail__social { display: flex; flex-direction: column; gap: 6px; }
.rail__social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; opacity: .9; transition: background-color .15s, opacity .15s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.rail__social a:hover { opacity: 1; background: rgba(255,255,255,.16); transform: scale(1.08); }
.rail__social svg { width: 22px; height: 22px; }
.menu { position: fixed; z-index: 29; top: var(--tick); left: var(--rail); bottom: 0; width: min(340px, calc(100vw - var(--rail))); display: flex; flex-direction: column; gap: 4px; padding: 28px 22px;
  background: var(--sky-deep); box-shadow: 30px 0 60px rgba(5,30,80,.35); }
.menu[hidden] { display: none; }
.menu a { padding: 12px 14px; border-radius: 14px; text-decoration: none; font: 400 30px/1.1 var(--head); text-transform: uppercase; }
.menu a:hover { background: rgba(255,255,255,.12); }
@media (prefers-reduced-motion: no-preference) { .menu:not([hidden]) { animation: menu-in .32s cubic-bezier(.2,.9,.25,1); } }
@keyframes menu-in { from { opacity: 0; transform: translateX(-24px); } }

/* ── shared section bits ── */
.sky { position: relative; padding: clamp(70px, 9vw, 130px) var(--gut); }
.h2 { font: 400 clamp(40px, 5.6vw, 76px)/.96 var(--head); text-transform: uppercase; text-align: center; text-shadow: 0 4px 0 rgba(10,60,140,.25); }
.h2 span { color: var(--sun); }
.lede { max-width: 34em; margin: 16px auto 0; text-align: center; font-size: clamp(17px, 1.5vw, 20px); opacity: .92; }

/* ── hero ── */
.hero { position: relative; z-index: 3; min-height: calc(100svh - var(--tick)); padding: 12px 12px 0; display: flex; }
.hero__frame { position: relative; flex: 1; min-width: 0; overflow-x: clip; overflow-y: visible; /* the phones' shadows fall past the frame onto the next section */ border-radius: 34px 34px 0 0; display: flex; flex-direction: column; align-items: center;
  padding: clamp(18px, 3svh, 36px) 16px clamp(40px, 6svh, 70px);
  /* the sky brightens behind the logo and phones, then lands on the next section's colour: no seam */
  background: radial-gradient(60% 34% at 50% 20%, rgba(255,255,255,.3), transparent 70%), linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 22%, #8CCBFF 55%, var(--sky-2) 82%, var(--sky) 100%); }
.hero__logo { width: min(600px, 70vw, 32svh * 2.05); filter: drop-shadow(0 14px 22px rgba(10,50,140,.3)); }
.hero__logo img { width: 100%; }
.hero__tag { margin-top: 4px; font: 400 clamp(20px, 2vw, 30px)/1.1 var(--head); text-transform: uppercase; text-align: center; text-shadow: 0 3px 0 rgba(10,70,170,.3); }
/* the phones rise from the frame's bottom edge (the frame crops them) */
.hero { --pw: clamp(210px, min(36vw, 37.8svh), 462px); } /* 40% up on the earlier size; the hero grows to show them whole */
.duo { position: relative; display: flex; justify-content: center; align-items: flex-start; margin-top: clamp(16px, 3.4svh, 40px); perspective: 1700px; }
.phone { position: relative; width: var(--pw); padding: calc(var(--pw) * .03); border-radius: calc(var(--pw) * .165); background: #0B0B10; transform-style: preserve-3d; }
.phone__screen { position: relative; overflow: hidden; border-radius: calc(var(--pw) * .138); aspect-ratio: 1206 / 2622; background: #6A3CE0; }
.phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone__screen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.04) 34%, transparent 35%); pointer-events: none; }
.phone::after { content: ''; position: absolute; top: 25%; right: calc(var(--pw) * -.016); width: calc(var(--pw) * .016); height: 11%; border-radius: 0 3px 3px 0; background: var(--rim); }
/* iPhone 17: lavender aluminium rim, Dynamic Island, action + volume buttons */
.phone--iphone { --rim: #BBA8E6; z-index: 2; margin-left: calc(var(--pw) * -.04);
  transform: rotateX(6deg) rotateY(-24deg) rotateZ(3deg);
  box-shadow: 0 0 0 calc(var(--pw) * .013) var(--rim), 0 0 0 calc(var(--pw) * .018) #8E78C9, -30px 50px 70px rgba(10,40,110,.45); }
.phone--iphone .phone__screen::before { content: ''; position: absolute; z-index: 1; top: 1.9%; left: 50%; width: 30%; height: 3.4%; translate: -50% 0; border-radius: 999px; background: #000; }
.phone--iphone::before { content: ''; position: absolute; left: calc(var(--pw) * -.016); top: 17%; width: calc(var(--pw) * .016); height: 4%; border-radius: 3px 0 0 3px; background: var(--rim);
  box-shadow: 0 calc(var(--pw) * .16) 0 var(--rim), 0 calc(var(--pw) * .3) 0 var(--rim); }
/* Android: graphite frame, squarer corners, 20:9 screen, punch-hole camera */
.phone--android { --rim: #3A3A46; z-index: 1; margin-top: calc(var(--pw) * .16); border-radius: calc(var(--pw) * .12);
  transform: rotateX(6deg) rotateY(26deg) rotateZ(-4deg) translateZ(-30px);
  box-shadow: 0 0 0 calc(var(--pw) * .012) var(--rim), 30px 50px 70px rgba(10,40,110,.4); }
.phone--android .phone__screen { border-radius: calc(var(--pw) * .095); aspect-ratio: 9 / 20; }
.phone--android .phone__screen::before { content: ''; position: absolute; z-index: 1; top: 1.6%; left: 50%; width: 5.4%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #15151c; }
@media (prefers-reduced-motion: no-preference) {
  /* entrance animations wait until the intro is over (they start the moment .is-intro comes off) */
  :root:not(.is-intro) .hero__logo { animation: logo-in 1s cubic-bezier(.3,1.5,.5,1) .1s both; transform-origin: 50% 80%; }
  :root:not(.is-intro) .hero__tag { animation: rise .8s cubic-bezier(.2,.9,.25,1) .35s both; }
  :root:not(.is-intro) .duo { animation: rise-big 1.1s cubic-bezier(.2,.9,.25,1) .55s both; }
  /* after the intro the flying logo IS the hero logo: no second entrance; the rest follows it in */
  .intro-done .hero__logo { animation: none !important; }
  .intro-done .hero__tag { animation-delay: 0s !important; }
  .intro-done .duo { animation-delay: .12s !important; }
  .intro-done .hero__get { animation-delay: .38s !important; }
  .phone { animation: bob 6.4s ease-in-out infinite alternate; }
  .phone--iphone { animation-duration: 5.6s; animation-delay: -2.8s; }
}
.hero__get { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(34px, 5svh, 56px); }
@media (prefers-reduced-motion: no-preference) { :root:not(.is-intro) .hero__get { animation: rise .9s cubic-bezier(.2,.9,.25,1) .9s both; } }
@keyframes logo-in { from { opacity: 0; transform: scale(.6) translateY(30px); } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes rise-big { from { opacity: 0; translate: 0 160px; } }
@keyframes bob { from { translate: 0 -8px; } to { translate: 0 10px; } }

/* ── mission: pinned text, props rising past it ── */
.mission { height: 260svh; padding: 0; }
.mission__stage { position: sticky; z-index: 2; top: var(--tick); height: calc(100svh - var(--tick)); display: grid; place-items: center; padding: 0 var(--gut); text-align: center; }
.mission__text { max-width: 22em; font: 400 clamp(30px, 3.9vw, 58px)/1.08 var(--head); text-transform: uppercase; text-shadow: 0 4px 0 rgba(10,60,140,.25); }
.mission__text .w { opacity: .3; transition: opacity .25s; }
.mission__text .w.is-lit { opacity: 1; }
.mission__text .w.is-gold.is-lit { color: var(--ink); text-shadow: 0 4px 0 rgba(255,255,255,.25); }
.mission__props { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.prop { position: absolute; left: calc((100% - var(--w)) * var(--x) / 100); width: var(--w); rotate: var(--r, 0deg); filter: drop-shadow(0 14px 16px rgba(5,40,110,.35)); will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .prop { animation: bob 5.6s ease-in-out infinite alternate; }
  .prop:nth-child(2n) { animation-duration: 6.8s; animation-delay: -2s; }
  .prop:nth-child(3n) { animation-duration: 4.9s; animation-delay: -1s; }
}
@media (prefers-reduced-motion: reduce) { .mission { height: auto; } .mission__stage { position: relative; min-height: 100svh; } }

/* ── the sheet ── */
.sheet { position: relative; z-index: 2; margin: 0 12px; padding-bottom: 12svh; border-radius: 44px; background: var(--paper); color: var(--ink); box-shadow: 0 -20px 60px rgba(8,50,120,.2); }
.sheet__in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); padding: 0 var(--gut); }
/* the pinned phone (iPhone 17 frame, same as the hero's): centred in the viewport while the rows scroll */
.stack { --pw: clamp(220px, min(24vw, 34svh), 340px); position: sticky; top: calc(var(--tick) + (100svh - var(--tick) - var(--pw) * 2.2) / 2); align-self: start;
  display: grid; place-items: center; margin: calc((100svh - var(--pw) * 2.2) / 2) 0 0; perspective: 1600px; }
.stack__phone { transform: rotateY(14deg) rotateZ(-2deg); }
.stack__phone .phone__screen { display: grid; }
.stack__shot { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; object-position: top; will-change: opacity, transform; }
.rows { padding: 0 0 10svh; }
.row { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.row h2 { font: 400 clamp(38px, 4.4vw, 64px)/.98 var(--head); text-transform: uppercase; }
.row em { font-style: normal; }
.row p { max-width: 30em; font-size: clamp(17px, 1.4vw, 19px); color: #3A3F5C; }
.row .pill { margin-top: 8px; }
.row__art { display: none; }
.rows .row__art { --pw: min(62vw, 300px); margin: 0 auto 18px; transform: rotateZ(-2deg); }
/* feature row headings are one colour: the ink */

/* ── more to play ── */
.more { background: var(--sky); } /* the same sky the white sheet sits on */

/* ── card packs fan ── */
.packs { background: var(--sky); text-align: center; padding-top: clamp(40px, 6vw, 90px); overflow: hidden; }
.fan3 { --open: 0; --pk: clamp(150px, 17vw, 240px); position: relative; height: calc(var(--pk) * 1.95); margin-top: clamp(40px, 5vw, 70px); }
.pack { position: absolute; left: 50%; bottom: 0; width: var(--pk); margin-left: calc(var(--pk) / -2); transform-origin: 50% 120%;
  /* --open 0..1 comes from the scroll (main.js): closed stack -> spread fan */
  transform: translateX(calc(var(--i) * var(--open) * 92%)) rotate(calc(var(--i) * var(--open) * 14deg)) translateY(calc(var(--i) * var(--i) * var(--open) * 6%)); }
.pack--mid { z-index: 2; }
.pack img { width: 100%; filter: drop-shadow(0 22px 26px rgba(5,30,80,.45)); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.pack:hover img { transform: translateY(-14px) scale(1.04); }
.tag { position: absolute; left: 50%; bottom: -14px; translate: -50% 0; padding: 7px 16px 10px; border-radius: 999px; font: 400 18px/1 var(--head); text-transform: uppercase; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, var(--top) 0, var(--body) 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -4px 0 var(--lip), 0 0 0 3px #fff, 0 3px 0 3px rgba(5,30,80,.3); text-shadow: 0 2px 0 var(--lip); }
.tag--common { --top: #6FD0FF; --body: #2FA8F5; --lip: #1676C9; }
.tag--rare { --top: #FF8CC0; --body: #F04F98; --lip: #B92A6B; }
.tag--epic { --top: #B98CFF; --body: #8A4FF0; --lip: #5B2BB5; }

/* ── footer ── */
.foot { position: relative; overflow: hidden; background: var(--sky); text-align: center; }
.foot__in { padding: clamp(80px, 10vw, 140px) var(--gut) 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.foot__h { font: 400 clamp(40px, 5.4vw, 74px)/.96 var(--head); text-transform: uppercase; text-shadow: 0 4px 0 rgba(10,60,140,.25); }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store { display: block; border-radius: 12px; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.store img { height: 60px; width: auto; filter: drop-shadow(0 10px 18px rgba(5,30,80,.35)); }
.store[href]:hover { transform: translateY(-3px) scale(1.03); }
.stores.is-soon .store:not([href]) { cursor: default; } /* the official badges stay crisp; the line below says "coming soon" */
.soon { font: 900 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: .1em; }
.soon::before { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--sun); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-top: 8px; }
.foot__links a { padding: 6px 10px; border-radius: 8px; text-decoration: none; font-weight: 800; font-size: 14px; opacity: .9; }
.foot__links a:hover { background: rgba(255,255,255,.15); opacity: 1; }
/* the legends stand ON the wordmark: the crew art's flat bottom edge (92.4% down; the rest is the feet's
   overhang, 0.0278 x its width) lands on the letters' tops (0.051em under the word's .8 line box, measured on the rendered L/T stems) */
.foot__art { --fw: calc((100vw - var(--rail)) * .138); --cw: min(74vw, 1000px); position: relative; margin-top: clamp(40px, 5vw, 70px);
  display: flex; flex-direction: column; align-items: center; }
.foot__crew { position: relative; z-index: 2; width: var(--cw); margin-bottom: calc(-1 * (var(--fw) * .051 + var(--cw) * .0278)); filter: drop-shadow(0 10px 14px rgba(10,50,130,.3)); }
.foot__word { position: relative; z-index: 1; width: 100%; margin-bottom: -.12em; font: 400 var(--fw)/.8 var(--head); text-transform: uppercase; color: #fff; white-space: nowrap; text-shadow: 0 .05em 0 rgba(10,70,170,.35); }
.foot__base { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding: 22px calc(var(--gut) + 76px) 22px var(--gut);
  background: #5B2BD6; /* GlitchYard violet */ font-size: 13px; text-align: left; } /* right padding clears the back-to-top button */
.foot__base p { opacity: .8; }
.foot__studio { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.foot__studio:hover { transform: translateY(-2px); }
.foot__studio small { font: 900 12px/1 var(--body); text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.foot__studio img { height: 40px; width: auto; }
.foot__base p:last-child { max-width: 52em; }

/* ── floating back-to-top ── */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 35; width: 58px; height: 58px; border-radius: 50%; --ph-bg: var(--pink); box-shadow: 0 10px 24px rgba(5,30,80,.35), inset 0 0 0 3px #fff;
  transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.fab.is-on { transform: scale(1); }
.fab.is-on:hover { transform: scale(1.08); }

/* ── arrival fade (main.js): from below scrolling down, from above scrolling up ── */
.js [data-fx] { opacity: 0; translate: 0 var(--fx-y, 40px); }
.js [data-fx].is-in { opacity: 1; translate: 0 0; transition: opacity .7s cubic-bezier(.2,.8,.2,1) var(--fx-d, 0s), translate .9s cubic-bezier(.2,.9,.25,1) var(--fx-d, 0s); }

/* ── responsive ── */
@media (max-width: 960px) {
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  body { padding-top: calc(var(--tick) + 56px); }
  .rail { top: var(--tick); bottom: auto; width: 100%; height: 56px; flex-direction: row-reverse; padding: 0 12px;
    transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
  .rail.is-hidden { transform: translateY(calc(-100% - 14px)); }
  .rail.is-over { box-shadow: 0 8px 24px rgba(10,40,110,.28); }
  .rail__social { flex-direction: row; gap: 2px; }
  .rail__social a { width: 36px; height: 36px; }
  .menu { top: calc(var(--tick) + 56px); left: 0; width: 100%; bottom: auto; padding: 14px; }
  .hero { min-height: calc(100svh - var(--tick) - 56px); padding: 8px 8px 0; }
  .hero__frame { padding-bottom: 36px; padding-left: 0; padding-right: 0; }
  .hero__tag { padding: 0 16px; }
  .hero__frame { border-radius: 26px 26px 0 0; }
  .hero { --pw: 43vw; } /* the widest both tilted phones fit side by side, uncropped, inside the frame */
  .sheet { margin: 0 8px; border-radius: 30px; }
  .sheet__in { grid-template-columns: 1fr; }
  .stack { display: none; }
  .rows { padding: 30px 0 40px; }
  .row { min-height: 0; padding: 30px 0; }
  .row__art { display: block; }
  .row { align-items: center; text-align: center; }
  .foot__base { flex-direction: column; }
  .store img { height: 46px; } /* both badges side by side on a phone */
  .fan3 { --pk: 24vw; } /* all three packs fit across a phone, fully open */
  .tag { font-size: 13px; padding: 5px 11px 8px; bottom: -10px; }
}

/* ── THE HOUSE BEVEL ───────────────────────────────────────────────────────────────────────────────
   Sampled from the game's CURRENT art (settings-support capsule = the house button, sv2-share-pill,
   sv2-edit-pill, co-card, td-pill-cream, the green offer buttons): an almost-flat body, a bright line
   inside the top edge, a chunky darker LIP across the bottom, a thin dark edge under the lip, a soft
   drop. Buttons wear the game's thick white ring. Every piece is painted from five vars:
   --top/--body (face), --lip, --edge, --ring. */
.pill, .rail__menu, .fab {
  background: linear-gradient(180deg, var(--top) 0%, var(--top) var(--split, 0%), var(--body) var(--split2, 100%));
  box-shadow:
    inset 0 2px 0 var(--shine, rgba(255,255,255,.6)),
    inset 0 calc(-1 * var(--lipH, 7px)) 0 var(--lip),
    inset 0 calc(-1 * var(--lipH, 7px) - 3px) 6px -2px rgba(255,255,255,.18),
    var(--ring, 0 0 0 0 transparent),
    0 var(--edgeH, 3px) 0 var(--ringW, 0px) var(--edge),
    0 14px 24px -8px rgba(5,30,80,.42);
}
/* buttons: the game's capsules, white ring */
.pill { --ring: 0 0 0 4px #fff; --ringW: 4px; --edgeH: 4px; --lipH: 6px; padding: 12px 28px 17px; color: #fff; font-size: 18px;
  -webkit-text-stroke: 4px var(--ink-shade); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink-shade); } /* the game's outlined button label */
.pill--dark  { --top: #9CF463; --body: #6AC237; --lip: #3F8E1D; --edge: rgba(20,60,8,.55); --ink-shade: #2F7A0B; }           /* green: the get / buy button */
.pill--light { --top: #FCD766; --split: 46%; --split2: 54%; --body: #F5B73D; --lip: #C8782A; --edge: rgba(90,40,8,.5); --ink-shade: #A35A17; } /* orange: THE house button */
.rail__menu  { --top: #53BFF9; --body: #2183DE; --lip: #1553C5; --edge: #073385; --lipH: 4px; border-radius: 12px; }
.fab         { --top: #FCD766; --split: 46%; --split2: 54%; --body: #F5B73D; --lip: #C8782A; --edge: rgba(90,40,8,.5); --ring: 0 0 0 4px #fff; --ringW: 4px; }
/* panels: the gold house body (= the logo's gold) and the white/blue store card */

/* ── INTRO ─────────────────────────────────────────────────────────────────────────────────────────
   Only exists while html.is-intro (set in <head> before first paint). intro.js drives every motion
   with the Web Animations API from a small physics sim; nothing here animates on its own. */
.intro { display: none; }
.is-intro { overflow: hidden; }
.is-intro .intro, .intro-done .intro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; overflow: hidden; cursor: pointer; }
.intro__bg { position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 46%, rgba(255,255,255,.32), transparent 70%), linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 55%, #8CCBFF 100%); }
.is-intro .hero__logo, .is-intro .hero__tag, .is-intro .duo, .is-intro .hero__get { opacity: 0; }
.intro-flying .hero__logo { opacity: 0; } /* the flying logo stands in for it until the hand-off */
.intro__shake { position: relative; display: grid; place-items: center; width: min(600px, 70vw, 32svh * 2.05); }
.intro__logo { position: relative; z-index: 3; width: 100%; opacity: 0; transform-origin: 50% 88%; filter: drop-shadow(0 14px 22px rgba(10,50,140,.3)); will-change: transform, opacity; }
.intro__shadow { position: absolute; z-index: 1; left: 12%; right: 12%; bottom: 2%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(10,50,140,.42), transparent); opacity: 0; }
.intro__ring { position: absolute; z-index: 0; left: 50%; top: 56%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  border: 6px solid rgba(255,255,255,.9); box-shadow: 0 0 40px rgba(255,255,255,.5), inset 0 0 30px rgba(255,255,255,.35); opacity: 0; }
.intro__bits { position: absolute; z-index: 2; left: 50%; top: 60%; width: 0; height: 0; }
.intro__bits img { position: absolute; left: 0; top: 0; translate: -50% -50%; max-width: none; filter: drop-shadow(0 8px 10px rgba(10,50,140,.35)); opacity: 0; will-change: transform, opacity; }

/* ── MORE TO PLAY: feature grid (after lesa.app/features). Title top-left, art in the middle, copy at the
   foot; each card's art loops while the card is on screen (.is-on, main.js) and holds otherwise. ── */
/* rows: wide + narrow, two equal, wide + narrow (a 20-column track keeps the ratios exact) */
.bento { max-width: var(--max); margin: clamp(36px, 5vw, 60px) auto 0; display: grid; grid-template-columns: repeat(20, 1fr); gap: 18px; text-align: left; }
.bento > * { grid-column: span 8; }
.bento > .bx--wide { grid-column: span 12; }
.bento > :nth-child(3), .bento > :nth-child(4) { grid-column: span 10; }
.bx { display: flex; flex-direction: column; min-height: 340px; padding: 24px 26px 26px; border-radius: 28px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16); overflow: hidden; }
.bx h3 { font: 400 clamp(22px, 1.9vw, 28px)/1.05 var(--head); text-transform: uppercase; }
.bx p { max-width: 30em; font-size: 15px; line-height: 1.45; opacity: .92; }
.bx__art { flex: 1; display: grid; place-items: center; min-height: 170px; padding: 18px 0; }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento > .bx--wide, .bento > :nth-child(3), .bento > :nth-child(4) { grid-column: auto; } .bx { min-height: 300px; } }

/* word of the day: the scrambled rack sorts itself into LEGENDS, holds, then scrambles again */
.wotd { --t: clamp(40px, 5.2vw, 70px); display: flex; gap: calc(var(--t) * .1); }
.wotd img { width: var(--t); filter: drop-shadow(0 8px 10px rgba(5,30,80,.3)); will-change: transform; }
/* languages: stacked pills, the front one flips through the ten languages */
.lang { position: relative; padding-top: 16px; }
.lang::before, .lang::after { content: ''; position: absolute; left: 10%; right: 10%; height: 100%; top: 0; border-radius: 14px; background: rgba(255,255,255,.45); }
.lang::before { transform: translateY(calc(var(--lag, 0) * -6px)) rotate(calc(var(--lag, 0) * -2deg)); }
.lang::after { left: 5%; right: 5%; top: 8px; background: rgba(255,255,255,.7); transform: translateY(calc(var(--lag, 0) * -3px)) rotate(calc(var(--lag, 0) * 1.5deg)); }
.lang__pill { will-change: transform; position: relative; z-index: 1; display: inline-flex; gap: 6px; align-items: baseline; min-width: 210px; justify-content: center; padding: 14px 22px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 10px 20px rgba(5,30,80,.25); }
.lang__pill small { font-weight: 800; color: #6B7896; font-size: 15px; }
.lang__pill b { font-weight: 900; font-size: 17px; }

/* leagues: the ring fills while the bolt count climbs (like lesa's score ring) */
.ring { position: relative; width: clamp(130px, 13vw, 170px); aspect-ratio: 1; }
.ring svg { width: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 12; }
.ring .ring__fill { stroke: var(--sun); stroke-linecap: round; stroke-dasharray: calc(var(--p) * 1) 100; }
.ring__in { position: absolute; inset: 0; display: grid; place-items: center; }
.trophy { grid-area: 1 / 1; width: 54%; opacity: 0; will-change: transform, opacity; filter: drop-shadow(0 8px 10px rgba(5,30,80,.3)); }
.league { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bolts { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px 6px 8px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 8px 16px rgba(5,30,80,.22); }
.bolts img { width: 30px; will-change: transform; }
.bolts b { font: 400 24px/1 var(--head); min-width: 2ch; }

/* rewards: a chest drops in, shakes, bursts open and sprays its loot under gravity; the next tier drops in */
.chx { position: relative; width: min(100%, 320px); height: 210px; }
.chx__chest { position: absolute; left: 50%; bottom: 14px; width: 150px; height: 150px; margin-left: -75px; transform-origin: 50% 100%; opacity: 0; will-change: transform; }
.chx__chest img { position: absolute; left: 0; bottom: 0; width: 100%; filter: drop-shadow(0 12px 14px rgba(5,30,80,.35)); }
.chx__open { opacity: 0; }
.chx__chest.is-open .chx__open { opacity: 1; } .chx__chest.is-open .chx__closed { opacity: 0; }
.chx__loot { position: absolute; inset: 0; pointer-events: none; }
.chx__loot img { position: absolute; left: 50%; top: 0; width: 40px; opacity: 0; will-change: transform; filter: drop-shadow(0 5px 6px rgba(5,30,80,.3)); }
.chx__loot img[data-k="tiles"] { width: 46px; } .chx__loot img[src*="frame"] { width: 52px; }
.chx::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 150px; height: 18px; margin-left: -75px; border-radius: 50%; background: radial-gradient(closest-side, rgba(5,30,80,.3), transparent); }

/* make it your own: the four frames take turns being worn */
.frames4 { display: flex; gap: clamp(8px, 1.4vw, 20px); }
.frames4 img { width: clamp(64px, 8vw, 110px); filter: drop-shadow(0 8px 12px rgba(5,30,80,.3)); opacity: .55; transform: scale(.85); transition: opacity .3s; will-change: transform; }

/* play at your pace: the turn pill cycles through a battle's moments */
.turns__pill { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 900; font-size: 17px; box-shadow: 0 10px 20px rgba(5,30,80,.25); }
.turns__pill i { width: 12px; height: 12px; border-radius: 50%; background: #2BC160; box-shadow: 0 0 0 5px rgba(43,193,96,.25); }
.turns__pill.is-wait i { background: var(--sun); box-shadow: 0 0 0 5px rgba(255,198,59,.3); }
