/* Loudlings website — the game's identity: night purple, sun gold, ink outlines, living creatures. */
@font-face { font-family: 'Lilita One'; src: url('../fonts/lilita-one-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('../fonts/fredoka-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #2a1450; --night: #1c0f45; --deep: #120a30; --violet: #5b2ee0; --sky: #38b6ff; --sun: #ffc92e;
  --coral: #ff5d6c; --mint: #2ee6a6; --cream: #fff8e7; --text: #f3eeff; --muted: #c9bce8;
  --display: 'Lilita One', 'Arial Black', sans-serif; --body: 'Fredoka', system-ui, sans-serif;
  --r: 22px; --shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  --outline: 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 4px 0 var(--ink);
  --w: min(1180px, 100% - 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #120a30; }
/* Scrollbars in the site's colours: a rounded sun-gold thumb on the night track (Chrome, Edge, Safari).
   Inside cards and dialogs a slim one on a clear track, kept away from the round corners. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ffe27a, var(--sun) 45%, #ff9d1f); border-radius: 99px; border: 3px solid var(--deep); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #fff1b0, #ffd84d 45%, #ffb347); }
::-webkit-scrollbar-corner { background: transparent; }
.pcard-in::-webkit-scrollbar, .card-modal::-webkit-scrollbar { width: 8px; }
.pcard-in::-webkit-scrollbar-track, .card-modal::-webkit-scrollbar-track { background: rgba(18, 10, 53, .35); border-radius: 99px; margin: 30px 0; }
.pcard-in::-webkit-scrollbar-thumb, .card-modal::-webkit-scrollbar-thumb { border: 0; background: linear-gradient(180deg, #ffe27a, var(--sun), #ff9d1f); box-shadow: 0 0 0 1px rgba(42, 20, 80, .6); }
/* Firefox draws its own: the same colours, slim inside cards */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--sun) var(--deep); }
  .pcard-in, .card-modal { scrollbar-width: thin; scrollbar-color: var(--sun) transparent; }
}

