/* Tony Star World — site styles. Sunset-reef palette, rounded friendly type, generous space. No framework. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/fonts/fredoka-latin.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/fonts/nunito-latin.woff2) format('woff2'); }

:root {
  --ink: #0d0b22; --ink-2: #15113a; --ink-3: #201a4f; --ink-4: #2c2467;
  --cream: #fff5e4; --sand: #ffe6c4; --mute: #c9bfe6; --mute-2: #9a8fc4;
  --gold: #ffc857; --gold-2: #f6a623; --coral: #ff7a8f; --pink: #ff9fb2; --teal: #3ee0cf; --violet: #8d7bff;
  --line: rgba(var(--tint), .14); --glass: rgba(21, 17, 58, .62);
  --r-lg: 28px; --r-md: 18px; --r-sm: 12px;
  --shadow: 0 24px 60px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k)));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: min(1200px, calc(100% - 40px));
  /* theme tokens (the default is "night"; see the [data-theme] blocks at the end) */
  --accent: var(--gold); --teal-t: var(--teal); --violet-t: #c3b8ff; --btn-fg: #0d0b22; --tint: 255, 245, 228; --ink-rgb: 13, 11, 34; --shadow-rgb: 4, 2, 20; --shadow-k: 1; --footer-bg: #07051a;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0 0 .4em; letter-spacing: .005em; text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, backdrop-filter .3s, box-shadow .3s; }
.hdr.solid, .hdr.open { background: rgba(var(--ink-rgb), .78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.hdr-in { width: var(--wrap); margin-inline: auto; display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .01em; }
.brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(255, 122, 143, .45)); }
.brand b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .98rem; color: var(--sand); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { background: rgba(var(--tint), .1); color: var(--cream); }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--tint), .06); align-items: center; justify-content: center; }
.hdr .btn-play { margin-left: 8px; }

/* ---------- buttons, chips ---------- */
.btn { --bg: var(--gold); --fg: var(--btn-fg); display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; background: var(--bg); color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 1.05rem; border: 0; box-shadow: 0 10px 28px rgba(246, 166, 35, .28), inset 0 -3px 0 rgba(0, 0, 0, .14); transition: transform .25s var(--ease), box-shadow .25s, filter .2s; }
.btn:hover { transform: translateY(-3px); filter: brightness(1.06); box-shadow: 0 16px 34px rgba(246, 166, 35, .38), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.sm { padding: 9px 18px; font-size: .95rem; }
.btn.ghost { --bg: rgba(var(--tint), .08); --fg: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { --bg: rgba(var(--tint), .16); box-shadow: inset 0 0 0 1.5px rgba(var(--tint), .3); }
.btn.tg { --bg: #2aa7e6; --fg: #fff; box-shadow: 0 10px 28px rgba(42, 167, 230, .3), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(var(--tint), .1); color: var(--sand); border: 1px solid var(--line); }
.chip.live { background: rgba(62, 224, 207, .16); color: var(--teal-t); border-color: rgba(62, 224, 207, .35); }
.chip.soon { background: rgba(255, 200, 87, .14); color: var(--accent); border-color: rgba(255, 200, 87, .35); }
.chip.lab { background: rgba(141, 123, 255, .16); color: var(--violet-t); border-color: rgba(141, 123, 255, .4); }
.chip.preview { background: rgba(255, 122, 143, .14); color: var(--pink); border-color: rgba(255, 122, 143, .35); }
.kicker { font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .86rem; color: var(--accent); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ''; width: 28px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--coral), var(--gold)); }

/* ---------- hero: the whole illustration is always visible (no crop, nothing on top of it) ---------- */
.hero { position: relative; isolation: isolate; padding-top: 72px; }
.hero-art { position: relative; background: var(--ink); overflow: hidden; }
.hero-art::before { content: ''; position: absolute; inset: -40px; background: var(--hero) center / cover; filter: blur(46px) saturate(1.3) brightness(.55); }
.hero-art picture, .hero-art img { display: block; }
.hero-art img { position: relative; width: min(100%, calc((100vh - 72px) * 1.7766)); aspect-ratio: 1672 / 941; height: auto; margin-inline: auto; }
#fireflies { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; opacity: .8; }
.hero .kicker::before { display: none; }
.hero-body { padding: 54px 0 72px; text-align: center; position: relative; }
.hero h1.big { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: .25em; text-shadow: 0 6px 40px rgba(var(--ink-rgb), .7); }
.hero h1.big em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 680px; margin: 0 auto 30px; font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--sand); text-shadow: 0 2px 18px rgba(var(--ink-rgb), .85); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stats { display: flex; gap: clamp(18px, 5vw, 56px); justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--accent); }
.stat span { font-weight: 700; color: var(--sand); font-size: .92rem; letter-spacing: .05em; text-transform: uppercase; }
.scroll-hint { display: none; position: absolute; left: 50%; bottom: 18px; width: 26px; height: 42px; border: 2px solid rgba(var(--tint), .5); border-radius: 14px; transform: translateX(-50%); }
.scroll-hint::after { content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 3px; background: var(--cream); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- sections ---------- */
.sec { padding: clamp(72px, 10vw, 136px) 0; position: relative; }
.sec.alt { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 12%, var(--ink-2) 88%, var(--ink) 100%); }
.sec-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head.center { text-align: center; margin-inline: auto; }
.sec-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.sec-head p { color: var(--mute); font-size: 1.12rem; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; } .reveal[data-d="2"] { transition-delay: .16s; } .reveal[data-d="3"] { transition-delay: .24s; } .reveal[data-d="4"] { transition-delay: .32s; }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { position: relative; padding: 34px 30px 30px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), border-color .3s; }
.pillar:hover { transform: translateY(-6px); border-color: rgba(255, 200, 87, .45); }
.pillar::before { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 143, .3), transparent 65%); }
.pillar .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 20px; background: linear-gradient(140deg, var(--gold), var(--coral)); color: var(--btn-fg); }
.pillar .ico svg { width: 30px; height: 30px; }
.pillar h3 { font-size: 1.6rem; }
.pillar p { color: var(--mute); }
.pillar .more { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--accent); margin-top: 6px; }
.pillar .more svg { transition: transform .25s; } .pillar:hover .more svg { transform: translateX(5px); }

