
:root{color-scheme:dark;--ink:#f3f5ff;--muted:#9eadd6;--gold:#ffcf70;--mint:#78efd8;--violet:#a79cff;--red:#ff7998;--edge:rgba(171,188,255,.2);--card:#171d48;--blue:#7addff;font-family:ui-rounded,'Arial Rounded MT Bold',system-ui,-apple-system,'Segoe UI',sans-serif}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#080c23}body{color:var(--ink);background:radial-gradient(ellipse at 42% 25%,#182464 0%,transparent 52%),linear-gradient(155deg,#090e28 5%,#0f1039 65%,#080f2c);display:flex;align-items:center;justify-content:center;padding:12px;overscroll-behavior-y:contain;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,.item-card:focus-visible{outline:3px solid #97efff;outline-offset:2px}.ambient{position:fixed;pointer-events:none;border-radius:50%;filter:blur(56px);opacity:.3}.ambient-a{width:260px;height:260px;top:9%;left:6%;background:#425de2}.ambient-b{width:280px;height:280px;right:4%;bottom:6%;background:#8e4ae0}
.app-shell{position:relative;z-index:1;width:min(100%,464px);height:min(860px,calc(100dvh - 24px));min-height:min(610px,calc(100dvh - 24px));overflow:hidden;isolation:isolate;display:flex;flex-direction:column;border:1px solid rgba(173,182,255,.28);border-radius:30px;background:linear-gradient(155deg,#171c4c 0%,#101539 42%,#111738 100%);box-shadow:0 25px 90px #020416b8,0 0 60px #5554a026,inset 0 1px rgba(255,255,255,.11)}
.app-shell:before{content:"";position:absolute;inset:-80px -120px auto;top:-140px;height:430px;background:radial-gradient(ellipse,#4b56b42b 0%,transparent 65%);z-index:-1;pointer-events:none}.scroll-screen{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4d5788 transparent;padding:26px 24px 22px;display:flex;flex-direction:column}.scroll-screen::-webkit-scrollbar{width:4px}.scroll-screen::-webkit-scrollbar-thumb{background:#566094;border-radius:9px}
.eyebrow{font-weight:850;text-transform:uppercase;font-size:11px;letter-spacing:.25em;color:#93b7f7}.logo{font-size:clamp(39px,10vw,57px);letter-spacing:-.065em;line-height:1.01;font-weight:1000;filter:drop-shadow(0 8px 22px #597bc648);text-transform:uppercase;margin:8px 0 4px}.logo span{background:linear-gradient(125deg,#fff6d4,#ffc67c 55%,#ff8c99);-webkit-background-clip:text;background-clip:text;color:transparent}.logo small{display:block;font-size:.38em;letter-spacing:.18em;margin-top:8px;font-weight:850;color:#b6beff}.tagline{color:#bac8e9;font-size:14px;line-height:1.5;margin:8px auto 16px;max-width:310px}.center{text-align:center}.hero-portal{position:relative;width:260px;height:254px;max-width:100%;margin:0 auto 8px;display:grid;place-items:center}.hero-portal:before{content:"";position:absolute;width:88%;height:88%;border-radius:50%;background:radial-gradient(circle,#6971ed55 0%,#4650c122 43%,transparent 66%);border:2px solid #8cbfff33;box-shadow:0 0 70px #4f9aff35, inset 0 0 65px #737ff72e;animation:portal 8s ease-in-out infinite}.hero-portal:after{content:"✧  ·  ✦  ·  ✧";position:absolute;bottom:8px;letter-spacing:1.3em;font-size:13px;color:#b0d9ff90}.hero-creature{position:relative;z-index:2;width:210px;filter:drop-shadow(0 15px 10px #0006);animation:float 3.8s ease-in-out infinite}.hero-creature svg{width:100%;height:100%;overflow:visible}.orbit-ring{position:absolute;inset:10%;border:1px dashed #b9b7ff50;border-radius:50%;animation:rotate 30s linear infinite}.mini-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.pill{border:1px solid var(--edge);border-radius:999px;background:#ffffff08;padding:8px 11px;font-size:11px;font-weight:850;letter-spacing:.05em;color:#c5d3f6}.pill strong{color:#fff5bb}.button{display:inline-flex;justify-content:center;align-items:center;gap:9px;width:100%;border-radius:18px;border:1px solid #ffffff50;font-weight:900;letter-spacing:.02em;min-height:57px;padding:15px 18px;transition:filter .15s, transform .15s;box-shadow:inset 0 1px #ffffff6e}.button:active{transform:scale(.975)}.button:hover{filter:brightness(1.07)}.button-main{background:linear-gradient(115deg,#8ff3de,#64d8f6);color:#10234c;box-shadow:0 10px 30px #38c9dd39,inset 0 2px #fff9}.button-secondary{background:#30396c92;color:#f0f6ff;border-color:#8ea3da58;box-shadow:none}.button-gold{background:linear-gradient(115deg,#fff1af,#ffbc6c);color:#523a28}.menu-buttons{display:flex;flex-direction:column;gap:10px;margin-top:auto}.menu-micro{display:flex;align-items:center;justify-content:center;gap:12px;color:#8898c4;font-size:11px;padding-top:15px}.menu-micro button{background:transparent;border:0;color:#b8caee;font-size:12px;font-weight:800;padding:6px}.stat-ribbon{display:flex;justify-content:space-around;border:1px solid var(--edge);border-radius:17px;padding:13px 8px;background:#ffffff07;margin:8px 0 16px;gap:9px}.stat-ribbon .metric{flex:1}.stat-ribbon b{font-size:23px;color:#f7edc6;display:block;font-variant-numeric:tabular-nums}.stat-ribbon small{color:#94a3ce;text-transform:uppercase;letter-spacing:.1em;font-size:9px;font-weight:800}
.section-title{font-size:28px;line-height:1.1;letter-spacing:-.035em;font-weight:950;margin:10px 0 6px}.section-copy{font-size:13px;line-height:1.6;color:#b5c4e7;margin:4px 0 16px}.back-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.icon-btn{display:grid;place-items:center;min-width:39px;min-height:39px;border:1px solid #adb5f344;border-radius:13px;background:#ffffff0d;font-weight:900;font-size:18px}.tiny{color:#8e9ec8;font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:800}
.game-screen{flex:1;display:flex;flex-direction:column;min-height:0;padding:12px 12px 10px}.game-top{display:grid;grid-template-columns:78px minmax(0,1fr) 80px;align-items:center;min-height:79px;padding:0 2px;gap:8px}.mascot{width:66px;height:66px;display:grid;place-items:center;border-radius:20px;background:#8cb6ff0c;border:1px solid #9baffd22;overflow:hidden;filter:drop-shadow(0 3px 7px #050a2c67)}.mascot svg{width:74px;height:74px}.target-wrap{text-align:center;min-height:59px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px}.target-wrap .tiny{font-size:9px;color:#c5cfff}.target-big{font-size:39px;font-weight:1000;color:#ffdc8a;line-height:1;font-variant-numeric:tabular-nums;text-shadow:0 4px 24px #ffd27436}.equation{font-size:13px;line-height:1.2;color:#bcd0f4;font-weight:850;min-height:16px}.timer{text-align:right;align-self:start;padding-top:11px}.timer strong{display:block;font-size:31px;line-height:1;font-variant-numeric:tabular-nums;font-weight:950;letter-spacing:-.07em}.timer.urgent strong{color:#ff879b;animation:urgent .75s infinite alternate}.timer .tiny{font-size:9px}.play-arena{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:23px;border:1px solid #939fe345;background:radial-gradient(ellipse at 50% 7%,#3b4f9750,transparent 50%),radial-gradient(ellipse at 30% 100%,#235d8350,transparent 58%),#101a42;box-shadow:inset 0 0 0 1px #ffffff0e,inset 0 0 56px #091131ab;touch-action:none}.play-arena canvas{display:block;width:100%;height:100%;touch-action:none}.game-bottom{display:flex;align-items:center;justify-content:space-between;height:31px;padding:8px 6px 0;color:#8294c9;font-size:10px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}.level-dots{display:flex;gap:6px}.level-dot{width:17px;height:5px;border-radius:9px;background:#525d8f}.level-dot.active{background:linear-gradient(90deg,#ffe59b,#a1fff6);box-shadow:0 0 12px #9fdcf87a}.game-feedback{position:absolute;pointer-events:none;top:9px;left:50%;transform:translateX(-50%);border:1px solid #ffffff33;border-radius:999px;padding:7px 13px;color:#e4fcff;background:#0a1b3cbb;box-shadow:0 6px 24px #0005;font-size:11px;white-space:nowrap;font-weight:950;letter-spacing:.08em;animation:pop .55s ease-out both;z-index:5}.game-feedback.bad{color:#ffacbc}
.ready-visual{width:100%;max-width:340px;height:205px;margin:6px auto 6px;position:relative;display:grid;place-items:center}.ready-visual svg{width:180px;height:180px;filter:drop-shadow(0 18px 20px #0005);animation:float 4s infinite}.ready-visual .ready-ring{position:absolute;width:200px;height:200px;border:2px solid #8c9ff240;border-radius:50%;box-shadow:inset 0 0 65px #8ccafe22,0 0 45px #7d8dff25}.ready-icons{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:12px 0}.ready-icons div{border-radius:12px;border:1px solid var(--edge);background:#ffffff0a;min-height:66px;display:grid;place-items:center;font-size:24px}.game-num{color:#aabbf5;font-size:12px;font-weight:900;letter-spacing:.25em;text-transform:uppercase}.ready-name{font-size:clamp(35px,9vw,48px);font-weight:1000;letter-spacing:-.055em;margin:8px 0 2px}.ready-name span{color:var(--gold)}.intro-rules{padding:16px 18px;border-radius:18px;border:1px solid #a6bafa32;background:linear-gradient(140deg,#242d62b8,#1b2352a8);text-align:left;font-size:14px;line-height:1.55;color:#d3e0fb;margin:14px 0;min-height:108px}.ready-spacer{flex:1}.progress-pips{display:flex;gap:6px;justify-content:center;margin:9px auto}.progress-pips span{width:29px;height:5px;background:#4e6094;border-radius:99px}.progress-pips span.done{background:#76ead7}
.memory-wrap{height:100%;display:flex;align-items:center;justify-content:center;padding:14px;position:relative}.memory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;max-width:354px;aspect-ratio:1/1.15;max-height:100%}.item-card{position:relative;display:grid;place-items:center;background:linear-gradient(155deg,#394477c9,#212954e8);border:1px solid #93a9ef59;border-radius:23px;box-shadow:inset 0 1px #ffffff22,0 7px 16px #030a2850;padding:12px;min-height:0;touch-action:manipulation;transition:transform .1s,filter .1s}.item-card:active{transform:scale(.96)}.item-card svg{height:88%;width:88%;max-width:132px;max-height:132px;filter:drop-shadow(0 8px 10px #0003)}.memory-ready{position:absolute;inset:0;background:#0e173da8;backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px;border-radius:22px}.memory-ready-panel{max-width:270px;text-align:center;background:linear-gradient(150deg,#263469,#182148);border:1px solid #aab9fc4c;padding:24px;border-radius:22px}.memory-ready-panel h3{margin:0 0 9px;font-size:25px}.memory-ready-panel p{font-size:13px;color:#c2d0ee;margin:0 0 17px;line-height:1.5}
.merge-area{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:11px 10px 14px}.merge-incoming{height:85px;width:100%;display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:9px}.merge-incoming .tiny{font-size:11px}.merge-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));gap:4px;width:100%;max-width:370px;flex:1;max-height:475px;padding:7px;border:1px solid #9ba8fc4f;border-radius:19px;background:linear-gradient(#121b45,#0e1538);box-shadow:inset 0 6px 25px #050b2a99}.merge-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;background:#ffffff07;border-radius:9px}.merge-block{width:100%;height:100%;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:1000;font-size:clamp(13px,4.4vw,24px);color:white;text-shadow:0 2px 3px #0007;box-shadow:inset 0 2px 2px #ffffff77,0 3px 8px #050e347d}.merge-next{width:65px;height:65px;font-size:25px}.merge-column-buttons{width:100%;max-width:370px;display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:9px}.column-btn{min-height:42px;border-radius:12px;border:1px solid #8ea8e83c;background:#6478c22c;color:#a8d7ff;font-weight:1000;font-size:19px}.column-btn:active{background:#78d7ef50}.column-btn:disabled{color:#58618c;background:#ffffff06}
.evo-toast{position:absolute;top:92px;left:50%;transform:translateX(-50%);z-index:11;width:max-content;max-width:80%;background:linear-gradient(110deg,#292457ee,#133450f2);border:1px solid #d5bfff6a;border-radius:15px;padding:9px 12px;box-shadow:0 12px 28px #0008,0 0 30px #aa93ff3b;text-align:center;animation:toast-in 1.3s ease-out both}.evo-toast small{display:block;color:#ffdd8e;letter-spacing:.17em;font-size:9px;font-weight:1000}.evo-toast b{font-size:16px;color:white}.evo-toast svg{width:58px;height:58px;vertical-align:middle;margin-right:5px}.chapter{font-size:11px;text-transform:uppercase;letter-spacing:.2em;color:#8ecfeb;font-weight:950;margin-top:6px}
.result-creature{width:185px;height:185px;margin:9px auto;filter:drop-shadow(0 13px 16px #0508287d);animation:float 4s ease-in-out infinite}.result-creature svg{width:100%;height:100%}.brain-result{margin:6px 0 4px;font-size:clamp(48px,12vw,70px);letter-spacing:-.07em;line-height:1;font-weight:1000;color:#ffe29d;text-shadow:0 6px 25px #ffba8044}.brain-result small{font-size:18px;letter-spacing:0;color:#d7bfff}.result-table{margin:12px 0;border:1px solid var(--edge);border-radius:18px;overflow:hidden;background:#0f174084}.result-line{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-top:1px solid #a4b2ee24;font-size:13px}.result-line:first-child{border-top:0}.result-line .name{color:#bdd2f6}.result-line strong{color:#f4f5ff;font-size:16px;font-variant-numeric:tabular-nums}.result-line small{font-size:10px;color:#9facd7;display:block}.result-actions{display:flex;flex-direction:column;gap:9px;margin-top:auto}.new-best{color:#88f9d9;font-weight:950;text-transform:uppercase;letter-spacing:.12em;font-size:11px}.collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.collect-card{border:1px solid #a5b9f53f;background:linear-gradient(#2d386ea8,#161f48bf);border-radius:16px;padding:9px 5px;text-align:center;min-height:126px}.collect-card svg{width:95px;height:95px;max-width:100%}.collect-card strong{font-size:11px;display:block;margin-top:4px}.collect-card small{font-size:9px;color:#a8b8dc;letter-spacing:.08em}.collect-card:active{transform:scale(.98)}.collection-modal{position:absolute;inset:0;z-index:20;background:#080d25e8;display:flex;align-items:center;justify-content:center;padding:25px}.collection-modal .detail{width:100%;padding:25px 20px;border:1px solid #b5bafd62;background:linear-gradient(#253266,#161a40);border-radius:24px;text-align:center;box-shadow:0 15px 50px #0008}.collection-modal svg{width:225px;height:225px}.collection-modal h2{font-size:26px;margin:7px 0 2px}.collection-modal p{color:#bac8e7;font-size:13px;line-height:1.5}.sparkles:before{content:"✦ ✧ ✦";position:absolute;left:10%;top:20%;color:#f8dca5;font-size:24px;letter-spacing:20px;animation:float 4s infinite}.footer-note{font-size:10px;color:#7f8eb9;text-align:center;margin-top:13px;line-height:1.5}.detail-body{text-align:left;color:#c1cfee;font-size:13px;line-height:1.65}.sound-chip{border:1px solid #a6bdf54b;background:#ffffff08;border-radius:999px;color:#d1e0ff;font-size:13px;padding:8px 13px;font-weight:850}.inline-actions{display:flex;gap:8px}.inline-actions .button{width:auto;flex:1;min-height:48px;font-size:13px;padding:12px}
@keyframes float{50%{transform:translateY(-8px) rotate(1.2deg)}}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes portal{50%{transform:scale(1.06);opacity:.8}}@keyframes urgent{to{opacity:.6}}@keyframes pop{0%{opacity:0;transform:translate(-50%,8px) scale(.89)}20%{opacity:1;transform:translate(-50%,0) scale(1)}85%{opacity:1}100%{opacity:0}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,-15px) scale(.88)}20%,75%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-8px) scale(1)}}
@media(max-width:460px){body{padding:0}.app-shell{height:100dvh;min-height:0;border:0;border-radius:0;max-width:none}.scroll-screen{padding:18px 20px 16px}.hero-portal{height:min(31dvh,245px);width:min(31dvh,245px)}.hero-creature{width:90%}.logo{font-size:clamp(38px,11vw,55px)}.game-screen{padding:7px 9px 9px}.game-top{min-height:70px;grid-template-columns:67px 1fr 75px}.mascot{height:61px;width:61px}.mascot svg{width:66px;height:66px}.timer strong{font-size:28px}.memory-grid{gap:8px}.ready-visual{height:min(26dvh,190px)}.ready-visual svg{height:165px;width:165px}.merge-incoming{height:64px}.merge-next{height:54px;width:54px}.merge-board{gap:3px;padding:5px}}
@media(max-height:680px){.scroll-screen{padding-top:12px}.hero-portal{height:150px;width:150px}.hero-creature{width:145px}.logo{font-size:39px}.tagline{margin:4px auto 9px}.stat-ribbon{margin:5px 0 9px;padding:9px}.button{min-height:48px;padding:11px}.ready-visual{height:135px}.ready-visual svg{height:135px;width:135px}.intro-rules{min-height:auto;padding:11px}.game-top{min-height:59px}.mascot,.mascot svg{height:53px;width:53px}.target-big{font-size:32px}.timer strong{font-size:25px}.merge-incoming{height:50px}.merge-next{width:44px;height:44px}.result-creature{width:115px;height:115px;margin:0 auto}.brain-result{font-size:48px}.result-line{padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.hero-creature,.ready-visual svg,.result-creature,.orbit-ring,.hero-portal:before,.evo-toast,.game-feedback,.timer.urgent strong{animation:none}}

/* Initial memory set must remain clearly visible while the player studies it. */
.memory-wrap.waiting .memory-grid{max-height:calc(100% - 130px);transform:translateY(-52px)}
.memory-start{position:absolute;bottom:15px;left:14px;right:14px;border:1px solid #a8b9f84c;background:linear-gradient(135deg,#26366ccf,#1e2854e8);border-radius:17px;padding:11px;display:flex;align-items:center;gap:10px;text-align:left}
.memory-start>div{flex:1;min-width:0}.memory-start strong{display:block;font-size:10px;color:#d7e7ff;letter-spacing:.08em}.memory-start small{display:block;font-size:10px;color:#a8b8dc;margin-top:5px;line-height:1.3}
.memory-start .button{width:103px;min-height:46px;padding:10px;font-size:12px;border-radius:12px}
@media(max-height:650px){.memory-wrap.waiting .memory-grid{max-height:calc(100% - 105px);transform:translateY(-36px)}.memory-start{bottom:7px;padding:7px}}

.merge-block{animation:drop-tile .19s cubic-bezier(.18,.8,.3,1.2) both}
@keyframes drop-tile{from{opacity:.65;transform:translateY(-7px) scale(.91)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.merge-block{animation:none}}

/* V2: photographed objects and corner-only evolution. */
.item-card{background:#fff;border:2px solid #dbe6f5;padding:5px;overflow:hidden;min-width:0;box-shadow:0 5px 14px #030a2850;transition:transform .09s,border-color .09s;}.item-card .memory-photo{display:block;max-width:100%;max-height:100%;width:100%;height:100%;min-height:0;object-fit:contain;pointer-events:none;border-radius:15px}.item-card.photo-good{border-color:#56e6a9;box-shadow:0 0 0 3px #56e6a9}.item-card.photo-bad{border-color:#ff6881;box-shadow:0 0 0 3px #ff6881}.memory-grid{grid-template-rows:repeat(2,minmax(0,1fr))}.mascot.evolving{animation:corner-evolve .52s ease-out both}.mascot.evolving svg{animation:corner-pop .52s cubic-bezier(.2,.8,.2,1) both}@keyframes corner-evolve{0%{background:#caffed66;border-color:#b3ffe7}100%{background:#8cb6ff0c;border-color:#9baffd22}}@keyframes corner-pop{0%{transform:scale(.72);opacity:.55}45%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}@media(prefers-reduced-motion:reduce){.mascot.evolving,.mascot.evolving svg{animation:none}}


/* V3: final reveal only. Never interrupts the active rounds. */
[data-screen="results"]{gap:4px;padding-top:16px;padding-bottom:16px}
[data-screen="results"]>*{flex-shrink:0}
[data-screen="results"] .result-creature{width:clamp(94px,24dvh,150px);height:clamp(94px,24dvh,150px);margin:0 auto;position:relative}
[data-screen="results"] .section-title{font-size:clamp(23px,7vw,31px)}
[data-screen="results"] .brain-result{font-size:clamp(46px,11vw,67px);font-variant-numeric:tabular-nums}
[data-screen="results"] .result-table{margin:6px 0;flex-shrink:0;overflow:visible}
[data-screen="results"] .result-line{padding:7px 10px;min-height:40px;text-align:left;gap:6px}
[data-screen="results"] .result-line .name{font-size:11px;font-weight:800}
[data-screen="results"] .result-line strong{white-space:nowrap;font-size:15px}
[data-screen="results"] .result-actions{gap:6px;margin-top:5px}
[data-screen="results"] .button{min-height:44px;padding:9px 11px;border-radius:14px;font-size:14px}
[data-screen="results"] .inline-actions .button{font-size:12px}
[data-screen="results"] [hidden]{display:none!important}
.reveal-row{opacity:0;transform:translateY(5px);transition:opacity .22s,transform .22s}
.reveal-row.shown{opacity:1;transform:none}
.reveal-status{min-height:20px;color:#a9bce9;font-size:12px;font-weight:750;margin:2px 0}
.reveal-skip{border:0;background:transparent;color:#b9c8ed;font-size:12px;padding:12px 20px;align-self:center;text-decoration:underline;text-underline-offset:4px}
.result-creature .reveal-art{width:100%;height:100%;display:grid;place-items:center}
.result-creature .reveal-art.evolve{animation:result-evolve .28s ease-out both}
.result-creature .reveal-art.final{animation:result-finale .7s cubic-bezier(.18,.8,.24,1) both}
@keyframes result-evolve{0%{opacity:.45;transform:scale(.73);filter:brightness(1.65)}65%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}
@keyframes result-finale{0%{transform:scale(.8);filter:brightness(1.4)}42%{transform:scale(1.17);filter:brightness(1.1)}100%{transform:scale(1);filter:none}}
@media(max-height:650px){[data-screen="results"]{padding:10px 13px;gap:3px}[data-screen="results"] .result-creature{width:95px;height:95px}[data-screen="results"] .brain-result{font-size:46px}[data-screen="results"] .result-line{min-height:34px;padding:5px 9px}[data-screen="results"] .button{min-height:40px;padding:7px 10px}}
@media(prefers-reduced-motion:reduce){.reveal-row,.result-creature .reveal-art{transition:none!important;animation:none!important}}


/* V3.3: a simpler menu, no spoilers about the size of the evolution ladder. */
[data-screen="menu"]{gap:0;padding-top:14px;padding-bottom:20px}
[data-screen="menu"]>*{flex-shrink:0}
.menu-top{justify-content:flex-end}
.menu-top .sound-chip{font-size:11px;padding:7px 11px;white-space:nowrap}
.menu-heading{margin-top:6px}
[data-screen="menu"] .tagline{margin:8px auto 10px}
[data-screen="menu"] .hero-portal{width:min(250px,32dvh);height:min(250px,32dvh);margin:0 auto 4px}
.menu-best{display:flex;flex-direction:column;align-items:center;gap:3px;margin:13px 0 19px}
.menu-best>span{font-size:11px;letter-spacing:.09em;color:#a8b9e0;text-transform:uppercase;font-weight:750}
.menu-best>strong{font-size:32px;line-height:1.1;letter-spacing:-.03em;color:#ffe3a0;font-variant-numeric:tabular-nums}
.menu-best>strong small{font-size:15px;letter-spacing:0;color:#d1c7e5}
.menu-best>.no-best{font-size:12px;letter-spacing:0;text-transform:none;font-weight:600}
[data-screen="menu"] .menu-buttons{margin-top:0;gap:9px}
.discovery-count{font-size:14px;color:#b5c4e7;margin:0 0 16px}
.discovery-count strong{color:#ffe3a0;font-size:20px;font-variant-numeric:tabular-nums}
@media(max-height:680px){[data-screen="menu"]{padding-top:9px;padding-bottom:12px}.menu-heading{margin-top:2px}[data-screen="menu"] .hero-portal{width:min(175px,27dvh);height:min(175px,27dvh)}.menu-best{margin:8px 0 12px}.menu-best>strong{font-size:27px}[data-screen="menu"] .menu-buttons{gap:7px}[data-screen="menu"] .logo{font-size:clamp(32px,10vw,43px)}[data-screen="menu"] .tagline{margin:5px auto 6px}}

[data-game="pulse"] .game-bottom{display:none}[data-game="memory"] .level-dots{visibility:hidden}
.item-card{background:#eef2fa}.item-card .memory-photo{mix-blend-mode:multiply}
.item-card.photo-bad,.item-card.photo-good{border-width:4px}
.merge-block{animation:none}.merge-block.changed{animation:drop-tile .12s ease-out both}
@media(prefers-reduced-motion:reduce){.merge-block.changed{animation:none}}
.intro-rules[hidden]{display:none}

/* V3.5 — let the evolution portrait fill the available width. */
[data-screen="results"]{position:relative;gap:3px;padding-top:12px;padding-bottom:12px}
[data-screen="results"].sparkles:before{content:none}
[data-screen="results"] .result-heading{position:relative;width:100%;display:flex;align-items:center;justify-content:center;min-height:32px;padding:0 35px;text-align:center}
[data-screen="results"] .result-home{position:absolute;left:0;top:0;width:32px;height:32px;display:grid;place-items:center;border:1px solid #a8b8ed44;border-radius:10px;background:#ffffff08;color:#dce9ff;padding:5px;cursor:pointer}
.result-home svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
[data-screen="results"] .result-creature{width:86%;height:clamp(130px,25dvh,225px);margin:3px auto 1px;filter:none;animation:none;isolation:isolate;transition:height .35s,width .35s}
[data-screen="results"].reveal-running .result-creature{width:90%;height:clamp(145px,31dvh,265px)}
.result-creature:before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse,#6ea4ff35,transparent 70%);pointer-events:none}
.result-creature .reveal-art img{display:block;width:100%;height:100%;object-fit:contain;max-width:none;min-width:0;min-height:0;filter:drop-shadow(0 7px 12px #04092f40);mask-image:radial-gradient(ellipse 57% 65% at center,#000 60%,#000d 83%,transparent 100%);-webkit-mask-image:radial-gradient(ellipse 57% 65% at center,#000 60%,#000d 83%,transparent 100%)}
.result-creature .result-star{position:absolute;pointer-events:none;color:#ffe6ae;line-height:1;text-shadow:0 0 12px #ffdc7f88;font-size:18px;z-index:2;animation:portrait-star 2.6s ease-in-out infinite}
.result-star.s1{left:2%;top:23%}.result-star.s2{right:2%;top:55%;animation-delay:.6s}.result-star.s3{right:13%;top:5%;font-size:13px;animation-delay:1.1s}
@keyframes portrait-star{0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:1;transform:scale(1.1)}}
[data-screen="results"] .result-table{width:100%}
[data-screen="results"] .result-actions{width:100%;margin-top:6px}
[data-screen="results"] .result-actions .button-main{min-height:48px}
[data-screen="results"] .result-actions .inline-actions .button{min-height:44px}
@keyframes result-evolve{0%{opacity:.3;transform:scale(.68);filter:brightness(1.85)}56%{opacity:1;transform:scale(1.09);filter:brightness(1.1)}100%{opacity:1;transform:scale(1);filter:none}}
@keyframes result-finale{0%{transform:scale(.8);filter:brightness(1.7)}45%{transform:scale(1.12);filter:brightness(1.15)}100%{transform:scale(1);filter:none}}
@media(max-height:650px){[data-screen="results"] .result-creature{height:clamp(100px,21dvh,145px)}[data-screen="results"].reveal-running .result-creature{height:clamp(120px,27dvh,175px)}[data-screen="results"] .result-heading{min-height:30px}}
@media(prefers-reduced-motion:reduce){[data-screen="results"] .result-creature{transition:none}.result-creature .result-star{animation:none}}


/* V3.6: give the portrait the flexible center of the menu; keep navigation at the bottom. */
[data-screen="menu"] .hero-portal{width:100%;height:auto;min-height:108px;flex:1 1 0;max-height:none;margin:0 auto 5px;isolation:isolate}
[data-screen="menu"] .hero-portal:before{width:min(90%,350px);height:auto;aspect-ratio:1;max-height:95%;border-radius:50%}
[data-screen="menu"] .orbit-ring{inset:5% 9%;border-radius:50%}
[data-screen="menu"] .hero-creature{width:100%;height:100%;max-height:100%;display:flex;align-items:center;justify-content:center;min-height:0;filter:none}
[data-screen="menu"] .hero-creature img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 10px 12px #0004);border-radius:10px}
[data-screen="menu"] .hero-creature svg{width:100%;height:100%;max-height:100%}
[data-screen="menu"] .menu-buttons{margin-top:auto;flex-shrink:0;gap:9px}
[data-screen="menu"] .menu-best{margin:10px 0 16px}
@media(max-height:680px){[data-screen="menu"] .hero-portal{min-height:95px}[data-screen="menu"] .menu-buttons{gap:7px}[data-screen="menu"] .menu-best{margin:7px 0 10px}}


/* V3.7 — cinematic edge-to-edge artwork, fading into the result. */
[data-screen="menu"] .hero-portal:before,[data-screen="menu"] .hero-portal:after,[data-screen="menu"] .orbit-ring{display:none}
[data-screen="menu"] .hero-portal{width:calc(100% + 40px);max-width:none;margin-left:-20px;margin-right:-20px;overflow:hidden}
[data-screen="menu"] .hero-creature{animation:none;width:100%;height:100%;max-height:100%;min-height:0;overflow:hidden}
[data-screen="menu"] .hero-creature img{width:100%;height:100%;object-fit:cover;object-position:center 45%;border-radius:0;filter:none;mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 65%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 13%,#000 65%,transparent 100%)}
[data-screen="results"]{gap:3px;padding:12px 16px 14px;isolation:isolate;overflow-x:hidden}
[data-screen="results"] .result-heading{z-index:3;min-height:32px}
[data-screen="results"] .result-creature,[data-screen="results"].reveal-running .result-creature{width:calc(100% + 32px);height:clamp(165px,34dvh,295px);margin:-2px -16px -40px;overflow:hidden;transition:none;isolation:isolate}
[data-screen="results"] .result-creature:before{display:none}
[data-screen="results"] .reveal-art{overflow:hidden;display:block;mask-image:linear-gradient(to bottom,transparent 0%,#000 8%,#000 58%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 8%,#000 58%,transparent 100%)}
[data-screen="results"] .reveal-art img{width:100%;height:100%;object-fit:cover;object-position:center 35%;mask-image:none;-webkit-mask-image:none;filter:none}
[data-screen="results"] .result-star{top:auto;bottom:42px;font-size:15px}
[data-screen="results"] .result-star.s1{left:38%;right:auto}
[data-screen="results"] .result-star.s2{left:48%;right:auto;bottom:39px}
[data-screen="results"] .result-star.s3{left:58%;right:auto}
[data-screen="results"] .chapter,[data-screen="results"] .section-title,[data-screen="results"] .brain-result,[data-screen="results"] .reveal-status{z-index:2;position:relative;text-shadow:0 2px 10px #101539}
[data-screen="results"] .brain-result{margin:4px 0 0}
[data-screen="results"] .result-table{background:#101539b0;margin:4px 0 6px}
[data-screen="results"] .result-actions{margin-top:auto;gap:8px}
@media(max-height:700px){[data-screen="results"] .result-creature,[data-screen="results"].reveal-running .result-creature{height:clamp(142px,31dvh,220px);margin-bottom:-35px}[data-screen="results"] .result-star{bottom:34px}[data-screen="results"] .result-star.s2{bottom:31px}[data-screen="results"] .result-line{min-height:34px;padding:5px 9px}[data-screen="results"] .result-actions .button-main{min-height:44px}[data-screen="results"] .result-actions .inline-actions .button{min-height:40px}}


/* V3.8 — final score impact and non-blocking merge choreography. */
@media(min-width:461px){[data-screen="menu"] .hero-portal{width:calc(100% + 48px);margin-left:-24px;margin-right:-24px}}
.final-energy{position:absolute;inset:0;z-index:10;pointer-events:none;overflow:hidden;opacity:0;animation:final-energy .85s ease-out both;background:radial-gradient(ellipse at 50% 40%,#ffedb332 0%,#f9cc6d13 38%,transparent 70%);box-shadow:inset 0 0 55px #ffd77788}
.final-energy.best{background:radial-gradient(ellipse at 50% 40%,#ffedb34d 0%,#f9cc6d20 38%,transparent 72%);box-shadow:inset 0 0 65px #ffda8ca0}
.final-energy::after{content:"";position:absolute;left:50%;top:40%;width:76%;aspect-ratio:1;border:2px solid #ffe0a5;border-radius:50%;box-shadow:0 0 22px #ffc97066;animation:final-wave .82s ease-out both}
.brain-result.score-impact{animation:score-impact .65s cubic-bezier(.18,.75,.3,1) both}
.reveal-status.best-impact{animation:best-impact .9s ease-out both}
@keyframes final-energy{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
@keyframes final-wave{0%{transform:translate(-50%,-50%) scale(.22);opacity:.8}100%{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
@keyframes score-impact{0%{transform:scale(.93)}35%{transform:scale(1.11);text-shadow:0 0 24px #ffdd9390}100%{transform:scale(1)}}
@keyframes best-impact{0%{opacity:.5;transform:scale(.94)}35%{opacity:1;transform:scale(1.04);text-shadow:0 0 18px #9dffdc}100%{transform:scale(1)}}
.merge-board{position:relative;isolation:isolate}.merge-block.changed{animation:none}.merge-fx{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:visible}.merge-fx .merge-block{position:absolute;margin:0;will-change:transform;box-shadow:inset 0 2px 2px #ffffff77,0 3px 12px #071333aa}.column-btn.saveable{color:#ffe49c;border-color:#e5c16c;background:#b78d3338;box-shadow:0 0 10px #ffd07044}.merge-cell.saveable .merge-block{outline:2px solid #ffe09c;outline-offset:-2px}.merge-fx .merge-spark{position:absolute;width:5px;height:5px;border-radius:50%;background:#fff2c1;box-shadow:0 0 8px #ffd980;pointer-events:none}.merge-block.impact{animation:merge-impact .16s ease-out both}@keyframes merge-impact{0%{transform:scale(.88);filter:brightness(1.35)}45%{transform:scale(1.10)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.final-energy,.final-energy::after,.brain-result.score-impact,.reveal-status.best-impact,.merge-block.impact{animation:none}.final-energy{display:none}}


/* V3.9: full-bleed discovery cards, with names in a compact footer. */
.collection-grid{gap:9px;align-items:stretch}
.collect-card{padding:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:0;border-radius:13px}
.collect-art{width:100%;aspect-ratio:2/1;display:block;position:relative;overflow:hidden;background:#17396c}
.collect-art img,.collect-art svg{display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;margin:0}
.collect-label{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:9px 3px 10px;min-width:0}
.collect-card strong{font-size:clamp(10px,2.8vw,13px);margin:0;line-height:1.15;overflow-wrap:anywhere}
.collect-card small{font-size:9px;line-height:1.15;letter-spacing:.02em}
.collect-card:focus-visible{outline:2px solid #8df3e4;outline-offset:2px}
.detail-art{margin:10px -8px 6px;overflow:hidden;border-radius:14px}.detail-art img{display:block;width:100%;height:auto}.detail-art svg{display:block;width:100%;height:auto}
/* V3.10: cinematic round introductions and gentle score-reveal light. */
[data-screen="ready"]{--ready-pad:24px;gap:0;overflow-x:hidden;padding-top:18px;padding-bottom:18px}
[data-screen="ready"] .mini-top{flex-shrink:0;gap:6px}
.ready-nav{display:flex;align-items:center;gap:8px;min-width:0}
.ready-exit{width:38px;height:38px;flex:0 0 38px;border:1px solid #a6bdf54b;background:#ffffff08;border-radius:12px;display:grid;place-items:center;padding:8px;color:#d1e0ff}
.ready-exit svg,.ready-help svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
[data-screen="ready"] .pill{white-space:nowrap;font-size:10px;letter-spacing:.04em}
[data-screen="ready"] .progress-pips{margin:10px auto 22px;flex-shrink:0}
[data-screen="ready"] .game-num{font-size:clamp(10px,2.7vw,12px);letter-spacing:.18em;flex-shrink:0}
[data-screen="ready"] .ready-name{line-height:.98;font-size:clamp(37px,10.8vw,53px);margin:8px 0 8px;flex-shrink:0}
.ready-help{align-self:center;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:0;background:none;padding:6px 9px;color:#b9ccef;font-size:12px;font-weight:650;min-height:36px;flex-shrink:0}
.ready-help svg{width:15px;height:15px;flex-shrink:0}
.ready-help:hover{color:#f3f5ff}
[data-screen="ready"] .intro-rules{min-height:0;font-size:12px;padding:11px 13px;margin:4px 0 3px;flex-shrink:0}
[data-screen="ready"] .ready-visual{flex:1 1 0;min-height:110px;max-height:390px;width:calc(100% + 2 * var(--ready-pad));max-width:none;height:auto;margin:6px calc(-1 * var(--ready-pad)) 8px;overflow:hidden;position:relative;display:block;isolation:isolate}
[data-screen="ready"] .ready-visual img,[data-screen="ready"] .ready-visual svg{width:100%;height:100%;display:block;object-fit:cover;object-position:center 43%;animation:none;filter:none;mask-image:linear-gradient(to bottom,transparent 0%,#000 9%,#000 70%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 9%,#000 70%,transparent 100%)}
[data-screen="ready"] .ready-visual svg{object-fit:contain}
[data-screen="ready"] #go{margin-top:auto;flex-shrink:0}
@media(max-width:460px){[data-screen="ready"]{--ready-pad:20px;padding-top:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}
@media(max-height:700px){[data-screen="ready"]{padding-top:10px;padding-bottom:12px}[data-screen="ready"] .progress-pips{margin:7px auto 14px}[data-screen="ready"] .ready-name{font-size:clamp(32px,9.7vw,45px);margin:6px 0 3px}[data-screen="ready"] .ready-help{min-height:32px;padding:3px 9px}[data-screen="ready"] .ready-visual{margin-top:2px;margin-bottom:4px;min-height:90px}}
/* A restrained light overlay, not a strobe. Keep text and controls above the light. */
[data-screen="results"] .score-glow{position:absolute;inset:0;pointer-events:none;z-index:1;opacity:0;background:radial-gradient(ellipse at 50% 45%,#9bcfff38 0%,#5dbbe82b 46%,#54c7ff22 100%);box-shadow:inset 0 0 54px #8ce6ff33;transition:none}
[data-screen="results"] .score-glow.gold{background:radial-gradient(ellipse at 50% 45%,#ffd89042 0%,#ffd78d24 55%,#ffce7a20 100%);box-shadow:inset 0 0 60px #ffe19e44}
[data-screen="results"] .result-heading,[data-screen="results"] .chapter,[data-screen="results"] .section-title,[data-screen="results"] .brain-result,[data-screen="results"] .reveal-status,[data-screen="results"] .result-table,[data-screen="results"] .reveal-skip,[data-screen="results"] .result-actions{position:relative;z-index:2}
[data-screen="results"] .result-heading{z-index:3}
@media(prefers-reduced-motion:reduce){[data-screen="results"] .score-glow{display:none}}

/* V3.11 — stronger, slower result light and independent merge confirmation. */
[data-screen="results"] .score-glow{z-index:1;background:radial-gradient(ellipse at 50% 42%,#80cfff88 0%,#36a8f462 52%,#417bda50 100%);box-shadow:inset 0 0 68px #9be7ff88}
[data-screen="results"] .score-glow.gold{background:radial-gradient(ellipse at 50% 42%,#ffd89199 0%,#ecaa575e 55%,#f0bc5050 100%);box-shadow:inset 0 0 70px #ffe2a69c}
[data-screen="results"] .result-table{background:#10153991}
.final-energy{background:radial-gradient(ellipse at 50% 42%,#ffde8b66 0%,#f9cc6d38 55%,#e5b25422 100%);box-shadow:inset 0 0 65px #ffd777bb;animation-duration:1.05s}
.final-energy.best{background:radial-gradient(ellipse at 50% 42%,#ffde8b88 0%,#f9cc6d49 55%,#e5b25430 100%);box-shadow:inset 0 0 75px #ffda8cdd}
.merge-fx .merge-block{animation:none}
.merge-cell{position:relative}
.merge-cell.merge-confirm::after{content:"";position:absolute;inset:1px;z-index:5;border:2px solid #b5ffed;border-radius:9px;box-shadow:0 0 10px #67ffceaa,inset 0 0 12px #87ffdf44;pointer-events:none;animation:merge-confirm .48s ease-out both}
.merge-cell.merge-big::after{border-color:#ffe7a0;box-shadow:0 0 15px #ffcd75ba,inset 0 0 16px #ffdb8b55}
@keyframes merge-confirm{0%,22%{opacity:1}100%{opacity:.25}}
.merge-block.impact{animation:merge-impact .22s ease-out both}
@keyframes merge-impact{0%{transform:scale(.90);filter:brightness(1.24)}42%{transform:scale(1.13);filter:brightness(1.13)}100%{transform:scale(1);filter:none}}
@media(prefers-reduced-motion:reduce){.merge-cell.merge-confirm::after{animation:none;opacity:1;box-shadow:none}.merge-block.impact{animation:none}[data-screen="results"].reveal-running .brain-result{outline:1px solid #d7bb77;border-radius:14px;outline-offset:3px}}


/* V3.12: instant Merge Rush, with a sustained score-reveal atmosphere. */
.merge-board .merge-block,.merge-board .merge-block.changed,.merge-board .merge-block.impact{animation:none!important;transition:none!important;will-change:auto}
[data-screen="results"]{position:relative;isolation:isolate;--reveal-level:0%;--reveal-light:0;--reveal-hue:202}
[data-screen="results"] .score-glow{display:none!important}
[data-screen="results"].reveal-running{background:radial-gradient(ellipse at 50% 40%,hsl(var(--reveal-hue) 66% 31% / var(--reveal-light)),transparent 85%),linear-gradient(155deg,#171c4c,#101539 60%,#111738)}
[data-screen="results"].reveal-running .brain-result{text-shadow:0 0 22px #ffce7899}
.reveal-meter{height:5px;flex-shrink:0;margin:4px 14% 2px;border-radius:8px;background:#ffffff20;overflow:hidden;position:relative;z-index:2}
.reveal-meter>span{display:block;height:100%;width:var(--reveal-level);border-radius:inherit;background:linear-gradient(90deg,#64e7f3,#ffe093)}
[data-screen="results"].reveal-complete .reveal-meter{display:none}
[data-screen="results"].reveal-complete .brain-result{color:#fff0bb;text-shadow:0 0 18px #ffca8277}
[data-screen="results"].reveal-complete .reveal-status{padding:4px;border-radius:8px;background:#d4a55220}
@media(prefers-reduced-motion:reduce){[data-screen="results"].reveal-running{background:linear-gradient(155deg,#193460,#111739 70%)}[data-screen="results"].reveal-running .brain-result{outline:none}}

/* V3.13 — instant, local feedback on existing grid cells. No overlays, timers,
   animation queues, forced reflow, particle nodes or delayed input. */
.merge-cell.instant-impact-a::after,.merge-cell.instant-impact-b::after{content:"";position:absolute;inset:1px;border:2px solid #c5fff1;border-radius:9px;background:#b8fff426;pointer-events:none;z-index:2;opacity:0;animation:instant-impact-a 150ms ease-out both}
.merge-cell.instant-impact-b::after{animation-name:instant-impact-b}
.merge-cell.instant-big::after{border-color:#fff0aa;background:#ffe08a3d;border-width:3px}
@keyframes instant-impact-a{0%{opacity:1;transform:scale(1.035)}100%{opacity:0;transform:scale(1)}}
@keyframes instant-impact-b{0%{opacity:1;transform:scale(1.035)}100%{opacity:0;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.merge-cell.instant-impact-a::after,.merge-cell.instant-impact-b::after{animation:none;opacity:1;transform:none;background:transparent}}
[data-screen="collection"] .collection-heading{justify-content:flex-start;gap:12px;margin:0 0 8px;flex-shrink:0}
[data-screen="collection"] .collection-heading .section-title{font-size:clamp(19px,5.7vw,26px);margin:0;line-height:1.1;flex:1;text-align:left}
[data-screen="collection"] .discovery-count{margin:0 0 7px}
[data-screen="collection"] .collection-grid{margin:4px 0 10px}
/* V4 — performance and interaction */
@media(max-width:460px){.ambient{display:none}}
@media(min-width:461px){[data-screen="menu"] .hero-portal{width:calc(100% + 48px);margin-left:-24px;margin-right:-24px}}
[data-screen="results"].reveal-running{background:linear-gradient(155deg,#171c4c,#101539 60%,#111738)}
[data-screen="results"] .score-glow{display:block!important;position:absolute;inset:0;pointer-events:none;z-index:0;opacity:0;background:radial-gradient(ellipse at 50% 40%,#6ecbff9c,transparent 82%);box-shadow:none;will-change:opacity}
[data-screen="results"] .score-glow.warm{background:radial-gradient(ellipse at 50% 40%,#ffd48bb0,transparent 86%)}
[data-screen="results"] .reveal-meter>span{width:100%;transform-origin:left;transform:scaleX(0)}
[data-screen="results"] .result-table,[data-screen="results"] .result-actions,[data-screen="results"] .reveal-skip{position:relative;z-index:2}
.merge-cell.instant-impact-a::after,.merge-cell.instant-impact-b::after{animation-duration:150ms}
@media(prefers-reduced-motion:reduce){.merge-cell.instant-impact-a::after,.merge-cell.instant-impact-b::after{opacity:1}}
[data-game="memory"] .game-bottom{display:none}
.pb-mark{color:#ffe19b;font-size:10px;font-weight:900;letter-spacing:.03em;margin-left:5px}
.pb-strip{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:8px 0 12px}.pb-strip div{background:#28345e;padding:10px;border-radius:10px;text-align:left}.pb-strip small{display:block;color:#b3c7ef;font-size:10px}.pb-strip strong{font-size:19px;color:#ffe4a1}
.bb-dialog{position:absolute;inset:0;z-index:100;display:grid;place-items:center;background:#080d28e8;padding:20px}.bb-dialog-panel{width:100%;max-width:350px;background:#202c55;border:1px solid #647da3;border-radius:20px;padding:20px;text-align:center;display:grid;gap:12px}.bb-dialog-panel h2,.bb-dialog-panel p{margin:0}.bb-dialog-panel textarea{width:100%;min-height:110px;background:#0d1735;color:#fff;border:1px solid #7d91be;border-radius:9px;padding:10px;font:inherit;resize:vertical}
@media(max-height:490px) and (orientation:landscape){.bb-rotate{display:block!important}}.bb-rotate{display:none;position:fixed;inset:0;z-index:200;background:#111a39;color:#fff;text-align:center;padding:24vh 20px 0;font-weight:800;pointer-events:auto}
/* V4.1: viewport-wide, compositor-friendly celebration above artwork and UI. */
#app > .score-glow{position:absolute;inset:0;z-index:80;pointer-events:none;opacity:0;will-change:opacity;background:#a5dfff;box-shadow:none}
#app > .score-glow.warm{background:#ffe3a1;box-shadow:none}
.bb-rotate{padding:0;place-content:center;gap:14px;align-items:center;justify-items:center}.bb-rotate span{font-size:42px}.bb-rotate small{font-weight:500;color:#c1d1ee}
@media(max-height:490px) and (orientation:landscape){.bb-rotate{display:grid!important}}

/* V4.1.2: stable reveal geometry and scrollable record history. */
[data-screen="results"] .reveal-status{min-height:28px;padding:4px;border-radius:8px;box-sizing:border-box}
[data-screen="results"].reveal-complete .reveal-status:empty{background:transparent;visibility:hidden}
[data-screen="results"] .reveal-meter{transition:opacity .25s ease-out}
[data-screen="results"].reveal-complete .reveal-meter{display:block;opacity:0}
[data-screen="results"] .reveal-footer{display:grid;grid-template-columns:minmax(0,1fr);margin-top:auto;flex-shrink:0;position:relative;z-index:2}
[data-screen="results"] .reveal-footer>*{grid-area:1/1}
[data-screen="results"] .reveal-footer .result-actions{margin-top:0;align-self:end}
[data-screen="results"] #revealActions[hidden]{display:flex!important;visibility:hidden;pointer-events:none}
[data-screen="results"] #skipReveal{justify-self:center;align-self:center}
[data-screen="results"].reveal-complete #revealActions{animation:bb-actions-in .25s ease-out both}
@keyframes bb-actions-in{from{opacity:0}to{opacity:1}}
[data-screen="history"]>*{flex-shrink:0}
[data-screen="history"] .result-table{flex:1 1 auto;min-height:100px;overflow-y:auto;overscroll-behavior:contain;margin-bottom:12px;scrollbar-width:thin;scrollbar-color:#566094 transparent}
[data-screen="history"] #replayLast{margin-bottom:8px}
@media(prefers-reduced-motion:reduce){[data-screen="results"] .reveal-meter{transition:none}[data-screen="results"].reveal-complete #revealActions{animation:none}}

[data-screen="menu"] .logo{font-size:clamp(42px,12vw,60px);letter-spacing:.08em;line-height:1}
[data-screen="menu"] .logo .blip-subtitle{display:block;font-size:.42em;letter-spacing:.24em;margin:4px 0 0;line-height:1.15}
[data-screen="menu"] .logo small{font-size:.25em;letter-spacing:.13em;margin-top:7px}
