/* ===== NaijaWaka: bright, sunlit, joyful ===== */
:root {
  --g: #0aa650; --g-d: #067a3a; --g-dd: #045a2b; --g-l: #34d27b; --g-xl: #c9f5d9;
  --sun: #ffc83d; --sun-d: #e29a00; --orange: #ff8a1f; --red: #ff4d5e; --red-d: #c9283a;
  --sky: #4cc3ff; --ink: #17332b; --ink-2: #4a6259; --cream: #fffaf0; --card: #ffffff;
  --shadow: 0 10px 30px rgba(6, 90, 43, .22), 0 2px 0 rgba(255, 255, 255, .9) inset;
  --font: 'Baloo 2', 'Nunito', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--body); font-weight: 600;
  background: linear-gradient(#7fd8ff, #d9f6ff 55%, #fff6cf); overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid #1a73ff; outline-offset: 3px; border-radius: 12px; }
h1, h2, h3 { font-family: var(--font); margin: 0; line-height: 1.05; }

/* ===== sunlit sky backdrop ===== */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(#58c8ff 0%, #a8e6ff 45%, #fff3c0 100%); }
.sun { position: absolute; top: -90px; right: -70px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, #fffde0 0 22%, #ffe27a 36%, rgba(255, 190, 40, .55) 58%, rgba(255, 190, 40, 0) 72%); animation: sunpulse 5s ease-in-out infinite; }
.rays { position: absolute; top: -380px; right: -380px; width: 860px; height: 860px; border-radius: 50%; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255, 248, 190, .75) 0 7deg, rgba(255, 248, 190, 0) 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 68%); mask: radial-gradient(circle, #000 15%, transparent 68%); animation: spin 90s linear infinite; }
.cloud { position: absolute; width: 190px; height: 56px; background: #fff; border-radius: 60px; opacity: .92; filter: drop-shadow(0 6px 8px rgba(40, 120, 180, .18)); }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 80px; height: 80px; left: 28px; top: -38px; } .cloud::after { width: 58px; height: 58px; right: 30px; top: -26px; }
.cloud.c1 { top: 10%; animation: drift 70s linear infinite; } .cloud.c2 { top: 26%; transform: scale(.7); opacity: .8; animation: drift 95s linear -30s infinite; } .cloud.c3 { top: 5%; transform: scale(.55); animation: drift 120s linear -70s infinite; }
.glow-floor { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 60%; background: radial-gradient(ellipse at 50% 100%, rgba(255, 224, 120, .8), rgba(255, 224, 120, 0) 65%); }
body.in-level .cloud, body.in-level .rays { opacity: .35; }
body.boss-level .sky { background: linear-gradient(#ff9a3d 0%, #ffd27a 50%, #fff0b8 100%); }
body.on-home .sky { opacity: 0; }
body.hit { animation: hit .38s; }

/* ===== header ===== */
.hud { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px max(12px, env(safe-area-inset-left)); background: linear-gradient(#ffffffee, #ffffffcc); backdrop-filter: blur(8px); box-shadow: 0 4px 18px rgba(6, 90, 43, .16); border-bottom: 3px solid var(--g); }
.brand { display: flex; align-items: center; gap: 8px; font: 800 1.35rem/1 var(--font); color: var(--g-d); text-shadow: 0 1px 0 #fff; }
.brand-flag { font-size: 1.5rem; animation: wave 2.6s ease-in-out infinite; transform-origin: 20% 80%; display: inline-block; }
.hud-right { display: flex; align-items: center; gap: 8px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 99px; background: #fff; box-shadow: 0 2px 0 #cfe8d8, 0 6px 12px rgba(6, 90, 43, .12); font-weight: 800; }
.streak-chip { padding: 8px 12px; color: var(--orange); font-family: var(--font); font-size: 1.05rem; }
.rank-chip .rk-ico { font-size: 1.5rem; }
.rk-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 82px; text-align: left; }
.rk-txt b { font: 800 .86rem var(--font); } .rk-txt small { font-size: .68rem; color: var(--ink-2); }
.rk-bar { height: 7px; border-radius: 9px; background: #dff3e6; overflow: hidden; margin: 2px 0; }
.rk-bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #ffd23f, #ff9f1c); box-shadow: 0 0 8px #ffd23f; transition: width .8s cubic-bezier(.2, .9, .3, 1.2); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; background: #fff; font-size: 1.1rem; font-weight: 800; box-shadow: 0 3px 0 #cfe8d8, 0 6px 12px rgba(6, 90, 43, .12); transition: transform .15s; }
.icon-btn:active { transform: translateY(2px) scale(.96); }

/* ===== buttons ===== */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 24px; border-radius: 18px; font: 800 1.15rem var(--font); letter-spacing: .3px; transition: transform .12s, box-shadow .12s, filter .2s; -webkit-user-select: none; user-select: none; }
.btn-go { color: #fff; text-shadow: 0 2px 0 rgba(0, 70, 30, .45); background: linear-gradient(#58e394, var(--g) 55%, var(--g-d)); box-shadow: 0 6px 0 var(--g-dd), 0 12px 22px rgba(6, 90, 43, .38), 0 2px 0 rgba(255, 255, 255, .6) inset; }
.btn-go:hover:not(:disabled) { filter: brightness(1.07); }
.btn-go:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--g-dd), 0 4px 10px rgba(6, 90, 43, .3); }
.btn-go:disabled { filter: grayscale(.9) brightness(1.15); opacity: .65; box-shadow: 0 4px 0 #8aa595; }
.btn-ghost { color: var(--g-d); background: linear-gradient(#fff, #eefaf2); box-shadow: 0 5px 0 #b9dcc7, 0 10px 18px rgba(6, 90, 43, .14); }
.btn-ghost:active { transform: translateY(4px); box-shadow: 0 1px 0 #b9dcc7; }
.btn-sun { color: #5a3300; background: linear-gradient(#ffe07a, var(--sun) 55%, #ffab1f); box-shadow: 0 5px 0 var(--sun-d), 0 10px 18px rgba(226, 154, 0, .35), 0 2px 0 rgba(255, 255, 255, .7) inset; }
.btn-sun:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sun-d); }
.btn-sun.small { min-height: 42px; padding: 6px 14px; font-size: 1rem; }
.btn.big { min-width: min(320px, 90%); min-height: 60px; font-size: 1.35rem; }
.btn-true { flex: 1; color: #fff; background: linear-gradient(#58e394, var(--g)); box-shadow: 0 6px 0 var(--g-dd); }
.btn-false { flex: 1; color: #fff; background: linear-gradient(#ff8a96, var(--red)); box-shadow: 0 6px 0 var(--red-d); }
.btn-true:active, .btn-false:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.btn-true:disabled, .btn-false:disabled { opacity: .55; }

/* ===== layout shell ===== */
.app { max-width: 720px; margin: 0 auto; padding: 14px 14px 120px; min-height: calc(100vh - 62px); }
.app.screen-home { max-width: none; padding: 0; }
.screen-home, .screen-map, .screen-board, .screen-result { animation: fadein .45s ease both; }

/* ===== HOME ===== */
.home { position: relative; min-height: calc(100vh - 62px); overflow: hidden; display: flex; justify-content: center; }
.home-bg { position: absolute; inset: 0; } .hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-svg .hsun { transform-origin: 610px 96px; animation: sunpulse 5s ease-in-out infinite; }
.hero-svg .hcloud { animation: drift2 40s linear infinite; } .hero-svg .c2 { animation-duration: 62s; animation-delay: -20s; }
.hero-svg .palm { transform-origin: 70px 300px; animation: sway 4s ease-in-out infinite; transform-box: view-box; }
.bunting { position: absolute; top: 0; left: 0; width: 100%; height: 90px; }
.bunting .flag { animation: flutter 2.4s ease-in-out infinite; transform-box: view-box; }
.home-content { position: relative; z-index: 2; width: min(560px, 100%); padding: 40px 18px 190px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .86; margin-top: 10px; }
.word { display: block; font-family: var(--font); font-weight: 800; text-transform: uppercase; }
.word.w1 { font-size: clamp(3.6rem, 17vw, 6.4rem); letter-spacing: 2px; } .word.w2 { font-size: clamp(2.8rem, 13vw, 5rem); letter-spacing: 8px; }
.ltr { display: inline-block; opacity: 0; animation: letterin .7s cubic-bezier(.2, 1.6, .4, 1) forwards, bounce 3s ease-in-out 1.4s infinite; }
.w1 .ltr { color: #fff; -webkit-text-stroke: 5px var(--g-d); paint-order: stroke fill; text-shadow: 0 7px 0 var(--g-dd), 0 14px 22px rgba(6, 90, 43, .5), 0 0 30px rgba(255, 255, 255, .8); }
.w1 .ltr:nth-child(odd) { color: #eaffef; }
.w2 .ltr { color: var(--sun); -webkit-text-stroke: 5px #b86a00; paint-order: stroke fill; text-shadow: 0 7px 0 #8a4a00, 0 14px 22px rgba(120, 60, 0, .5), 0 0 34px rgba(255, 230, 120, .9); }
.tagline { margin: 4px 0 0; padding: 8px 16px; border-radius: 16px; font: 800 1.1rem var(--font); color: var(--g-dd); background: rgba(255, 255, 255, .82); box-shadow: 0 6px 16px rgba(6, 90, 43, .18); }
.home-pot { position: relative; width: 150px; margin: 0 auto; } .home-pot .pot { width: 100%; overflow: visible; filter: drop-shadow(0 12px 14px rgba(120, 30, 10, .35)); }
.play-btn { width: min(360px, 92%); min-height: 76px; font-size: 1.9rem; animation: pulse 1.8s ease-in-out infinite; }
.play-shine { position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-20deg); animation: shine 2.8s ease-in-out infinite; }
.home-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn small { font-size: .7rem; opacity: .8; } .dot-new { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff; animation: pulse 1s infinite; }
.stat-row { display: flex; gap: 10px; }
.stat { min-width: 86px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .88); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat b { font: 800 1.35rem var(--font); color: var(--g-d); } .stat small { font-size: .72rem; color: var(--ink-2); }
.road-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1; pointer-events: none; overflow: hidden; }
.driver { position: absolute; bottom: 14px; width: 130px; } .mini-danfo { width: 100%; }
.d1 { animation: drive 11s linear infinite; } .d2 { animation: drive 17s linear -6s infinite; transform: scale(.8); bottom: 6px; filter: hue-rotate(-12deg); }

/* ===== animated SVG bits ===== */
.bob { animation: bobbing .5s ease-in-out infinite alternate; transform-box: fill-box; }
.wheel { animation: spin .6s linear infinite; transform-box: fill-box; transform-origin: center; }
.pot { overflow: visible; }
.pot .steam path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: 0; animation: steam 2.4s ease-in infinite; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .9)); }
.pot .steam path:nth-child(2) { animation-delay: .8s; } .pot .steam path:nth-child(3) { animation-delay: 1.6s; }
.pot .lid { transform-box: fill-box; transform-origin: 50% 100%; animation: lidjig 3s ease-in-out infinite; }
.pot .eyes { animation: blink 4.5s infinite; transform-box: fill-box; transform-origin: center; }
.mascot { position: relative; display: block; }
.mascot.happy .pot { animation: hop .6s cubic-bezier(.3, 1.7, .5, 1); } .mascot.happy .lid { animation: lidpop .6s; }
.mascot.sad .pot { animation: sadshake .5s; filter: saturate(.7) drop-shadow(0 0 0 #000); } .mascot.sad .mouth { transform: scaleY(-1) translateY(-16px); transform-box: fill-box; }
.mascot.idle .pot { animation: breathe 3s ease-in-out infinite; }
.bubble { position: absolute; left: 100%; top: 4px; margin-left: -8px; padding: 6px 12px; border-radius: 14px; background: #fff; box-shadow: 0 6px 14px rgba(6, 90, 43, .22); font: 800 .9rem var(--font); white-space: nowrap; z-index: 2; animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.bubble::before { content: ''; position: absolute; left: -7px; bottom: 8px; border: 7px solid transparent; border-right-color: #fff; border-left: 0; }

/* ===== JOURNEY MAP ===== */
.jr-top { position: sticky; top: 62px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; }
.jr-top h1 { font-size: 1.7rem; color: var(--g-dd); text-shadow: 0 2px 0 #fff, 0 0 18px #fff; }
.chapter { margin: 10px 0 26px; border-radius: 28px; background: rgba(255, 255, 255, .55); box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(4px); }
.chapter.locked { filter: saturate(.55); }
.chap-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; background: linear-gradient(120deg, var(--from), var(--to)); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); position: relative; overflow: hidden; }
.chap-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 5s ease-in-out infinite; }
.chap-head > div:nth-child(2) { flex: 1; } .chap-head small { font-weight: 800; opacity: .9; letter-spacing: 1px; text-transform: uppercase; }
.chap-head h2 { font-size: 1.5rem; } .chap-head p { margin: 2px 0 0; font-size: .85rem; }
.chap-emoji { font-size: 2.4rem; animation: bounce 2.5s ease-in-out infinite; } .chap-count { font: 800 1.1rem var(--font); padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .28); }
.path { position: relative; margin: 0 8px; } .trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.trail-base { fill: none; stroke: rgba(6, 90, 43, .25); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 2 20; vector-effect: non-scaling-stroke; }
.trail-done { fill: none; stroke: #ffc83d; stroke-width: 12; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px #ffd96b); }
.deco { position: absolute; font-size: 2.2rem; opacity: .9; animation: float 4s ease-in-out infinite; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .15)); }
.node { position: absolute; width: 74px; height: 74px; transform: translate(-50%, -50%); animation: nodein .5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: var(--d); }
.node-face { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font: 800 1.7rem var(--font); color: #fff; transition: transform .15s; }
.node.done .node-face { background: radial-gradient(circle at 35% 28%, #7dffb0, var(--g) 65%); box-shadow: 0 6px 0 var(--g-dd), 0 10px 18px rgba(6, 90, 43, .4); }
.node.current .node-face { background: radial-gradient(circle at 35% 28%, #ffe98a, var(--orange) 70%); box-shadow: 0 6px 0 #b85a00, 0 0 0 6px rgba(255, 255, 255, .85), 0 0 28px 8px rgba(255, 200, 60, .85); animation: pulse 1.4s ease-in-out infinite; }
.node.locked .node-face { background: radial-gradient(circle at 35% 28%, #e9eeeb, #aebdb5 70%); box-shadow: 0 6px 0 #7f8f87; font-size: 1.4rem; }
.node.boss { width: 92px; height: 92px; } .node.boss .node-face { font-size: 2.6rem; border: 5px solid #ffe27a; background: radial-gradient(circle at 35% 28%, #ff9d8a, var(--red) 70%); box-shadow: 0 7px 0 var(--red-d), 0 0 26px rgba(255, 190, 60, .9); }
.node.boss.locked .node-face { filter: grayscale(.9); }
.node:hover .node-face, .node:focus-visible .node-face { transform: scale(1.1); }
.marker { position: absolute; top: -34px; left: 50%; margin-left: -18px; font-size: 2.2rem; animation: bobbing .5s ease-in-out infinite alternate; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .25)); }
.node-stars { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); color: #ffb400; font-size: 1rem; letter-spacing: 1px; text-shadow: 0 2px 0 #fff, 0 0 8px #fff; white-space: nowrap; }
.node-label { position: absolute; top: 50%; transform: translateY(-50%); padding: 5px 12px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(6, 90, 43, .2); font: 800 .88rem var(--font); white-space: nowrap; pointer-events: none; }
.node-label.right { left: 100%; margin-left: 12px; } .node-label.left { right: 100%; margin-right: 12px; }
.locked .node-label { opacity: .7; }
.jr-end { text-align: center; padding: 10px 0 40px; font-weight: 800; color: var(--g-dd); } .jr-end-ico { font-size: 3rem; animation: spin 14s linear infinite; display: inline-block; }

/* ===== LEVEL ===== */
.topbar { display: flex; align-items: center; gap: 10px; }
.seg-bar { flex: 1; display: flex; gap: 5px; } .seg-bar i { flex: 1; height: 14px; border-radius: 9px; background: rgba(255, 255, 255, .7); box-shadow: 0 2px 0 rgba(6, 90, 43, .2) inset; transition: background .4s, box-shadow .4s; }
.seg-bar i.done { background: linear-gradient(#7dffb0, var(--g)); box-shadow: 0 0 10px rgba(52, 210, 123, .8); } .seg-bar i.now { background: linear-gradient(#fff2b0, var(--sun)); animation: pulse 1.2s infinite; }
.hearts { display: flex; gap: 2px; font-size: 1.5rem; } .heart { display: inline-block; transition: transform .3s; filter: drop-shadow(0 2px 2px rgba(180, 20, 40, .35)); }
.heart.gone { filter: grayscale(1) opacity(.45); transform: scale(.85); } .heart.break { animation: heartbreak .6s; }
.lv-title { margin: 12px 0 6px; text-align: center; font: 800 1rem var(--font); color: var(--g-dd); } .lv-title span { padding: 4px 14px; border-radius: 99px; background: rgba(255, 255, 255, .85); box-shadow: 0 3px 8px rgba(6, 90, 43, .15); }
.qcard { margin: 8px 0 14px; padding: 18px 20px; border-radius: 24px; background: linear-gradient(#fff, #fffaf0); box-shadow: var(--shadow); border: 3px solid #fff; position: relative; }
.qcard::before { content: ''; position: absolute; inset: 0; border-radius: 22px; background: linear-gradient(115deg, rgba(255, 255, 255, .9), transparent 40%); pointer-events: none; }
.q-tag { display: inline-block; padding: 2px 12px; border-radius: 99px; background: var(--g-xl); color: var(--g-dd); font: 800 .78rem var(--font); text-transform: uppercase; letter-spacing: 1px; }
.q { margin-top: 8px; font-size: clamp(1.25rem, 4.6vw, 1.7rem); color: var(--ink); }
.msg { min-height: 28px; text-align: center; font: 800 1.1rem var(--font); color: var(--red-d); } .msg.flash { animation: pop .4s; }
.mascot.idle, .level .mascot { position: fixed; left: 8px; bottom: 10px; width: 84px; z-index: 6; transition: bottom .3s; }
.home-pot.mascot { position: relative; left: auto; bottom: auto; z-index: 2; }
.level.has-fb .mascot { bottom: 142px; }
.fb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; transform: translateY(120%); transition: transform .35s cubic-bezier(.2, 1.2, .4, 1); }
.fb.show { transform: none; } .fb.good { background: linear-gradient(#d9ffe6, #b6f5cf); box-shadow: 0 -8px 30px rgba(6, 90, 43, .3); border-top: 4px solid var(--g); }
.fb-in { max-width: 720px; margin: 0 auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.fb-txt { display: flex; flex-direction: column; gap: 2px; color: var(--g-dd); } .fb-txt strong { font: 800 1.35rem var(--font); } .fb-txt span { font-weight: 700; font-size: .95rem; color: #1e5a3a; }
.float-xp { position: fixed; left: 50%; top: 38%; z-index: 40; transform: translateX(-50%); font: 800 2.6rem var(--font); color: #fff; -webkit-text-stroke: 4px #b86a00; paint-order: stroke fill; text-shadow: 0 5px 0 #8a4a00, 0 0 24px #ffe27a; pointer-events: none; animation: floatup 1.3s ease-out forwards; }
.splash { position: absolute; inset: -14px -14px -120px; z-index: 50; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #fffbe0, #bff0d0 70%); animation: fadein .25s; }
.splash.boss { background: radial-gradient(circle at 50% 40%, #fff0b8, #ff9a5c 75%); } .splash.out { opacity: 0; transition: opacity .28s; }
.splash-in { text-align: center; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); } .splash-ico { font-size: 5rem; animation: bounce 1s ease-in-out infinite; }
.splash.boss .splash-ico { animation: sadshake .5s infinite; } .splash-kick { font: 800 1.2rem var(--font); letter-spacing: 3px; text-transform: uppercase; color: var(--g-d); } .splash.boss .splash-kick { color: #a02020; }
.splash-title { font: 800 clamp(2rem, 9vw, 3.2rem) var(--font); color: var(--g-dd); text-shadow: 0 3px 0 #fff, 0 0 30px #fff; } .splash-mech { margin-top: 6px; font-weight: 800; color: var(--ink-2); }

/* ===== mechanics ===== */
.opts { display: grid; gap: 12px; } .opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; background: linear-gradient(#fff, #f6fbf8); border: 3px solid #d6eadd; box-shadow: 0 5px 0 #c3dccb; font: 800 1.1rem var(--font); transition: transform .12s, border-color .2s, background .2s; animation: slidein .4s both; }
.opt:nth-child(2) { animation-delay: .06s; } .opt:nth-child(3) { animation-delay: .12s; } .opt:nth-child(4) { animation-delay: .18s; }
.opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--g-l); } .opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #c3dccb; }
.opt-key { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--g-xl); color: var(--g-dd); font-size: .9rem; flex: none; }
.opt.ok { background: linear-gradient(#dcffe9, #b6f5cf); border-color: var(--g); box-shadow: 0 5px 0 var(--g-d), 0 0 22px rgba(52, 210, 123, .7); animation: hop .5s; }
.opt.bad { background: linear-gradient(#ffe4e7, #ffc9cf); border-color: var(--red); box-shadow: 0 5px 0 var(--red-d); opacity: .75; }
.opts-art { grid-template-columns: 1fr 1fr; } .opts-art .opt { padding: 6px; } .opts-art svg { width: 100%; height: auto; border-radius: 12px; display: block; }
.build { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ans-line { width: 100%; min-height: 70px; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .85); border: 3px dashed #b9dcc7; align-content: flex-start; }
.ans-line.empty::before { content: 'Tap the tiles to build your answer'; color: #8aa595; font-weight: 700; align-self: center; margin: 0 auto; }
.ans-order, .pool-order { flex-direction: column; } .pool { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } .pool-order { align-items: stretch; }
.tile { padding: 10px 18px; border-radius: 14px; background: linear-gradient(#fff, #f2faf5); border: 3px solid #d6eadd; box-shadow: 0 4px 0 #c3dccb; font: 800 1.05rem var(--font); transition: transform .12s, background .2s; animation: pop .3s both; }
.tile:hover:not(:disabled) { transform: translateY(-2px); } .tile:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #c3dccb; }
.tile.sel { background: linear-gradient(#fff6c4, #ffe27a); border-color: var(--sun-d); box-shadow: 0 4px 0 var(--sun-d), 0 0 14px rgba(255, 200, 60, .8); transform: translateY(-3px); }
.tile.ok { background: linear-gradient(#dcffe9, #b6f5cf); border-color: var(--g); box-shadow: 0 4px 0 var(--g-d); }
.groups { display: flex; flex-direction: column; gap: 10px; } .gt-solved { display: flex; flex-direction: column; gap: 8px; }
.gt-banner { padding: 10px 14px; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); } .gt-banner strong { font: 800 1.05rem var(--font); text-transform: uppercase; color: #17332b; } .gt-banner span { font-weight: 700; font-size: .92rem; }
.gt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .tile.gt { padding: 14px 4px; font-size: clamp(.82rem, 3.4vw, 1.05rem); word-break: break-word; min-height: 62px; }
.map-wrap { text-align: center; } .nmap { width: 100%; max-height: 52vh; overflow: visible; } .map-note { margin: 2px 0 0; font-size: .75rem; color: var(--ink-2); }
.map-sea { fill: #2b8fd1; font: 800 14px var(--font); opacity: .8; font-style: italic; }
.city { cursor: pointer; } .city .dot { fill: var(--orange); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); transition: r .2s; }
.city .ring { fill: rgba(255, 138, 31, .28); transform-box: fill-box; transform-origin: center; animation: ringpulse 1.6s ease-out infinite; }
.city:hover .dot, .city:focus .dot { r: 11; } .city .lbl { font: 800 14px var(--font); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.city.ok .dot { fill: var(--g); } .city.ok .ring { fill: rgba(10, 166, 80, .4); animation: none; r: 24; } .city.bad .dot { fill: var(--red); } .city.bad .ring { animation: none; fill: rgba(255, 77, 94, .3); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .mcol { display: flex; flex-direction: column; gap: 10px; } .tile.mt { width: 100%; padding: 14px 8px; }
.rapid { display: flex; flex-direction: column; gap: 14px; align-items: stretch; } .rf-count { text-align: center; font: 800 1rem var(--font); color: var(--ink-2); }
.rf-bar { height: 16px; border-radius: 9px; background: rgba(255, 255, 255, .8); overflow: hidden; box-shadow: 0 2px 0 rgba(6, 90, 43, .2) inset; } .rf-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--orange), var(--g-l)); background-size: 300% 100%; background-position: 100% 0; border-radius: 9px; box-shadow: 0 0 10px rgba(255, 138, 31, .6); }
.rf-card { min-height: 130px; display: grid; place-items: center; padding: 18px; border-radius: 22px; background: linear-gradient(#fff, #fffaf0); border: 3px solid #fff; box-shadow: var(--shadow); font: 800 clamp(1.25rem, 5vw, 1.7rem) var(--font); text-align: center; }
.rf-card.ok { background: linear-gradient(#dcffe9, #b6f5cf); border-color: var(--g); } .rf-card.bad { background: linear-gradient(#ffe4e7, #ffc9cf); border-color: var(--red); }
.rf-btns { display: flex; gap: 14px; } .rf-btns .btn { min-height: 64px; font-size: 1.3rem; }

/* ===== RESULT ===== */
.result { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 14px; }
.rs-glow { position: absolute; top: -40px; width: 520px; height: 520px; max-width: 120vw; border-radius: 50%; z-index: -1; background: repeating-conic-gradient(rgba(255, 240, 150, .9) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 10%, transparent 68%); mask: radial-gradient(circle, #000 10%, transparent 68%); animation: spin 30s linear infinite; }
.rs-title { font-size: clamp(2.2rem, 10vw, 3.4rem); color: #fff; -webkit-text-stroke: 5px var(--g-d); paint-order: stroke fill; text-shadow: 0 6px 0 var(--g-dd), 0 0 30px rgba(255, 255, 255, .9); animation: pop .6s cubic-bezier(.2, 1.7, .4, 1); }
.rs-sub { margin: 0; font: 800 1.1rem var(--font); color: var(--g-dd); }
.rs-stars { display: flex; gap: 10px; } .rs-star { font-size: 5.2rem; line-height: 1; color: #d6e3da; text-shadow: 0 5px 0 #b3c7ba; transform: scale(.7); transition: transform .3s; }
.rs-star.on.pop { color: #ffc400; text-shadow: 0 5px 0 #c27b00, 0 0 34px rgba(255, 210, 60, .95); animation: starpop .7s cubic-bezier(.2, 1.8, .4, 1) forwards; } .rs-star:nth-child(2) { margin-top: -18px; }
.badge-pop { padding: 8px 18px; border-radius: 99px; background: linear-gradient(#fff2b0, var(--sun)); font: 800 1.1rem var(--font); box-shadow: 0 5px 0 var(--sun-d); animation: pop .7s .8s both; }
.xp-big { font: 800 3rem var(--font); color: var(--orange); -webkit-text-stroke: 4px #fff; paint-order: stroke fill; text-shadow: 0 5px 0 #c26500; } .replay-note { color: var(--ink-2); font-weight: 700; max-width: 380px; }
.rs-lines { list-style: none; padding: 10px 16px; margin: 0; width: min(380px, 100%); border-radius: 18px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow); } .rs-lines li { display: flex; justify-content: space-between; padding: 5px 0; font-weight: 800; border-bottom: 1px dashed #d6eadd; } .rs-lines li:last-child { border: 0; } .rs-lines b { color: var(--g-d); }
.week-note { font-weight: 800; color: #7a4a00; background: #fff1c2; padding: 6px 14px; border-radius: 99px; }
.rank-card { display: flex; align-items: center; gap: 12px; width: min(380px, 100%); padding: 12px 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: left; } .rank-card .rk-ico { font-size: 2.4rem; } .rk-main { flex: 1; } .rk-main b { font: 800 1.1rem var(--font); } .rk-main .rk-bar { height: 12px; } .rk-main small { color: var(--ink-2); }
.rs-btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; width: 100%; } .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } .row .btn { min-height: 48px; font-size: 1rem; padding: 8px 18px; }
.gate-open { position: relative; width: 200px; height: 130px; display: grid; place-items: center; overflow: hidden; border-radius: 16px 16px 0 0; background: radial-gradient(circle, #fff7c0, #ffb02e); } .gate-ico { font-size: 4rem; animation: bounce 1.4s infinite; }
.gate { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #8a5a2e 0 12px, #6f4522 12px 14px); } .gate.l { left: 0; animation: gateL 1.4s .3s forwards ease-in; } .gate.r { right: 0; animation: gateR 1.4s .3s forwards ease-in; }

/* ===== modal, toast, board ===== */
.scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(8, 60, 36, .5); backdrop-filter: blur(5px); animation: fadein .25s; }
.modal { width: min(440px, 100%); max-height: 92vh; overflow: auto; padding: 22px 20px; text-align: center; border-radius: 28px; background: linear-gradient(#fff, #fffaf0); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); border: 4px solid #fff; animation: pop .45s cubic-bezier(.2, 1.5, .4, 1); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.modal h2 { font-size: 1.7rem; color: var(--g-dd); } .modal p { margin: 0; color: var(--ink-2); font-weight: 700; } .modal-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; } .modal-btns .btn { width: 100%; }
.modal .mascot.big { position: static; width: 120px; } .share-preview { width: 60%; max-width: 220px; height: auto; border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .badge { padding: 6px 12px; border-radius: 99px; background: linear-gradient(#fff2b0, var(--sun)); font: 800 .9rem var(--font); } .muted { color: var(--ink-2); }
#toasts { position: fixed; top: 74px; left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 10px 20px; border-radius: 99px; background: var(--ink); color: #fff; font: 800 1rem var(--font); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); animation: toastin .4s cubic-bezier(.2, 1.5, .4, 1); } .toast.rank { background: linear-gradient(#ffb400, var(--orange)); font-size: 1.3rem; } .toast.out { opacity: 0; transform: translateY(-10px); transition: .4s; }
.board-sub, .board-note { text-align: center; color: var(--ink-2); font-weight: 700; margin: 6px 0 12px; } .board-note { font-size: .8rem; }
.lb { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #cfe8d8; font: 800 1.1rem var(--font); animation: slidein .45s both; animation-delay: calc(var(--i) * 45ms); } .lb-row.top { background: linear-gradient(#fffbe5, #fff1bf); } .lb-row.me { background: linear-gradient(#dcffe9, #b6f5cf); box-shadow: 0 4px 0 var(--g-d), 0 0 18px rgba(52, 210, 123, .6); }
.lb-pos { width: 38px; text-align: center; font-size: 1.4rem; } .lb-name { flex: 1; } .lb b { color: var(--g-d); }
.noscript { padding: 20px; text-align: center; font-weight: 800; }

/* ===== keyframes ===== */
@keyframes spin { to { transform: rotate(360deg); } } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(110vw); } } @keyframes drift2 { from { transform: translateX(-200px); } to { transform: translateX(1000px); } }
@keyframes sunpulse { 50% { transform: scale(1.07); opacity: .92; } } @keyframes sway { 50% { transform: rotate(3deg); } }
@keyframes flutter { 50% { transform: rotate(7deg) skewX(4deg); } } @keyframes wave { 50% { transform: rotate(18deg); } }
@keyframes letterin { from { opacity: 0; transform: translateY(-60px) scale(.3) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes bounce { 50% { transform: translateY(-9px); } } @keyframes bobbing { to { transform: translateY(-3px); } } @keyframes float { 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes pulse { 50% { transform: scale(1.06); } } @keyframes shine { 0%, 55% { left: -80px; transform: translateX(0) skewX(-20deg); } 100% { left: 110%; transform: translateX(0) skewX(-20deg); } }
@keyframes drive { from { left: -170px; } to { left: 105%; } } @keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slidein { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } } @keyframes nodein { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes toastin { from { transform: translateY(-30px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 30% { opacity: .95; } 100% { opacity: 0; transform: translateY(-22px) scaleY(1.2); } }
@keyframes lidjig { 0%, 85%, 100% { transform: none; } 90% { transform: translateY(-4px) rotate(-3deg); } 95% { transform: translateY(-2px) rotate(2deg); } }
@keyframes lidpop { 40% { transform: translateY(-26px) rotate(-14deg); } } @keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes hop { 40% { transform: translateY(-16px) scale(1.06); } } @keyframes breathe { 50% { transform: scale(1.04, .97); } }
@keyframes sadshake { 25% { transform: translateX(-6px) rotate(-4deg); } 75% { transform: translateX(6px) rotate(4deg); } }
@keyframes ringpulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 20px) scale(.6); } 25% { transform: translate(-50%, 0) scale(1.15); } to { opacity: 0; transform: translate(-50%, -110px) scale(1); } }
@keyframes heartbreak { 30% { transform: scale(1.5) rotate(-12deg); } 60% { transform: scale(.6) rotate(10deg); } }
@keyframes starpop { 0% { transform: scale(.2) rotate(-40deg); } 70% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes gateL { to { transform: translateX(-102%); } } @keyframes gateR { to { transform: translateX(102%); } }
@keyframes hit { 20% { box-shadow: inset 0 0 0 100vmax rgba(255, 60, 70, .22); } 40% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }
.shake { animation: shakex .4s; } @keyframes shakex { 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.pop-in { animation: pop .4s cubic-bezier(.2, 1.5, .4, 1); } .slide-in { animation: slidein .4s both; }
.node.shake { animation: shakex .4s; }

/* ===== responsive ===== */
@media (max-width: 480px) {
  .brand span:last-child { display: none; } .rk-txt { min-width: 70px; } .node { width: 64px; height: 64px; } .node.boss { width: 82px; height: 82px; }
  .node-label { font-size: .78rem; max-width: 128px; overflow: hidden; text-overflow: ellipsis; } .match { gap: 8px; } .gt-grid { gap: 6px; }
  .opts-art { gap: 8px; } .home-content { padding-bottom: 160px; }
}
@media (min-width: 900px) { .app { padding-top: 24px; } .opts { grid-template-columns: 1fr 1fr; } .opts-art { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ltr { opacity: 1; }
}

/* ===== concept-art visuals (cover, photos, signboards) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-backdrop { position: absolute; inset: -30px; background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 244, 200, .38)), url(assets/cover.webp) center 40% / cover; filter: blur(20px) saturate(1.35) brightness(1.12); animation: kenburns 26s ease-in-out infinite alternate; }
.home-content { padding-top: 54px; }
.poster { position: relative; width: min(500px, 100%); aspect-ratio: 512 / 450; border-radius: 30px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 0 0 4px var(--g), 0 18px 40px rgba(6, 90, 43, .45), 0 0 60px rgba(255, 220, 90, .75); background: #cfeaff; animation: pop .8s cubic-bezier(.2, 1.4, .4, 1) both; }
.poster-img { position: absolute; inset: 0; background: url(assets/cover.webp) top center / 100% auto no-repeat; transform-origin: 40% 30%; animation: kenburns 14s ease-in-out infinite alternate; filter: saturate(1.12) brightness(1.04); }
.sheen { position: absolute; top: -20%; bottom: -20%; width: 28%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); animation: sheen 5.5s ease-in-out infinite; }
.glint { position: absolute; width: 26px; height: 26px; background: radial-gradient(circle, #fff 0 18%, rgba(255, 255, 255, 0) 60%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: glint 2.4s ease-in-out infinite; }
.glint.g1 { left: 12%; top: 10%; } .glint.g2 { left: 56%; top: 30%; animation-delay: .8s; width: 20px; height: 20px; } .glint.g3 { left: 82%; top: 6%; animation-delay: 1.5s; }
.sign { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px 26px; border-radius: 14px; border: 5px solid #a8743c; font: 800 1.25rem var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: #fff; -webkit-text-stroke: 1px rgba(0, 0, 0, .25); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); box-shadow: 0 0 0 3px #5e3b1b, 0 8px 0 #4a2d12, 0 14px 22px rgba(60, 30, 0, .4), inset 0 3px 0 rgba(255, 255, 255, .45); transition: transform .12s, box-shadow .12s, filter .2s; }
.sign:hover { filter: brightness(1.08); } .sign:active { transform: translateY(6px); box-shadow: 0 0 0 3px #5e3b1b, 0 2px 0 #4a2d12, inset 0 3px 0 rgba(255, 255, 255, .45); }
.s-green { background: linear-gradient(#5be08f, #0aa650 60%, #078c42); } .s-orange { background: linear-gradient(#ffb057, #ff8a1f 60%, #e66f00); }
.s-blue { background: linear-gradient(#6cc0ff, #1a8bff 60%, #0a6fe0); } .s-yellow { background: linear-gradient(#ffe680, #ffc83d 60%, #f0a800); color: #5a3300; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(255, 255, 255, .6); }
.sign.play-btn { width: min(380px, 92%); min-height: 80px; font-size: 1.9rem; animation: pulse 1.8s ease-in-out infinite; }
.sign small { font-size: .7rem; opacity: .85; }
.home-content { gap: 12px; padding-bottom: 170px; } .home-pot { width: 124px; }
.photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; background-repeat: no-repeat; box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset; transition: transform .3s; }
.opts-art .opt:hover .photo { transform: scale(1.03); } .opts-art .opt { overflow: hidden; border-radius: 20px; }
.opts-art .opt.ok { box-shadow: 0 5px 0 var(--g-d), 0 0 26px rgba(52, 210, 123, .9); } .opts-art .opt.bad .photo { filter: grayscale(.8); }
.chap-head { background-blend-mode: normal; }
.chap-head.hc0, .chap-head.hc1, .chap-head.hc2 { background: linear-gradient(120deg, color-mix(in srgb, var(--from) 82%, transparent), color-mix(in srgb, var(--to) 88%, transparent)), url(assets/concept3.webp) 96% 18% / 301% auto; }
.chap-head.hc1 { background-position: 0 0, 96% 52%; } .chap-head.hc2 { background: linear-gradient(120deg, color-mix(in srgb, var(--from) 80%, transparent), color-mix(in srgb, var(--to) 88%, transparent)), url(assets/concept4.png) 11% 88% / 291% auto; }
.path::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 18% at 20% 12%, rgba(120, 220, 110, .55), transparent 70%), radial-gradient(ellipse 70% 18% at 85% 45%, rgba(120, 220, 110, .5), transparent 70%), radial-gradient(ellipse 80% 20% at 25% 80%, rgba(90, 200, 100, .5), transparent 70%); }
.splash.boss { background: radial-gradient(circle at 50% 40%, #fff0b8, #ff9a5c 75%); isolation: isolate; }
.splash.boss::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url(assets/concept3.webp) 96.5% 87% / 301% auto no-repeat; filter: blur(3px) saturate(1.2); opacity: .6; animation: kenburns 4s ease-out both; }
.gate-open { background: url(assets/concept3.webp) 96.5% 87% / 301% auto no-repeat; box-shadow: 0 0 40px rgba(255, 210, 80, .9); } .gate-ico { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
@keyframes sheen { 0%, 60% { left: -40%; } 100% { left: 130%; } }
@keyframes glint { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.4) rotate(45deg); opacity: 1; } }

/* ===== review fixes: touch, focus, reduced motion ===== */
body, .nmap, .tile, .opt, .sign, .btn { touch-action: manipulation; }
.city .hit { pointer-events: all; }
.city:focus-visible .ring { stroke: #1a73ff; stroke-width: 4; fill: rgba(26, 115, 255, .2); animation: none; }
.city:focus { outline: none; }
button.mascot { background: none; padding: 0; }
.modal .btn:focus-visible, .scrim button:focus-visible { outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .rf-bar i { transition-duration: 6.5s !important; } }
.sign.play-btn { white-space: nowrap; }
@media (max-width: 480px) { .sign { font-size: 1.05rem; padding: 8px 16px; letter-spacing: 1px; } .sign.play-btn { font-size: 1.5rem; min-height: 72px; } .home-row { gap: 8px; } }

/* ===== baskets (connections) ===== */
.groups { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.gt-hint { margin: 0; text-align: center; font: 800 1rem var(--font); color: var(--g-dd); min-height: 24px; }
.baskets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.basket { position: relative; min-height: 150px; padding: 10px 8px 12px; border-radius: 20px 20px 34px 34px; border: 4px solid #a8743c; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  background: repeating-linear-gradient(135deg, rgba(168, 116, 60, .22) 0 6px, rgba(255, 255, 255, 0) 6px 12px), linear-gradient(#fff6dc, #ffe6b0);
  box-shadow: 0 7px 0 #7a4f24, 0 14px 22px rgba(90, 50, 10, .28), inset 0 3px 0 rgba(255, 255, 255, .7); transition: transform .15s, box-shadow .2s; }
.basket.b0 { border-color: #e29a00; } .basket.b1 { border-color: #1a8bff; } .basket.b2 { border-color: #0aa650; } .basket.b3 { border-color: #e0457b; }
.basket.ready { animation: pulse 1.1s ease-in-out infinite; box-shadow: 0 7px 0 #7a4f24, 0 0 0 4px #fff, 0 0 24px 6px rgba(255, 210, 60, .9); }
.basket.over { transform: scale(1.04); box-shadow: 0 7px 0 #7a4f24, 0 0 0 5px #fff, 0 0 30px 10px rgba(52, 210, 123, .9); }
.bk-head { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, .85); font-family: var(--font); text-align: center; line-height: 1.05; }
.bk-head strong { font-size: clamp(.85rem, 3.6vw, 1.05rem); color: var(--ink); } .bk-ico { font-size: 1.5rem; }
.bk-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-content: flex-start; flex: 1; }
.bk-items .tile { padding: 8px 10px; font-size: .95rem; }
.gt-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 58px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 3px dashed #b9dcc7; }
.tile.gt { min-height: 0; padding: 10px 14px; font-size: clamp(.9rem, 3.6vw, 1.05rem); }
.tile.held { background: linear-gradient(#fff6c4, #ffe27a); border-color: var(--sun-d); box-shadow: 0 4px 0 var(--sun-d), 0 0 16px rgba(255, 200, 60, .9); transform: translateY(-4px) scale(1.06); }
.tile.bad { background: linear-gradient(#ffe4e7, #ffc9cf); border-color: var(--red); box-shadow: 0 4px 0 var(--red-d); }
.groups > .btn { align-self: center; min-width: 220px; }
@media (max-width: 480px) { .baskets { gap: 8px; } .basket { min-height: 140px; } }

/* ===== mystery runner cast ===== */
.journey { position: relative; }
.actor { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 12; pointer-events: none; will-change: transform; }
.actor-body { position: absolute; left: -36px; top: -72px; width: 72px; height: 72px; display: flex; align-items: flex-end; justify-content: center; transform-origin: 50% 100%; }
.actor-emo { display: block; font-size: 60px; line-height: 1; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .25)); }
.actor-shadow { position: absolute; bottom: -4px; left: 8%; width: 84%; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .25); filter: blur(2px); z-index: -1; }
.actor-tag { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap; padding: 4px 14px; border-radius: 99px; background: #fff; font: 800 .9rem var(--font); color: var(--g-dd); box-shadow: 0 6px 14px rgba(6, 90, 43, .3); }
.actor.mystery .actor-emo { filter: brightness(0) drop-shadow(0 0 10px #ffe27a) drop-shadow(0 0 22px #ffc83d); }
.actor.mystery .actor-body { animation: wobble .5s ease-in-out infinite; }
.actor.mystery .actor-body::after { content: '?'; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ffc83d; color: #fff; font: 800 1.4rem var(--font); text-shadow: 0 2px 0 #b86a00; box-shadow: 0 0 18px #ffe27a; animation: bobbing .4s infinite alternate; }
.actor.revealed .actor-emo { animation: reveal .7s cubic-bezier(.2, 1.7, .4, 1); }
.actor.revealed .actor-tag { animation: pop .5s cubic-bezier(.2, 1.7, .4, 1); background: linear-gradient(#fff6c4, #ffe27a); }
.actor.arrived .actor-body { animation: hop .6s cubic-bezier(.3, 1.7, .5, 1) 2; }
.teaser-wrap { display: flex; align-items: center; gap: 14px; max-width: 440px; padding: 10px 16px; border-radius: 22px; background: rgba(255, 255, 255, .88); box-shadow: var(--shadow); text-align: left; }
.teaser-wrap p { margin: 0; font-weight: 800; color: var(--g-dd); }
.teaser { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd96b 70%); box-shadow: 0 0 0 4px #fff, 0 0 26px 6px rgba(255, 200, 60, .9); animation: pulse 1.3s ease-in-out infinite; }
.teaser-sil { font-size: 54px; filter: brightness(0) opacity(.85); animation: wobble .6s ease-in-out infinite; }
.teaser-q { position: absolute; top: -8px; right: -6px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; font: 800 1.3rem var(--font); box-shadow: 0 3px 0 #b85a00; animation: bobbing .5s infinite alternate; }
.go-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: center; padding: 26px 12px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(255, 255, 255, .9) 45%); animation: slidein .4s both; pointer-events: none; }
.go-bar .btn { pointer-events: auto; animation: pulse 1.4s ease-in-out infinite; }
.node.unlock .node-face { animation: pulse 1.2s ease-in-out infinite, unlockpop .7s cubic-bezier(.2, 1.7, .4, 1); }
.journey.quake { animation: quake .3s; }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.06); } }
@keyframes reveal { from { transform: scale(.3) rotate(-30deg); } to { transform: none; } }
@keyframes unlockpop { 0% { transform: scale(.4) rotate(-30deg); filter: brightness(2); } 100% { transform: none; } }
@keyframes quake { 25% { transform: translateY(-4px); } 75% { transform: translateY(4px); } }

.level.no-mascot .mascot { display: none; }
.jr-top { background: rgba(233, 247, 255, .93); border-radius: 0 0 22px 22px; backdrop-filter: blur(6px); box-shadow: 0 6px 16px rgba(6, 90, 43, .16); }

.basket.over { animation: none; }
.bk-items .tile, .gt-pool .tile { overflow-wrap: anywhere; }
.bk-put { align-self: center; padding: 4px 14px; border-radius: 99px; background: linear-gradient(#58e394, var(--g)); color: #fff; font: 800 .85rem var(--font); box-shadow: 0 3px 0 var(--g-dd); }
.bk-put:disabled { background: #d6e3da; color: #7f968b; box-shadow: 0 3px 0 #b3c7ba; }

/* ===== question illustrations ===== */
.illus { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin-top: 12px; height: 118px; padding: 0 14px 10px; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, #ffe7a8, #ffb35c); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .8), 0 6px 14px rgba(60, 30, 0, .14); }
.illus::before { content: ''; position: absolute; left: -10%; right: -10%; bottom: -34px; height: 70px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.illus::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .7), transparent 45%); pointer-events: none; }
.ill-e { position: relative; z-index: 1; font-size: 52px; line-height: 1; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .22)); animation: bobbing .9s ease-in-out infinite alternate; }
.ill-e.e0 { font-size: 76px; } .ill-e.e2 { font-size: 46px; }
.ill-spark { position: absolute; width: 14px; height: 14px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: glint 2.2s ease-in-out infinite; }
.ill-spark.s1 { left: 14%; top: 18%; } .ill-spark.s2 { right: 16%; top: 28%; animation-delay: .9s; }
.th-food { background: linear-gradient(135deg, #ffe7a8, #ff9d4d); } .th-city { background: linear-gradient(135deg, #bfe9ff, #5fb4ff); }
.th-music { background: linear-gradient(135deg, #f3d1ff, #b57cff); } .th-money { background: linear-gradient(135deg, #d9ffd0, #4fd16b); }
.th-history { background: linear-gradient(135deg, #fff1c9, #e0b66a); } .th-sport { background: linear-gradient(135deg, #d5fbd0, #38c25a); }
.th-nature { background: linear-gradient(135deg, #c9f7ec, #2fb8a0); } .th-market { background: linear-gradient(135deg, #ffd9c9, #ff7a59); }
.th-talk { background: linear-gradient(135deg, #e3ffc9, #7ed957); justify-content: flex-start; gap: 6px; padding-left: 18px; align-items: center; padding-bottom: 6px; }
.say-bubble { position: relative; z-index: 1; margin-left: 8px; max-width: 70%; padding: 8px 18px; border-radius: 22px 22px 22px 6px; background: #fff; box-shadow: 0 6px 14px rgba(6, 90, 43, .25); display: flex; flex-direction: column; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.say-bubble small { font-weight: 800; color: var(--ink-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.say-bubble b { font: 800 clamp(1.3rem, 6vw, 2rem) var(--font); color: var(--g-dd); line-height: 1.05; }
.opt-ico, .tile-ico { font-size: 1.35em; line-height: 1; margin-right: 6px; flex: none; }
.tile-ico { display: inline-block; }
.opt .opt-ico { margin-right: 2px; }
.rf-icon { text-align: center; font-size: 3.2rem; line-height: 1; min-height: 3.4rem; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, .2)); }
@media (max-width: 480px) { .illus { height: 100px; } .ill-e { font-size: 44px; } .ill-e.e0 { font-size: 62px; } }

.ng-flag { display: inline-block; width: 1.25em; height: .85em; border-radius: 5px; background: linear-gradient(90deg, #008751 0 33.4%, #fff 33.4% 66.6%, #008751 66.6%); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 4px 8px rgba(0, 60, 30, .35); }
.ill-e.ng-flag { width: 78px; height: 52px; font-size: 0; }
.brand-flag.ng-flag { width: 28px; height: 19px; font-size: 0; }

/* ===== real photographs, credits, themes ===== */
.photo-frame { margin: 12px 0 0; border-radius: 20px; overflow: hidden; background: #111; box-shadow: 0 8px 20px rgba(0, 0, 0, .25), 0 0 0 3px #fff; position: relative; }
.photo-frame img { display: block; width: 100%; max-height: 40vh; min-height: 160px; object-fit: cover; background: #cfe3d6; }
.photo-frame figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 10px; font-size: .68rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); text-align: right; }
.photo-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #cfe3d6; }
.opts-art .opt .photo-thumb { transition: transform .3s; } .opts-art .opt:hover .photo-thumb { transform: scale(1.03); } .opts-art .opt.bad .photo-thumb { filter: grayscale(.8); }
.th-street { background: linear-gradient(135deg, #ffe9a8, #f0a830); } .th-politics { background: linear-gradient(135deg, #d5e6ff, #6b9bff); } .th-business { background: linear-gradient(135deg, #d9f5e6, #3fbf8f); }
.th-language { background: linear-gradient(135deg, #f0e0ff, #a779e6); } .th-culture { background: linear-gradient(135deg, #ffe0ee, #f06fa3); } .th-film { background: linear-gradient(135deg, #e4e4f4, #6c6ca8); }
.credits { list-style: none; margin: 0; padding: 0; text-align: left; font-size: .85rem; max-height: 46vh; overflow: auto; width: 100%; }
.credits li { padding: 6px 2px; border-bottom: 1px dashed #d6eadd; } .credits a { color: var(--g-d); font-weight: 800; }
.link-btn { background: none; color: var(--g-dd); text-decoration: underline; font-weight: 800; margin-top: 2px; padding: 4px 10px; }

.photo-frame img, .photo-thumb { object-position: 50% 35%; }
.photo-thumb.broken, .photo-frame img.broken { background: repeating-linear-gradient(45deg, #dfe9e3 0 10px, #cfdcd4 10px 20px); min-height: 120px; }
.skip-btn { min-height: 44px; font-size: .95rem; }

.rf-icon:empty { display: none; }

/* ===== coins, breaks and the shop ===== */
.coin-chip { padding: 6px 12px; font: 800 1rem var(--font); color: #8a5a00; background: linear-gradient(#fff6c4, #ffe27a); box-shadow: 0 3px 0 #d9a400, 0 6px 12px rgba(226, 154, 0, .25); }
.coin-chip:active { transform: translateY(2px); }
.coin-note { padding: 6px 16px; border-radius: 99px; background: linear-gradient(#fff6c4, #ffe27a); font: 800 1.15rem var(--font); color: #6b4300; box-shadow: 0 4px 0 #d9a400; animation: pop .6s .5s both; }
.wallet { margin: 0; font: 800 1.1rem var(--font); color: #8a5a00; }
.lock-time { font: 800 4rem/1 var(--font); color: var(--g-dd); text-shadow: 0 3px 0 #fff, 0 0 20px rgba(255, 255, 255, .9); letter-spacing: 2px; font-variant-numeric: tabular-nums; animation: pulse 2s ease-in-out infinite; }
.modal.lock { background: linear-gradient(#fffdf2, #fff3cf); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; background: linear-gradient(#fff, #fff3cf); border: 3px solid #f0c24a; box-shadow: 0 5px 0 #d9a400; font-family: var(--font); transition: transform .12s; }
.pack:hover { transform: translateY(-3px); } .pack:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9a400; }
.pack-coins { font-weight: 800; font-size: 1.2rem; color: #6b4300; } .pack b { color: var(--g-dd); font-size: 1.05rem; } .pack small { color: var(--ink-2); font-weight: 800; }
.fine { grid-column: 1 / -1; margin: 4px 0 0; font-size: .8rem; color: var(--ink-2); text-align: center; }
.email-in { width: 100%; padding: 12px 14px; border-radius: 14px; border: 3px solid #d6eadd; font: 700 1rem var(--body); }
.btn:disabled { opacity: .55; filter: grayscale(.6); cursor: not-allowed; }
@media (max-width: 480px) { .hud-right { gap: 5px; } .coin-chip, .streak-chip { padding: 6px 8px; font-size: .9rem; } .packs { gap: 6px; } .hearts { font-size: 1.15rem; } }

/* ===== launch review: contrast, small-screen HUD, scroll ===== */
.btn-go, .btn-true { background: linear-gradient(#0a9a4a, #067a3a); }
.btn-false { background: linear-gradient(#d83a4c, #b3202f); }
.bk-put { background: linear-gradient(#0a9a4a, #067a3a); }
.s-green { background: linear-gradient(#0a9a4a, #078c42 60%, #066b34); }
.s-orange { background: linear-gradient(#e07a10, #b85a00 60%, #9a4a00); }
.s-blue { background: linear-gradient(#2a7fe0, #0a5fc0 60%, #084c9a); }
.streak-chip { color: #b85a00; }
.ans-line.empty::before { color: #5c7468; }
.chap-head { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
html { scroll-padding-top: 80px; scroll-padding-bottom: 170px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 480px) { .hud { flex-wrap: wrap; row-gap: 4px; } .chip { min-width: 0; } }
@media (max-width: 400px) { .rk-txt { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.lb-gap { text-align: center; color: var(--ink-2); list-style: none; }
.join-box { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* illustrated animal characters */
.actor-emo.drawn { font-size: 0; line-height: 0; }
.actor-emo.drawn svg { display: block; width: 92px; height: 77px; }
.teaser-sil.drawn { font-size: 0; display: inline-block; } .teaser-sil.drawn svg { display: block; width: 74px; height: 62px; }
.marker.drawn { font-size: 0; margin-left: -24px; } .marker.drawn svg { display: block; width: 48px; height: 40px; }
.actor-emo.drawn { filter: none; }
.actor.mystery .actor-emo.drawn { filter: brightness(0) drop-shadow(0 0 10px #ffc83d); }
.actor-emo.drawn svg { margin-bottom: -5px; }
.actor.mystery .actor-body::after { color: #5a3300; text-shadow: none; }

/* 300 levels: keep the map light */
.chapter { backdrop-filter: none; background: rgba(255, 255, 255, .7); }
.chapter:not(.cur-ch) .deco { animation: none; filter: none; }
.chapter:not(.cur-ch) .chap-head::after, .chapter:not(.cur-ch) .chap-emoji { animation: none; }
.chapter:not(.cur-ch) .node { animation: none; }
.chapter:not(.cur-ch):not(.collapsed):not(.far) { content-visibility: auto; contain-intrinsic-size: auto 1300px; }
.chapter.collapsed .chap-open { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.chapter.collapsed .chap-tap { display: block; padding: 6px 16px 12px; font: 800 .85rem var(--font); color: var(--ink-2); }

/* a wrong answer: the right one glows green */
.opt.reveal { background: linear-gradient(#b6f5cf, #7fe3a6); border-color: var(--g-d); opacity: 1; box-shadow: 0 5px 0 var(--g-d), 0 0 30px rgba(47, 209, 111, .95); animation: revealpulse .9s ease-in-out 2; }
.opt.reveal .opt-text::after { content: '  ✓'; font-weight: 800; color: var(--g-d); }
.opts-art .opt.reveal { outline: 5px solid var(--g); outline-offset: -3px; }
.btn-true.ok, .btn-false.ok { opacity: 1; outline: 4px solid #0a9a4a; outline-offset: 3px; box-shadow: 0 0 0 4px #fff, 0 0 28px rgba(47, 209, 111, .95); }
.ans-line.revealed { outline: 3px dashed var(--g); outline-offset: 4px; border-radius: 18px; }
.ans-line.revealed .tile.ok, .tile.ok.reveal-pair { opacity: 1; }
.tile.reveal-pair { border-color: var(--pc, var(--g)); box-shadow: 0 4px 0 var(--pc, var(--g-d)); }
.city.reveal .dot { fill: var(--g); r: 11; } .city.reveal .ring { animation: none; fill: rgba(10, 166, 80, .45); r: 27; }
.rf-answer { display: block; margin-top: 6px; font: 800 .95rem var(--font); color: var(--g-d); }
.right-answer { margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; background: #dcffe9; color: #064d28; font-weight: 700; }
@keyframes revealpulse { 50% { transform: scale(1.035); } }

.opts-art .opt.reveal::after { content: '✓ Correct'; position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: 99px; background: #067a3a; color: #fff; font: 800 .85rem var(--font); }
.opt.reveal { position: relative; }
@media (prefers-reduced-motion: reduce) { .opt.reveal { animation: none; } }

.pending-box { grid-column: 1 / -1; padding: 10px 12px; border-radius: 14px; background: #fff7d6; border: 2px solid #ffc83d; }
.pending-box p { margin: 0 0 8px; font-weight: 700; color: #5a3300; font-size: .95rem; }
.pending-btns { display: flex; gap: 8px; flex-wrap: wrap; } .pending-btns .btn { flex: 1; min-width: 130px; }