body {
  margin: 0; font: 500 17px/1.6 var(--body); color: var(--text); overflow-x: hidden;
  background: radial-gradient(1200px 700px at 80% -10%, #3b1d9e 0%, transparent 60%), radial-gradient(900px 600px at 0% 30%, #2a1580 0%, transparent 55%), linear-gradient(180deg, #1c0f45 0%, #120a30 60%, #0d0724 100%);
  background-color: #120a30; background-attachment: fixed; background-repeat: no-repeat;
}
body::before { /* tiny twinkling stars */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .55;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 72% 9%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 88% 42%, #ffe9a8 50%, transparent 51%), radial-gradient(1.1px 1.1px at 34% 66%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 58% 84%, #cfe9ff 50%, transparent 51%), radial-gradient(1px 1px at 6% 88%, #fff 50%, transparent 51%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .25; } }
img, svg { max-width: 100%; }
a { color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .3px; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sun); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
.center { text-align: center; }

/* ---------- Buttons: the game's glossy, outlined buttons ---------- */
.btn {
  --b1: rgba(255, 255, 255, .16); --b2: rgba(255, 255, 255, .06); --edge: rgba(0, 0, 0, .35);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; overflow: hidden;
  padding: .72em 1.35em; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 400 1.08rem/1 var(--display); color: #fff; letter-spacing: .4px; text-shadow: 0 2px 0 rgba(42, 20, 80, .55);
  background: linear-gradient(180deg, var(--b1), var(--b2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--edge), 0 12px 24px -10px rgba(0, 0, 0, .6);
  transition: transform .15s ease, box-shadow .15s ease, filter .2s;
}
.btn::before { content: ''; position: absolute; left: 10%; right: 10%; top: 4px; height: 38%; border-radius: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); pointer-events: none; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }
.btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 1px 0 var(--edge); }
.btn-gold { --b1: #ffd84d; --b2: #ff9d1f; --edge: #b85b00; }
.btn-ghost { --b1: rgba(255, 255, 255, .18); --b2: rgba(255, 255, 255, .07); --edge: rgba(0, 0, 0, .4); backdrop-filter: blur(6px); }
.btn-sm { padding: .55em 1em; font-size: .95rem; border-radius: 13px; }
.btn-lg { font-size: 1.2rem; padding: .85em 1.6em; }
.btn-block { width: 100%; }
.btn-play { --b1: #6cf29c; --b2: #18b65e; --edge: #0a7638; font-size: 1.25rem; padding: .85em 1.6em .85em 1.2em; border-radius: 20px; animation: breathe-btn 2.4s ease-in-out infinite; }
.btn-xl { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem); padding: .8em 1.5em .8em 1.1em; }
.btn-play-icon { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: #fff; color: #18b65e; font-size: .7em; text-shadow: none; box-shadow: 0 3px 0 #0a7638; padding-left: .15em; }
.btn-shine { position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 55% { left: -40%; } 85%, 100% { left: 130%; } }
@keyframes breathe-btn { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.btn-play:hover { animation-play-state: paused; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, padding .3s; }
.topbar-in { width: min(1340px, 100% - 40px); margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 14px 0; transition: padding .3s; }
.topbar.scrolled { background: rgba(18, 10, 48, .82); backdrop-filter: blur(14px); box-shadow: 0 10px 30px -18px #000; }
.topbar.scrolled .topbar-in { padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
/* Contact stays in the footer and the phone menu: the wide bar keeps room for the pages */
@media (min-width: 1361px) { .mainnav .nav-contact { display: none; } }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)); transition: transform .3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand-word { font: 400 1.75rem/1 var(--display); color: var(--sun); text-shadow: var(--outline); letter-spacing: 1px; }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 12px; white-space: nowrap; transition: background .2s, color .2s; }
.mainnav a:hover, .mainnav a[aria-current] { background: rgba(255, 255, 255, .1); color: var(--sun); }
.tools { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; gap: 4px; background: rgba(0, 0, 0, .25); padding: 4px; border-radius: 14px; }
.flag { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 10px; color: var(--muted); text-decoration: none; font: 700 .8rem var(--body); opacity: .7; transition: all .2s; }
.flag svg { width: 24px; height: 17px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.flag.on, .flag:hover { opacity: 1; background: rgba(255, 255, 255, .14); color: #fff; }
.sound { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; }
.sound .x { display: none; }
.sound[aria-pressed="false"] .w1, .sound[aria-pressed="false"] .w2 { display: none; }
.sound[aria-pressed="false"] .x { display: inline; }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 3px; border-radius: 3px; background: #fff; transition: transform .3s, opacity .3s; }
.menu-open .burger span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- Shared bits ---------- */
.rays { position: absolute; inset: -30%; width: 160%; height: 160%; z-index: -1; pointer-events: none; animation: spin 90s linear infinite; }
.rays path { fill: rgba(255, 255, 255, .045); }
@keyframes spin { to { transform: rotate(360deg); } }
.kicker { display: inline-block; font: 700 .82rem var(--body); letter-spacing: 2px; text-transform: uppercase; color: var(--sun); background: rgba(255, 201, 46, .12); border: 1px solid rgba(255, 201, 46, .35); padding: 6px 12px; border-radius: 99px; margin-bottom: 14px; }
.kicker .beta { color: var(--mint); font-weight: 700; }
.sec { width: var(--w); margin: 0 auto; padding: clamp(60px, 9vw, 120px) 0; position: relative; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto clamp(30px, 5vw, 56px); }
.sec-head .title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); color: #fff; text-shadow: var(--outline); }
.sec-head .title small { font-size: .5em; color: var(--sun); vertical-align: middle; }
.sec-head .sub { color: var(--muted); font-size: 1.12rem; }
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(28px) scale(.98); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1.2); }
.js .reveal.in { opacity: 1; transform: none; }
.cta-note { color: var(--muted); font-size: .92rem; margin-top: 14px; }
.published { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.published time, .footer-base time { color: var(--mint); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 180%); visibility: hidden; z-index: 90; background: var(--ink); color: #fff; border: 2px solid var(--sun); border-radius: 16px; padding: 12px 18px; font-weight: 600; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), visibility 0s .35s; }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }

/* ---------- Card face, drawn like the game's cards ---------- */
.cardface {
  --c1: #ff9a3d; --c2: #f0344c; position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none;
  width: 150px; aspect-ratio: 150 / 210; padding: 9px 9px 10px; border-radius: 18px; color: var(--ink);
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px rgba(0, 0, 0, .28), var(--shadow);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.4), box-shadow .25s; user-select: none;
}
.cardface:hover { transform: translateY(-8px) rotate(-1.5deg) scale(1.04); color: var(--ink); }
.cf-window { position: relative; flex: 1; width: 100%; display: grid; place-items: center; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fff8e7 50%, #ffe9c2 100%); box-shadow: inset 0 0 0 2px rgba(42, 20, 80, .25); }
.cf-window::before { content: ''; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 210, 120, .28) 0 10deg, transparent 10deg 20deg); animation: spin 30s linear infinite; }
.cf-window img { position: relative; width: 84%; height: auto; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .12)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.6); }
.cardface:hover .cf-window img { transform: scale(1.1) rotate(3deg); }
.cf-cost, .cf-power { position: absolute; top: -10px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; font: 400 1.15rem/1 var(--display); color: #fff; text-shadow: 0 2px 0 var(--ink); }
.cf-cost { left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fe3ff, #1f7bf0 70%); box-shadow: 0 0 0 3px var(--ink); }
.cf-power { right: -8px; background: radial-gradient(circle at 35% 30%, #ffe27a, #ff9d1f 70%); clip-path: polygon(50% 0, 61% 18%, 82% 12%, 80% 34%, 100% 45%, 84% 60%, 92% 82%, 70% 82%, 60% 100%, 50% 86%, 40% 100%, 30% 82%, 8% 82%, 16% 60%, 0 45%, 20% 34%, 18% 12%, 39% 18%); }
.cf-ability { width: 100%; margin-top: 6px; padding: 3px 4px; border-radius: 6px; background: var(--ink); color: #fff; font: 600 .62rem/1.15 var(--body); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-name { margin-top: 5px; width: 100%; text-align: center; background: var(--cream); border-radius: 8px; padding: 2px 4px 0; font: 400 1.15rem/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-pt { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font: 600 .62rem var(--body); color: #7a6a99; background: var(--cream); padding: 0 8px; border-radius: 6px; white-space: nowrap; }
.speaking .cf-window img, .cardface.speaking .cf-window img { animation: talkbob .22s ease-in-out infinite alternate; }
@keyframes talkbob { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.1) translateY(-4px); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(10px, 3vw, 30px) 0 clamp(70px, 9vw, 120px); }
.hero-in { width: var(--w); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; min-height: min(80vh, 760px); }
.hero-title { font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.2rem); color: #fff; text-shadow: var(--outline), 0 10px 30px rgba(0, 0, 0, .35); margin: 4px 0 18px; }
.hero-title em { font-style: normal; color: var(--sun); display: inline-block; animation: wobble 3.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg) translateY(-4px); } }
.hero-sub { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--muted); max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.badges li { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; font-weight: 600; }
.badges li::before { content: '★ '; color: var(--sun); }
.hero-stage { position: relative; height: min(620px, 70vw); max-height: 640px; }
.pip-wrap { position: absolute; left: 50%; top: 48%; width: min(360px, 62%); transform: translate(-50%, -50%); z-index: 3; }
.pip-wrap svg { width: 100%; height: auto; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .45)); animation: floaty 4s ease-in-out infinite; cursor: pointer; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.bubble { position: absolute; right: -6%; top: -4%; z-index: 4; cursor: pointer; background: #fff; color: var(--ink); font: 400 1.15rem var(--display); padding: 10px 16px; border-radius: 18px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px rgba(0, 0, 0, .25); animation: pop-in .6s 1s both cubic-bezier(.2, .9, .3, 1.6), bob 3s 1.6s ease-in-out infinite; white-space: nowrap; }
.bubble::after { content: ''; position: absolute; left: 22px; bottom: -14px; border: 9px solid transparent; border-top: 12px solid #fff; filter: drop-shadow(0 3px 0 var(--ink)); }
@keyframes pop-in { from { opacity: 0; transform: scale(.3); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.float-card { position: absolute; z-index: 2; animation: drift 6s ease-in-out infinite; }
.float-card .cardface { width: clamp(92px, 9vw, 128px); }
.fc0 { left: 2%; top: 6%; --rot: -14deg; animation-delay: -1s; }
.fc1 { right: 2%; top: 4%; --rot: 12deg; animation-delay: -3s; }
.fc2 { left: -2%; top: 52%; --rot: -6deg; animation-delay: -2s; }
.fc3 { right: -2%; top: 50%; --rot: 9deg; animation-delay: -4s; }
.fc4 { left: 16%; bottom: -4%; --rot: 8deg; animation-delay: -5s; }
.fc5 { right: 16%; bottom: -6%; --rot: -10deg; animation-delay: -.5s; }
@keyframes drift { 0%, 100% { transform: rotate(var(--rot)) translateY(0); } 50% { transform: rotate(calc(var(--rot) * -.4)) translateY(-14px); } }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; width: 28px; height: 44px; border: 3px solid rgba(255, 255, 255, .4); border-radius: 16px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--sun); animation: scrolldot 1.6s ease-in-out infinite; }
@keyframes scrolldot { 50% { transform: translateY(12px); opacity: .3; } }

/* ---------- Story: the world loses its color and gets it back ---------- */
.story { position: relative; width: var(--w); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; }
.story-sticky { position: relative; }
.story-stage { position: sticky; top: 90px; height: min(70vh, 540px); border-radius: 32px; overflow: hidden; box-shadow: 0 0 0 4px var(--ink), 0 30px 60px -25px #000; transition: filter 1.1s ease; background: linear-gradient(180deg, #7fd0ff 0%, #c4ecff 55%, #fff3c4 100%); }
.story-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; }
.story-crowd { position: absolute; left: 4%; right: 4%; bottom: 6%; display: flex; justify-content: space-between; align-items: flex-end; }
.sc { width: 14%; transition: transform .8s cubic-bezier(.2, .9, .3, 1.5), opacity .8s; }
.sc svg { width: 100%; height: auto; }
.sc:nth-child(odd) { transform: translateY(-14%); }
.story-mumble { position: absolute; top: 10%; right: -30%; width: 30%; transition: right 1s cubic-bezier(.2, .9, .3, 1.2); }
.story-hush { position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(20, 16, 40, .2), rgba(20, 16, 40, .75)); opacity: 0; transition: opacity 1s; pointer-events: none; }
.story-egg { position: absolute; left: 50%; top: 22%; width: 26%; transform: translateX(-50%) scale(0); transition: transform .8s cubic-bezier(.2, .9, .3, 1.6); }
.egg { display: block; width: 70%; margin: 0 auto; aspect-ratio: 3/4; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, #ffe9c2 60%, #ffcf7a); box-shadow: 0 0 0 4px var(--ink); animation: eggshake 1.4s ease-in-out infinite; }
@keyframes eggshake { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-9deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
.egg-pip { position: absolute; inset: -10% 0 auto; opacity: 0; transform: scale(.3); transition: all .7s cubic-bezier(.2, .9, .3, 1.6); }
.story-stage[data-step="1"] { filter: grayscale(1) brightness(.75); }
.story-stage[data-step="1"] .story-mumble { right: 6%; }
.story-stage[data-step="1"] .story-hush { opacity: 1; }
.story-stage[data-step="1"] .sc { transform: translateY(6%) scale(.92); opacity: .6; }
.story-stage[data-step="2"] { filter: grayscale(.85) brightness(.8); }
.story-stage[data-step="2"] .story-hush { opacity: .7; }
.story-stage[data-step="2"] .story-mumble { right: 6%; }
.story-stage[data-step="2"] .story-egg, .story-stage[data-step="3"] .story-egg { transform: translateX(-50%) scale(1); }
.story-stage[data-step="2"] .sc { opacity: .5; }
.story-stage[data-step="3"] .egg { opacity: 0; transform: scale(1.4); transition: all .5s; }
.story-stage[data-step="3"] .egg-pip { opacity: 1; transform: scale(1.3); }
.story-stage[data-step="3"] .sc { animation: cheer .7s ease-in-out infinite alternate; }
.story-stage[data-step="3"] .sc:nth-child(2n) { animation-delay: .2s; }
@keyframes cheer { from { transform: translateY(0); } to { transform: translateY(-18%); } }
.story-text { padding: 12vh 0 18vh; }
.beat { min-height: 56vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s; }
.beat.active { opacity: 1; }
.beat h3 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); color: #fff; text-shadow: var(--outline); }
.beat p { font-size: 1.2rem; color: var(--muted); }
.beat em { color: var(--sun); font-style: normal; font-family: var(--display); }
.beat-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--ink); font: 400 1.3rem var(--display); margin-bottom: 14px; box-shadow: 0 0 0 3px var(--ink); }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r); padding: 26px 24px; text-align: center; }
.step-n { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--violet); font: 400 1.3rem var(--display); box-shadow: 0 0 0 3px var(--ink); }
.step h3 { font-size: 1.6rem; color: var(--sun); margin-top: 14px; }
.step p { color: var(--muted); }
.step-art { height: 190px; display: grid; place-items: center; position: relative; }
.step-art .cardface { width: 118px; transform: rotate(-5deg); }
.mini-place { position: relative; width: 190px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.mini-place img { display: block; width: 100%; }
.mini-place b { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font: 400 1.1rem var(--display); color: #fff; text-shadow: var(--outline); }
.mini-place small { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-weight: 700; color: var(--sun); text-shadow: 0 2px 0 var(--ink); }
.mini-combo { position: absolute; right: 0; top: 0; display: flex; align-items: center; background: #fff; border-radius: 99px; padding: 2px 8px; box-shadow: 0 0 0 3px var(--ink); animation: bob 2.4s ease-in-out infinite; }
.mini-combo img { width: 40px; }
.mini-combo i { font: 400 1.2rem var(--display); color: var(--coral); font-style: normal; }
.mini-board { display: flex; gap: 8px; }
.lane { width: 62px; height: 120px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; font: 400 1.6rem var(--display); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25); }
.lane small { font-size: .9rem; color: var(--muted); }
.lane.win { box-shadow: inset 0 0 0 3px var(--mint); color: var(--mint); }
.lane.lose { box-shadow: inset 0 0 0 3px var(--coral); color: var(--coral); }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat { position: relative; padding: 28px 24px; border-radius: var(--r); overflow: hidden; background: linear-gradient(160deg, rgba(91, 46, 224, .35), rgba(28, 15, 69, .6)); border: 1px solid rgba(255, 255, 255, .12); transition: transform .3s, box-shadow .3s; }
.feat:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -22px #000, 0 0 0 2px var(--sun); }
.feat-art { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle, #fff8e7, #ffe0a3); box-shadow: 0 0 0 4px var(--ink); margin-bottom: 16px; }
.feat-art img { width: 86px; transition: transform .4s cubic-bezier(.2, .9, .3, 1.6); }
.feat:hover .feat-art img { transform: scale(1.12) rotate(-6deg); }
.feat h3 { font-size: 1.55rem; color: #fff; }
.feat p { color: var(--muted); margin: 0; }

/* ---------- Showcase marquee ---------- */
.showcase .hint { text-align: center; color: var(--sun); font-weight: 600; margin: -20px 0 26px; }
.marquee { overflow: hidden; padding: 26px 0 36px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); margin-bottom: 20px; }
.marquee-track { display: flex; gap: 26px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.voice-card { border: 0; background: none; padding: 0; cursor: pointer; }
.voice-card:nth-child(odd) .cardface { transform: rotate(-3deg); }
.voice-card:nth-child(even) .cardface { transform: rotate(3deg) translateY(10px); }
.voice-card:hover .cardface { transform: translateY(-10px) scale(1.06); }

/* ---------- Learning ---------- */
.learn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp { background: rgba(255, 255, 255, .06); border-radius: var(--r); padding: 24px 20px; border-top: 4px solid var(--mint); }
.lp-n { font: 400 2.2rem var(--display); color: var(--mint); }
.lp h3 { font-size: 1.35rem; color: #fff; }
.lp p { color: var(--muted); margin: 0; font-size: .98rem; }
.stats { list-style: none; padding: 0; margin: 40px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stats b { display: block; font: 400 clamp(2.6rem, 2rem + 2vw, 4rem)/1 var(--display); color: var(--sun); text-shadow: var(--outline); }
.stats span { color: var(--muted); font-weight: 600; }

/* ---------- Modes ---------- */
.mode-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mode { padding: 30px; border-radius: 28px; position: relative; overflow: hidden; }
.mode-normal { background: linear-gradient(150deg, #1fb163, #0b7a5c); }
.mode-imm { background: linear-gradient(150deg, #2470f5, #5b2ee0); }
.mode h3 { font-size: 2.2rem; color: #fff; text-shadow: var(--outline); }
.mode p { color: #fff; opacity: .92; margin: 0; }
.mode-demo { display: inline-flex; flex-direction: column; align-items: center; margin: 4px 0 16px; padding: 12px 26px; background: var(--cream); border-radius: 14px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px rgba(0, 0, 0, .25); color: var(--ink); transform: rotate(-2deg); }
.mode-demo b { font: 400 1.8rem var(--display); }
.mode-demo small { font-weight: 600; color: #7a6a99; }

/* ---------- Worlds path ---------- */
.path { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; position: relative; }
.path::before { content: ''; position: absolute; left: 6%; right: 6%; top: 32px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 14px, transparent 14px 24px); }
.node { position: relative; text-align: center; }
.node-n { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #3a2a72; color: var(--muted); font: 400 1.6rem var(--display); box-shadow: 0 0 0 4px var(--ink); }
.node b { display: block; font: 400 1.05rem/1.15 var(--display); }
.node small { color: var(--muted); }
.node.live .node-n { background: radial-gradient(circle at 35% 30%, #fff27a, #ffb51f); color: var(--ink); animation: breathe-btn 2s ease-in-out infinite; box-shadow: 0 0 0 4px var(--ink), 0 0 30px rgba(255, 201, 46, .6); }
.node.live b { color: var(--sun); }

/* ---------- Final call ---------- */
.final { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(70px, 10vw, 140px) 20px; background: radial-gradient(circle at 50% 40%, #5b2ee0 0%, #2a1580 45%, transparent 75%); }
.final-in { max-width: 720px; margin: 0 auto; }
.final svg.final-pip { width: 200px; height: auto; animation: floaty 3.6s ease-in-out infinite; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .45)); }
.final h2 { font-size: clamp(2.2rem, 1.6rem + 3vw, 4rem); color: #fff; text-shadow: var(--outline); }
.final p { color: var(--muted); font-size: 1.15rem; }

/* ---------- Footer ---------- */
.footer { background: #0b0620; border-top: 4px solid var(--ink); margin-top: 40px; }
.footer-in { width: var(--w); margin: 0 auto; padding: 56px 0 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 30px; }
.f-brand p { color: var(--muted); max-width: 340px; }
.f-col { display: flex; flex-direction: column; gap: 8px; }
.f-col h2 { font-size: 1.2rem; color: var(--sun); }
.f-col a { color: var(--text); text-decoration: none; opacity: .85; }
.f-col a:hover { color: var(--sun); opacity: 1; }
.f-made { display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: .92rem; }
.devnture { display: inline-block; padding: 12px 16px; border-radius: 14px; background: rgba(109, 40, 217, .14); border: 1px solid rgba(167, 139, 250, .45); width: fit-content; transition: transform .25s, background .25s; }
.devnture:hover { transform: translateY(-3px); background: rgba(109, 40, 217, .28); }
.devnture img { display: block; height: 32px; width: auto; }
.footer-base { width: var(--w); margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .88rem; }
.totop { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }

/* ---------- Inner pages ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; width: var(--w); margin: 10px auto 0; padding: clamp(40px, 6vw, 70px) clamp(24px, 5vw, 60px); border-radius: 34px; background: linear-gradient(135deg, #3d1fa8, #241264 60%, #1a0d4f); box-shadow: 0 0 0 4px var(--ink), var(--shadow); }
.page-hero.small { padding-bottom: 36px; }
.page-hero-in { position: relative; max-width: 720px; }
.page-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.2rem); color: #fff; text-shadow: var(--outline); }
.page-hero p { color: var(--muted); font-size: 1.15rem; margin: 0; }
.page-hero-art { position: absolute; right: clamp(10px, 5vw, 70px); top: 50%; width: clamp(110px, 16vw, 190px); height: auto; transform: translateY(-50%); animation: floaty 4s ease-in-out infinite; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .45)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: #fff; font-weight: 600; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jump a { padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; }
.jump a:hover { background: var(--sun); color: var(--ink); }
.doc { width: var(--w); margin: 40px auto 0; display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 92px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 22px; }
.toc h2 { font-size: 1.15rem; color: var(--sun); }
.toc ol { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 5px; font-size: .95rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--sun); }
.doc-sec { scroll-margin-top: 100px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--r); padding: clamp(22px, 3vw, 34px); margin-bottom: 20px; }
.doc-sec h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); color: #fff; }
.doc-n { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--violet); font-size: 1.2rem; box-shadow: 0 0 0 3px var(--ink); }
.doc-sec p, .doc-sec li { color: #e4dcfb; }
.doc-sec b { color: #fff; }
.doc-sec em { color: var(--sun); font-style: normal; }
.doc-sec ul { padding-left: 22px; }
.tip { background: rgba(46, 230, 166, .1); border-left: 4px solid var(--mint); padding: 12px 16px; border-radius: 0 12px 12px 0; }
.tip b { color: var(--mint); }
.more { font-weight: 700; }
.doc-cta { display: flex; align-items: center; gap: 24px; padding: 28px; border-radius: 28px; background: linear-gradient(135deg, #1fb163, #0b7a5c); box-shadow: 0 0 0 4px var(--ink); margin: 30px 0; }
.doc-cta h2 { color: #fff; text-shadow: var(--outline); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.doc-cta svg.cta-pip { width: 120px; flex: none; animation: floaty 3.6s ease-in-out infinite; }
.doc-cta .btn-play { --b1: #ffd84d; --b2: #ff9d1f; --edge: #b85b00; }
.doc-cta .btn-play-icon { color: #ff9d1f; box-shadow: 0 3px 0 #b85b00; }
.prose { max-width: 820px; }
.prose h2 { color: var(--sun); font-size: 1.6rem; margin-top: 1.4em; }
.prose p { color: #e4dcfb; }

/* ---------- Credits and licenses ---------- */
.credits li { color: #e4dcfb; margin-bottom: 6px; }
.credit-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 14px 20px; }
.credit-card .who { font: 400 1.35rem var(--display); color: #fff; margin: 4px 0; }
.credits .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.credits table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.credits th { text-align: left; color: var(--deep); background: var(--sun); padding: 8px 10px; font-weight: 700; }
.credits td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #e4dcfb; vertical-align: top; overflow-wrap: break-word; }
.credits td small { color: var(--muted); }
/* Phones: one card per component instead of four squeezed columns */
@media (max-width: 640px) {
  .credits thead { display: none; }
  .credits table, .credits tbody, .credits tr, .credits td { display: block; width: auto; }
  .credits tr { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
  .credits td { border: 0; padding: 2px 0; }
  .credits td:first-child { font-size: 1rem; padding-bottom: 4px; }
  .credits td[data-label]::before { content: attr(data-label) ": "; color: var(--sun); font-weight: 700; }
}
.credits details { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; margin: 8px 0; padding: 10px 16px; }
.credits summary { cursor: pointer; font-weight: 700; color: #fff; }
.credits pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.45 ui-monospace, Consolas, monospace; color: #d9d0f5; margin: 10px 0 4px; }

/* ---------- Card library ---------- */
.explorer { width: var(--w); margin: 30px auto 0; }
.filters { position: sticky; top: 72px; z-index: 20; background: rgba(18, 10, 48, .9); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 16px; margin-bottom: 30px; display: grid; gap: 12px; }
.search input { width: 100%; padding: 14px 18px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .08); color: #fff; font: 600 1.05rem var(--body); }
.search input:focus { border-color: var(--sun); outline: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { --c1: #6b5aa8; --c2: #43327f; border: 0; cursor: pointer; padding: 7px 14px; border-radius: 99px; font: 700 .9rem var(--body); color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .55; transition: opacity .2s, transform .2s; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.chip:hover { opacity: .85; transform: translateY(-2px); }
.chip.on { opacity: 1; box-shadow: 0 0 0 3px #fff; }
.chips-small .chip { padding: 5px 12px; }
.chips-label { color: var(--muted); font-weight: 700; font-size: .9rem; margin-right: 4px; }
.toggle { margin-left: auto; display: flex; gap: 6px; align-items: center; font-weight: 600; color: var(--muted); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--sun); }
.count { margin: 0; color: var(--muted); }
.count b { color: var(--sun); font-family: var(--display); font-size: 1.3rem; font-weight: 400; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 34px 20px; justify-items: center; }
.card-grid .cardface.hide { display: none; }
.empty { text-align: center; color: var(--muted); font-size: 1.2rem; }
.card-modal { width: min(760px, 94vw); max-height: 92vh; border: 0; border-radius: 30px; padding: 0; background: linear-gradient(160deg, #2a1580, #160b3d); color: var(--text); box-shadow: 0 0 0 4px var(--ink), 0 40px 80px -20px #000; overflow: auto; }
.card-modal[open] { animation: modal-in .35s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes modal-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.card-modal::backdrop { background: rgba(8, 4, 24, .78); backdrop-filter: blur(4px); }
.cm-close { position: sticky; float: right; top: 12px; margin: 12px 12px 0 0; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.6rem; cursor: pointer; }
.cm-in { padding: 26px clamp(20px, 4vw, 36px) 32px; }
.cm-head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.cm-art { aspect-ratio: 1; border-radius: 24px; display: grid; place-items: center; background: radial-gradient(circle, #fff, #ffe9c2); box-shadow: 0 0 0 4px var(--ink); }
.cm-art svg { width: 86%; height: auto; }
.cm-word { font: 400 clamp(2.4rem, 2rem + 2vw, 3.4rem) var(--display); color: #fff; text-shadow: var(--outline); margin: 6px 0 2px; }
.cm-pt { color: var(--sun); font-weight: 700; font-size: 1.2rem; margin: 0 0 12px; }
.cm-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cm-sentence { margin: 22px 0 6px; padding: 16px 20px; border-radius: 16px; background: rgba(255, 255, 255, .07); border-left: 5px solid var(--sun); }
.cm-sentence b { font-size: 1.25rem; color: #fff; display: block; }
.cm-sentence small { color: var(--muted); font-size: 1rem; }
.cm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.cm-grid div { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 12px; text-align: center; }
.cm-grid dt { color: var(--muted); font-size: .85rem; font-weight: 700; }
.cm-grid dd { margin: 0; font: 400 1.6rem var(--display); color: var(--sun); }
.cm-ability { background: var(--ink); border-radius: 16px; padding: 14px 18px; margin-bottom: 14px; }
.cm-ability b { color: var(--mint); }
.cm-links h3 { font-size: 1.1rem; color: var(--sun); margin: 14px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--cream); color: var(--ink); text-decoration: none; font: 400 1rem var(--display); box-shadow: 0 0 0 2px var(--ink); transition: transform .2s; cursor: pointer; border: 0; }
.pill:hover { transform: translateY(-2px) rotate(-2deg); color: var(--ink); }
.pill img { width: 28px; height: 28px; border-radius: 50%; background: #fff; }

/* ---------- Card page ---------- */
.card-page { width: var(--w); margin: 0 auto; }
.cp-top { position: relative; padding: 30px; border-radius: 34px; margin-top: 10px; background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 55%, #2a1580), color-mix(in srgb, var(--c2) 45%, #160b3d)); box-shadow: 0 0 0 4px var(--ink), var(--shadow); overflow: hidden; }
.cp-hero { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 30px; align-items: center; }
.cp-art { aspect-ratio: 1; border-radius: 30px; display: grid; place-items: center; background: radial-gradient(circle, #fff, #ffe9c2); box-shadow: 0 0 0 4px var(--ink), 0 10px 0 4px rgba(0, 0, 0, .2); }
.cp-art svg { width: 84%; height: auto; cursor: pointer; }
.cp-kind { display: inline-block; padding: 5px 14px; border-radius: 99px; color: #fff; font-weight: 700; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); box-shadow: 0 0 0 2px var(--ink); }
.cp-word { font-size: clamp(3rem, 2rem + 4vw, 5.4rem); color: #fff; text-shadow: var(--outline); margin: 10px 0 0; }
.cp-pt { font: 400 1.6rem var(--display); color: var(--sun); margin: 0 0 16px; }
.cp-pt span { font: 600 1rem var(--body); color: #fff; opacity: .8; }
.cp-listen { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-sentence { margin: 22px 0 0; padding: 16px 20px; border-radius: 16px; background: rgba(0, 0, 0, .22); border-left: 5px solid var(--sun); }
.cp-sentence p { font: 400 1.5rem var(--display); color: #fff; margin: 0; }
.cp-sentence footer { color: #fff; opacity: .85; font-size: 1.05rem; }
.cp-face .cardface { width: 190px; transform: rotate(4deg); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 24px 0; }
.cp-box { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 22px; }
.cp-box h2 { font-size: 1.3rem; color: var(--sun); margin-top: 6px; }
.cp-when { display: inline-block; background: var(--ink); color: var(--mint); font-weight: 700; padding: 3px 12px; border-radius: 99px; margin-bottom: 8px; }
.cp-ability { font-size: 1.15rem; color: #fff; }
.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.cp-stats div { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 8px; text-align: center; }
.cp-stats dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.cp-stats dd { margin: 0; font: 400 1.4rem var(--display); color: var(--sun); }
.cp-starter { color: var(--sun); font-weight: 700; margin: 12px 0 0; }
.cp-related h2 { color: #fff; font-size: 1.8rem; }
.card-row { display: flex; gap: 22px; flex-wrap: wrap; padding: 16px 4px 30px; }
.card-row .cardface { width: 140px; }
.cp-nav { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .1); font: 400 1.15rem var(--display); }
.cp-nav a { text-decoration: none; }

/* ---------- Collectibles ---------- */
.combo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.combo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px 16px; border-radius: 20px; border: 0; cursor: pointer; color: var(--text); font: inherit; text-align: center; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .25s, box-shadow .25s; }
.combo:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 2px var(--sun), 0 18px 30px -20px #000; }
.combo-pair { display: flex; align-items: center; gap: 6px; }
.combo-pair i { font: 400 1.6rem var(--display); color: var(--sun); font-style: normal; }
.chase .combo-pair i { color: var(--coral); }
.mini-c { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #fff; font: 400 .95rem var(--display); }
.mini-c img { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffe9c2); box-shadow: 0 0 0 3px var(--ink); padding: 4px; transition: transform .3s cubic-bezier(.2, .9, .3, 1.6); }
.combo:hover .mini-c img { transform: rotate(-8deg) scale(1.08); }
.combo b { font: 400 1.15rem var(--display); color: #fff; margin-top: 6px; }
.combo small { color: var(--muted); }
.play-ico { position: absolute; right: 12px; top: 10px; opacity: .6; }
.minus { position: absolute; right: 12px; top: 10px; color: var(--coral); font: 400 1.2rem var(--display); }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.place { border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 3px var(--ink); transition: transform .3s; }
.place:hover { transform: translateY(-4px) rotate(-.5deg); }
.place img, .place-blank { display: block; width: 100%; aspect-ratio: 200 / 110; object-fit: cover; background: #3f2a8a; }
.place div { padding: 14px 16px; }
.place h3 { font-size: 1.35rem; color: #fff; margin-bottom: 4px; }
.place p { margin: 0; color: var(--sun); font-weight: 600; }
.stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 30px; }
.stage { text-align: center; background: rgba(255, 255, 255, .05); border-radius: var(--r); padding: 22px 16px; }
.stage-card { position: relative; display: inline-flex; flex-direction: column; align-items: center; width: 120px; padding: 10px; border-radius: 16px; background: linear-gradient(160deg, #ff9a3d, #f0344c); box-shadow: 0 0 0 3px var(--ink); margin-bottom: 14px; color: var(--ink); }
.stage-card img { width: 80px; background: var(--cream); border-radius: 12px; }
.stage-card b { font: 400 1.1rem var(--display); background: var(--cream); width: 100%; border-radius: 8px; margin-top: 6px; }
.stage-card small { font-weight: 700; color: #7a6a99; background: var(--cream); padding: 0 8px; border-radius: 6px; margin-top: 3px; }
.stage-card.st3 { filter: saturate(.55) brightness(.85); }
.zz { position: absolute; right: -6px; top: -14px; font: 400 1.2rem var(--display); color: #fff; text-shadow: var(--outline); animation: bob 2s ease-in-out infinite; }
.stage h3 { color: var(--sun); font-size: 1.4rem; }
.stage p { color: var(--muted); margin: 0; }
.packs-box { padding: 28px; border-radius: 28px; background: linear-gradient(135deg, #3d1fa8, #241264); box-shadow: 0 0 0 4px var(--ink); }
.packs-box h3 { color: #fff; font-size: 1.8rem; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.checks li::before { content: '✓'; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 700; }

/* ---------- Worlds page ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 6px; border-radius: 6px; background: linear-gradient(var(--sun), var(--violet) 20%, rgba(255, 255, 255, .15)); }
.world { position: relative; display: grid; grid-template-columns: 68px 1fr; gap: 20px; margin-bottom: 22px; }
.world-n { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #3a2a72; font: 400 1.8rem var(--display); box-shadow: 0 0 0 4px var(--ink); color: var(--muted); }
.world.live .world-n { background: radial-gradient(circle at 35% 30%, #fff27a, #ffb51f); color: var(--ink); box-shadow: 0 0 0 4px var(--ink), 0 0 30px rgba(255, 201, 46, .6); }
.world-card { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 20px 24px; }
.world.live .world-card { background: linear-gradient(135deg, rgba(255, 201, 46, .18), rgba(91, 46, 224, .25)); border-color: rgba(255, 201, 46, .5); }
.world-card h2 { font-size: 1.9rem; color: #fff; margin: 4px 0; }
.world-status { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: var(--muted); }
.world.live .world-status { background: var(--mint); color: var(--ink); }
.world.next .world-status { background: var(--sky); color: var(--ink); }
.world-life { color: var(--sun); font-weight: 700; }
.chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.char { text-align: center; background: rgba(255, 255, 255, .05); border-radius: 28px; padding: 26px; }
.char-art { display: grid; place-items: center; width: 160px; height: 160px; margin: 0 auto 14px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 70%); }
.char-art svg { width: 140px; height: auto; animation: floaty 4s ease-in-out infinite; }
.hush-art .hush-body { animation: none; }
.char h3 { font-size: 2rem; color: #fff; margin-bottom: 2px; }
.char-role { color: var(--sun); font-weight: 700; }
.char p:last-child { color: var(--muted); margin: 0; }
.recap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.recap article { background: rgba(255, 255, 255, .05); border-radius: var(--r); padding: 22px; }
.recap h3 { color: #fff; font-size: 1.35rem; }
.recap p { color: var(--muted); margin: 0; }
.recap em { color: var(--sun); font-style: normal; }

/* ---------- How you learn ---------- */
.method { display: grid; gap: 18px; }
.method-item { display: grid; grid-template-columns: 110px 1fr; gap: 22px; align-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 22px 26px; }
.method-art { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffe0a3); box-shadow: 0 0 0 4px var(--ink); }
.method-art img { width: 88px; }
.method-item h2 { color: #fff; font-size: 1.6rem; }
.method-item p { color: #e4dcfb; margin: 0; }
.method-item em { color: var(--sun); font-style: normal; }
.honest { margin: 30px 0; padding: 26px 30px; border-radius: 26px; background: rgba(46, 230, 166, .1); border: 2px solid var(--mint); }
.honest h2 { color: var(--mint); }
.honest p { margin: 0; font-size: 1.1rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto 30px; display: grid; gap: 12px; }
.qa { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; overflow: hidden; }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font: 400 1.25rem var(--display); color: #fff; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); position: relative; transition: transform .3s; }
.qa summary i::before, .qa summary i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 14px; height: 3px; border-radius: 2px; background: var(--ink); }
.qa summary i::after { transform: rotate(90deg); transition: transform .3s; }
.qa[open] summary i::after { transform: rotate(0); }
.qa p { padding: 0 22px 20px; margin: 0; color: #e4dcfb; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
.form { display: grid; gap: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 28px; padding: clamp(22px, 4vw, 34px); }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; padding: 13px 16px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .25); color: #fff; font: 500 1.02rem var(--body); }
.form select option { color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--sun); outline: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; font-weight: 500 !important; font-size: .95rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--sun); }
.hp { position: absolute; left: -9999px; }
.form-msg { margin: 0; font-weight: 700; min-height: 1.5em; }
.form-msg.ok { color: var(--mint); }
.form-msg.err { color: var(--coral); }
.contact-side { text-align: center; background: rgba(255, 255, 255, .05); border-radius: 28px; padding: 28px; }
.contact-side img { animation: floaty 4s ease-in-out infinite; }
.contact-side h2 { color: var(--sun); }

/* ---------- 404 ---------- */
.nf { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 80px 20px 120px; }
.nf svg.nf-mumble { width: 220px; height: auto; animation: floaty 3s ease-in-out infinite; }
.nf h1 { font-size: clamp(2.4rem, 2rem + 3vw, 4rem); color: #fff; text-shadow: var(--outline); }
.nf p { color: var(--muted); font-size: 1.15rem; }

/* Living creatures: the page's script adds these moods */
svg.hop { animation: hop .6s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes hop { 0% { transform: scale(1.1, .86); } 40% { transform: translateY(-18%) scale(.92, 1.08); } 75% { transform: scale(1.06, .94); } }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
  .mainnav { position: fixed; inset: 70px 12px auto; flex-direction: column; gap: 2px; padding: 14px; border-radius: 22px; background: rgba(18, 10, 48, .97); backdrop-filter: blur(16px); box-shadow: 0 0 0 3px var(--ink), 0 30px 60px -20px #000; transform: translateY(-12px) scale(.98); opacity: 0; pointer-events: none; transition: all .25s; }
  .menu-open .mainnav { transform: none; opacity: 1; pointer-events: auto; }
  .mainnav a { font-size: 1.1rem; padding: 12px 14px; }
  .burger { display: flex; }
  .tools { margin-left: auto; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .learn-grid { grid-template-columns: 1fr 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .recap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-ctas, .badges { justify-content: center; }
  .hero-stage { height: 440px; order: -1; margin-top: -10px; }
  .scroll-hint { display: none; }
  /* On phones the picture stays pinned at the top while the paragraphs scroll under it */
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-sticky { position: sticky; top: 66px; z-index: 3; padding-bottom: 10px; background: linear-gradient(180deg, #160b3d 80%, transparent); }
  .story-stage { position: relative; top: 0; height: 34vh; border-radius: 24px; }
  .story-text { padding: 4vh 0 12vh; }
  .beat { min-height: 48vh; }
  .steps, .mode-pair, .chars, .contact { grid-template-columns: 1fr; }
  .steps { gap: 36px; }
  .path { grid-template-columns: repeat(4, 1fr); row-gap: 26px; }
  .path::before { display: none; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .cp-hero { grid-template-columns: 1fr; text-align: center; }
  .cp-art { max-width: 280px; margin: 0 auto; }
  .cp-listen { justify-content: center; }
  .cp-face { display: none; }
  .stages { grid-template-columns: 1fr 1fr; }
  .page-hero-art { opacity: .35; right: -20px; }
  .cm-head { grid-template-columns: 1fr; text-align: center; }
  .cm-art { max-width: 200px; margin: 0 auto; }
  .cm-buttons { justify-content: center; }
  .filters { top: 64px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-word { font-size: 1.4rem; }
  .brand img { width: 36px; height: 36px; }
  .play-cta, .flag span { display: none; }
  .feat-grid, .learn-grid, .stats, .recap, .row2, .footer-in { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-stage { height: 360px; }
  .float-card .cardface { width: 82px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 14px; }
  .card-grid .cardface { width: 100%; max-width: 160px; }
  .method-item { grid-template-columns: 1fr; text-align: center; }
  .method-art { margin: 0 auto; }
  .doc-cta { flex-direction: column; text-align: center; }
  .footer-base { flex-direction: column; gap: 10px; }
  .cm-grid { grid-template-columns: 1fr 1fr 1fr; }
  .toggle { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Hall of Fame ---------- */
.page-hall { --gold: #ffc92e; --gold2: #ff9d1f; --silver: #dfe7f2; --silver2: #9fb0c8; --bronze: #ffb27a; --bronze2: #c86b2c; }
.hall-hero { position: relative; overflow: hidden; isolation: isolate; width: var(--w); margin: 10px auto 0; padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 60px) clamp(40px, 6vw, 70px); border-radius: 34px; text-align: center;
  background: radial-gradient(circle at 50% 18%, #7b4dff 0, #3d1fa8 34%, #1a0d4f 78%); box-shadow: 0 0 0 4px var(--ink), var(--shadow); }
.hall-hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hall-hero .crumbs { align-self: flex-start; }
.hall-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); color: var(--gold); text-shadow: var(--outline), 0 0 40px rgba(255, 201, 46, .45); margin: 4px 0 0; }
.hall-lead { max-width: 620px; margin: 0; color: #fff; font-size: 1.1rem; }
.hall-trophy { width: clamp(110px, 18vw, 150px); filter: drop-shadow(0 10px 28px rgba(255, 201, 46, .55)); animation: hallFloat 3.2s ease-in-out infinite; }
.trophy-svg { width: 100%; height: auto; display: block; }
.trophy-shine { animation: hallShine 2.6s ease-in-out infinite; }
.hall-season-pill { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 9px 18px; border-radius: 99px; background: rgba(18, 10, 53, .75); border: 2px solid var(--gold); color: #fff; font-weight: 600; }
.hall-season-pill b { font-family: var(--display); font-weight: 400; color: var(--gold); letter-spacing: .3px; }
.hall-season-pill small { color: var(--muted); }
.hall-live { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 700; }
.hall-live i { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(46, 230, 166, .6); animation: hallPulse 1.6s infinite; }
.hall-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hall-sparks i { position: absolute; left: var(--x); bottom: -20px; width: 10px; height: 10px; transform: scale(var(--s)); opacity: 0;
  background: radial-gradient(circle, #fff 0 30%, var(--gold) 31% 60%, transparent 61%); border-radius: 50%; animation: hallRise 6s linear infinite; animation-delay: var(--d); }
@keyframes hallFloat { 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes hallShine { 0%, 60%, 100% { opacity: 0; } 30% { opacity: .9; } }
@keyframes hallPulse { 70% { box-shadow: 0 0 0 10px rgba(46, 230, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 230, 166, 0); } }
@keyframes hallRise { 0% { transform: translateY(0) scale(var(--s)); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-460px) scale(var(--s)); opacity: 0; } }

.av { border-radius: 50%; background: #2a1d63; flex: none; object-fit: cover; }
/* A player's border and flame (the game server's self-animating SVG): glow and fire behind the face, frame and embers in front */
.pf { position: relative; display: inline-block; flex: none; line-height: 0; vertical-align: middle; isolation: isolate; }
.pf .av { position: relative; z-index: 1; }
.pf.has-b .av { border-color: transparent !important; box-shadow: none !important; }
.pf .fx { position: absolute; left: -33.333%; top: -33.333%; width: 166.667%; height: 166.667%; max-width: none; pointer-events: none; border: 0; }
.pf .fx-back { z-index: 0; }
.pf .fx-front { z-index: 2; }
.pf .fx-days { position: absolute; z-index: 3; right: -16%; bottom: -8%; font: 800 max(9px, calc(var(--s, 52px) * .15)) / 1.25 var(--body, sans-serif); color: #fff; background: linear-gradient(#ffa21a, #ff4500); border-radius: 99px; padding: .08em .42em; box-shadow: 0 0 0 2px #2a1450, 0 0 10px rgba(255, 90, 0, .65); white-space: nowrap; }
.pod-1 .pf.has-b .av { box-shadow: none !important; }
/* On the podium the place medal sits on the right: the days go left, and a frame gets room above and below */
.pod .fx-days { right: auto; left: -16%; }
/* A framed champion: the crown stays centred over the player, resting on top of the frame */
.pod-face:has(.pf.has-b) .crown { top: calc(-22% - 50px); width: 80px; z-index: 4; }
.pod-1 .pod-face:has(.pf.has-b) { margin-top: clamp(62px, 8vw, 84px); }
/* The player's card: room for the frame's top and bottom ornaments */
.pcard .pf { margin: 42px 0 26px; }
.pod-face:has(.pf.has-b), .pod-face:has(.pf.on-fire) { margin-top: clamp(18px, 4vw, 34px); margin-bottom: clamp(18px, 3.4vw, 30px); }
.av-empty { display: inline-grid; place-items: center; width: 120px; height: 120px; color: var(--muted); font: 400 2.4rem var(--display); border: 3px dashed rgba(255, 255, 255, .25); background: none; }

.hall-totals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ht { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 10px; border-radius: var(--r); background: linear-gradient(160deg, #2c1a78, #1c0f4c); box-shadow: 0 0 0 3px var(--ink), var(--shadow); }
.ht-icon { font-size: 1.7rem; }
.ht b { font: 400 clamp(1.7rem, 3.4vw, 2.4rem) var(--display); color: #fff; text-shadow: var(--outline); }
.ht span:last-child { color: var(--muted); font-size: .92rem; font-weight: 600; }

/* The podium: second, first, third, rising from the floor */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: clamp(8px, 2vw, 22px); max-width: 820px; margin: 34px auto 0; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; outline-offset: 6px; }
.pod-face { position: relative; margin-bottom: 8px; }
.pod .av { width: clamp(78px, 13vw, 112px); height: clamp(78px, 13vw, 112px); border: 5px solid var(--silver); box-shadow: 0 0 0 4px var(--ink), 0 12px 30px rgba(0, 0, 0, .45); transition: transform .2s; }
.pod-1 .av { width: clamp(96px, 16vw, 140px); height: clamp(96px, 16vw, 140px); border-color: var(--gold); box-shadow: 0 0 0 4px var(--ink), 0 0 40px rgba(255, 201, 46, .7); }
.pod-3 .av { border-color: var(--bronze); }
.pod:hover .av, .pod:focus-visible .av { transform: translateY(-6px) scale(1.04); }
.crown { position: absolute; left: 50%; top: -44px; width: 76px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); animation: hallCrown 2.4s ease-in-out infinite; z-index: 2; }
@keyframes hallCrown { 50% { transform: translateX(-50%) rotate(8deg) translateY(-4px); } }
.pod-medal { position: absolute; right: -4px; bottom: -4px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 400 1.2rem var(--display); color: var(--ink); border: 3px solid var(--ink); }
.gold { background: linear-gradient(135deg, #fff3a6, var(--gold), var(--gold2)); }
.silver { background: linear-gradient(135deg, #fff, var(--silver), var(--silver2)); }
.bronze { background: linear-gradient(135deg, #ffe0c4, var(--bronze), var(--bronze2)); }
.pod h3 { font-size: clamp(1rem, 2.4vw, 1.4rem); margin: 4px 0 0; color: #fff; text-shadow: var(--outline); word-break: break-word; }
.pod-pts { margin: 0 0 10px; color: var(--muted); font-weight: 600; }
.pod-pts b { font: 400 1.5rem var(--display); color: var(--gold); text-shadow: var(--outline); }
.pod-block { width: 100%; border-radius: 18px 18px 0 0; display: grid; place-items: start center; padding-top: 12px; box-shadow: 0 0 0 4px var(--ink); position: relative; overflow: hidden; }
.pod-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); animation: hallSweep 4s ease-in-out infinite; }
.pod-block span { font: 400 clamp(2.4rem, 6vw, 3.6rem) var(--display); color: #fff; text-shadow: var(--outline); position: relative; z-index: 1; }
.pod-1 .pod-block { height: clamp(150px, 22vw, 200px); background: linear-gradient(180deg, var(--gold), var(--gold2)); }
.pod-2 .pod-block { height: clamp(110px, 16vw, 150px); background: linear-gradient(180deg, var(--silver), var(--silver2)); }
.pod-3 .pod-block { height: clamp(84px, 12vw, 116px); background: linear-gradient(180deg, var(--bronze), var(--bronze2)); }
.pod-empty { opacity: .45; cursor: default; }
@keyframes hallSweep { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.hall-none, .lb-none { text-align: center; color: var(--muted); font-weight: 600; padding: 20px; list-style: none; }

/* The ranking list */
.lb-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: rgba(18, 10, 53, .8); box-shadow: 0 0 0 3px var(--ink); }
.seg button, .lb-metrics button { border: 0; cursor: pointer; font: 400 1rem var(--display); letter-spacing: .3px; color: var(--muted); background: none; padding: 8px 16px; border-radius: 99px; transition: background .2s, color .2s, transform .15s; }
.seg button[aria-selected="true"] { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--ink); }
.lb-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-metrics button { font: 700 .92rem var(--body); background: rgba(255, 255, 255, .08); color: #fff; padding: 8px 14px; }
.lb-metrics button:hover, .seg button:hover { transform: translateY(-2px); }
.lb-metrics button[aria-selected="true"] { background: var(--violet); box-shadow: 0 0 0 2px var(--gold); }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lb-btn { width: 100%; display: grid; grid-template-columns: 46px 52px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 0; cursor: pointer; text-align: left; color: #fff; font: inherit;
  border-radius: 18px; background: linear-gradient(100deg, #2a1874, #1d1052); box-shadow: 0 0 0 3px var(--ink); transition: transform .18s, box-shadow .18s; }
.lb-btn:hover, .lb-btn:focus-visible { transform: translateY(-3px) scale(1.01); box-shadow: 0 0 0 3px var(--gold), 0 14px 30px -12px rgba(0, 0, 0, .6); }
.lb-row:nth-child(1) .lb-btn { background: linear-gradient(100deg, #6b4a00, #2a1874 45%); }
.lb-row:nth-child(2) .lb-btn { background: linear-gradient(100deg, #4b5563, #2a1874 45%); }
.lb-row:nth-child(3) .lb-btn { background: linear-gradient(100deg, #6b3410, #2a1874 45%); }
.lb-place { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 400 1.15rem var(--display); color: #fff; background: rgba(255, 255, 255, .1); border: 3px solid var(--ink); }
.lb-place.gold, .lb-place.silver, .lb-place.bronze { color: var(--ink); }
.lb .av { width: 52px; height: 52px; border: 3px solid rgba(255, 255, 255, .8); }
.lb-who { display: flex; flex-direction: column; min-width: 0; }
.lb-who b { font: 400 1.2rem var(--display); letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-who small { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6d62a0; display: inline-block; flex: none; }
.dot.on { background: var(--mint); box-shadow: 0 0 0 3px rgba(46, 230, 166, .25); }
.lb-mini { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lb-mini span { padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.lb-val { display: flex; flex-direction: column; align-items: flex-end; min-width: 84px; }
.lb-val b { font: 400 1.7rem var(--display); color: var(--gold); text-shadow: var(--outline); line-height: 1; }
.lb-val small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.lb-note { color: var(--muted); font-size: .9rem; margin-top: 12px; text-align: center; }

/* Champions of each kind of word */
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.champ { position: relative; overflow: hidden; padding: 16px; border-radius: var(--r); background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: 0 0 0 4px var(--ink), var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.champ-art { position: absolute; right: -10px; top: -8px; width: 84px; height: 84px; opacity: .9; transform: rotate(10deg); transition: transform .3s; }
.champ:hover .champ-art { transform: rotate(-4deg) scale(1.12); }
.champ h3 { font-size: 1.3rem; color: #fff; text-shadow: var(--outline); margin: 0 0 4px; }
.champ-who { display: flex; align-items: center; gap: 8px; background: rgba(18, 10, 53, .55); border-radius: 99px; padding: 4px 12px 4px 4px; width: fit-content; max-width: 100%; }
.champ-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-bar { height: 10px; border-radius: 99px; background: rgba(18, 10, 53, .45); overflow: hidden; }
.champ-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.champ small { color: #fff; font-weight: 700; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }

/* Records */
.records { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rec { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px; border-radius: var(--r); background: linear-gradient(160deg, #31207f, #1c0f4c); box-shadow: 0 0 0 3px var(--ink), var(--shadow); transition: transform .2s; }
.rec:hover { transform: translateY(-4px) rotate(-1deg); }
.rec-icon { font-size: 2rem; animation: hallFloat 3s ease-in-out infinite; }
.rec h3 { font-size: 1.05rem; color: var(--muted); margin: 0; }
.rec-val { font: 400 2.2rem var(--display); color: #fff; text-shadow: var(--outline); }
.rec-who { display: flex; align-items: center; gap: 6px; font-weight: 700; }

/* Worlds */
.hall-worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hw { position: relative; padding: 16px; border-radius: var(--r); min-height: 120px; box-shadow: 0 0 0 3px var(--ink); }
.hw-live { grid-column: span 2; grid-row: span 2; background: linear-gradient(150deg, #ffb36b, #7a3df0); }
.hw-locked { background: repeating-linear-gradient(135deg, #1d1450 0 12px, #20165a 12px 24px); color: var(--muted); display: flex; flex-direction: column; justify-content: flex-end; }
.hw-n { position: absolute; top: 12px; right: 14px; font: 400 2rem var(--display); color: rgba(255, 255, 255, .35); }
.hw-lock { font-size: 1.6rem; filter: grayscale(.3); }
.hw h3 { font-size: 1.2rem; margin: 0; }
.hw-live h3 { font-size: 1.8rem; color: #fff; text-shadow: var(--outline); margin-bottom: 10px; }
.hw-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-top li { display: grid; grid-template-columns: 34px 30px 1fr auto; gap: 8px; align-items: center; background: rgba(18, 10, 53, .55); padding: 6px 12px 6px 6px; border-radius: 99px; }
.hw-top .lb-place { width: 30px; height: 30px; font-size: .95rem; border-width: 2px; }
.hw-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-top small { color: var(--gold); font-weight: 700; }

/* Seasons and prizes */
.seasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.season-now, .season-past, .prizes { padding: 20px; border-radius: var(--r); box-shadow: 0 0 0 3px var(--ink), var(--shadow); }
.season-now { background: linear-gradient(150deg, #5b2ee0, #2a1874); }
.season-past { background: linear-gradient(150deg, #2c1a78, #1c0f4c); }
.season-wait { border: 2px dashed rgba(255, 255, 255, .2); box-shadow: none; }
.season-now h3, .season-past h3 { color: #fff; margin: 4px 0 6px; }
.prizes { background: linear-gradient(150deg, #ff9d1f, #e0173f); text-align: center; color: #fff; }
.prizes h3 { color: #fff; text-shadow: var(--outline); }
.prizes-icon { font-size: 2.6rem; display: inline-block; animation: hallGift 1.8s ease-in-out infinite; }
@keyframes hallGift { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 50% { transform: rotate(10deg); } }
.hall-cta { text-align: center; }
.hall-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--gold); text-shadow: var(--outline); }
.hall-empty { text-align: center; }

/* A player's card */
.pcard { border: 0; padding: 0; background: none; color: #fff; width: min(440px, 94vw); max-height: 92vh; overflow: visible; }
.pcard::backdrop { background: rgba(12, 6, 40, .78); backdrop-filter: blur(4px); }
.pcard-in { position: relative; border-radius: 28px; padding: 26px 22px 22px; background: linear-gradient(165deg, #5b2ee0, #24125f 60%); box-shadow: 0 0 0 5px var(--ink), 0 0 0 9px var(--gold), 0 30px 80px rgba(0, 0, 0, .6); text-align: center; max-height: min(88vh, 88dvh); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.pcard-close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: var(--coral); color: #fff; font: 400 1.2rem var(--display); cursor: pointer; }
.pcard .av { width: 112px; height: 112px; border: 5px solid var(--gold); box-shadow: 0 0 0 4px var(--ink); }
.pcard h2 { margin: 8px 0 0; font-size: 1.9rem; color: #fff; text-shadow: var(--outline); word-break: break-word; }
.pcard-place { color: var(--gold); font-weight: 700; }
.pcard-pts { font: 400 2.6rem var(--display); color: var(--gold); text-shadow: var(--outline); line-height: 1.1; margin-top: 4px; }
.pcard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.pcard-grid div { background: rgba(18, 10, 53, .55); border-radius: 14px; padding: 8px 4px; }
.pcard-grid b { display: block; font: 400 1.3rem var(--display); }
.pcard-grid span { font-size: .75rem; color: var(--muted); font-weight: 700; }
.pcard-cats { display: grid; gap: 6px; text-align: left; }
.pcard-cats h3 { font-size: 1rem; color: var(--muted); margin: 6px 0 2px; }
.pcard-cat { display: grid; grid-template-columns: 92px 1fr 32px; gap: 8px; align-items: center; font-size: .88rem; font-weight: 700; }
.pcard-cat i { display: block; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pcard-cat i b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.pcard-last { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }

@media (max-width: 860px) {
  .hall-totals { grid-template-columns: repeat(3, 1fr); }
  .records, .hall-worlds { grid-template-columns: repeat(2, 1fr); }
  .seasons { grid-template-columns: 1fr; }
  .lb-btn { grid-template-columns: 40px 46px minmax(0, 1fr) auto; }
  .lb-mini { display: none; }
  .lb .av { width: 46px; height: 46px; }
}
@media (max-width: 560px) {
  .hall-totals { grid-template-columns: repeat(2, 1fr); }
  .hall-totals .ht:last-child { grid-column: span 2; }
  .lb-btn { gap: 10px; padding-right: 12px; }
  .lb-val b { font-size: 1.35rem; }
  .lb-val { min-width: 64px; }
  .pcard-grid { grid-template-columns: repeat(2, 1fr); }
  .hw-live { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .hall-trophy, .trophy-shine, .hall-live i, .hall-sparks i, .crown, .pod-block::after, .rec-icon, .prizes-icon { animation: none !important; }
}
