/* Homepage and shop. Avatar-inspired: night navy, a faint line-art ornament on every other section,
   a gold ornament on each boundary, and bronze buttons from the game's referral box. Type, one job
   per face: Sprite (the logo's lettering) for section titles, Japan for the four power names,
   Japan Day (JapanBody) for buttons and numbers, Outfit for everything you read. */
.portal {
  --navy-0: #070b16; --navy-1: #0c1222; --navy-2: #121a30; --navy-3: #1a2440; --line: rgb(170 190 255 / .13);
  --cream: #f3ecdf; --muted: #aab3c9; --gold: #e9c26c;
  --fire: #ff6b2c; --water: #4fb6ff; --earth: #7cd04e; --air: #e6edf6;
  --gutter: max(clamp(1.5rem, 5.5vw, 5rem), calc((100% - 72rem) / 2));
  --ease: cubic-bezier(.16,1,.3,1); --bar: 5rem;
  background: var(--navy-0); color: var(--cream); font-family: Outfit, system-ui, sans-serif; overflow-x: clip;
  overflow-anchor: none; /* Chrome anchors to transformed boxes, which drifts while GSAP moves them */
}
.portal ::selection { background: var(--gold); color: #1b1206; }
.portal .wrap { width: auto; margin: 0; padding-inline: var(--gutter); }
.portal a { color: var(--cream); }
.portal p { text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main { position: relative; z-index: 1; }
.fire { --el: var(--fire); } .water { --el: var(--water); } .earth { --el: var(--earth); } .air { --el: var(--air); } .gold { --el: var(--gold); }

.portal h2, .shop-page h1 {
  margin: 0; font: 400 clamp(2.4rem, 5.2vw, 4.2rem)/1.05 Sprite, Japan, sans-serif; letter-spacing: .01em; text-transform: uppercase;
  color: #fff; text-shadow: 0 .05em 0 #000, 0 .16em .45em rgb(2 5 14 / .55); text-wrap: balance;
}
.portal h3 { font-family: Outfit, system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; }
.section-head { max-width: 46rem; margin-bottom: 2.8rem; }
.section-head p { margin: 1.1rem 0 0; color: #d0d6e4; font-size: 1.12rem; line-height: 1.7; }
.section-head.center { margin-inline: auto; text-align: center; }
.text-link { display: inline-block; padding-block: .5rem; margin-right: 1.6rem; color: var(--gold) !important; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgb(233 194 108 / .35); text-decoration-thickness: 1px; text-underline-offset: .32em; transition: text-decoration-color 200ms; }
.text-link:hover { text-decoration-color: currentColor; }
.panel { padding: clamp(1.5rem, 3vw, 2.1rem); border-radius: 1.2rem; border: 1px solid rgb(197 139 69 / .3);
  background: linear-gradient(180deg, rgb(28 39 69 / .9), rgb(18 26 48 / .9)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 1.5rem 3rem rgb(2 5 14 / .3); }
.panel h3 { margin: 0 0 1rem; font-size: 1.25rem; }

/* Section boundaries: a gold hairline across the page with the four-gem medallion in the middle,
   laid over the seam so it belongs to both sections. */
.divider { position: relative; z-index: 6; height: 2.75rem; margin-block: -1.375rem; pointer-events: none;
  background: url('/social/divider.svg') center / auto 100% no-repeat; filter: drop-shadow(0 0 .5rem rgb(5 8 18 / .9)); }
.divider::before, .divider::after { content: ''; position: absolute; top: calc(50% - .5px); width: calc(50% - 7.5rem); height: 1px; }
.divider::before { left: 0; background: linear-gradient(90deg, transparent 4%, rgb(226 184 102 / .55)); }
.divider::after { right: 0; background: linear-gradient(270deg, transparent 4%, rgb(226 184 102 / .55)); }

/* Ornament sections: navy with the line-art doodle on top. They alternate with plain navy ones. */
.doodle { position: relative; isolation: isolate; }
.doodle::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--navy-2); }
.doodle::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgb(175 195 255 / .075);
  -webkit-mask: url('/social/doodle.svg') 0 0 / 360px 360px repeat; mask: url('/social/doodle.svg') 0 0 / 360px 360px repeat; }
/* Top bar: full width, fixed to the top of every screen. */
.portal header.topbar { position: fixed; inset: 0 0 auto; z-index: 20; border: 0; }
.topbar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgb(9 13 26 / .86); border-bottom: 1px solid rgb(233 194 108 / .16); transition: background .3s; }
.topbar.scrolled::before { background: rgb(9 13 26 / .96); }
.topbar-inner { position: relative; display: flex; align-items: center; gap: 1rem; height: var(--bar); padding-inline: var(--gutter); }
.topbar .brand { display: inline-flex; align-items: center; min-height: 44px; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.topbar .brand img { height: 2.35rem; width: auto; }
.sound-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgb(233 194 108 / .35); background: rgb(255 255 255 / .05); color: var(--gold); transition: background 200ms, border-color 200ms; }
.sound-btn:hover { background: rgb(233 194 108 / .12); border-color: rgb(233 194 108 / .6); }
.sound-btn { position: relative; }
.sound-btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn circle { fill: currentColor; }
.sound-btn[aria-pressed="true"] .off { display: none; }
.sound-btn[aria-pressed="false"] { color: #8f97ab; }
/* While music plays, the note gives way to bars that move with it. */
.eq { display: none; align-items: flex-end; gap: 2px; height: 1.1rem; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: eq .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.55s; } .eq i:nth-child(4) { animation-delay: -.15s; }
.sound-btn.playing .eq { display: flex; }
.sound-btn.playing .note { display: none; }
.sound-btn:not([hidden]) ~ .nav-icons { margin-left: 1.1rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; min-height: 42px; padding: 0 1rem 0 .7rem; border-radius: 99px; text-decoration: none;
  font: 600 .95rem Outfit, sans-serif; border: 1px solid var(--line); background: rgb(255 255 255 / .05); transition: background 200ms, border-color 200ms; }
.back svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease); }
.back:hover { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .22); }
.back:hover svg { transform: translateX(-2px); }

