/* Elemon landing, light pastel redesign (style guide: the Elemon UI kit). Loaded after tokens.css and
   site.css. Each section is a pastel scene with a host creature that reacts to what you do there.
   Motion: transform/opacity, individual translate/rotate/scale for pointer + scroll so WAAPI reactions
   on .bob can stack; idle loops only inside .is-live sections; reduced motion = static. */

/* ---------- hero ---------- */
.hero { --tint-a: #f6f2ff; --tint-b: #e2d8fc; margin-top: calc(-1 * (var(--e-nav-h) + 20px)); padding: calc(var(--e-nav-h) + 56px) 0 clamp(56px, 6vw, 88px); overflow: clip; }
.hero-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-deco .blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.65; }
/* blobs hang from the top in viewport units, so a late web-font swap that changes the hero's height never moves them (CLS) */
.hero-deco .b1 { width: 420px; height: 420px; right: 4%; top: 11vh; background: #ffd9ea; }
.hero-deco .b2 { width: 360px; height: 360px; right: 26%; top: 68vh; background: #cfeefa; }
.hero-deco .b3 { width: 300px; height: 300px; left: -6%; top: 62vh; background: #fff2c4; }
.hero-deco .tw { position: absolute; width: 18px; height: 18px; background: var(--c, #ffcf3f); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); opacity: 0.8; }
.hero-deco .t1 { --c: #ffcf3f; left: 46%; top: 22%; }
.hero-deco .t2 { --c: #ff7eb6; left: 92%; top: 16%; width: 12px; height: 12px; }
.hero-deco .t3 { --c: #9b7bff; left: 54%; top: 78%; width: 14px; height: 14px; }
.hero-deco .t4 { --c: #4fc3ff; left: 8%; top: 18%; width: 12px; height: 12px; }
.hero-deco .t5 { --c: #3fd98f; left: 86%; top: 70%; }
.is-live .hero-deco .tw { animation: twinkle 3.6s ease-in-out infinite; }
.is-live .hero-deco .t2 { animation-delay: -1.2s; } .is-live .hero-deco .t3 { animation-delay: -2.1s; } .is-live .hero-deco .t4 { animation-delay: -0.6s; } .is-live .hero-deco .t5 { animation-delay: -2.8s; }
@keyframes twinkle { 0%, 100% { transform: scale(0.6) rotate(0deg); opacity: 0.35; } 50% { transform: scale(1.1) rotate(45deg); opacity: 0.95; } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(calc(100svh - var(--e-nav-h) - 150px), 640px); }
.hero-title { margin: 0; font-size: var(--e-fs-hero); line-height: 0.96; font-weight: 900; letter-spacing: -0.04em; color: var(--e-ink); }
.hero-title span { display: block; }
.hero-title .l2 { background: linear-gradient(92deg, var(--e-violet-ink) 0%, var(--e-violet) 38%, #e06bb3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stage { position: relative; display: grid; justify-items: center; gap: 0; }
.hs-crew { --px: 0; --py: 0; position: relative; width: min(100%, 600px); aspect-ratio: 520 / 350; }
.hs-floor { left: 8%; right: 8%; bottom: 2%; height: 60px; }
.hs-crew .critter { transition: translate 0.6s var(--e-out), rotate 0.6s var(--e-out), scale 0.45s var(--e-spring); }
.hs-crew .hs-c { pointer-events: auto; cursor: pointer; }
.hs-he { width: 23%; right: 3%; top: -4%; translate: calc(var(--px) * -8px) calc(var(--py) * -10px); }
.hs-cl { width: 36%; left: 0; bottom: 12%; translate: calc(var(--px) * 9px) calc(var(--py) * 4px); rotate: calc(var(--px) * 2deg); }
.hs-na { width: 38%; left: 31%; bottom: 3%; z-index: 2; translate: calc(var(--px) * 14px) calc(var(--py) * 6px); rotate: calc(var(--px) * 3deg); }
.hs-fe { width: 38%; right: 0; bottom: 13%; translate: calc(var(--px) * 9px) calc(var(--py) * 4px); rotate: calc(var(--px) * 2deg); }
.hs-crew .hs-c.is-picked { scale: 1.08; z-index: 3; }
.hs-crew .hs-c::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -4%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, var(--t, #fff), transparent); opacity: 0; transition: opacity 0.4s; z-index: -1; }
.hs-crew .hs-c.is-picked::after { opacity: 0.9; }
.hs-cl { --t: #e9f2a6; } .hs-na { --t: #ffd9a6; } .hs-fe { --t: #cfdfec; }
.is-live .hs-he .bob { animation: float 4.8s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
/* scroll: the crew spreads and settles as the hero leaves (CSS scroll timeline where supported) */
@supports (animation-timeline: view()) {
  .hs-crew .critter { animation: crew-scroll linear both; animation-timeline: view(); animation-range: exit 0% exit 80%; }
  .hs-cl { --sx: -26px; } .hs-fe { --sx: 26px; } .hs-na { --sx: 0px; } .hs-he { --sx: 30px; }
  @keyframes crew-scroll { to { transform: translate(var(--sx), -30px) scale(0.9); opacity: 0.4; } }
}

.starter { width: min(100%, 480px); margin-top: -14px; padding: 18px 18px 16px; text-align: center; z-index: 4; }
.starter-h { margin: 0 0 12px; font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--e-ink-3); }
.starter-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.starter-pills .pill { min-height: 42px; }
.starter-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; margin: 12px 0 0; min-height: 28px; font-size: 15px; font-weight: 700; color: var(--e-ink-2); }
.starter-line b { color: var(--e-ink); font-weight: 900; }
.starter-line .mv { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; color: var(--e-violet-ink); }
.starter-line .mv::before { content: ""; width: 12px; height: 12px; background: currentColor; clip-path: polygon(55% 0, 15% 58%, 46% 58%, 38% 100%, 85% 40%, 54% 40%); }

/* ---------- marquee: every card on a white band ---------- */
.marquee { position: relative; z-index: 2; padding: 28px 0 32px; overflow: hidden; background: #fff; box-shadow: 0 -1px 0 var(--e-line), 0 1px 0 var(--e-line); }
.mq-band { display: grid; gap: 18px; }
.marquee-row { display: flex; gap: 18px; width: max-content; min-height: 244px; }
.is-live .marquee-row[data-dir="left"] { animation: mq-left 230s linear infinite; }
.is-live .marquee-row[data-dir="right"] { animation: mq-right 230s linear infinite; }
/* hovering (or holding) a card pauses just that row */
.marquee.is-live .marquee-row:hover, .marquee.is-live .marquee-row:has(.is-holo) { animation-play-state: paused; }
@keyframes mq-left { to { transform: translateX(-50%); } }
@keyframes mq-right { from { transform: translateX(-50%); } to { transform: none; } }
/* each card is a holo card (css/holo.css): .mq lifts on hover, .mq-in turns and shines */
.mq { position: relative; flex: none; display: block; width: 184px; height: 244px; border-radius: 22px; transition: transform var(--e-t) var(--e-spring); --holo-persp: 760px; }
.mq:hover { transform: translateY(-8px); }
.mq-in { position: absolute; inset: 0; display: block; padding: 7px; border-radius: inherit; background: #fff; isolation: isolate; box-shadow: var(--e-shadow-sm), inset 0 0 0 1px var(--e-line); }
.mq img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 16px; background: var(--t-tint); }
.mq b { position: absolute; left: 14px; bottom: 14px; min-width: 40px; padding: 3px 11px; border-radius: 999px; background: #fff; color: var(--t-ink); font-size: 19px; font-weight: 900; text-align: center; box-shadow: 0 2px 8px rgba(38, 29, 61, 0.2); }

/* ---------- 01 science ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.lab-art { position: relative; justify-self: center; width: min(100%, 380px); }
.lab-plate { margin: 0; padding: 12px; border-radius: 28px; rotate: -2.5deg; isolation: isolate; --holo-persp: 1100px; transition: rotate var(--e-t-slow) var(--e-spring), scale var(--e-t) var(--e-out); }
.lab-art.swap .lab-plate { scale: 0.96; rotate: 2deg; }
.lab-frame { overflow: hidden; border-radius: 18px; aspect-ratio: 3 / 3.4; background: var(--t-tint); }
.lab-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: opacity 0.25s; }
.lab-art.swap .lab-frame img { opacity: 0.4; }
.lab-id { display: flex; align-items: center; gap: 12px; padding: 14px 8px 4px; }
.lab-sym { font-size: 44px; font-weight: 900; line-height: 0.9; letter-spacing: -0.04em; color: var(--t-ink); }
.lab-name { flex: 1; min-width: 0; }
.lab-name b { display: block; font-size: 20px; font-weight: 900; line-height: 1.1; }
.lab-name i { display: block; font-style: normal; font-size: 14px; font-weight: 700; color: var(--e-ink-3); }
.lab-critter { width: 44%; right: -14%; top: -12%; z-index: 3; }
.lab-moves .sec-head { margin-bottom: 24px; }
.lab-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-chip { padding: 0 14px 0 5px; min-height: 42px; }
.lab-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; }
.lab-label { margin: 26px 0 10px; font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--e-ink-3); }
.lab-attacks { display: flex; flex-wrap: wrap; gap: 8px; }
.atk { --t: var(--e-violet); --t-tint: var(--e-lavender-a); --t-ink: var(--e-violet-ink); padding: 0 16px 0 6px; }
.atk span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--e-card-2); color: var(--e-ink-2); font-size: 13px; font-weight: 900; }
.atk[aria-pressed="true"] span { background: var(--e-violet); color: #fff; }
.lab-fact { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 18px 20px; min-height: 104px; }
.lab-fact .bulb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff3c4; color: #b07800; }
.lab-fact .bulb svg { width: 22px; height: 22px; }
.lab-fact p { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.55; color: var(--e-ink); }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--e-violet); animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 02 type circle ---------- */
.types-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto auto; column-gap: clamp(28px, 5vw, 80px); align-items: center; }
.types-grid .sec-head { grid-column: 1; grid-row: 1; align-self: end; }
.types-grid .ring-wrap { grid-column: 2; grid-row: 1 / span 2; }
.types-say { grid-column: 1; grid-row: 2; align-self: start; }
.types-lede { margin: 12px 0 0 !important; max-width: 30em; }
.chant { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; color: var(--e-ink-2); }
.chant b { display: inline-flex; align-items: center; gap: 8px; padding: 4px 16px 4px 12px; border-radius: var(--e-r-pill); background: var(--t-tint); color: var(--t-ink); box-shadow: inset 0 0 0 2px var(--t); }
.chant b .ti { width: 1em; height: 1em; }
.chant.flip, .chant.re { animation: chant-in 0.5s var(--e-spring) both; }
.chant.re { animation-name: chant-in2; }
@keyframes chant-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes chant-in2 { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
.chant-why { margin: 8px 0 0 !important; min-height: 3.2em; font-size: 17px !important; line-height: 1.55 !important; color: var(--e-ink-2); }
.src { display: inline-block; padding: 1px 9px; border-radius: var(--e-r-pill); font-size: 12px; font-weight: 900; letter-spacing: 0.03em; white-space: nowrap; vertical-align: 1px; }
.src.is-real { background: #ddf6e8; color: #17703f; }
.src.is-game { background: #efeaff; color: var(--e-violet-ink); }
.types-tip { margin: 10px 0 0 !important; font-size: 14px !important; font-weight: 800 !important; color: var(--e-ink-3) !important; }
.types-tip a { color: var(--e-violet-ink); }
.ring-wrap { position: relative; width: min(100%, 540px); aspect-ratio: 1; justify-self: center; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: rgba(38, 29, 61, 0.1); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; }
.ring-arcs .arc { fill: none; stroke: var(--t); stroke-width: 6; stroke-linecap: round; opacity: 0.26; transition: opacity 0.4s; }
.ring-arcs .arc.out { opacity: 0.75; }
.ring-arcs .arc.on { opacity: 1; stroke-width: 8; stroke-dasharray: var(--len) var(--len); animation: arc-draw 0.8s var(--e-out) both; }
.ring-arcs .arc.on.re { animation-name: arc-draw2; }
@keyframes arc-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes arc-draw2 { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.ring-nodes { position: absolute; inset: 0; }
.rnode { all: unset; position: absolute; left: var(--x); top: var(--y); width: 21%; aspect-ratio: 1; translate: -50% -50%; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.rnode:focus-visible { outline: 3px solid rgba(139, 108, 242, 0.55); outline-offset: 4px; border-radius: 50%; }
.rnode .disc { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 22%; border-radius: 50%; background: #fff; color: var(--t-ink); box-shadow: var(--e-shadow-sm), var(--e-gloss), inset 0 0 0 2px var(--t-tint); transition: box-shadow 0.35s var(--e-out), scale 0.4s var(--e-spring), background 0.35s; }
.rnode .rn-ico { width: 40%; height: 40%; stroke-width: 2.2; }
.rnode .rn-badge { width: 60%; height: auto; aspect-ratio: 1; margin-top: 2%; filter: drop-shadow(0 3px 5px rgba(38, 29, 61, 0.18)); -webkit-user-drag: none; pointer-events: none; }
.rnode .type-pip { position: absolute; bottom: 15%; z-index: 2; padding: 2px 7px; font-size: 10px; letter-spacing: 0.03em; white-space: nowrap; }
.rnode .type-pip::before { display: none; }
.rnode.win .disc { background: var(--t-tint); box-shadow: var(--e-shadow-lg), var(--e-gloss), inset 0 0 0 4px var(--t); scale: 1.08; }
.rnode.lose .disc { box-shadow: var(--e-shadow), var(--e-gloss), inset 0 0 0 3px var(--t); }
.rnode.dim .disc { opacity: 0.55; }
.rnode--wild .disc { background: repeating-conic-gradient(from 0deg, #fff 0 10deg, var(--t-tint) 10deg 20deg); }
.rnode--wild.win .rn-ico { animation: wild-turn 2.4s linear infinite; }
@keyframes wild-turn { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .rnode--wild.win .rn-ico { animation: none; } .ring-arcs .arc.on { animation: none; stroke-dasharray: none; } }

/* ---------- 03 Elemondex teaser ---------- */
.dexs-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-areas: "head tiles" "peek tiles"; gap: 28px clamp(28px, 5vw, 72px); align-items: start; }
.dexs-grid > .sec-head { grid-area: head; }
.dexs-grid .sec-head .btn { margin-top: 8px; }
.dexs-play { display: contents; }
/* the teaser tiles are 3D key blocks (same build as the Elemondex table in dex.css, keep in sync). They sit
   edge to edge as one block field. The link is the static grid cell; its inner .k is the key's top face and
   the link's ::before is the front wall, a static block from under the face down to the floor (the cell's
   bottom edge). Rows stack front over back (li z-index = row), so a wall shows exactly where its key stands
   taller than the key in front of it. The rolling wave moves only the face: .k rides
   `translateY(-4%..-30%)`, literal keyframes, one animation-delay per key from --c/--r (one composited
   animation per key on a plain inner span with no base transform; see dex.css for why). Hover/press/pop/
   jiggle move the whole link with `translate`/`rotate`/`scale` and stretch the wall (`scale`, origin top) by
   the same amount so it stays on the floor. Paused off screen (.k-off); a still relief under reduced motion. */
.dex-tiles { grid-area: tiles; list-style: none; margin: 0; padding: 7.5% 0 0; /* headroom for the tallest key + hover: 37% of a tile */
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); --kr: clamp(3px, 0.28vw, 4px); gap: 0; align-self: center; }
.dex-tiles li { position: relative; z-index: calc(var(--r) + 1); }
.dex-tiles li:nth-child(5n+1) { --c: 1; } .dex-tiles li:nth-child(5n+2) { --c: 2; } .dex-tiles li:nth-child(5n+3) { --c: 3; } .dex-tiles li:nth-child(5n+4) { --c: 4; } .dex-tiles li:nth-child(5n) { --c: 5; }
.dex-tiles li { --r: 0; --j: 0; } .dex-tiles li:nth-child(n+6) { --r: 1; } .dex-tiles li:nth-child(n+11) { --r: 2; } .dex-tiles li:nth-child(n+16) { --r: 3; }
.dex-tiles li:nth-child(3n) { --j: 0.2; } .dex-tiles li:nth-child(7n+2) { --j: 0.3; }
.dt {
  --k-top: color-mix(in oklab, color-mix(in oklab, var(--t-tint) 86%, var(--t)) 76%, #f3f0eb);
  --k-wall: color-mix(in oklab, color-mix(in oklab, var(--k-top) 50%, var(--t)) 80%, #45385a);
  position: relative; display: block; aspect-ratio: 1 / 1.02; padding: 0; border-radius: var(--kr); text-decoration: none; color: var(--e-ink);
  -webkit-tap-highlight-color: transparent; outline: none;
  transition: translate 0.24s var(--e-spring);
}
.dt .k { position: absolute; inset: 0; border-radius: inherit;
  animation: key-roll 3.2s ease-in-out calc((var(--c) * 0.55 + var(--r) * 1.15 + var(--j)) * -1s) infinite alternate;
  background: linear-gradient(180deg, color-mix(in oklab, var(--k-top) 78%, #fff), var(--k-top) 70%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 color-mix(in oklab, var(--k-wall) 45%, transparent), inset 0 0 0 0.5px color-mix(in oklab, var(--k-wall) 70%, transparent); }
/* the front wall: 44% of the cell, from under the face to the floor */
.dt::before {
  content: ""; position: absolute; left: 0; right: 0; top: 56%; bottom: 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in oklab, var(--k-wall) 88%, #fff) 30%, var(--k-wall) 55%, color-mix(in oklab, var(--k-wall) 78%, #2e2240));
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.22), inset -1px 0 0 rgba(40, 25, 55, 0.14);
  transform-origin: 50% 0; transition: scale 0.24s var(--e-spring);
}
.dt .k > * { position: absolute; }
.dt b { top: 11%; left: 11%; font-size: clamp(19px, 2.05vw, 30px); font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: var(--t-ink); }
.dt .n { top: 11%; right: 11%; font-size: clamp(9.5px, 0.8vw, 12px); font-weight: 900; line-height: 1; color: color-mix(in oklab, var(--t-ink) 72%, var(--e-ink-2)); font-variant-numeric: tabular-nums; }
.dt .nm { left: 11%; right: 8%; bottom: 15%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(9px, 0.82vw, 12px); font-weight: 800; line-height: 1.2; color: color-mix(in oklab, var(--t-ink) 62%, var(--e-ink)); }
/* lift = +30% of the wave's range (7% of the key); the wall stretches by the same: scale = 1 + lift / 44% */
@media (hover: hover) {
  .dt:hover { color: var(--e-ink); translate: 0 -7%; }
  .dt:hover::before { scale: 1 1.16; }
}
.dt:focus-visible { translate: 0 -7%; }
.dt:focus-visible::before { scale: 1 1.16; }
.dt:focus-visible .k { box-shadow: inset 0 0 0 2.5px var(--t-ink), 0 0 0 2px #fff; }
.dt.is-on { translate: 0 -7%; }
.dt.is-on::before { scale: 1 1.16; }
.dt.is-on .k { box-shadow: inset 0 0 0 2.5px var(--t-ink), inset 0 4px 0 rgba(255, 255, 255, 0.6); }
.dt:active { transition-duration: 0.07s; translate: 0 4%; }
.dt:active::before { transition-duration: 0.07s; scale: 1 0.91; }
/* tap: the key pops (and, opening, grows into the card); its touching neighbours jiggle once */
.dex-tiles li:has(.k-pop, .k-open) { z-index: 9; }
.dt.k-pop { animation: key-pop 0.46s var(--e-out); }
.dt.k-pop::before { animation: key-pop-wall 0.46s var(--e-out); }
.dt.k-open { animation: key-open 0.32s var(--e-out) forwards; }
.dt.k-open::before { animation: key-open-wall 0.32s var(--e-out) forwards; }
.dt.k-jig { animation: key-jig 0.52s ease-in-out var(--jd, 0ms); }
.dt.k-jig::before { animation: key-jig-wall 0.52s ease-in-out var(--jd, 0ms); }
.dex-tiles.k-off .k { animation-play-state: paused; }
/* literal keyframes only (no var()): the compositor runs them */
@keyframes key-roll { from { transform: translateY(-4%); } to { transform: translateY(-30%); } }
@keyframes key-pop { 0% { translate: 0 4%; } 45% { translate: 0 -16%; scale: 1.05; } 100% { translate: 0 -7%; } }
@keyframes key-pop-wall { 0% { scale: 1 0.91; } 45% { scale: 1 1.36; } 100% { scale: 1 1.16; } }
@keyframes key-open { 0% { translate: 0 4%; } 40% { translate: 0 -16%; scale: 1.06; opacity: 1; } 100% { translate: 0 -20%; scale: 1.45; opacity: 0; } }
@keyframes key-open-wall { 0% { scale: 1 0.91; } 40% { scale: 1 1.36; } 100% { scale: 1 1.45; } }
@keyframes key-jig { 0%, 100% { translate: 0 0; rotate: 0deg; } 30% { translate: 0 -9%; rotate: -1.2deg; } 60% { translate: 0 3%; rotate: 0.8deg; } 82% { translate: 0 -1.5%; rotate: 0deg; } }
@keyframes key-jig-wall { 0%, 100% { scale: 1 1; } 30% { scale: 1 1.2; } 60% { scale: 1 0.93; } 82% { scale: 1 1.03; } }
@media (prefers-reduced-motion: reduce) {
  .dt .k { animation: key-roll 3.2s ease-in-out calc((var(--c) * 0.55 + var(--r) * 1.15 + var(--j)) * -1s) infinite alternate paused !important; }
  .dt, .dt::before { animation: none !important; transition: none !important; }
}
.peek { grid-area: peek; width: 100%; max-width: 440px; padding: 18px; perspective: 900px; }
.peek-in { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; transform-origin: 50% 50%; }
.peek-in.flip { animation: peek-flip 0.55s var(--e-out) both; }
@keyframes peek-flip { 0% { transform: rotateY(-90deg); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.peek-art { position: relative; width: 112px; height: 132px; border-radius: 18px; background: radial-gradient(90% 80% at 50% 30%, #fff, var(--t-tint, var(--e-sky-b))); }
.peek-art .critter { left: 6%; right: 6%; bottom: 8%; width: auto; }
.peek-art .peek-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 18px; opacity: 0.22; }
.peek-copy p { margin: 0; }
.peek-hi { font-size: 18px; font-weight: 900; line-height: 1.25; }
.peek-sub { margin-top: 4px !important; font-size: 15px; font-weight: 700; color: var(--e-ink-2); }
.peek-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.peek-name b { font-size: 22px; font-weight: 900; line-height: 1.1; }
.peek-name i { font-style: normal; font-size: 14px; font-weight: 700; color: var(--e-ink-3); }
.peek-bio { margin: 6px 0 8px !important; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--e-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.peek-go { font-size: 15px; font-weight: 900; text-decoration: none; }
.peek-go::after { content: " →"; }

/* ---------- 04 teach ---------- */
.teach .sec-head { margin-bottom: clamp(36px, 5vw, 56px); }
.teach-intro { max-width: 34rem; }
.teach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.tcase { padding: 10px 10px 22px; cursor: pointer; transition: transform var(--e-t) var(--e-spring); }
.tcase:hover { transform: translateY(-4px); }
.tcase:focus-visible { outline: 3px solid rgba(139, 108, 242, 0.55); outline-offset: 4px; }
.tcase p { margin: 16px 14px 0; font-size: 16px; line-height: 1.55; color: var(--e-ink-2); font-weight: 600; }
.tcase p strong { display: block; margin-bottom: 4px; font-size: 19px; font-weight: 900; color: var(--e-ink); }
.tstage { position: relative; height: 180px; border-radius: 18px; overflow: hidden; background: radial-gradient(90% 90% at 50% 20%, #fff, var(--e-peach-a)); }
.tstage .critter { bottom: 22px; }
.tc-na { width: 30%; left: 13%; } .tc-cl { width: 34%; right: 11%; }
.tc-h { width: 25%; left: 18%; } .tc-o { width: 27%; right: 16%; }
.tstage .critter, .tstage .fam { transition: translate 0.5s var(--e-spring); }
.tcase.go .tc-na { translate: 18% 0; } .tcase.go .tc-cl { translate: -16% 0; }
.tcase.go .tc-h { translate: 20% 0; } .tcase.go .tc-o { translate: -18% 0; }
.salt-cube, .drop { position: absolute; left: 50%; top: 26px; width: 34px; height: 34px; translate: -50% 0; scale: 0; opacity: 0; transition: scale 0.5s var(--e-spring), opacity 0.2s; }
.salt-cube { border-radius: 8px; background: linear-gradient(145deg, #fff, #e8eef8); box-shadow: 0 6px 14px -4px rgba(58, 38, 120, 0.35), inset 0 0 0 2px #fff, inset -6px -6px 0 rgba(160, 180, 210, 0.35); rotate: 12deg; }
.drop { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 35%, #d9f4ff, #4fc3ff); box-shadow: 0 8px 16px -6px rgba(40, 140, 220, 0.6); clip-path: none; }
.tcase.go .salt-cube, .tcase.go .drop { scale: 1; opacity: 1; transition-delay: 0.35s; }
.tstage .fam { position: absolute; bottom: 16px; display: grid; justify-items: center; gap: 4px; width: 23%; }
.tstage .fam:nth-child(1) { left: 2%; } .tstage .fam:nth-child(2) { left: 26%; } .tstage .fam:nth-child(3) { left: 51%; } .tstage .fam:nth-child(4) { left: 75%; }
.tstage .fam .critter { position: relative; bottom: auto; width: 88%; }
.tstage .fam .type-pip { font-size: 10px; padding: 3px 8px 3px 6px; }
.more-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.more-links .pill::after { content: "→"; color: var(--e-ink-3); }

/* ---------- 05 play ---------- */
.play .sec-head { margin-bottom: clamp(96px, 9vw, 120px); }
.play-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.5vw, 32px); max-width: 1000px; margin: 0 auto; align-items: start; }
.panel { padding: clamp(24px, 2.6vw, 34px); display: grid; gap: 16px; }
.panel h3 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.panel > p { margin: -8px 0 0; color: var(--e-ink-2); font-weight: 700; }
.host { top: -86px; width: 120px; z-index: 2; }
.host--solo { right: 22px; width: 116px; }
.host--friend { right: 26px; width: 100px; top: -98px; }
.battery { position: absolute; top: 30px; right: 150px; display: flex; gap: 3px; padding: 4px; border-radius: 9px; background: var(--e-card-2); box-shadow: inset 0 0 0 1.5px var(--e-line-2); }
.battery::after { content: ""; position: absolute; right: -5px; top: 50%; width: 4px; height: 9px; translate: 0 -50%; border-radius: 0 3px 3px 0; background: var(--e-line-2); }
.battery i { width: 12px; height: 18px; border-radius: 4px; background: rgba(38, 29, 61, 0.08); transition: background 0.3s, box-shadow 0.3s; }
.battery[data-n="1"] i:nth-child(-n + 1), .battery[data-n="2"] i:nth-child(-n + 2), .battery[data-n="3"] i:nth-child(-n + 3) { background: linear-gradient(180deg, #ffe066, #f7b500); box-shadow: 0 0 10px -2px #f7c531; }
.battery[data-n="3"] i { background: linear-gradient(180deg, #ff9b8a, #ee5b5b) !important; box-shadow: 0 0 10px -2px var(--e-red) !important; }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.levels .pill { justify-content: center; }
.levels .pill b { font-weight: 900; }
.levels [data-level="easy"] { --t: var(--e-green); --t-tint: #e3f8ec; --t-ink: #15703f; }
.levels [data-level="normal"] { --t: var(--e-violet); --t-tint: var(--e-lavender-a); --t-ink: var(--e-violet-ink); }
.levels [data-level="hard"] { --t: var(--e-red); --t-tint: #ffe7e7; --t-ink: #b02a2a; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 900; color: var(--e-ink-2); }
.field input { height: 52px; padding: 0 16px; border: 0; border-radius: 16px; outline: 0; background: var(--e-card-2); color: var(--e-ink); font: 800 17px var(--e-font); box-shadow: inset 0 0 0 2px var(--e-line); transition: box-shadow var(--e-t-fast); }
.field input::placeholder { color: var(--e-ink-3); }
.field input:focus { box-shadow: inset 0 0 0 2px var(--e-violet), var(--e-focus); background: #fff; }
.open { display: grid; gap: 12px; }
.spin--ink { border-color: rgba(91, 63, 208, 0.25); border-top-color: var(--e-violet-ink); }
.btn--ghost.is-busy .face + .face { opacity: 1; transform: none; }
.btn--ghost.is-busy .face:first-child { opacity: 0; }
#solo.is-busy .face + .face { opacity: 1; transform: none; }
#solo.is-busy .face:first-child { opacity: 0; }
.err { margin: 0; color: #c63737; font-weight: 800; font-size: 14px; }
.err:empty { display: none; }
.rooms-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rooms-head h4 { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--e-ink-3); }
.refresh { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--e-ink-2); cursor: pointer; box-shadow: var(--e-shadow-sm), inset 0 0 0 1px var(--e-line); transition: transform 0.5s var(--e-spring), color 0.2s; }
.refresh:hover { color: var(--e-violet-ink); transform: rotate(180deg); }
.refresh svg { width: 20px; height: 20px; }
.rooms { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.empty { margin: 0; padding: 16px; border-radius: 16px; background: var(--e-card-2); color: var(--e-ink-2); font-weight: 700; font-size: 15px; text-align: center; }
.table-row { display: grid; grid-template-areas: "n s" "m s"; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%; padding: 12px 12px 12px 16px; border: 0; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: var(--e-ink); background: var(--e-card-2); box-shadow: inset 0 0 0 1px var(--e-line); transition: transform var(--e-t) var(--e-spring), box-shadow var(--e-t); }
.table-row strong { grid-area: n; font-size: 17px; font-weight: 900; }
.table-row .meta { grid-area: m; font-size: 13px; font-weight: 700; color: var(--e-ink-3); }
.table-row .sit { grid-area: s; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--e-r-pill); background: linear-gradient(180deg, var(--e-violet-2), var(--e-violet)); color: #fff; font-weight: 900; font-size: 14px; }
.table-row:hover { transform: translateX(3px); box-shadow: inset 0 0 0 2px var(--e-violet); background: #fff; }
.panel--friends .eui-retry.eui-inline .eui-qs i { color: var(--e-violet); }

/* ---------- 06 FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.faq-side { position: sticky; top: calc(var(--e-nav-h) + 40px); }
.faq-host { position: relative; height: 270px; margin-top: 28px; }
.faq-critter { width: 190px; left: 6%; bottom: 0; transition: translate 0.6s var(--e-spring); translate: 0 30px; }
.faq-host.up .faq-critter { translate: 0 -6px; }
.faq-bubble { position: absolute; left: calc(6% + 170px); top: 18px; display: grid; place-items: center; min-width: 58px; height: 58px; padding: 0 14px; border-radius: 22px 22px 22px 6px; transition: scale 0.4s var(--e-spring); }
.faq-bubble b { font-size: 28px; font-weight: 900; color: var(--e-violet); }
.faq-bubble.pop { animation: bubble 0.5s var(--e-spring); }
@keyframes bubble { 0% { scale: 0.6; } 100% { scale: 1; } }
.faq-list { display: grid; gap: 12px; }
.faq-item { border-radius: 22px; overflow: hidden; transition: box-shadow var(--e-t); }
.faq-item[open] { box-shadow: var(--e-shadow-lg), var(--e-gloss), inset 0 0 0 2px var(--e-pink); }
.faq-item summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 22px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 900; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--e-pink-a); transition: background 0.3s, rotate 0.4s var(--e-spring); }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 3px; border-radius: 2px; background: #d14d8f; translate: -50% -50%; transition: rotate 0.35s var(--e-spring); }
.faq-item summary i::after { rotate: 90deg; }
.faq-item[open] summary i { background: var(--e-pink); rotate: 180deg; }
.faq-item[open] summary i::before, .faq-item[open] summary i::after { background: #fff; }
.faq-item[open] summary i::after { rotate: 0deg; }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--e-ink-2); font-weight: 600; }
.faq-item[open] p { animation: faq-in 0.4s var(--e-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }
.faq-more { margin-top: 40px; text-align: center; font-weight: 800; color: var(--e-ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; text-align: center; justify-items: center; }
  .cta-row { justify-content: center; }
  .lab, .types-grid, .faq-grid { grid-template-columns: 1fr; }
  .lab { gap: 0; }
  .lab-moves { display: contents; }
  .lab-moves .sec-head { order: 1; margin-bottom: 40px; }
  .lab-art { order: 2; width: min(78%, 340px); margin-bottom: 28px; }
  .lab-moves > :not(.sec-head) { order: 3; }
  .types-grid .sec-head { justify-items: center; text-align: center; }
  .types-grid .sec-head, .types-grid .ring-wrap, .types-say { grid-column: 1; grid-row: auto; }
  .types-say { text-align: center; }
  .chant { justify-content: center; }
  .dexs-grid { grid-template-columns: 1fr; grid-template-areas: "head" "tiles" "peek"; }
  .peek { justify-self: center; }
  .teach-list { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .play-grid { grid-template-columns: 1fr; max-width: 560px; row-gap: 88px; }
  .play .sec-head { margin-bottom: 96px; }
  .faq-side { position: static; }
  .faq-host { height: 200px; }
  .faq-critter { width: 140px; }
  .faq-bubble { left: calc(6% + 128px); }
}
@media (max-width: 640px) {
  .hero { padding-top: calc(var(--e-nav-h) + 34px); }
  .hero-title { font-size: clamp(42px, 12.4vw, 60px); }
  .cta-row .btn { flex: 1 1 100%; }
  .hs-crew { width: 100%; }
  .starter { padding: 14px 12px; }
  .starter-pills .pill { padding: 0 12px; font-size: 14px; }
  .mq { width: 148px; height: 196px; border-radius: 18px; }
  .mq-in { padding: 6px; } .mq img { border-radius: 13px; }
  .mq b { left: 12px; bottom: 12px; min-width: 34px; font-size: 16px; padding: 2px 9px; }
  .mq-band, .marquee-row { gap: 14px; }
  .marquee-row { min-height: 196px; }
  .lab-critter { width: 40%; right: -10%; }
  .lab-chip { font-size: 14px; }
  .chant { font-size: 19px; gap: 6px; }
  .chant b { gap: 6px; padding: 3px 12px 3px 9px; }
  .ring-wrap { width: 100%; margin-top: 8px; }
  .rnode .type-pip { font-size: 8.5px; padding: 2px 5px; letter-spacing: 0; }
  .chant-why { font-size: 16px !important; }
  .peek-in { grid-template-columns: 92px 1fr; }
  .peek-art { width: 92px; height: 112px; }
  .panel h3 { font-size: 24px; }
  .battery { right: 118px; top: 26px; }
  .host--solo { width: 92px; right: 14px; top: -70px; }
  .host--friend { width: 80px; right: 16px; top: -80px; }
  .faq-item summary { font-size: 17px; padding: 14px 16px 14px 18px; }
  .faq-item p { padding: 0 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-crew .critter { animation: none !important; }
  .marquee-row { animation: none !important; }
  .marquee { overflow-x: auto; }
}
