/* Inventorverse Day 1 (v0.22 rebuild). One job per screen; guide bar docked at the bottom; nothing floats over content. */
@font-face { font-family: 'Baloo'; src: url('/fonts/baloo-bhaijaan-2/files/baloo-bhaijaan-2-latin-wght-normal.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: 'Baloo'; src: url('/fonts/baloo-bhaijaan-2/files/baloo-bhaijaan-2-arabic-wght-normal.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/atkinson-hyperlegible-next/files/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #f4f6ff; --ink: #0d1442; --muted: #596089; --line: #e3e7f7; --card: #fff;
  --brand: #2236e0; --brand-d: #1626a8; --brand-l: #eaeeff; --sun: #ffc83d; --sun-l: #fff6d6;
  --ok: #18a957; --ok-l: #e7f8ee; --no: #e5484d; --no-l: #fdecec; --night: #0d1442;
  --r: 22px; --sh: 0 12px 32px rgba(36, 44, 120, .10), 0 2px 6px rgba(36, 44, 120, .06);
  --head: 'Baloo', 'Atkinson', ui-rounded, system-ui, sans-serif; --body: 'Atkinson', 'Baloo', system-ui, sans-serif;
  --guide: 96px;
}
[dir=rtl] { --body: 'Baloo', 'Atkinson', system-ui, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; scroll-padding-bottom: calc(var(--guide) + 16px); }
body.d1 { margin: 0; color: var(--ink); font: 400 18px/1.5 var(--body); background: radial-gradient(1000px 480px at 90% -10%, #e6e1ff 0, transparent 60%), radial-gradient(800px 480px at -10% 110%, #dcf3ff 0, transparent 60%), var(--bg); background-attachment: fixed; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
h1, h2 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(20px, 2.2vw, 25px); font-weight: 750; line-height: 1.25; margin: 0 0 10px; }
[dir=rtl] h1, [dir=rtl] h2 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0 0 8px; }
.x-small { font-size: 15px; color: var(--muted); }
.x-big { font-size: 21px; font-weight: 700; }

/* top bar: exit, lesson progress, sound */
.x-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px max(16px, calc(50% - 560px)); background: rgba(244, 246, 255, .9); backdrop-filter: blur(10px); }
.x-exit { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; font-size: 28px; line-height: 1; }
.x-exit:hover { background: var(--line); }
.x-pbar { flex: 1; height: 12px; background: #e2e5f6; border-radius: 99px; position: relative; margin: 0 10px; }
.x-pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), #4bd17f); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); }
.x-snd { border: 0; background: none; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; }

.x-main { max-width: 1120px; margin: 0 auto; padding: 10px 16px calc(var(--guide) + 40px); }
.x-head { margin: 8px 0 18px; max-width: 760px; }
.x-say { font-size: 20px; color: var(--muted); margin-top: 8px; }

/* buttons */
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border: 0; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 750; font-family: var(--head); font-size: 19px; text-decoration: none; box-shadow: 0 5px 0 var(--brand-d); transition: transform .08s, box-shadow .08s; }
.x-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-d); }
.x-btn.big { min-height: 62px; font-size: 21px; padding: 12px 28px; }
.x-btn.small { min-height: 42px; font-size: 16px; padding: 6px 14px; box-shadow: 0 3px 0 var(--brand-d); border-radius: 12px; }
.x-btn.ghost { background: #fff; color: var(--brand-d); box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line); }
.x-btn.ok { background: var(--ok); box-shadow: 0 5px 0 #0f7f40; }
.x-btn.no { background: var(--no); box-shadow: 0 5px 0 #b3292d; }
.x-link { background: none; border: 0; color: var(--brand-d); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; display: inline-block; }
.x-chip { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 16px; }
.x-chip:hover { border-color: var(--brand); }
.x-sign { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, #fff); border: 2px solid var(--c); font-weight: 750; }
.x-sign i { font-style: normal; }

/* the target the guide bar talks about: soft outline inside its own box (no floating arrow) */
.x-target { outline: 3px solid var(--sun) !important; outline-offset: 4px; border-radius: 16px; animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); } 50% { box-shadow: 0 0 0 8px rgba(255, 176, 32, .22); } }
.x-pulse { animation: pulse .6s ease-in-out 4; outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 14px; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* guide bar */
.x-guide { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; min-height: var(--guide); display: flex; align-items: center; gap: 14px; padding: 12px max(16px, calc(50% - 560px)) calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid var(--line); box-shadow: 0 -10px 30px rgba(36, 44, 120, .08); }
.x-gface { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-l) ; border: 3px solid var(--brand); position: relative; }
.x-gface.think { border-color: var(--sun); }
.x-gtext { flex: 1; min-width: 0; }
.x-gtext small { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--brand); }
[dir=rtl] .x-gtext small { letter-spacing: 0; font-size: 14px; }
.x-gtext p { margin: 0; font-weight: 750; font-size: 19px; font-family: var(--head); line-height: 1.3; }
.x-gtext.flash p { animation: fl .5s ease; }
@keyframes fl { from { opacity: 0; transform: translateY(6px); } }
.x-gdots { display: flex; gap: 5px; margin-top: 5px; }
.x-gdots i { width: 22px; height: 6px; border-radius: 9px; background: var(--line); }
.x-gdots i.done { background: var(--ok); } .x-gdots i.now { background: var(--sun); }
.x-gbtns { display: flex; gap: 8px; align-items: center; flex: none; }
.x-gb { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 750; font-size: 16px; }
.x-gb i { font-style: normal; font-size: 20px; }
.x-gb[aria-pressed=true] { border-color: var(--brand); background: var(--brand-l); }
.x-gb.x-next { background: var(--line); color: var(--muted); border: 0; min-height: 56px; padding: 8px 24px; font-family: var(--head); font-size: 20px; }
.x-gb.x-next.ready { background: var(--ok); color: #fff; box-shadow: 0 5px 0 #0f7f40; animation: rdy .5s ease; }
@keyframes rdy { 50% { transform: scale(1.06); } }
.x-hint { position: absolute; bottom: calc(100% + 10px); left: max(16px, calc(50% - 560px)); max-width: 440px; background: var(--sun-l); border: 2px solid var(--sun); border-radius: 18px; padding: 12px 40px 12px 16px; box-shadow: var(--sh); }
[dir=rtl] .x-hint { left: auto; right: max(16px, calc(50% - 560px)); padding: 12px 16px 12px 40px; }
.x-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 24px; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); }
[dir=rtl] .x-x { right: auto; left: 8px; }