/* Splash: shown on the first visit in a tab while home-splash.js loads the page's art. */
.splash { display: none; }
.js.loading { overflow: hidden; }
.js.loading .splash, .js .splash.gone { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; isolation: isolate;
  background: radial-gradient(70% 60% at 50% 46%, #c48a4a 0%, #8d5726 52%, #3b2414 100%); transition: opacity .6s var(--ease), visibility 0s .6s; }
.splash::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgb(46 25 7 / .28);
  -webkit-mask: url('/social/doodle.svg') 0 0 / 300px 300px repeat; mask: url('/social/doodle.svg') 0 0 / 300px 300px repeat; }
.splash-inner { display: grid; justify-items: center; gap: 1.6rem; padding: 0 1.5rem; transition: transform .6s var(--ease); }
.splash img { width: min(20rem, 70vw); height: auto; filter: drop-shadow(0 .5rem 1rem rgb(46 25 7 / .6)); }
.splash-bar { width: min(17rem, 66vw); height: .95rem; padding: 2px; border-radius: 99px; background: #3b2414; border: 2px solid #2e1907;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / .45), 0 1px 0 rgb(255 226 180 / .3); }
.splash-bar i { display: block; height: 100%; border-radius: inherit; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(180deg, #ffe2a6, #e0a95c 55%, #b97c37); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5); }
.splash-pct { min-width: 4ch; margin: -.4rem 0 0; text-align: center; font: 700 3.3rem/1 JapanBody, sans-serif; letter-spacing: .04em; color: #fff4de;
  text-shadow: 0 2px 0 #4a2a10, 0 0 1px #4a2a10; }
.splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.splash.gone .splash-inner { transform: scale(1.04); }
/* The first screen's entrance waits for the splash to lift. */
.loading .hero *, .loading .hero *::before, .loading .hero *::after { animation-play-state: paused !important; }

/* Hero: words left, the mask right, on the four-realm painting. Both calls to action stay in the first screen. */
.hero { position: relative; isolation: isolate; height: 100svh; min-height: 36rem; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center; gap: 2.5rem; padding: calc(var(--bar) + 1rem) var(--gutter) 2rem; overflow: clip; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg::before { content: ''; position: absolute; inset: -3%; background: url('/social/hero-bg-1600.webp') center 46% / cover;
  animation: drift 40s ease-in-out infinite alternate; will-change: transform; }
.hero-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(7 11 22 / .92) 0%, rgb(7 11 22 / .76) 36%, rgb(7 11 22 / .5) 64%, rgb(7 11 22 / .62) 100%),
    linear-gradient(0deg, var(--navy-0) 0%, rgb(7 11 22 / 0) 26%), linear-gradient(180deg, rgb(7 11 22 / .55) 0%, rgb(7 11 22 / 0) 22%); }
.stage { position: relative; height: 100%; min-height: 0; container-type: size; display: grid; place-items: center; }
.mascot { position: relative; width: min(30rem, 82cqw, 82cqh); aspect-ratio: 1; rotate: -8deg;
  animation: maskIn 1.1s var(--ease) both, hover 7s ease-in-out 1.1s infinite; will-change: transform, translate; } /* one moving layer */
.mask { position: relative; z-index: 2; display: block; width: 100%; height: auto;
  filter: brightness(.86) contrast(1.05) drop-shadow(0 1.2rem 1.8rem rgb(2 5 14 / .65));
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 84%); mask-image: linear-gradient(180deg, #000 58%, transparent 84%); }
/* Mist the mask rises from, so the cut-off bust never shows. It sits over the lower half of the mask
   (sized from the same container units as .mascot) and its two layers drift apart slowly. */
.mist { --s: min(30rem, 82cqw, 82cqh); position: absolute; z-index: 3; left: 50%; top: calc(50% + var(--s) * .1); width: calc(var(--s) * 1.8); height: calc(var(--s) * .62);
  margin-left: calc(var(--s) * -.9); pointer-events: none; background: radial-gradient(48% 58% at 50% 62%, rgb(7 11 22 / .8), transparent 74%); }
.mist::before, .mist::after { content: ''; position: absolute; inset: 0; background: url('/social/mascot-mist.webp') center / 100% 100% no-repeat; will-change: transform; }
.mist::before { opacity: .9; animation: mistA 16s ease-in-out infinite alternate; }
.mist::after { opacity: .55; animation: mistB 22s ease-in-out infinite alternate; }
@keyframes mistA { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@keyframes cloudDrift { from { background-position: 40% 100%, 0 0; } to { background-position: 60% 100%, 0 0; } }
@keyframes mistB { from { transform: scaleX(-1) translateX(-4%); } to { transform: scaleX(-1) translateX(4%); } }
/* Avatar state: the eye holes and the arrow, traced from the mask and filled with pure white light. */
.eyes, .arrow { position: absolute; inset: 0; z-index: 3; width: 100%; height: auto; pointer-events: none; }
.eyes { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px #fff) drop-shadow(0 0 26px rgb(190 225 255 / .85)); animation: ignite 1s steps(1, end) .75s both; }
.arrow { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 9px rgb(255 255 255 / .9)) drop-shadow(0 0 22px rgb(190 225 255 / .6));
  clip-path: inset(0 0 100% 0); animation: fill .8s var(--ease) .9s forwards; }
.hero-copy { position: relative; z-index: 5; display: grid; justify-items: start; text-align: left; }
.hero h1 { margin: 0; line-height: 0; }
.logo { display: block; width: min(31rem, 100%); height: auto; margin-left: -1%; animation: rise 1s var(--ease) .9s both; filter: drop-shadow(0 .5rem 1.2rem rgb(2 5 14 / .75)); }
.pitch { max-width: 33rem; margin: 1.3rem 0 0; color: #eef0f5; font-size: clamp(1.08rem, 1.35vw, 1.25rem); line-height: 1.6; animation: rise 1s var(--ease) 1.02s both; }
.pitch-sub { max-width: 33rem; margin: .8rem 0 0; color: #b9c0d1; font-size: 1rem; line-height: 1.6; animation: rise 1s var(--ease) 1.1s both; }
.hero .actions { gap: 1rem 1.2rem; margin-top: 1.9rem; animation: rise 1s var(--ease) 1.18s both; }
.byline { margin: 1.5rem 0 0; font-size: .88rem; color: #8f97ab; animation: rise 1s var(--ease) 1.3s both; }
.byline a { color: #d4d8e2; }
@media (max-height: 46rem) { .pitch-sub { display: none; } }
@media (max-height: 38rem) { .byline { display: none; } }

@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07) translate(-1%, -1%); } }
@keyframes maskIn { from { opacity: 0; transform: translateY(1.5rem) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes hover { 50% { translate: 0 -.6rem; } }
@keyframes ignite { 0% { opacity: 0; } 12% { opacity: .55; } 24% { opacity: .08; } 36% { opacity: .85; } 48% { opacity: .3; } 60%, 100% { opacity: 1; } }
@keyframes fill { to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; translate: 0 1.4rem; } to { opacity: 1; translate: 0 0; } }

/* What is Ludo Elemental */
.about { padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-copy p { max-width: 38rem; margin: 1.2rem 0 0; color: #d6dbe7; font-size: 1.12rem; line-height: 1.75; }
.about-copy .text-link { margin-top: 1rem; }
.facts dl { margin: 0; }
.facts dl div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--gold); font-weight: 600; font-size: .96rem; }
.facts dd { margin: 0; color: #e0e4ec; line-height: 1.55; }

/* Abilities: an intro, then one screen per power. The live world stays pinned behind them
   (CSS sticky, so scrolling is never taken over) and changes element as each power arrives. */
.abilities { position: relative; isolation: isolate; overflow: clip;
  background: radial-gradient(60% 40% at 50% 10%, rgb(255 120 40 / .08), transparent 70%), #060812; }
.ab-world { position: sticky; top: 0; z-index: -1; height: 100svh; margin-bottom: -100svh; overflow: hidden; }
.ab-gl { display: none; }
.live .ab-gl { display: block; width: 100%; height: 100%; }
.ab-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75% 70% at 50% 50%, rgb(5 7 16 / .3), rgb(5 7 16 / .82)), linear-gradient(180deg, rgb(5 7 16 / .7), transparent 18%, transparent 82%, rgb(5 7 16 / .7)); }
.ab-intro { position: relative; display: grid; justify-items: center; text-align: center; padding: clamp(6rem, 14vh, 9rem) var(--gutter) clamp(2rem, 6vh, 4rem); }
.ab-intro p { max-width: 40rem; margin: 1.2rem 0 0; color: #dde1ea; font-size: 1.12rem; line-height: 1.7; text-shadow: 0 1px 10px #000; }
.ab-intro p + p { margin-top: .7rem; color: #bcc3d4; font-size: 1.02rem; }
.ab { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center;
  gap: clamp(2rem, 6vw, 6rem); padding: clamp(4rem, 9vh, 6rem) var(--gutter); }
.ab:nth-of-type(even) .ab-copy { order: 2; }
.abilities:not(.live) .ab { background: radial-gradient(55% 55% at 70% 50%, color-mix(in srgb, var(--el) 14%, transparent), transparent 70%); }
.ab-copy { max-width: 36rem; }
/* The element's temple, zoomed in and faint, behind the text side; the clip owns the other side. */
.ab-temple { position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 60%; pointer-events: none; opacity: .24;
  background: center / cover no-repeat; transform: scale(1.12); filter: saturate(.8);
  -webkit-mask: radial-gradient(62% 58% at 50% 50%, #000 30%, transparent 78%); mask: radial-gradient(62% 58% at 50% 50%, #000 30%, transparent 78%); }
.ab:nth-of-type(even) .ab-temple { left: auto; right: 0; }
.ab-title { display: flex; align-items: center; gap: 1rem; }
.kanji { flex: none; font: 400 clamp(2.6rem, 4.4vw, 3.8rem)/1 Kanji, serif; color: #fff;
  text-shadow: 0 0 .35em color-mix(in srgb, var(--el) 80%, transparent), 0 .05em 0 #000; }
.portal .ab h3 { margin: 0; font: 400 clamp(2.6rem, 5vw, 4.4rem)/.95 Japan, sans-serif; letter-spacing: .02em; text-transform: uppercase; color: var(--el);
  -webkit-text-stroke: .09em #050505; paint-order: stroke fill; text-shadow: 0 .07em 0 #050505, 0 0 1.4em color-mix(in srgb, var(--el) 30%, transparent); }
.ab-short { margin: 1rem 0 1.4rem; font-size: clamp(1.15rem, 1.6vw, 1.38rem); font-weight: 600; color: #fff; text-shadow: 0 1px 10px #000; }
.ab-facts { display: grid; margin: 0 0 1rem; border-bottom: 1px solid rgb(255 255 255 / .1); }
.ab-facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.2rem; padding-block: .8rem; border-top: 1px solid rgb(255 255 255 / .1); }
.ab-facts dt { font-size: .95rem; font-weight: 600; color: var(--el); }
.ab-facts dd { margin: 0; color: #e6e3dc; line-height: 1.6; text-shadow: 0 1px 8px #000; }
.ab .text-link { color: #fff !important; }
.ab-clip { justify-self: center; width: min(100%, 24rem); margin: 0; }
.clip-frame { padding: .45rem; border-radius: 1.75rem; background: linear-gradient(160deg, rgb(255 255 255 / .14), rgb(255 255 255 / .03));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--el) 40%, transparent), 0 2.2rem 4.5rem rgb(2 5 14 / .65), 0 0 5rem color-mix(in srgb, var(--el) 25%, transparent); }
.clip-frame video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 1.35rem; background: #000; object-fit: cover; }
.ab-clip figcaption { margin-top: 1rem; padding-inline: .5rem; color: #bec3cf; font-size: .92rem; line-height: 1.55; text-align: center; text-shadow: 0 1px 8px #000; }

/* Game modes, with the real home screen as a big faint phone behind, and a party chat that plays like a clip. */
.modes { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem);
  background: radial-gradient(55% 50% at 78% 45%, rgb(79 182 255 / .09), transparent 70%), var(--navy-1); }
.modes-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.mode-list { list-style: none; margin: 0; padding: 0; }
.mode { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1.1rem; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.mode:last-child { border-bottom: 1px solid var(--line); }
.mode-ico { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: .95rem; color: var(--el);
  background: color-mix(in srgb, var(--el) 14%, transparent); border: 1px solid color-mix(in srgb, var(--el) 42%, transparent); }
.mode-ico svg { width: 1.65rem; height: 1.65rem; }
.mode h3 { margin: .15rem 0 0; font-size: 1.25rem; }
.mode p { margin: .4rem 0 .15rem; color: #b3bbcf; line-height: 1.6; }
.mode .text-link { padding-block: .25rem; font-size: .95rem; }
/* A mode's heading is the game's own banner, shown at full strength and kept modest in size. */
.mode.has-banner { grid-template-columns: 1fr; gap: .5rem; }
.mode h3 { display: flex; align-items: center; gap: .7rem; min-height: 3.3rem; }
.mode h3 img { display: block; width: auto; max-width: 100%; height: 3.3rem; filter: drop-shadow(0 .3rem .6rem rgb(2 5 14 / .5)); }
.mode h3 .mode-ico { flex: none; width: 2.7rem; height: 2.7rem; border-radius: .8rem; }
.mode h3 .mode-ico svg { width: 1.4rem; height: 1.4rem; }
.mode-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1rem, 3vw, 2rem); }
.mode-list .mode { grid-column: 1 / -1; }
.mode-list .mode:nth-last-child(-n+2) { grid-column: auto; }
.mode-list .mode:nth-last-child(-n+2) h3 { font-size: 1.1rem; line-height: 1.2; }
.mode-list .mode:nth-last-child(-n+2) p { font-size: .95rem; line-height: 1.5; }
.mode:nth-last-child(2) { border-bottom: 1px solid var(--line); }
.mode.has-banner p { margin-top: .5rem; }
.talk { position: sticky; top: calc(var(--bar) + 2rem); }
.talk h3 { margin: 0; font-size: 1.7rem; }
.talk > p { margin: .9rem 0 1.6rem; color: #d0d6e4; font-size: 1.06rem; line-height: 1.7; }
.chat { overflow: hidden; margin-bottom: 1rem; border-radius: 1.5rem; border: 1px solid rgb(255 255 255 / .12);
  background: linear-gradient(180deg, rgb(24 33 60 / .97), rgb(13 19 36 / .97)); box-shadow: 0 2rem 4rem rgb(2 5 14 / .5), inset 0 1px 0 rgb(255 255 255 / .06); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .03); }
.chat-head strong { display: block; font-size: 1.05rem; }
.chat-head span { font-size: .84rem; color: var(--muted); }
.voices { display: flex; gap: .45rem; }
.voice { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .65rem; font: 700 .86rem Outfit, sans-serif; color: #0b1020;
  background: var(--el); box-shadow: 0 0 0 2px #0e1528, 0 0 0 3px color-mix(in srgb, var(--el) 55%, transparent); }
.voice.speaking::after { content: ''; position: absolute; inset: -6px; border-radius: .95rem; border: 2px solid var(--el); animation: speak 1s ease-out infinite; }
@keyframes speak { from { opacity: .9; transform: scale(.88); } to { opacity: 0; transform: scale(1.45); } }
/* Newest message at the bottom, older ones pushed up and out, like a real chat. */
.chat-log { list-style: none; display: flex; flex-direction: column; justify-content: flex-end; height: 24rem; overflow: hidden; margin: 0; padding: .4rem 1.2rem 1.1rem; }
.msg { flex: none; display: grid; justify-items: start; gap: .22rem; padding-top: .75rem; }
.msg b { font-size: .8rem; font-weight: 700; color: var(--el); }
.msg p { margin: 0; padding: .55rem .9rem; border-radius: .25rem 1rem 1rem 1rem; color: #eef0f5; line-height: 1.45;
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .08); }
.msg.react p { padding: 0 .2rem; font-size: 2.1rem; line-height: 1.15; background: none; border: 0; }
.msg.speak p { display: inline-flex; align-items: center; gap: .6rem; color: var(--el); border-color: color-mix(in srgb, var(--el) 35%, transparent); }
.bars { display: inline-flex; align-items: center; gap: 3px; height: 1rem; }
.bars i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: eq .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.25s; } .bars i:nth-child(3) { animation-delay: -.5s; } .bars i:nth-child(4) { animation-delay: -.15s; } .bars i:nth-child(5) { animation-delay: -.65s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.chat-input { display: flex; align-items: center; gap: .5rem; margin: 0 1.2rem 1.1rem; padding: .45rem .45rem .45rem 1rem; border-radius: 99px;
  background: rgb(2 5 14 / .28); border: 1px solid var(--line); color: #7f889f; font-size: .92rem; }
.chat-input span:first-child { flex: 1; }
.chat-tool { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgb(255 255 255 / .07); }
.chat-tool svg { width: 1.15rem; height: 1.15rem; color: #d0d6e4; }

/* Shop teaser */
.shop-teaser { padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem); }
.shop-teaser-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.fan { position: relative; aspect-ratio: 1.24; }
.fan > img:not(.bit) { position: absolute; top: 10%; width: 56%; height: auto; border-radius: 1rem; box-shadow: 0 1.6rem 3rem rgb(2 5 14 / .55), 0 0 0 1px rgb(255 255 255 / .12); transition: transform .6s var(--ease); }
.fan .b1 { left: 2%; rotate: -12deg; } .fan .b3 { right: 2%; rotate: 12deg; }
.fan .b2 { top: 0; left: 22%; z-index: 2; }
.fan:hover .b1 { transform: translateX(-5%); } .fan:hover .b3 { transform: translateX(5%); } .fan:hover .b2 { transform: translateY(-3%); }
.bit { position: absolute; z-index: 3; width: var(--w, 13%); height: auto; rotate: var(--r, 0deg); filter: drop-shadow(0 .6rem .7rem rgb(2 5 14 / .55));
  transition: transform .6s var(--ease); }
.t1 { --w: 15%; --r: -14deg; left: 3%; bottom: 7%; } .t2 { --w: 13%; --r: 16deg; left: 19%; bottom: 0; }
.t3 { --w: 12.5%; --r: 8deg; left: 41%; bottom: 9%; } .t4 { --w: 14%; --r: -11deg; left: 57%; bottom: -1%; }
.t5 { --w: 13.5%; --r: 12deg; right: 4%; bottom: 8%; } .t6 { --w: 11%; --r: -22deg; left: 1%; top: 2%; }
.t7 { --w: 11%; --r: -8deg; right: 3%; top: 0; }
.fan:hover .t1, .fan:hover .t6 { transform: translate(-6%, 4%); } .fan:hover .t2, .fan:hover .t3 { transform: translateY(6%); }
.fan:hover .t4, .fan:hover .t5, .fan:hover .t7 { transform: translate(6%, 4%); }
.shop-teaser-copy p { max-width: 34rem; margin: 1.1rem 0 0; color: #d6dbe7; font-size: 1.1rem; line-height: 1.72; }
.shop-teaser-copy .actions { margin-top: 2rem; align-items: center; }

/* Updates from the Play listing: a white page, the cards stay navy. */
.updates { position: relative; isolation: isolate; padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem); background: #fff; color: #1a2340; }
/* The same line-art doodle as the navy sections, drawn faint in navy on the white. */
.updates::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: rgb(26 35 64 / .07);
  -webkit-mask: url('/social/doodle.svg') 0 0 / 360px 360px repeat; mask: url('/social/doodle.svg') 0 0 / 360px 360px repeat; }
/* The title face is outline-only, so its letters are see-through. A heavy black copy behind fills them:
   black letters, the face's white line work on top. */
.portal .updates h2 { position: relative; isolation: isolate; color: #fff; text-shadow: none; }
.portal .updates h2::before { content: 'Updates' / ''; position: absolute; inset: 0; z-index: -1; color: #000;
  -webkit-text-stroke: .2em #000; text-shadow: 0 .1em .25em rgb(26 35 64 / .25); }
.updates .section-head p { color: #3d4663; }
.updates .checked { color: #5d6680; }
/* Solid navy cards: the see-through ones turn grey on white. */
.updates .stats, .updates .panel { color: #f3f1ea; background: linear-gradient(180deg, #1d2848, #131b33); border-color: rgb(197 139 69 / .45); box-shadow: 0 1.2rem 2.6rem rgb(26 35 64 / .18); }
/* Player reviews, one at a time in the third stat cell. */
.stat.rv-stat { position: relative; padding-right: 4rem; }
.stat.rv-stat dd { font: 400 1rem/1.5 Outfit, system-ui, sans-serif; letter-spacing: normal; color: inherit; }
.rv { display: grid; color: inherit !important; text-decoration: none; }
.rv-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateX(.8rem); transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s; }
.rv-slide.on { opacity: 1; visibility: visible; transform: none; }
.rv-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; }
.rv-head img { width: 2.5rem; height: 2.5rem; border-radius: 50%; box-shadow: 0 0 0 2px rgb(197 139 69 / .55); }
.rv-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; color: #f6e7c8; }
.rv-meta { display: grid; justify-items: end; gap: .1rem; }
.rv-date { font-size: .78rem; color: #fff; opacity: .5; }
.rv-meta .stars { font-size: .9rem; }
.rv-slide blockquote { margin: .8rem 0 0; color: #e6e2da; font-size: .95rem; line-height: 1.5; }
.rv:hover blockquote { color: #fff; }
.rv-next { position: absolute; top: 50%; right: .9rem; translate: 0 -50%; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0;
  border-radius: 50%; border: 1px solid rgb(233 194 108 / .45); background: rgb(233 194 108 / .1); color: var(--gold); cursor: pointer; transition: background .2s, transform .15s; }
.rv-next:hover { background: rgb(233 194 108 / .22); }
.rv-next:active { transform: scale(.92); }
.rv-next svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .rv-slide { transition: none; transform: none; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 1.2rem; border-radius: 1.2rem; border: 1px solid rgb(197 139 69 / .3);
  background: linear-gradient(180deg, rgb(28 39 69 / .75), rgb(18 26 48 / .75)); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .55rem; padding: 1.6rem 1.8rem; }
.stat + .stat { border-left: 1px solid rgb(197 139 69 / .22); }
.stat dd { margin: 0; font: 700 clamp(2.5rem, 4.2vw, 3.3rem)/1 JapanBody, sans-serif; letter-spacing: .04em; color: #f6e7c8; }
.stat dt { color: var(--muted); font-size: .97rem; line-height: 1.45; }
.stars { color: var(--gold); letter-spacing: .08em; }
.update-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ticks { list-style: none; display: grid; gap: .75rem; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 2rem; color: #e0e4ec; line-height: 1.55; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: .1rem; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  font-size: .78rem; font-weight: 700; color: var(--earth); background: rgb(124 208 78 / .16); }
.panel .small { margin: 1.1rem 0 0; color: var(--muted); font-size: .92rem; }
.rate p { margin: 0; color: #d6dbe7; line-height: 1.7; }
.rate .actions { margin-top: 1.6rem; align-items: center; }
.checked { margin: 1.4rem 0 0; color: #7d869d; font-size: .86rem; }

/* FAQ */
.faq { padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem); }
.faq-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.faq .section-head { margin: 0; }
.questions details { border-top: 1px solid var(--line); }
.questions details:last-child { border-bottom: 1px solid var(--line); }
.questions summary { cursor: pointer; padding: 1.2rem 2.2rem 1.2rem 0; position: relative; font-size: 1.1rem; font-weight: 600; list-style: none; transition: color .2s; }
.questions summary:hover { color: var(--gold); }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: '+'; position: absolute; right: .2rem; top: .95rem; font: 400 1.5rem Outfit, sans-serif; color: var(--gold); transition: rotate .3s var(--ease); }
.questions details[open] summary::after { rotate: 45deg; }
.questions details p { margin: 0; padding-bottom: 1.3rem; color: #b8c0d2; line-height: 1.65; }

/* Contact: help notes on the left, and a message form drawn like the game's referral box:
   parchment framed in golden brown, dark brown fields with bronze rims, a bronze button. */
.contact { position: relative; padding-block: clamp(5rem, 9vw, 8rem) clamp(5.5rem, 10vw, 9rem);
  background: radial-gradient(45% 50% at 72% 55%, rgb(233 194 108 / .08), transparent 72%), var(--navy-1); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact-copy > p:first-of-type { max-width: 30rem; margin: 1.1rem 0 0; color: #d0d6e4; font-size: 1.12rem; line-height: 1.7; }
.help-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.help-list li { padding-block: 1rem; border-top: 1px solid var(--line); }
.help-list li:last-child { border-bottom: 1px solid var(--line); }
.help-list h3 { margin: 0; font-size: 1.1rem; color: var(--gold); }
.help-list p { margin: .35rem 0 0; color: #b8c0d2; line-height: 1.6; }
.contact-copy a { text-underline-offset: .22em; }
.contact-copy .small { margin: 1.4rem 0 0; color: #98a1b6; font-size: .96rem; line-height: 1.65; }
.contact-copy strong { color: var(--cream); font-weight: 600; }
.letter { position: relative; isolation: isolate; display: grid; gap: 1.2rem; padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: 1.1rem; color: #3a2512;
  background: linear-gradient(180deg, #f6e9cb, #eddaaf); border: 3px solid #c58b45;
  box-shadow: inset 0 0 0 2px #f6e2b3, inset 0 0 0 3px rgb(168 115 58 / .5), 0 2rem 4rem rgb(2 5 14 / .55); }
.letter::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgb(150 100 45 / .1);
  -webkit-mask: url('/social/doodle.svg') 0 0 / 300px 300px repeat; mask: url('/social/doodle.svg') 0 0 / 300px 300px repeat; }
.letter { container-type: inline-size; }
.letter h3 { margin: 0; white-space: nowrap; font: 400 min(2.25rem, 7.2cqi)/1.05 Japan, sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #4a2a10; }
.letter-intro { margin: -.5rem 0 0; color: #6b4a2b; line-height: 1.6; }
.subjects { margin: 0; padding: 0; border: 0; min-width: 0; }
.subjects legend, .field > span { display: block; margin-bottom: .6rem; padding: 0; font: 700 1.62rem/1 JapanBody, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #5a3816; }
.subject-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.subject-row label { position: relative; cursor: pointer; }
.subject-row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.subject-row span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.05rem; border-radius: .5rem; border: 2px solid #caa477;
  background: rgb(255 249 233 / .7); color: #6b4521; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.subject-row label:hover span { border-color: #a8733a; }
.subject-row input:checked + span { background: linear-gradient(180deg, #ca8b46, #a76c2d); border-color: #6a3f17; color: #fff4de;
  box-shadow: inset 0 1px 0 rgb(255 226 180 / .5); text-shadow: 0 1px 0 rgb(60 32 10 / .7); }
.subject-row input:focus-visible + span { outline: 3px solid #4a2a10; outline-offset: 2px; }
.field { display: grid; }
.field em { font: 500 .85rem Outfit, sans-serif; letter-spacing: 0; text-transform: none; color: #8a6a49; }
.letter input:not([type="radio"]), .letter textarea { width: 100%; padding: .85rem 1rem; border-radius: .6rem; border: 2px solid #c58b45; background: #3b2414; color: #f6e6c8;
  font: 500 1rem/1.5 Outfit, system-ui, sans-serif; box-shadow: inset 0 2px 6px rgb(2 5 14 / .35); }
.letter textarea { min-height: 8.5rem; resize: vertical; }
.letter ::placeholder { color: #b39a7a; opacity: 1; }
.letter input:not([type="radio"]):focus-visible, .letter textarea:focus-visible { outline: 3px solid #e7b866; outline-offset: 2px; border-color: #e7b866; }
.letter .btn { justify-self: start; margin-top: .2rem; }
.letter-status { margin: 0; color: #7a5a3a; font-size: .92rem; line-height: 1.55; }
.portal .site-footer { position: relative; z-index: 0; /* under main, so the last divider shows over the seam */ background: #050913; border: 0; padding-block: 3rem 2.6rem; }
.portal .site-footer .wrap { padding-inline: var(--gutter); }
.portal .site-footer a:not(.footer-logo) { color: var(--muted); }
.portal .site-footer a:hover { color: #fff; }
.portal .site-footer .copyright { border-color: var(--line); }

/* Shop page */
.shop-hero { padding: calc(var(--bar) + clamp(2.5rem, 7vw, 5rem)) 0 clamp(3.5rem, 7vw, 5.5rem); overflow: clip; }
.shop-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.shop-page h1 { font-size: clamp(3.4rem, 8vw, 6rem); max-width: none; }
.shop-hero .intro { max-width: 32rem; margin: 1.2rem 0 0; color: #eef0f5; font-size: 1.2rem; line-height: 1.6; }
.shop-hero .intro-sub { max-width: 32rem; margin: .9rem 0 0; color: #bcc3d4; font-size: 1.04rem; line-height: 1.65; }
.shop-hero .actions { margin-top: 2rem; }
.board-stage { perspective: 1600px; }
.board-3d { position: relative; transform-style: preserve-3d; transform-origin: 50% 60%; animation: settle 1.4s var(--ease) .2s both; }
.board-img { display: block; width: 100%; height: auto; border-radius: 1.1rem; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 2.5rem 5rem rgb(2 5 14 / .65), 0 0 6rem rgb(120 120 255 / .14); }
.drop { position: absolute; width: 12%; height: auto; filter: drop-shadow(0 .5rem .5rem rgb(2 5 14 / .5)); animation: drop .7s cubic-bezier(.34,1.56,.64,1) both; }
.k1 { left: 13.6%; top: 13.6%; animation-delay: 1.2s; } .k2 { left: 74.4%; top: 13.6%; animation-delay: 1.3s; }
.k3 { left: 13.6%; top: 74.4%; animation-delay: 1.4s; } .k4 { left: 74.4%; top: 74.4%; animation-delay: 1.5s; }
@keyframes settle { from { opacity: 0; transform: rotateX(42deg) rotateZ(-18deg) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-260%) scale(1.3); } to { opacity: 1; transform: none; } }
.shop-block { padding-block: clamp(3.5rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.shop-block h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.lede { max-width: 44rem; margin: 1rem 0 0; color: #c3cad9; font-size: 1.1rem; line-height: 1.7; }
.shop-grid, .dice-grid, .token-grid { list-style: none; display: grid; gap: 1rem; margin: 2.2rem 0 0; padding: 0; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.board-card figure { height: 100%; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--navy-2); transition: border-color .3s, transform .4s var(--ease); }
.board-card:hover figure { border-color: rgb(255 255 255 / .24); transform: translateY(-3px); }
.board-frame { overflow: hidden; }
.board-card img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease); }
.board-card:hover img { transform: scale(1.04); }
.board-card figcaption { display: grid; gap: .3rem; padding: 1rem 1.1rem 1.2rem; }
.board-card strong { color: #fff; font-size: 1.08rem; }
.board-card figcaption span { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.board-card em, .die-card em, .token-card em { font-style: normal; font-size: .88rem; font-weight: 600; color: var(--gold); }
.dice-grid { grid-template-columns: repeat(3, 1fr); }
.die-card, .token-card { display: grid; justify-items: center; align-content: start; gap: .5rem; padding: 2rem 1.4rem 1.8rem; text-align: center;
  border: 1px solid var(--line); border-radius: 1.4rem; background: radial-gradient(60% 50% at 50% 30%, rgb(255 255 255 / .05), transparent 70%), var(--navy-2); }
.die-card h3, .token-card h3 { margin: .6rem 0 0; font-size: 1.22rem; }
.die-card p, .token-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.die-roll { width: 8.5rem; aspect-ratio: 1; overflow: hidden; filter: drop-shadow(0 1rem 1rem rgb(2 5 14 / .5)); }
.die-roll img { display: block; width: 600%; height: 100%; transform: translateX(-66.667%); }
.die-card:hover .die-roll img, .die-card:active .die-roll img { animation: roll .55s steps(6) infinite; }
@keyframes roll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.token-grid { grid-template-columns: repeat(2, 1fr); }
.token-row { display: flex; justify-content: center; gap: .4rem; }
.token-row img { width: clamp(3rem, 6vw, 4.4rem); height: auto; filter: drop-shadow(0 .4rem .5rem rgb(2 5 14 / .5)); transition: transform .4s var(--ease); }
.token-card:hover .token-row img { transform: translateY(-6px); }
.token-card:hover .token-row img:nth-child(2) { transition-delay: .04s; } .token-card:hover .token-row img:nth-child(3) { transition-delay: .08s; }
.token-card:hover .token-row img:nth-child(4) { transition-delay: .12s; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; display: grid; align-content: start; gap: .35rem; padding: 1.4rem 1.4rem 1.5rem 4.3rem;
  border-radius: 1.2rem; border: 1px solid var(--line); background: var(--navy-2); }
.steps li::before { content: counter(step); position: absolute; left: 1.3rem; top: 1.25rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  font: 700 1.45rem/1 JapanBody, sans-serif; color: #fff4de; background: linear-gradient(180deg, #d6a05d, #9c6128); border: 2px solid #4a2a10; box-shadow: 0 2px 0 #2e1907; }
.steps strong { font-size: 1.06rem; }
.steps span { color: var(--muted); line-height: 1.55; }

@media (max-width: 62rem) {
  .modes-grid { grid-template-columns: 1fr; }
  .talk { position: static; max-width: 36rem; }
}
@media (max-width: 50rem) {
  .shop-page .nav-icon.shop { display: none; }
  .shop-page .topbar .brand { margin-right: auto; }
}
@media (max-width: 56rem) {
  .hero { height: auto; min-height: 100svh; grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 0; padding: calc(var(--bar) + .5rem) var(--gutter) 1.4rem; justify-items: center; }
  .hero-bg::before { background-image: url('/social/hero-bg-768.webp'); background-position: center 40%; }
  .hero-bg::after { background: linear-gradient(0deg, var(--navy-0) 0%, rgb(7 11 22 / .86) 40%, rgb(7 11 22 / .45) 72%, rgb(7 11 22 / .62) 100%); }
  /* The mascot holds its place while the words scroll up over it. */
  .stage { grid-row: 1; position: sticky; top: var(--bar); z-index: 0; align-self: start; width: 100%; height: min(27rem, 84vw, 52svh); }
  .mascot { width: min(27rem, 84cqw, 92cqh); }
  .hero-copy { grid-row: 2; margin-top: -.6rem; justify-items: center; text-align: center; }
  .mask { -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 99%); mask-image: linear-gradient(180deg, #000 76%, transparent 99%); }
  /* A solid, full-width panel (not see-through): it hides the held mascot as it scrolls up over it. */
  .hero-copy::before { content: ''; position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gutter)) -1.4rem; background: var(--navy-0); }
  /* The cloud belongs to this panel: it rises from the solid fill and drifts over the mascot's lower half,
     so it travels up with the text instead of being cut by a hard edge. The mascot's own mist steps aside. */
  .hero-copy::after { content: ''; position: absolute; z-index: -1; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); bottom: 100%; height: 4.5rem; pointer-events: none;
    background: url('/social/mascot-mist.webp') 50% 100% / 160% 100% no-repeat,
      linear-gradient(0deg, var(--navy-0) 0%, rgb(7 11 22 / .75) 22%, transparent 70%);
    -webkit-mask-image: linear-gradient(0deg, #000 45%, transparent 100%); mask-image: linear-gradient(0deg, #000 45%, transparent 100%);
    animation: cloudDrift 18s ease-in-out infinite alternate; }
  .mist { display: none; }
  /* The signs are drawn with empty margins; keep them apart and stagger them a little. */
  .hero .web-badge { translate: -.9rem 0; }
  .hero .web-badge img { margin-bottom: -.5rem; }
  .hero .store-badge { translate: .9rem .5rem; }
  .logo { width: min(23rem, 76vw); margin: 0; }
  .pitch { margin-top: .7rem; font-size: 1.04rem; }
  .pitch-sub { display: none; }
  .hero .actions { justify-content: center; margin-top: 1.2rem; }
  .byline { margin-top: .9rem; }
  .about-grid, .update-grid, .faq-layout, .shop-teaser-grid, .shop-hero-inner { grid-template-columns: 1fr; }
  .fan { width: min(100%, 30rem); margin-inline: auto; }
  .ab { grid-template-columns: 1fr; min-height: 0; gap: 2.2rem; padding-block: 4rem; }
  .ab:nth-of-type(even) .ab-copy { order: 0; }
  .ab-temple, .ab:nth-of-type(even) .ab-temple { left: 0; right: 0; width: 100%; bottom: 45%; }
  .ab-facts div, .facts dl div { grid-template-columns: 1fr; gap: .25rem; }
  .ab-clip { width: min(100%, 22rem); }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgb(197 139 69 / .22); }
  .dice-grid, .steps, .contact-grid { grid-template-columns: 1fr; }
  .mist { --s: min(27rem, 84cqw, 92cqh); }
  .board-stage { width: min(100%, 28rem); margin-inline: auto; }
}
@media (max-width: 30rem) {
  .btn { min-height: 3.3rem; font-size: 1.4rem; }
  .store-badge img { height: 3.35rem; }
  .topbar .brand img { height: 2rem; }
  .topbar-inner { gap: .6rem; }
  .sound-btn:not([hidden]) ~ .nav-icons { margin-left: .7rem; }
  .topbar .nav-icons { gap: .9rem; }
  .topbar .nav-icon img { height: 3.1rem; }
  .hero .actions { flex-direction: column; align-items: center; gap: .8rem; }
  .token-grid { grid-template-columns: 1fr; }
  .letter .btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .mist::before, .mist::after { animation: none !important; }
  .hero-bg::before, .hero-copy::after, .mascot, .eyes, .arrow, .logo, .pitch, .pitch-sub, .hero .actions, .byline, .board-3d, .drop, .bars i, .voice.speaking::after { animation: none !important; }
  .arrow { clip-path: none; }
  .die-card:hover .die-roll img { animation: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.portal section[id], .portal article[id] { scroll-margin-top: var(--bar); }

/* Picture signs (Rate on Google Play, View Shop) standing in for buttons. */
.sign-btn { display: inline-block; line-height: 0; transition: transform 140ms cubic-bezier(.2,0,0,1), filter 200ms; }
.sign-btn img { display: block; width: auto; height: 6rem; filter: drop-shadow(0 .35rem .6rem rgb(0 0 0 / .45)); }
.sign-btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.08); }
.sign-btn:active { transform: translateY(1px) scale(.98); }
.sign-btn:focus-visible { outline: 3px solid #f3d38b; outline-offset: 4px; }
@media (max-width: 30rem) { .sign-btn img { height: 5rem; } }
@media (prefers-reduced-motion: reduce) { .sign-btn, .sign-btn:hover { transition: none; transform: none; } }

/* Side-by-side Game Modes: the sticky chat column must fit the window, or its bottom is cut off
   while it is held. The log gives up height first; on very short windows it stops sticking. */
@media (min-width: 62.01rem) {
  .talk { top: calc(var(--bar) + 1.5rem); }
  .chat-log { height: clamp(11rem, 100svh - 35rem, 24rem); }
}
@media (min-width: 62.01rem) and (max-height: 46rem) { .talk { position: static; } }

/* At a glance on phones: the whole panel folds behind its heading, closed at first, with an arrow
   at the right edge. Only home-fx.js adds .folding, so without it every row shows. */
.fact-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 44px; margin: 0; padding: 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fact-toggle svg { flex: none; width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .3s var(--ease); }
.facts.folding:not(.open) dl { display: none; }
.facts.folding h3 { margin: 0; }
.facts.folding.open h3 { margin-bottom: .6rem; }
.facts.folding.open .fact-toggle svg { rotate: 90deg; }
@media (prefers-reduced-motion: reduce) { .fact-toggle svg { transition: none; } }

/* Each mode is a card in its own element colour: a very faint fill, a fine rim and the line-art doodle,
   so the rows separate by colour instead of by rules. */
.mode-list { row-gap: .9rem; }
.mode-list .mode.has-banner { position: relative; isolation: isolate; padding: 1.2rem 1.3rem 1.3rem; border: 1px solid color-mix(in srgb, var(--el) 26%, transparent);
  border-radius: 1.1rem; background: color-mix(in srgb, var(--el) 7%, transparent); }
.mode-list .mode.has-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: color-mix(in srgb, var(--el) 16%, transparent);
  -webkit-mask: url('/social/doodle.svg') 0 0 / 240px 240px repeat; mask: url('/social/doodle.svg') 0 0 / 240px 240px repeat; }
.mode-list .mode:last-child { border-bottom-width: 1px; }

/* The Shop title sits above the pictures and the words, so it has its own row. */
.shop-teaser .section-head { margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
/* Beside the bots card, Tutorial takes only the width its words need. */
@media (min-width: 40rem) { .mode-list { grid-template-columns: 1fr fit-content(15rem); } }

/* Phones: At a glance is a slim bar when closed; the hero signs sit in opposite halves; cards end with their text. */
.facts.folding { padding: .3rem 1.2rem; }
.facts.folding.open { padding-bottom: 1.1rem; }
.mode-list .mode:nth-last-child(-n+2) { align-self: start; }
@media (max-width: 56rem) {
  .hero .web-badge { translate: calc(-1 * min(3rem, 12vw)) 0; }
  .hero .store-badge { translate: min(3rem, 12vw) .5rem; }
}
