@font-face{font-family:Fredoka;src:url('assets/fredoka-400.woff2')}@font-face{font-family:Fredoka;src:url('assets/fredoka-600.woff2');font-weight:600}
:root{font-family:Fredoka,system-ui,sans-serif;color:#493923;background:#f8efd9;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.42}button:focus-visible{outline:4px solid #925baa;outline-offset:3px}button:active:not(:disabled){filter:brightness(.96)}img{max-width:100%;user-select:none}h1,h2,p{margin:0}h1{font-size:clamp(26px,3vw,44px);font-weight:600;line-height:1.08}h2{font-size:23px;font-weight:600}.sr-only{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}.game-shell,#screen{height:100dvh;width:100%;position:relative}.game-shell{background:linear-gradient(#fff5df66,#fff5df99),var(--world-landscape) center/cover}.corner-rune{position:fixed;z-index:20;bottom:4px;left:6px;width:55px;height:40px;object-fit:contain;pointer-events:none}.icon{border:0;background:none;padding:0;width:64px;height:64px;min-width:48px;min-height:48px;flex:none;border-radius:50%;filter:drop-shadow(0 3px 2px #51331533)}.icon img{display:block;height:100%;width:100%;object-fit:contain}.wood-button{border:2px solid #c7a474;border-radius:17px;background:linear-gradient(#fff9e9,#efdfbc);padding:9px 19px;min-height:48px;box-shadow:0 3px 0 #ac8457;font-weight:600;font-size:17px}.eyebrow{display:block;font-size:12px;letter-spacing:.11em;text-transform:uppercase;color:#80633c;margin-bottom:6px}.opening{position:relative;width:100%;height:100%;overflow:hidden}.opening picture,.opening picture>img{display:block;position:absolute;width:100%;height:100%;object-fit:cover}.opening-title{position:absolute;top:18%;left:5%;width:36%;text-align:center;text-shadow:0 2px #fff5df,0 0 20px #fff5df}.opening-title>span{font-size:32px}.opening h1{font-size:clamp(35px,4.5vw,68px)}.opening-title p{margin-top:20px;font-size:19px}.opening #play-button{position:absolute;left:calc(23% - 58px);top:67%;width:116px;height:116px}.collection{height:100%;overflow:auto;padding:30px max(25px,5vw) 48px;background:#fff6eac9}.collection-heading{display:flex;justify-content:center;align-items:center;gap:18px;margin-bottom:24px}.collection-heading>img{width:95px;height:105px;object-fit:contain}.collection-heading p{margin-top:9px;font-size:18px}.world-grid{max-width:1200px;margin:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:17px}.world-card{padding:0;overflow:hidden;text-align:left;border:3px solid #d9b47c;border-radius:23px;background:#fff9eb;box-shadow:0 5px 0 #b68d57,0 14px 30px #5f452921;transition:transform .15s}.world-card:hover{transform:translateY(-4px)}.world-card>img{display:block;width:100%;aspect-ratio:1;object-fit:cover}.world-card>div{padding:16px 13px}.world-card h2{min-height:50px}.world-card p{font-size:15px;margin:8px 0}.world-card span{font-size:12px;color:#806340}.collection-footer{display:flex;justify-content:center;align-items:center;gap:15px;margin-top:28px;flex-wrap:wrap}.gallery{padding-top:22px}.gallery-top{display:flex;align-items:center;gap:16px;max-width:1050px;margin:auto}.gallery-top>div{flex:1}.gallery-top h1{font-size:32px}.difficulty{display:flex;justify-content:center;gap:12px;margin:20px auto 9px}.difficulty button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:74px;min-height:68px;border-radius:17px;border:2px solid #c9b28e;background:#fff8e7;box-shadow:0 3px 0 #b79e79}.difficulty b{font-size:27px;font-weight:600}.difficulty span{font-size:12px}.difficulty .active{border-color:#69845d;background:#e7eed1;box-shadow:0 3px 0 #69845d,0 0 0 3px #fff7e9}.difficulty-note{text-align:center;font-size:16px;margin-bottom:20px}.friend-grid{max-width:1050px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:auto}.friend-card{padding:0;overflow:hidden;border:3px solid #d9bb89;border-radius:20px;background:#fff9eb;box-shadow:0 5px 0 #b88c54}.scene-picture{display:block;width:100%;aspect-ratio:4/3}.friend-caption{display:grid;padding:12px 5px;gap:2px}.friend-caption strong{font-size:24px;font-weight:600}.friend-caption span{font-size:14px}.friend-caption b{color:#b8872c;letter-spacing:4px;font-size:20px}.friend-card.discovered{border-color:#d3a034}.pager{display:flex;align-items:center;justify-content:center;gap:20px;margin:20px 0 12px}.pager .icon{width:52px;height:52px}.gallery-footer{display:flex;gap:15px;justify-content:center}.j-hud{height:86px;position:relative;z-index:2}.native-controls{visibility:hidden;position:absolute;left:12px;top:12px;display:flex}.puzzle-progress{position:absolute;top:14px;right:22px;display:flex;align-items:center;gap:8px;font-size:16px;background:#fff8e7dd;border-radius:30px;padding:5px 15px}.puzzle-progress img{width:40px;height:40px;object-fit:contain}.level-path{position:absolute;top:22px;left:50%;transform:translateX(-50%);display:flex;gap:7px}.level-path span{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#fff7e2b3;border:1px solid #cab48b;color:#947b54;font-size:13px}.level-path .active{background:#f1d287;border:2px solid #aa8036;color:#493923;font-weight:600}.workshop{height:calc(100dvh - 86px);padding:8px 4% 28px;display:grid;grid-template-columns:minmax(135px,18%) minmax(0,1fr) minmax(170px,22%);grid-template-rows:minmax(0,1fr) 66px;gap:12px 24px;align-items:center;max-width:1600px;margin:auto}.guide{display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0}.guide>img{height:130px;max-width:100%;object-fit:contain}.speech{padding:14px 12px;background:#fff9ebed;border:2px solid #d7bb8d;border-radius:20px;text-align:center;box-shadow:0 4px 12px #68492b19;width:100%}.speech h1{font-size:21px;margin-bottom:6px}.speech p{font-size:16px;line-height:1.25}.reference{width:90%;max-width:195px;background:#fff7e4;padding:6px;border:2px solid #b89563;border-radius:11px;box-shadow:0 5px 12px #553a2722;transform:rotate(-3deg)}.reference .scene-picture{border-radius:5px}.reference span{display:block;text-align:center;font-size:13px;margin-top:4px}.puzzle-area{min-width:0;align-self:center}.board{position:relative;aspect-ratio:4/3;width:100%;max-height:calc(100dvh - 215px);margin:auto;border:9px solid #b98952;border-radius:9px;background:#eadcbd;box-shadow:0 6px 0 #785735,0 13px 30px #3a291738;touch-action:none;user-select:none;isolation:isolate}.board>svg{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.board-targets{position:absolute;inset:0;display:grid}.slot{border:0;padding:0;background:transparent;min-width:0;min-height:0;touch-action:none}.slot:disabled{opacity:1}.slot:focus-visible{outline-offset:-5px}.slot-outline{fill:none;stroke:#ae987555;stroke-width:2;stroke-dasharray:5 5}.placed-edge{fill:none;stroke:#fff4d4;stroke-width:2}.selected-edge,.hint-path{stroke:#eead28;stroke-width:7;stroke-dasharray:none}.board-caption{text-align:center;margin-top:12px;font-size:14px;color:#654d2e}.piece-shelf{background:#f8edd6ef;padding:14px;border:3px solid #c9a678;border-radius:23px;box-shadow:0 5px 0 #af8759}.shelf-title{display:flex;justify-content:space-between;gap:7px;font-size:15px;align-items:center;margin-bottom:12px}.shelf-title b{background:#e5d2ac;min-width:27px;border-radius:50%;text-align:center;padding:4px;font-size:13px}.piece-tray{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-height:200px;align-content:center}.puzzle-piece{display:block;width:100%;aspect-ratio:1;border:2px solid transparent;border-radius:14px;background:#e2cdab66;padding:2px;touch-action:none;user-select:none}.puzzle-piece svg{display:block;width:100%;height:100%;filter:drop-shadow(0 3px 2px #523b3844);pointer-events:none}.puzzle-piece.selected{background:#ffe5a2;border-color:#c89730;box-shadow:0 0 0 2px #fff8dd}.tray-pager{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:12px}.tray-pager .wood-button{width:48px;padding:0;font-size:27px}.tray-pager span{font-size:13px}.tray-empty{grid-column:1/-1;text-align:center;align-self:center;font-size:17px;line-height:1.4}.puzzle-tools{grid-column:2/4;display:flex;align-items:center;justify-content:center;gap:12px}.puzzle-tools .icon{width:74px;height:74px}.demo-check{opacity:1!important;filter:drop-shadow(0 0 12px #ffc832)}#drag-piece{position:fixed;pointer-events:none;z-index:999;transform:translate(-50%,-50%);filter:drop-shadow(0 9px 5px #30201966)}#drag-piece svg{width:100%;height:100%}.overlay{position:absolute;inset:0;background:#3b352566;backdrop-filter:blur(5px);z-index:100;display:grid;place-items:center}.pause-panel{width:min(420px,90vw);border:4px solid #c6a06c;border-radius:32px;background:#fff5df;padding:24px;text-align:center;box-shadow:0 12px 45px #34261855}.pause-panel h2{font-size:31px}.pause-panel>img{height:170px;object-fit:contain;margin:10px}.pause-panel p{margin-bottom:16px}.pause-panel>div{display:flex;justify-content:center;gap:12px}.pause-panel .icon{width:62px;height:62px}.reward-view,.world-finale{height:100%;overflow:auto;padding:30px 6% 40px;text-align:center;background:#fff5e1a8}.reward-title p{margin-top:10px;font-size:20px}.reward-content{display:flex;justify-content:center;align-items:center;gap:40px;max-width:1100px;margin:26px auto}.finished-picture{width:55%;max-width:580px;border:10px solid #c19956;box-shadow:0 7px 0 #8b652f,0 14px 28px #46311733;position:relative;border-radius:7px}.gold-seal{position:absolute;right:-25px;bottom:-20px;display:grid;place-items:center;font-size:55px;border-radius:50%;width:85px;height:85px;color:#fff4c2;background:#d3a144;border:4px solid #f5d785;text-shadow:0 2px #926529}.reward-friends{max-width:330px;width:35%}.reward-friends img{width:49%;height:200px;object-fit:contain}.reward-friends p{font-size:22px;line-height:1.2;background:#fff6e2e6;border-radius:20px;padding:15px}.reward-actions{display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap}.reward-count{margin-top:20px}.world-finale{display:flex;flex-direction:column;justify-content:center;gap:20px}.final-cast{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;max-width:900px;margin:0 auto}.final-cast img{width:22%;max-height:190px;object-fit:contain}
@media(min-width:1500px){.board{max-width:calc((100dvh - 230px)*1.3333)}.world-grid{margin-top:35px}}
@media(max-width:1050px) and (orientation:landscape){.collection{padding:15px 25px 40px}.collection-heading{margin-bottom:15px}.collection-heading>img{height:75px;width:70px}.world-grid{gap:10px}.world-card h2{font-size:19px;min-height:42px}.world-card>div{padding:10px}.world-card p{font-size:13px}.world-card span{font-size:10px}.collection-footer{margin-top:20px}.j-hud{height:76px}.level-path{display:none}.workshop{height:calc(100dvh - 76px);padding:4px 3% 22px;grid-template-columns:16% minmax(0,1fr) 24%;gap:8px 15px;grid-template-rows:minmax(0,1fr) 52px}.guide>img{height:80px}.guide{gap:8px}.speech{padding:8px}.speech h1{font-size:17px}.speech p{font-size:13px}.reference{max-width:130px}.reference span{font-size:11px}.board{border-width:7px;max-width:calc((100dvh - 192px)*1.3333);max-height:none}.piece-shelf{padding:9px}.piece-tray{min-height:120px;gap:5px}.shelf-title{font-size:12px;margin-bottom:6px}.tray-pager{margin-top:5px}.tray-pager .wood-button{min-height:44px;width:44px}.puzzle-tools .icon{width:58px;height:58px}.puzzle-tools .wood-button{font-size:14px;padding:7px 12px}.board-caption{font-size:11px;margin-top:9px}.reward-content{margin:18px auto}.reward-friends img{height:150px}.reward-title h1{font-size:32px}.reward-title p{font-size:16px}}
@media(orientation:portrait){.game-shell{background-image:linear-gradient(#fff5df66,#fff5df99),var(--world-portrait)}.opening-title{top:7%;left:7%;width:86%}.opening-title>span{font-size:27px}.opening h1{font-size:clamp(34px,7.5vw,63px);line-height:1.04}.opening-title p{margin-top:10px;font-size:16px}.opening #play-button{left:calc(50% - 51px);top:auto;bottom:5%;width:102px;height:102px}.collection{padding:24px 22px 45px}.collection-heading{gap:10px;margin-bottom:19px}.collection-heading>img{width:75px;height:85px}.collection-heading h1{font-size:30px}.collection-heading p{font-size:14px;line-height:1.3}.world-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.world-card:last-child{grid-column:1/-1;width:calc(50% - 8px);justify-self:center}.world-card>img{aspect-ratio:4/3}.world-card>div{padding:11px}.world-card h2{font-size:20px;min-height:0}.world-card p{font-size:12px}.world-card span{font-size:10px}.collection-footer{gap:12px;margin-top:22px}.gallery-top{gap:10px}.gallery-top>.wood-button{font-size:13px;padding:7px 10px;min-height:44px}.gallery-top h1{font-size:26px}.gallery-top .icon{width:50px;height:50px}.eyebrow{font-size:10px}.difficulty{gap:8px;margin-top:20px}.difficulty button{min-width:0;flex:1;min-height:59px;padding:4px}.difficulty b{font-size:24px}.difficulty-note{font-size:12px;margin-bottom:16px}.friend-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.friend-caption{padding:8px 3px}.friend-caption strong{font-size:22px}.friend-caption span{font-size:12px}.friend-caption b{font-size:18px}.pager{margin:15px 0 12px}.gallery-footer{gap:10px}.gallery-footer .wood-button{font-size:13px;padding:8px 10px}.j-hud{height:75px}.puzzle-progress{right:10px;top:13px;padding:4px 10px;gap:4px;font-size:12px}.puzzle-progress img{width:28px;height:32px}.level-path{display:none}.workshop{height:calc(100dvh - 75px);padding:2px 4% 23px;grid-template-columns:1fr;grid-template-rows:76px minmax(0,1fr) 116px 60px;gap:8px}.guide{flex-direction:row;height:76px;gap:8px}.guide>img{height:72px;width:60px}.speech{padding:8px;flex:1;border-radius:15px}.speech h1{font-size:19px;margin-bottom:4px}.speech p{font-size:13px;line-height:1.15}.reference{width:84px;transform:rotate(2deg);padding:3px;flex:none;border-radius:7px}.reference span{display:none}.puzzle-area{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:0}.board{flex:none;width:auto;height:calc(100% - 24px);max-width:100%;max-height:calc((100vw - 8vw)*.75);border-width:6px}.board-caption{font-size:11px;margin-top:7px;height:16px;flex:none}.piece-shelf{display:grid;grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:20px minmax(0,1fr);gap:4px 7px;padding:7px 9px;border-width:2px;border-radius:17px;height:116px}.shelf-title{grid-column:1/-1;font-size:12px;margin:0}.shelf-title b{font-size:11px;padding:2px;min-width:23px}.piece-tray{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-height:0;height:100%;align-items:center}.puzzle-piece{max-height:100%;border-radius:9px}.tray-pager{flex-wrap:wrap;justify-content:center;gap:0;margin:0}.tray-pager span{display:none}.tray-pager .wood-button{width:44px;min-height:32px;height:32px;font-size:20px;line-height:20px;padding:0;border-radius:10px;box-shadow:0 2px 0 #ac8457}.tray-empty{font-size:12px}.puzzle-tools{grid-column:1;gap:8px}.puzzle-tools .wood-button{font-size:13px;padding:7px 11px;min-height:44px}.puzzle-tools .icon{width:59px;height:59px;min-width:48px}.puzzle-tools [data-action=skip]{font-size:11px;max-width:80px}.reward-view{padding:27px 6% 43px}.reward-title h1{font-size:33px}.reward-title p{font-size:16px}.reward-content{flex-direction:column;gap:23px;margin:25px auto 20px}.finished-picture{width:90%;border-width:7px}.gold-seal{width:60px;height:60px;font-size:40px;right:-17px;bottom:-15px}.reward-friends{width:100%;max-width:400px;display:flex;align-items:center;gap:6px}.reward-friends img{width:24%;height:110px}.reward-friends p{font-size:17px;flex:1;padding:11px}.reward-actions{gap:13px}.reward-actions .wood-button{font-size:15px}.reward-count{font-size:13px}.world-finale{padding:25px 20px 45px}.final-cast img{width:25%;height:120px}}
@media(orientation:portrait) and (min-width:600px){.workshop{padding:8px 8% 30px;grid-template-rows:110px minmax(0,1fr) 155px 76px;gap:15px}.guide,.guide>img{height:105px}.guide>img{width:95px}.speech h1{font-size:26px}.speech p{font-size:18px}.reference{width:135px}.piece-shelf{height:155px;padding:12px;grid-template-columns:minmax(0,1fr) 55px;grid-template-rows:25px minmax(0,1fr)}.piece-tray{gap:12px}.shelf-title{font-size:16px}.tray-pager .wood-button{width:50px;height:46px}.puzzle-tools .wood-button{font-size:18px;min-height:52px}.puzzle-tools .icon{width:76px;height:76px}.collection{padding:32px 8% 50px}.world-card h2{font-size:25px}.world-card p{font-size:16px}.world-card span{font-size:13px}.friend-caption strong{font-size:29px}.friend-caption span{font-size:17px}.difficulty button{min-height:75px}.difficulty-note{font-size:16px}.gallery-top h1{font-size:38px}.reward-friends img{height:160px}}
@media(max-height:450px) and (orientation:landscape){.j-hud{height:63px}.workshop{height:calc(100dvh - 63px);grid-template-rows:minmax(0,1fr) 46px;padding-bottom:8px;gap:4px 14px}.guide>img{height:50px}.guide .reference{display:none}.speech h1{font-size:14px}.speech p{font-size:11px}.guide{gap:5px}.board{max-width:calc((100dvh - 142px)*1.3333)}.board-caption{margin-top:6px;font-size:10px}.piece-shelf{padding:5px 8px}.piece-tray{min-height:80px;max-height:110px}.puzzle-piece{max-height:53px}.shelf-title{font-size:11px;margin-bottom:3px}.tray-pager{margin-top:3px}.tray-pager .wood-button{min-height:32px;height:32px}.puzzle-tools .icon{width:48px;height:48px}.puzzle-tools .wood-button{min-height:38px;font-size:12px}.puzzle-progress{top:10px}.reward-content{max-width:700px;gap:25px;margin:14px auto}.finished-picture{max-width:250px}.reward-friends img{height:85px}.reward-friends p{font-size:14px;padding:8px}.reward-view{padding:12px 5% 30px}.reward-title h1{font-size:25px}.reward-title p{font-size:13px;margin-top:5px}.reward-actions .wood-button{font-size:12px;min-height:40px}.reward-count{font-size:11px;margin-top:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

@media(max-width:400px) and (orientation:portrait){.puzzle-progress{right:7px;font-size:11px;padding:4px 7px;gap:2px}.puzzle-progress img{width:24px}}
@media(orientation:portrait){.board{width:min(100%,calc((100dvh - 400px)*1.333333));height:auto;max-height:none}}
@media(orientation:portrait) and (min-width:600px){.board{width:min(100%,calc((100dvh - 523px)*1.333333))}}
@media(orientation:landscape) and (min-width:1051px){.board{max-width:min(100%,calc((100dvh - 215px)*1.333333));max-height:none}}
@media(max-height:450px) and (orientation:landscape){.j-hud{height:80px}.workshop{height:calc(100dvh - 80px)}.board{max-width:calc((100dvh - 159px)*1.333333)}}