/* game cards */
.rail { position: relative; }
.rail-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px max(20px, calc((100vw - 1200px) / 2)) 28px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: max(20px, calc((100vw - 1200px) / 2)); }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track.auto { overflow: hidden; scroll-snap-type: none; }
.rail-slide { display: flex; gap: 22px; width: max-content; animation: rail-run linear infinite; will-change: transform; }
@keyframes rail-run { to { transform: translateX(calc(var(--loop, 0px) * -1)); } }
.rail-btns { display: flex; gap: 10px; }
.rail-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(var(--tint), .06); display: grid; place-items: center; transition: background .2s, transform .2s; }
.rail-btn:hover { background: rgba(var(--tint), .16); transform: scale(1.06); }
.rail-btn[disabled] { opacity: .35; pointer-events: none; }
.sec-top { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.gcard { --accent: #ff967b; flex: none; width: 272px; scroll-snap-align: start; display: block; border-radius: var(--r-lg); background: linear-gradient(170deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); overflow: hidden; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; position: relative; }
.gcard:hover { transform: translateY(-8px) rotate(-.4deg); border-color: color-mix(in srgb, var(--accent) 70%, white 0%); box-shadow: 0 26px 50px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k))), 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.gcard .poster { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--accent) 55%, var(--ink-3)), var(--ink-2) 70%); }
.gcard .poster .phone { width: 58%; aspect-ratio: 9 / 16; border-radius: 22px; border: 5px solid #0b0920; box-shadow: 0 18px 36px rgba(var(--shadow-rgb), calc(.6 * var(--shadow-k))), 0 0 0 1px rgba(var(--tint), .15); overflow: hidden; background: #000; transform: translateY(8%); transition: transform .5s var(--ease); }
.gcard .poster .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gcard:hover .cover { transform: scale(1.05); }
.gcard:hover .phone { transform: translateY(2%) scale(1.04); }
.gcard .phone img { width: 100%; height: 100%; object-fit: cover; }
.gcard .chip { position: absolute; left: 14px; top: 14px; backdrop-filter: blur(8px); z-index: 2; }
.gcard .meta { padding: 18px 20px 22px; }
.gcard h3 { font-size: 1.3rem; margin-bottom: 4px; }
.gcard .tag { color: var(--accent); font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.gcard .gen { color: var(--mute); font-size: .95rem; margin: 0; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 22px; }
.ggrid .gcard { width: auto; }

/* regions */
.regions { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.region { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 340px; display: flex; align-items: end; isolation: isolate; border: 1px solid var(--line); }
.region:nth-child(1) { grid-column: span 7; } .region:nth-child(2) { grid-column: span 5; } .region:nth-child(3) { grid-column: span 5; } .region:nth-child(4) { grid-column: span 7; } .region:nth-child(5), .region:nth-child(6) { grid-column: span 6; min-height: 240px; }
.region img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.region:hover img { transform: scale(1.07); }
.region::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 6, 24, 0) 20%, rgba(8, 6, 24, .86) 100%); }
.region { color: #fff5e4; } .region .mood { color: #ffc857; } .band { color: #fff5e4; }
.region.dark { background: radial-gradient(90% 100% at 80% 0%, var(--ink-4), var(--ink-2)); }
.region.dark::before { content: '?'; position: absolute; right: 28px; top: 8px; font-family: var(--display); font-size: 9rem; line-height: 1; color: rgba(var(--tint), .07); z-index: -1; }
.region .in { padding: 28px; }
.region .mood { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.region h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 4px 0 8px; }
.region p { color: #efe5ff; max-width: 52ch; margin: 0; font-size: 1rem; }

/* crew */
.crew-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.ccard { --c: #ff8aa0; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 16px 22px; border-radius: var(--r-lg); background: linear-gradient(170deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); overflow: hidden; transition: transform .4s var(--ease), border-color .3s; }
.ccard::before { content: ''; position: absolute; left: 50%; top: 30px; width: 170px; height: 170px; margin-left: -85px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 60%, transparent), transparent 68%); transition: transform .5s var(--ease); }
.ccard:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.ccard:hover::before { transform: scale(1.25); }
.ccard img { position: relative; width: 150px; height: 150px; object-fit: contain; margin: 0 auto 14px; filter: drop-shadow(0 12px 18px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k)))); transition: transform .5s var(--ease); }
.ccard:hover img { transform: translateY(-6px) rotate(-3deg) scale(1.06); }
.cstk { position: relative; display: block; width: 150px; height: 150px; margin: 0 auto 14px; filter: drop-shadow(0 12px 18px rgba(var(--shadow-rgb), calc(.5 * var(--shadow-k)))); transition: transform .5s var(--ease); }
.cstk > img, .cstk > svg { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; filter: none !important; object-fit: contain; animation: none !important; transform: none !important; }
.cstk > img.hide { visibility: hidden; }
.cstk.still { animation: bob 3.2s ease-in-out infinite; }
.ccard:hover .cstk { transform: translateY(-6px) rotate(-3deg) scale(1.06); }
.cd-art .cstk { width: 82%; height: auto; aspect-ratio: 1; margin: 0; filter: drop-shadow(0 24px 30px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k)))); }
.ccard h3 { font-size: 1.3rem; margin-bottom: 2px; }
.ccard .role { color: var(--c); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.ccard .tick { display: inline-block; margin-top: 10px; font-weight: 800; color: var(--cream); background: rgba(var(--tint), .1); border-radius: 999px; padding: 3px 12px; font-size: .84rem; }

/* timeline */
.tl { position: relative; display: grid; gap: 28px; max-width: 880px; margin-inline: auto; padding-left: 36px; }
.tl::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--coral), var(--gold), var(--teal)); }
.tl-item { position: relative; padding: 24px 28px; border-radius: var(--r-md); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); }
.tl-item::before { content: ''; position: absolute; left: -35px; top: 30px; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--ink-2), 0 0 24px rgba(255, 200, 87, .6); }
.tl-item .when { font-family: var(--display); color: var(--accent); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.tl-item h3 { font-size: 1.45rem; margin: 4px 0 8px; }
.tl-item p { color: var(--mute); margin: 0 0 8px; }
.tl-item .src { font-size: .88rem; font-weight: 800; color: var(--teal-t); }
.tl-item .src:hover { text-decoration: underline; }
.credit-box { margin: 44px auto 0; max-width: 880px; padding: 24px 28px; border-radius: var(--r-md); border: 1.5px dashed rgba(255, 200, 87, .45); color: var(--sand); background: rgba(255, 200, 87, .05); }
.credit-box b { color: var(--accent); }

/* roadmap */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: r; }
.road-item { padding: 26px 22px; border-radius: var(--r-md); background: linear-gradient(170deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); position: relative; }
.road-item .st { display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--btn-fg); background: var(--gold); border-radius: 999px; padding: 3px 12px; margin-bottom: 14px; }
.road-item:nth-child(2) .st { background: var(--pink); } .road-item:nth-child(3) .st { background: var(--violet); color: #fff; } .road-item:nth-child(4) .st { background: var(--teal); }
.road-item h3 { font-size: 1.25rem; } .road-item p { color: var(--mute); margin: 0; font-size: .98rem; }

/* community band */
.band { position: relative; border-radius: 36px; padding: clamp(32px, 6vw, 64px); background: linear-gradient(135deg, #3a2386, #b04b8f 55%, #ff9a6b); overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; gap: 36px; align-items: center; box-shadow: var(--shadow); }
.band::before { content: '★'; position: absolute; right: -40px; top: -80px; font-size: 20rem; color: rgba(255, 255, 255, .07); line-height: 1; }
.band h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.band p { color: #fff0e0; font-size: 1.12rem; }
.band .qr { background: #fff; border-radius: 24px; padding: 16px; width: min(240px, 100%); margin-inline: auto; box-shadow: 0 20px 40px rgba(var(--ink-rgb), .4); transform: rotate(3deg); }
.band .qr img { width: 100%; image-rendering: pixelated; }
.band .qr small { display: block; text-align: center; color: #333; font-weight: 800; margin-top: 8px; font-size: .85rem; }
.links3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lcard { padding: 28px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; display: block; }
.lcard:hover { transform: translateY(-6px); border-color: rgba(255, 200, 87, .5); }
.lcard h3 { font-size: 1.35rem; } .lcard p { color: var(--mute); } .lcard .lbl { font-weight: 800; color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }

/* page header (inner pages) */
.phead { position: relative; padding: 150px 0 60px; isolation: isolate; overflow: hidden; }
.phead::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 120% at 15% 0%, rgba(255, 122, 143, .22), transparent 60%), radial-gradient(70% 90% at 90% 10%, rgba(141, 123, 255, .26), transparent 60%), linear-gradient(180deg, var(--ink-2), var(--ink)); }
.phead h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: .2em; }
.phead p.lead { max-width: 680px; color: var(--mute); font-size: 1.2rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; font-weight: 700; color: var(--mute-2); margin-bottom: 20px; }
.crumbs a:hover { color: var(--accent); } .crumbs span::before { content: '/'; margin-right: 8px; opacity: .5; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 30px; }
.fchip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--tint), .05); font-weight: 800; font-size: .95rem; transition: background .2s, color .2s, border-color .2s; }
.fchip:hover { background: rgba(var(--tint), .12); }
.fchip[aria-pressed="true"] { background: var(--gold); color: var(--btn-fg); border-color: var(--accent); }
.search { margin-left: auto; position: relative; }
.search input { width: min(280px, 100%); padding: 10px 16px 10px 42px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--tint), .06); color: var(--cream); font: inherit; }
.search input::placeholder { color: var(--mute-2); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute-2); }
.empty { display: none; text-align: center; padding: 60px 0; color: var(--mute); }

