@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700;800;900&display=swap');
:root{font-family:Heebo,Arial,sans-serif;color:#21464a;font-synthesis:none;background:#246a6e}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0;color:inherit;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #e88a36;outline-offset:4px}button:disabled{cursor:default}button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}.game{position:relative;min-height:100svh;overflow:hidden;background:linear-gradient(#16494c30,#174e4e15),url('art/lab.webp') center/cover}header{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:22px 4%;background:linear-gradient(#ebfff7ef,#e6fff6c9);border-bottom:1px solid #fff8;box-shadow:0 4px 30px #12464b13}h1{font-size:clamp(21px,2.3vw,32px);margin:0;font-weight:900;letter-spacing:-1px}.brand{display:flex;align-items:center;gap:10px}.brand-icon{font-size:44px;color:#26867d}.brand span:not(.brand-icon){font-size:14px;color:#56787b}nav{display:flex;align-items:center;gap:10px}.nav-btn,.icon-btn{background:#fff9;border:1px solid #fff;border-radius:14px;padding:10px 16px;font-size:15px;font-weight:700;box-shadow:0 3px 0 #17565412}.nav-btn b{background:#2c7a74;color:#fff;border-radius:8px;padding:3px 8px;margin-right:6px;font-size:13px;display:inline-block;direction:ltr}.icon-btn{width:42px;height:42px;padding:0;font-size:21px}.lab{max-width:1320px;margin:auto;display:grid;grid-template-columns:minmax(230px,1fr) minmax(270px,1.05fr) minmax(230px,1fr);align-items:center;gap:30px;padding:25px 40px 0;min-height:calc(100svh - 190px)}.cabinet{background:linear-gradient(90deg,#794c351a,#623d2826);border:10px solid #9e6a4a;border-radius:15px;box-shadow:inset 0 0 25px #43271e66,0 10px 18px #214a4f38;position:relative;border-bottom-width:15px}.cabinet h2{font-size:16px;text-align:center;font-weight:700;color:#fff5df;background:linear-gradient(#a77d53,#795439);border-radius:9px;padding:6px 22px;margin:-23px auto 9px;width:max-content;box-shadow:0 3px 5px #2b352533;border:1px solid #c7a17b}.shelf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 7px 0;gap:5px 0;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.333% - 12px),#bd8b60 calc(33.333% - 12px),#986441 calc(33.333% - 4px),#754a31 calc(33.333% - 3px),#754a31 33.333%)}.ingredient{position:relative;background:transparent;border-radius:12px;min-width:0;padding:0 1px 18px;display:flex;align-items:center;flex-direction:column;transition:filter .2s,transform .2s}.ingredient:hover:not(:disabled){transform:translateY(-7px)}.vessel{position:relative;width:100%;max-width:130px;height:110px;display:block;filter:drop-shadow(0 7px 4px #26332838)}.vessel img{width:100%;height:100%;object-fit:contain;filter:hue-rotate(var(--hue))}.vessel .symbol{position:absolute;left:50%;top:57%;transform:translate(-50%,-50%);font-size:24px;filter:drop-shadow(0 1px 0 white)}.ingredient.jar .symbol{top:61%}.ingredient-label{background:#fff3dc;box-shadow:0 2px 4px #48312024;border:1px solid #c8a57e70;border-radius:6px;padding:2px 7px;font-size:14px;font-weight:700;white-space:nowrap}.ingredient.selected .vessel{transform:translateY(-4px)}.ingredient.selected:after{content:'✓';position:absolute;top:8px;right:8px;color:#fff;background:#228b64;border:2px solid #fff;border-radius:50%;width:24px;height:24px;font-weight:900}.ingredient:disabled:not(.selected){opacity:.55}.mixing-area{display:flex;flex-direction:column;align-items:center;position:relative}.experiment-label{font-size:14px;letter-spacing:1px;background:#e4fff3dc;padding:5px 20px;border-radius:20px;border:1px solid #fff;margin-bottom:5px;color:#47807b}.apparatus{height:340px;width:275px;position:relative;isolation:isolate;filter:drop-shadow(0 15px 10px #2d3e433b);transition:transform .2s}.apparatus.drag-over{transform:scale(1.05);filter:drop-shadow(0 0 15px #fff)}.blender{position:absolute;width:100%;height:100%;object-fit:contain;z-index:2;pointer-events:none}.liquid{position:absolute;left:30%;right:28%;bottom:43%;height:0;max-height:36%;border-radius:10% 10% 22% 22%;background:linear-gradient(90deg,#ffffff30,var(--liquid,#86e7df),#ffffff60);opacity:.8;z-index:3;mix-blend-mode:multiply;transition:height .5s,background .5s;clip-path:polygon(0 0,100% 0,91% 100%,12% 100%)}.liquid:after{content:'';position:absolute;top:0;left:0;right:0;height:12px;background:#fff9;border-radius:50%}.floating{position:absolute;inset:21% 28% 43% 30%;display:flex;align-items:end;justify-content:center;gap:2px;z-index:4;font-size:27px;overflow:hidden}.floating span{animation:float 2s ease-in-out infinite alternate}.floating span:nth-child(2){animation-delay:-.7s}.mix-bubbles{display:none;position:absolute;inset:10% 0;text-align:center;font-size:70px;color:#fff3bd;z-index:5}.mixing .apparatus{animation:shake .12s infinite}.mixing .liquid{animation:swirl .45s infinite;opacity:.9}.mixing .floating{animation:swirl .6s infinite}.mixing .mix-bubbles{display:block;animation:rise .8s infinite}.mix-controls{position:relative;z-index:4;width:100%;text-align:center;margin-top:-4px}.slots{display:flex;justify-content:center;gap:10px;margin-bottom:12px}.slot{height:52px;width:58px;background:#f2fff6e8;border:2px dashed #89b1a6;border-radius:14px;display:grid;place-items:center;font-size:25px;position:relative;box-shadow:0 4px 0 #3c746b1a}.slot.filled{border-style:solid;border-color:#fff;box-shadow:0 4px 0 #46786e38}.slot span{position:absolute;left:1px;top:-3px;font-size:14px;color:#667a71}.action-row{display:flex;justify-content:center;gap:9px}.primary{background:linear-gradient(#399f80,#20765f);border:1px solid #67c6a0;border-radius:16px;color:white;padding:13px 30px;font-size:20px;font-weight:800;box-shadow:0 5px 0 #175742,0 8px 18px #124d3833;transition:filter .2s}.primary:hover{filter:brightness(1.09)}.primary:disabled{background:linear-gradient(#aac4b8,#91aea0);border-color:#c3d6c9;box-shadow:0 4px 0 #738e7e;color:#f7fff9}.clear{border:1px solid #fff;border-radius:15px;background:#fff9;width:48px;font-size:27px}.mix-controls p{font-size:14px;font-weight:600;min-height:22px;margin:12px -25px 0;background:#f2fff4db;padding:5px 12px;border-radius:10px;display:inline-block}footer{display:flex;justify-content:space-between;align-items:center;gap:15px;max-width:1330px;padding:18px 35px 20px;margin:auto;direction:ltr}.stamp img{width:108px;display:block}.hint-btn{background:#fff5de;border:1px solid #fff;border-radius:22px;box-shadow:0 4px 0 #7b5c4526;padding:10px 23px;font-weight:700;font-size:16px;direction:rtl}.footer-note{font-size:14px;color:#fff6e2;text-shadow:0 1px 3px #21464a}.hint-card{position:fixed;z-index:9;bottom:85px;left:50%;transform:translateX(-50%);width:330px;max-width:90vw;background:#fff9eb;border:1px solid #f0d6ae;border-radius:20px;padding:20px;text-align:center;box-shadow:0 15px 50px #183f4b44}.hint-card>button:first-child{position:absolute;left:10px;top:8px;background:none;font-size:22px}.hint-card p{margin:12px 0;font-size:16px}.small-btn{background:#e1eee7;border:1px solid #b7d0c2;border-radius:9px;padding:8px 16px;font-weight:700}dialog{border:1px solid #fff;width:480px;max-width:94vw;max-height:90svh;border-radius:28px;padding:32px;background:linear-gradient(150deg,#fffdf2,#e8f9ef);color:#21464a;box-shadow:0 25px 100px #102f4c66;text-align:center;overflow:auto}dialog::backdrop{background:#133f4bc9;backdrop-filter:blur(8px)}dialog h2{font-size:30px;line-height:1.3;margin:8px 0 15px;font-weight:900;letter-spacing:-.7px}dialog p{font-size:16px;line-height:1.7;margin:12px 0}.dialog-close{position:absolute;top:13px;left:13px;width:35px;height:35px;border-radius:50%;background:#254f4510;font-size:26px}.eyebrow{color:#4f8e80;font-size:14px;font-weight:700}.intro-art{display:flex;justify-content:center;align-items:center;height:130px;margin-bottom:15px}.intro-art img{width:32%;margin:0 -6px;filter:drop-shadow(0 10px 6px #214c4920)}.intro-art img:nth-child(2){width:38%;transform:translateY(-15px);z-index:1}.intro-steps{display:flex;justify-content:center;gap:20px;margin:25px 0;font-weight:800}.muted{color:#66817b!important;font-size:14px!important}.badge{display:inline-block;border-radius:20px;padding:5px 16px;background:#d0f2d8;color:#1d8051;font-weight:800;font-size:14px}.reveal-stage{height:255px;position:relative;display:grid;place-items:center;isolation:isolate;touch-action:none}.reveal-stage img{width:250px;height:250px;object-fit:contain;position:relative;z-index:1;cursor:grab;transition:transform .25s cubic-bezier(.2,1.9,.4,1);filter:drop-shadow(0 15px 10px #28604a25)}.reveal-stage img:active{transform:scale(1.2,.75);cursor:grabbing}.rays{position:absolute;inset:0;background:repeating-conic-gradient(#f6df831c 0deg 12deg,transparent 12deg 24deg);mask-image:radial-gradient(black,transparent 68%);animation:spin 30s linear infinite}.recipe-line{font-size:24px;margin:10px 0 25px;direction:ltr}.recipe-line span{font-size:14px}.wide{width:980px}.wide h2 small{font-size:18px;color:#4c9481;margin-right:10px;display:inline-block;direction:ltr}.progress{height:7px;border-radius:10px;background:#d4e7dc;overflow:hidden;margin:20px auto 12px;max-width:280px}.progress i{display:block;height:100%;background:#3b9b7d}.collection-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:12px 4px;margin-top:20px}.toy-cell{min-width:0;padding:3px;background:transparent;border-bottom:6px solid #c3aa83;border-radius:5px}.toy-cell img{width:100%;aspect-ratio:1;object-fit:contain;transition:transform .2s}.toy-cell:hover img{transform:translateY(-5px)}.locked-toy{display:grid;place-items:center;aspect-ratio:1;background:linear-gradient(135deg,#d1e2db,#acc4b7);border:3px solid #e9f0e8;box-shadow:inset 0 0 0 1px #97b0a2;border-radius:15px 15px 10px 10px;margin:6px;color:#f8fff8;font-size:30px;font-weight:900}.toy-cell small{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book-row{display:flex;align-items:center;gap:15px;border-bottom:1px solid #caddd0;padding:12px 0;text-align:right}.book-row img{width:65px;height:65px;object-fit:contain}.book-row>div{flex:1}.book-row b{display:block}.book-row p{font-size:14px;margin:4px 0}.book-row button{background:#d7eade;border-radius:10px;padding:9px 15px;font-size:14px;font-weight:700}details{margin-top:25px;text-align:right}summary{cursor:pointer;font-weight:700}#failedList p{font-size:14px;border-bottom:1px solid #d9e5da;padding:7px}.secondary{background:#dfeee4;border-radius:12px;padding:10px 20px;margin:15px 5px 0;font-weight:700}.text-btn{display:block;background:none;text-decoration:underline;margin:16px auto 0;font-size:14px}#failureArt{font-size:170px;color:#bdc8cd;position:relative;text-shadow:0 10px 20px #66817b22}#failureArt span{position:absolute;inset:50% 0 auto;font-size:32px;color:#667381;transform:rotate(-8deg)}.trophy{font-size:85px}.victory-toys{display:flex;justify-content:center;margin:20px}.victory-toys img{width:33%;animation:float .6s infinite alternate}.victory-toys img:nth-child(2){animation-delay:-.3s}#confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:1000}.empty-book{padding:30px;color:#66817b}.empty-book b{display:block;color:#386f62;font-size:20px;margin-bottom:10px}@keyframes float{to{transform:translateY(-12px) rotate(3deg)}}@keyframes shake{50%{transform:translateX(2px) rotate(.8deg)}}@keyframes swirl{50%{transform:scaleX(.9) translateY(5px);filter:hue-rotate(30deg)}}@keyframes rise{to{transform:translateY(-40px);opacity:0}}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1500px){.apparatus{height:430px;width:350px}.vessel{height:140px}.lab{gap:50px}.cabinet{border-width:14px}.shelf-grid{padding-top:15px}}
@media(max-width:1000px){header{padding:14px 20px}.brand span:not(.brand-icon){display:none}nav{gap:5px}.nav-btn{padding:9px 10px}.lab{gap:18px;padding:30px 18px 0;grid-template-columns:minmax(185px,1fr) minmax(220px,1fr) minmax(185px,1fr)}.vessel{height:92px}.ingredient-label{font-size:13px;padding:2px 4px}.apparatus{width:245px;height:320px}.cabinet{border-width:7px}.cabinet h2{font-size:14px;padding:6px 12px}.collection-grid{grid-template-columns:repeat(8,1fr)}}
@media(max-width:720px){.game{background-position:center;min-height:100svh}header{padding:12px 13px;gap:10px;flex-wrap:wrap}.brand-icon{font-size:29px}.brand{gap:5px}h1{font-size:23px}nav{width:100%;justify-content:center}.nav-btn{font-size:14px;flex:1;padding:7px 6px}.icon-btn{width:35px;height:35px}.lab{display:grid;grid-template-columns:1fr 1fr;gap:22px 12px;padding:26px 12px 0;min-height:auto;align-items:start}.mixing-area{grid-column:1/-1;grid-row:2}.cabinet{grid-row:1;width:100%;border-width:6px;border-bottom-width:10px}.shelf-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:0 2px;gap:5px 0;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(50% - 10px),#bb875b calc(50% - 10px),#895b3d 50%)}.vessel{height:68px;max-width:80px}.vessel .symbol{font-size:17px}.ingredient{padding-bottom:12px}.ingredient-label{font-size:11px;letter-spacing:-.4px;padding:1px 3px;max-width:100%}.cabinet h2{font-size:13px;margin-top:-20px;margin-bottom:7px;padding:4px 10px}.ingredient.selected:after{font-size:11px;top:0;right:0;width:18px;height:18px}.apparatus{height:255px;width:215px}.experiment-label{position:absolute;right:8px;top:5px;letter-spacing:0;font-size:12px;padding:5px 10px}.mix-controls{margin-top:-8px}.slots{position:absolute;right:calc(50% + 94px);bottom:73px;flex-direction:column;gap:7px}.slot{height:44px;width:44px;font-size:22px;border-radius:12px}.mix-controls p{margin:10px 0 0;font-size:13px}.primary{font-size:18px;padding:12px 28px}.floating{font-size:21px}footer{padding:15px 16px;gap:8px}.stamp img{width:85px}.hint-btn{font-size:14px;padding:9px 17px}.footer-note{display:none}.collection-grid{grid-template-columns:repeat(5,1fr);gap:10px 2px}.wide{padding:35px 15px 20px}.locked-toy{font-size:25px;margin:3px;border-radius:10px}.toy-cell small{font-size:11px}.book-row{gap:8px}.book-row img{width:45px;height:45px}.book-row p{font-size:12px}.book-row button{padding:8px;font-size:12px}.hint-card{bottom:75px}dialog{padding:30px 23px}dialog h2{font-size:27px}.reveal-stage{height:230px}.reveal-stage img{width:220px;height:220px}}
@media(max-width:370px){h1{font-size:21px}.vessel{height:60px}.ingredient-label{font-size:10px}.lab{gap:22px 8px;padding-inline:8px}.slots{right:calc(50% + 88px)}.apparatus{height:235px;width:200px}.nav-btn{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media(max-width:720px){.shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.333% - 10px),#bb875b calc(33.333% - 10px),#895b3d 33.333%)}.ingredient-label{font-size:14px;white-space:normal;line-height:1.15;min-height:34px;display:flex;align-items:center;justify-content:center;width:95%;letter-spacing:-.3px}.vessel{height:72px;max-width:90px}.ingredient{padding-bottom:12px}.cabinet h2{font-size:14px}.mix-controls p{font-size:14px}}
@media(max-width:720px){header{padding:9px 13px;gap:6px}.shelf-grid{grid-template-columns:repeat(3,minmax(0,1fr));background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(50% - 10px),#bb875b calc(50% - 10px),#895b3d 50%)}.ingredient-label{overflow-wrap:anywhere;font-size:14px;min-height:36px;line-height:1.15;padding-inline:1px;width:100%}.vessel{height:60px}.apparatus{height:225px;width:195px}.slots{right:calc(50% + 88px);bottom:65px}.slot{height:40px;width:40px}.nav-btn b{margin-right:2px}.lab{gap:18px 10px}}
/* Tangible ingredients and an exactly clipped glass interior. */
.game-logo{width:245px;height:104px;object-fit:contain;display:block;filter:drop-shadow(0 4px 3px #234b5825)}header{padding-block:7px}.intro-logo{display:block;width:260px;max-width:80%;margin:0 auto 10px}.intro-art{height:90px}.intro-art img{height:110px;object-fit:contain}
.apparatus{width:auto!important;aspect-ratio:533/800;height:340px;flex-shrink:0}.blender{object-fit:fill}.jug-interior{position:absolute;left:27%;width:40%;top:21%;height:34%;clip-path:polygon(0 0,100% 0,87% 100%,12% 100%);overflow:hidden;z-index:3;pointer-events:none}.jug-interior .liquid{position:absolute;inset:0;width:100%;height:100%;max-height:none;border-radius:0;background:none;clip-path:none;mix-blend-mode:normal;opacity:.79;display:flex;flex-direction:column-reverse;justify-content:flex-start;transition:none}.liquid:after{display:none}.fluid-layer{height:28%;flex:0 0 28%;background:linear-gradient(90deg,#ffffff55,transparent 35%,#ffffff30),var(--layer);box-shadow:inset 0 2px 0 #ffffff9c,inset 0 -2px 8px #24656a1c;position:relative;display:grid;place-items:center}.fluid-layer span{font-size:21px;line-height:1;filter:drop-shadow(0 1px 1px #fff9)}.floating{display:none}.mixing .jug-interior .liquid{animation:blend-glow .4s infinite;transform:none}.mixing .fluid-layer{animation:layer-mix .4s infinite alternate}.mixing .fluid-layer:nth-child(2){animation-delay:-.2s}
.slots{position:static;flex-direction:row;gap:10px;margin:5px 0 12px}.slot{width:70px;height:76px;background:linear-gradient(135deg,#fffc,#e4f4dfef);border:2px dashed #99bcae;border-radius:15px;overflow:visible;padding:3px;display:grid;place-items:center}.slot.filled{border:2px solid #fff;box-shadow:0 4px 0 #568a743b,0 5px 10px #24534920}.slot .vessel{height:66px;width:62px;max-width:none;display:block}.slot .vessel .symbol{position:absolute;left:50%;top:57%;transform:translate(-50%,-50%);font-size:16px;color:inherit}.slot .vessel.jar .symbol{top:61%}.slot .remove-product{position:absolute;left:-5px;top:-6px;border-radius:50%;width:20px;height:20px;line-height:18px;background:#fffc;border:1px solid #c1d5c4;color:#517264;font-size:16px}.slot .empty-slot{position:static;font-size:27px;color:#799c8d}.hint-explainer{font-size:14px!important;color:#6b8174;margin:8px 0!important}.hint-card{bottom:78px}
/* Result screens always fit the viewport. Only collection/book may scroll. */
#result{inset:0;width:min(700px,calc(100vw - 24px));height:min(840px,calc(100dvh - 24px));max-height:none;margin:auto;padding:20px 24px;overflow:hidden;border:2px solid #fff8;border-radius:30px;background:radial-gradient(ellipse at 50% 35%,#fffce7 0,#f3faee 40%,#dff3e9 100%)}#result[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0}.result-heading{z-index:2;pointer-events:none}.result-heading h2{margin:7px 0 0;font-size:30px}.reveal-stage{min-height:0;height:auto;width:100%;position:relative;overflow:hidden;touch-action:none}.reveal-stage canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab;position:relative;z-index:1;outline-offset:-5px}.reveal-stage canvas:active{cursor:grabbing}#toyLoading{position:absolute;top:45%;left:0;right:0;color:#678279;font-size:14px;pointer-events:none}.result-bottom{z-index:2;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px}.toy-modes{display:flex;gap:4px;padding:4px;background:#d8e8df;border-radius:14px;border:1px solid #c5ddcf}.toy-modes button{background:transparent;padding:7px 27px;font-size:15px;font-weight:700;border-radius:10px}.toy-modes button.active{background:#fffcef;box-shadow:0 3px 6px #2257401c;color:#237755}.hint-meter{width:min(380px,100%);background:#ffffff8a;border:1px solid white;border-radius:16px;padding:10px 15px;box-shadow:0 5px 12px #2d67400b}.meter-heading{display:flex;justify-content:space-between;font-size:14px;font-weight:700;gap:8px}.meter-heading b{color:#358c73;direction:ltr}.meter-track{height:11px;background:#d7e7dd;box-shadow:inset 0 1px 3px #1b563b22;border-radius:12px;margin-top:6px;overflow:hidden}.meter-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#78dbad,#2eae8e);border-radius:12px;transition:width .16s}.hint-meter p{font-size:13px;line-height:1.4;min-height:18px;margin:6px 0 0;color:#487264}.hint-unlocked{animation:reward-pulse .8s}.hint-unlocked #earnedHint{color:#247a4f;font-weight:700}#resultText{font-size:14px;line-height:1.4;margin:0;color:#668177}#resultRecipe{margin:0;display:flex;justify-content:center;align-items:center;gap:6px;direction:rtl;height:42px}.recipe-product{display:block;background:#ffffffe0;border:1px solid #d8e6d8;border-radius:9px;height:42px;width:42px}.recipe-product .vessel{height:40px;width:40px;max-width:none}.recipe-product .vessel .symbol{font-size:11px}.recipe-plus{font-size:15px;color:#699084}#result .primary{min-width:200px;margin-top:0;font-size:18px;padding:10px 26px;box-shadow:0 4px 0 #175742,0 5px 12px #124d3822}#failureArt{font-size:clamp(100px,25vh,200px);position:absolute;top:50%;left:50%;transform:translate(-50%,-55%);line-height:1.1}#failureArt span{top:56%;font-size:30px}#result.failed{height:min(590px,calc(100dvh - 24px))}#result.failed #resultText{max-width:350px;font-size:16px;margin-bottom:8px}#result.failed .result-bottom{gap:15px}#result.failed #resultRecipe{height:56px}.failed .recipe-product{width:55px;height:55px}.failed .recipe-product .vessel{width:53px;height:53px}.failed .recipe-product .vessel .symbol{font-size:14px}
#victory{overflow:hidden;max-height:calc(100dvh - 24px);padding:clamp(12px,3vh,30px)}#victory .trophy{font-size:clamp(40px,9vh,80px)}#victory h2{font-size:clamp(24px,4vh,32px)}#victory .victory-toys{margin:10px auto;height:clamp(50px,15vh,120px)}#victory .victory-toys img{height:100%;object-fit:contain}#victory p{margin:8px 0}#victory .primary{font-size:18px;padding:10px 20px}#confetti{max-width:none!important;max-height:none!important}
@keyframes blend-glow{50%{filter:hue-rotate(20deg);opacity:.95}}@keyframes layer-mix{to{filter:blur(3px);background-color:#ffffff60}}@keyframes reward-pulse{50%{box-shadow:0 0 24px #73dbae;transform:scale(1.025)}}
@media(min-width:1500px){.apparatus{height:400px}}
@media(max-width:1000px){.game-logo{width:215px;height:90px}.apparatus{height:310px}}
@media(max-width:720px){header{justify-content:center;padding:5px 12px 9px;gap:5px}.game-logo{width:192px;height:81px}.brand{justify-content:center}.lab{padding-top:25px}.apparatus{height:205px}.slots{position:static;flex-direction:row;gap:10px;margin:2px 0 10px}.slot{width:60px;height:64px}.slot .vessel{width:54px;height:58px}.slot .vessel .symbol{font-size:14px}.mix-controls{margin-top:-3px}.ingredient-label{font-size:13px;overflow-wrap:normal}.hint-card{bottom:65px}#result{padding:14px 14px 16px;border-radius:23px;gap:0}.result-heading h2{font-size:25px;margin:5px 0 0}.result-heading .badge{font-size:13px;padding:4px 14px}.result-bottom{gap:6px}.toy-modes button{padding:5px 26px;font-size:14px}.hint-meter{padding:8px 12px}.hint-meter p{font-size:13px;min-height:18px}.meter-heading{font-size:14px}#resultText{font-size:13px}#resultRecipe{height:35px}.recipe-product{height:35px;width:35px}.recipe-product .vessel{height:33px;width:33px}.recipe-product .vessel .symbol{font-size:10px}#result .primary{padding:9px 26px;font-size:17px}.intro-logo{width:225px}.intro-art{height:70px;margin-bottom:8px}.intro-art img{height:85px}.intro-steps{margin:15px 0}.fluid-layer span{font-size:14px}}
@media(max-height:620px){#result{padding:10px 16px}.result-heading h2{font-size:23px}.result-heading .badge{font-size:12px;padding:3px 12px}.result-bottom{gap:4px}.toy-modes button{padding:4px 20px}.hint-meter{padding:6px 10px}.hint-meter p{font-size:12px;margin-top:3px}.meter-track{height:8px;margin-top:4px}.meter-heading{font-size:13px}#resultText{display:none}#result.failed #resultText{display:block}#resultRecipe{height:30px}.recipe-product{height:30px;width:30px}.recipe-product .vessel{height:28px;width:28px}#result .primary{padding:7px 23px;font-size:16px}}
@media(max-height:520px) and (min-width:600px){#result[open]{width:min(860px,calc(100vw - 24px));grid-template-columns:1fr 1.1fr;grid-template-rows:auto 1fr;gap:8px 12px}.result-heading{grid-column:1;grid-row:1}.reveal-stage{grid-column:2;grid-row:1/3}.result-bottom{grid-column:1;grid-row:2;justify-content:center}.hint-meter p{font-size:12px}.result-heading h2{margin:2px 0}#result.failed .result-bottom{gap:10px}#victory .trophy{font-size:35px}#victory .victory-toys{height:50px;margin:5px}#victory h2{margin:5px}#victory p{font-size:14px;line-height:1.2}#victory .secondary{margin-top:8px}#victory .text-btn{margin-top:8px}}
body:has(dialog[open]){overflow:hidden}
#result.funny-result{background:radial-gradient(ellipse at 50% 35%,#fff6d9,#f8effb 60%,#e9e8f8)}.funny-result .rays{background:repeating-conic-gradient(#e4b2ef22 0deg 12deg,transparent 12deg 24deg)}.funny-result .result-heading h2{color:#62456e}.funny-result #resultText{color:#7c6280}.experiment-book{text-align:right}.experiment-book h2{margin:0 0 16px;text-align:center}.book-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.book-toolbar>span{font-size:13px;color:#6f837b}.book-filters{display:flex;gap:3px;padding:4px;background:#dcebe2;border-radius:12px}.book-filters button{background:transparent;border-radius:9px;padding:7px 18px;font-size:14px;font-weight:700}.book-filters .active{background:#fffdf4;color:#27755b;box-shadow:0 2px 5px #15483112}.experiment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.experiment-card{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:12px 10px 9px;border:1px solid #d6e5d8;border-radius:16px;background:#ffffffc9;box-shadow:0 3px 0 #46745a0c;text-align:right;transition:transform .18s,box-shadow .18s}.experiment-card:hover{transform:translateY(-3px);box-shadow:0 5px 12px #406b5120}.accident-card{background:#fff8ffb5;border-color:#e5d9e9}.experiment-equation{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;direction:rtl}.experiment-inputs{display:flex;align-items:center;gap:2px}.experiment-inputs>span{display:block}.experiment-inputs .vessel{width:36px;height:45px;max-width:none}.experiment-inputs .vessel .symbol{font-size:11px}.experiment-inputs .vessel.jar .symbol{top:61%}.experiment-inputs i{font-size:11px;font-style:normal;color:#91a49a}.equals{font-size:19px;color:#8e9b95}.experiment-output{display:grid;place-items:center;width:65px;height:65px;flex-shrink:0;border-radius:50%;background:radial-gradient(#ecf5d8,#eaf5de00 70%)}.accident-card .experiment-output{background:radial-gradient(#f3d9ec,#f2e1f300 70%)}.experiment-output img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px #45624b12)}.old-foam{font-size:43px;color:#b0b9ce;line-height:1}.experiment-caption{display:flex;align-items:center;justify-content:space-between;gap:4px;border-top:1px solid #e5ece3;padding-top:7px;margin-top:6px;min-height:28px}.experiment-caption b{font-size:14px;font-weight:600;line-height:1.25}.experiment-caption small{font-size:12px;color:#91a196;direction:ltr;flex-shrink:0}.experiment-grid>.empty-book{grid-column:1/-1;text-align:center;padding:35px 10px}.experiment-book #bookCount{font-size:15px}
@media(max-width:720px){.experiment-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.experiment-book{padding-inline:10px}.book-toolbar{flex-direction:column;gap:9px;margin-bottom:14px}.book-filters{width:100%;justify-content:center}.book-filters button{flex:1;padding:7px 9px}.experiment-card{padding:7px 5px;border-radius:12px}.experiment-inputs{gap:0}.experiment-inputs .vessel{width:25px;height:33px}.experiment-inputs .vessel .symbol{font-size:8px}.experiment-inputs i{font-size:9px}.experiment-equation{gap:2px}.experiment-output{width:43px;height:48px}.equals{font-size:14px}.experiment-caption b{font-size:13px;line-height:1.25}.experiment-caption small{font-size:11px}.experiment-caption{min-height:39px;padding-top:5px}.experiment-book h2{font-size:25px}.old-foam{font-size:32px}}
@media(max-width:340px){.experiment-inputs .vessel{width:21px}.experiment-output{width:36px}.experiment-caption b{font-size:12px}}

/* A remembered result beside the blender; unknown recipes stay secret. */
.known-result{position:absolute;left:0;top:105px;z-index:5;width:84px;padding:7px 4px 9px;text-align:center;border:1px solid #ffffffb8;border-radius:18px;background:#effaf0ec;box-shadow:0 5px 16px #174d4525;pointer-events:none}.known-result>div{height:67px;display:grid;place-items:center;font-size:46px;font-weight:900;color:#65988d}.known-result img{width:72px;height:67px;object-fit:contain}.known-result>span{display:block;font-size:12px;line-height:1.3;font-weight:700;color:#48786c}.known-result.discovered{background:#f6fff0f2;border-color:#bde5c5}.known-result.discovered>span{color:#28744d}@media(max-width:1000px) and (min-width:721px){.known-result{left:-7px;width:70px;top:105px}.known-result img{width:61px}.known-result>span{font-size:11px}}@media(max-width:720px){.known-result{left:max(4px,calc(50% - 165px));top:65px;width:84px}}@media(prefers-reduced-motion:no-preference){.known-result{animation:remember-in .18s ease-out}@keyframes remember-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}

/* Non-toy laboratory accidents: bubbles, steam and empty air. */
#result.funny-result{background:linear-gradient(145deg,#fff5e8,#ffebe3)}.funny-result #resultText{color:#8a3d24;font-weight:700}.funny-result .rays{opacity:.25}.accident-card{background:#fff1e9;border-color:#edd1c0}#failureArt{width:min(100%,340px);height:100%;max-height:320px;display:grid;place-items:center;font-size:inherit;text-shadow:none}#failureArt .accident-effect{position:relative;inset:auto;transform:none;font-size:inherit;color:inherit}.accident-effect{position:relative;display:block;width:100%;height:100%;min-height:40px;aspect-ratio:1;overflow:hidden}.accident-effect i{position:absolute;display:block}.effect-bubbles i{width:35%;height:35%;border-radius:50%;background:radial-gradient(circle at 30% 25%,#fff 0 6%,#ffffff80 12%,#d4f2ed66 45%,#7bb9bf90 85%,#fff);border:1px solid #c4e6e5;box-shadow:inset -3px -4px 9px #8abec440}.effect-bubbles i:nth-child(1){left:15%;top:43%}.effect-bubbles i:nth-child(2){left:39%;top:48%}.effect-bubbles i:nth-child(3){left:34%;top:24%}.effect-bubbles i:nth-child(4){left:6%;top:65%}.effect-bubbles i:nth-child(5){left:58%;top:64%}.effect-bubbles i:nth-child(6){left:30%;top:69%}.effect-cloud i{border-radius:50%;background:radial-gradient(ellipse at 40% 20%,#fff,#d4dfe1 75%,#b8cacc);width:48%;height:36%;top:42%;left:10%;filter:blur(1px)}.effect-cloud i:nth-child(2){left:34%;top:23%;height:48%}.effect-cloud i:nth-child(3){left:49%;top:44%}.effect-cloud i:nth-child(n+4){display:none}.effect-air i{width:62%;height:18%;left:17%;top:33%;border-top:3px solid #91b9bf;border-radius:50%;opacity:.6}.effect-air i:nth-child(2){top:48%;left:27%;width:44%}.effect-air i:nth-child(3){top:61%;left:12%;width:54%}.effect-air i:nth-child(n+4){display:none}.experiment-output .accident-effect{width:100%;height:100%}.known-result .accident-effect{width:67px;height:67px}@media(prefers-reduced-motion:no-preference){#failureArt .effect-cloud{animation:accident-drift 3s ease-in-out infinite alternate}#failureArt .effect-air{animation:accident-drift 1.6s ease-in-out infinite alternate}#failureArt .effect-bubbles i{animation:accident-drift 2s ease-in-out infinite alternate}#failureArt .effect-bubbles i:nth-child(even){animation-delay:-1s}@keyframes accident-drift{to{transform:translateY(-9px);opacity:.65}}}

/* Separate the completed recipe above from the next experiment's visual clues. */
#result{height:min(740px,calc(100dvh - 24px));padding:14px 22px}.result-topline{display:flex;direction:rtl;align-items:center;justify-content:center;gap:24px}.used-recipe{display:flex;align-items:center;gap:8px;direction:rtl}.used-recipe>small{font-size:12px;color:#668177;max-width:70px;line-height:1.2}.result-heading h2{margin:4px 0 0}.result-topline .badge{margin:0;white-space:nowrap}#result .reveal-stage{max-height:330px}.visual-clues{margin-top:8px}.clue-cards{display:flex;justify-content:center;gap:8px;direction:rtl}.clue-card{flex:1;max-width:100px;min-width:0;display:flex;flex-direction:column;align-items:center;border:1px solid #c6e4d3;border-radius:12px;background:#f8fff9;padding:4px 3px}.clue-card .vessel{height:47px;width:48px;filter:none}.clue-card .symbol{font-size:14px}.clue-card b{font-size:13px;line-height:1.2;color:#28634f}.clue-card.unknown{background:#edf3ef;border:1px dashed #bfd1c6}.clue-card.unknown b{color:#84978b;font-size:12px}.clue-question{font-size:30px;font-weight:800;height:47px;color:#a5b9ad;display:grid;place-items:center}.clue-note{display:block;font-size:12px;line-height:1.3;color:#527765;margin-top:6px}.hint-meter{padding:9px 13px;width:min(410px,100%)}#resultText:empty{display:none}#result .result-bottom{gap:6px}@media(max-width:720px){#result{padding:12px 12px 15px}.result-topline{gap:10px;justify-content:space-between}.used-recipe{gap:4px}.used-recipe>small{font-size:11px;max-width:48px}.result-topline .badge{font-size:12px;padding:5px 9px;white-space:normal}.result-heading h2{font-size:24px}.clue-card .vessel{width:42px;height:39px}.clue-question{height:39px}.clue-card b{font-size:12px}.clue-card{padding:3px}.clue-cards{gap:6px}.visual-clues{margin-top:6px}.hint-meter{padding:7px 10px}#result .reveal-stage{max-height:280px}}@media(max-height:580px){#result{padding:8px 12px}.clue-card .vessel,.clue-question{height:30px}.clue-card .vessel{width:34px}.clue-note{margin-top:3px}.result-heading h2{font-size:21px}.toy-modes button{padding:3px 22px}#resultText{font-size:12px}.result-topline{gap:8px}#result .primary{padding:7px 20px}.meter-track{height:7px;margin-top:3px}}

.apparatus{touch-action:manipulation}.apparatus.ready-to-mix{cursor:pointer}.apparatus:focus-visible{outline:3px solid #e6b34f;outline-offset:3px;border-radius:22px}.apparatus.ready-to-mix:hover{filter:drop-shadow(0 0 13px #c0ffdfaa)}

/* Align symbols with the product label, including all miniature cards. */
.vessel .symbol{top:63%;line-height:1;display:grid;place-items:center;height:1em}.ingredient.jar .symbol,.vessel.jar .symbol{top:61%}.funny-result #resultBadge{display:flex;align-items:center;gap:7px;background:#ffdbc5!important;color:#953819!important;border:2px solid #eea075;box-shadow:0 3px 0 #d58b5829;font-size:17px;padding:6px 12px;white-space:normal}.broken-vial{width:37px;height:37px;flex-shrink:0}.funny-result #resultText{font-size:14px}.hint-btn:disabled{opacity:.65;cursor:wait}@media(max-width:720px){.funny-result #resultBadge{font-size:13px;padding:5px 7px;gap:4px}.broken-vial{width:29px;height:29px}}

/* Illustrated opening screen. */
#intro{isolation:isolate;width:min(520px,calc(100vw - 24px));height:min(790px,calc(100dvh - 24px));max-height:none;padding:0;overflow:hidden;border:2px solid #b4f4d6;border-radius:30px;background:#125956;box-shadow:0 25px 90px #052d3980;color:#fff}.intro-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 45%;z-index:-3}.intro-shade{position:absolute;inset:0;background:linear-gradient(#063d5266,transparent 25%,transparent 57%,#073f43d9 78%,#063c40 100%);z-index:-2}#intro .intro-logo{position:absolute;top:12px;left:50%;transform:translateX(-50%);width:min(66%,350px);height:auto;margin:0;filter:drop-shadow(0 5px 5px #123b4d50)}#intro .dialog-close{z-index:3;background:#f4fff2dc;color:#1d635e;left:14px;top:14px;width:35px;height:35px;font-size:24px;border:1px solid #fff9}.intro-collect{position:absolute;right:18px;top:28%;background:#fff3c6;color:#73501f;font-size:13px;font-weight:800;padding:7px 13px;border:1px solid #fff8;border-radius:30px;box-shadow:0 4px 12px #27413628;transform:rotate(5deg)}.intro-welcome{position:absolute;bottom:23px;left:20px;right:20px;text-align:center}#intro h2{font-size:clamp(24px,4vw,32px);margin:0 0 14px;color:#fff9d9;text-shadow:0 2px 8px #062c3c}#intro #startBtn{display:block;width:min(350px,90%);margin:0 auto;background:linear-gradient(#b2f0ba,#75d4a0);color:#174b40;border:2px solid #d9ffe1;border-radius:19px;box-shadow:0 6px 0 #358c70,0 10px 24px #052d3c65;font-size:24px;font-weight:900;padding:13px 15px;transition:filter .2s,transform .2s}#intro #startBtn:hover{filter:brightness(1.07);transform:translateY(-2px)}#intro #startBtn:active{transform:translateY(3px)}#intro .intro-welcome p{font-size:15px;line-height:1.4;margin:18px 0 3px;color:#e3fff0}.intro-small{font-size:13px;color:#bee1d5}@media(max-width:480px){#intro{border-radius:24px}.intro-welcome{left:10px;right:10px;bottom:20px}#intro .intro-logo{top:20px;width:76%}#intro .dialog-close{left:9px;top:9px;width:30px;height:30px}.intro-collect{font-size:12px;right:12px;top:27%;padding:6px 10px}#intro #startBtn{font-size:22px;padding:11px 14px}#intro .intro-welcome p{font-size:13px}.intro-small{font-size:12px}#intro h2{font-size:24px;margin-bottom:10px}}@media(max-height:600px){#intro{width:min(460px,calc(100vw - 20px))}#intro .intro-logo{width:48%;top:8px}.intro-welcome{bottom:12px}#intro h2{font-size:21px;margin-bottom:8px}#intro #startBtn{font-size:19px;padding:8px 15px}#intro .intro-welcome p{margin-top:12px;font-size:12px}.intro-small{display:none}.intro-collect{top:23%;font-size:11px}}
/* Show more of the unchanged opening illustration around the logo and controls. */
#intro .intro-scene{height:84%;width:100%;top:7px;object-fit:contain;object-position:center top;mask-image:linear-gradient(to bottom,#000 0 85%,transparent 100%)}#intro .intro-logo{width:min(54%,290px);top:10px}#intro .intro-shade{background:linear-gradient(#063d5220,transparent 30%,transparent 65%,#073f43aa 84%,#063c40 100%)}#intro{background:#075354}#intro .intro-collect{top:23%;right:15px}@media(max-width:480px){#intro .intro-scene{height:83%;top:22px}#intro .intro-logo{width:64%;top:12px}#intro .intro-collect{top:25%;font-size:11px}}@media(max-height:600px){#intro .intro-scene{height:79%;top:0}#intro .intro-logo{width:42%;top:6px}}
/* Broader blender silhouette; its liquid clipping scales with the same apparatus. */
.apparatus{aspect-ratio:650/800}
#intro .intro-scene{width:100%;height:87%;top:25px;object-fit:fill;object-position:center;mask-image:linear-gradient(to bottom,#000 0 86%,transparent 100%)}
#intro .intro-collect{top:26%;right:20px;transform:rotate(14deg);font-size:18px;font-weight:900;padding:12px 17px;border:3px double #c3933f;border-radius:12px;background:#fff0bd;color:#76501b;box-shadow:0 4px 0 #9a642b55,0 7px 18px #123b4d30;letter-spacing:-.3px}
@media(max-width:480px){#intro .intro-scene{width:100%;height:86%;top:30px}#intro .intro-collect{top:26%;right:13px;font-size:15px;padding:10px 12px;transform:rotate(15deg)}}
@media(max-height:600px){#intro .intro-scene{height:84%;top:12px}#intro .intro-collect{font-size:13px;padding:8px 10px;top:24%}}
#intro .intro-collect{top:20%}@media(max-width:480px){#intro .intro-collect{top:21%}}@media(max-height:600px){#intro .intro-collect{top:20%}}

/* Lower the illustration without changing its width; collection seal follows the heading. */
#intro .intro-scene{height:94%}
#intro .intro-collect{top:auto;bottom:calc(100% + 18px);right:0;width:112px;height:112px;padding:12px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:5px double #a77a29;border-radius:50%;outline:2px dashed #ffe9a3;outline-offset:-10px;background:radial-gradient(circle,#fff6d4 35%,#f7d981 100%);color:#77511d;transform:rotate(15deg);font-size:15px;line-height:1.2;box-shadow:0 4px 0 #76521e55,0 5px 15px #062c3c44;letter-spacing:0;pointer-events:none}
#intro .intro-collect span{white-space:nowrap}
#intro .intro-collect strong{font-size:23px}
@media(max-width:480px){#intro .intro-scene{height:93%}#intro .intro-collect{top:auto;right:1px;bottom:calc(100% + 15px);width:94px;height:94px;font-size:12px;padding:10px 3px}#intro .intro-collect strong{font-size:21px}}
@media(max-height:600px){#intro .intro-scene{height:91%}#intro .intro-collect{top:auto;bottom:calc(100% + 12px);width:80px;height:80px;font-size:10px;padding:8px 3px}#intro .intro-collect strong{font-size:18px}}

/* Illustrated collection stamp and a further 30px of vertical artwork. */
#intro .intro-scene{height:calc(94% + 30px)}
#intro img.intro-collect{width:148px;height:148px;padding:0;border:0;outline:0;border-radius:0;background:none;box-shadow:none;object-fit:contain;filter:drop-shadow(0 5px 7px #042f4055);right:0;bottom:calc(100% + 15px);top:auto}
@media(max-width:480px){#intro .intro-scene{height:calc(93% + 30px)}#intro img.intro-collect{width:124px;height:124px;right:0;bottom:calc(100% + 13px)}}
@media(max-height:600px){#intro .intro-scene{height:calc(91% + 30px)}#intro img.intro-collect{width:105px;height:105px;bottom:calc(100% + 10px)}}

/* Home, shared progress reset and celebration. */
#helpBtn{display:grid;place-items:center}
.reset-footer{margin-top:90px;padding:24px 0 10px;text-align:center;border-top:1px solid #315c4315}.reset-progress{font:inherit;font-size:12px;background:none;border:0;color:#6c8077;text-decoration:underline;padding:8px 14px;cursor:pointer}
#reset{max-width:430px;text-align:center}#reset p{line-height:1.7}#reset .primary{background:#af3d39;color:white}#reset .secondary{color:#254d45;background:#edf5ee}
#victory{isolation:isolate;position:fixed;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:hidden;border:2px solid #ffe7a0;background:radial-gradient(ellipse at 50% 35%,#287d77,#104d57 60%,#082f40);color:#fff8d7;text-align:center;padding:30px 25px;border-radius:32px;box-shadow:0 0 75px #55edbd55}
#victory .victory-rays{position:absolute;inset:-70%;z-index:-1;opacity:.16;background:repeating-conic-gradient(from 0deg,#ffe89e 0deg 8deg,transparent 8deg 23deg);animation:victorySpin 50s linear infinite}
#victory .trophy{font-size:clamp(65px,12vh,115px);line-height:1.15;filter:drop-shadow(0 0 23px #ffe87b88)}#victory .eyebrow{color:#ffe49a;letter-spacing:2px}#victory h2{font-size:clamp(28px,5vw,48px);color:#fff5b9;margin:8px 0;text-shadow:0 3px 0 #7b6128}#victory p{color:#dcfff0;margin:8px 0 12px}
#victory .victory-toys{display:flex;align-items:center;justify-content:center;gap:5px;margin:10px auto 20px;height:clamp(90px,20vh,165px)}#victory .victory-toys img{width:30%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 8px #032f3e88);animation:happySquishy 1s ease-in-out infinite}#victory .victory-toys img:nth-child(2){animation-delay:-.33s}#victory .victory-toys img:nth-child(3){animation-delay:-.66s}
#victory .primary{background:linear-gradient(#fff0a0,#e6b845);color:#3a4829}#victory .secondary{background:#e4fff0;color:#19594b}#victory .text-btn{display:block;margin:15px auto 0;color:#e4f8ee}#victory .dialog-close{z-index:4}
@keyframes happySquishy{0%,100%{transform:translateY(4px) scale(1.06,.94)}50%{transform:translateY(-14px) rotate(5deg) scale(.96,1.04)}}@keyframes victorySpin{to{transform:rotate(360deg)}}
@media(max-height:600px){#victory{padding:12px 20px}#victory .trophy{font-size:55px}#victory h2{font-size:27px}#victory .victory-toys{height:80px;margin:7px auto}#victory .text-btn{margin-top:6px}#victory p{font-size:13px}}
@media(prefers-reduced-motion:reduce){#victory .victory-rays,#victory .victory-toys img{animation:none}}

#victory #resetBtn,#victory .more-squishy-games{display:block;width:min(340px,100%);box-sizing:border-box;margin:14px auto 0;padding:12px 20px;border-radius:16px;font:inherit;font-size:20px;font-weight:800;line-height:1.25;text-decoration:none;cursor:pointer;transition:filter .15s,transform .15s}#victory #resetBtn{color:#154e43;background:linear-gradient(#b7f4ce,#77d9ab);border:2px solid #dcffe9;box-shadow:0 4px 0 #26806a}#victory .more-squishy-games{color:#fff3cf;background:linear-gradient(#396f91,#285574);border:2px solid #8fc7ce;box-shadow:0 4px 0 #133c53}#victory #resetBtn:hover,#victory .more-squishy-games:hover{filter:brightness(1.12);transform:translateY(-1px)}@media(max-height:700px){#victory{padding:14px 20px}#victory .trophy{font-size:56px}#victory .victory-toys{height:75px;margin:6px auto 10px}#victory #resetBtn,#victory .more-squishy-games{font-size:18px;padding:9px 16px;margin-top:10px}}

#victory .victory-toys{gap:0;width:100%}#victory .victory-toys img{width:20%;min-width:0}#victory .victory-toys img:nth-child(2){animation-delay:-.2s}#victory .victory-toys img:nth-child(3){animation-delay:-.4s}#victory .victory-toys img:nth-child(4){animation-delay:-.6s}#victory .victory-toys img:nth-child(5){animation-delay:-.8s}
#intro .home-reset-btn{display:block;margin:14px auto 0;padding:9px 22px;border:1px solid #d4ffdf;border-radius:12px;background:#164b49;color:#fff0c4;font:inherit;font-size:16px;font-weight:700;cursor:pointer}#intro .home-reset-btn[hidden]{display:none}#intro .home-reset-btn:hover{background:#21665e}

#result .clue-note,#hintCard .clue-note{font-size:17px;line-height:1.4;font-weight:800;margin-top:8px}.hint-btn:disabled{cursor:default;opacity:.65}

#hintBtn{display:inline-flex;direction:rtl;align-items:center;justify-content:center;gap:9px}#hintBtn .ad-play{direction:ltr;display:inline-block;font-size:18px}#hintBtn .ad-caption{font-size:12px;opacity:.8}

#result .clue-note,#hintCard .clue-note{color:#a33d12;font-weight:900;background:#fff0c2;border-radius:9px;padding:6px 10px;display:block}#result.funny-result .result-heading #resultText{margin:8px auto 0;max-width:590px;color:#973c22;font-size:15px;font-weight:700;line-height:1.45}#result.funny-result .result-heading{flex-shrink:0}@media(max-height:600px){#result.funny-result .result-heading #resultText{font-size:12px;line-height:1.25;margin-top:4px}}

/* Keep the experiment-ad control on the same centerline as the blender. */
.game>footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.game>footer>.stamp{grid-column:1;grid-row:1;justify-self:start}
.game>footer>#hintBtn{grid-column:2;grid-row:1;justify-self:center}
.game>footer>.footer-note{grid-column:3;grid-row:1;justify-self:end}
@media(max-width:600px){.game>footer{grid-template-columns:1fr;gap:12px}.game>footer>#hintBtn{grid-column:1;grid-row:1}.game>footer>.stamp{grid-column:1;grid-row:2}}

.saved-hints-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:24px 0}.saved-hint{border:1px solid #bcdccb;border-radius:20px;background:linear-gradient(#fffdf1,#e9f9ef);padding:16px 12px;color:#24574c;font:inherit;cursor:pointer;text-align:center;box-shadow:0 4px 0 #b8d6c64d}.saved-hint:hover{border-color:#3e9d80;background:#f4ffea}.saved-hint-label{display:block;font-weight:800;margin-bottom:12px}.saved-hint-action{display:block;margin-top:14px;font-size:14px;font-weight:700;color:#247958}.empty-hints{grid-column:1/-1;text-align:center;padding:55px 15px;color:#476c61;font-size:20px;line-height:1.6}#hintsCount{background:#d4eedf;border-radius:20px;padding:2px 7px}.saved-hint .clue-cards{display:flex;justify-content:center}.saved-hint .clue-card{flex:1;min-width:0}.saved-hint .clue-card b{white-space:normal}@media(max-width:480px){.saved-hints-grid{grid-template-columns:1fr}.game header nav{flex-wrap:wrap;justify-content:center;gap:6px}.empty-hints{font-size:18px}}

article.saved-hint{cursor:default}article.saved-hint:hover{border-color:#bcdccb;background:linear-gradient(#fffdf1,#e9f9ef)}

/* Keep the laboratory composition compact on wide displays. */
body{background:#194e53}
.game{width:100%;max-width:800px;margin-inline:auto;box-shadow:0 0 60px #082e3540}

/* Mobile workbench: controls on the left, blender on the right. */
@media(max-width:720px){
 .game>header>.brand{display:none}
 .game>header{padding:8px 10px}
 .lab .mixing-area{display:grid;direction:ltr;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);column-gap:10px;row-gap:6px;align-items:center;width:100%;max-width:520px;justify-self:center}
 .mixing-area .experiment-label{position:static;grid-column:2;grid-row:1;justify-self:center;margin:0;padding:3px 12px;direction:rtl}
 .mixing-area .apparatus{grid-column:2;grid-row:2;justify-self:center;height:auto;width:100%!important;max-width:180px;aspect-ratio:650/800}
 .mixing-area .mix-controls{grid-column:1;grid-row:2;direction:rtl;min-width:0;margin:0}
 .mix-controls .slots{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0 0 12px}
 .mix-controls .slot{width:100%;height:54px;min-width:0;padding:2px;border-radius:11px}
 .mix-controls .slot .vessel{width:100%;height:46px;max-width:48px}
 .mix-controls .slot .vessel .symbol{font-size:12px}
 .mix-controls .action-row{display:flex;gap:5px;align-items:stretch}
 .mix-controls #mixBtn{flex:1;min-width:0;padding:12px 4px;font-size:15px;line-height:1.2;border-radius:12px}
 .mix-controls #clearBtn{flex:0 0 36px;width:36px;min-height:44px;font-size:25px;border-radius:12px}
 .mix-controls #status{display:block;margin:12px 0 0;padding:5px;font-size:12px;line-height:1.35;min-height:0;overflow-wrap:anywhere}
 .mixing-area .known-result{position:static;grid-column:1;grid-row:1;justify-self:center;display:flex;align-items:center;gap:5px;width:auto;max-width:100%;padding:3px 7px;border-radius:10px;direction:rtl}
 .mixing-area .known-result>div,.mixing-area .known-result img,.mixing-area .known-result .accident-effect{width:30px;height:30px;font-size:24px;flex-shrink:0}
 .mixing-area .known-result>span{font-size:10px}
}

/* One continuous background, including the footer, with no image tiling. */
.game{background-color:#246a6e;background-image:linear-gradient(#16494c30,#174e4e15),url('art/lab.webp');background-position:center top;background-size:cover;background-repeat:no-repeat}
/* Desktop sizing follows the capped workbench, even on very wide monitors. */
@media(min-width:721px){
 .game>header{padding:7px 16px;gap:10px;flex-wrap:wrap;justify-content:center}
 .game>header nav{gap:5px;flex-wrap:wrap;justify-content:center}
 .game>header .game-logo{width:192px;height:82px}
 .game>header .nav-btn{padding:9px 10px;font-size:14px}
 .game .lab{grid-template-columns:minmax(0,1fr) minmax(230px,1fr) minmax(0,1fr);gap:18px;padding:30px 18px 0}
 .game .apparatus{height:310px}
 .game .cabinet{border-width:7px}
 .game .shelf-grid{padding-top:8px}
 .game .ingredient>.vessel{height:92px}
 .game .ingredient-label{font-size:13px;padding:2px 4px}
}

/* The mobile recipe preview never participates in grid sizing. */
@media(max-width:720px){
 .mixing-area .known-result{position:absolute;grid-column:auto;grid-row:auto;top:0;left:0;right:auto;bottom:auto;width:auto;max-width:calc(52.83% - 5px);min-height:20px;padding:2px 5px;gap:3px;border-radius:7px;box-shadow:0 2px 5px #174d451a;animation:none}
 .mixing-area .known-result>div,.mixing-area .known-result img,.mixing-area .known-result .accident-effect{width:16px;height:16px;font-size:15px;line-height:16px}
 .mixing-area .known-result>span{font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

@media(min-width:721px){
 .mixing-area .known-result{top:145px;width:66px;padding:5px 3px 6px;border-radius:13px}
 .mixing-area .known-result>div{height:48px;font-size:34px}
 .mixing-area .known-result img{width:56px;height:48px}
 .mixing-area .known-result .accident-effect{width:48px;height:48px}
 .mixing-area .known-result>span{font-size:10px;line-height:1.25}
}

/* Continue the turquoise tiled wall underneath the wooden worktop. */
.game::after{content:'';position:absolute;left:0;right:0;bottom:0;height:11%;pointer-events:none;background-color:#48afa5;background-image:linear-gradient(90deg,#246e6c35,transparent 25%,#b4ecbb24 65%,#246e6c25),repeating-linear-gradient(0deg,transparent 0 57px,#1c777b55 58px,#cff4d27a 59px,transparent 61px),repeating-linear-gradient(90deg,transparent 0 77px,#1c777b55 78px,#cff4d27a 79px,transparent 81px);z-index:0}
.game>header,.game>.lab,.game>footer{position:relative;z-index:1}
@media(min-width:721px){
 .game>header{display:flex;flex-direction:column;align-items:stretch;padding:7px 12px 12px}
 .game>header>.brand{justify-content:center}
 .game>header>nav{display:flex;width:100%;flex-wrap:nowrap;gap:7px}
 .game>header>nav>.nav-btn{flex:1;min-width:0;font-size:14px;padding:10px 5px}
 .game>header>nav>.icon-btn{flex:0 0 38px;width:38px}
 .game .lab{gap:12px;padding-inline:12px;grid-template-columns:minmax(0,1fr) minmax(230px,1fr) minmax(0,1fr)}
}

/* Reuse the original wall at identical scale and horizontal alignment. */
.game::after{inset:0;bottom:auto;height:100%;background-color:transparent;background-image:linear-gradient(#16494c30,#174e4e15),url('art/lab.webp');background-size:cover;background-position:center top;background-repeat:no-repeat;transform:translateY(37.109375%);clip-path:inset(51.890625% 0 37.109375%)}
@media(min-width:721px){
 .game>header{flex-direction:row;align-items:center;flex-wrap:nowrap;padding:7px 10px;gap:9px}
 .game>header>.brand{flex:0 0 155px;min-width:0}
 .game>header .game-logo{width:155px;height:66px;max-width:100%}
 .game>header>nav{flex:1;width:auto;min-width:0;gap:5px;flex-wrap:nowrap}
 .game>header>nav>.nav-btn{padding:9px 4px;font-size:13px;white-space:nowrap}
 .game>header>nav>.nav-btn b{padding:3px 5px;margin-right:2px;font-size:12px}
 .game>header>nav>.icon-btn{flex-basis:34px;width:34px;height:36px}
}

/* Compact navigation buttons with clear spacing. */
@media(min-width:721px){
 .game>header>nav{gap:12px;justify-content:center}
 .game>header>nav>.nav-btn{flex:0 1 auto;padding:9px 10px}
}
@media(max-width:720px){
 .game>header>nav{gap:9px;justify-content:center;flex-wrap:wrap}
 .game>header>nav>.nav-btn{flex:0 1 auto;padding:7px 9px}
}

/* The background now contains a continuous tiled wall and hanging vines. */
.game::after{display:none}
.game .cabinet{border-color:#96613c;background:linear-gradient(90deg,#41200d20,transparent 12%,transparent 88%,#41200d20);box-shadow:inset 2px 0 0 #e8ba78,inset -2px 0 0 #5d351f,0 8px 13px #173d3c45,0 2px 0 #e9bb7c;border-radius:14px;border-top-color:#c18b54;border-left-color:#a97544;border-right-color:#81502f;border-bottom-color:#744324}
.game .cabinet h2{background:repeating-linear-gradient(3deg,transparent 0 5px,#fff1b40b 6px,transparent 7px 12px),linear-gradient(#bc8a52,#946239 55%,#774724);border:1px solid #e0b27a;box-shadow:inset 0 2px 0 #f3cc8a70,0 3px 0 #57321e,0 6px 10px #2b352540;text-shadow:0 1px 1px #5d351f}
.game .shelf-grid{background:none}
.game .shelf-grid>.ingredient::before{content:'';position:absolute;pointer-events:none;bottom:0;left:-1px;right:-1px;height:12px;border-top:2px solid #edbf80;border-bottom:3px solid #6b3c21;background:repeating-linear-gradient(2deg,transparent 0 3px,#61321e33 4px,transparent 5px 8px),linear-gradient(#c28a4f,#aa713e 50%,#89532c);box-shadow:0 4px 5px #143d3b44,inset 0 1px 0 #ffdda459}
@media(max-width:720px){.game .shelf-grid>.ingredient::before{height:10px;border-bottom-width:2px}}

/* Wider navigation controls, spaced independently of their contents. */
@media(min-width:721px){
 .game>header>nav{gap:17px}
 .game>header>nav>.nav-btn{padding-inline:13px}
}
@media(max-width:720px){
 .game>header>nav{gap:12px}
 .game>header>nav>.nav-btn{padding-inline:12px}
}
/* Continuous shelves belong to the cabinet, never to the bottles. */
.game .shelf-grid{position:relative;isolation:isolate;background:none}
.game .shelf-grid::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:repeating-linear-gradient(2deg,transparent 0 3px,#62361938 4px,transparent 5px 9px),linear-gradient(to bottom,#efc48b 0 2px,#c39157 2px 5px,#ac733f 5px 10px,#764522 10px 13px,#43271b66 13px 16px,transparent 16px);background-size:100% calc(100% / 3);background-position:0 calc(100% / 3 - 16px);mask-image:repeating-linear-gradient(to bottom,transparent 0 calc(100% / 3 - 16px),#000 calc(100% / 3 - 16px) calc(100% / 3));border-radius:0 0 5px 5px}
.game .shelf-grid>.ingredient::before{display:none}
.game .ingredient:hover:not(:disabled){transform:none}
.game .ingredient>.vessel{transition:transform .2s ease,filter .2s ease}
.game .ingredient:hover:not(:disabled)>.vessel{transform:translateY(-7px);filter:drop-shadow(0 10px 5px #26332845)}
@media(max-width:720px){
 .game .shelf-grid::before{background-size:100% 50%;background-position:0 calc(50% - 16px);mask-image:repeating-linear-gradient(to bottom,transparent 0 calc(50% - 16px),#000 calc(50% - 16px) 50%)}
}
.game .shelf-grid::before{background-image:repeating-linear-gradient(to bottom,transparent 0 calc(100% / 3 - 16px),#efd09c calc(100% / 3 - 16px) calc(100% / 3 - 14px),#cb9659 calc(100% / 3 - 14px) calc(100% / 3 - 11px),#b17a45 calc(100% / 3 - 11px) calc(100% / 3 - 5px),#764522 calc(100% / 3 - 5px) calc(100% / 3 - 2px),#43271b55 calc(100% / 3 - 2px) calc(100% / 3));background-size:100% 100%;background-position:0 0;mask-image:none}
@media(max-width:720px){.game .shelf-grid::before{background-image:repeating-linear-gradient(to bottom,transparent 0 calc(50% - 14px),#efd09c calc(50% - 14px) calc(50% - 12px),#cb9659 calc(50% - 12px) calc(50% - 9px),#b17a45 calc(50% - 9px) calc(50% - 4px),#764522 calc(50% - 4px) calc(50% - 1px),#43271b55 calc(50% - 1px) 50%)}}

/* Only intermediate planks: the cabinet base is the bottom shelf. */
.game .shelf-grid::before{clip-path:inset(0 0 16px)}
@media(min-width:721px){
 .game>header>nav #soundBtn{margin-inline-start:auto}
}
@media(max-width:720px){
 .game>header{padding:8px 6px}
 .game>header>nav{display:flex;flex-wrap:nowrap;gap:4px;width:100%;min-width:0}
 .game>header>nav>.nav-btn{flex:1 1 auto;min-width:0;white-space:nowrap;font-size:11px;padding:9px 4px;letter-spacing:-.25px;border-radius:11px}
 .game>header>nav>.nav-btn b{font-size:10px;padding:2px 3px;margin-right:2px}
 .game>header>nav>.icon-btn{flex:0 0 28px;width:28px;height:34px;font-size:19px;border-radius:10px}
 .game>header>nav #helpBtn svg{width:20px;height:20px}
 .lab .mixing-area{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:6px}
 .mixing-area .mix-controls{padding-left:14px;padding-right:0}
 .mixing-area .apparatus{left:6px}
 .mixing-area .experiment-label{position:relative;left:6px}
 .mixing-area .known-result{left:calc((100% - 6px) * .272727 + 7px);transform:translateX(-50%);max-width:calc(54.54% - 20px)}
 .game .shelf-grid::before{clip-path:inset(0 0 14px)}
}
@media(max-width:350px){
 .game>header>nav{gap:3px}
 .game>header>nav>.nav-btn{font-size:10px;padding-inline:2px}
 .game>header>nav>.nav-btn b{font-size:9px;padding-inline:2px}
 .game>header>nav>.icon-btn{flex-basis:25px;width:25px}
}

/* Center the three desktop navigation buttons independently of the icons. */
@media(min-width:721px){
 .game>header{min-height:80px}
 .game>header>.brand{position:relative;z-index:2}
 .game>header>nav{position:absolute;inset:0;width:100%;height:100%;justify-content:center;gap:17px;pointer-events:none}
 .game>header>nav>button{pointer-events:auto}
 .game>header>nav #soundBtn{position:absolute;left:49px;top:50%;transform:translateY(-50%);margin:0}
 .game>header>nav #helpBtn{position:absolute;left:10px;top:50%;transform:translateY(-50%);margin:0}
}

/* Three distinct header regions: logo, centered navigation, utility buttons. */
.nav-main{display:contents}
@media(min-width:721px){
 .game>header{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:12px;min-height:80px}
 .game>header>.brand{position:static;flex:0 0 155px;margin:0}
 .game>header>nav{position:static;inset:auto;height:auto;width:auto;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 34px 34px;align-items:center;gap:7px;pointer-events:auto}
 .game>header>nav>.nav-main{display:flex;min-width:0;justify-content:center;align-items:center;gap:14px}
 .game>header>nav>.nav-main>.nav-btn{flex:0 1 auto;min-width:0;white-space:nowrap;font-size:13px;padding:9px 11px}
 .game>header>nav>.nav-main>.nav-btn b{font-size:12px;padding:3px 5px;margin-right:2px}
 .game>header>nav #soundBtn,.game>header>nav #helpBtn{position:static;inset:auto;transform:none;margin:0;width:34px;height:36px}
}
@media(max-width:720px){
 .game>header>nav>.nav-main>.nav-btn{flex:1 1 auto;min-width:0;white-space:nowrap;font-size:11px;padding:9px 4px;letter-spacing:-.25px;border-radius:11px}
 .game>header>nav>.nav-main>.nav-btn b{font-size:10px;padding:2px 3px;margin-right:2px}
}
@media(max-width:350px){
 .game>header>nav>.nav-main>.nav-btn{font-size:10px;padding-inline:2px}
 .game>header>nav>.nav-main>.nav-btn b{font-size:9px;padding-inline:2px}
}
@media(min-width:721px){.game>header>nav>.nav-main{gap:24px}}

/* Original-game sticker stays inside the opening card. */
#intro .intro-original-stamp{position:absolute;left:12px;bottom:10px;width:76px;z-index:4;display:block;line-height:0;filter:drop-shadow(0 2px 3px #043f4540)}
#intro .intro-original-stamp img{display:block;width:100%;height:auto}
#intro .intro-welcome{bottom:65px}
@media(max-height:600px){#intro .intro-original-stamp{width:58px;bottom:7px;left:9px}#intro .intro-welcome{bottom:48px}}

/* Prevent selection and native image dragging on the home screen. */
#intro,#intro *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#intro img{-webkit-user-drag:none}

/* Keep all game UI non-selectable while preserving pointer interactions. */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
img{-webkit-user-drag:none}

/* Keep the original full-background home composition; lower controls slightly. */
#intro .intro-welcome{bottom:40px}
#intro img.intro-collect{bottom:calc(100% - 5px)}
@media(max-width:480px){#intro img.intro-collect{bottom:calc(100% - 7px)}}
@media(max-height:600px){#intro .intro-welcome{bottom:32px}#intro img.intro-collect{bottom:calc(100% - 6px)}}

/* Richer colors on the existing home artwork only. */
#intro .intro-scene{filter:saturate(1.32) contrast(1.08) brightness(1.07)}

/* Only the opening screen is capped and aligned to the viewport top. */
#intro{height:min(635px,calc(100dvh - 15px));max-height:635px;top:15px;bottom:auto;margin:0 auto}

/* Desktop experiment results fit the 650px embed; the laboratory keeps its scrolling layout. */
@media(min-width:721px){
 #result{height:min(635px,calc(100dvh - 15px));max-height:635px;top:15px;bottom:auto;margin:0 auto}
}
