:root {
  --sky-1: #45B3F4; --sky-2: #8CD5FF; --sky-3: #DDF4FF;
  --text-sky: #164A78; --navy: #0C2F6B;
  --cream: #FFF6E0; --brown: #7A4A14; --text-cream: #4A2A0A; --text-cream-2: #7A5530;
  --gold: #F2A516; --gold-lip: #B8650A; --gold-line: #6B3A08;
  --blue: #1E8FE3; --green: #177A2E;
  --skyg: linear-gradient(180deg, var(--sky-1), var(--sky-2) 55%, var(--sky-3));
  --font-head: "Coiny", system-ui, sans-serif;
  --font-body: "M PLUS Rounded 1c", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--sky-3); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: clip; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 55%, var(--sky-3));
  background-attachment: fixed;
  color: var(--text-sky); font: 500 18px/1.5 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; }
header, main, footer { position: relative; z-index: 1; }
h1, h2, h3, .tagline { text-wrap: balance; }

h1, h2 {
  font-family: var(--font-head); font-weight: 400; color: #fff; margin: 0;
  -webkit-text-stroke: 2px var(--navy); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--navy);
}
h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.1; }
h2 { font-size: clamp(28px, 5vw, 40px); text-align: center; margin-bottom: 24px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 24px var(--font-head); color: #fff; text-shadow: 0 3px 0 var(--navy); }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brown); }

.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font: 400 22px/1 var(--font-head); color: #fff; -webkit-text-stroke: 1px var(--gold-line); paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--gold-line);
  background: linear-gradient(#ffffff55, transparent 55%), var(--gold); border: 3px solid var(--gold-line); border-radius: 999px;
  padding: 16px 28px; box-shadow: 0 6px 0 var(--gold-lip);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-lip); }