/* game detail */
.gd { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.gd-stage { position: sticky; top: 110px; display: grid; place-items: center; padding: 40px 24px; border-radius: 36px; background: radial-gradient(110% 80% at 50% 10%, color-mix(in srgb, var(--accent, #ff967b) 60%, var(--ink-3)), var(--ink-2) 72%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gd-stage .phone { width: min(260px, 100%); aspect-ratio: 9 / 16; border-radius: 34px; border: 8px solid #0b0920; box-shadow: 0 28px 60px rgba(var(--shadow-rgb), calc(.65 * var(--shadow-k))), 0 0 0 1.5px rgba(var(--tint), .2); overflow: hidden; background: #000; }
.gd-stage .phone img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 26px 0; }
.fact { padding: 14px 18px; border-radius: var(--r-sm); background: rgba(var(--tint), .06); border: 1px solid var(--line); }
.fact small { display: block; color: var(--mute-2); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; }
.fact b { font-family: var(--display); font-weight: 500; font-size: 1.08rem; }
.steps { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 16px; align-items: start; padding: 16px 20px; border-radius: var(--r-sm); background: rgba(var(--tint), .05); border: 1px solid var(--line); }
.steps li::before { content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--gold); color: var(--btn-fg); }
.gd h2 { font-size: 1.6rem; margin-top: 8px; }
.hero-chip { display: inline-flex; gap: 12px; align-items: center; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--tint), .06); font-weight: 800; }
.hero-chip img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: rgba(var(--tint), .1); }
.notice { padding: 16px 20px; border-radius: var(--r-sm); border: 1px solid rgba(255, 200, 87, .4); background: rgba(255, 200, 87, .08); color: var(--sand); font-size: .98rem; }