/* magic wand */
body.x-wanding #x-main { cursor: crosshair; }
.x-wandcv { position: fixed; inset: 0; z-index: 45; cursor: crosshair; touch-action: none; }
.x-wandtip { position: fixed; z-index: 46; top: 70px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--night); color: #fff; padding: 8px 10px 8px 18px; border-radius: 99px; font-weight: 700; box-shadow: var(--sh); max-width: calc(100% - 24px); }
.x-wanded { outline: 3px dashed var(--sun); outline-offset: 3px; border-radius: 8px; }
.x-pop { position: fixed; z-index: 50; width: min(420px, calc(100% - 24px)); display: flex; gap: 12px; background: #fff; border-radius: 24px; padding: 16px 44px 16px 16px; box-shadow: 0 24px 60px rgba(20, 24, 90, .28); border: 3px solid var(--sun); animation: pop .25s cubic-bezier(.2, 1.4, .4, 1); }
[dir=rtl] .x-pop { padding: 16px 16px 16px 44px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.x-popface { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--brand-l) ; border: 3px solid var(--brand); }
.x-popbody p { font-size: 18px; }
.x-popchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.x-ask { display: flex; gap: 6px; }
.x-ask input { flex: 1; min-width: 0; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 16px; }

/* cards and feedback */
.x-fb { border-radius: var(--r); padding: 16px 18px; margin: 14px 0; border: 2px solid; animation: fl .3s ease; }
.x-fb.ok { background: var(--ok-l); border-color: #9fe0bb; } .x-fb.no { background: var(--no-l); border-color: #f5b5b7; }
.x-fbhead b { font-family: var(--head); font-size: 22px; }
.x-fb.ok .x-fbhead b { color: #0f7f40; } .x-fb.no .x-fbhead b { color: #b3292d; }
.x-fbrow, .x-fbwhy { margin: 6px 0; }
.x-fbrow span, .x-fbwhy span { display: inline-block; min-width: 110px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
[dir=rtl] .x-fbrow span, [dir=rtl] .x-fbwhy span { letter-spacing: 0; }
.x-fb .x-btn { margin-top: 8px; margin-inline-end: 8px; }
.x-voters { margin-top: 10px; }
.x-vrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.x-vcard { text-align: center; font-size: 14px; font-weight: 700; }
.x-vcard canvas { display: block; width: 84px; height: 84px; border-radius: 14px; border: 3px solid var(--c); }

/* camera station */
.x-stationhost { margin: 6px 0 14px; }
.x-station { display: grid; gap: 14px; }
.x-station.split { grid-template-columns: 1fr 1fr; }
.x-cam, .x-comp { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: #0e1550; box-shadow: var(--sh); }
.x-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.x-cam canvas, .x-comp canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.x-cam.flashc::before { content: ''; position: absolute; inset: 0; z-index: 3; background: #fff; animation: fc .35s ease forwards; }
@keyframes fc { to { opacity: 0; } }
.x-caption { position: absolute; z-index: 2; top: 10px; left: 10px; background: rgba(10, 14, 60, .72); color: #fff; font-weight: 750; font-size: 14px; padding: 4px 12px; border-radius: 99px; }
[dir=rtl] .x-caption { left: auto; right: 10px; }
.x-camstatus { position: absolute; z-index: 2; bottom: 10px; left: 10px; right: 10px; text-align: center; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.x-camstatus.bad { background: var(--no); border-radius: 12px; padding: 6px; }
.x-gate { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; background: linear-gradient(160deg, #1c2580, #0c1150); color: #fff; }
.x-gate h2 { color: #fff; }
.x-gate .x-small { color: #c9cff5; max-width: 340px; }
.x-gate .x-link { color: #ffd27a; }
.x-gateart { font-size: 46px; margin-bottom: 4px; }
.x-pract { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2a3496, #0e1550); }
.x-pract img { width: 70%; height: 80%; object-fit: contain; }
.x-pract span { font-size: 130px; }
.x-pctl { grid-column: 1 / -1; background: #fff; border-radius: var(--r); padding: 12px 14px; box-shadow: var(--sh); }
.x-prow { display: flex; flex-wrap: wrap; gap: 8px; }
.x-pose { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 14px; font-weight: 750; min-height: 46px; }
.x-pose.wig { background: var(--sun-l); border-color: var(--sun); }
.x-dotnum { position: absolute; z-index: 2; background: #fff; color: var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 14px; display: grid; box-shadow: var(--sh); pointer-events: none; }
.x-dotnum:empty { display: none; }
.x-tip { margin-top: 8px; }
.x-under { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; }
.x-cap { width: 100%; }
.x-key { color: var(--muted); }

/* questions */
.x-q { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin: 14px 0; }
.x-qn { font-weight: 800; color: var(--muted); font-size: 14px; }
.x-opts { display: grid; gap: 10px; }
.x-opt { text-align: start; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 16px; font-weight: 700; font-size: 18px; box-shadow: 0 4px 0 var(--line); }
.x-opt:hover:not(:disabled) { border-color: var(--brand); }
.x-opt.picked { border-color: var(--brand); background: var(--brand-l); }
.x-opt.good { border-color: var(--ok); background: var(--ok-l); } .x-opt.bad { border-color: var(--no); background: var(--no-l); }

/* arrive */
.x-hero { border-radius: 28px; overflow: hidden; min-height: 0; }
.x-heroart img { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 28px; }
.x-make, .x-age { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin: 14px 0; }
.x-makerow { display: flex; gap: 12px; flex-wrap: wrap; }
.x-mcard { flex: 1 1 120px; text-align: center; border-radius: 18px; padding: 14px; background: color-mix(in srgb, var(--c, #2236e0) 14%, #fff); border: 2px solid var(--c, var(--brand)); }
.x-mcard i { display: block; font-size: 44px; font-style: normal; }
.x-agerow { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.x-agebtn { flex: 1 1 150px; border: 3px solid var(--line); background: #fff; border-radius: 18px; padding: 14px; display: grid; box-shadow: 0 4px 0 var(--line); }
.x-agebtn b { font-family: var(--head); font-size: 24px; } .x-agebtn small { color: var(--muted); font-weight: 700; }
.x-agebtn.on { border-color: var(--brand); background: var(--brand-l); box-shadow: 0 4px 0 var(--brand); }

/* rules */
.x-rules { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin-bottom: 14px; }
.x-rrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.x-rsign { min-width: 120px; }
.x-ropts { display: flex; gap: 8px; flex-wrap: wrap; }
.x-ropt { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 6px 12px; display: grid; min-width: 74px; text-align: center; }
.x-ropt b { font-family: var(--head); font-size: 22px; line-height: 1.1; } .x-ropt small { font-size: 12px; color: var(--muted); }
.x-ropt.on { border-color: var(--brand); background: var(--brand-l); }
.x-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.x-case { background: #fff; border-radius: 18px; padding: 10px; border: 3px solid; text-align: center; animation: fl .4s ease both; }
.x-case.ok { border-color: var(--ok); } .x-case.no { border-color: var(--no); }
.x-case canvas { width: 100%; max-width: 120px; border-radius: 12px; }
.x-case p { font-size: 15px; margin: 6px 0 0; font-weight: 600; }

/* teach */
.x-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.x-tab { flex: 1 1 140px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: start; border: 3px solid var(--line); background: #fff; border-radius: 18px; padding: 8px 14px; }
.x-tab i { grid-row: span 2; font-size: 30px; font-style: normal; } .x-tab small { color: var(--muted); font-weight: 700; }
.x-tab.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.x-tab.done small { color: var(--ok); }
.x-work { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.x-side { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.x-sidehead { display: flex; gap: 12px; align-items: center; }
.x-bigsign { flex: none; width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, #fff); border: 3px solid var(--c); overflow: hidden; }
.x-bigsign img { width: 100%; height: 100%; object-fit: cover; } .x-bigsign i { font-size: 40px; font-style: normal; }
.x-meter { margin: 12px 0 6px; }
.x-mbar { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.x-mbar i { display: block; height: 100%; border-radius: 99px; transition: width .3s; }
.x-var { font-weight: 700; font-size: 15px; } .x-var.low { color: #b06a00; } .x-var.ok { color: var(--muted); } .x-var.great { color: var(--ok); }
.x-excards { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.x-ex { position: relative; padding: 0; border: 0; background: none; border-radius: 12px; }
.x-ex canvas { display: block; width: 56px; height: 56px; border-radius: 12px; }
.x-exx { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--no); color: #fff; font-weight: 800; font-size: 15px; line-height: 22px; text-align: center; opacity: .85; }
.x-ex:hover .x-exx { opacity: 1; transform: scale(1.15); }
.x-extools { display: flex; gap: 8px; flex-wrap: wrap; }
.x-peek { margin-top: 14px; background: #fff; border-radius: var(--r); padding: 12px 16px; box-shadow: var(--sh); }
.x-peek summary { font-weight: 750; cursor: pointer; }
.x-map canvas { width: 100%; max-width: 420px; border-radius: 14px; margin-top: 10px; }

/* test */
.x-predict { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin-bottom: 14px; }
.x-predict:empty { display: none; }
.x-numrow, .x-krow { display: flex; gap: 8px; flex-wrap: wrap; }
.x-num { width: 56px; height: 56px; border-radius: 16px; border: 3px solid var(--line); background: #fff; font-family: var(--head); font-size: 24px; font-weight: 800; box-shadow: 0 4px 0 var(--line); }
.x-num.on, .x-num:hover { border-color: var(--brand); background: var(--brand-l); }
.x-steps3 { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.x-score { font-family: var(--head); font-weight: 800; font-size: 22px; margin-bottom: 10px; }
.x-s3 { display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.x-s3 > :not(.x-n):not(p) { grid-column: 2; }
.x-s3 p { margin: 0; font-weight: 750; }
.x-s3 .x-btn { justify-self: start; margin-inline-end: 8px; }
.x-n { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.x-guess { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; }
.x-gsign { font-family: var(--head); font-size: 26px; font-weight: 800; color: var(--c); }
.x-sure { background: var(--brand-l); border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 15px; }

/* break */
.x-break { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.x-mixpic { display: flex; align-items: center; gap: 14px; font-size: 22px; margin-bottom: 10px; flex-wrap: wrap; }
.x-mixarrow { font-size: 34px; color: var(--no); }
.x-k { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin-top: 14px; }
.x-ba { display: flex; gap: 14px; margin-top: 14px; }
.x-ba div { flex: 1; background: #fff; border-radius: 18px; padding: 12px; text-align: center; box-shadow: var(--sh); display: grid; }
.x-ba b { font-family: var(--head); font-size: 30px; }

/* explain */
.x-sent { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--sh); margin-bottom: 12px; border: 3px solid transparent; }
.x-sent.done { border-color: #9fe0bb; }
.x-sent p { font-size: 20px; }
.x-blank { display: inline-block; min-width: 120px; border-bottom: 3px dashed var(--brand); color: var(--brand-d); font-weight: 750; }
.x-wchips { display: flex; flex-wrap: wrap; gap: 8px; }
.x-own { border: 2px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: 16px; min-width: 160px; }

/* use */
.x-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.x-lg { background: #fff; border: 3px solid var(--c); border-radius: 20px; padding: 14px; text-align: center; display: grid; gap: 2px; box-shadow: var(--sh); }
.x-lg i { font-size: 44px; font-style: normal; } .x-lg b { font-family: var(--head); font-size: 21px; } .x-lg span { color: var(--muted); font-weight: 700; }
.x-stationhost.small .x-station { max-width: 440px; }
.x-ready > .x-btn { margin-top: 6px; }
.x-game { position: relative; margin-top: 16px; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); }
.x-game canvas { display: block; width: 100%; height: auto; }
.x-hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; color: #fff; font-weight: 800; font-size: 20px; pointer-events: none; }
.x-hud span { background: rgba(0, 0, 0, .35); border-radius: 99px; padding: 2px 12px; }
.x-lost { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 14, 60, .7); color: #fff; font-family: var(--head); font-size: 26px; font-weight: 800; text-align: center; padding: 20px; }
.x-pad { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.x-pad:empty { display: none; }

/* celebrate */
.x-icard { background: linear-gradient(150deg, #2236e0, #0d1442); color: #fff; border-radius: 28px; padding: 22px; box-shadow: var(--sh); max-width: 560px; }
.x-icard small { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; opacity: .8; }
.x-irow { display: flex; gap: 10px; margin: 12px 0; }
.x-irow div { flex: 1; background: rgba(255, 255, 255, .12); border: 2px solid var(--c); border-radius: 16px; padding: 10px; text-align: center; display: grid; }
.x-irow i { font-size: 36px; font-style: normal; }
.x-istats { display: flex; gap: 10px; }
.x-istats div { flex: 1; display: grid; } .x-istats b { font-family: var(--head); font-size: 26px; }
.x-teaser { font-weight: 750; margin-top: 16px; }
.x-endrow { display: flex; gap: 10px; flex-wrap: wrap; }

.x-toast { position: fixed; z-index: 60; left: 50%; top: 70px; transform: translate(-50%, -20px); opacity: 0; background: var(--night); color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 700; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); }
.x-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phones */
@media (max-width: 760px) {
  :root { --guide: 128px; }
  body.d1 { font-size: 17px; }
  .x-say { font-size: 18px; }
  .x-station.split, .x-work { grid-template-columns: 1fr; }
  .x-guide { flex-wrap: wrap; gap: 8px 10px; padding-top: 10px; }
  .x-gface { width: 46px; height: 46px; }
  .x-gtext p { font-size: 17px; }
  .x-gbtns { width: 100%; justify-content: space-between; }
  .x-gb span { display: none; }
  .x-gb.x-next span { display: inline; }
  .x-gb.x-next { flex: 1; justify-content: center; }
  .x-legend { grid-template-columns: 1fr; }
  .x-legend .x-lg { grid-template-columns: auto 1fr; text-align: start; align-items: center; column-gap: 12px; }
  .x-legend .x-lg i { grid-row: span 2; }
}
html.x-calm *,html.x-calm *::before { animation: none !important; transition: none !important; }
.x-cam .x-under { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px; background: linear-gradient(transparent, rgba(8, 12, 50, .75)); }
.x-cam .x-under .x-cap { width: auto; min-width: 70%; }
.x-cam .x-under .x-key { color: #c9cff5; }
.s-teach .x-camstatus { bottom: auto; top: 10px; left: auto; right: 10px; text-align: end; }
.x-gface, .x-popface { background: var(--brand-l); overflow: hidden; display: grid; place-items: center; }
.x-gface img, .x-popface img { width: 100%; height: 100%; object-fit: contain; }
.x-gface img.think, .x-gface img.wow { width: 96%; height: 96%; margin-top: 4%; }

.s-teach .x-cam, .s-test .x-cam, .s-use .x-cam { aspect-ratio: auto; height: min(50vh, 440px); min-height: 260px; }

/* Tutor drawer */
.x-stuckb { border-color: var(--sun); background: var(--sun-l); }
.x-tutor { position: fixed; z-index: 60; right: 16px; bottom: calc(var(--guide) + 12px); width: min(420px, calc(100% - 24px)); max-height: min(70vh, 620px); display: flex; flex-direction: column; background: #fff; border-radius: 24px; border: 3px solid var(--brand); box-shadow: 0 24px 60px rgba(13, 20, 66, .3); animation: pop .25s cubic-bezier(.2, 1.4, .4, 1); overflow: hidden; }
[dir=rtl] .x-tutor { right: auto; left: 16px; }
.x-thead { display: flex; gap: 10px; align-items: center; padding: 12px 44px 12px 14px; background: linear-gradient(135deg, var(--brand), var(--night)); color: #fff; }
[dir=rtl] .x-thead { padding: 12px 14px 12px 44px; }
.x-thead small { display: block; opacity: .85; font-size: 13px; line-height: 1.3; }
.x-tutor .x-x { color: #fff; }
.x-tlog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.x-tmsg { max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: 16px; line-height: 1.45; }
.x-tmsg p { margin: 0; }
.x-tmsg.bot { background: var(--brand-l); align-self: flex-start; border-end-start-radius: 4px; }
.x-tmsg.me { background: var(--sun-l); align-self: flex-end; border-end-end-radius: 4px; }
.x-tmsg.wait p { animation: blink 1s infinite; }
.x-tmsg .x-chip { margin-top: 6px; }
@keyframes blink { 50% { opacity: .3; } }
.x-tchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.x-tform { display: flex; gap: 6px; padding: 10px 12px 12px; border-top: 2px solid var(--line); }
.x-tform input { flex: 1; min-width: 0; min-height: 44px; border: 2px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; }
.x-tmic { min-width: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 18px; }
.x-tmic.on { border-color: var(--no); animation: blink 1s infinite; }
@media (max-width: 760px) { .x-tutor { right: 8px; left: 8px; width: auto; bottom: calc(var(--guide) + 8px); max-height: 62vh; } }

/* ---------- game feel (v0.22) ---------- */
.x-path { position: absolute; inset: 50% -10px auto; transform: translateY(-50%); display: flex; justify-content: space-between; list-style: none; margin: 0; padding: 0; pointer-events: none; }
.x-path li { width: 20px; height: 20px; border-radius: 50%; background: #e2e5f6; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(13, 20, 66, .18); display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 900; transition: background .4s, transform .4s; }
.x-path li.seen { background: #c9d0ff; }
.x-path li.done { background: var(--sun); }
.x-path li.done::after { content: '✓'; color: var(--ink); }
.x-path li.now { background: var(--brand); transform: scale(1.35); box-shadow: 0 0 0 0 rgba(34, 54, 224, .45); animation: xnode 1.8s ease-out infinite; }
.x-path li.now::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.x-path li:last-child { border-radius: 6px; }
@keyframes xnode { 0% { box-shadow: 0 0 0 0 rgba(34, 54, 224, .45); } 70% { box-shadow: 0 0 0 10px rgba(34, 54, 224, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 54, 224, 0); } }
.x-xp { display: inline-flex; align-items: center; gap: 4px; min-width: 64px; height: 40px; padding: 0 12px; border-radius: 99px; background: var(--sun-l); color: var(--ink); font-family: var(--head); font-weight: 800; font-size: 18px; box-shadow: inset 0 0 0 2px var(--sun); }
.x-xp.bump { animation: xbump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes xbump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.x-flystar { position: fixed; z-index: 90; font-size: 34px; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(255, 200, 61, .8)); transform: translate(-50%, -50%); }
.x-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 89; }
.x-clear { position: fixed; z-index: 88; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.6); opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 30px 16px; border-radius: 26px; background: linear-gradient(160deg, #2236e0, #0d1442); color: #fff; box-shadow: 0 20px 60px rgba(13, 20, 66, .45), inset 0 0 0 3px rgba(255, 200, 61, .7); animation: xclear .45s cubic-bezier(.3, 1.5, .5, 1) forwards; pointer-events: none; }
.x-clear img { width: 86px; height: 86px; object-fit: contain; margin-top: -54px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.x-clear b { font-family: var(--head); font-size: 26px; }
.x-clear span { color: var(--sun); font-weight: 800; font-size: 18px; }
.x-clear.out { transition: opacity .35s, transform .35s; opacity: 0 !important; transform: translate(-50%, -60%) scale(.9) !important; }
@keyframes xclear { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.x-enter > * { animation: xrise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes xrise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.x-fb.ok { animation: xpopin .4s cubic-bezier(.3, 1.5, .5, 1); }
.x-fb.shake { animation: xshake .45s ease; }
@keyframes xpopin { from { transform: scale(.94); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes xshake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.x-gb.x-next.ready { position: relative; overflow: hidden; }
.x-gb.x-next.ready::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: xshine 2.6s ease-in-out 1s infinite; }
@keyframes xshine { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.x-gb:active, .x-agebtn:active, .x-mcard:active { transform: scale(.96); }
.x-gface img { animation: xfloat 3.2s ease-in-out infinite; }
@keyframes xfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.x-mcard { transition: transform .2s; }
.x-mcard:hover { transform: translateY(-4px) rotate(-1deg); }
@media (max-width: 560px) { .x-xp { min-width: 0; height: 34px; padding: 0 9px; font-size: 16px; } .x-path { inset: 50% -4px auto; } .x-path li { width: 11px; height: 11px; border-width: 2px; } .x-path li.now { transform: scale(1.25); } .x-path li.done::after, .x-path li.now::after { display: none; } .x-clear b { font-size: 22px; } }
html.x-calm .x-enter > *,html.x-calm .x-fb.ok,html.x-calm .x-fb.shake,html.x-calm .x-xp.bump,html.x-calm .x-clear,html.x-calm .x-path li.now,html.x-calm .x-gface img,html.x-calm .x-gb.x-next.ready::after { animation: none !important; }
html.x-calm .x-clear { opacity: 1; transform: translate(-50%, -50%); }

/* level banners (v0.22.2) */
.x-banner { position: relative; overflow: hidden; border-radius: 26px; height: clamp(110px, 16vw, 180px); margin-bottom: 14px; background: linear-gradient(160deg, #2236e0, #0d1442); box-shadow: 0 10px 30px rgba(13, 20, 66, .18); }
.x-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; display: block; animation: xkb 18s ease-in-out infinite alternate; }
.x-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(13, 20, 66, .25)); pointer-events: none; }
@keyframes xkb { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-2%); } }
@media (max-width: 560px) { .x-banner { border-radius: 20px; } }
html.x-calm .x-banner img { animation: none; }
/* ---------- Nova flipbook ---------- */
.x-nova { background-repeat: no-repeat; aspect-ratio: var(--ar, .8); height: 100%; margin: 0 auto; }
.x-gface .x-nova { height: 112%; margin-top: 10%; }
.x-gface.happy .x-nova, .x-gface.talk .x-nova { animation: xfloat 3.2s ease-in-out infinite; }
.x-popface .x-nova { height: 108%; margin-top: 12%; }
.x-clear .x-nova { height: 120px; margin-top: -84px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3)); }
.x-gface.oops { border-color: #ff8a5b; }
.x-gface.point, .x-gface.wow { border-color: var(--mint, #22c58b); }
/* ---------- 2.5D living room ---------- */
.x-par { --px: 0; --py: 0; position: relative; height: clamp(210px, 30vw, 330px); border-radius: 28px; overflow: hidden; background: #cfe3ff; isolation: isolate; }
.x-par > * { position: absolute; will-change: transform; }
.x-par .l0 { inset: -6%; width: 112%; height: 112%; object-fit: cover; transform: translate(calc(var(--px) * -10px), calc(var(--py) * -6px)) scale(1.02); transition: opacity .22s; }
.x-par .l0.swap { opacity: 0; }
.x-par .l1 { inset: 0; transform: translate(calc(var(--px) * -22px), calc(var(--py) * -12px)); }
.x-par .l1 img { position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); width: calc(var(--w) * 70%); max-width: 120px; translate: -50% -50%; animation: xbob 4.5s ease-in-out infinite; animation-delay: calc(var(--d) * -1); filter: drop-shadow(0 6px 8px rgba(13, 20, 66, .18)); }
.x-par .l2 { left: 6%; bottom: 4%; height: 78%; transform: translate(calc(var(--px) * -34px), calc(var(--py) * -16px)); filter: drop-shadow(0 10px 14px rgba(13, 20, 66, .28)); }
.x-par .l3 { right: -4%; bottom: -8%; width: min(64%, 620px); transform: translate(calc(var(--px) * -48px), calc(var(--py) * -20px)); }
@keyframes xbob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(5deg); } }
[dir=rtl] .x-par .l2 { left: auto; right: 6%; }
[dir=rtl] .x-par .l3 { right: auto; left: -4%; transform: scaleX(-1) translate(calc(var(--px) * 48px), calc(var(--py) * -20px)); }
@media (max-width: 560px) { .x-par { height: 200px; border-radius: 22px; } .x-par .l3 { width: 78%; right: -16%; } .x-par .l2 { height: 72%; } }
html.x-calm .x-par .l1 img,html.x-calm .x-gface .x-nova { animation: none !important; }
/* ---------- picture word cards + stickers ---------- */
.x-wcard { flex: none; width: 104px; height: 104px; border-radius: 22px; background: linear-gradient(160deg, #eef1ff, #fff); box-shadow: inset 0 0 0 3px var(--brand-l, #dfe4ff); display: grid; place-items: center; animation: xflip .5s cubic-bezier(.3, 1.4, .5, 1); transform-origin: 50% 100%; }
.x-wcard img { width: 92%; height: 92%; object-fit: contain; }
@keyframes xflip { from { transform: perspective(500px) rotateY(-80deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) { .x-wcard { width: 76px; height: 76px; } }
.x-clear .x-stk { position: absolute; right: -26px; top: -30px; width: 74px; height: 74px; transform: rotate(12deg); animation: xslap .5s .25s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
@keyframes xslap { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(12deg); opacity: 1; } }
.x-stbook { margin: 18px 0 6px; padding: 16px 18px 20px; border-radius: 24px; background: repeating-linear-gradient(0deg, #fffdf5 0 26px, #f4eedb 26px 27px); box-shadow: 0 10px 30px rgba(13, 20, 66, .1), inset 0 0 0 2px #efe6c8; }
.x-stbook small { font-weight: 800; color: var(--navy, #0d1442); letter-spacing: .02em; }
.x-stgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 120px)); justify-content: center; gap: 14px; margin-top: 10px; }
.x-st { aspect-ratio: 1; display: grid; place-items: center; }
.x-st img { width: 100%; filter: grayscale(1) brightness(1.6) opacity(.28); }
.x-st.got img { filter: drop-shadow(0 4px 6px rgba(13, 20, 66, .25)); transform: rotate(var(--r)); animation: xpeel .55s calc(var(--i) * .12s + .3s) cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes xpeel { from { transform: scale(1.8) rotate(-30deg); opacity: 0; } to { transform: rotate(var(--r)); opacity: 1; } }
@media (max-width: 560px) { .x-stgrid { grid-template-columns: repeat(3, 1fr); } }
html.x-calm .x-wcard,html.x-calm .x-clear .x-stk,html.x-calm .x-st.got img { animation: none !important; }
/* ---------- morph scrubber ---------- */
.x-morph { margin: 6px 0 16px; padding: 10px; border-radius: 24px; background: #0d1442; display: grid; grid-template-columns: minmax(0, 190px) 1fr; gap: 14px; align-items: center; box-shadow: 0 12px 30px rgba(13, 20, 66, .25); }
.x-mstage { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; }
.x-mstage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.x-mlab { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(13, 20, 66, .78); color: #ffc83d; font-weight: 800; font-size: 14px; text-align: center; }
.x-mlab.pop { animation: xpopin .35s cubic-bezier(.3, 1.6, .5, 1); }
.x-mslide { display: flex; flex-direction: column; gap: 12px; color: #fff; font-weight: 800; font-size: 18px; font-family: var(--head); }
.x-mslide input { width: 100%; height: 34px; accent-color: #ffc83d; cursor: grab; }
@media (max-width: 560px) { .x-morph { grid-template-columns: 120px 1fr; padding: 10px; gap: 10px; } .x-mlab { font-size: 11px; padding: 4px 6px; } .x-mslide { font-size: 15px; } }
/* ---------- motion comic ---------- */
body.x-comicon { overflow: hidden; }
.x-comic { position: fixed; inset: 0; z-index: 120; background: radial-gradient(circle at 50% 30%, #1b2a8f, #0d1442 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: xfade .3s ease; }
.x-comic.bye { opacity: 0; transition: opacity .3s; }
.x-cpanel { position: relative; width: min(92vw, 760px); aspect-ratio: 4 / 3; max-height: 62vh; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 4px #fff, 0 24px 60px rgba(0, 0, 0, .5); cursor: pointer; }
.x-cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: xcin .55s cubic-bezier(.2, .9, .3, 1) both, xkb2 7s ease-out both; }
.x-cimg.r { animation: xcinr .55s cubic-bezier(.2, .9, .3, 1) both, xkb2 7s ease-out both; }
.x-cimg.out { animation: xcout .45s ease both; }
@keyframes xcin { from { transform: translateX(40%) rotate(3deg) scale(1.1); opacity: 0; } }
@keyframes xcinr { from { transform: translateX(-40%) rotate(-3deg) scale(1.1); opacity: 0; } }
@keyframes xcout { to { transform: scale(.85); opacity: 0; } }
@keyframes xkb2 { from { scale: 1.12; } to { scale: 1; } }
@keyframes xfade { from { opacity: 0; } }
.x-ccap { max-width: 640px; margin: 0; padding: 12px 18px; border-radius: 18px; background: #fff; color: #0d1442; font: 800 clamp(17px, 2.4vw, 22px)/1.35 var(--head); text-align: center; box-shadow: 0 8px 0 #ffc83d; }
.x-ccap.in { animation: xpopin .4s cubic-bezier(.3, 1.6, .5, 1); }
.x-cbar { display: flex; align-items: center; gap: 12px; }
.x-cdots { display: flex; gap: 6px; } .x-cdots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .3); } .x-cdots i.on { background: #ffc83d; }
.x-cskip { color: #fff !important; border-color: rgba(255, 255, 255, .4) !important; background: transparent !important; }
html.x-calm .x-cimg,html.x-calm .x-cimg.r,html.x-calm .x-ccap.in,html.x-calm .x-mlab.pop,html.x-calm .x-comic { animation: none !important; }
/* ---------- ages 5-7 (Spark look): bigger targets, fewer words, pictures first ---------- */
body[data-band=s] .x-head h1 { font-size: clamp(26px, 4.4vw, 40px); }
body[data-band=s] .x-say { font-size: clamp(19px, 2.6vw, 24px); line-height: 1.45; }
body[data-band=s] .x-opt, body[data-band=s] .x-btn { min-height: 58px; font-size: 19px; border-radius: 20px; }
body[data-band=s] .x-gb { min-height: 52px; }
body[data-band=s] .x-gtext p { font-size: 18px; }
body[data-band=s] .x-gface { width: 76px; height: 76px; }
body[data-band=s] .x-tip, body[data-band=s] .x-small.x-note { display: none; }
body[data-band=s] .x-mslide span { font-size: 15px; }
body[data-band=s] .x-mslide input { height: 48px; }
.x-agebtn[data-b=s] { background: linear-gradient(160deg, #fff7dc, #fff); }
/* ---------- living journey map ---------- */
.x-mapb { border: 0; background: #fff; border-radius: 14px; width: 40px; height: 40px; font-size: 20px; box-shadow: 0 3px 0 var(--line); cursor: pointer; flex: none; }
.x-pbar, .x-xp { cursor: pointer; }
.x-jmap { position: fixed; inset: 0; z-index: 110; background: rgba(13, 20, 66, .82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px; animation: xfade .25s ease; }
.x-jmap.bye { opacity: 0; transition: opacity .3s; }
.x-jbox { position: relative; width: min(94vw, 78vh, 760px); aspect-ratio: 1; border-radius: 50%; animation: xjin .6s cubic-bezier(.2, 1.2, .4, 1); }
.x-jbox > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .9), 0 0 80px rgba(255, 200, 61, .35); }
@keyframes xjin { from { transform: scale(.6) rotate(-20deg); opacity: 0; } }
.x-pin { position: absolute; translate: -50% -50%; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; animation: xpinin .45s calc(var(--i) * .07s + .3s) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes xpinin { from { transform: scale(0); opacity: 0; } }
.x-pin i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--head); background: #fff; color: #2236e0; box-shadow: 0 0 0 3px #2236e0, 0 6px 12px rgba(0, 0, 0, .35); }
.x-pin span { max-width: 120px; padding: 2px 8px; border-radius: 10px; background: rgba(13, 20, 66, .85); color: #fff; font: 700 11px/1.2 var(--body, sans-serif); text-align: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.x-pin:hover span, .x-pin:focus-visible span, .x-pin.now span { opacity: 1; }
.x-pin.done i { background: #ffc83d; box-shadow: 0 0 0 3px #fff, 0 0 18px #ffc83d; }
.x-pin.now i { background: #22c58b; color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgba(34, 197, 139, .35); animation: xnode 1.4s ease-in-out infinite; }
.x-pin.lock { cursor: default; } .x-pin.lock i { background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); filter: grayscale(1); font-size: 13px; }
.x-jnova { position: absolute; bottom: 30px; height: 64px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); pointer-events: none; }
.x-jbar { display: flex; align-items: center; gap: 14px; color: #fff; font-family: var(--head); font-size: 20px; }
.x-jbar span { color: #ffc83d; font-weight: 800; }
@media (max-width: 560px) { .x-pin i { width: 28px; height: 28px; font-size: 13px; } .x-pin span { display: none; } .x-pin.now span { display: block; } .x-jnova { height: 48px; bottom: 26px; } .x-mapb { width: 34px; height: 34px; font-size: 17px; } }
html.x-calm .x-jbox,html.x-calm .x-pin,html.x-calm .x-pin.now i,html.x-calm .x-jmap { animation: none !important; }
/* inventor avatar + level badges */
.x-avpick { margin: 22px 0 4px; padding-top: 18px; border-top: 2px dashed rgba(34, 54, 224, .15); text-align: center; }
.x-avpick h2 { margin-bottom: 10px; }
.x-avrow { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
.x-av { aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: #0d1442; cursor: pointer; box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(13, 20, 66, .25); transition: transform .18s, box-shadow .18s; animation: xpopin .4s calc(var(--i) * .05s) both; }
.x-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-av:hover { transform: translateY(-3px) scale(1.06); }
.x-av.on { box-shadow: 0 0 0 4px #ffc83d, 0 0 0 8px rgba(255, 200, 61, .35), 0 8px 18px rgba(13, 20, 66, .3); transform: scale(1.1); }
@media (max-width: 560px) { .x-avrow { grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 340px; } }
.x-avc { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #ffc83d; cursor: pointer; flex: none; animation: xpopin .35s both; }
@media (max-width: 560px) { .x-avc { width: 34px; height: 34px; } }
.x-pin.done i { overflow: visible; }
.x-pin .x-bd { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.x-pin.done i:has(.x-bd) { background: none; box-shadow: none; width: 48px; height: 48px; }
.x-jav { position: absolute; left: 50%; bottom: 100%; translate: 30% -4px; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #ffc83d, 0 4px 10px rgba(0, 0, 0, .4); pointer-events: none; }
/* generated sign art instead of emoji */
.x-sgi { width: 1.6em; height: 1.6em; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 3px 4px rgba(13, 20, 66, .22)); }
.x-mcard .x-sgi { width: 76px; height: 76px; transition: transform .25s; } .x-mcard:hover .x-sgi { transform: rotate(-6deg) scale(1.08); }
.x-tab .x-sgi { width: 44px; height: 44px; } .x-lg .x-sgi { width: 64px; height: 64px; } .x-irow .x-sgi { width: 52px; height: 52px; }
@media (max-width: 560px) { .x-mcard .x-sgi { width: 56px; height: 56px; } }
.x-icard { position: relative; }
.x-icav { position: absolute; top: -26px; inset-inline-end: 18px; width: 78px; height: 78px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #ffc83d, 0 8px 18px rgba(13, 20, 66, .3); animation: xpopin .5s .3s both; }
/* galleries: real-life uses and real jobs */
.x-gal { margin: 22px 0 8px; }
.x-gal h3 { font-family: var(--head); font-size: 21px; margin: 0 0 10px; }
.x-galrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 14px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; }
.x-gcard { position: relative; scroll-snap-align: start; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: #0d1442; color: #fff; text-align: start; cursor: pointer; box-shadow: 0 8px 18px rgba(13, 20, 66, .18); transition: transform .2s, box-shadow .2s; animation: xpopin .4s calc(var(--i) * .05s) both; }
.x-gcard img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .5s; }
.x-gcard span { display: block; padding: 10px 12px 12px; font: 700 14px/1.35 var(--body, sans-serif); }
.x-gcard i { position: absolute; top: 8px; inset-inline-end: 8px; font-style: normal; background: rgba(255, 255, 255, .92); border-radius: 99px; padding: 3px 7px; font-size: 14px; }
.x-gcard:hover { transform: translateY(-3px); } .x-gcard:hover img { transform: scale(1.06); }
.x-gcard.on { box-shadow: 0 0 0 4px #ffc83d, 0 10px 22px rgba(13, 20, 66, .3); }
body[data-band=s] .x-gcard span { font-size: 16px; }
/* proud moment: show a grown-up + invention card */
.x-proud { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 18px 0 6px; }
.x-showb { font-size: 19px; padding: 14px 26px; box-shadow: 0 0 0 4px rgba(255, 200, 61, .55), 0 10px 22px rgba(34, 54, 224, .35); }
.x-show { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(13, 20, 66, .7); backdrop-filter: blur(6px); animation: xpopin .3s both; padding: 12px; }
.x-show.bye { opacity: 0; transition: opacity .3s; }
.x-showbox { position: relative; overflow: hidden; width: min(960px, 100%); max-height: 96vh; overflow-y: auto; border-radius: 30px; padding: 34px 26px 22px; color: #fff; text-align: center; background: #0d1442; box-shadow: 0 0 0 5px #ffc83d, 0 30px 60px rgba(0, 0, 0, .5); }
.x-showbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; pointer-events: none; }
.x-showbox > *:not(.x-showbg) { position: relative; }
.x-showav { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 5px #ffc83d; }
.x-showbox h2 { font-family: var(--head); font-size: clamp(30px, 5vw, 48px); margin: 12px 0 6px; color: #fff; }
.x-showbox p { font-size: 19px; font-weight: 700; color: #dfe4ff; margin: 0 auto 18px; max-width: 620px; }
.x-showrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.x-showsign { position: relative; background: rgba(255, 255, 255, .1); border: 2px solid var(--c); border-radius: 22px; padding: 14px 10px; display: grid; justify-items: center; gap: 4px; animation: xpopin .45s calc(var(--i) * .12s + .2s) both; }
.x-showsign .x-sgi { width: 110px; height: 110px; }
.x-showsign b { font-family: var(--head); font-size: 24px; } .x-showsign small { color: #dfe4ff; font-weight: 700; }
.x-showsign canvas { position: absolute; top: 8px; inset-inline-end: 8px; width: 58px; height: 58px; border-radius: 12px; box-shadow: 0 0 0 2px var(--c); }
.x-showstats { display: flex; justify-content: center; gap: 28px; margin: 18px 0 10px; } .x-showstats small { display: block; color: #dfe4ff; font-weight: 700; } .x-showstats b { font: 800 34px var(--head); color: #ffc83d; }
.x-shownova { position: absolute; bottom: 70px; inset-inline-start: 10px; height: 120px; pointer-events: none; }
.x-showbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.x-showbar .x-btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 2px solid rgba(255, 255, 255, .55); box-shadow: none; }
@media (max-width: 560px) { .x-showrow { grid-template-columns: 1fr; } .x-showsign { grid-template-columns: 70px 1fr; text-align: start; justify-items: start; } .x-showsign .x-sgi { width: 64px; height: 64px; grid-row: span 2; } .x-shownova { display: none; } .x-showstats { gap: 16px; } }
.x-showbox > .x-shownova { position: absolute; }
.x-showwords { margin: 14px auto 4px; max-width: 640px; text-align: start; background: rgba(255, 255, 255, .1); border-radius: 18px; padding: 12px 18px; }
.x-showwords h3 { font-family: var(--head); font-size: 18px; color: #ffc83d; margin: 0 0 6px; }
.x-showwords p { margin: 4px 0; font-size: 16px; font-weight: 600; color: #fff; max-width: none; } .x-showwords b { color: #ffc83d; }
.x-showchk { color: #7ff0c5 !important; }

.x-vid{background:#0f1b3d;border-radius:18px;padding:10px;margin:0 0 14px;box-shadow:0 6px 18px rgba(15,27,61,.25)}
.x-vidh{display:flex;justify-content:space-between;align-items:center;color:#fff;padding:2px 6px 8px;gap:8px}
.x-vidh .x-small{color:#ffd84d}
.x-vid video{width:100%;display:block;border-radius:12px;aspect-ratio:16/9;background:#000}
.x-showbar a.x-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
/* Nova: calm poses + slow natural motion (replaces fast flipbook) */
.x-nova { transition: opacity .14s ease; transform-origin: 50% 90%; }
.x-nova.nv-fade { opacity: .15; }
.x-nova.nv-idle { animation: nvIdle 4.2s ease-in-out infinite; }
.x-nova.nv-talk { animation: nvTalk 1.1s ease-in-out infinite; }
.x-nova.nv-hop { animation: nvHop .9s cubic-bezier(.3,.7,.4,1) 1, nvIdle 4.2s ease-in-out .9s infinite; }
.x-nova.nv-tilt { animation: nvTilt 1.2s ease-in-out 1, nvIdle 4.2s ease-in-out 1.2s infinite; }
.x-nova.nv-sway { animation: nvSway 2.4s ease-in-out 2, nvIdle 4.2s ease-in-out 4.8s infinite; }
.x-nova.nv-ponder { animation: nvPonder 3.6s ease-in-out infinite; }
@keyframes nvIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3%); } }
@keyframes nvTalk { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-1.5%) scale(1.015); } 60% { transform: translateY(0) scale(.995); } }
@keyframes nvHop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-12%) scale(1.04); } 65% { transform: translateY(0) scale(.98, 1.02); } 100% { transform: none; } }
@keyframes nvTilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 65% { transform: rotate(3deg); } }
@keyframes nvSway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg) translateY(-2%); } }
@keyframes nvPonder { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-2.5deg) translateY(-2%); } }
.x-gface.happy .x-nova, .x-gface.talk .x-nova { animation: none; }
.x-gface .x-nova.nv-idle { animation: nvIdle 4.2s ease-in-out infinite; }
.x-gface .x-nova.nv-talk { animation: nvTalk 1.1s ease-in-out infinite; }
html.x-calm .x-nova { animation: none !important; }
/* Journey map v2: a clear vertical trail (done / you are here / open / locked) */
.x-jbox.x-jlist { width: min(94vw, 520px); aspect-ratio: auto; max-height: 76vh; border-radius: 24px; background: linear-gradient(180deg, #16206b, #0d1442); box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 20px 60px rgba(0, 0, 0, .45); display: flex; flex-direction: column; overflow: hidden; animation: xrise .35s ease both; }
.x-jhead { padding: 16px 20px 10px; color: #fff; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.x-jhead b { font: 800 22px var(--head); } .x-jhead small { color: #ffc83d; font: 700 14px var(--body, sans-serif); }
.x-jsteps { list-style: none; margin: 0; padding: 12px 16px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; position: relative; }
.x-jstep { position: relative; }
.x-jstep:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 31px; top: 52px; height: 12px; width: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.x-jstep.done:not(:last-child)::after { background: #22c58b; }
.x-jrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .06); color: #fff; text-align: start; cursor: pointer; position: relative; }
.x-jrow:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.x-jdot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 16px var(--head); font-style: normal; background: #fff; color: #2236e0; overflow: hidden; }
.x-jdot img { width: 100%; height: 100%; object-fit: cover; }
.x-jtxt { display: flex; flex-direction: column; min-width: 0; }
.x-jtxt b { font: 700 16px/1.25 var(--body, sans-serif); }
.x-jtxt em { font: 700 12px var(--body, sans-serif); font-style: normal; opacity: .8; }
.x-jstep.done .x-jdot { background: #ffc83d; box-shadow: 0 0 0 3px #22c58b; }
.x-jstep.done em { color: #7ff0c2; opacity: 1; }
.x-jstep.now .x-jrow { background: #fff; color: #0d1442; box-shadow: 0 0 0 4px #ffc83d, 0 8px 24px rgba(255, 200, 61, .35); }
.x-jstep.now .x-jdot { background: #2236e0; color: #fff; animation: xnode 1.6s ease-in-out infinite; }
.x-jstep.now em { color: #2236e0; opacity: 1; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.x-jstep.lock .x-jrow { cursor: not-allowed; background: transparent; }
.x-jstep.lock .x-jdot { background: rgba(255, 255, 255, .18); color: #fff; font-size: 15px; }
.x-jstep.lock .x-jtxt { opacity: .55; }
.x-jav2 { position: absolute; inset-inline-end: 10px; width: 42px; height: 42px; border-radius: 50%; border: 3px solid #ffc83d; object-fit: cover; }
.x-jmap .x-jbar { font-size: 16px; }
html.x-calm .x-jstep.now .x-jdot { animation: none; }

/* fix3: single hero picture, what-to-do box, expert details */
.x-heroimg { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 10; max-height: 380px; width: 100%; background: #dfe8ff; box-shadow: var(--sh); }
.x-heroimg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
@media (max-width: 640px) { .x-heroimg { aspect-ratio: 4 / 3; } }
.x-heroimg.kb img { animation: xKen 24s ease-in-out infinite alternate; transform-origin: 50% 45%; }
@keyframes xKen { from { transform: scale(1); } to { transform: scale(1.06); } }
.x-heroimg.x-win { box-shadow: 0 0 0 4px #ffc83d, 0 18px 40px rgba(255, 200, 61, .35); }
.x-todo { background: #fffbe8; border: 2px solid #ffc83d; border-radius: var(--r); padding: 12px 16px; }
.x-todoh { display: block; font-size: 15px; color: #0d1442; margin-bottom: 4px; }
.x-todo ol { margin: 0; padding-inline-start: 22px; }
.x-todo li { margin: 4px 0; font-weight: 700; color: #1b2366; }
details.x-k { background: #fff; border-radius: var(--r); padding: 12px 16px; box-shadow: var(--sh); }
details.x-k summary { cursor: pointer; font-weight: 750; color: #3a4596; }
details.x-k[open] summary { margin-bottom: 8px; }
html.x-calm .x-heroimg.kb img { animation: none; }
.x-heroimg.x-win img { object-position: 50% 22%; }
.x-bawrap { background: #eafff4; border: 2px solid #22c58b; border-radius: var(--r); padding: 12px 14px; }
.x-bah { display: block; font-size: 17px; color: #0b6b4a; margin-bottom: 8px; }
.x-bawrap .x-ba { margin-top: 0; }

/* fix5: label beside the picture (never on the hand), real numbers, movable Nova buddy, sheets, age-band extras */
.x-morph { grid-template-rows: auto auto; }
.x-mstage { grid-row: 1 / span 2; }
.x-morph .x-mlab { position: static; grid-column: 2; grid-row: 1; align-self: end; background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .35); font-size: 16px; text-align: start; }
.x-morph .x-mslide { grid-column: 2; grid-row: 2; align-self: start; }
.x-mnums { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.x-mnums i { position: absolute; translate: -50% -135%; font: 800 10px/1 ui-monospace, Menlo, monospace; font-style: normal; color: #0d1442; background: #ffc83d; padding: 2px 4px; border-radius: 6px; white-space: nowrap; }
@media (max-width: 560px) { .x-morph { grid-template-columns: 150px 1fr; } .x-morph .x-mlab { font-size: 13px; } .x-mnums i { font-size: 8px; padding: 1px 3px; } }
.x-guide .x-gtext { padding-inline-start: 4px; }
.x-buddy { position: fixed; z-index: 45; right: 14px; bottom: calc(var(--guide) + 14px); width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #dfe6ff); border: 3px solid var(--brand); box-shadow: 0 10px 24px rgba(13, 20, 66, .25); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
[dir=rtl] .x-buddy { right: auto; left: 14px; }
body[data-band=s] .x-buddy { width: 88px; height: 88px; }
.x-buddy.drag { cursor: grabbing; transform: scale(1.08); box-shadow: 0 16px 30px rgba(13, 20, 66, .35); }
.x-buddy.m-hop { animation: bHop 1.1s cubic-bezier(.3, 1.5, .5, 1); }
.x-buddy.m-spin { animation: bSpin 1.1s ease-in-out; }
.x-buddy.m-wiggle { animation: bWig 1s ease-in-out; }
.x-buddy.m-flip { animation: bFlip 1.2s ease-in-out; }
.x-buddy.m-wave { animation: bWave 1.2s ease-in-out; }
@keyframes bHop { 0%, 100% { transform: none; } 30% { transform: translateY(-34px) scale(1.05); } 55% { transform: translateY(0) scale(1.08, .92); } 75% { transform: translateY(-10px); } }
@keyframes bSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes bWig { 0%, 100% { transform: none; } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
@keyframes bFlip { 0% { transform: none; } 50% { transform: translateY(-30px) rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes bWave { 0%, 100% { transform: none; } 25% { transform: rotate(8deg) translateX(4px); } 50% { transform: rotate(-6deg); } 75% { transform: rotate(5deg); } }
.x-bubble { position: fixed; z-index: 46; max-width: min(300px, 70vw); background: #fff; color: #0d1442; border: 2px solid var(--brand); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 15px; line-height: 1.35; box-shadow: 0 12px 28px rgba(13, 20, 66, .2); animation: xpopin .3s ease; transition: opacity .3s; }
.x-bubble.out { opacity: 0; }
.x-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(13, 20, 66, .55); display: grid; place-items: end center; }
.x-sheetc { width: min(640px, 100%); max-height: 86vh; overflow: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); animation: xSheet .3s ease; }
@keyframes xSheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.x-sheeth { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 19px; font-family: var(--head); }
.x-bandwhat { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: #eef2ff; color: #1b2366; font-weight: 750; }
.x-bandwhat:empty { display: none; }
.x-insp { display: block; margin-top: 6px; font: 700 13px/1.4 ui-monospace, Menlo, monospace; color: #3a4596; }
.x-matrix { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); overflow-x: auto; }
.x-matrix table { border-collapse: separate; border-spacing: 4px; margin-top: 6px; }
.x-matrix th { font-size: 13px; text-align: start; padding: 4px 6px; }
.x-matrix td { width: 44px; height: 40px; text-align: center; font: 800 18px var(--head); border-radius: 10px; background: #f2f4fb; }
.x-matrix td.ok { background: #dcfbea; color: #0b6b4a; }
.x-matrix td.bad { background: #ffe1d6; color: #b33a12; }
html.x-calm .x-buddy,html.x-calm .x-bubble,html.x-calm .x-sheetc { animation: none !important; }
.x-mnums i.a { translate: -50% -150%; }
.x-mnums i.b { translate: -50% 55%; }
.x-mnums i.b.l { translate: -12% 55%; }
.x-mnums i.b.r { translate: -88% 55%; }

/* fix7: pictures are never cropped: banners keep their 16:9 shape, square heroes stay square */
.x-banner { height: auto; aspect-ratio: 16 / 9; max-width: 720px; margin-left: auto; margin-right: auto; }
.x-banner img { object-position: center; animation: none; }
.x-heroimg, .x-heroimg.x-win { aspect-ratio: 1 / 1; max-height: none; max-width: 460px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .x-heroimg { aspect-ratio: 1 / 1; } }
.x-heroimg.kb img { animation: none; }

/* fix8: on phones Nova docks in the empty right corner of the bottom bar, so he never covers lesson content */
@media (max-width: 760px) {
  .x-buddy, body[data-band=s] .x-buddy { width: 62px; height: 62px; bottom: calc(var(--guide) - 72px); right: 10px; }
  [dir=rtl] .x-buddy, [dir=rtl] body[data-band=s] .x-buddy { right: auto; left: 10px; }
  .x-guide .x-gtext { padding-inline-end: 68px; }
}

/* fix10: picture answers (ages 5-7) */
.x-opts.pics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.x-opt.pic { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 10px 14px; }
.x-opt.pic img { width: 100%; max-width: 190px; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 14px; background: #fff; }
.x-opt.pic span { font-size: 15px; line-height: 1.25; }
.x-hear { position: absolute; top: 6px; inset-inline-end: 6px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 18px; box-shadow: 0 3px 0 var(--line); }
/* Nova upgrade + Pro Lab invite on the celebrate screen */
.x-novaup { display: flex; gap: 14px; align-items: center; margin: 16px 0; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, #0d1442, #2236e0); color: #fff; }
.x-novaup img { width: 96px; height: 96px; object-fit: cover; border-radius: 18px; flex: none; }
.x-novaup > div > b { display: block; font-family: var(--head); font-size: 17px; line-height: 1.35; }
.x-lvl { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 800; font-size: 13px; }
.x-lvl i { flex: 1; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.x-lvl i b { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffc83d, #22c58b); transition: width 2.2s cubic-bezier(.2, .8, .2, 1); }
.x-proinv { margin: 16px 0; padding: 18px; border-radius: 24px; background: #fff8e1; border: 3px solid #ffc83d; box-shadow: 0 8px 0 #f0b400; display: grid; gap: 12px; }
.x-proinv small { font-weight: 900; color: #8a5a00; text-transform: uppercase; letter-spacing: .04em; }
[dir=rtl] .x-proinv small { letter-spacing: 0; }
.x-proinv p { margin: 6px 0 0; font-weight: 700; font-size: 17px; }
.x-proicons { display: flex; gap: 8px; margin-top: 10px; }
.x-proicons i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--c); font-style: normal; font-size: 26px; overflow: hidden; }
.x-proicons .x-sgi { width: 100%; height: 100%; object-fit: cover; }
.x-btn.x-gold { background: #ffc83d; color: #0d1442; box-shadow: 0 6px 0 #c99400; }
/* Pro Lab */
.x-prohead small { display: block; font-weight: 900; color: #b07a00; margin-bottom: 4px; }
.x-prosteps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 0 0 16px; }
.x-prosteps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; color: #8a90b8; }
.x-prosteps li i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #eef0fb; border: 2px solid var(--line); }
.x-prosteps li.now { color: var(--brand); } .x-prosteps li.now i { background: var(--brand); color: #fff; border-color: var(--brand); }
.x-prosteps li.done { color: #13895f; } .x-prosteps li.done i { background: #22c58b; color: #fff; border-color: #22c58b; }
.x-probrief { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, #0d1442, #3a1f8a); color: #fff; margin-bottom: 14px; }
.x-probrief img { width: 110px; height: 110px; object-fit: cover; border-radius: 18px; flex: none; }
.x-probrief h2 { margin: 0 0 6px; font-size: 21px; } .x-probrief p { margin: 0; font-size: 16px; line-height: 1.4; }
.x-proh { margin: 8px 0 10px; font-size: 19px; }
.x-pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.x-pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 20px; background: #fff; border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line); text-align: center; }
.x-pcard.on { border-color: var(--c); box-shadow: 0 5px 0 var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); }
.x-pcard .x-pimg, .x-examsign .x-pimg { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 46px; background: #fff; }
.x-pcard .x-pimg img, .x-examsign .x-pimg img { width: 100%; height: 100%; object-fit: cover; }
.x-pcard b { font-size: 18px; } .x-pcard small { font-weight: 700; color: #3a4170; } .x-pcard em { font-style: normal; font-size: 13px; color: #6a7099; }
.x-protip { margin: 0 0 10px; }
.x-exam { margin-bottom: 12px; }
.x-examsign { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 20px; border: 3px solid var(--c); background: #fff; }
.x-examsign small { display: block; font-weight: 800; color: #6a7099; } .x-examsign b { display: block; font-size: 24px; font-family: var(--head); } .x-examsign em { font-style: normal; color: #3a4170; }
.x-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.x-dots i { width: 14px; height: 14px; border-radius: 50%; background: #e3e6f5; } .x-dots i.now { background: var(--brand); } .x-dots i.ok { background: #22c58b; } .x-dots i.no { background: #e0245e; }
.x-examres { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px; border-radius: 20px; background: #eefaf4; border: 3px solid #22c58b; }
.x-examres.no { background: #fff1f4; border-color: #e0245e; }
.x-examres b { font-size: 34px; font-family: var(--head); } .x-examres span { font-size: 22px; font-weight: 800; } .x-examres small { font-weight: 700; color: #3a4170; }
.x-upgrade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: center; padding: 16px; border-radius: 24px; background: linear-gradient(135deg, #0d1442, #2236e0); color: #fff; }
.x-upimg img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; }
.x-uptext small { font-weight: 800; color: #ffc83d; } .x-uptext h2 { margin: 4px 0 6px; font-size: 24px; }
.x-upstats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.x-upstats li { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 8px 10px; }
.x-upstats b { display: block; font-size: 18px; } .x-upstats span { font-size: 12px; opacity: .9; }
.x-saved { margin: 12px 0 0; font-weight: 700; font-size: 14px; }
.x-tree { margin: 16px 0; padding: 14px; border-radius: 20px; background: #fff; border: 2px solid var(--line); }
.x-tree h3 { margin: 0 0 10px; } .x-tree ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.x-tree li { display: flex; gap: 10px; align-items: center; font-weight: 700; color: #8a90b8; }
.x-tree li i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #eef0fb; flex: none; }
.x-tree li.on { color: #13895f; } .x-tree li.on i { background: #22c58b; color: #fff; } .x-tree li.next { color: var(--brand); } .x-tree li.next i { background: var(--brand); color: #fff; }
@media (max-width: 640px) { .x-upgrade { grid-template-columns: 1fr; } .x-probrief img { width: 84px; height: 84px; } .x-novaup img { width: 76px; height: 76px; } }
.x-progame .x-pad { position: static; flex-wrap: wrap; gap: 6px; padding: 8px; background: #0d1442; }
.x-progame .x-pad .x-pose { font-size: 14px; padding: 6px 10px; min-height: 40px; }
.x-prostage .x-legend { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.x-prostage .x-legend .x-lg { padding: 8px 10px; grid-template-columns: auto 1fr; text-align: start; align-items: center; column-gap: 10px; }
.x-prostage .x-legend .x-lg i { grid-row: span 2; font-size: 30px; } .x-prostage .x-legend .x-lg b { font-size: 16px; } .x-prostage .x-legend .x-lg span { font-size: 12px; }
.x-prostage .x-legend .x-lg .x-sgi { width: 40px; height: 40px; }
.x-pcard.x-invent { border-style: dashed; border-color: #ff4fa3; background: linear-gradient(160deg, #fff, #fff0f8); }
.x-pcard.x-invent .x-pimg { font-size: 48px; background: #fff0f8; }
.x-pcard.mine .x-pimg i, .x-examsign .x-pimg i { font-style: normal; font-size: 54px; }
.x-pcard .x-pimg i { font-style: normal; }
.x-inv h4 { margin: 14px 0 6px; font-size: 16px; }
.x-invname { width: 100%; font: 700 18px var(--head); padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; }
.x-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.x-chip { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 16px; min-height: 40px; }
.x-chip.on { border-color: var(--brand); background: var(--brand-l); }
.x-invicons .x-chip, .x-invposes .x-chip { font-size: 24px; padding: 4px 10px; }
.x-invpowers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.x-pow { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; text-align: start; align-items: center; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 8px 10px; }
.x-pow i { grid-row: span 2; font-style: normal; font-size: 28px; } .x-pow b { font-size: 15px; } .x-pow small { font-size: 12px; color: #5a618f; }
.x-pow.on { border-color: var(--brand); background: var(--brand-l); box-shadow: 0 3px 0 var(--brand); }
.x-invprev { margin: 14px 0; }
.x-invcard { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; border: 3px solid var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.x-invcard i { font-style: normal; font-size: 44px; } .x-invcard b { display: block; font-size: 20px; font-family: var(--head); } .x-invcard small { color: #3a4170; font-weight: 700; }
.x-invwarn { margin: 8px 0 0; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 12px; }
.x-invwarn.warn { background: #fff4d6; color: #7a5200; } .x-invwarn.ok { background: #e9faf2; color: #0e6b49; }
.x-badges { margin: 16px 0; padding: 14px; border-radius: 20px; background: #fff; border: 2px solid var(--line); }
.x-badges h3 { margin: 0 0 10px; }
.x-badges > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.x-bdg { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 10px 8px; border-radius: 16px; background: #f3f4fb; opacity: .75; }
.x-bdg i { font-style: normal; font-size: 30px; } .x-bdg b { font-size: 14px; } .x-bdg small { font-size: 12px; color: #5a618f; }
.x-bdg.got { background: linear-gradient(160deg, #fff8e1, #ffe9a8); opacity: 1; box-shadow: 0 4px 0 #f0b400; }
.x-opt.pic .x-qemo{font-style:normal;font-size:56px;line-height:1.2;display:block;text-align:center;padding:10px 0}

/* fix11: language toggle, back button, guess row, reward moment, 3-sticker book */
.x-lang { border: 0; background: #fff; border-radius: 14px; min-width: 40px; height: 40px; padding: 0 10px; font-weight: 800; font-size: 17px; color: var(--brand); box-shadow: 0 3px 0 var(--line); cursor: pointer; flex: none; }
.x-gb.x-backb { padding: 6px 12px; }
.x-gb.x-backb[hidden] { display: none; }
.x-pnote { margin: 4px 0 10px; }
.x-guessrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.x-gchip { background: var(--brand-l); color: var(--ink, #0d1442); border-radius: 999px; padding: 6px 14px; font-weight: 800; }
.x-fbrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.x-st i { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px dashed var(--line); color: var(--muted); font-style: normal; font-size: 28px; font-weight: 800; }
.x-st small { display: block; text-align: center; font-weight: 700; font-size: 12px; margin-top: 6px; color: var(--muted); }
.x-st { display: block; }
.x-reward { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(8, 12, 48, .72); animation: xrwin .3s ease both; cursor: pointer; padding: 16px; }
.x-reward.out { transition: opacity .35s; opacity: 0; }
.x-rwbox { position: relative; width: min(360px, 92vw); padding: 34px 24px 22px; border-radius: 30px; text-align: center; color: #fff; background: linear-gradient(160deg, #2236e0, #0d1442); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 0 4px rgba(255, 200, 61, .8); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: xrwpop .6s cubic-bezier(.3, 1.6, .5, 1) both; overflow: visible; }
.x-rwrays { position: absolute; left: 50%; top: 70px; width: 340px; height: 340px; margin: -170px 0 0 -170px; background: repeating-conic-gradient(rgba(255, 200, 61, .22) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: xrwspin 9s linear infinite; pointer-events: none; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.x-rwimg, .x-rwico { position: relative; width: 150px; height: 150px; object-fit: contain; margin-top: -10px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); animation: xrwstk .9s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
.x-rwico { display: grid; place-items: center; font-style: normal; font-size: 96px; }
.x-rwbox small { position: relative; color: var(--sun); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }
.x-rwbox b { position: relative; font-family: var(--head); font-size: 28px; line-height: 1.15; }
.x-rwbox span { position: relative; color: #dfe6ff; font-weight: 700; }
.x-rwbox em { position: relative; margin-top: 10px; font-style: normal; font-size: 14px; opacity: .8; animation: xrwblink 1.6s 1.4s ease-in-out infinite both; }
@keyframes xrwin { from { opacity: 0; } to { opacity: 1; } }
@keyframes xrwpop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes xrwstk { from { transform: scale(0) rotate(-200deg); } 70% { transform: scale(1.2) rotate(8deg); } to { transform: scale(1) rotate(0); } }
@keyframes xrwspin { to { transform: rotate(360deg); } }
@keyframes xrwblink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
html.x-calm .x-reward,html.x-calm .x-rwbox,html.x-calm .x-rwimg,html.x-calm .x-rwico,html.x-calm .x-rwrays,html.x-calm .x-rwbox em { animation: none !important; }

/* fix12: Day 1 ending galaxy reveal */
.x-galaxy { position: fixed; inset: 0; z-index: 115; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, #1b2a8f, #05082a 70%); color: #fff; animation: xrwin .5s ease both; overflow-y: auto; }
.x-galaxy.bye { transition: opacity .35s; opacity: 0; }
.x-gxbox { width: min(560px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.x-gximg { position: relative; width: 100%; border-radius: 24px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: xgxzoom 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.x-gximg img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.x-gxglow { position: absolute; inset: 0; background: radial-gradient(circle at 18% 82%, rgba(255, 200, 61, .55), transparent 22%); animation: xgxpulse 2s ease-in-out infinite; pointer-events: none; }
.x-gxbox h2 { font-family: var(--head); font-size: 28px; margin: 6px 0 0; }
.x-gxbox p { margin: 0; color: #dfe6ff; font-weight: 600; line-height: 1.45; }
.x-gxbar { width: 100%; display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--sun); }
.x-gxbar i { flex: 1; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.x-gxbar b { display: block; height: 100%; width: 0; background: var(--sun); border-radius: 99px; transition: width 1.2s ease; }
.x-gxnext { background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .35); border-radius: 16px; padding: 10px 14px; }
@keyframes xgxzoom { from { transform: scale(1.6); filter: blur(4px); } to { transform: none; filter: none; } }
@keyframes xgxpulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
html.x-calm .x-gximg,html.x-calm .x-gxglow { animation: none !important; }

/* fix13: passion + dream job picker, AI in your world */
.x-passpick { margin: 22px 0 4px; padding-top: 18px; border-top: 2px dashed rgba(34, 54, 224, .15); text-align: center; }
.x-passpick h2 { margin-bottom: 4px; }
.x-passrow { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; max-width: 760px; margin: 10px auto 0; }
.x-pass, .x-job { background: none; border: 0; padding: 2px; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; font: inherit; color: inherit; animation: xpopin .4s calc(var(--i, 0) * .03s) both; }
.x-pass span { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; transition: transform .18s, box-shadow .18s; box-shadow: 0 5px 12px rgba(13, 20, 66, .18); }
.x-pass img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.x-pass b, .x-job b { font-size: 12.5px; line-height: 1.15; text-align: center; font-weight: 700; }
.x-pass.on span { transform: scale(1.1); box-shadow: 0 0 0 4px #ffc83d, 0 0 0 8px rgba(255, 200, 61, .35), 0 8px 18px rgba(13, 20, 66, .3); }
.x-pass.on b, .x-job.on b { color: var(--brand); }
.x-jobpick { margin-top: 20px; }
.x-jobpick h2 { margin-bottom: 4px; }
.x-mtog { display: flex; justify-content: center; gap: 8px; margin: 8px 0 12px; }
.x-mtog .x-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.x-jobrow { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
.x-job img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; display: block; box-shadow: 0 5px 12px rgba(13, 20, 66, .18); transition: transform .18s, box-shadow .18s; }
.x-job.on img { transform: scale(1.06); box-shadow: 0 0 0 4px #ffc83d, 0 0 0 8px rgba(255, 200, 61, .35); }
@media (max-width: 560px) { .x-passrow { grid-template-columns: repeat(4, 1fr); max-width: 340px; } .x-jobrow { grid-template-columns: repeat(3, 1fr); max-width: 340px; } }
.x-yworld { margin: 18px 0; padding: 16px 18px; border-radius: var(--r); background: #fff; box-shadow: 0 8px 22px rgba(13, 20, 66, .1); }
.x-yworld h2 { margin: 0 0 4px; }
.x-ywc { display: flex; gap: 12px; align-items: center; margin-top: 12px; text-align: start; }
.x-ywc img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px #ffc83d; }
.x-ywc b { display: block; font-size: 17px; }
.x-ywc p { margin: 2px 0 0; font-size: 15px; line-height: 1.4; }
.x-galaxy { grid-template-columns: minmax(0, 1fr); }
.x-gxbox { justify-self: center; max-width: 100%; }
.x-gxbar { flex-wrap: wrap; justify-content: center; }
.x-gxbar i { flex: 1 1 140px; min-width: 120px; }

/* fix14: Day 1 ending as a film shot (wide galaxy -> dive through clouds -> our season planet) */
@property --r { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.x-galaxy { place-items: safe center; }
.x-gxbox { width: min(600px, 100%); }
.x-gxsky { position: relative; width: 100%; max-width: min(600px, 62vh); margin: 0 auto; aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: radial-gradient(circle at 50% 60%, #24307e, #0a0f3d 55%, #04061f); box-shadow: 0 20px 60px rgba(0, 0, 0, .5), inset 0 0 60px rgba(120, 90, 255, .25); touch-action: manipulation; cursor: pointer; }
.x-gxstars { position: absolute; inset: -20px; transition: transform .6s ease-out; pointer-events: none; }
.x-gxstars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .7; animation: xgxtw 3.2s ease-in-out infinite; }
.x-gxstars.l0 { animation: xgxdrift 60s linear infinite alternate; }
.x-gxstars.l0 i { width: 1px; height: 1px; opacity: .5; }
.x-gxstars.l1 { animation: xgxdrift 40s linear infinite alternate-reverse; }
.x-gxstars.l2 i { width: 3px; height: 3px; box-shadow: 0 0 6px #fff, 0 0 12px #9cf; }
.x-gxneb { position: absolute; inset: -10%; pointer-events: none; background: radial-gradient(ellipse 40% 25% at 25% 30%, rgba(255, 90, 200, .22), transparent 70%), radial-gradient(ellipse 35% 30% at 78% 60%, rgba(80, 200, 255, .2), transparent 70%), radial-gradient(ellipse 30% 20% at 60% 15%, rgba(255, 200, 61, .14), transparent 70%); animation: xgxneb 24s ease-in-out infinite alternate; transition: transform .8s ease-out; }
.x-gxcam { position: absolute; inset: 0; z-index: 3; transition-property: transform; transition-timing-function: cubic-bezier(.65, 0, .25, 1); will-change: transform; }
.x-gxpath { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity .6s; }
.x-gxpath polyline { fill: none; stroke: rgba(255, 255, 255, .22); stroke-dasharray: 1.2 1.6; vector-effect: non-scaling-stroke; stroke-width: 2px; }
.x-gxpath .lit { stroke: var(--sun, #ffc83d); stroke-dasharray: 6 6; stroke-width: 3px; animation: xgxdash 1.2s linear infinite; filter: drop-shadow(0 0 4px #ffc83d); }
.x-gxp { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; animation: xgxin .7s ease both; animation-delay: calc(var(--d) * .35); transition: opacity .8s, filter .8s; }
.x-gxp img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; pointer-events: none; animation: xgxbob 6s ease-in-out infinite; animation-delay: var(--d); }
.x-gxp:not(.on) img { filter: grayscale(.75) sepia(.25) hue-rotate(185deg) brightness(.72) saturate(.8); }
.x-gxp em { position: absolute; font-style: normal; font-size: clamp(10px, 2.6vw, 16px); bottom: 4%; right: 4%; opacity: .85; }
.x-gxp.next img { filter: grayscale(.4) brightness(.85); }
.x-gxp.next::after { content: ""; position: absolute; inset: -8%; border-radius: 50%; border: 2px dashed rgba(255, 200, 61, .7); animation: xgxspin 9s linear infinite; }
.x-gxp.on { z-index: 2; animation: none; }
/* our planet: a grey, foggy world where the first light spreads real colour */
.x-gxp.on img { animation: xgxbobon 5s ease-in-out infinite; }
.x-gxp.on img.g { filter: grayscale(.85) brightness(.62) sepia(.2) hue-rotate(190deg); }
.x-gxp.on img.c { --r: 20%; -webkit-mask-image: radial-gradient(circle at 46% 58%, #000 var(--r), transparent calc(var(--r) + 16%)); mask-image: radial-gradient(circle at 46% 58%, #000 var(--r), transparent calc(var(--r) + 16%)); transition: --r 2.6s cubic-bezier(.3, .1, .2, 1) .5s; filter: drop-shadow(0 0 10px rgba(255, 200, 61, .5)); }
.s3 .x-gxp.on img.c { --r: 33%; }
.x-gxbeam { position: absolute; left: 46%; top: 58%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff 0 12%, #ffe27a 22%, rgba(255, 200, 61, .5) 40%, transparent 70%); animation: xgxbeam 1.8s ease-in-out infinite; pointer-events: none; }
.x-gxbeam::before { content: ""; position: absolute; inset: -60%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 226, 122, .55) 0 6deg, transparent 6deg 30deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%); animation: xgxspin 7s linear infinite; }
.x-gxp.on::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 61, .28), transparent 65%); animation: xgxpulse 2.4s ease-in-out infinite; }
.x-gxp.tap img { animation: xgxwig .5s ease; }
.x-gxp.on.tap img { animation: xgxjoy .6s ease; }
.x-gxp:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 50%; }
/* "you are here" tag */
.x-gxtag { position: absolute; transform: translate(-50%, -100%); z-index: 4; pointer-events: none; transition: opacity .4s; }
.x-gxtag b { display: block; white-space: nowrap; background: #fff; color: #1b1f4a; font-weight: 900; font-size: clamp(11px, 3vw, 15px); padding: 5px 12px; border-radius: 99px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 200, 61, .8); animation: xgxtag 1.4s ease-in-out infinite; }
/* Nova's rocket flies in during the wide shot */
.x-gxrocket { position: absolute; width: 17%; left: 0; top: 0; z-index: 6; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 10px rgba(255, 160, 60, .8)); }
.s1:not(.still) .x-gxrocket { animation: xgxfly 2.6s cubic-bezier(.4, .1, .3, 1) .3s both; }
/* clouds the camera flies through */
.x-gxclouds { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.x-gxclouds i { position: absolute; width: 90%; height: 45%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .95), rgba(220, 230, 255, .7) 45%, transparent 70%); filter: blur(6px); opacity: 0; }
.x-gxclouds i:nth-child(1) { top: -5%; left: 10%; } .x-gxclouds i:nth-child(2) { top: 30%; left: -30%; } .x-gxclouds i:nth-child(3) { top: 55%; left: 40%; } .x-gxclouds i:nth-child(4) { top: 15%; left: 55%; }
.s2 .x-gxclouds i { animation: xgxcloud 1.3s ease-in both; }
.s2 .x-gxclouds i:nth-child(2n) { animation-delay: .12s; }
.s2 .x-gxp:not(.on), .s3 .x-gxp:not(.on) { opacity: 0; filter: blur(8px); pointer-events: none; }
.s2 .x-gxpath, .s3 .x-gxpath, .s2 .x-gxtag, .s3 .x-gxtag { opacity: 0; }
/* season view: passions orbit the planet, title arrives */
.x-gxorbs { position: absolute; inset: 0; pointer-events: none; }
.x-gxorb { position: absolute; left: 43%; top: 41%; width: 14%; aspect-ratio: 1; object-fit: contain; border-radius: 50%; opacity: 0; transition: opacity .8s .9s; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.s3 .x-gxorb { opacity: 1; }
.x-gxtitle { position: absolute; top: 4%; left: 0; right: 0; z-index: 8; text-align: center; pointer-events: none; opacity: 0; transform: translateY(-12px); transition: opacity .6s 1s, transform .6s 1s; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.x-gxtitle small { display: block; color: #ffe27a; font-weight: 800; letter-spacing: .08em; font-size: clamp(11px, 2.8vw, 14px); text-transform: uppercase; }
.x-gxtitle b { font-family: var(--head); font-size: clamp(20px, 6vw, 32px); color: #fff; }
.s3 .x-gxtitle { opacity: 1; transform: none; }
.x-gxctl { position: absolute; bottom: 3%; left: 0; right: 0; z-index: 8; display: flex; gap: 6px; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .5s 1.2s; }
.s3 .x-gxctl, .still .x-gxctl { opacity: 1; pointer-events: auto; }
.x-gxv { border: 0; border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 800; font-size: clamp(11px, 3vw, 14px); color: #fff; background: rgba(10, 15, 60, .65); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); cursor: pointer; backdrop-filter: blur(4px); }
.x-gxv.on { background: var(--sun, #ffc83d); color: #1b1f4a; }
.x-gxfog { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(10, 15, 60, .55) 78%); }
.x-gxshoot { position: absolute; top: 12%; left: -20%; z-index: 4; width: 90px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff); transform: rotate(18deg); opacity: 0; animation: xgxshoot 9s ease-in 4s infinite; pointer-events: none; }
.x-gxtext { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
.x-gxtext.show { opacity: 1; transform: none; }
@keyframes xgxin { from { opacity: 0; transform: translate(-50%, -50%) scale(.4); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes xgxbob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6%) rotate(2deg); } }
@keyframes xgxbobon { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5%) scale(1.02); } }
@keyframes xgxwig { 0%, 100% { transform: none; } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes xgxjoy { 0%, 100% { transform: none; } 40% { transform: scale(1.1) rotate(5deg); } }
@keyframes xgxtw { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes xgxdrift { from { transform: translateX(-12px); } to { transform: translateX(12px); } }
@keyframes xgxneb { from { transform: translate(-3%, 1%) scale(1); } to { transform: translate(3%, -2%) scale(1.08); } }
@keyframes xgxspin { to { transform: rotate(360deg); } }
@keyframes xgxdash { to { stroke-dashoffset: -12; } }
@keyframes xgxbeam { 0%, 100% { transform: translate(-50%, -50%) scale(.85); } 50% { transform: translate(-50%, -50%) scale(1.15); } }
@keyframes xgxtag { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes xgxfly { 0% { opacity: 0; transform: translate(-10%, 520%) rotate(35deg) scale(1.3); } 12% { opacity: 1; } 80% { opacity: 1; transform: translate(210%, 330%) rotate(70deg) scale(.6); } 100% { opacity: 0; transform: translate(255%, 360%) rotate(80deg) scale(.2); } }
@keyframes xgxcloud { 0% { opacity: 0; transform: scale(.6) translateX(30%); } 40% { opacity: .95; } 100% { opacity: 0; transform: scale(2.4) translateX(-40%); } }
@keyframes xgxshoot { 0% { opacity: 0; transform: translateX(0) rotate(18deg); } 3% { opacity: 1; } 12% { opacity: 0; transform: translateX(160%) translateY(40px) rotate(18deg); } 100% { opacity: 0; } }
html.x-calm .x-gxp,html.x-calm .x-gxp img,html.x-calm .x-gxstars,html.x-calm .x-gxstars i,html.x-calm .x-gxneb,html.x-calm .x-gxshoot,html.x-calm .x-gxp::after,html.x-calm .x-gxp::before,html.x-calm .x-gxpath .lit,html.x-calm .x-gxbeam,html.x-calm .x-gxbeam::before,html.x-calm .x-gxtag b { animation: none !important; }
html.x-calm .x-gxshoot,html.x-calm .x-gxrocket { display: none; }
html.x-calm .x-gxcam { transition: none !important; }

/* fix14: badge pop - coin-spin fly-in to the middle, bounce landing, shine sweep, orbiting sparkles, then the card rises */
.x-rwmedal { position: relative; width: 150px; height: 150px; margin-top: -10px; perspective: 600px; animation: xrwfly 1.1s cubic-bezier(.2, .9, .3, 1.2) both; }
.x-rwmedal .x-rwimg, .x-rwmedal .x-rwico { margin: 0; width: 100%; height: 100%; animation: xrwcoin 1.1s cubic-bezier(.2, .7, .3, 1) both, xrwtilt 4s 1.2s ease-in-out infinite; }
.x-rwshine { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.x-rwshine::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent); transform: skewX(-18deg); animation: xrwshine 2.6s 1.1s ease-in-out infinite; }
.x-rwsp { position: absolute; inset: -22%; pointer-events: none; animation: xgxspin 6s linear infinite; }
.x-rwsp u { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; background: #ffe27a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #ffc83d); opacity: 0; animation: xrwsp 1.6s ease-in-out infinite; }
.x-rwsp u:nth-child(1) { transform: rotate(0deg) translateY(-105px); } .x-rwsp u:nth-child(2) { transform: rotate(60deg) translateY(-105px); animation-delay: .25s; } .x-rwsp u:nth-child(3) { transform: rotate(120deg) translateY(-105px); animation-delay: .5s; }
.x-rwsp u:nth-child(4) { transform: rotate(180deg) translateY(-105px); animation-delay: .75s; } .x-rwsp u:nth-child(5) { transform: rotate(240deg) translateY(-105px); animation-delay: 1s; } .x-rwsp u:nth-child(6) { transform: rotate(300deg) translateY(-105px); animation-delay: 1.25s; }
.x-rwbox > small, .x-rwbox > b, .x-rwbox > span, .x-rwbox > em { animation: xrwrise .5s 1s ease both; }
.x-rwbox { animation: xrwbox .5s ease both; }
.x-reward.fly { background: rgba(8, 12, 48, 0); transition: background .5s; }
.x-reward.fly .x-rwbox { background: transparent; box-shadow: none; transition: background .3s, box-shadow .3s; }
.x-reward.fly .x-rwbox > *:not(.x-rwmedal) { opacity: 0; transition: opacity .2s; }
@keyframes xrwfly { 0% { transform: translateY(-60vh) scale(.15); opacity: 0; } 15% { opacity: 1; } 70% { transform: translateY(10px) scale(1.12, .9); } 85% { transform: translateY(-8px) scale(.96, 1.05); } 100% { transform: none; } }
@keyframes xrwcoin { from { transform: rotateY(-1080deg); } to { transform: rotateY(0); } }
@keyframes xrwtilt { 0%, 100% { transform: rotateY(-14deg) rotate(-2deg); } 50% { transform: rotateY(14deg) rotate(2deg); } }
@keyframes xrwshine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
@keyframes xrwsp { 0%, 100% { opacity: 0; scale: .4; } 50% { opacity: 1; scale: 1.2; } }
@keyframes xrwrise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes xrwbox { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
html.x-calm .x-rwmedal,html.x-calm .x-rwmedal .x-rwimg,html.x-calm .x-rwmedal .x-rwico,html.x-calm .x-rwshine::before,html.x-calm .x-rwsp,html.x-calm .x-rwsp u,html.x-calm .x-rwbox > * { animation: none !important; }
html.x-calm .x-rwsp u { opacity: .8; }

canvas.x-live { position: absolute; display: block; pointer-events: none; max-width: none; }
.x-heroimg.kb canvas.x-live { animation: none; }

/* fix15: Nova's wardrobe */
.x-ward { position: relative; margin: 22px 0; padding: 20px 16px 18px; border-radius: 28px; background: linear-gradient(170deg, #1b2a8f, #0b1040); color: #fff; box-shadow: var(--sh); overflow: hidden; text-align: center; }
.x-ward h2 { font-family: var(--head); margin: 0; font-size: 26px; }
.x-wnote { margin: 4px 0 10px; color: #dfe6ff; font-weight: 600; }
.x-wstage { position: relative; height: 230px; margin: 0 auto 8px; max-width: 420px; }
.x-wspot, .x-wfloor, .x-wstage img { pointer-events: none; }
.x-wspot { position: absolute; left: 50%; top: -30px; width: 260px; height: 300px; transform: translateX(-50%); background: radial-gradient(ellipse 50% 60% at 50% 0, rgba(255, 240, 180, .45), transparent 70%); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); animation: xwspot 4s ease-in-out infinite; }
.x-wfloor { position: absolute; left: 50%; bottom: 6px; width: 220px; height: 34px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 200, 61, .55), rgba(255, 200, 61, .1) 60%, transparent 72%); animation: xwfloor 6s linear infinite; }
.x-wnova { position: absolute; left: 50%; bottom: 16px; height: 200px; width: auto; transform: translateX(-50%); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); animation: xwbob 3s ease-in-out infinite; }
.x-wpet { position: absolute; left: calc(50% + 70px); bottom: 12px; height: 92px; width: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); animation: xwhop 1.8s ease-in-out infinite; }
.x-wgear { position: absolute; left: calc(50% - 150px); top: 24px; height: 80px; width: auto; filter: drop-shadow(0 0 10px rgba(255, 200, 61, .6)); animation: xwfloat 4s ease-in-out infinite; }
[dir=rtl] .x-wpet { left: auto; right: calc(50% + 70px); } [dir=rtl] .x-wgear { left: auto; right: calc(50% - 150px); }
.x-wpuff { position: absolute; left: 50%; bottom: 60px; width: 200px; height: 200px; margin-left: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 226, 122, .6) 35%, transparent 65%); opacity: 0; pointer-events: none; }
.x-wstage.swap .x-wnova { animation: xwspin .8s cubic-bezier(.3, 1.4, .5, 1), xwbob 3s .8s ease-in-out infinite; }
.x-wstage.swap .x-wpuff { animation: xwpuff .7s ease-out; }
.x-wstage.swap-pet .x-wpet { animation: xwdrop .7s cubic-bezier(.3, 1.6, .5, 1), xwhop 1.8s .7s ease-in-out infinite; }
.x-wstage.swap-gear .x-wgear { animation: xwzoom .7s cubic-bezier(.3, 1.6, .5, 1), xwfloat 4s .7s ease-in-out infinite; }
.x-wtabs { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.x-wtab { border: 0; border-radius: 99px; padding: 8px 16px; font: inherit; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; }
.x-wtab.on { background: var(--sun, #ffc83d); color: #1b1f4a; }
.x-wpick { margin: 6px 0 10px; font-weight: 800; color: #ffe27a; animation: xrwblink 1.8s ease-in-out infinite; }
.x-wpick.done { animation: none; color: #bfe9c8; }
.x-wgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .x-wgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.x-witem { position: relative; border: 0; padding: 8px 4px 6px; border-radius: 18px; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: xwin .45s ease both; animation-delay: calc(var(--i) * 40ms); transition: transform .2s, background .2s; }
.x-witem:hover { transform: translateY(-3px) scale(1.03); }
.x-witem span { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.x-witem img { max-width: 92%; max-height: 92%; object-fit: contain; }
.x-witem b { font-size: 12px; line-height: 1.2; }
.x-witem em { position: absolute; top: 4px; inset-inline-start: 4px; font-style: normal; font-size: 10px; font-weight: 900; background: var(--sun, #ffc83d); color: #1b1f4a; padding: 2px 6px; border-radius: 99px; }
.x-witem.fy { box-shadow: inset 0 0 0 2px rgba(255, 200, 61, .8); }
.x-witem.on { background: rgba(255, 200, 61, .3); box-shadow: inset 0 0 0 3px #ffc83d; }
.x-witem.lock img { filter: brightness(0) invert(.35) drop-shadow(0 0 1px #8fa0ff); opacity: .8; }
.x-witem.lock b { opacity: .6; }
.x-witem i { position: absolute; top: 4px; inset-inline-end: 6px; font-style: normal; }
.x-witem.nope { animation: xgxwig .45s ease; }
.x-wtoast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #fff; color: #1b1f4a; font-weight: 800; padding: 8px 14px; border-radius: 99px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); animation: xwin .3s ease both; z-index: 3; width: max-content; max-width: 90%; }
@keyframes xwbob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }
@keyframes xwhop { 0%, 100% { transform: translateY(0) scaleY(1); } 40% { transform: translateY(-16px) scaleY(1.04); } 55% { transform: translateY(0) scaleY(.92); } }
@keyframes xwfloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes xwspin { 0% { transform: translateX(-50%) rotateY(0) scale(.6); } 100% { transform: translateX(-50%) rotateY(720deg) scale(1); } }
@keyframes xwpuff { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes xwdrop { from { transform: translateY(-160px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes xwzoom { from { transform: scale(0) rotate(-180deg); } to { transform: none; } }
@keyframes xwspot { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@keyframes xwfloor { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes xwin { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
html.x-calm .x-ward * { animation: none !important; }

/* fix16: layered celebration scene */
.x-wscene { background: #0b1040; isolation: isolate; cursor: pointer; }
.x-wscene > * { position: absolute; transition: translate .5s ease-out; }
.ws-bg { inset: -4%; } .x-wscene .ws-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: wsdrift 16s ease-in-out infinite alternate; }
.ws-stars { inset: 0; pointer-events: none; } .ws-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff, 0 0 12px #9cf; animation: xgxtw 2.4s ease-in-out infinite; }
.ws-rk { left: 0; top: 0; width: 12%; aspect-ratio: 1; animation: wsfly 6.5s cubic-bezier(.45, .05, .4, 1) infinite; pointer-events: none; }
.x-wscene .ws-rk img { width: 100%; height: auto; transform: rotate(45deg); filter: drop-shadow(0 0 10px rgba(255, 170, 60, .9)); }
.ws-rk::after { content: ""; position: absolute; right: 55%; top: 62%; width: 260%; height: 16%; transform-origin: 100% 50%; transform: rotate(-45deg); border-radius: 99px; background: linear-gradient(270deg, rgba(255, 220, 120, .95), rgba(255, 170, 60, .5) 40%, transparent); filter: blur(2px); z-index: -1; }
.ws-medal { right: 7%; top: 5%; width: 17%; aspect-ratio: 1; transform-origin: 50% -30%; animation: wsswing 3.2s ease-in-out infinite; }
.x-wscene .ws-medal img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 0 14px rgba(255, 200, 61, .8)); animation: wsshine 3.2s ease-in-out infinite; }
.ws-rays { position: absolute; inset: -55%; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 226, 122, .45) 0 8deg, transparent 8deg 24deg); -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%); mask-image: radial-gradient(circle, #000 25%, transparent 68%); animation: xgxspin 10s linear infinite; }
.x-wscene .ws-nova { right: 3%; bottom: 5%; height: 50%; width: auto; max-width: none; object-fit: contain; animation: wsjump 1.3s cubic-bezier(.3, .6, .4, 1) infinite; transform-origin: 50% 100%; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .35)); }
.x-wscene .ws-kid { left: 4%; bottom: -14%; height: 92%; width: auto; max-width: none; object-fit: contain; transform-origin: 50% 100%; animation: wscheer 2.2s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(0, 0, 0, .35)); }
[dir=rtl] .x-wscene .ws-kid { left: auto; right: 4%; } [dir=rtl] .x-wscene .ws-nova { right: auto; left: 3%; } [dir=rtl] .ws-medal { right: auto; left: 7%; }
.ws-conf { inset: 0; pointer-events: none; overflow: hidden; } .ws-conf i { position: absolute; top: -6%; width: 7px; height: 12px; border-radius: 2px; animation: wsconf 4s linear infinite; opacity: .9; }
.x-wscene .ws-nova.yay { animation: wsyay .7s ease, wsjump 1.3s .7s cubic-bezier(.3, .6, .4, 1) infinite; }
.x-wscene .ws-kid.yay { animation: wsyay2 .6s ease, wscheer 2.2s .6s ease-in-out infinite; }
.x-wscene .ws-medal.yay img { animation: wsflip .8s ease; }
@keyframes wsdrift { from { transform: scale(1.06) translate(-1.5%, 0); } to { transform: scale(1.12) translate(1.5%, -1%); } }
@keyframes wsfly { 0% { transform: translate(60%, 520%) scale(.6); opacity: 0; } 8% { opacity: 1; } 55% { transform: translate(520%, 40%) scale(.9); opacity: 1; } 62%, 100% { transform: translate(640%, -60%) scale(.5); opacity: 0; } }
@keyframes wsswing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes wsshine { 0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 200, 61, .6)) brightness(1); } 50% { filter: drop-shadow(0 0 22px rgba(255, 220, 100, 1)) brightness(1.15); } }
@keyframes wsjump { 0%, 100% { transform: translateY(0) scale(1.06, .94); } 15% { transform: translateY(0) scale(1); } 50% { transform: translateY(-22%) scale(.97, 1.04) rotate(4deg); } 85% { transform: translateY(0) scale(1); } }
@keyframes wscheer { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2.5deg) translateY(-2%); } }
@keyframes wsconf { from { transform: translateY(0) rotate(0); } to { transform: translateY(1100%) rotate(720deg); } }
@keyframes wsyay { 0% { transform: none; } 40% { transform: translateY(-30%) rotate(360deg) scale(1.1); } 100% { transform: none; } }
@keyframes wsyay2 { 0%, 100% { transform: none; } 40% { transform: translateY(-6%) scale(1.04); } }
@keyframes wsflip { from { transform: rotateY(0); } to { transform: rotateY(720deg); } }

.x-cam.flashc::before { pointer-events: none; }

/* fix17: feedback card */
.x-fb { border-radius: 22px; padding: 16px 18px; }
.x-fbhead { display: flex; align-items: center; gap: 12px; }
.x-fbic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 22px; color: #fff; background: #19b36b; box-shadow: 0 0 0 5px rgba(25, 179, 107, .18); animation: fbpop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.x-fb.no .x-fbic { background: #ff5a5f; box-shadow: 0 0 0 5px rgba(255, 90, 95, .18); }
.x-fbhead b { font-size: 20px; }
@keyframes fbpop { from { transform: scale(0) rotate(-90deg); } to { transform: none; } }
.x-fbpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.x-ans { border-radius: 16px; padding: 10px 12px; background: #fff; border: 2px solid #e4e7fb; }
.x-ans small { display: block; font-size: 13px; font-weight: 800; color: #7a80a8; text-transform: none; letter-spacing: 0; }
.x-ans span { display: block; font-weight: 800; font-size: 17px; margin-top: 2px; }
.x-ans.bad { border-color: #ffc2c4; background: #fff5f5; } .x-ans.bad span { color: #c0353a; text-decoration: line-through; text-decoration-thickness: 2px; }
.x-ans.good { border-color: #a9e8c8; background: #f1fcf6; } .x-ans.good span { color: #128a52; }
.x-ans.good span::before { content: '✓ '; }
.x-fbwhy2 { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.x-fbwhy2 img { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; animation: nvbob 2.4s ease-in-out infinite; }
.x-fbwhy2 p { position: relative; margin: 0; background: #eef1ff; color: #1d2466; border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 700; line-height: 1.45; }
[dir=rtl] .x-fbwhy2 p { border-radius: 18px 18px 4px 18px; }
.x-fbwhy2 p b { color: #3b46e0; }
@keyframes nvbob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@media (max-width: 520px) { .x-fbpair { grid-template-columns: 1fr; } }
/* explain: right / wrong words */
.x-chip.good { background: #19b36b !important; color: #fff !important; border-color: #19b36b !important; }
.x-chip.bad { background: #ff5a5f !important; color: #fff !important; border-color: #ff5a5f !important; }
.x-sent.wrong { border-color: #ffb3b6 !important; background: #fff7f7; }
.x-sent.wrong .x-blank { color: #c0353a; text-decoration: line-through; }
.x-sent.done .x-blank::after { content: ' ✓'; color: #19b36b; }
.x-shint { margin: 10px 0 0; padding: 8px 12px; border-radius: 14px; background: #fff3d6; color: #7a5200; font-weight: 700; animation: xpopin .3s both; }
/* pro exam */
.x-pred { margin: 12px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 420px; padding: 10px 16px; border-radius: 18px; background: #eef1ff; border: 3px dashed #b9c0f5; transition: background .2s, border-color .2s; }
.x-pred small { font-weight: 800; color: #5a61a0; }
.x-pred b { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.x-pred b .x-sgi { width: 34px; height: 34px; }
.x-pred.match { background: #e5fbef; border: 3px solid #19b36b; }
.x-pred.miss { background: #fff4e5; border-color: #ffb547; }
.x-verdict { position: relative; margin: 14px auto 0; max-width: 520px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #19b36b, #0f8a52); animation: xpopin .35s cubic-bezier(.3, 1.5, .5, 1) both; }
.x-verdict.no { background: linear-gradient(135deg, #ff7a5c, #e0484e); }
.x-verdict small { display: block; font-weight: 800; opacity: .85; }
.x-verdict b { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.x-verdict b .x-sgi { width: 32px; height: 32px; background: #fff; border-radius: 10px; }
.x-verdict > i { font-style: normal; font-size: 26px; }
[dir=rtl] .x-verdict > i { transform: scaleX(-1); }
.x-verdict strong { grid-column: 1 / -1; text-align: center; font-size: 19px; }
/* parent view: one scrolling page, no inner scroll bar */
.x-show { overflow-y: auto; place-items: start center; padding: 16px 10px 40px; }
.x-showbox { max-height: none; overflow: visible; margin: auto; }
.x-pskills, .x-pbadges, .x-pask { margin: 18px auto 0; max-width: 680px; text-align: start; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 22px; padding: 14px 16px; }
.x-pskills h3, .x-pbadges h3, .x-pask h3 { margin: 0 0 10px; font-size: 20px; color: #ffd75e; }
.x-pskill { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-weight: 700; }
.x-pskill:first-of-type { border-top: 0; }
.x-pskill i { font-style: normal; font-size: 22px; } .x-pskill span { flex: 1; } .x-pskill b { color: #5ee6a0; font-size: 20px; }
.x-pbgrid { display: flex; flex-wrap: wrap; gap: 12px; }
.x-pb { width: 92px; text-align: center; animation: pbin .5s calc(var(--i, 0) * .12s) cubic-bezier(.3, 1.6, .5, 1) both; }
.x-pb img { width: 76px; height: 76px; object-fit: contain; animation: pbfloat 3s calc(var(--i, 0) * .3s) ease-in-out infinite; }
.x-pb i { display: grid; place-items: center; margin: 0 auto; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe89a, #f4b400); font-style: normal; font-size: 34px; box-shadow: 0 0 0 4px rgba(255, 215, 94, .3); animation: pbfloat 3s calc(var(--i, 0) * .3s) ease-in-out infinite; }
.x-pb small { display: block; font-weight: 800; font-size: 12px; margin-top: 4px; color: #dfe4ff; }
@keyframes pbin { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@keyframes pbfloat { 50% { transform: translateY(-6px) rotate(4deg); } }
.x-pask p { margin: 6px 0; font-size: 17px; font-weight: 700; color: #fff; max-width: none; }
.x-pask .x-small { color: #b9c0f5; font-size: 14px; }
.x-show::-webkit-scrollbar { width: 8px; } .x-show::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 8px; } .x-show::-webkit-scrollbar-track { background: transparent; }
.x-show { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }

/* fix17: dust motes and light over every living picture */
.x-motes { position: absolute; pointer-events: none; overflow: hidden; z-index: 2; border-radius: inherit; }
.x-motes i { position: absolute; width: calc(7px * var(--s, 1)); height: calc(7px * var(--s, 1)); border-radius: 50%; background: radial-gradient(circle, #fff 0, rgba(255, 236, 160, .9) 35%, rgba(255, 220, 120, 0) 70%); opacity: 0; animation: mote 8s linear infinite; mix-blend-mode: screen; }
@keyframes mote { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .95; } 50% { transform: translate(18px, -60px) scale(1); } 85% { opacity: .8; } 100% { transform: translate(-10px, -130px) scale(.4); opacity: 0; } }
/* every small picture is alive too: cards float, tilt and catch the light (never a still image) */
:where(.x-main, .x-show, .x-sheet) img:where([src*="/pp-"], [src*="/job-"], [src*="/sk-"], [src*="/pet-"], [src*="/gear-"], [src*="/av-"], [src*="/w-"], [src*="/q-"], [src*="/bd-"], [src*="/st-"], [src*="/morph"], [src*="/par-"], [src*="/nova-"], [src*="/sign-"]):not(.x-wscene *):not(.x-sgi) {
  animation: xlife 4.8s ease-in-out infinite alternate; transform-origin: 50% 85%; }
:where(.x-main, .x-show, .x-sheet) :nth-child(3n+1) > img:not(.x-sgi) { animation-delay: -1.6s; }
:where(.x-main, .x-show, .x-sheet) :nth-child(3n+2) > img:not(.x-sgi) { animation-delay: -3.1s; animation-duration: 5.6s; }
@keyframes xlife { 0% { transform: translateY(0) rotate(-1.4deg) scale(1); filter: brightness(1) saturate(1); } 50% { filter: brightness(1.08) saturate(1.12); } 100% { transform: translateY(-6px) rotate(1.4deg) scale(1.035); filter: brightness(1.02) saturate(1.05); } }
.x-sgi { animation: sgibob 3.2s ease-in-out infinite; }
@keyframes sgibob { 50% { transform: translateY(-3px) rotate(-4deg); } }
/* banners: a director's push-in when the scene starts */
.x-banner img, .x-heroimg img { animation: shotin 1.8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes shotin { from { transform: scale(1.25) translateY(3%); filter: blur(3px) brightness(.7); } to { transform: none; filter: none; } }

/* ---------- prologue: the 12 planets ---------- */
.x-prolog { position: fixed; inset: 0; z-index: 95; background: radial-gradient(ellipse at 50% 60%, #1b2380 0%, #0a0e3a 55%, #04061c 100%); color: #fff; overflow: hidden; display: grid; grid-template-rows: 1fr auto; animation: xpopin .4s both; }
.x-prolog canvas.x-psky { position: absolute; inset: 0; width: 100%; height: 100%; }
.x-pstage { position: relative; transition: transform 2.4s cubic-bezier(.6, 0, .2, 1); transform-origin: 50% 50%; }
.x-pring { position: absolute; left: 50%; top: 46%; width: min(86vw, 70vh); aspect-ratio: 1; transform: translate(-50%, -50%); }
.x-pring::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(160, 180, 255, .25); animation: spinR 120s linear infinite; }
.x-pstar { position: absolute; left: 50%; top: 50%; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff7d6 0, #ffd75e 35%, rgba(255, 170, 40, .5) 60%, rgba(255, 150, 0, 0) 72%); animation: pulseS 3s ease-in-out infinite; }
@keyframes pulseS { 50% { transform: translate(-50%, -50%) scale(1.12); } }
@keyframes spinR { to { transform: rotate(360deg); } }
.x-pp { position: absolute; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(0); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), filter 1.2s, opacity 1.2s; }
.x-pp img { width: 100%; height: 100%; object-fit: contain; animation: ppbob 4s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 14px rgba(120, 170, 255, .55)); }
@keyframes ppbob { 50% { transform: translateY(-7%) rotate(6deg); } }
.x-pp em { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-weight: 800; font-size: clamp(10px, 1.6vw, 14px); background: rgba(10, 14, 58, .75); border: 1px solid rgba(160, 180, 255, .4); padding: 2px 8px; border-radius: 99px; opacity: 0; transition: opacity .6s .3s; }
.x-prolog.s1 .x-pp, .x-prolog.s2 .x-pp, .x-prolog.s3 .x-pp, .x-prolog.s4 .x-pp { transform: translate(-50%, -50%) scale(1); transition-delay: var(--d); }
.x-prolog.s1 .x-pp em { opacity: 1; }
.x-prolog.s2 .x-pp, .x-prolog.s3 .x-pp, .x-prolog.s4 .x-pp:not(.lumo) { filter: grayscale(1) brightness(.45) blur(.5px); transition-delay: var(--d), calc(var(--d) * .6), 0s; }
.x-prolog.s4 .x-pp.lumo { filter: grayscale(1) brightness(.6); }
.x-pfog { position: absolute; inset: -20%; background: radial-gradient(ellipse at 30% 40%, rgba(180, 185, 210, .55), transparent 55%), radial-gradient(ellipse at 70% 60%, rgba(150, 155, 185, .5), transparent 55%); opacity: 0; transition: opacity 2.5s; animation: fogd 14s ease-in-out infinite alternate; pointer-events: none; }
@keyframes fogd { to { transform: translate(6%, -4%) scale(1.1); } }
.x-prolog.s2 .x-pfog, .x-prolog.s3 .x-pfog { opacity: 1; }
.x-prolog.s4 .x-pfog { opacity: .55; }
.x-pnova { position: absolute; left: 50%; bottom: 4%; width: min(34vw, 220px); transform: translate(-50%, 130%); transition: transform 1.2s cubic-bezier(.3, 1.4, .5, 1); }
.x-pnova img { width: 100%; filter: brightness(.55) saturate(.4); animation: nvflick 3.2s steps(1) infinite; }
@keyframes nvflick { 0%, 100% { filter: brightness(.55) saturate(.4); } 8% { filter: brightness(1.05) saturate(1); } 11% { filter: brightness(.5) saturate(.4); } 60% { filter: brightness(.6) saturate(.5); } 63% { filter: brightness(1) saturate(1); } 66% { filter: brightness(.55) saturate(.4); } }
.x-prolog.s3 .x-pnova { transform: translate(-50%, 0); }
.x-prolog.s4 .x-pnova { transform: translate(-50%, 0) scale(.8); }
.x-prolog.s4 .x-pnova img { animation: none; filter: none; }
.x-plabel { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); text-align: center; font-weight: 900; letter-spacing: .02em; }
.x-plabel small { display: block; color: #ffd75e; font-size: 14px; }
.x-plabel b { font-family: var(--head); font-size: clamp(22px, 4.5vw, 40px); text-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
.x-pcap { position: relative; z-index: 3; margin: 0 auto 18px; width: min(680px, calc(100% - 24px)); background: rgba(8, 12, 50, .82); border: 2px solid rgba(255, 215, 94, .5); border-radius: 22px; padding: 14px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.x-pcap p { margin: 0 0 10px; font-size: clamp(17px, 2.4vw, 21px); font-weight: 700; line-height: 1.5; min-height: 3em; animation: xpopin .5s both; }
.x-pcap .x-prow { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.x-pcap .x-pdots { display: flex; gap: 6px; } .x-pcap .x-pdots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .3); } .x-pcap .x-pdots i.on { background: #ffd75e; }
.x-pcap .x-link { color: #b9c0f5; }

/* ---------- celebrate: one tidy trophy room ---------- */
.s-celebrate > * { max-width: 880px; margin-left: auto !important; margin-right: auto !important; }
.s-celebrate .x-icard, .s-celebrate .x-novaup, .s-celebrate .x-proinv, .s-celebrate .x-proud, .s-celebrate .x-stbook, .s-celebrate .x-yw, .s-celebrate .x-ward, .s-celebrate .x-gal { margin-top: 22px !important; border-radius: 26px; }
.s-celebrate .x-proud { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.s-celebrate .x-endrow { display: flex; gap: 12px; justify-content: center; margin: 26px auto 10px; }

.x-gxsky canvas.x-psky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* prologue fixes: room for the title, labels take turns on phones, Nova in the middle, Lumo glows as the target */
.x-pring { top: 50%; width: min(84vw, 56vh); }
.x-plabel { top: 3%; z-index: 4; }
@keyframes tagturn { 0% { opacity: 0; } 2% { opacity: 1; } 9% { opacity: 1; } 11% { opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 700px) {
 .x-prolog.s1 .x-pp em { opacity: 0; animation: tagturn 7.2s linear infinite; animation-delay: calc(var(--d) / .16 * .6s); }
 .x-pp em { z-index: 2; font-size: 12px; }
}
.x-pnova { left: 50%; top: 46%; bottom: auto; width: min(40vw, 230px); transform: translate(-50%, -50%) scale(0); z-index: 2; transition: transform 1s cubic-bezier(.3, 1.5, .5, 1); }
.x-prolog.s3 .x-pnova { transform: translate(-50%, -50%) scale(1); }
.x-prolog.s4 .x-pnova { transform: translate(-50%, 40%) scale(.55); }
.x-prolog.s3 .x-pstar { opacity: .15; transition: opacity 1s; }
.x-prolog.s4 .x-pp.lumo { filter: none; }
.x-prolog.s4 .x-pp.lumo::after { content: ''; position: absolute; inset: -18%; border-radius: 50%; border: 3px solid #ffd75e; box-shadow: 0 0 24px #ffd75e; animation: beacon 1.6s ease-out infinite; }
@keyframes beacon { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.x-prolog.s4 .x-pp.lumo img { filter: grayscale(.85) brightness(.75) drop-shadow(0 0 16px #ffd75e); }
.x-prolog.s4 .x-pp.lumo em { opacity: 1; animation: none; }

/* no sideways scroll on phones */
html, body { overflow-x: clip; }
.x-wscene, .x-ward { overflow: hidden; }

/* ---------- fix18: living pictures v3 (film moves + light, no warping) ---------- */
.x-mv { transform-origin: var(--ox, 50%) var(--oy, 50%); will-change: transform; }
.x-mv.mv-push { animation: shotin 1.8s cubic-bezier(.2, .7, .2, 1) both, mvpush 18s 1.8s ease-in-out infinite alternate; }
.x-mv.mv-pan { animation: shotin 1.8s cubic-bezier(.2, .7, .2, 1) both, mvpan 20s 1.8s ease-in-out infinite alternate; }
.x-mv.mv-rise { animation: shotin 1.8s cubic-bezier(.2, .7, .2, 1) both, mvrise 17s 1.8s ease-in-out infinite alternate; }
.x-mv.mv-orbit { animation: shotin 1.8s cubic-bezier(.2, .7, .2, 1) both, mvorbit 28s 1.8s ease-in-out infinite; }
.x-mv.mv-pull { animation: mvpullin 2.2s cubic-bezier(.2, .7, .2, 1) both, mvpull 19s 2.2s ease-in-out infinite alternate; }
@keyframes mvpush { from { transform: scale(1); } to { transform: scale(1.15); } }
@keyframes mvpan { from { transform: scale(1.13) translateX(-3.6%); } to { transform: scale(1.13) translateX(3.6%); } }
@keyframes mvrise { from { transform: scale(1.12) translateY(3%); } to { transform: scale(1.12) translateY(-3%); } }
@keyframes mvorbit { 0%, 100% { transform: scale(1.1) translate(-2%, 1%); } 25% { transform: scale(1.14) translate(2%, -1.2%); } 50% { transform: scale(1.1) translate(2.2%, 1.5%); } 75% { transform: scale(1.14) translate(-1.8%, -1%); } }
@keyframes mvpullin { from { transform: scale(1.3); filter: brightness(.7); } to { transform: scale(1.16); filter: none; } }
@keyframes mvpull { from { transform: scale(1.16); } to { transform: scale(1.02); } }
.x-lfx { position: absolute; pointer-events: none; overflow: hidden; z-index: 2; border-radius: inherit; }
.fx-rays { position: absolute; inset: -30%; background: repeating-conic-gradient(from 160deg at var(--rx, 15%) 0%, rgba(255, 236, 180, 0) 0deg 6deg, rgba(255, 236, 180, .14) 8deg 12deg, rgba(255, 236, 180, 0) 15deg 22deg); filter: blur(10px); mix-blend-mode: screen; animation: fxrays 12s ease-in-out infinite alternate; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%); }
@keyframes fxrays { from { opacity: .35; transform: rotate(-3deg); } to { opacity: .8; transform: rotate(3deg); } }
.fx-bokeh i { position: absolute; width: calc(46px * var(--s, 1)); height: calc(46px * var(--s, 1)); border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .45), rgba(255, 230, 170, .12) 55%, transparent 70%); mix-blend-mode: screen; filter: blur(1.5px); animation: fxbokeh 14s ease-in-out infinite; }
@keyframes fxbokeh { 0% { transform: translate(0, 20px) scale(.8); opacity: 0; } 20% { opacity: .9; } 80% { opacity: .6; } 100% { transform: translate(24px, -70px) scale(1.1); opacity: 0; } }
.fx-flare { position: absolute; width: 38%; aspect-ratio: 1; left: -40%; top: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .55) 0, rgba(255, 220, 140, .25) 18%, rgba(140, 170, 255, .08) 40%, transparent 62%); mix-blend-mode: screen; animation: fxflare 13s ease-in-out infinite; }
@keyframes fxflare { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .9; } 50% { transform: translate(260%, 60%); opacity: .55; } 70%, 100% { transform: translate(330%, 90%); opacity: 0; } }
.x-lfx .gl { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; background: radial-gradient(circle, #fff 0, rgba(255, 255, 255, .9) 8%, transparent 24%), linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, .95) 50%, transparent 54%), linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, .95) 50%, transparent 54%); mix-blend-mode: screen; transform: scale(0); animation: fxglint 4.4s ease-in-out infinite; }
@keyframes fxglint { 0%, 60%, 100% { transform: scale(0) rotate(0); opacity: 0; } 70% { transform: scale(1) rotate(45deg); opacity: 1; } 82% { transform: scale(.4) rotate(90deg); opacity: .6; } }
.fx-warm { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 10%, rgba(255, 200, 110, .35), transparent 60%), radial-gradient(ellipse at 90% 90%, rgba(120, 150, 255, .2), transparent 55%); mix-blend-mode: soft-light; animation: fxwarm 7s ease-in-out infinite alternate; }
@keyframes fxwarm { from { opacity: .35; } to { opacity: 1; } }
.x-motes { display: none !important; }
/* music + language buttons */
.x-mus, .x-lang { border: 0; background: rgba(34, 54, 224, .08); border-radius: 99px; padding: 6px 10px; font-weight: 800; cursor: pointer; }
.x-mus.off { opacity: .45; text-decoration: line-through; }
/* story start card */
.x-pstart { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; background: radial-gradient(ellipse at 50% 45%, rgba(27, 35, 128, .55), rgba(4, 6, 28, .92)); animation: xpopin .5s both; }
.x-pstart.bye { opacity: 0; transform: scale(1.08); transition: opacity .45s, transform .45s; }
.x-pstart small { color: #ffd75e; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.x-pstart h2 { margin: 0; font-family: var(--head); font-size: clamp(30px, 7vw, 56px); color: #fff; text-shadow: 0 6px 30px rgba(120, 150, 255, .6); }
.x-pstart p { margin: 0; max-width: 520px; color: #dfe4ff; font-size: 18px; font-weight: 700; }
.x-plang { display: flex; gap: 8px; align-items: center; color: #fff; }
.x-plang .x-chip { background: rgba(255, 255, 255, .12); color: #fff; border: 2px solid rgba(255, 255, 255, .35); }
.x-plang .x-chip.on { background: #ffd75e; color: #1d2466; border-color: #ffd75e; }
.x-pmus { color: #b9c0f5 !important; }
.x-pcap[hidden] { display: none !important; }
.x-gxpeek { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); z-index: 6; width: min(86%, 380px); background: rgba(8, 12, 50, .9); border: 2px solid #ffd75e; border-radius: 18px; padding: 10px 14px; color: #fff; text-align: center; animation: xpopin .3s both; }
.x-gxpeek b { display: block; color: #ffd75e; } .x-gxpeek span { font-weight: 700; font-size: 15px; }
.x-gxp:not(.on) { cursor: pointer; }

/* fix19: pet sits on the other side so outfit props (football) stay visible; gear top-right */
.x-wpet { left: calc(50% - 170px); bottom: 8px; z-index: 3; }
.x-wgear { left: calc(50% + 86px); top: 18px; }
[dir=rtl] .x-wpet { right: calc(50% - 170px); left: auto; } [dir=rtl] .x-wgear { right: calc(50% + 86px); left: auto; }
@media (max-width: 560px) { .x-wpet { left: calc(50% - 150px); height: 74px; } [dir=rtl] .x-wpet { right: calc(50% - 150px); } .x-wgear { left: calc(50% + 60px); height: 64px; } [dir=rtl] .x-wgear { right: calc(50% + 60px); } }
/* fix19: next-day button + preview card */
.x-ndbtn { order: -1; }
.x-ndcard { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(8, 12, 48, .72); backdrop-filter: blur(4px); animation: xpopin .3s ease; }
.x-ndcard.out { opacity: 0; transition: opacity .3s; }
.x-ndin { position: relative; max-width: 520px; width: 100%; background: linear-gradient(160deg, #2236e0, #0d1442); color: #fff; border-radius: 28px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.x-ndin img { width: 120px; margin: -80px auto 4px; display: block; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); animation: xwfloat 4s ease-in-out infinite; }
.x-ndin small { color: #ffc83d; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.x-ndin h2 { margin: 6px 0 8px; font: 800 clamp(24px, 3vw, 32px)/1.15 var(--head); }
.x-ndin p { color: #dfe4ff; margin: 0 0 12px; }
.x-ndin ul { text-align: start; margin: 0 auto 12px; max-width: 400px; padding-inline-start: 20px; }
.x-ndin li { margin: 4px 0; }
.x-ndin .x-ndsoon { color: #ffc83d; font-weight: 700; }
/* fix19: fill wide laptop/desktop screens */
@media (min-width: 1300px) {
  body.d1 { font-size: 19px; background: radial-gradient(1200px 600px at 92% -10%, #e2dcff 0, transparent 60%), radial-gradient(1000px 600px at -8% 105%, #d6f0ff 0, transparent 60%), radial-gradient(circle at 20% 30%, rgba(34, 54, 224, .07) 0 2px, transparent 3px) 0 0 / 46px 46px, var(--bg); }
  .x-main { max-width: min(1560px, 92vw); }
  .x-head { max-width: 1040px; }
  .x-banner { max-width: min(1180px, 100%); }
  .x-heroimg, .x-heroimg.x-win { max-width: 640px; }
  .x-hint { left: max(16px, calc(50% - 46vw)); }
}
@media (min-width: 1700px) { .x-main { max-width: min(1700px, 90vw); } .x-banner { max-width: 1320px; } .x-heroimg, .x-heroimg.x-win { max-width: 720px; } }
/* fix19b: on wide screens the banner never pushes the title below the fold */
@media (min-width: 1300px) { .x-banner { max-width: min(1320px, 100%, calc(60vh * 16 / 9)); } .x-heroimg, .x-heroimg.x-win { max-width: min(720px, 62vh); } }

/* fix19c: wide screens: picture and title side by side, activity full width below */
.x-intro { display: contents; }
@media (min-width: 1300px) {
  .x-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 18px; }
  .x-intro > .x-banner, .x-intro > .x-heroimg { max-width: none; width: 100%; margin: 0; }
  .x-intro > .x-heroimg, .x-intro > .x-heroimg.x-win { max-width: min(640px, 64vh); justify-self: center; }
  .x-intro > .x-head { max-width: none; margin: 0; }
  .x-intro > .x-head h1 { font-size: clamp(34px, 2.6vw, 52px); }
  .x-intro > .x-head .x-say { font-size: 21px; }
  .x-intro > .x-head:only-child { grid-column: 1 / -1; max-width: 1040px; }
}
/* fix19d: top bar, bottom guide bar and hint line up with the wider page */
@media (min-width: 1300px) {
  .x-top { padding-left: max(16px, calc(50% - min(780px, 46vw))); padding-right: max(16px, calc(50% - min(780px, 46vw))); }
  .x-guide { padding-left: max(16px, calc(50% - min(780px, 46vw))); padding-right: max(16px, calc(50% - min(780px, 46vw))); }
  .x-hint { left: max(16px, calc(50% - min(780px, 46vw))); } [dir=rtl] .x-hint { left: auto; right: max(16px, calc(50% - min(780px, 46vw))); }
}
@media (min-width: 1700px) {
  .x-top, .x-guide { padding-left: max(16px, calc(50% - min(850px, 45vw))); padding-right: max(16px, calc(50% - min(850px, 45vw))); }
}

/* ---------- Season 1 Day 2: The Unbeatable Referee (rule book, fairness, how-sure slider, match arena, trick round) ---------- */
.x2-book, .x2-brain, .x2-fair, .x2-sure, .x2-trick { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin: 14px 0; }
.x2-book h2, .x2-brain h2, .x2-fair h2, .x2-sure h2, .x2-trick h2 { margin: 0 0 10px; font-family: var(--head); font-size: 22px; }
.x2-rrow { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.x2-rrow.done { background: linear-gradient(90deg, var(--ok-l), transparent); border-radius: 14px; }
.x2-ra { display: grid; justify-items: center; gap: 2px; border: 3px solid var(--c); border-radius: 18px; padding: 6px 10px; min-width: 86px; background: #fff; }
.x2-ra img, .x2-ropt img { width: 58px; height: 58px; object-fit: contain; border-radius: 12px; }
.x2-ra b { font-family: var(--head); font-size: 18px; }
.x2-beats { font-family: var(--head); font-size: 20px; color: var(--muted); }
.x2-ropts { display: flex; gap: 10px; flex-wrap: wrap; }
.x2-ropt { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 6px; display: grid; justify-items: center; min-width: 78px; box-shadow: 0 4px 0 var(--line); transition: transform .15s; }
.x2-ropt:hover { transform: translateY(-2px); } .x2-ropt small { font-weight: 700; }
.x2-ropt.good { border-color: var(--ok); background: var(--ok-l); box-shadow: 0 4px 0 var(--ok); }
.x2-ropt.bad { border-color: var(--no); background: var(--no-l); animation: x2shake .4s; }
@keyframes x2shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.x2-rmsg { grid-column: 1 / -1; margin: 0; font-weight: 700; color: var(--brand-d); min-height: 1.2em; }
.x2-parts { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.x2-part { border: 3px solid var(--line); border-radius: 20px; padding: 14px 10px; text-align: center; display: grid; gap: 4px; align-content: start; transition: all .35s; opacity: .75; }
.x2-part i { font-size: 34px; font-style: normal; } .x2-part b { font-family: var(--head); font-size: 19px; } .x2-part small { color: var(--muted); }
.x2-part.lit { opacity: 1; transform: scale(1.04); border-color: var(--brand); background: var(--brand-l); box-shadow: 0 0 0 6px rgba(34, 54, 224, .12); }
.x2-part.eyes.lit { border-color: #12a5c9; background: #e3f7fc; } .x2-part.rules.lit { border-color: #f0a800; background: var(--sun-l); } .x2-part.call.lit { border-color: var(--ok); background: var(--ok-l); }
.x2-show { min-height: 2.4em; font-weight: 800; display: grid; gap: 2px; font-size: 17px; }
.x2-arrow { align-self: center; font-size: 26px; color: var(--muted); }
.x2-lesson { margin-top: 12px; }
.x2-bar { display: grid; grid-template-columns: 140px 1fr 56px; gap: 10px; align-items: center; margin: 8px 0; font-weight: 700; }
.x2-bar i { height: 16px; background: var(--line); border-radius: 99px; overflow: hidden; } .x2-bar i b { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width 1s; }
.x2-bar em { font-style: normal; text-align: end; }
.x2-fairmsg { font-weight: 700; margin: 10px 0 8px; }
.x2-slider { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; } .x2-slider input { width: 100%; accent-color: var(--brand); height: 32px; }
.x2-slider small { color: var(--muted); font-weight: 700; } .x2-surev { display: block; text-align: center; font-family: var(--head); font-size: 28px; color: var(--brand); }
.x2-arena { position: relative; margin: 14px 0; border-radius: 26px; overflow: hidden; color: #fff; padding: 16px; background: radial-gradient(120% 90% at 50% 110%, #2b46ff 0%, #142078 45%, #0b1038 100%); box-shadow: var(--sh); }
.x2-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; font-family: var(--head); }
.x2-score b { display: block; font-size: 48px; line-height: 1; color: var(--sun); } .x2-score small { font-size: 18px; opacity: .85; } .x2-score span { opacity: .8; }
.x2-ring { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px; align-items: center; margin: 14px 0 8px; }
.x2-hand { aspect-ratio: 1; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 3px solid rgba(255,255,255,.35); border-radius: 26px; font-size: 54px; position: relative; overflow: hidden; }
.x2-hand img { width: 92%; height: 92%; object-fit: contain; border-radius: 18px; }
.x2-hand em { position: absolute; bottom: 6px; inset-inline: 6px; font-style: normal; font-size: 13px; font-weight: 800; background: rgba(0,0,0,.55); border-radius: 99px; padding: 2px 6px; }
.x2-side.nova .x2-hand.flip { animation: x2flip .45s ease-out; }
@keyframes x2flip { from { transform: rotateY(90deg) scale(.8); } to { transform: none; } }
.x2-call { text-align: center; font-family: var(--head); font-size: clamp(22px, 3.4vw, 40px); line-height: 1.15; min-height: 2.4em; display: grid; place-items: center; }
.x2-call.pop { animation: x2pop .35s ease-out; } @keyframes x2pop { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.x2-call.win { color: #7dffb0; } .x2-call.lose { color: #ffb4b4; } .x2-call.draw { color: #fff3b0; } .x2-call.ask { color: #ffd76a; }
.x2-crowd { display: flex; justify-content: space-between; gap: 4px; height: 26px; } .x2-crowd i { flex: 1; border-radius: 50% 50% 0 0; background: rgba(255,255,255,.18); transform-origin: bottom; }
.x2-arena.cheer .x2-crowd i { animation: x2cheer .35s ease-in-out 4 alternate; } .x2-arena.cheer .x2-crowd i:nth-child(2n) { animation-delay: .12s; }
@keyframes x2cheer { to { transform: translateY(-10px) scaleY(1.2); background: rgba(255, 200, 61, .6); } }
.x2-pad { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.x2-pad .x-pose.on { outline: 4px solid var(--sun); }
.x2-trout { margin-top: 10px; }
@media (max-width: 640px) {
  .x2-rrow { grid-template-columns: auto 1fr; } .x2-beats { justify-self: start; } .x2-ropts { grid-column: 1 / -1; }
  .x2-parts { grid-template-columns: 1fr; } .x2-arrow { transform: rotate(90deg); justify-self: center; }
  .x2-bar { grid-template-columns: 110px 1fr 48px; } .x2-hand { font-size: 40px; } .x2-score b { font-size: 38px; }
  .x2-slider { grid-template-columns: 1fr 1fr; } .x2-slider input { grid-column: 1 / -1; grid-row: 1; }
}
[dir=rtl] .x2-rrow.done { background: linear-gradient(270deg, var(--ok-l), transparent); }

/* X1: very small phones (320-360 wide): the top bar must fit with the avatar chip */
@media (max-width: 360px) {
  .x-top { gap: 7px; padding-left: 8px; padding-right: 8px; }
  .x-top .x-lang { padding-left: 7px; padding-right: 7px; font-size: 12px; }
  .x-top .x-avc { width: 26px; height: 26px; }
}

/* fix20g: calm mode switch */
.x-top .x-calmb { font-size: 18px; }
.x-top .x-calmb.on { background: rgba(120, 140, 255, .22); }
@media (max-width: 640px) { .x-top .x-calmb { display: none; } }
.x-jcalm { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: inherit; font: inherit; cursor: pointer; text-align: start; }
.x-jcalm i { font-style: normal; font-size: 20px; }
.x-jcalm span { flex: 1; }
.x-jcalm b { padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 13px; }
.x-jcalm.on b { background: #6f7dff; color: #fff; }
html.x-calm .x-lfx { display: none !important; }

/* fix21c: My Inventor Lab */
.x-lab { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(13, 20, 66, .55); backdrop-filter: blur(4px); animation: xfade .25s ease; }
.x-lab.out { opacity: 0; transition: opacity .25s; }
.x-labbox { width: min(1080px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 28px; padding: 22px; box-shadow: var(--sh); }
.x-labhd { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.x-labhd img { width: 84px; flex: none; }
.x-labhd h2 { margin: 0; font: 800 28px/1.15 var(--head); }
.x-labhd p { margin: 4px 0 0; color: var(--muted); max-width: 62ch; }
.x-labgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.x-labcard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 22px; background: linear-gradient(160deg, #eaeeff, #fff); border: 2px solid var(--line); }
.x-labcard.soon { opacity: .6; background: #f4f6ff; border-style: dashed; }
.x-labico { font-style: normal; font-size: 40px; line-height: 1; }
.x-labcard small { color: var(--brand); font-weight: 800; }
.x-labname { font: 800 20px/1.2 var(--head); color: var(--ink); overflow-wrap: anywhere; }
.x-labst { margin: 0; color: var(--muted); font-size: 15px; min-height: 1.4em; }
.x-labrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.x-labrow .x-btn { min-height: 44px; padding: 8px 14px; font-size: 16px; }
.x-labren { display: flex; gap: 8px; margin-top: 8px; }
.x-labren input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--brand); font: 700 16px var(--body); color: var(--ink); }
.x-labnone { margin: 6px 0 14px; padding: 14px 16px; border-radius: 18px; background: var(--sun-l); font-weight: 700; }
.x-labfoot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.x-labfoot .x-small { margin: 0 auto 0 0; color: var(--muted); }
@media (max-width: 560px) { .x-labbox { padding: 16px; border-radius: 22px; } .x-labhd img { width: 60px; } .x-labhd h2 { font-size: 22px; } .x-labgrid { grid-template-columns: 1fr; } .x-labfoot { justify-content: center; } }
@media (max-width: 640px) { .x-labb { display: none; } }
html.x-calm .x-lab { animation: none; }

/* fix21e: parent controls (rest screens, tutor and mic switches) */
.x-rest { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: radial-gradient(900px 600px at 50% 30%, #26307a, #0d1442); color: #fff; animation: xfade .4s ease; }
.x-restbox { width: min(560px, 100%); text-align: center; }
.x-restbox img { width: min(200px, 42vw); filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .35)); }
.x-restbox h2 { margin: 10px 0 6px; font: 800 32px/1.15 var(--head); color: #ffd84d; }
.x-restbox p { margin: 0 auto 12px; max-width: 46ch; color: #e6e9ff; font-size: 19px; }
.x-restideas { display: inline-block; text-align: start; margin: 4px auto 12px; padding: 12px 18px; border-radius: 18px; background: rgba(255, 255, 255, .08); }
.x-restideas ul { margin: 6px 0 0; padding-inline-start: 20px; }
.x-restclock { font: 800 24px var(--head); color: #7ee0ff; min-height: 1.3em; }
.x-restgrown { display: block; margin: 14px auto 0; color: #c9d0ff; }
html.x-resting body { overflow: hidden; }
html.x-notutor .x-tform, html.x-nomic .x-tmic { display: none !important; }
html.x-calm .x-rest { animation: none; }

/* fix22: AI label chip + transfer scene */
.x-ailab{display:inline-flex;align-items:center;gap:.45em;margin:.6rem auto 0;padding:.35em .9em;border-radius:999px;background:rgba(120,220,200,.16);border:1px solid rgba(120,220,200,.55);color:inherit;font-weight:700;font-size:.92rem;max-width:100%}
.x-main > .x-ailab{display:flex;width:max-content;max-width:calc(100% - 24px)}
.x-jhead .x-ailab{margin:.45rem 0 0;font-size:.82rem}
.x-ailab i{font-style:normal}
.x-trq{display:flex;align-items:center;gap:14px}
.x-trq h2{margin:0;flex:1}
.x-trnova{width:86px;height:auto;flex:0 0 auto}
.x-tropts .x-opt.pic .x-qemo{font-size:2.6rem;font-style:normal;display:block;line-height:1.2}
.x-trno{padding:.8rem 1rem}
@media (max-width:420px){.x-trnova{width:60px}.x-trq{gap:8px}}

/* ---------- Season 1 Day 3: The Object Detective (ready-made detector boxes, rule fail, detective test, how-sure, tower search) ---------- */
.x3-will, .x3-rule, .x3-test, .x3-q, .x3-explain, .x3-mis, .x3-cam, .x3-sum, .x3-reveal { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin: 14px 0; }
.x3-will small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.x3-will div { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.x3-will i { font-style: normal; font-size: 26px; width: 40px; text-align: center; }
.x3-photo { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); background: var(--night); margin: 12px 0; line-height: 0; }
.x3-photo img, .x3-photo video { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.x3-photo.small img { max-height: 40vh; }
.x3-layer { position: absolute; inset: 0; line-height: 1.3; }
.x3-photo img, .x3-photo video { margin: 0 auto; }
.x3-box { position: absolute; border: 3px solid var(--c, #ffb020); border-radius: 10px; background: color-mix(in srgb, var(--c, #ffb020) 12%, transparent); padding: 0; min-width: 24px; min-height: 24px; animation: x3pop .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: var(--d, 0ms); }
.x3-box span { position: absolute; top: -2px; left: -3px; transform: translateY(-100%); background: var(--c, #ffb020); color: #0d1442; font: 800 13px/1.2 var(--head); padding: 3px 8px; border-radius: 8px 8px 8px 0; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
[dir=rtl] .x3-box span { left: auto; right: -3px; border-radius: 8px 8px 0 8px; }
.x3-box[style*="top:0"] span, .x3-box[style*="top:1."] span, .x3-box[style*="top:2."] span, .x3-box[style*="top:3."] span { transform: none; top: 0; }
.x3-box:hover, .x3-box:focus-visible { background: color-mix(in srgb, var(--c, #ffb020) 26%, transparent); }
.x3-box.tapped { box-shadow: 0 0 0 4px #fff, 0 0 18px var(--c); }
.x3-box.ok { --c: #18a957; } .x3-box.no { --c: #e5484d; }
.x3-box.ok span::after { content: '✓'; } .x3-box.no span::after { content: '✗'; }
.x3-bars { display: inline-block; width: 34px; height: 9px; border-radius: 5px; background: rgba(13, 20, 66, .2); position: relative; overflow: hidden; }
.x3-bars::before { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--s) * 100%); background: #0d1442; border-radius: 5px; }
[dir=rtl] .x3-bars::before { inset: 0 0 0 auto; }
@keyframes x3pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.x3-scan { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.x3-photo.scanning .x3-scan { opacity: 1; background: linear-gradient(180deg, transparent 0, rgba(255, 200, 61, .0) 40%, rgba(255, 200, 61, .55) 50%, transparent 52%) 0 0 / 100% 200% no-repeat; animation: x3scan 1.1s linear infinite; }
@keyframes x3scan { from { background-position: 0 -100%; } to { background-position: 0 100%; } }
.x3-err { position: absolute; inset: auto 12px 12px; background: #fff; color: var(--no); padding: 8px 12px; border-radius: 12px; font-weight: 700; }
.x3-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.x3-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 12px 0; }
.x3-info { display: flex; gap: 12px; background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--sh); animation: x3pop .5s both; }
.x3-info i { font-style: normal; font-size: 30px; }
.x3-info p { color: var(--muted); font-size: 16px; margin: 4px 0 0; }
.x3-ropts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.x3-rb { display: flex; gap: 10px; align-items: center; text-align: start; }
.x3-rb i { font-style: normal; font-size: 24px; }
.x3-rb.on { outline: 3px solid var(--brand); background: var(--brand-l); }
.x3-rgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 14px 0 8px; }
.x3-ritem { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; border: 3px solid var(--ok); background: var(--ok-l); text-align: center; animation: x3pop .4s both; animation-delay: var(--d, 0ms); }
.x3-ritem.bad { border-color: var(--no); background: var(--no-l); }
.x3-ritem i { font-style: normal; font-size: 34px; }
.x3-ritem small { color: var(--muted); font-size: 14px; }
.x3-ritem em { position: absolute; top: 6px; right: 10px; font-style: normal; font-weight: 800; color: var(--ok); }
[dir=rtl] .x3-ritem em { right: auto; left: 10px; }
.x3-ritem.bad em { color: var(--no); }
.x3-rres p { font-weight: 800; font-size: 19px; }
.x3-rres .bad { color: var(--no); } .x3-rres .good { color: var(--ok); }
.x3-lesson { background: var(--sun-l); border: 2px solid var(--sun); border-radius: 18px; padding: 14px 16px; margin: 14px 0; animation: x3pop .5s both; }
.x3-lesson p { margin: 6px 0 0; }
.x3-guess { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.x3-thead { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.x3-thead b { font-family: var(--head); font-size: 20px; }
.x3-thead small { color: var(--muted); }
.x3-note { color: var(--muted); font-style: italic; }
.x3-sum b { font-family: var(--head); font-size: 24px; display: block; margin-bottom: 10px; }
.x3-meter { height: 16px; border-radius: 9px; background: var(--line); overflow: hidden; margin: 0 0 12px; }
.x3-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #7be0a6); border-radius: 9px; transition: width 1s; }
.x3-cam p { margin-bottom: 8px; }
.x3-photo.live { max-width: 640px; }
.x3-camlist { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.x3-camlist span { background: var(--ok-l); color: var(--ok); border-radius: 999px; padding: 4px 12px; font-weight: 700; }
.x3-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.x3-sure { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh); margin: 12px 0; }
.x3-sure span { font-weight: 800; }
.x3-sure input { grid-column: 1 / -1; width: 100%; accent-color: var(--brand); height: 32px; }
.x3-sure b { font-family: var(--head); font-size: 24px; color: var(--brand); }
.x3-sure small { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.x3-sure small i { font-style: normal; }
.x3-stat { font-weight: 700; color: var(--brand-d); }
.x3-tower { display: flex; gap: 8px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.x3-tower i { font-style: normal; width: 52px; height: 52px; display: grid; place-items: center; font-size: 24px; border-radius: 14px; background: #fff; box-shadow: var(--sh); opacity: .55; }
.x3-tower i.now { opacity: 1; outline: 3px solid var(--sun); transform: translateY(-4px); }
.x3-tower i.done { opacity: 1; background: var(--ok-l); color: var(--ok); font-weight: 800; }
.x3-novasays { background: var(--brand-l); border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.x3-reveal { text-align: center; }
.x3-reveal img { width: 100%; max-height: 52vh; object-fit: cover; border-radius: 18px; margin-bottom: 12px; animation: x3pop .7s both; }
.x3-reveal b { font-family: var(--head); font-size: 22px; color: var(--ok); }
.x3-sent { padding: 12px 0; border-top: 1px solid var(--line); }
.x3-sent:first-child { border-top: 0; }
.x3-sent > b { display: block; font-size: 19px; margin-bottom: 8px; }
.x3-sent u { text-decoration: none; border-bottom: 3px dashed var(--brand); color: var(--brand-d); padding: 0 4px; }
.x3-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.x3-chips .x-chip.bad { background: var(--no-l); border-color: var(--no); }
.x3-job { padding: 12px 0; border-top: 1px solid var(--line); }
.x3-job i { font-style: normal; font-size: 22px; }
.x3-proend { text-align: center; margin: 16px 0; }
.x3-proend b { font-family: var(--head); font-size: 24px; display: block; }
@media (max-width: 520px) {
  .x3-will, .x3-rule, .x3-test, .x3-q, .x3-explain, .x3-mis, .x3-cam, .x3-sum, .x3-reveal { padding: 14px; }
  .x3-box span { font-size: 11px; padding: 2px 6px; max-width: 140px; }
  .x3-tower i { width: 44px; height: 44px; font-size: 20px; }
  .x3-ritem i { font-size: 28px; }
}
.x-calm .x3-box, .x-calm .x3-info, .x-calm .x3-ritem, .x-calm .x3-lesson { animation: none; }
.x-calm .x3-photo.scanning .x3-scan { animation: none; background: rgba(255, 200, 61, .15); }

/* ---------- Season 1 Day 4: Adopt a Pixel Creature (hatch + name, care game driven by the child's own model, behaviour-rule Pro Lab) ---------- */
.x4-adopt { display: grid; gap: 14px; margin: 14px 0; }
.x4-sec { background: #fff; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh); }
.x4-sec h2 { margin: 0 0 10px; font-size: 20px; }
.x4-cur { margin: 0 0 10px; font-size: 18px; min-height: 26px; }
.x4-cur b { color: #e0458f; font-size: 24px; }
.x4-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.x4-dice { background: linear-gradient(135deg, #ffe58a, #ffb020); border-color: #f0a800; }
.x4-favs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.x4-fav { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 18px; border: 3px solid var(--line); background: #fbf9ff; cursor: pointer; font: 700 15px/1.2 var(--head); color: var(--ink); min-height: 96px; transition: transform .15s, border-color .15s; }
.x4-fav i { font-style: normal; font-size: 40px; line-height: 1; }
.x4-fav:hover { transform: translateY(-2px); }
.x4-fav.on { border-color: #e0458f; background: #ffeaf4; box-shadow: 0 0 0 4px rgba(224, 69, 143, .18); animation: x4boing .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes x4boing { 0% { transform: scale(.9); } 100% { transform: scale(1); } }

/* care game */
.x4-game { background: radial-gradient(120% 90% at 50% 0%, #2b1d6e 0%, #120c3a 70%); border-radius: var(--r); padding: 14px; margin: 14px 0; color: #fff; box-shadow: var(--sh); }
.x4-meters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }
.x4-meters small { display: block; font-weight: 800; font-size: 13px; opacity: .9; margin-bottom: 4px; }
.x4-meters i { display: block; height: 14px; border-radius: 8px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.x4-meters b { display: block; height: 100%; width: 50%; border-radius: 8px; transition: width .6s cubic-bezier(.2, 1, .3, 1); }
.x4-en { background: linear-gradient(90deg, #ffb020, #ffe066); }
.x4-fu { background: linear-gradient(90deg, #e0458f, #ff8fc8); }
.x4-score { font: 800 15px/1 var(--head); background: rgba(255, 255, 255, .14); padding: 8px 12px; border-radius: 12px; white-space: nowrap; }
.x4-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 0 4px; min-height: 300px; }
.x4-need { min-height: 54px; display: flex; gap: 10px; align-items: center; background: #fff; color: var(--ink); border-radius: 20px; padding: 8px 16px; font: 800 18px/1.2 var(--head); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); position: relative; animation: x4bub .4s cubic-bezier(.2, 1.5, .4, 1); }
.x4-need:empty { visibility: hidden; }
.x4-need::after { content: ''; position: absolute; bottom: -10px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.x4-need i { font-style: normal; font-size: 32px; }
@keyframes x4bub { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.x4-cre { width: min(240px, 60vw); height: min(240px, 60vw); object-fit: contain; margin-top: 14px; filter: drop-shadow(0 10px 24px rgba(224, 69, 143, .45)); animation: x4idle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.x4-cre.m-eat { animation: x4chomp .35s ease-in-out 4; }
.x4-cre.m-play, .x4-cre.m-cheer { animation: x4jump .55s cubic-bezier(.3, 1.6, .5, 1) 3; }
.x4-cre.m-sleep { animation: x4sleep 3.2s ease-in-out infinite; filter: drop-shadow(0 10px 24px rgba(138, 108, 255, .5)) brightness(.92); }
.x4-cre.m-confused { animation: x4wobble .5s ease-in-out 3; }
.x4-cre.m-hungry, .x4-cre.m-bored { animation: x4sad 2.2s ease-in-out infinite; }
@keyframes x4idle { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-6px) scale(1.02, .98); } }
@keyframes x4chomp { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.08, .9); } }
@keyframes x4jump { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-34px) scale(.95, 1.06); } 70% { transform: translateY(0) scale(1.08, .92); } }
@keyframes x4sleep { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes x4wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes x4sad { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.x4-say { min-height: 48px; margin-top: 10px; text-align: center; font: 700 17px/1.35 var(--head); max-width: 520px; }
.x4-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.x4-pad .x-pose { background: #fff; color: var(--ink); }

/* pro lab: behaviour rules + code + day simulation */
.x4-rules { display: grid; gap: 10px; margin: 10px 0; }
.x4-rule { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 7%, #fff); }
.x4-rh { display: flex; gap: 8px; align-items: center; }
.x4-rh i { font-style: normal; font-size: 26px; }
.x4-rh .x-sgi { width: 40px; height: 40px; }
.x4-rv { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.x4-rv small { font-size: 18px; margin-inline-end: 4px; }
.x4-rv .x-chip { min-width: 44px; padding: 6px 8px; font-size: 14px; }
.x4-code { background: #0d1442; color: #e8e6ff; border-radius: 16px; padding: 12px 14px; margin: 12px 0; }
.x4-code h3 { margin: 0 0 8px; font-size: 16px; color: #ffe066; }
.x4-code pre { margin: 0; font: 600 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; text-align: left; color: #b8f5d0; }
.x4-code p { margin: 8px 0 0; font-size: 14px; opacity: .85; }
.x4-sim { margin-top: 12px; }
.x4-timeline { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 110px; padding: 8px; background: #f4f1ff; border-radius: 14px; }
.x4-timeline span { position: relative; height: 100%; display: flex; gap: 2px; align-items: end; justify-content: center; padding-top: 22px; }
.x4-timeline span i { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-style: normal; font-size: 15px; }
.x4-timeline span b, .x4-timeline span em { width: 40%; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .5s; }
.x4-timeline span b { background: #ffb020; } .x4-timeline span em { background: #e0458f; }
.x4-timeline span.miss { opacity: .7; }
.x4-sim p { font-weight: 800; margin: 10px 0 0; }
.x4-sim p.good { color: #128a47; } .x4-sim p.bad { color: #c22d32; }
.x-calm .x4-cre, .x-calm .x4-fav.on, .x-calm .x4-need { animation: none !important; }
@media (max-width: 560px) {
  .x4-favs { gap: 6px; } .x4-fav { min-height: 84px; padding: 10px 4px; font-size: 13px; } .x4-fav i { font-size: 32px; }
  .x4-meters { grid-template-columns: 1fr 1fr; } .x4-score { grid-column: 1 / -1; justify-self: center; }
  .x4-rule { grid-template-columns: 1fr; } .x4-stage { min-height: 260px; }
  .x4-code pre { font-size: 12px; }
}

/* ---------- Season 1 Day 5: Glowstorm (dark-lab torch hunt, movement training, freeze trick, 3-scene light show, light-show coder Pro Lab) ---------- */
.x5-stage, .x5-dark { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 62vh; border-radius: var(--r); overflow: hidden; background: #06081e; box-shadow: var(--sh), inset 0 0 0 2px rgba(120, 140, 255, .25); margin: 12px 0 6px; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.x5-stage.small { aspect-ratio: 16 / 7; max-height: 260px; }
.x5-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.x5-hud { position: absolute; inset: 0; pointer-events: none; }
.x5-xy { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(6, 8, 30, .72); color: #bfe9ff; font: 800 16px/1 ui-monospace, Menlo, Consolas, monospace; padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(54, 214, 255, .4); white-space: nowrap; }
.x5-corner { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .55); box-shadow: 0 0 18px rgba(54, 214, 255, .35); animation: x5pulse 1.6s ease-in-out infinite; }
.x5-corner.on { border: 3px solid #7dff9a; background: radial-gradient(circle, #7dff9a 0 30%, transparent 70%); animation: none; box-shadow: 0 0 24px #7dff9a; }
@keyframes x5pulse { 50% { transform: scale(1.18); opacity: .7; } }
.x5-vid { position: absolute; right: 10px; top: 10px; width: 22%; max-width: 180px; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); border-radius: 12px; border: 2px solid rgba(255, 255, 255, .55); opacity: .85; z-index: 2; pointer-events: none; }
[dir=rtl] .x5-vid { right: auto; left: 10px; }
.x5-camrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 12px; }
.x5-cammsg { font-size: 14px; color: var(--sub, #59608f); }
.x5-cammsg.bad { color: #c2185b; font-weight: 700; }

/* arrive: the dark lab */
.x5-dark { cursor: none; }
html.x-calm .x5-dark { cursor: crosshair; }
.x5-finds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 12px; }
.x5-find { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh); font-size: 14px; border: 2px solid transparent; }
.x5-find i { font-style: normal; font-size: 20px; }
.x5-find.on { border-color: #7dff9a; background: #effff3; animation: x4boing .5s cubic-bezier(.2, 1.6, .4, 1); }
.x5-machine:empty { display: none; }
.x5-machine { margin: 10px 0 16px; display: grid; gap: 12px; justify-items: start; }
.x5-mscreen { background: linear-gradient(160deg, #0b1040, #1d0f4a); color: #bfe9ff; border-radius: 16px; padding: 14px 18px; border: 2px solid #36d6ff; box-shadow: 0 0 26px rgba(54, 214, 255, .45), var(--sh); font: 700 18px/1.4 ui-monospace, Menlo, Consolas, monospace; max-width: 640px; }
.x5-mscreen small { display: block; color: #ff7bc7; letter-spacing: .12em; font-size: 12px; margin-bottom: 6px; }
.x5-mscreen p { margin: 0; }
.x5-mscreen p::after { content: '▌'; animation: x5blink 1s steps(2) infinite; margin-inline-start: 4px; }
@keyframes x5blink { 50% { opacity: 0; } }

/* teach */
.x5-part { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); margin: 14px 0; }
.x5-part h2 { margin: 0 0 6px; font-size: 20px; }
.x5-part > p { margin: 0 0 4px; }
.x5-locked { opacity: .55; }
.x5-ring { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 900 22px/1 var(--head); text-shadow: 0 2px 8px #000; pointer-events: none; z-index: 3; --k: 0;
  background: conic-gradient(#ffd23f calc(var(--k) * 360deg), rgba(255, 255, 255, .14) 0); -webkit-mask: radial-gradient(circle, transparent 52px, #000 53px); mask: radial-gradient(circle, transparent 52px, #000 53px); }
.x5-ring.ready, .x5-ring.go { -webkit-mask: none; mask: none; background: radial-gradient(circle, rgba(6, 8, 30, .55) 0 58%, transparent 60%), conic-gradient(#ffd23f calc(var(--k) * 360deg), rgba(255, 255, 255, .14) 0); }
.x5-ring.go { color: #ffd23f; }
.x5-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.x5-card { border: 3px solid var(--c); border-radius: 18px; padding: 12px; background: #fbfaff; display: grid; gap: 10px; }
.x5-ch { display: flex; gap: 10px; align-items: center; }
.x5-ch > i { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 30px; }
.x5-ch > i img { width: 52px; height: 52px; }
.x5-ch b { display: block; font: 800 18px/1.2 var(--head); color: var(--c); }
.x5-ch small { display: block; font-size: 13px; color: var(--sub, #59608f); line-height: 1.3; }
.x5-n { margin-inline-start: auto; font: 900 18px/1 var(--head); background: var(--c); color: #fff; padding: 6px 10px; border-radius: 999px; }
.x5-trails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.x5-trails:empty { display: none; }
.x5-trails svg { width: 100%; height: auto; background: #0b1040; border-radius: 10px; }
.x5-peek { margin-top: 12px; }
.x5-peek summary { cursor: pointer; font-weight: 800; }
.x5-scatter { width: 100%; max-width: 420px; display: block; margin: 8px 0; }

/* test */
.x5-call { min-height: 46px; display: flex; justify-content: center; margin: 4px 0 8px; }
.x5-call span { display: inline-flex; align-items: center; gap: 10px; font: 900 22px/1.2 var(--head); padding: 8px 18px; border-radius: 999px; background: #fff; box-shadow: var(--sh); border: 3px solid var(--c, #ccc); color: var(--ink); }
.x5-call span i { font-style: normal; width: 34px; height: 34px; display: grid; place-items: center; }
.x5-call span i img { width: 34px; height: 34px; }
.x5-call .ok { border-color: #22b573; color: #0d7a4c; }
.x5-call .bad { border-color: #e0458f; color: #a3155a; }
.x5-tpane { display: grid; gap: 10px; justify-items: center; }
.x5-tpane h2 { font-size: 19px; margin: 4px 0; text-align: center; }
.x5-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.x5-dots i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 15px/1 var(--head); font-style: normal; background: #e8ebff; color: #59608f; }
.x5-dots i.ok { background: #22b573; color: #fff; }
.x5-dots i.bad { background: #e0458f; color: #fff; }

/* break */
.x5-live { display: flex; justify-content: center; margin: 2px 0 10px; }
.x5-live span { display: inline-flex; align-items: center; gap: 8px; background: #0b1040; color: #fff; padding: 8px 16px; border-radius: 999px; font: 800 16px/1.2 var(--head); border: 2px solid var(--c, #5560a8); }
.x5-live span i { font-style: normal; width: 28px; height: 28px; display: grid; place-items: center; }
.x5-live span i img { width: 28px; height: 28px; }
.x5-bpane { display: grid; gap: 12px; }
.x5-freeze, .x5-oops, .x5-q { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh); }
.x5-freeze { font-size: 22px; text-align: center; border: 3px dashed #36d6ff; }
.x5-freeze b { font: 900 24px/1.2 var(--head); }
.x5-freeze p { font-size: 16px; margin: 6px 0 0; }
.x5-oops { border: 3px solid #ffb020; background: #fff8e6; }
.x5-oops b { font: 800 19px/1.3 var(--head); }
.x5-oops p { margin: 6px 0 0; }
.x5-q h3 { margin: 0 0 8px; font-size: 18px; }
.x5-fixt { margin: 0; font-weight: 800; }
.x5-again { margin: 0; font: 800 17px/1.3 var(--head); color: #2b6fd6; }
.x5-fixed { margin: 0; font: 800 17px/1.3 var(--head); color: #0d7a4c; }

/* use: the light show */
.x5-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; background: #fff; border-radius: var(--r); padding: 12px 14px; box-shadow: var(--sh); margin: 12px 0 0; }
.x5-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.x5-crow small, .x5-nrow small { width: 100%; font-weight: 800; }
.x5-crow code, .x5-nrow b { background: #0b1040; color: #ffd23f; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.x5-sw { display: inline-flex; align-items: center; gap: 6px; border: 3px solid transparent; border-radius: 999px; padding: 3px; background: #f1f2fb; cursor: pointer; min-height: 44px; min-width: 44px; justify-content: center; }
.x5-sw span { width: 30px; height: 30px; border-radius: 50%; display: block; box-shadow: 0 0 12px rgba(0, 0, 0, .15) inset; }
.x5-sw code { font-size: 12px; padding-inline-end: 6px; }
.x5-sw.on { border-color: #0b1040; box-shadow: 0 0 0 3px #ffd23f; }
.x5-nrow { display: grid; gap: 6px; }
.x5-nrow input { width: 100%; accent-color: #ff3fa4; min-height: 32px; }
.x5-banner:empty { display: none; }
.x5-banner { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); text-align: center; background: rgba(6, 8, 30, .72); color: #fff; border-radius: 16px; padding: 8px 18px; border: 2px solid rgba(255, 210, 63, .6); pointer-events: none; max-width: 90%; z-index: 2; }
.x5-banner small { display: block; color: #ffd23f; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.x5-banner b { display: block; font: 900 22px/1.2 var(--head); }
.x5-banner span { display: block; font-size: 14px; opacity: .9; }
.x5-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, .12); z-index: 2; }
.x5-bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #36d6ff, #ff3fa4, #ffd23f); }
.x5-out:empty { display: none; }
.x5-result { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 16px; background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--sh); margin: 12px 0; align-items: center; }
.x5-lab { position: relative; }
.x5-lab img { width: 100%; border-radius: 16px; display: block; animation: x5lit 1.6s ease-out both; }
@keyframes x5lit { 0% { filter: brightness(.15) saturate(.3); } 100% { filter: none; } }
.x5-stars { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 26px; text-shadow: 0 2px 6px #000; }
.x5-result ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.x5-result li { display: grid; grid-template-columns: 120px 1fr 46px; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; }
.x5-result li i { height: 12px; border-radius: 8px; background: #e8ebff; overflow: hidden; display: block; }
.x5-result li i b { display: block; height: 100%; background: linear-gradient(90deg, #36d6ff, #ff3fa4); }
.x5-snap { width: 100%; max-width: 260px; border-radius: 12px; display: block; margin: 6px 0; }

/* pro */
.x5-code pre { background: #0b1040; color: #d8e4ff; border-radius: 14px; padding: 14px; font: 600 14px/1.6 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; margin: 8px 0; text-align: left; }
.x5-code .k { color: #ff7bc7; }
.x5-code .c { color: #7c89c9; }
.x5-code b { color: #ffd23f; }
.x5-hex { width: 7.5ch; font: inherit; color: #7dff9a; background: #141b5c; border: 1px solid #36d6ff; border-radius: 6px; padding: 0 4px; }
.x5-hint { min-height: 22px; margin: 4px 0; font-weight: 700; }
.x5-hint.good { color: #0d7a4c; }
.x5-hint.bad { color: #a3155a; }
.x5-meter { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.x5-meter span { background: #0b1040; color: #fff; border-radius: 14px; padding: 8px 14px; min-width: 130px; }
.x5-meter small { display: block; font-size: 12px; opacity: .8; }
.x5-meter b { font: 900 24px/1.1 var(--head); }
.x5-meter b.good { color: #7dff9a; }
.x5-meter b.mid { color: #ffd23f; }
.x5-meter b.bad { color: #ff7b7b; }
.x5-feats { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.x5-acc b { font: 800 17px/1.3 var(--head); }
.x5-acc i { display: block; height: 14px; border-radius: 8px; background: #e8ebff; overflow: hidden; margin: 6px 0 10px; }
.x5-acc i b { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #22b573); transition: width .5s; }

@media (max-width: 600px) {
  .x5-stage, .x5-dark { aspect-ratio: 4 / 3; max-height: 56vh; }
  .x5-finds { grid-template-columns: 1fr; }
  .x5-result { grid-template-columns: 1fr; }
  .x5-result li { grid-template-columns: 96px 1fr 42px; }
  .x5-banner b { font-size: 18px; }
  .x5-xy { font-size: 14px; }
}
.x5-banner b.x5-count { font: 900 64px/1 var(--head); padding: 4px 18px; animation: x5cd .8s ease-out; }
@keyframes x5cd { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Season 1 Day 6: The Finger Counter (vault, landmarks, distance rule, threshold, fool it, rule-engineer Pro Lab) ---------- */
.x6-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 58vh; max-width: 760px; margin: 12px auto 8px; border-radius: var(--r); overflow: hidden; background: #0b1040; box-shadow: var(--sh), inset 0 0 0 2px rgba(120, 140, 255, .25); user-select: none; -webkit-user-select: none; }
.x6-stage.small { max-height: 300px; }
.x6-stage.tap { cursor: pointer; }
.x6-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.x6-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: .55; }
.x6-count { position: absolute; top: 10px; right: 10px; min-width: 86px; text-align: center; background: rgba(6, 8, 30, .78); border: 2px solid #ffc83d; border-radius: 16px; padding: 6px 12px; color: #fff; box-shadow: 0 0 22px rgba(255, 200, 61, .35); }
[dir=rtl] .x6-count { right: auto; left: 10px; }
.x6-count small { display: block; font-size: 11px; letter-spacing: .12em; color: #ffc83d; font-weight: 800; }
.x6-count b { font: 900 44px/1 var(--head); }
.x6-count .x6-q { font: 900 40px/1 var(--head); color: #9fb0ff; }
.x6-tally { position: absolute; left: 8px; bottom: 6px; width: 24%; max-width: 150px; text-align: center; pointer-events: none; }
[dir=rtl] .x6-tally { left: auto; right: 8px; }
.x6-tally img { width: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)); }
.x6-tally small { color: #7dffe0; font-weight: 900; letter-spacing: .14em; font-size: 11px; }
.x6-fingers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 760px; margin: 4px auto 10px; }
.x6-fingers.off { opacity: .4; }
.x6-fb { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid #d8dcf5; background: #fff; font: 800 13px/1.15 var(--body, inherit); cursor: pointer; min-height: 64px; transition: transform .12s; }
.x6-fb i { font-style: normal; font-size: 24px; }
.x6-fb.up { border-color: #22c58b; background: #effff6; }
.x6-fb.half { border-color: #ffc83d; background: #fff8e1; }
.x6-fb.down { border-color: #b9bfdc; background: #f2f3fa; color: #59608f; }
.x6-fb:active { transform: scale(.94); }
.x6-camrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px auto 12px; max-width: 760px; }
.x6-cammsg { font-size: 14px; color: var(--sub, #59608f); }
.x6-cammsg.bad { color: #c2185b; font-weight: 700; }
.x6-sl { display: grid; gap: 4px; max-width: 760px; margin: 8px auto; background: #fff; border-radius: 14px; padding: 8px 12px; box-shadow: var(--sh); }
.x6-sl small { font-weight: 800; }
.x6-sl input { width: 100%; accent-color: #6c5ce7; height: 28px; }

/* arrive: the vault and Tally */
.x6-vault { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; background: linear-gradient(160deg, #0b1040, #12345a); border: 2px solid #3fd8c4; border-radius: var(--r); padding: 12px 14px; margin: 12px 0; box-shadow: 0 0 26px rgba(63, 216, 196, .35), var(--sh); color: #dffcf7; }
.x6-vscreen { display: flex; gap: 12px; align-items: center; min-height: 74px; }
.x6-vscreen img { width: 74px; height: 74px; object-fit: contain; flex: none; }
.x6-vscreen p { margin: 0; font: 700 17px/1.35 ui-monospace, Menlo, Consolas, monospace; }
.x6-vscreen p small { display: block; color: #7dffe0; letter-spacing: .14em; font-size: 11px; }
.x6-vscreen p b { font-size: 22px; color: #ffc83d; }
.x6-vscreen p.bad { color: #ffb3c7; }
.x6-lamps { display: flex; gap: 8px; }
.x6-lamps i { width: 26px; height: 26px; border-radius: 50%; background: #2a3466; border: 2px solid #6b78b8; }
.x6-lamps i.on { background: #7dff9a; box-shadow: 0 0 14px #7dff9a; border-color: #fff; }
.x6-lamps i.bad { background: #ff4d6d; box-shadow: 0 0 16px #ff4d6d; border-color: #fff; animation: x6blink .5s steps(2) infinite; }
@keyframes x6blink { 50% { opacity: .3; } }
.x6-buzz { animation: x6buzz .12s linear 6; }
@keyframes x6buzz { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.x6-arr { margin-bottom: 6px; }
.x6-arr > .x-btn, .x6-use > .x-btn { display: block; margin: 6px auto 12px; }
.x6-alarm:empty { display: none; }
.x6-alarm { display: grid; gap: 10px; justify-items: start; margin: 8px 0 16px; background: #fff0f3; border: 2px solid #ff4d6d; border-radius: var(--r); padding: 12px 16px; }
.x6-alarm p { margin: 0; font-weight: 700; }

/* teach */
.x6-part { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); margin: 14px 0; }
.x6-part h2 { margin: 0 0 6px; font-size: 20px; }
.x6-part > p { margin: 0 0 4px; }
.x6-locked { opacity: .55; }
.x6-lab { margin: 6px 0 0; color: #1b7f57; font-weight: 700; }
.x6-lab:empty { display: none; }
.x6-bars { display: grid; gap: 6px; max-width: 760px; margin: 6px auto; }
.x6-bars > div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: center; font-weight: 800; font-size: 14px; }
.x6-bars span { color: var(--c); filter: brightness(.75); }
.x6-bars i { display: block; height: 16px; border-radius: 8px; background: #eef0fb; overflow: hidden; }
.x6-bars i b { display: block; height: 100%; border-radius: 8px; transition: width .15s; }
.x6-q { margin: 12px 0 4px; }
.x6-q h3 { margin: 0 0 8px; font-size: 17px; }
.x6-rule { margin: 8px 0; }
.x6-rule code { display: inline-block; background: #0b1040; color: #dfe6ff; border-radius: 12px; padding: 10px 14px; font: 700 16px/1.4 ui-monospace, Menlo, Consolas, monospace; }
.x6-rule .t { color: #ffc83d; } .x6-rule .j { color: #36d6ff; } .x6-rule .v { color: #ff7bc7; }
.x6-target { margin: 8px 0 0; min-height: 60px; }
.x6-tgt { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: #f4f2ff; border: 2px dashed #6c5ce7; border-radius: 14px; padding: 8px 12px; }
.x6-tgt b { font-size: 17px; }
.x6-dots { display: flex; gap: 6px; }
.x6-dots i { width: 14px; height: 14px; border-radius: 50%; background: #d8dcf5; }
.x6-dots i.ok { background: #22c58b; }
.x6-target p { margin: 6px 2px 0; font-weight: 700; }
.x6-target p.good { color: #1b7f57; } .x6-target p.bad { color: #c2185b; }
.x6-note { font-size: 14px; color: #8a6d00; margin: 4px 0 0; }

/* test */
.x6-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.x6-grid.mini { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.x6-hc { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--sh); border: 3px solid transparent; transition: border-color .2s; }
.x6-hc canvas { width: 100%; aspect-ratio: 1; display: block; }
.x6-hc.ok { border-color: #22c58b; animation: x4boing .4s cubic-bezier(.2, 1.6, .4, 1); }
.x6-hc.bad { border-color: #ff4d6d; animation: x6buzz .1s linear 3; }
.x6-hcl { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: space-between; padding: 4px 6px; font-size: 12px; }
.x6-hcl span { color: #59608f; font-weight: 800; }
.x6-hcl em { font-style: normal; background: #fff3c4; border-radius: 8px; padding: 1px 6px; font-weight: 700; }
.x6-hcl b { font: 900 14px/1 ui-monospace, Menlo, Consolas, monospace; }
.x6-hc.ok .x6-hcl b { color: #1b7f57; } .x6-hc.bad .x6-hcl b { color: #c2185b; }
.x6-grid.mini .x6-hcl { font-size: 10px; padding: 2px 3px; }
.x6-grid.mini .x6-hcl em { display: none; }
.x6-running { font-weight: 800; color: #6c5ce7; }
.x6-lookok { background: #effff6; border-radius: 14px; padding: 10px 14px; font-weight: 700; }

/* break */
.x6-tricks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.x6-trick { position: relative; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh); border: 2px solid #d8dcf5; display: grid; gap: 4px; overflow: hidden; }
.x6-trick b { font-size: 15px; }
.x6-trick small { font-size: 13px; color: #44496b; }
.x6-trick em { position: absolute; top: 8px; right: -30px; transform: rotate(18deg); font: 900 12px/1 var(--head); padding: 4px 34px; color: #fff; letter-spacing: .06em; }
[dir=rtl] .x6-trick em { right: auto; left: -30px; transform: rotate(-18deg); }
.x6-trick.fooled { border-color: #ff4d6d; background: #fff0f3; } .x6-trick.fooled em { background: #ff4d6d; }
.x6-trick.safe { border-color: #22c58b; background: #effff6; } .x6-trick.safe em { background: #22c58b; }
.x6-trick.maybe { border-color: #ffc83d; background: #fff8e1; } .x6-trick.maybe em { background: #e0a400; }
.x6-trick.done { animation: x4boing .5s cubic-bezier(.2, 1.6, .4, 1); }
.x6-ctl { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; max-width: 760px; margin: 0 auto; }
.x6-ctl .x6-sl { margin: 0; }
.x6-ctl .x-btn.on { background: #ffc83d; color: #2a1f00; }
.x6-fix:empty { display: none; }
.x6-fix { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); margin: 14px 0; border: 2px solid #6c5ce7; }
.x6-fix h2 { margin: 0 0 6px; font-size: 20px; }
.x6-fixwhy { color: #1b7f57; font-weight: 700; }
.x6-again { font-weight: 800; color: #6c5ce7; }

/* use: the vault door */
.x6-door { position: relative; border-radius: var(--r); overflow: hidden; background: #0b1040; box-shadow: var(--sh); margin: 12px 0; min-height: 190px; display: grid; align-content: end; }
.x6-dimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform 1.4s ease, opacity 1s; }
.x6-door.open .x6-dimg { transform: scale(1.15) rotate(-8deg); opacity: .35; }
.x6-door.open { box-shadow: 0 0 40px rgba(255, 200, 61, .7), var(--sh); }
.x6-code { position: relative; display: flex; justify-content: center; gap: 10px; padding: 14px 10px 6px; }
.x6-code i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 26, 70, .85); border: 3px solid #6b78b8; color: #9fb0ff; }
.x6-code i b { font: 900 26px/1 var(--head); }
.x6-code i.now { border-color: #ffc83d; box-shadow: 0 0 18px #ffc83d; animation: x5pulse 1.4s ease-in-out infinite; }
.x6-code i.on { background: #22c58b; border-color: #fff; color: #fff; box-shadow: 0 0 18px #7dff9a; }
.x6-ask { position: relative; text-align: center; padding: 0 12px 14px; color: #fff; }
.x6-ask small { display: block; color: #7dffe0; letter-spacing: .1em; font-weight: 800; font-size: 12px; }
.x6-ask b { font: 900 28px/1.2 var(--head); text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.x6-click { animation: x6click .45s ease; }
@keyframes x6click { 40% { transform: scale(1.03); } }
.x6-win { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; background: #fff; border-radius: var(--r); padding: 12px; box-shadow: var(--sh); margin: 10px 0 18px; border: 3px solid #ffc83d; animation: x4boing .6s cubic-bezier(.2, 1.6, .4, 1); }
.x6-win img { width: 100%; border-radius: 14px; display: block; }
.x6-win b { font-size: 20px; }

/* pro */
.x6-num { width: 4.2em; font: 800 16px/1 ui-monospace, Menlo, Consolas, monospace; background: #1d2766; color: #ff7bc7; border: 2px solid #6c5ce7; border-radius: 8px; padding: 3px 6px; }
.x6-sel { font: 800 15px/1 ui-monospace, Menlo, Consolas, monospace; background: #1d2766; color: #7dffe0; border: 2px solid #6c5ce7; border-radius: 8px; padding: 3px 4px; }
.x6-res { margin: 8px 0; }
.x6-res b.good { color: #1b7f57; } .x6-res b.bad { color: #c2185b; }
.x6-res i { display: block; height: 14px; border-radius: 7px; background: #eef0fb; overflow: hidden; margin-top: 6px; }
.x6-res i b { display: block; height: 100%; background: linear-gradient(90deg, #6c5ce7, #22c58b); }
.x6-res p { margin: 6px 0 0; font-size: 14px; }
.x6-chart { cursor: crosshair; margin: 8px 0; }
.x6-chart svg { width: 100%; display: block; border-radius: 12px; }
.x6-pick { font: 800 15px/1.3 ui-monospace, Menlo, Consolas, monospace; min-height: 20px; }

@media (max-width: 600px) {
  .x6-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .x6-grid.mini { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .x6-tricks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x6-ctl { grid-template-columns: 1fr; }
  .x6-vault { grid-template-columns: 1fr; }
  .x6-bars > div { grid-template-columns: 110px 1fr; font-size: 13px; }
  .x6-fb { font-size: 11px; min-height: 58px; }
  .x6-code i { width: 46px; height: 46px; }
  .x6-win { grid-template-columns: 1fr; }
  .x6-count b { font-size: 34px; }
}

/* ---------- Engine: page padding follows the real guide bar height (v0.22.25) ---------- */
html { scroll-padding-bottom: calc(max(var(--guide), var(--guideH, 0px)) + 16px); }
.x-main { padding-bottom: calc(max(var(--guide), var(--guideH, 0px)) + 40px); }

/* ---------- Season 1 Day 7: Superpower Command Centre (6 screens, map signs to actions, events not frames, safe list, captain test, Pro Lab) ---------- */
.x7-room { position: relative; background: radial-gradient(120% 90% at 50% 0%, #1b2370, #0b1040 70%); border: 2px solid #5b6cff; border-radius: var(--r); padding: 12px; margin: 12px 0; box-shadow: 0 0 28px rgba(91, 108, 255, .35), var(--sh); overflow: hidden; }
.x7-screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.x7-scr { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 104px; padding: 10px 6px; border-radius: 14px; border: 2px solid #3a4590; background: #121a52; color: #8d97cc; font: 700 13px/1.2 var(--body, inherit); cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; text-align: center; }
.x7-scr i { font-style: normal; font-size: 30px; filter: grayscale(1) brightness(.6); transition: filter .2s; }
.x7-scr b { font: 800 15px/1.15 var(--head); color: #c9d0ff; }
.x7-scr small { font-size: 12px; opacity: .85; }
.x7-scr.on { border-color: var(--c, #3fd8c4); background: #0f2a4a; color: #e9fbff; box-shadow: 0 0 18px var(--c, #3fd8c4), inset 0 0 18px rgba(63, 216, 196, .25); }
.x7-scr.on i { filter: none; }
.x7-scr.on b { color: #fff; }
.x7-scr:active { transform: scale(.95); }
.x7-scr.flash { background: #ff4d6d; border-color: #fff; color: #fff; box-shadow: 0 0 26px #ff4d6d; }
.x7-scr.flash i { filter: none; }
.x7-room.chaos { animation: x7shake .16s linear infinite; border-color: #ff4d6d; }
@keyframes x7shake { 25% { transform: translate(-3px, 1px); } 75% { transform: translate(3px, -1px); } }
.x7-pet { position: absolute; right: 8px; bottom: 6px; width: 26%; max-width: 160px; pointer-events: none; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); animation: x7hop .5s ease-in-out infinite alternate; }
[dir=rtl] .x7-pet { right: auto; left: 8px; }
@keyframes x7hop { to { transform: translateY(-14px) rotate(-6deg); } }
.x7-info { color: #dfe4ff; font-weight: 700; margin-top: 10px; min-height: 1.3em; }
.x7-info:empty { display: none; }
.x7-q { margin: 12px 0; }
.x7-q h3 { margin: 0 0 8px; font-size: 18px; }
.x7-q:empty { display: none; }
.x7-go { display: block; margin: 14px auto; }

/* grids never grow wider than the screen (long code lines scroll inside their box) */
.x7-use, .x7-parts, .x7-map { grid-template-columns: minmax(0, 1fr); }
.x7-part, .x7-q, .x7-room { min-width: 0; }
.x7-code pre, .x7-pcode pre { overflow-x: auto; max-width: 100%; }

/* action pictures */
.x7-ai { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; flex: none; }
.x7-aie { font-style: normal; font-size: 32px; line-height: 44px; width: 44px; text-align: center; display: inline-block; flex: none; }
.x7-aibig { width: 72px; height: 72px; object-fit: contain; vertical-align: middle; border-radius: 14px; }

/* use: devices + parts */
.x7-use { display: grid; gap: 12px; }
.x7-disp { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; position: sticky; top: 6px; z-index: 3; background: rgba(11, 16, 64, .92); border-radius: 16px; padding: 8px; box-shadow: var(--sh); }
.x7-dev { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; background: #161f5c; color: #c9d0ff; border: 2px solid #2c3680; transition: background .2s, box-shadow .2s; }
.x7-dev img, .x7-dev .x7-aie { grid-row: span 2; width: 38px; height: 38px; line-height: 38px; font-size: 26px; }
.x7-dev small { font-size: 12px; font-weight: 700; }
.x7-dev b { font: 900 20px/1 var(--head); color: #fff; }
.x7-dev.on { background: #3b3a12; border-color: #ffc83d; box-shadow: 0 0 16px rgba(255, 200, 61, .55); }
.x7-dev.fl { animation: x7pop .5s ease-out; border-color: #7dffe0; }
@keyframes x7pop { 40% { transform: scale(1.08); box-shadow: 0 0 22px #7dffe0; } }
.x7-parts { display: grid; gap: 12px; }
.x7-part { background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); }
.x7-part h2 { margin: 0 0 6px; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.x7-part h2 span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #5b6cff; color: #fff; font-size: 16px; flex: none; }
.x7-part.done h2 span { background: #22c58b; }
.x7-part.done h2 span::after { content: ''; }
.x7-part.locked { opacity: .5; pointer-events: none; filter: grayscale(.5); }
.x7-part > p { margin: 0 0 8px; }

/* 1) command map */
.x7-map { display: grid; gap: 10px; }
.x7-mrow { display: grid; grid-template-columns: 120px auto 1fr; gap: 8px; align-items: center; border-left: 6px solid var(--c, #5b6cff); padding: 6px 0 6px 10px; }
[dir=rtl] .x7-mrow { border-left: 0; border-right: 6px solid var(--c, #5b6cff); padding: 6px 10px 6px 0; }
.x7-mh { display: grid; justify-items: center; gap: 2px; text-align: center; }
.x7-mh i { font-style: normal; }
.x7-mh i img { width: 64px; height: 64px; object-fit: contain; }
.x7-mh b { font-size: 14px; }
.x7-arrow { font-size: 22px; color: var(--c, #5b6cff); }
.x7-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.x7-act { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; min-height: 48px; border-radius: 14px; border: 2px solid #d8dcf5; background: #f7f8ff; font: 700 14px/1.15 var(--body, inherit); cursor: pointer; }
.x7-act .x7-ai, .x7-act .x7-aie { width: 34px; height: 34px; line-height: 34px; font-size: 24px; }
.x7-act.on { border-color: var(--c, #22c58b); background: #effff6; box-shadow: 0 0 0 2px var(--c, #22c58b) inset; }
.x7-code { margin-top: 10px; }

/* 2) events */
.x7-pad { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.x7-hold { min-width: 120px; }
.x7-strip { display: flex; gap: 2px; height: 30px; align-items: stretch; background: #0b1040; border-radius: 10px; padding: 4px; overflow: hidden; direction: ltr; }
.x7-strip:empty { display: none; }
.x7-strip i { flex: 1 1 0; min-width: 2px; border-radius: 3px; opacity: .25; background: #6b78b8; transition: opacity .1s; }
.x7-strip i.f-palm { background: #22c58b; }
.x7-strip i.f-fist { background: #ff8a3d; }
.x7-strip i.f-peace { background: #b06bff; }
.x7-strip i.f-q { background: #59608f; }
.x7-strip i.f-none { background: #2a3466; }
.x7-strip i.seen { opacity: 1; }
.x7-strip i.ev { box-shadow: 0 0 0 2px #fff, 0 0 10px #ffc83d; transform: scaleY(1.25); background-image: linear-gradient(#ffc83d, transparent); }
.x7-cnt { margin: 8px 0; min-height: 1.3em; }
.x7-cnt b { font: 900 20px/1.2 var(--head); }
.x7-cnt p { margin: 6px 0 0; font-weight: 700; }
.x7-fix:empty { display: none; }
.x7-fixon { display: grid; gap: 8px; justify-items: start; margin-top: 8px; }
.x7-fixon p { margin: 0; }
.x7-sl { display: grid; gap: 4px; width: 100%; max-width: 520px; background: #f7f8ff; border-radius: 14px; padding: 8px 12px; }
.x7-sl small { font-weight: 800; }
.x7-sl input { width: 100%; accent-color: #6c5ce7; height: 28px; }

/* 3) safe list */
.x7-allow { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.x7-tile { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 2px solid #d8dcf5; background: #fff; font: 700 14px/1.15 var(--body, inherit); cursor: pointer; text-align: center; min-height: 112px; }
.x7-tile .x7-ai { width: 56px; height: 56px; }
.x7-tile em { font-style: normal; font-size: 13px; color: #59608f; }
.x7-tile.yes { border-color: #22c58b; background: #effff6; }
.x7-tile.no { border-color: #ff4d6d; background: #fff0f3; }
.x7-atk { display: grid; gap: 8px; justify-items: start; margin-top: 10px; }
.x7-atk:empty { display: none; }

/* 4) captain test */
.x7-req { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 800 18px/1.2 var(--head); background: #fff8e1; border: 2px dashed #ffc83d; border-radius: 16px; padding: 8px 12px; }
.x7-req:empty { display: none; }
.x7-tbl { display: grid; gap: 4px; margin: 10px 0; overflow-x: auto; }
.x7-tbl:empty { display: none; }
.x7-tr { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr 32px; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 10px; background: #f7f8ff; font-size: 14px; min-width: 420px; }
.x7-tr span { display: flex; align-items: center; gap: 6px; }
.x7-tr .x7-ai, .x7-tr .x7-aie { width: 28px; height: 28px; line-height: 28px; font-size: 20px; }
.x7-tr.h { background: transparent; font-weight: 800; color: #59608f; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.x7-tr.good { background: #effff6; }
.x7-tr.bad { background: #fff0f3; }
.x7-capfb:empty { display: none; }

/* Pro Lab */
.x7-pcode pre { white-space: pre; overflow-x: auto; }
.x7-sel, .x7-num { font: 700 14px/1.2 ui-monospace, Menlo, Consolas, monospace; background: #1d2566; color: #ffc83d; border: 1px solid #5b6cff; border-radius: 6px; padding: 2px 4px; min-height: 30px; }
.x7-num { width: 5.5ch; text-align: center; }
.x7-chk { display: inline-flex; align-items: center; gap: 3px; color: #7dffe0; cursor: pointer; }
.x7-chk input { width: 18px; height: 18px; accent-color: #22c58b; margin: 0; }
.x7-res { margin: 10px 0; }
.x7-res:empty { display: none; }
.x7-res b.good { color: #1b7f57; }
.x7-res b.bad { color: #c2185b; }
.x7-tests { columns: 2; column-gap: 18px; margin: 8px 0; padding-inline-start: 20px; font-size: 14px; }
.x7-tests li { break-inside: avoid; margin: 2px 0; }
.x7-tests li.no { color: #c2185b; font-weight: 700; }
.x7-chart { cursor: crosshair; max-width: 640px; margin: 8px auto; }
.x7-chart svg { width: 100%; height: auto; display: block; }
.x7-leg { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; font-size: 13px; font-weight: 700; margin-top: 6px; }
.x7-leg span::before { content: ''; display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.x7-leg .fa::before { background: #ff6b6b; }
.x7-leg .mi::before { background: #ffc83d; }
.x7-leg .gz::before { background: #22c58b; height: 10px; opacity: .5; }
.x7-pick { text-align: center; margin: 6px 0; }
.x7-pick:empty { display: none; }
.x7-red { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 8px 0; }
.x7-rc { display: grid; gap: 4px; text-align: start; padding: 10px 12px; border-radius: 14px; border: 2px solid #d8dcf5; background: #fff; cursor: pointer; font: inherit; min-height: 76px; }
.x7-rc b { font-size: 15px; }
.x7-rc small { color: #59608f; font-size: 13px; }
.x7-rc.good { border-color: #22c58b; background: #effff6; }
.x7-rc.bad { border-color: #ff4d6d; background: #fff0f3; }

@media (max-width: 560px) {
  .x7-screens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .x7-scr { min-height: 92px; }
  .x7-disp { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; padding: 4px; }
  .x7-dev { grid-template-columns: 1fr; grid-template-rows: none; justify-items: center; text-align: center; padding: 4px 2px; row-gap: 1px; }
  .x7-dev img, .x7-dev .x7-aie { grid-row: auto; width: 28px; height: 28px; line-height: 28px; font-size: 20px; }
  .x7-dev small { font-size: 10px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .x7-dev b { font-size: 15px; }
  .x7-allow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x7-red { grid-template-columns: minmax(0, 1fr); }
  .x7-mrow { grid-template-columns: 1fr; }
  .x7-arrow { display: none; }
  .x7-mh { grid-template-columns: auto 1fr; justify-items: start; text-align: start; align-items: center; gap: 8px; }
  .x7-mh i img { width: 48px; height: 48px; }
  .x7-act { flex: 1 1 calc(50% - 6px); }
  .x7-hold { flex: 1 1 100%; }
  .x7-tests { columns: 1; }
  .x7-pet { width: 34%; }
}

/* v0.22.28: the "Tell a grown-up" report button sits inside the guide bar (never over the goal text, EN or AR) */
.x-guide .ivr-fab.x-ivrdock { position: static; inset: auto; flex: none; box-shadow: none; border: 2px solid #e3e6f5; opacity: 1; font-size: 13px; padding: 8px 12px; min-height: 44px; }
@media (max-width: 700px) { .x-guide .ivr-fab.x-ivrdock { padding: 6px 10px; font-size: 12px; max-width: 34%; line-height: 1.15; text-align: start; } }