.btn-blue { background: linear-gradient(#ffffff40, transparent 55%), var(--blue); border-color: var(--navy); box-shadow: 0 4px 0 var(--navy); font-size: 17px; padding: 10px 18px; -webkit-text-stroke: 0; text-shadow: 0 2px 0 var(--navy); }
.btn-blue:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }

.hero { display: flex; align-items: center; min-height: max(640px, min(88vh, 900px)); padding-top: 24px; padding-bottom: 56px; }
.hero-text { transform: translate(var(--ptx, 0px), var(--pty, 0px)); position: relative; z-index: 2; flex: 0 1 42%; max-width: 440px; pointer-events: none; transition: opacity .4s, translate .4s; }
.hero-text a, .hero-text button { pointer-events: auto; } /* the rest lets clicks through to the full-bleed canvas behind */
.hero p { margin: 0; }
.hero .since { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 3px 12px 4px; background: var(--cream); border: 2px solid var(--brown); border-radius: 999px; color: var(--text-cream); font: 400 16px/1.2 var(--font-head); }
.since svg { flex: none; }
.hero h1 { font-size: clamp(36px, 4.6vw, 52px); text-wrap: wrap; }
.hero h1 span { white-space: nowrap; }
.tagline { font-size: 22px; font-weight: 700; margin: 16px 0 28px !important; }
.hero .btn { margin-bottom: 18px; }
.note { font-size: 15px; max-width: 520px; }
@property --mt { syntax: '<percentage>'; inherits: true; initial-value: 6%; }
@property --mb { syntax: '<percentage>'; inherits: true; initial-value: 14%; }
@property --ml { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
/* full-bleed layer behind the text; canvas edges melt into the sky via mask (shop view fades less so the shop stays crisp) */
.stage { --mt: 6%; --mb: 14%; --ml: 0%; position: absolute; z-index: 0; left: 50%; width: 100vw; translate: -50% 0; top: 0; bottom: 0; transition: --mt .6s, --mb .6s; }
.stage:is([data-view="shop"], [data-view="hub"], [data-view="dojo"]) { --mt: 1%; --mb: 3%; }
.stage.grow { overflow-y: clip; } /* scene.js pins the canvas buffer at the taller size while the hero height animates */
.stage canvas, .stage-poster { -webkit-mask-image: linear-gradient(transparent, #000 var(--mt), #000 calc(100% - var(--mb)), transparent), linear-gradient(90deg, transparent, #000 var(--ml), #000 calc(100% - var(--ml)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--mt), #000 calc(100% - var(--mb)), transparent), linear-gradient(90deg, transparent, #000 var(--ml), #000 calc(100% - var(--ml)), transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.stage::before { content: ""; position: absolute; left: var(--hx, 50%); top: 50%; width: 1000px; height: 1000px; translate: -50% -50%;
  background: repeating-conic-gradient(#ffffff24 0 7.5deg, transparent 7.5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 62%); mask: radial-gradient(circle, #000 8%, transparent 62%);
  animation: spin 80s linear infinite; pointer-events: none; }
.burst { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; pointer-events: none; z-index: 2; animation: burst .8s ease-out forwards; }
.stage-poster, .stage canvas, .bean img, .bean canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.stage-poster { object-fit: contain; left: auto; width: 58%; }
.stage canvas, .bean canvas { opacity: 0; transition: opacity .4s; touch-action: pan-y; }
.stage.live canvas, .bean.live canvas { opacity: 1; }
.stage.live .stage-poster, .bean.live img { opacity: 0; transition: opacity .3s .4s; }
.stage.done .stage-poster, .bean.done img { visibility: hidden; } /* never left half-faded */
.stage.waking .stage-poster { transition-duration: .12s; transition-delay: 0s; } /* world intro: poster out before the islands rise */
.stage.done canvas, .bean.done canvas { opacity: 1; }
.stage-hint { display: none; position: absolute; left: var(--hx, 50%); bottom: 3%; translate: -50% 0; z-index: 3; margin: 0; padding: 6px 14px; white-space: nowrap; pointer-events: none;
  background: var(--cream); border: 2px solid var(--brown); border-radius: 999px; color: var(--text-cream); font-size: 15px; font-weight: 800; transition: opacity .4s; }
.stage.live .stage-hint { display: block; }
.stage.played .stage-hint { opacity: 0; }
.stage-back { position: absolute; left: max(16px, calc((100vw - 1080px) / 2 + 16px)); top: 20px; z-index: 4; padding: 8px 16px; cursor: pointer; background: var(--cream); border: 2px solid var(--brown); border-radius: 999px; color: var(--text-cream); font: 400 15px/1.2 var(--font-head); -webkit-text-stroke: 0; text-shadow: none; box-shadow: 0 3px 0 rgba(11,58,110,.22); }
.stage-back[hidden] { display: none; }
.stage-zoom { position: absolute; right: calc(16px + var(--sbw, 0px)); bottom: 80px; z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.stage-zoom[hidden] { display: none; }
.stage-zoom button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: var(--cream); border: 3px solid var(--brown); color: var(--text-cream); box-shadow: 0 3px 0 rgba(11,58,110,.22); cursor: pointer; }
.stage-zoom button:disabled { opacity: .45; cursor: default; }
.stage-zoom button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.stage-zoom svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.stage-back:hover { filter: brightness(1.04); }
.stage-back:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wl { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; transition: opacity .3s; will-change: transform; }
.wl-pill { appearance: none; font: inherit; cursor: pointer; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; translate: -50% -100%; margin-top: -6px; padding: 4px 12px 5px; white-space: nowrap; background: var(--cream); border: 2px solid var(--brown); border-radius: 14px; color: var(--text-cream); -webkit-text-stroke: 0; text-shadow: none; box-shadow: 0 3px 0 rgba(11,58,110,.22); animation: wlbob 3s ease-in-out infinite; }
.wl b { font: 400 14px/1.1 var(--font-head); }
.wl-pill:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px #fff, 0 3px 0 rgba(11,58,110,.22); }
.wl small { display: flex; align-items: center; gap: 4px; font: 800 11px/1 var(--font-body); color: var(--text-cream-2); }
.wl.live small { color: var(--green); }
.wl small i { width: 8px; height: 8px; border-radius: 50%; background: #3DCB5A; box-shadow: 0 0 0 2px #3DCB5A44; }
.stage:is([data-view="shop"], [data-view="hub"], [data-view="dojo"]) .wl { opacity: 0; }
/* hub focus demo: --r is the coin's projected radius (px), set per frame by scene.js */
.sess { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s; will-change: transform; }
.sess.show { visibility: visible; opacity: 1; }
.sess > * { position: absolute; }
.sess-coin { left: 0; top: 0; width: calc(var(--r, 80px) * 2); height: calc(var(--r, 80px) * 2); translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: none; pointer-events: none; } /* mouse clicks reach the canvas; this is the keyboard handle */
.sess-coin:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; box-shadow: 0 0 0 7px #fff; }
.sess-ring { left: 0; top: 0; width: calc(var(--r, 80px) * 2.44); translate: -50% -50%; overflow: visible; }
.sess:not(.on) .prg { visibility: hidden; }
.sess-on { left: 0; top: calc(var(--r, 80px) * -1.3 - 8px); translate: -50% -100%; padding: 5px 14px 6px; white-space: nowrap; background: var(--green); border: 2px solid var(--navy); border-radius: 999px; color: #fff; font: 800 15px/1 var(--font-body); box-shadow: 0 3px 0 rgba(11,58,110,.22); animation: wlpop .35s ease-out; }
.sess:not(.on) .sess-on { display: none; }
.sess-info { left: 0; top: calc(var(--r, 80px) * 1.28 + 14px); translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero .sess-rb { margin: 0; padding: 6px 30px 8px; min-width: 4.5em; text-align: center; color: #fff; font: 400 clamp(20px, calc(var(--r, 80px) * .3), 34px)/1.1 var(--font-head); white-space: nowrap; }
.sess-cap { width: max-content; max-width: 84vw; padding: 4px 12px 5px; text-align: center; background: var(--cream); border: 2px solid var(--brown); border-radius: 14px; color: var(--text-cream); font: 800 14px/1.3 var(--font-body); }
.hero .sess .sess-a { margin: 0; padding: 6px 14px 8px; font-size: 15px; box-shadow: 0 3px 0 var(--gold-lip); pointer-events: auto; }
.sess:not(.on) .sess-a { display: none; }
.wbubble { position: absolute; left: 0; bottom: 100%; margin: 0 0 14px; translate: -50% 0; width: max-content; max-width: 170px; padding: 6px 12px; text-align: center; background: #fff; border: 2px solid var(--brown); border-radius: 14px; color: var(--text-cream); font: 800 13px/1.25 var(--font-body); -webkit-text-stroke: 0; text-shadow: none; animation: wlpop .25s ease-out; }
@keyframes wlbob { 50% { transform: translateY(-4px); } }
@keyframes wlpop { from { opacity: 0; scale: .8; } }
.bolt { position: absolute; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px 10px; white-space: nowrap; pointer-events: none; translate: -50% -50%;
  background: var(--cream); border: 2px solid var(--brown); border-radius: 999px; color: var(--text-cream); font-size: 15px; font-weight: 800; animation: floatup .9s ease-out forwards; }
@keyframes floatup { to { transform: translateY(-56px); opacity: 0; } }
.toast { position: absolute; left: 50%; bottom: 4%; translate: -50% 0; z-index: 6; width: min(86%, 340px); padding: 14px 16px; text-align: center;
  background: var(--cream); border: 3px solid var(--brown); border-radius: 20px; color: var(--text-cream); box-shadow: 0 6px 0 rgba(11,58,110,.22); }
.toast p { margin: 0 0 10px; font-weight: 800; }
.btn-sm { font-size: 17px; padding: 10px 18px; box-shadow: 0 4px 0 var(--gold-lip); }
@keyframes spin { to { rotate: 360deg; } }
@keyframes burst { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(90deg); opacity: 0; } }

.hero, .sec { position: relative; }
.cloud { position: absolute; left: var(--l); bottom: 2px; width: var(--w); aspect-ratio: 2; opacity: .85; pointer-events: none; animation: drift 80s ease-in-out infinite alternate; }
@keyframes drift { to { translate: 8vw 0; } }

.sec { padding-bottom: 72px; }
.ribbon { position: relative; isolation: isolate; display: table; margin: 0 auto 32px; padding: 10px 34px 12px; background: var(--blue);
  border: 3px solid var(--navy); border-radius: 6px; -webkit-text-stroke: 0; text-shadow: 0 3px 0 var(--navy); box-shadow: 0 5px 0 var(--navy); }
.ribbon::before, .ribbon::after { content: ""; position: absolute; z-index: -1; top: 14px; width: 54px; height: 100%; background: #0F5FA8; }
.ribbon::before { left: -34px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 24% 50%); }
.ribbon::after { right: -34px; clip-path: polygon(0 0, 100% 0, 76% 50%, 100% 100%, 0 100%); }

html.js .reveal { opacity: 0; transform: scale(.92); transition: opacity .5s ease-out, transform .6s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i, 0) * 120ms); }
html.js .reveal.in { opacity: 1; transform: none; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card, .panel { background: var(--cream); border: 3px solid var(--brown); border-radius: 24px; box-shadow: 0 6px 0 rgba(11,58,110,.22); color: var(--text-cream); }
.card { padding: 24px 20px; }
.card h3 { font: 400 24px/1.2 var(--font-head); margin: 12px 0 8px; }
.card p { margin: 0; color: var(--text-cream-2); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.ico { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 16px; border: 3px solid var(--gold-line);
  background: linear-gradient(#ffffff55, transparent 55%), var(--gold); box-shadow: 0 4px 0 var(--gold-lip); }
.ico img { width: 32px; height: 32px; }
.ico.sm { width: 40px; height: 40px; border-radius: 12px; border-width: 2px; box-shadow: 0 3px 0 var(--gold-lip); }
.ico.sm img { width: 24px; height: 24px; }
.badge { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); border: 2px solid var(--gold-line); font: 400 16px var(--font-head); color: #fff; text-shadow: 0 2px 0 var(--gold-line); }
.green { color: var(--green); font-weight: 800; }

.panel { max-width: 720px; margin: 24px auto 64px; padding: 32px 24px; line-height: 1.6; }
.panel h1 { font-size: clamp(30px, 6vw, 44px); margin-bottom: 4px; color: var(--text-cream); -webkit-text-stroke: 0; text-shadow: none; }
.panel h2 { font-size: 26px; text-align: left; margin: 28px 0 8px; color: var(--text-cream); -webkit-text-stroke: 0; text-shadow: none; }
.panel p, .panel ul { margin: 0 0 12px; }
.panel .updated { color: var(--text-cream-2); font-size: 15px; margin-bottom: 20px; }
.panel a { color: var(--text-cream); font-weight: 800; }

.site-footer { padding-top: 36px; padding-bottom: 32px; text-align: center; font-size: 16px; color: var(--text-cream); isolation: isolate; }
.site-footer::before { content: ""; position: absolute; z-index: -1; left: 50%; width: 100vw; translate: -50% 0; top: 0; bottom: 0; background: var(--cream); }
.site-footer::after { content: ""; position: absolute; z-index: -1; left: 50%; width: 100vw; translate: -50% 0; top: -13px; height: 14px;
  background: radial-gradient(circle 14px at 50% 100%, var(--cream) 13px, #0000 14px) 0 0 / 28px 14px repeat-x; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 12px; }
.site-footer a { font-weight: 800; }
.site-footer p { margin: 0; }
.site-footer .partner { font-size: 12px; font-weight: 500; color: var(--text-cream-2); margin-bottom: 4px; }

@media (min-width: 821px) {
  .hero { transition: min-height .6s cubic-bezier(.33, 1, .68, 1); } /* ~ the ease-out cubic scene.js mirrors on the camera */
  .hero--shop { min-height: max(100svh, 640px); } /* scene.js frames for the same height */
  .hero--shop .hero-text { opacity: 0; translate: -40px 0; }
  .hero--shop .hero-text * { pointer-events: none; }
}
html.lock { overflow: hidden; }
@media (max-width: 820px) {
  .hero { display: grid; grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .hero-text { max-width: none; pointer-events: auto; }
  .stage { --ml: 6%; position: relative; left: auto; width: auto; translate: none; top: auto; bottom: auto; aspect-ratio: 1; }
  .stage-poster { left: 0; width: 100%; }
  .hero--shop .stage:is([data-view="shop"], [data-view="hub"], [data-view="dojo"]) { position: fixed; inset: 0; z-index: 80; aspect-ratio: auto; --mt: 0%; --mb: 0%; --ml: 0%; background: var(--skyg); }
  .stage-back { left: max(12px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); position: fixed; }
  .stage-hint, .toast { bottom: max(18px, env(safe-area-inset-bottom)); }
  .wl-pill { padding: 2px 8px 3px; border-radius: 10px; margin-top: -3px; } .wl b { font-size: 11px; } .wl small { font-size: 9px; }
  .steps, .together { grid-template-columns: 1fr !important; }
  .bean { width: 240px !important; height: 240px !important; margin: 0 auto; }
  .ribbon { font-size: 26px; }
  .tagline { font-size: 20px; }
}
@media (max-width: 400px) { .brand span { font-size: 20px; } .btn { font-size: 20px; padding: 14px 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.games-intro { margin: -12px 0 28px; text-align: center; font-size: 20px; font-weight: 700; color: var(--navy); }
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bean { position: relative; width: 320px; height: 320px; }
.game-card { display: flex; flex-direction: column; padding: 24px 22px; }
.game-card h3 { font-size: 28px; margin: 16px 0 8px; }
.game-card p { color: var(--text-cream); }
.game-card--live { grid-column: 1 / -1; display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: center; padding: 28px 24px; }
.game-card--live h3 { font-size: 32px; margin-top: 0; }
.game-card--live .bean { margin: 0 auto; }
.pill { display: inline-block; vertical-align: middle; font: 800 13px/1 var(--font-body); padding: 6px 10px; border-radius: 999px; margin-left: 6px; border: 2px solid transparent; -webkit-text-stroke: 0; }
.pill--new { background: var(--green); color: #fff; }
.pill--work { background: #FFD27A; color: var(--text-cream); border-color: var(--brown); }
.pill--plan { background: #EBDDC4; color: var(--text-cream); }
.soc { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.soc a { text-decoration: none; font-weight: 800; font-size: 15px; padding: 4px 14px; border: 2px solid var(--brown); border-radius: 999px; color: var(--text-cream); background: #fff; }
.soc a:hover { background: #FFD27A; }

/* mystery crates (CSS only; sizes in em so .sm just shrinks font-size) */
.crate-art { flex: 1; min-height: 190px; display: grid; place-items: center; border-radius: 16px; border: 2px solid #EBD6A6; background: radial-gradient(circle at 50% 60%, #FFFBEF, #F8E8BE); }
.crate { position: relative; width: 9em; height: 8em; font-size: 16px; border: .25em solid var(--gold-line); border-radius: .6em; display: grid; place-items: center;
  background:
    linear-gradient(90deg, var(--gold-lip) 0 1em, transparent 1em calc(100% - 1em), var(--gold-lip) calc(100% - 1em)),
    repeating-linear-gradient(180deg, #F6DFAE 0 2.2em, var(--gold-lip) 2.2em 2.45em); box-shadow: 0 .3em 0 rgba(11,58,110,.22); }
.crate .q { font: 400 5em/1 var(--font-head); color: var(--gold); -webkit-text-stroke: .06em var(--navy); paint-order: stroke fill; text-shadow: 0 .05em 0 var(--navy); display: inline-block; transform-origin: 50% 80%; }
.crate .tarp { position: absolute; top: -.35em; right: -.35em; width: 4.2em; height: 4.2em; background: linear-gradient(225deg, #6CC4FA, var(--blue) 65%); clip-path: polygon(0 0, 100% 0, 100% 100%, 72% 64%, 40% 36%);
  transform-origin: 100% 0; transition: transform .25s; }
.crate.sm { font-size: 10px; }
.crates { grid-template-columns: repeat(2, auto); gap: 0 6px; align-content: center; justify-content: center; }
.crates .top { grid-row: 1; grid-column: 1 / -1; z-index: 1; margin-bottom: -.4em; rotate: -3deg; }
.crates .crate:nth-child(3) { rotate: 3deg; }
.game-card--soon:hover .crate .tarp, .game-card--soon:focus-within .crate .tarp { transform: translate(.2em, -.4em) rotate(8deg); }
.game-card--soon:hover .q, .game-card--soon:focus-within .q { animation: wiggle .6s ease-in-out infinite; }
/* Kung Fu Bean card art: the key art's blank title plaque sits on the left, so crop toward the hero */
.kfb-frame { overflow: hidden; border-radius: 16px; border: 2px solid #EBD6A6; background: #F8E8BE; }
.kfb-art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 70% 50%; transform: scale(1.18); transform-origin: 78% 50%; }
.game-card .follow { margin: 16px 0 0; font-size: 14px; font-weight: 800; }
.follow + .soc { margin-top: 8px; padding-top: 0; }
/* Kung Fu Bean focus: teaser panel (shown once the fly-in has settled) */
.teaser { position: absolute; left: 24px; bottom: 28px; z-index: 4; width: 400px; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 14px 18px 18px 14px; background: var(--cream); border: 3px solid var(--brown); border-radius: 20px; color: var(--text-cream); box-shadow: 0 6px 0 rgba(11,58,110,.22);
  visibility: hidden; opacity: 0; translate: 0 14px; transition: opacity .3s, translate .3s, visibility .3s; }
.teaser.show { visibility: visible; opacity: 1; translate: none; }
.teaser-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 68% 50%; border-radius: 14px; border: 2px solid #EBD6A6; }
.teaser h3 { font: 400 20px/1.2 var(--font-head); margin: 0 0 8px; }
.teaser .pill { display: table; margin: 6px 0 0;  font-size: 12px; padding: 5px 8px; }
.teaser .tags { margin-bottom: 8px; } .teaser .tags li { font-size: 12px; padding: 4px 8px; }
.teaser p { margin: 0; font: 800 14px/1.3 var(--font-body); color: var(--text-cream); }
.teaser .follow { margin-top: 8px; font-size: 13px; } .teaser .soc { padding-top: 0; margin-top: 6px; }
.teaser .soc a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.tags li { font: 800 13px/1 var(--font-body); padding: 5px 10px; border-radius: 999px; background: #FFF0C8; border: 2px solid #EBD6A6; color: var(--text-cream); }
.fair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.fair-card { text-align: center; }
.fico { width: 56px; height: 56px; }
@media (max-width: 820px) { .fair { grid-template-columns: 1fr; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -10deg; } 75% { rotate: 10deg; } }

@media (max-width: 820px) {
  /* phone rail: cards snap, next one peeks; only the rail scrolls */
  .games { display: flex; gap: 16px; margin: 0 -16px; padding: 0 16px 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .games::-webkit-scrollbar { display: none; }
  .game-card { flex: 0 0 min(80vw, 340px); scroll-snap-align: center; }
  .game-card--live { display: flex; gap: 0; padding: 24px 22px; }
  .game-card--live h3 { margin-top: 16px; }
  html.js .games .game-card.reveal { opacity: 1; transform: none; } /* off-screen rail cards must not wait for the observer */
}
.checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--gold-line); color: var(--text-cream); font: 800 13px/1 var(--font-body); }

.together { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.lead { font: 400 30px/1.2 var(--font-head); margin: 0 0 8px; color: var(--text-sky); }
.together p { margin: 0 0 16px; }
.feat { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.feat p { margin: 0; }
.chat { margin: 0; padding: 0; overflow: hidden; max-width: none; }
.chat-head { background: var(--blue); color: #fff; font: 400 22px var(--font-head); text-shadow: 0 2px 0 var(--navy); padding: 12px 20px; border-bottom: 3px solid var(--brown); }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.msg { max-width: 82%; align-self: flex-start; transform-origin: left bottom; }
.msg b { display: block; font-size: 13px; font-weight: 800; margin: 0 0 3px 6px; }
.msg span { display: block; padding: 10px 16px; border-radius: 18px 18px 18px 6px; background: #fff; border: 2px solid var(--brown); color: var(--text-cream); }
.msg.me { align-self: flex-end; transform-origin: right bottom; }
.msg.me b { text-align: right; margin: 0 6px 3px 0; }
.msg.me span { background: #DDF4FF; color: var(--navy); border: 2px solid var(--sky-1); border-radius: 18px 18px 6px 18px; }

.faq { margin: 0 auto; padding: 8px 24px; max-width: 760px; }
.faq details { border-bottom: 2px solid #EBD6A6; }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; font-weight: 800; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border: solid var(--brown); border-width: 0 3px 3px 0; rotate: 45deg; margin-top: -4px; transition: rotate .2s; }
.faq details[open] summary::after { rotate: -135deg; margin-top: 4px; }
.faq summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 8px; }
.faq details p { margin: 0 0 16px; color: var(--text-cream-2); }

.panel.cta { margin: 0 auto; text-align: center; padding: 40px 24px; }
.cta-coin { width: 160px; height: 160px; margin: 0 auto; animation: bob 3s ease-in-out infinite; }
.panel.cta h2 { text-align: center; font-size: clamp(30px, 6vw, 44px); margin: 8px 0 20px; }
@keyframes bob { 50% { transform: translateY(-12px); } }

/* sky timeline: fixed layers fade in by scroll (--g golden hour, --d dusk) */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.sky i { position: absolute; inset: 0; will-change: opacity; }
.sky .gold { background: linear-gradient(180deg, #FFB86B, #FFE2B8); opacity: var(--g, 0); }
.sky .dusk { background: linear-gradient(180deg, #2E3C8C, #F29A5B); opacity: var(--d, 0); }
.dusk::before, .dusk::after, .night::before, .night::after { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 2px; animation: tw 3s ease-in-out infinite; }
.dusk::before, .night::before { box-shadow: 32.7vw 10vh 0 #fff,64.8vw 5vh 0 1px #fff,10.2vw 38vh 0 #fff,90.2vw 14vh 0 #fff,9.4vw 27vh 0 #fff,24.6vw 36vh 0 #fff,6.8vw 37vh 0 #fff,93.9vw 41vh 0 1px #fff,58.1vw 4vh 0 1px #fff,58.4vw 4vh 0 #fff,5.6vw 55vh 0 #fff,29.4vw 10vh 0 1px #fff,12.5vw 20vh 0 1px #fff,81.0vw 12vh 0 #fff,58.0vw 41vh 0 #fff; }
.dusk::after, .night::after { box-shadow: 37.5vw 36vh 0 1px #fff,7.2vw 4vh 0 1px #fff,21.2vw 44vh 0 1px #fff,42.9vw 21vh 0 #fff,58.4vw 30vh 0 #fff,30.4vw 51vh 0 #fff,69.5vw 16vh 0 #fff,57.3vw 34vh 0 #fff,86.8vw 47vh 0 #fff,29.2vw 5vh 0 #fff,51.2vw 11vh 0 #fff,15.9vw 32vh 0 #fff,4.8vw 43vh 0 #fff,75.9vw 37vh 0 #fff,34.3vw 23vh 0 1px #fff; animation-delay: -1.5s; }
@keyframes tw { 50% { opacity: .2; } }
.cloud { transform: translate(var(--pcx, 0px), calc(var(--py, 0px) + var(--pcy, 0px))); z-index: -1; }
.together, .together .lead { color: var(--navy); }
.together .green { color: #0E5A1F; }

/* micro effects */
.tilt { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out; }
html.js .reveal.in.tilt { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out, opacity .5s; transition-delay: 0s; }
.trail, .coinfly { position: fixed; pointer-events: none; z-index: 60; }
.trail { width: 14px; height: 14px; margin: -7px 0 0 -7px; animation: fade .5s ease-out forwards; }
.coinfly { width: 28px; height: 28px; margin: -14px 0 0 -14px; animation: fly .9s ease-out forwards; }
@keyframes fade { to { opacity: 0; transform: translateY(10px) scale(.3); } }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(240deg); opacity: 0; } }
.snd { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  background: var(--cream); border: 3px solid var(--brown); color: var(--text-cream); box-shadow: 0 4px 0 rgba(11,58,110,.22); cursor: pointer; }
.snd svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.snd .on, .snd[aria-pressed="true"] .off { display: none; }
.snd[aria-pressed="true"] .on { display: inline; }

html.intro-pending body { visibility: hidden; animation: intro-safety 0s 2.5s forwards; }
@keyframes intro-safety { to { visibility: visible; } }

/* intro coin drop (overlay only exists when JS creates it) */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--skyg); transition: opacity .35s ease-out; }
.intro.out { opacity: 0; }
.intro .ic { width: 180px; height: 180px; transform-origin: 50% 100%; animation: drop .9s both; }
.intro .burst { animation-duration: .5s; }
@keyframes drop {
  0% { transform: translateY(-70vh); animation-timing-function: ease-in; }
  35% { transform: none; }
  40% { transform: scale(1.25, .7); animation-timing-function: ease-out; }
  50% { transform: translateY(-90px) scale(.95, 1.05); animation-timing-function: ease-in; }
  62% { transform: scale(1.15, .82); animation-timing-function: ease-out; }
  70% { transform: translateY(-35px); animation-timing-function: ease-in; }
  78% { transform: scale(1.08, .92); }
  100% { transform: none; }
}
@media (max-width: 820px) { .site-footer { padding-bottom: 76px; } }

/* hero sky by the visitor's local time (html[data-time]: day | golden | night, set in the head; ?time= previews). --hs fades it out while the hero scrolls away */
.sky .night, .sky .hg { opacity: 0; }
html[data-time="night"] .sky .night, html[data-time="golden"] .sky .hg { opacity: var(--hs, 1); }
.sky .hg { background: linear-gradient(180deg, #FF9E6B, #FFC98A 50%, #FFE7C2); }
.sky .night { background: radial-gradient(circle at 88% 15%, #F4F1FF 0 2.8vmin, #D5D8FFAA 3.2vmin, #8E94FF2E 9vmin, transparent 24vmin), linear-gradient(180deg, #0E1A45, #24306E 55%, #3B3F8F); }
html[data-time="golden"] { --skyg: linear-gradient(180deg, #FF9E6B, #FFC98A 55%, #FFE7C2); }
html[data-time="night"] { --skyg: linear-gradient(180deg, #0E1A45, #24306E 55%, #3B3F8F); }
html[data-time="golden"] .stage::before { background: repeating-conic-gradient(#FFE0A04D 0 7.5deg, transparent 7.5deg 15deg); }
html[data-time="night"] .stage::before { display: none; }
html[data-time="golden"] .stage-poster { filter: sepia(.25) saturate(1.1); }
html[data-time="night"] .stage-poster { filter: brightness(.6) saturate(.8); }
html[data-time="night"] .hero :is(.tagline, .note) { color: #F4F1FF; }
html[data-time="night"] .hero .cloud { opacity: .12; }
@media (prefers-reduced-motion: reduce) { .dusk::before, .dusk::after, .night::before, .night::after { animation: none; } }

/* shop mini-game: Bolts HUD, +5 workshop ticks, confetti */
.hud { position: absolute; left: 50%; top: 20px; translate: -50% 0; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 6px 16px 7px; pointer-events: none;
  background: var(--cream); border: 3px solid var(--brown); border-radius: 999px; color: var(--text-cream); font: 400 22px/1 var(--font-head); -webkit-text-stroke: 0; text-shadow: none; box-shadow: 0 4px 0 rgba(11,58,110,.22); }
.hud svg { width: 22px; height: 22px; }
.stage:not([data-view="shop"]) .hud { display: none; }
.bolt.inc { padding: 2px 8px; font-size: 13px; }
.confetti { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 40%; width: 8px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px #0C2F6B33; animation: conf 2.1s cubic-bezier(.2, .7, .4, 1) both; }
@keyframes conf { 0% { transform: translate(0, 0) rotate(0); } 30% { transform: translate(calc(var(--x) * .7), var(--u)) rotate(calc(var(--r) * .4)); } 80% { opacity: 1; } 100% { transform: translate(var(--x), var(--f)) rotate(var(--r)); opacity: 0; } }
@media (max-width: 820px) { .hud { top: calc(max(12px, env(safe-area-inset-top)) + 50px); } }
@media (max-width: 820px) {
  .teaser { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 52px); width: auto; grid-template-columns: 76px 1fr; gap: 10px; padding: 10px 12px 12px 10px; }
  .teaser h3 { font-size: 18px; margin-bottom: 6px; } .teaser p { font-size: 13px; } .teaser .soc { padding-top: 8px; }
  .stage[data-view="dojo"] .stage-hint { display: none; }
}
