:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#263747;background:#f7f6f2;font-synthesis:none;--accent:#675be7;--muted:#83908f;--line:#e4e7e3}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #9283fa;outline-offset:5px}button{touch-action:manipulation}button svg{width:21px;height:21px}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}.site-header{max-width:1400px;margin:auto;height:104px;padding:0 6%;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#293c42;font-size:20px;font-weight:750;letter-spacing:-.8px}.brand-mark{display:grid;place-items:center;width:31px;height:31px;border-radius:10px;background:#29453f;color:white;font-size:23px;font-weight:800}.brand-end{font-size:13px;font-weight:450;letter-spacing:0;color:#87938b;margin-left:9px}.header-tools{display:flex;align-items:center;gap:15px}.text-button{border:0;background:none;font-size:13px;font-weight:650;padding:10px}.icon-button{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:transparent;font-size:24px}.layout{max-width:1280px;margin:15px auto 35px;padding:0 5%;display:grid;grid-template-columns:280px minmax(350px,570px) 55px;justify-content:center;gap:54px;align-items:center}.eyebrow{font-size:9px;font-weight:750;letter-spacing:1.7px;display:flex;align-items:center;gap:8px;line-height:1.8}.eyebrow i{width:6px;height:6px;border-radius:50%;background:#71b499;flex-shrink:0}.intro h1{position:relative;font-size:91px;line-height:.94;letter-spacing:-7px;font-weight:850;margin:27px 0}.intro h1 span{color:var(--accent)}.intro h1 b{position:absolute;font-size:19px;letter-spacing:0;font-weight:450;top:9px;right:36px}.intro-copy{font-size:18px;line-height:1.7;color:#798382}.intro-rule{width:38px;height:2px;background:#c9d3c9;margin:29px 0}.collection-label{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;font-weight:650;max-width:242px}.collection-label span:last-child{color:var(--accent);letter-spacing:0}.collection-track,.progress-track{height:5px;overflow:hidden;background:#e9eae7;border-radius:5px}.collection-track{margin:13px 0 22px;max-width:242px}.collection-track span,.progress-track span{display:block;height:100%;width:0;background:var(--accent);border-radius:5px;transition:width .3s}.quiet{font-size:12px;line-height:1.8;color:#86918d}.outline-button{border:1px solid #dce1db;border-radius:12px;background:transparent;padding:13px 18px;display:flex;justify-content:space-between;gap:30px;font-size:12px;font-weight:600}.intro .outline-button{margin-top:23px;width:242px}.edition{font-size:8px;letter-spacing:1.8px;color:#a0aaa3;margin-top:40px}.game-card{position:relative;background:#fff;border:1px solid #eef0ec;border-radius:29px;box-shadow:0 16px 55px #37414009,0 2px 5px #28384903;overflow:hidden;width:100%}.game-toolbar{height:66px;padding:20px 25px 8px;display:flex;align-items:center;justify-content:space-between;gap:8px}.level-pill{display:flex;align-items:center;gap:10px;background:#f3f2fb;color:#7063bc;padding:9px 11px;border:0;border-radius:9px;font-size:11px;font-weight:650}.tiny-grid{font-size:17px}.theme-label{font-size:10px;color:#97a09d}.game-toolbar .icon-button{border:0;color:#94a19b}.object-heading{text-align:center;padding:12px 0 0}.object-heading .eyebrow{justify-content:center;color:#9daba4;font-size:8px}.object-heading h2{font-size:23px;font-weight:700;letter-spacing:-.7px;margin:4px 0 0}.board-area{position:relative;aspect-ratio:520/500;isolation:isolate;margin:0 12px}.board-area::before{content:"";position:absolute;inset:8%;z-index:-2;background-image:radial-gradient(#d9e0df 1px,transparent 1px);background-size:20px 20px;mask-image:radial-gradient(ellipse,#000 30%,transparent 70%)}.ambient{position:absolute;width:55%;height:55%;border-radius:50%;filter:blur(44px);opacity:.10;z-index:-1;pointer-events:none}.ambient-a{left:5%;top:10%;background:#a299ef}.ambient-b{right:0;bottom:15%;background:#ffc367}.board-shadow{position:absolute;bottom:9%;left:23%;width:54%;height:22px;background:#202c3722;filter:blur(14px);border-radius:50%;z-index:-1}#board{width:100%;height:100%;overflow:visible;touch-action:manipulation;user-select:none}.piece{cursor:pointer;outline:none;transform-box:fill-box;transform-origin:center}.piece .piece-front{transition:filter .16s}.piece:hover .piece-front{filter:brightness(1.07)}.piece:focus-visible .piece-front,.piece.suggested .piece-front{stroke:#fff;stroke-width:4;filter:drop-shadow(0 0 7px #7e65ee)}.piece.blocked{animation:nudge .25s}.piece.obstacle .piece-front{filter:brightness(1.3);stroke:#fb5168;stroke-width:3}.piece.removing{pointer-events:none;animation:extract .42s cubic-bezier(.4,0,.8,.5) forwards}.piece.removing .piece-arrow{opacity:.6}.board-message{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:#fffffff2;border-radius:20px;padding:25px}.board-message h3{font-size:18px}.board-message p{font-size:13px;color:#7b8781;max-width:260px;line-height:1.7}.loader{width:32px;height:32px;border:3px solid #ebe8fa;border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}.board-message.error .loader{display:none}.game-bottom{padding:0 28px 20px}.layer-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.layer-tabs{display:flex;gap:10px}.layer-tab{font-size:10px;color:#a9b0ac;display:flex;gap:5px;align-items:center}.layer-tab i{width:6px;height:6px;border-radius:50%;background:#dddeda}.layer-tab.active{color:var(--accent);font-weight:700}.layer-tab.active i{background:var(--accent);box-shadow:0 0 0 3px #edeafb}.layer-tab.done i{background:#71b499}#piece-count{font-size:10px;color:#8d9791;white-space:nowrap}.progress-track{height:4px;background:#efedf7}.play-hint{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px;min-height:28px}#hint-text{font-size:10px;color:#8e9992;line-height:1.6}.hint-button{border:0;border-radius:9px;background:#f6f5fb;display:flex;gap:5px;align-items:center;padding:8px 10px;color:#776aaa;font-size:10px;white-space:nowrap}.hint-button>span:first-child{font-size:17px}.right-rail{align-self:stretch;display:flex;align-items:center;flex-direction:column;gap:40px;padding-top:30px}.rail-badge{font-size:10px;color:#a8b0a9;white-space:nowrap}.rail-text{writing-mode:vertical-rl;font-size:9px;letter-spacing:3px;color:#a1aca4}.color-dots{display:flex;flex-direction:column;gap:8px;margin-top:auto;margin-bottom:25px}.color-dots i{width:7px;height:7px;border-radius:50%;background:#ef957b}.color-dots i:nth-child(2){background:#f0cd67}.color-dots i:nth-child(3){background:#80c7c3}.color-dots i:nth-child(4){background:#a595dd}footer{max-width:1200px;margin:0 auto;padding:0 5% 20px;display:flex;justify-content:space-between;gap:12px;font-size:9px;color:#a0aaa4}#save-status{color:#a47c49}.layer-toast{position:absolute;left:50%;bottom:10%;transform:translate(-50%,10px);background:#273a49e8;color:white;border-radius:30px;font-size:12px;padding:10px 20px;opacity:0;transition:.25s;pointer-events:none;white-space:nowrap}.layer-toast.visible{opacity:1;transform:translate(-50%,0)}#particles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.spark{position:absolute;width:7px;height:7px;border-radius:2px;animation:spark .65s ease-out forwards}dialog{border:1px solid #eceeea;border-radius:24px;padding:30px;color:#293a45;background:#fffeFC;max-width:min(540px,calc(100vw - 28px));width:100%;max-height:85dvh;box-shadow:0 30px 100px #24314030}dialog::backdrop{background:#21314155;backdrop-filter:blur(6px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px}dialog h2{margin:8px 0 20px;font-size:28px;letter-spacing:-1px}.dialog-head .icon-button{align-self:flex-start}#theme-picker{display:flex;gap:6px;overflow:auto;padding:5px 0 16px}.theme-button{white-space:nowrap;border:1px solid var(--line);background:white;border-radius:20px;padding:9px 12px;font-size:11px}.theme-button.active{background:#eeebff;color:var(--accent);border-color:#cfc7fd}#level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.level-choice{aspect-ratio:1;border:1px solid #e5e6e4;border-radius:13px;background:#fff;font-size:18px;position:relative}.level-choice small{position:absolute;bottom:5px;right:7px;font-size:10px;color:#83ad97}.level-choice.current{border-color:var(--accent);background:#f0edff;color:var(--accent)}.level-choice.completed{background:#f0f7f3}.primary-button{border:0;background:var(--accent);color:#fff;padding:16px 22px;border-radius:13px;font-size:13px;font-weight:650;display:flex;align-items:center;justify-content:center;gap:30px;box-shadow:0 5px 14px #6b5ae322}.primary-button:hover{filter:brightness(1.07)}#complete-dialog{text-align:center;max-width:380px;padding:32px}#complete-dialog .eyebrow{display:block;font-size:8px}#complete-dialog h2{margin:10px 0;font-size:36px}#complete-dialog p{color:#85918c;font-size:13px;line-height:1.8;margin-bottom:23px}#complete-dialog .primary-button{width:100%;margin-bottom:12px}.reward-art{margin:0 auto 25px;width:105px;height:105px;background:linear-gradient(140deg,#a798ff,#6556d8);border:7px solid #e5dfff;border-radius:28px;box-shadow:0 9px 0 #5347a5,0 18px 30px #6e5ad42a;transform:rotate(-8deg);display:grid;place-items:center}.reward-art span{font-size:68px;color:#fff6c9;text-shadow:0 3px 0 #ffbe69}.dialog-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}#restart-dialog p{font-size:14px;line-height:1.7;color:#849089}.enter-board{animation:enter .4s ease-out}@keyframes extract{to{transform:translate(var(--tx),var(--ty)) rotate(var(--rot));opacity:0}}@keyframes nudge{25%{transform:translate(var(--nx),var(--ny))}75%{transform:translate(calc(var(--nx) * -0.4),calc(var(--ny) * -0.4))}}@keyframes spark{to{transform:translate(var(--sx),var(--sy)) rotate(130deg);opacity:0}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1400px){.layout{margin-top:35px}.game-card{max-width:570px}}
@media(max-width:1050px){.layout{grid-template-columns:230px minmax(320px,520px);gap:30px}.right-rail{display:none}.intro h1{font-size:78px}.intro h1 b{right:23px}.intro .outline-button,.collection-track,.collection-label{max-width:215px}.eyebrow{font-size:8px}.intro-copy{font-size:16px}}
@media(max-width:720px){.site-header{height:65px;padding:0 22px}.brand{font-size:18px}.brand-end{display:none}.layout{display:block;padding:0 14px;margin:3px auto 20px;max-width:510px}.intro{display:none}.game-card{border-radius:22px}.game-toolbar{padding:14px 16px 5px;height:55px}.object-heading{padding-top:8px}.object-heading h2{font-size:22px}.board-area{margin:0 4px;aspect-ratio:520/535}.game-bottom{padding:0 18px 17px}.layer-tabs{gap:9px}.layer-tab{font-size:9px}.play-hint{margin-top:12px}.theme-label{font-size:9px}.game-toolbar .icon-button{width:32px;height:32px}footer{padding:0 24px 18px;flex-wrap:wrap}footer>span:nth-child(2){display:none}.dialog-actions{flex-direction:column}.dialog-actions button{justify-content:center}.brand-mark{width:29px;height:29px}#hint-text{max-width:210px}.header-tools{gap:9px}}
@media(max-width:380px){.board-area{aspect-ratio:520/550}.game-bottom{padding:0 13px 14px}.theme-label{max-width:100px;text-align:center}.layer-tabs{gap:6px}.layer-tab{font-size:8px}#piece-count{font-size:9px}.play-hint{gap:4px}#hint-text{font-size:9px}.object-heading h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition:none!important}.piece.removing{opacity:0}}

.difficulty{display:flex;justify-content:center;align-items:center;gap:9px;font-size:9px;color:#939c98;margin-top:8px;min-height:13px}#difficulty-dots{color:var(--accent);letter-spacing:2px;font-size:10px}#board-scroll{position:absolute;inset:0;overflow:hidden;border-radius:16px}

/* Compact play layout */
.site-header{position:relative}.game-brand{position:absolute;left:50%;transform:translateX(-50%);font-size:29px;font-weight:850;letter-spacing:-1.4px;color:#263747;text-decoration:none;white-space:nowrap}.game-brand span{color:var(--accent)}.layout{grid-template-columns:minmax(350px,650px) 30px;gap:25px;max-width:850px;margin-top:10px}.game-card{max-width:650px}.toolbar-collection{display:grid;grid-template-columns:auto auto;gap:4px 10px;align-items:center;font-size:8px;letter-spacing:1px;color:#909b94}.toolbar-collection strong{font-size:11px;letter-spacing:0;color:var(--accent)}.toolbar-collection .collection-track{grid-column:1/-1;margin:0;height:3px;max-width:none}#board-content{width:100%;height:100%;position:relative;min-width:100%}.underlayer{opacity:.66;filter:saturate(.8) brightness(.94)}.under-piece{pointer-events:none}.release-ring{position:absolute;width:18px;height:18px;margin:-9px;border:2px solid var(--glow);border-radius:50%;box-shadow:0 0 16px var(--glow),inset 0 0 12px #fff;animation:release-ring .6s ease-out forwards}.release-star{position:absolute;font-size:16px;line-height:1;margin:-8px;text-shadow:0 0 8px currentColor,0 0 15px #fff;animation:twinkle-out .8s ease-out forwards}.layer-star{font-size:22px}.piece.removing .piece-front{filter:brightness(1.28) drop-shadow(0 0 6px #fff6c7)}.piece.newly-free .piece-front{animation:available-glow .9s ease-out}.piece.removing .piece-arrow{filter:drop-shadow(0 0 4px white)}
@keyframes release-ring{to{transform:scale(4);opacity:0}}@keyframes twinkle-out{0%{transform:scale(.3);opacity:0}20%{opacity:1}55%{filter:brightness(1.7)}100%{transform:translate(var(--sx),var(--sy)) scale(.1) rotate(80deg);opacity:0}}@keyframes available-glow{0%,65%{filter:brightness(1.35) drop-shadow(0 0 5px #fff1b6)}30%,100%{filter:brightness(1)}}
@media(max-width:1050px){.layout{grid-template-columns:minmax(320px,600px);max-width:720px}}@media(max-width:720px){.layout{display:block;max-width:510px}.game-brand{font-size:21px;letter-spacing:-1px}.brand{font-size:0;gap:0}.brand-mark{font-size:23px}.toolbar-collection{font-size:7px;gap:4px 6px}.toolbar-collection strong{font-size:10px}.layer-tabs{gap:7px}.layer-tab.active{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.release-ring,.release-star{display:none}.piece.newly-free .piece-front{animation:none}}

#complete-dialog[open] .reward-art{animation:reward-shine 2s ease-in-out infinite}.reward-art::after{content:'✧';position:absolute;right:-18px;top:-13px;font-size:40px;color:#efd480;text-shadow:0 0 12px #fff2b4}@keyframes reward-shine{50%{filter:brightness(1.15) drop-shadow(0 0 10px #c6b5fa)}}@media(prefers-reduced-motion:reduce){#complete-dialog[open] .reward-art{animation:none}}

.piece.covered-piece .piece-front{filter:saturate(.72) brightness(.9)}.piece.covered-piece .piece-arrow{opacity:.45}.piece.covered-piece.obstacle .piece-front{stroke:#fb5168;stroke-width:3;filter:brightness(1.2)}

.icon-button.close-dialog{padding:0;flex-shrink:0;line-height:1}.icon-button.close-dialog svg{display:block;width:20px;height:20px}

.level-pill{line-height:1}.level-pill .level-chevron{display:block;width:14px;height:14px;flex-shrink:0}

/* Shared shell placement and fullscreen canvas. */
.take-shell{width:min(100%,694px);padding:0 22px;margin:0 auto;min-height:100svh}.take-shell .layout{display:block;padding:0;margin:0;max-width:none}.take-shell .game-card{max-width:none}.take-shell .wp-footer{max-width:none;margin:0}.take-shell .wp-save-note{color:#728784}.take-shell .wp-heading{padding:25px 0 21px}#about-dialog p{font-size:14px;line-height:1.7;color:#728784}#fullscreen-exit{position:fixed;z-index:9;right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));width:38px;height:38px;padding:8px;background:#e4efe9ed;border:1px solid #aac9ba;border-radius:10px;color:#204c46}body.game-focused{overflow:hidden}body.game-focused .take-shell{position:fixed;inset:0;width:100%;height:100dvh;min-height:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}body.game-focused .wp-topbar,body.game-focused .wp-heading,body.game-focused .wp-footer,body.game-focused .wp-save-note{display:none}body.game-focused .layout{height:100%}body.game-focused .game-card{height:100%;border:0;border-radius:0;display:flex;flex-direction:column}body.game-focused .game-toolbar{padding-right:62px;height:52px;flex-shrink:0}body.game-focused .object-heading{display:none}body.game-focused .board-area{flex:1;min-height:0;aspect-ratio:auto;margin:0}body.game-focused .game-bottom{flex-shrink:0;padding:8px 22px}body.game-focused #board-content{display:flex;justify-content:center}body.game-focused #board{max-width:100%}.core-orbit{transform-origin:0 0;animation:core-spin 18s linear infinite}.core-gem{animation:core-float 3s ease-in-out infinite}.core-glint{animation:core-glimmer 2.4s ease-in-out infinite}.core-aura{animation:core-glow 3s ease-in-out infinite}.crystal-core.revealed .core-aura{opacity:1;filter:brightness(1.5)}@keyframes core-spin{to{transform:rotate(360deg)}}@keyframes core-float{50%{transform:translateY(-4px)}}@keyframes core-glimmer{0%,100%{opacity:.4}50%{opacity:1;filter:drop-shadow(0 0 4px white)}}@keyframes core-glow{50%{opacity:.5}}@media(max-width:699px){.take-shell{padding:0 12px}.take-shell .wp-heading{padding:8px 0}}@media(prefers-reduced-motion:reduce){.core-orbit,.core-gem,.core-glint,.core-aura{animation:none}}

.assembly-preview{height:155px;display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 25px 0;border-bottom:1px solid #f0f0f5;background:radial-gradient(ellipse at 35% 75%,#f1edff,transparent 65%)}#model-slot{width:240px;height:150px;position:relative}#model-slot::before{content:'';position:absolute;bottom:10px;left:22%;width:56%;height:15px;border-radius:50%;background:#55477822;filter:blur(8px)}.assembly-info{display:flex;flex-direction:column;gap:9px;max-width:125px}.assembly-info span{font-size:8px;letter-spacing:1px;color:#8d9791}.assembly-info strong{font-size:22px;color:var(--accent)}#assembly-status{letter-spacing:0;font-size:9px;line-height:1.5}.assembly-canvas{width:100%;height:100%;display:block;position:relative;touch-action:pan-y;cursor:grab}#complete-model-slot{height:230px;width:100%;margin-bottom:16px}.board-area{height:450px;aspect-ratio:auto}.exit-bar{position:absolute;display:block;border-radius:8px;z-index:1;pointer-events:none;box-shadow:0 0 10px currentColor;opacity:1}.exit-top,.exit-bottom{height:6px;left:20%;right:20%}.exit-top{top:4px;background:#386de8;color:#386de8}.exit-bottom{bottom:5px;background:#f5bc24;color:#f5bc24}.exit-left,.exit-right{width:6px;top:20%;bottom:20%}.exit-left{left:5px;background:#28b65e;color:#28b65e}.exit-right{right:5px;background:#f15b40;color:#f15b40}.game-bottom{padding-top:12px}body.game-focused .assembly-preview{height:100px;flex-shrink:0;margin-top:0}body.game-focused #model-slot{height:95px;width:190px}@media(max-width:720px){.assembly-preview{height:115px;margin:5px 16px 0}#model-slot{height:110px;width:175px}.board-area{height:350px;aspect-ratio:auto}.assembly-info strong{font-size:19px}.exit-bar{box-shadow:none}.assembly-info span{font-size:7px}}@media(max-height:600px) and (orientation:landscape){body.game-focused .assembly-preview{position:absolute;left:12px;top:60px;width:175px;height:130px;z-index:2;pointer-events:none;border:0;background:none}body.game-focused .assembly-info{display:none}}

.assembly-canvas{position:absolute;inset:0}#complete-model-slot{position:relative}

/* Model assembles beneath the puzzle, in the same scrolling coordinate space. */
.take-shell .wp-topbar{margin-bottom:20px;gap:14px}
.header-game-title{margin:0 auto 0 0;font-size:20px;line-height:1.2;letter-spacing:-.7px;white-space:nowrap;color:#183b43}
#sound{flex-direction:row;gap:4px;line-height:1}
#sound .sound-note{font-size:22px;line-height:22px}
#sound .sound-state{font-size:8px;line-height:12px;font-weight:600}
.board-area{height:560px;margin:16px 12px 0}
#board-content{isolation:isolate}
#model-slot,body.game-focused #model-slot{position:absolute;left:18%;top:20%;width:64%;height:60%;z-index:0}
#model-slot::before{display:none}
#model-slot .assembly-canvas{filter:grayscale(1);opacity:.16}
#board{position:relative;z-index:1;pointer-events:none}
#board .piece{pointer-events:auto}
.underlayer{opacity:1}
#board .under-piece{pointer-events:none}
.exit-top,.exit-bottom{left:16px;right:16px}
.exit-left,.exit-right{top:16px;bottom:16px}
.assembly-info{display:flex;flex-direction:row;align-items:center;justify-content:center;max-width:none;gap:8px;margin:0 0 12px}
.assembly-info strong{font-size:13px}
.assembly-info span{font-size:8px}
#assembly-status{font-size:8px}
@media(max-width:720px){.board-area{height:430px;margin:12px 4px 0}.take-shell .wp-topbar{height:auto;min-height:78px;flex-wrap:wrap;gap:2px 8px;padding:6px 0;margin-bottom:12px}.header-game-title{order:3;width:100%;font-size:17px;padding-bottom:3px}.wp-tools{margin-left:auto}.assembly-info{gap:6px}}

.take-shell .wp-topbar{position:relative}
.header-game-title{position:absolute;left:50%;transform:translateX(-50%);margin:0;display:flex;align-items:center;justify-content:center;gap:8px;font-size:24px;font-weight:850;letter-spacing:-1.1px}
.header-game-title b{color:#675be7;font-weight:850}
.title-tiles{position:relative;display:block;width:13px;height:13px;border-radius:4px;background:#28b65e;box-shadow:0 3px 0 #379786;transform:rotate(-10deg);margin-right:3px}
.title-tiles::after{content:'';position:absolute;width:10px;height:10px;left:7px;top:-6px;border-radius:3px;background:#f5bc24;box-shadow:0 2px 0 #c18f30;transform:rotate(22deg)}
@media(max-width:720px){.header-game-title{position:static;transform:none;left:auto;width:100%;padding:7px 0 5px;font-size:22px}.take-shell .wp-topbar{min-height:90px}}

.exit-bar.split-exit{box-shadow:none;opacity:1}

/* Fit the playfield to the packed grid instead of leaving a fixed empty stage. */
.board-area{height:auto;aspect-ratio:var(--board-ratio,1);margin:16px 12px 0}
@media(max-width:720px){.board-area{height:auto;aspect-ratio:var(--board-ratio,1);margin:12px 4px 0}}

/* A small, stable gutter separates the tiles from their exit bars. */
#board-scroll{inset:20px}
@media(max-width:720px){#board-scroll{inset:16px}}

.piece.removing{animation:none!important;opacity:0;pointer-events:none}
.absorption-piece{position:absolute;pointer-events:none;z-index:3;transform-origin:center;filter:brightness(1.08)}
.wall-absorb{position:absolute;z-index:4;pointer-events:none;width:64px;height:10px;border-radius:50%;background:#fff;box-shadow:0 0 8px 3px var(--absorb-color),0 0 22px var(--absorb-color);transform:translate(-50%,-50%);animation:wall-absorb .4s ease-out forwards}
.wall-absorb-vertical{width:10px;height:64px}
@keyframes wall-absorb{0%{opacity:0;scale:.45}25%{opacity:1;scale:1}100%{opacity:0;scale:1.5}}
@media(prefers-reduced-motion:reduce){.wall-absorb{animation:none;opacity:.5}}
.piece.covered-piece{filter:grayscale(1);opacity:.62}.piece.covered-piece .piece-front{fill:#aeb9bd;stroke:#d4dcde;filter:none}.piece.surfacing{animation:surface-rise .28s ease-out;transform-box:fill-box;transform-origin:center}@keyframes surface-rise{0%{transform:scale(.95);filter:grayscale(1)}65%{transform:scale(1.015)}100%{transform:scale(1);filter:none}}@media(prefers-reduced-motion:reduce){.piece.surfacing{animation:none}}
.piece.covered-piece{transform:scale(.94);transform-box:fill-box;transform-origin:center}.piece.surfacing{animation:surface-rise .42s cubic-bezier(.2,.7,.25,1)}@keyframes surface-rise{0%{transform:scale(.94);filter:grayscale(1)}60%{transform:scale(1.035);filter:drop-shadow(0 0 3px #ffffff)}100%{transform:scale(1);filter:none}}
#loading-percent{display:block;font-size:28px;font-variant-numeric:tabular-nums;color:#204c46;margin:14px 0}#loading-bar{width:min(230px,75%);height:7px;background:#d9e3df;border-radius:8px;overflow:hidden;margin:0 auto 16px}#loading-bar span{display:block;width:0;height:100%;border-radius:8px;background:var(--accent);transition:width .12s linear}.board-message.error #loading-bar,.board-message.error #loading-percent{display:none}@media(prefers-reduced-motion:reduce){#loading-bar span{transition:none}}

/* Fit mobile play to both viewport dimensions, retaining the SVG proportions. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(max-width:1024px), (orientation:landscape) and (max-height:550px){
 .take-shell{height:100svh;min-height:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left))}
 .take-shell .wp-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;height:auto;min-height:0;flex-shrink:0;gap:0 4px;padding:2px 0;margin-bottom:6px}
 .take-shell .wp-topbar .wp-brand{font-size:14px;letter-spacing:-.5px;min-width:0}
 .take-shell .wp-brand .brand-icon{width:25px;height:25px;flex-shrink:0;margin-right:5px}
 .take-shell .wp-tools{grid-column:2;grid-row:1;margin:0;gap:2px}
 .take-shell .header-game-title{position:static;transform:none;grid-column:1/-1;grid-row:2;width:auto;margin:0;padding:4px 0 7px;font-size:20px}
 .take-shell .layout{flex:1;min-height:0;width:100%;display:flex;align-items:stretch}
 .take-shell .game-card{display:flex;flex-direction:column;min-width:0;min-height:0;border-radius:20px}
 .game-toolbar{height:48px;flex-shrink:0;padding:5px 10px;gap:5px}
 .level-pill{min-height:38px;gap:6px;padding:8px;font-size:10px}
 .toolbar-collection{font-size:6px;letter-spacing:.3px;gap:3px 5px}
 .object-heading{padding:2px 6px 0;flex-shrink:0}
 .object-heading h2{font-size:18px;line-height:1.2}
 .object-heading .eyebrow{font-size:7px}
 .difficulty{margin-top:4px}
 .take-shell .board-area{flex:1;min-height:0;height:auto;aspect-ratio:auto;margin:8px 4px 0}
 .game-bottom{flex-shrink:0;padding:6px 12px 8px}
 .assembly-info{flex-wrap:wrap;gap:3px 6px;margin-bottom:6px}
 .layer-row{margin-bottom:6px;align-items:flex-start}
 .layer-tabs{flex-wrap:wrap;gap:4px 8px;min-width:0}
 .layer-tab{font-size:8px}
 .play-hint{margin-top:5px;gap:6px}
 .hint-button{min-height:36px}
 .take-shell .wp-save-note{margin:4px 0;font-size:8px;flex-shrink:0}
 .take-shell .wp-footer{flex-shrink:0;min-height:26px;padding:0;font-size:9px}
 .take-shell .wp-footer button{min-height:26px;padding:4px 0}
 dialog{padding:18px;max-height:calc(100dvh - 24px)}
}
@media(orientation:landscape) and (max-height:550px){
 .take-shell{width:100%;max-width:940px}
 .take-shell .wp-topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);margin-bottom:4px}
 .take-shell .header-game-title{grid-column:2;grid-row:1;padding:0;font-size:19px}
 .take-shell .wp-tools{grid-column:3;justify-self:end}
 body:not(.game-focused) .game-card{display:grid;grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:48px auto minmax(0,1fr)}
 body:not(.game-focused) .board-area{grid-column:1;grid-row:1/4;margin:4px;min-width:0}
 body:not(.game-focused) .game-toolbar{grid-column:2;grid-row:1;padding:4px}
 body:not(.game-focused) .toolbar-collection>span{display:none}
 body:not(.game-focused) .object-heading{grid-column:2;grid-row:2}
 body:not(.game-focused) .game-bottom{grid-column:2;grid-row:3;align-self:end;padding:8px}
 body:not(.game-focused) .play-hint{flex-wrap:wrap}
 .take-shell .wp-save-note{display:none}
}
body.game-focused .take-shell{height:100dvh}
body.game-focused .take-shell .wp-topbar{display:none}



/* Final collection is loaded only after completing every level. */
#complete-dialog.workshop-complete{max-width:680px;width:calc(100% - 24px);padding:24px;overflow:auto}
.workshop-complete #complete-model-slot{height:170px;margin-bottom:6px}
#complete-dialog.workshop-complete h2{font-size:clamp(25px,5vw,36px)}
#finale-gallery{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:20px 0}
#finale-gallery figure{margin:0;min-width:0;border:1px solid #e6e7ef;border-radius:14px;background:linear-gradient(145deg,#f3f0ff,#f0faf4);overflow:hidden;padding:4px 4px 10px}
#finale-gallery img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain}
#finale-gallery figcaption{font-size:10px;line-height:1.3;color:#384d57}
.finale-preview-error{display:grid;place-items:center;min-height:80px;font-size:10px;color:#728784}
.finale-render-stage{position:absolute;left:0;top:0;width:240px;height:180px;opacity:0;pointer-events:none}
.finale-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:24px}
.finale-confetti i{position:absolute;left:var(--x);top:-15px;width:8px;height:13px;border-radius:2px;animation:finale-fall 2.3s var(--delay) ease-in both}
@keyframes finale-fall{from{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(700px) rotate(var(--turn));opacity:0}}
@media(max-width:540px){#complete-dialog.workshop-complete{padding:18px}#finale-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.workshop-complete #complete-model-slot{height:140px}}
@media(prefers-reduced-motion:reduce){.finale-confetti{display:none}}