/* crew detail + coin */
.cd { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.cd-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.cd-art::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c, #ff8aa0) 55%, transparent), transparent 68%); }
.cd-art img { position: relative; width: 82%; filter: drop-shadow(0 24px 30px rgba(var(--shadow-rgb), calc(.55 * var(--shadow-k)))); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
.coin { margin-top: 30px; padding: 26px 28px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); }
.coin h3 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.coin .ca { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px; background: rgba(var(--tint), .08); border: 1px solid var(--line); margin: 14px 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86rem; word-break: break-all; }
.coin .ca code { flex: 1; }
.copy { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 10px; background: var(--gold); color: var(--btn-fg); font-weight: 800; border: 0; font-size: .85rem; }
.copy.done { background: var(--teal); }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--tint), .06); font-weight: 800; font-size: .92rem; transition: background .2s, border-color .2s; }
.pill:hover { background: rgba(var(--tint), .14); border-color: rgba(255, 200, 87, .5); }
.fine { font-size: .9rem; color: var(--mute-2); margin: 16px 0 0; }
.coins-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.coins-grid .coin { margin: 0; }

/* faq */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: var(--r-md); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); overflow: hidden; }
.faq summary { padding: 20px 56px 20px 24px; font-family: var(--display); font-weight: 500; font-size: 1.15rem; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--accent); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--mute); }
.prose { max-width: 760px; margin-inline: auto; color: var(--sand); }
.prose h2 { font-size: 1.7rem; margin-top: 2em; } .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 20px 0 30px; }
.sw { border-radius: var(--r-sm); padding: 40px 14px 12px; font-weight: 800; font-size: .85rem; border: 1px solid var(--line); }
.copyline { padding: 18px 22px; border-radius: var(--r-md); background: rgba(var(--tint), .08); border: 1px solid var(--line); margin-bottom: 14px; display: flex; gap: 16px; align-items: start; justify-content: space-between; }

/* footer */
.ftr { --cream: #fff5e4; --sand: #ffe6c4; --mute: #c9bfe6; --mute-2: #9a8fc4; --accent: #ffc857; --tint: 255, 245, 228; --line: rgba(255, 245, 228, .14); color: #fff5e4; margin-top: 40px; padding: 70px 0 40px; background: linear-gradient(180deg, var(--ink) 0%, var(--footer-bg) 100%); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 4px; }
.facts div { padding: 10px 12px; border-radius: 12px; background: rgba(var(--tint), .06); border: 1px solid var(--line); }
.facts dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 800; }
.facts dd { margin: 2px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.ftr-banner { margin: 0 0 44px; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .35); background: #ffd23f; }
.ftr-banner video { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 416; object-fit: cover; }
.ftr-banner figcaption { padding: 8px 14px; font-size: .8rem; font-weight: 700; color: #5a3a00; background: #ffd23f; }
.ftr-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
.ftr h4 { font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .ftr a { color: var(--mute); } .ftr a:hover { color: var(--cream); }
.ftr .about { color: var(--mute); font-size: .98rem; max-width: 34ch; }
.legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--mute-2); display: grid; gap: 8px; }

/* motion + responsive */
@media (max-width: 980px) {
  .pillars, .links3, .road, .coins-grid { grid-template-columns: 1fr 1fr; }
  .gd, .cd, .band { grid-template-columns: 1fr; }
  .gd-stage { position: static; }
  .regions { grid-template-columns: 1fr 1fr; } .region:nth-child(n) { grid-column: span 1; min-height: 300px; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; padding: 14px 20px 26px; gap: 4px; background: rgba(var(--ink-rgb), .96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .4s var(--ease); margin: 0; }
  .nav a { padding: 14px 16px; font-size: 1.1rem; } .hdr.open .nav { transform: none; }
  .burger { display: inline-flex; } .hdr .btn-play { display: none; }
  .nav .btn-play { display: inline-flex; justify-content: center; margin-top: 8px; }
  .pillars, .links3, .road, .coins-grid, .regions, .facts, .ftr-grid { grid-template-columns: 1fr; }
  .hero-art img { width: 100%; aspect-ratio: 1080 / 1350; }
  .hero-body { padding: 36px 0 56px; }
  .region:nth-child(n) { min-height: 260px; }
  .search { margin-left: 0; width: 100%; } .search input { width: 100%; }
  .gcard { width: 244px; } .copyline { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; } 
}

/* ---------- themes: night (default tokens above), sunny (light, warm), lagoon (the underwater blues of the arcade) ---------- */
:root[data-theme="sunny"] {
  --ink: #fff6e6; --ink-2: #ffeccb; --ink-3: #ffffff; --ink-4: #ffe0b4;
  --cream: #2b1747; --sand: #4b3566; --mute: #6b5788; --mute-2: #8a79a8;
  --gold: #ffb52e; --accent: #c4560b; --coral: #ff5f7e; --pink: #ff8fa8; --teal: #14b8a6; --teal-t: #0b8479; --violet: #7a5cff; --violet-t: #5b3fd6;
  --btn-fg: #2b1747; --tint: 43, 23, 71; --ink-rgb: 255, 246, 230; --shadow-rgb: 90, 50, 20; --shadow-k: .32; --footer-bg: #2b1747;
  --line: rgba(43, 23, 71, .14); --glass: rgba(255, 246, 230, .78);
}
:root[data-theme="sunny"] .hero-art::before { filter: blur(46px) saturate(1.25) brightness(1.02); }
:root[data-theme="sunny"] .hdr.solid, :root[data-theme="sunny"] .hdr.open { background: rgba(255, 246, 230, .86); }
:root[data-theme="sunny"] .nav { background: transparent; }
:root[data-theme="sunny"] .sec.alt { background: linear-gradient(180deg, var(--ink) 0%, #ffe9c9 14%, #ffdfb6 86%, var(--ink) 100%); }
:root[data-theme="sunny"] .pillar, :root[data-theme="sunny"] .gcard, :root[data-theme="sunny"] .ccard, :root[data-theme="sunny"] .tl-item, :root[data-theme="sunny"] .road-item, :root[data-theme="sunny"] .lcard, :root[data-theme="sunny"] .coin, :root[data-theme="sunny"] .faq details { box-shadow: 0 10px 28px rgba(90, 50, 20, .10); }
:root[data-theme="lagoon"] {
  --ink: #08293b; --ink-2: #0b3a52; --ink-3: #12587a; --ink-4: #1b6f96;
  --gold: #ffd166; --coral: #ff7a7a; --pink: #ff9eb0; --teal: #5eead4; --violet: #a78bfa;
  --ink-rgb: 8, 41, 59; --shadow-rgb: 2, 14, 24; --footer-bg: #041a27;
}
/* animated stickers (Lottie) */
.stk { width: clamp(120px, 22vw, 190px); aspect-ratio: 1; }
.stk.center { margin: 0 auto 12px; }
.stk.host { width: 130px; margin: -10px 0 4px -8px; }
.stk.side { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: clamp(110px, 18vw, 170px); }
.phead .wrap { position: relative; }
@media (max-width: 700px) { .stk.side { display: none; } }
/* bubbles: a fixed layer of rising rings; the markup is created by site.js */
.bubbles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bubbles i { position: absolute; bottom: -60px; border-radius: 50%; border: 1.5px solid rgba(190, 240, 255, .55); background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .55) 0 12%, rgba(190, 240, 255, .12) 45%, rgba(190, 240, 255, .04) 100%); animation: bubble-rise linear infinite; will-change: transform; }
@keyframes bubble-rise { 0% { transform: translate3d(0, 0, 0) scale(.8); opacity: 0; } 8% { opacity: .9; } 50% { transform: translate3d(var(--sway), -55vh, 0) scale(1); } 92% { opacity: .8; } 100% { transform: translate3d(calc(var(--sway) * -1), -112vh, 0) scale(1.1); opacity: 0; } }
:root:not([data-theme="lagoon"]):not([data-theme="x"]) .bubbles { display: none; }
/* everything that carries content sits above the bubbles; only the section backgrounds stay beneath them */
.hero, .phead, .sec > *, .ftr > * { position: relative; z-index: 1; }

/* X: the Reef Plaza look from Codex's delivery 131. This block is X's palette (walnut and sea black). The wooden sign menu below is used by every style,
   because it is the site's navigation; :not(#w) only raises specificity above the per-theme header rules. */
:root[data-theme="x"] {
  --ink: #0e2429; --ink-2: #142f33; --ink-3: #1c4044; --ink-4: #255356;
  --gold: #efd399; --coral: #d98f5a; --pink: #e8b98d; --teal: #8fd0c0; --violet: #c9a869;
  --ink-rgb: 14, 36, 41; --shadow-rgb: 2, 10, 12; --footer-bg: #09181a;
}
:root:not(#w) .hdr { background: linear-gradient(#101e20f8, #172c2deb); box-shadow: 0 5px 20px #0006; border-bottom: 1px solid #bb8a4640; backdrop-filter: none; }
:root:not(#w) .brand { font-family: Georgia, 'Times New Roman', serif; color: #efd399; white-space: nowrap; font-size: 1.2rem; }
:root:not(#w) .hdr-in { gap: 14px; }
:root:not(#w) .nav { gap: 2px; }
:root:not(#w) .brand b { color: #efd399; }
:root:not(#w) .nav a:not(.btn), :root:not(#w) .burger {
  background: url(/img/sign/wood.webp) center / 100% 100% no-repeat; border: 0; border-radius: 0; min-width: 104px; height: 52px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center;
  color: #eed7ad; font: 700 1rem Georgia, 'Times New Roman', serif; text-shadow: 0 2px 1px #000, 0 -1px 0 #ae7d4e; white-space: nowrap; transition: filter .2s, transform .2s;
}
:root:not(#w) .nav a:not(.btn):hover, :root:not(#w) .nav a[aria-current], :root:not(#w) .burger:hover { background-image: url(/img/sign/wood-active.webp); background-color: transparent; color: #eed7ad; filter: brightness(1.08); }
:root:not(#w) .burger { display: none; }
:root:not(#w) .nav a:not(.btn):active { transform: translateY(1px); }
:root:not(#w) .hdr .btn-play, :root:not(#w) .nav .btn-play {
  background: url(/img/sign/marquee.webp) center / 100% 100% no-repeat; box-shadow: none; border: 0; border-radius: 0; min-width: 190px; height: 54px; padding: 10px 22px; white-space: nowrap;
  color: #fff0c6; font: 700 .95rem Georgia, 'Times New Roman', serif; text-shadow: 0 0 8px #e9aa43, 0 2px 1px #312013; transform: none;
}
:root:not(#w) .hdr .btn-play:hover { filter: brightness(1.15); transform: none; }
:root:not(#w) .burger svg { color: #eed7ad; }
:root:not(#w) :focus-visible { outline: 3px solid #f4d18c; outline-offset: 4px; border-radius: 7px; }
@media (max-width: 1100px) { :root:not(#w) .nav a:not(.btn) { min-width: 100px; padding: 12px 14px; font-size: 1rem; } :root:not(#w) .hdr .btn-play { min-width: 180px; } }
@media (max-width: 760px) {
  :root:not(#w) .burger { display: inline-flex; }
  :root:not(#w) .nav { background: #142a2cf5; backdrop-filter: none; border-bottom: 1px solid #a57b45; box-shadow: 0 18px 30px #0005; }
  :root:not(#w) .nav a:not(.btn) { width: 100%; height: 60px; font-size: 1.3rem; }
  :root:not(#w) .nav .btn-play { width: 100%; }
  :root:not(#w) .burger { min-width: 100px; height: 46px; }
}
/* theme picker: shown with ?pick=1 only */
.theme-pick { position: fixed; z-index: 90; left: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.theme-pick .tp-fab { border: 0; border-radius: 999px; padding: 10px 16px; font: 800 .88rem var(--body); color: #fff; background: rgba(0, 0, 0, .72); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); cursor: pointer; }
.theme-pick .tp-opts { display: none; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(0, 0, 0, .78); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.theme-pick.open .tp-opts { display: flex; }
.theme-pick button[role="radio"] { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 .85rem var(--body); color: #fff; background: transparent; cursor: pointer; }
.theme-pick button[aria-checked="true"] { background: #ffc857; color: #1a0d2a; }
