*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#214c32;display:grid;place-items:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent}#game{width:min(100vw,calc(100dvh * 16 / 9));aspect-ratio:16/9;position:relative;overflow:hidden;isolation:isolate;box-shadow:0 0 65px #102c20}button{padding:0;margin:0;border:0;background:transparent;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none}button:focus-visible{outline:4px solid white;outline-offset:3px}button img{width:100%;height:100%;display:block;pointer-events:none}button:disabled{cursor:default}.screen{position:absolute;inset:0}.screen[hidden]{display:none}.scene{width:100%;height:100%;display:block;pointer-events:none}.art-button{position:absolute;transition:transform 110ms ease,filter 110ms ease;transform-origin:center}.art-button.pressed,.art-button:active{transform:translateY(3px) scale(.96);filter:brightness(.85)}.continue{left:30.625%;top:74.259%;width:39.427%;height:18.519%;border-radius:60% / 100%;overflow:hidden;z-index:4}.continue .frame{position:absolute;inset:0}.continue .green{position:absolute;left:10.568%;top:13%;width:78.468%;height:73%;border-radius:100px;overflow:hidden;transition:transform 100ms,filter 100ms,box-shadow 100ms}.continue.pressed,.continue:active{transform:none;filter:none}.continue.pressed .green,.continue:active .green{transform:translateY(4px) scale(.96,.95);filter:brightness(.8);box-shadow:inset 0 6px 12px #133c1f}.settings{left:89.531%;top:4.63%;width:8.125%;height:14.537%;border-radius:50%;overflow:hidden;z-index:5}.mute{display:none;position:absolute;inset:0;width:100%;height:100%}.settings[aria-pressed=true] .mute{display:block}.back{left:3.125%;top:3.519%;width:8.125%;height:14.167%;border-radius:50%;overflow:hidden}.card{position:absolute;width:15.72%;height:20.36%;border-radius:18%;overflow:hidden;transition:transform 110ms,filter 110ms;transform-origin:center}.card.pressed,.card:active{transform:translateY(3px) scale(.94);filter:brightness(.8)}.card.selected{animation:select-glow 650ms ease}.card[aria-disabled=true]{cursor:default}#walker{display:none;position:absolute;left:24.5%;top:76%;width:21.5%;height:37%;z-index:2;transform-origin:50% 100%;pointer-events:none}#walker img{width:100%;height:100%;object-fit:contain;filter:url(#sprite-clean)}.departing #walker{display:block}.entering{animation:arrive 250ms ease-out}.departing .continue{pointer-events:none}@keyframes arrive{from{opacity:.4}to{opacity:1}}@keyframes select-glow{50%{filter:brightness(1.22);transform:scale(1.035)}}@media(prefers-reduced-motion:reduce){.entering,.card.selected{animation:none}.art-button,.card{transition:none}}

/* Keep the approved wooden frame, foliage and surrounding pixels fixed during departure. */
.continue-surround{position:absolute;inset:0;width:100%;height:100%;clip-path:polygon(33% 74%,67% 74%,67% 79%,70% 79%,70% 94%,30% 94%,30% 79%,33% 79%);pointer-events:none;z-index:3}.continue .frame{visibility:hidden}

.settings svg{display:block;width:100%;height:100%}.settings.pressed,.settings:active{transform:none;filter:none}.sound-glyph{transform-origin:50px 50px;transition:transform 100ms,filter 100ms}.settings.pressed .sound-glyph,.settings:active .sound-glyph{transform:translateY(2px) scale(.94);filter:brightness(.8)}.sound-off{display:none}.settings[aria-pressed=true] .sound-off{display:block}.settings[aria-pressed=true] .sound-waves{display:none}

.settings{left:90.35%;top:5.6%;width:6.5%;height:11.556%}

#tutorial [hidden]{display:none}
.tutorial-home{left:2.4%;top:2.4%;width:7.5%;height:12.6%;border-radius:50%}
.tutorial-right{left:65.4%;top:63.8%;width:7.3%;height:12%;border-radius:20%}
.tutorial-run{left:87%;top:77%;width:11%;height:19%;border-radius:50%}
.tutorial-delete{left:89%;top:64%;width:7%;height:12%;border-radius:50%}
#tutorial button.pressed{background:rgba(0,0,0,.18)}
#tutorial-paytak{position:absolute;left:16.8%;top:65.2%;width:9.2%;height:16.3%;object-fit:contain;pointer-events:none}
#tutorial-seed{position:absolute;left:27.2%;top:71%;width:6.2%;height:8%;object-fit:contain;pointer-events:none}
#queued-right{position:absolute;left:60.7%;top:39%;width:4.2%;height:7.3%;object-fit:contain}
#tutorial-hand{position:absolute;left:68.2%;top:68%;width:8%;height:16%;object-fit:contain;pointer-events:none;z-index:3;animation:tutorial-point 900ms ease-in-out infinite}
#tutorial-hand.point-run{left:92.1%;top:84%;width:7.5%;height:15%}
#tutorial-stars{position:absolute;left:63.4%;top:18.8%;width:18.6%;height:10.3%;display:flex;gap:5.5%;pointer-events:none}
#tutorial-stars svg{width:30%;height:100%;filter:drop-shadow(0 0 6px #ffe887)}
@keyframes tutorial-point{50%{transform:translate(-3px,-5px)}}
@media(prefers-reduced-motion:reduce){#tutorial-hand{animation:none}}

#queued-right{left:59.55%;top:34.3%;width:6.35%;height:11.1%;object-fit:fill;border-radius:15%;filter:drop-shadow(0 3px 2px #79522b70);animation:command-seat 180ms ease-out}
.tutorial-retry{left:78%;top:82%;width:6.5%;height:11.56%;border-radius:50%;z-index:2}
#tutorial-bird{position:absolute;z-index:9;left:86.8%;top:19.7%;width:8.4%;height:11.4%;object-fit:contain;transform-origin:50% 95%;animation:bird-perch 4.8s ease-in-out infinite;pointer-events:none}
#tutorial-stars{left:62.8%;top:18.8%;width:19.4%;height:10%;display:flex;gap:5%;}
#tutorial-stars img{width:30%;height:100%;object-fit:fill;animation:award-arrive 450ms cubic-bezier(.2,.9,.3,1.2) both;filter:drop-shadow(0 2px 1px #783b15)}
#tutorial-stars img:nth-child(2){animation-delay:180ms}#tutorial-stars img:nth-child(3){animation-delay:360ms}
@keyframes award-arrive{0%{opacity:0;transform:scale(.3) translateY(-20%)}75%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}
@keyframes command-seat{from{transform:scale(.9);opacity:.5}to{transform:scale(1);opacity:1}}
@keyframes bird-perch{0%,100%{transform:rotate(0)}35%{transform:rotate(-2deg) translateY(-1px)}65%{transform:rotate(1.5deg)}}
@media(prefers-reduced-motion:reduce){#tutorial-bird,#tutorial-stars img,#queued-right{animation:none}}

.settings{overflow:visible}.settings img{object-fit:contain}.settings .sound-off-art{display:none}.settings[aria-pressed=true] .sound-on-art{display:none}.settings[aria-pressed=true] .sound-off-art{display:block}.settings.pressed,.settings:active{transform:translateY(2px) scale(.96);filter:brightness(.9)}

.tutorial-up,.tutorial-down,.tutorial-left{position:absolute;top:63.8%;width:7.3%;height:12%;border-radius:20%}
.tutorial-up{left:58.1%}.tutorial-down{left:73.2%}.tutorial-left{left:80.8%}
#tutorial button img{object-fit:fill}
#tutorial-paytak.celebrate{animation:paytak-joy 850ms ease-out both}
@keyframes paytak-joy{0%,45%,100%{transform:translateY(0)}22%{transform:translateY(-19%)}65%{transform:translateY(-9%)}85%{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#tutorial-paytak.celebrate{animation:none}}

#completion{position:absolute;inset:0;z-index:6;background:rgba(0,0,0,.16);display:grid;place-items:center;animation:completion-shade 250ms ease-out}#completion[hidden]{display:none}
.completion-actions{display:flex;gap:4vw;align-items:center;width:32%;justify-content:center;animation:completion-buttons 320ms cubic-bezier(.2,.8,.3,1.15)}
.completion-actions button{position:relative;width:42%;aspect-ratio:1;border-radius:50%;filter:drop-shadow(0 5px 6px #38261055)}
.completion-actions button img{object-fit:contain}
@keyframes completion-shade{from{background:rgba(0,0,0,0)}to{background:rgba(0,0,0,.16)}}
@keyframes completion-buttons{from{opacity:0;transform:scale(.65)}to{opacity:1;transform:scale(1)}}

.settings{z-index:7}#queued-up{position:absolute;left:66.3%;top:34.3%;width:6.35%;height:11.1%;object-fit:fill;border-radius:15%;filter:drop-shadow(0 3px 2px #79522b70);animation:command-seat 180ms ease-out}#tutorial-hand.point-up{left:60.7%;top:68%;}

#welcome-idle{position:absolute;left:24.5%;top:76%;width:21.5%;height:37%;object-fit:contain;transform:translate(-50%,-100%);pointer-events:none;z-index:2}.departing #welcome-idle{display:none}

#tutorial-paytak{z-index:2}#tutorial-seed{z-index:1}


.logo-birds{position:absolute;inset:0;pointer-events:none;z-index:1}.logo-bird{position:absolute;width:3.5%;height:5%;display:block;animation:logo-flight 9s ease-in-out infinite}.bird-one{left:31%;top:13%}.bird-two{left:67%;top:26%;animation-delay:-3s;animation-duration:11s}.bird-three{left:59%;top:7%;animation-delay:-6s;animation-duration:13s}.logo-bird svg{width:100%;height:100%;overflow:visible;animation:bird-wingbeat 550ms ease-in-out infinite alternate}@keyframes logo-flight{0%,100%{transform:translate(0,0) rotate(-5deg)}25%{transform:translate(45px,-20px) rotate(5deg)}50%{transform:translate(75px,15px) rotate(-5deg)}75%{transform:translate(-20px,25px) rotate(5deg)}}@keyframes bird-wingbeat{to{transform:scaleY(.65)}}@media(prefers-reduced-motion:reduce){.logo-bird,.logo-bird svg{animation:none}}

#welcome-idle{transform-origin:50% 100%;animation:paytak-breathe 3s ease-in-out infinite}@keyframes paytak-breathe{50%{transform:translate(-50%,-100%) scale(1.007,1.015)}}@media(prefers-reduced-motion:reduce){#welcome-idle{animation:none}}

#coding-map{position:absolute;left:14.2%;top:13.4%;width:42.5%;height:72.2%;pointer-events:none;z-index:0}
#tutorial-paytak{left:20.91%;top:61.79%;width:8%;height:13.4%}
#tutorial-seed{left:30.165%;top:65.09%;width:5.3%;height:6.8%}

/* Fixed card bounds prevent the background from showing through on press. */
.card.pressed,.card:active{transform:none;filter:brightness(.82)}
.card.selected{animation:none}

.reusable-layer{position:absolute;pointer-events:none;object-fit:fill}
.level-board-layer{left:11.6%;top:26.5%;width:77.5%;height:64%}
.level-heading-layer{left:29%;top:5.5%;width:54%;height:30%}
.coding-panel-layer{left:55.4%;top:28.5%;width:41%;height:33.4%}
.control-tray-layer{left:56.8%;top:61%;width:40.2%;height:18%}
.star-panel-layer{left:58%;top:15%;width:29%;height:15.8%}
#tutorial-stars{left:63%;top:19.3%;width:20%;height:10.5%}
#queued-right{left:59.55%;top:35.5%;width:6.35%;height:10.4%}
#queued-up{left:66.3%;top:35.5%;width:6.35%;height:10.4%}
#tutorial-stars{left:63.9%;top:19.3%;width:18.6%;height:7.9%}
/* Each award is positioned relative to its own matching recess. */
#tutorial-stars{left:58%;top:15%;width:29%;height:15.8%;display:block}
#tutorial-stars img{position:absolute;top:23.4%;width:19.6%;height:53%;object-fit:fill;filter:none}
#tutorial-stars img:nth-child(1){left:20.2%}
#tutorial-stars img:nth-child(2){left:41.6%}
#tutorial-stars img:nth-child(3){left:63.2%}
.card{border-radius:0;overflow:visible}

.back{overflow:visible;border-radius:50%}
.back.pressed,.back:active{transform:none;filter:brightness(.84)}
#tutorial-bird{left:86.4%;top:22.8%;width:8.4%;height:11.4%;transform-origin:40% 96%}
@keyframes bird-perch{0%,100%{transform:rotate(0)}35%{transform:rotate(-1deg)}65%{transform:rotate(1deg)}}

#tutorial-paytak.bending-full{object-fit:fill}

#free-commands{position:absolute;inset:0;pointer-events:none}#free-commands img{position:absolute;width:6.35%;height:10.4%;object-fit:fill;filter:drop-shadow(0 2px 1px #79522b70)}

#level-jump{left:11%;top:3%;width:6%;height:10%;z-index:8;border-radius:20%}#level-jump[hidden]{display:none}#level-jump span{position:absolute;inset:0;display:grid;place-items:center;font:bold 3vw sans-serif;color:#fff3cb;text-shadow:0 2px 2px #603010}
#level-picker{position:absolute;left:18%;top:3%;width:37%;padding:1.2%;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;background:#b96827;border:5px solid #713508;border-radius:20px;z-index:9;box-shadow:0 5px 12px #17372280}#level-picker[hidden]{display:none}.jump-number{height:4vw;display:flex;align-items:center;justify-content:center;background:#ffce70;border:3px solid #6b310d;border-radius:12px}.jump-number:disabled{filter:brightness(.45)}.jump-number img{width:auto;height:85%;object-fit:contain}.jump-number:active{filter:brightness(.8)}
#total-stars{position:absolute;left:65%;top:7.2%;width:15%;height:7%;display:flex;justify-content:center;gap:2px;pointer-events:none}#total-stars img{height:100%;width:auto;object-fit:contain}

#level-jump{left:11%;top:3%;width:6.5%;height:11.56%;border-radius:50%}#total-stars{align-items:center;gap:8px}#total-stars .total-star-emblem{height:78%;width:auto;filter:drop-shadow(0 2px 1px #713708)}

#tutorial-rocks{position:absolute;left:36.3%;top:64%;width:7%;height:10.5%;object-fit:contain;z-index:1;pointer-events:none}#tutorial-rocks[hidden]{display:none}

#tutorial-rocks{left:37.275%;top:64%;width:7%;height:10.5%}

#free-commands img.command-active,#queued-right.command-active,#queued-up.command-active{outline:4px solid #ffdf23;outline-offset:2px;border-radius:15%;box-shadow:0 0 0 2px #9a6100,0 0 14px #ffe333;z-index:3}

#free-commands img.command-active,#queued-right.command-active,#queued-up.command-active{outline:5px solid #fff52b;outline-offset:2px;box-shadow:0 0 0 2px #ffbc00,0 0 7px 4px #fff72b,0 0 17px 7px #ffda00cc,0 0 28px 9px #ffcf0066;filter:drop-shadow(0 0 4px #fff83b);}

#tutorial-thicket{position:absolute;left:29.37%;top:49%;width:7%;height:12%;object-fit:contain;z-index:1;pointer-events:none}#tutorial-thicket[hidden]{display:none}

#level-fade{position:absolute;inset:0;background:rgba(0,0,0,.58);z-index:30;pointer-events:auto}#level-fade[hidden]{display:none}

#obstacle-layer{position:absolute;inset:0;pointer-events:none;z-index:1}#obstacle-layer img{position:absolute;width:7%;object-fit:contain}.grid-rocks{height:10.5%}.grid-thicket{height:12%}

.treasure-card{background:linear-gradient(#dc984b,#b86a29);border:5px solid #71370f;box-shadow:inset 0 0 0 4px #f6c17b;border-radius:18%;isolation:isolate}.treasure-card:not(.chapter-open){filter:brightness(.6)}.chapter-number{position:absolute;left:26%;top:2%;width:48%;background:#ffe4aa;border:3px solid #764017;border-radius:12px;font:bold 1.8vw Georgia;color:#71370f}.treasure-card .chapter-chest{position:absolute;width:80%;height:64%;left:10%;top:24%;object-fit:contain}.chapter-lock{position:absolute;width:39%;height:46%;left:31%;top:43%;filter:drop-shadow(0 3px 2px #502810)}.chapter-open .chapter-lock{display:none}.chapter-open{background:linear-gradient(#b9e450,#67ac35)}#chapter-unlock{position:absolute;inset:0;z-index:40;background:#0008;display:grid;place-items:center}.treasure-card.unlock-icon{position:relative;left:auto;top:auto;width:20%;height:38%;filter:none;pointer-events:none}.unlock-icon .chapter-number{font-size:3vw}.unlock-icon .lock-shackle{transform-origin:23px 43px}

.treasure-card{border:0;box-shadow:none;background:none;overflow:visible}.treasure-card.chapter-open{background:none}.treasure-card .chapter-base{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.chapter-center-cover{position:absolute;left:12%;top:28%;width:76%;height:49%;background:linear-gradient(#a5d638,#77bd26);border-radius:12%}.treasure-card .chapter-number-art{position:absolute;inset:0;width:100%;height:100%;clip-path:inset(0 0 73% 0);object-fit:fill}.treasure-card .chapter-chest{width:72%;height:48%;left:14%;top:29%}.chapter-earned-stars{position:absolute;inset:0;pointer-events:none}.chapter-earned-stars img{position:absolute;top:75%;width:21%;height:19%;object-fit:fill;filter:drop-shadow(0 1px 1px #8e4d13)}.unlock-glow{filter:drop-shadow(0 0 15px #fff254) drop-shadow(0 0 35px #ffbd22)!important}

.treasure-card .chapter-number-art{clip-path:inset(0 23% 73% 23%);filter:sepia(.65) saturate(.85) brightness(1.35)}

.treasure-card .chapter-number-art{clip-path:inset(1% 29% 77% 27% round 18%)}

.chapter-earned-stars img{top:73.8%;width:19%;height:16.5%;filter:none}.treasure-card .chapter-full-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.treasure-card:not(.chapter-open){filter:brightness(.55)}.treasure-card.chapter-open{filter:none}

.treasure-card .chapter-lock{display:block;left:57%;top:39%;width:31%;height:34%;transform:rotate(10deg);filter:drop-shadow(0 2px 1px #335609)}.chapter-lock .lock-shackle{transform-origin:26px 59px}.chapter-open .lock-shackle{transform:translateY(-12px) rotate(-30deg)}.unlock-icon .lock-shackle{transform-origin:26px 59px}

.treasure-card .chapter-lock{overflow:visible}

.treasure-card .chapter-lock{left:44.6%;top:22%;width:55.8%;height:59.5%;overflow:visible;filter:none;transform:rotate(10deg)}.chapter-lock .lock-shackle{transform-box:view-box;transform-origin:26px 59px}

.chapter-one-open .chapter-lock{display:block;position:absolute;left:44.6%;top:22%;width:55.8%;height:59.5%;overflow:visible;filter:none;transform:rotate(10deg);pointer-events:none}.chapter-one-open .lock-shackle{transform-box:view-box;transform-origin:26px 59px;transform:translateY(-12px) rotate(-30deg)}
/* Chapter two entrance: independent characters, seed and background layers. */
#chapter-two-intro [hidden],#chapter-two-map [hidden]{display:none}
.chapter-almila,.chapter-paytak{position:absolute;aspect-ratio:543/724;transform-origin:50% 100%;pointer-events:none;z-index:2}
.chapter-almila{height:59%;left:66%;top:29%;transform:scaleX(-1)}
.chapter-paytak{height:48%;left:14%;top:40%}
.chapter-almila span,.chapter-paytak span{position:absolute;inset:0;background-size:400% 100%;background-repeat:no-repeat;animation:chapter-pose 2.4s steps(1,end) infinite;opacity:0}
@keyframes chapter-pose{0%{opacity:1}25%,100%{opacity:0}}
.chapter-continue{left:35%;top:78%;width:30%;height:15%;overflow:visible}
.chapter-continue .frame{visibility:visible}
.distant-seed{position:absolute;left:49%;top:29%;width:2.8%;height:6%;z-index:1;animation:seed-hover 3s ease-in-out infinite}
.distant-seed::before{content:"";position:absolute;inset:-55%;background:radial-gradient(ellipse,#fff8bcb0,#ffd94c45 40%,transparent 70%);animation:seed-glow 2.4s ease-in-out infinite}
.distant-seed img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 5px #ffe68a)}
.distant-seed i{position:absolute;left:50%;top:50%;width:11%;aspect-ratio:1;background:#fff5b0;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);animation:seed-spark 2.8s ease-in-out infinite;animation-delay:calc(var(--i)*-.35s);transform:rotate(calc(var(--i)*45deg)) translateY(-260%)}
@keyframes seed-hover{50%{transform:translateY(-7%)}}@keyframes seed-glow{50%{opacity:.5;transform:scale(1.15)}}@keyframes seed-spark{0%,100%{opacity:.15;scale:.55}50%{opacity:1;scale:1.25}}
.chapter-walker{position:absolute;width:20.25%;height:48%;left:25%;top:88%;transform:translate(-50%,-100%);transform-origin:50% 100%;z-index:3}.chapter-walker img{width:100%;height:100%;object-fit:contain}
.chapter-departing .chapter-paytak{visibility:hidden}.chapter-departing .chapter-almila{animation:almila-goodbye 2s ease-in-out forwards}.chapter-departing .chapter-continue{transition:opacity .25s;opacity:0;pointer-events:none}
@keyframes almila-goodbye{to{filter:brightness(.95)}}
.chapter-transition{position:absolute;inset:0;z-index:4;background:#10281b;opacity:0;pointer-events:none}
.chapter-map{position:absolute;left:13%;top:12%;width:44%;height:78%;object-fit:contain;pointer-events:none}.chapter-home{left:3.125%;top:3.519%;width:8.125%;height:14.167%}
.chapter-map-arrive{animation:chapter-map-light .4s ease-out}@keyframes chapter-map-light{from{filter:brightness(.25)}to{filter:brightness(1)}}

.chapter-continue .frame{object-fit:contain}.chapter-continue.pressed,.chapter-continue:active{transform:translateY(3px) scale(.97);filter:brightness(.86)}

/* Grounded, continuous chapter-two character motion. */
.chapter-paytak{height:35%;left:26%;top:50%}
.chapter-almila{height:52%;left:56%;top:33%}
.chapter-paytak canvas,.chapter-almila canvas{width:100%;height:100%;display:block}
.chapter-ground-shadow{position:absolute;height:1.5%;border-radius:50%;background:radial-gradient(ellipse,#34231380,transparent 70%);pointer-events:none;z-index:1}
.paytak-ground{left:28.5%;top:83.9%;width:10%}
.almila-ground{left:63%;top:83.9%;width:10%}
.chapter-walker{width:14.77%;height:35%;left:33.38%;top:84.4%}
.distant-seed{left:48.3%;top:27.5%;width:4.2%;height:9%}
.chapter-departing .chapter-almila{animation:none}

.chapter-continue{top:81.5%;height:13%}

.chapter-editor{position:absolute;inset:0;pointer-events:none}.chapter-editor button{pointer-events:auto}.chapter-code-panel{position:absolute;left:55.4%;top:20.5%;width:41%;height:48.5%}.chapter-code-board{width:100%;height:100%;display:block}.chapter-code-slots{position:absolute;inset:0}.chapter-code-slot{position:absolute;width:15.25%;height:22%;border-radius:18%}.chapter-code-slot img{width:100%;height:100%;object-fit:fill;animation:command-seat .18s ease-out;filter:drop-shadow(0 2px 1px #79522b70)}.chapter-star-board{position:absolute;left:61.9%;top:12%;width:28%;height:14%;object-fit:fill}.chapter-control-tray{position:absolute;left:56.8%;top:66%;width:40.2%;height:15%;object-fit:fill}.chapter-command{top:68%;width:7.3%;height:12.98%;border-radius:20%}.chapter-command-up,.chapter-command-al{left:58.1%}.chapter-command-right{left:65.8%}.chapter-command-down{left:73.5%}.chapter-command-left{left:81.2%}.chapter-command-delete{left:89%;width:7%;height:12.44%}.chapter-command-al{top:81.5%}.chapter-command-retry{left:78%;top:85%;width:6.5%;height:11.56%}.chapter-command-run{left:87%;top:81.5%;width:10%;height:17.78%}.chapter-command:disabled{cursor:default}.chapter-command[data-command]:disabled{filter:brightness(.8)}

#brand-splash{position:absolute;inset:0;z-index:100;background:#fff;overflow:hidden}#brand-splash canvas{display:block;width:100%;height:100%}#settings[hidden]{display:none}

.splash-loading #game{background:#fff}.splash-loading #welcome,.splash-loading #settings{visibility:hidden}

#welcome-logo{position:absolute;left:31%;top:2.2%;width:38%;height:auto;z-index:1;pointer-events:none}

#welcome #continue{overflow:visible;border-radius:0}#welcome #continue .frame{visibility:visible;object-fit:contain}#welcome #continue.pressed,#welcome #continue:active{transform:translateY(3px) scale(.97);filter:brightness(.86)}

.chapter-intro-home{z-index:4}

/* Shared execution marker for all chapter command slots. */
.chapter-code-slot.command-active{outline:5px solid #fff52b;outline-offset:2px;box-shadow:0 0 0 2px #ffbc00,0 0 7px 4px #fff72b,0 0 17px 7px #ffda00cc,0 0 28px 9px #ffcf0066;z-index:3}.chapter-code-slot.command-active img{filter:drop-shadow(0 0 4px #fff83b)}
.chapter-mission-paytak{position:absolute;width:8%;height:12%;transform:translate(-50%,-100%);z-index:4;pointer-events:none}.chapter-mission-egg{position:absolute;left:31.5%;top:71%;width:3.1%;height:5.8%;object-fit:contain;z-index:2}.chapter-mission-nest{position:absolute;left:42.1%;top:71.7%;width:6%;height:7.4%;object-fit:contain;z-index:2}.chapter-mission-bird{position:absolute;left:44.4%;top:68.4%;width:3.7%;height:6%;object-fit:contain;z-index:3;transform-origin:50% 100%;animation:mission-bird-perch 3s ease-in-out infinite}.chapter-delivered-egg{position:absolute;left:44.6%;top:74.3%;width:1.6%;height:3%;object-fit:contain;z-index:3}.chapter-guide-hand{position:absolute;width:6%;height:10%;object-fit:contain;z-index:8;pointer-events:none;animation:mission-guide 1s ease-in-out infinite}.chapter-mission-stars{position:absolute;left:61.9%;top:12%;width:28%;height:14%;pointer-events:none;display:flex;align-items:center;justify-content:center;gap:1.4%}.chapter-mission-stars img{width:26.7%;height:78%;object-fit:fill}.chapter-mission-completion{position:absolute;inset:0;background:#0005;z-index:9;display:grid;place-items:center}.chapter-mission-completion button{position:relative;width:10%;height:18%;}.chapter-mission-completion[hidden],.chapter-guide-hand[hidden],.chapter-mission-stars[hidden],.chapter-delivered-egg[hidden],.chapter-mission-egg[hidden]{display:none}@keyframes mission-guide{50%{transform:translate(5px,-3px)}}@keyframes mission-bird-perch{50%{transform:rotate(2deg) translateY(-1px)}}

.chapter-mission-paytak{height:9%}
.chapter-mission-stars{display:block}.chapter-mission-stars img{position:absolute;width:19%;height:60%;top:20%;object-fit:fill}.chapter-mission-stars img:nth-child(1){left:19.5%}.chapter-mission-stars img:nth-child(2){left:40.5%}.chapter-mission-stars img:nth-child(3){left:62.5%}
.chapter-code-slot{transform:translate(-50%,-50%)}.chapter-code-slot img{object-fit:contain}.chapter-mission-egg,.chapter-mission-nest,.chapter-mission-bird,.chapter-delivered-egg{transform:translate(-50%,-50%)}.chapter-mission-bird{animation:mission-bird-centered 3s ease-in-out infinite}.chapter-guide-hand{width:4.5%;height:8%;animation:mission-guide 1s ease-in-out infinite}@keyframes mission-bird-centered{50%{transform:translate(-50%,-50%) rotate(2deg)}}
.chapter-mission-stars img{width:21.2%;height:57%;top:22%}.chapter-mission-stars img:nth-child(1){left:19.3%}.chapter-mission-stars img:nth-child(2){left:40.5%}.chapter-mission-stars img:nth-child(3){left:61.9%}.chapter-total-stars{position:absolute;left:68.4%;top:5.2%;width:15%;height:6%;display:flex;align-items:center;justify-content:center;gap:8px;pointer-events:none}.chapter-total-stars img{height:100%;width:auto;object-fit:contain}.chapter-total-stars .total-star-emblem{height:78%;filter:drop-shadow(0 2px 1px #713708)}

.chapter-completion-actions{display:flex;justify-content:center;align-items:center;gap:36px;width:30%;height:20%}.chapter-mission-completion .chapter-completion-actions button{width:42%;height:100%}.chapter-mission-transition{position:absolute;inset:0;background:#000;z-index:15;pointer-events:all}.chapter-mission-transition[hidden]{display:none}#chapter-two-map[data-mission="2"] .chapter-mission-egg{width:3%;height:7%}#chapter-two-map[data-mission="2"] .chapter-mission-nest{width:5.1%;height:9%}.chapter-mission-bird[hidden]{display:none}

.chapter-recycled-bottle{position:absolute;width:2%;height:5%;object-fit:contain;z-index:5;pointer-events:none}

.chapter-level-jump{position:absolute;left:11%;top:3%;width:6.5%;height:11.56%;z-index:8;border-radius:50%}.chapter-level-picker{position:absolute;left:18%;top:3%;width:37%;padding:1.2%;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;background:#b96827;border:5px solid #713508;border-radius:20px;z-index:10;box-shadow:0 5px 12px #17372280}.chapter-level-picker[hidden]{display:none}.chapter-level-picker .completed{box-shadow:inset 0 0 0 3px #fff29a,0 0 8px #ffd42d}.chapter-mission-next[hidden]{display:none}

.chapter-mission-stars img[hidden]{display:none}#chapter-two-map[data-mission="3"] .chapter-mission-egg{width:3.5%;height:6.5%}#chapter-two-map[data-mission="3"] .chapter-mission-nest{width:5.2%;height:8.5%}

.chapter-obstacles{position:absolute;inset:0;pointer-events:none;z-index:2}.chapter-rock{position:absolute;transform:translate(-50%,-50%);width:5%;height:7%;object-fit:contain}#chapter-two-map[data-mission="4"] .chapter-mission-egg{width:4%;height:6%}#chapter-two-map[data-mission="4"] .chapter-mission-nest{width:4.8%;height:9%}

.chapter-obstacle-river{object-fit:fill}.chapter-obstacle-trees{width:5%;height:8%}#chapter-two-map[data-mission="5"] .chapter-mission-nest{object-fit:fill}#chapter-two-map[data-mission="5"] .chapter-mission-egg{width:3.8%;height:6%}

.chapter-mission-bridge{position:absolute;transform:translate(-50%,-50%);object-fit:fill;z-index:2;pointer-events:none}.chapter-mission-bridge[hidden]{display:none}#chapter-two-map[data-mission="6"] .chapter-mission-egg{width:4%;height:6.5%}#chapter-two-map[data-mission="6"] .chapter-mission-nest{width:5.5%;height:10%;object-fit:contain}

#chapter-two-map[data-mission="6"] .chapter-mission-egg{transform:translate(-50%,-50%) scaleX(-1)}
#chapter-two-map[data-mission="6"] .chapter-delivered-egg{transform:translate(-50%,-50%) scaleX(-1)}

#chapter-two-map[data-mission="7"] .chapter-mission-egg{width:4.2%;height:6.7%;object-fit:contain}#chapter-two-map[data-mission="7"] .chapter-mission-nest{width:5%;height:11%;object-fit:contain}.chapter-delivered-tools{width:2.5%;height:4%;object-fit:contain}

#chapter-two-map[data-mission="8"] .chapter-mission-egg,#chapter-two-map[data-mission="9"] .chapter-mission-egg,#chapter-two-map[data-mission="10"] .chapter-mission-egg{width:4.3%;height:6.8%;object-fit:contain}#chapter-two-map[data-mission="8"] .chapter-mission-nest,#chapter-two-map[data-mission="9"] .chapter-mission-nest,#chapter-two-map[data-mission="10"] .chapter-mission-nest{width:5.4%;height:8%;object-fit:contain}.chapter-tree-glow{position:absolute;width:10%;height:18%;border-radius:50%;background:radial-gradient(ellipse,#fffab5cc,#ffe44270 40%,transparent 70%);z-index:5;pointer-events:none}.chapter-map-reward{z-index:5}

#chapter-two-map[data-mission="10"] .chapter-mission-nest{width:7%;height:14%;transform:translate(-50%,-65%);object-fit:contain}

#chapter-two-map[data-mission="10"] .chapter-mission-nest{width:5.3%;height:12%;transform:translate(-50%,-100%);transform-origin:50% 100%;z-index:3}

#chapter-two-map[data-mission="10"] .chapter-mission-nest{height:auto}

#chapter-two-map[data-mission="10"] .chapter-mission-nest{width:7.2%}

/* Existing six by six adventure is now chapter three. */

/* Chapter two entrance: independent characters, seed and background layers. */
#chapter-three-intro [hidden],#chapter-three-map [hidden]{display:none}
#chapter-three-map[data-mission="2"] .chapter-mission-egg{width:3%;height:7%}
#chapter-three-map[data-mission="2"] .chapter-mission-nest{width:5.1%;height:9%}
#chapter-three-map[data-mission="3"] .chapter-mission-egg{width:3.5%;height:6.5%}
#chapter-three-map[data-mission="3"] .chapter-mission-nest{width:5.2%;height:8.5%}
#chapter-three-map[data-mission="4"] .chapter-mission-egg{width:4%;height:6%}
#chapter-three-map[data-mission="4"] .chapter-mission-nest{width:4.8%;height:9%}
#chapter-three-map[data-mission="5"] .chapter-mission-nest{object-fit:fill}
#chapter-three-map[data-mission="5"] .chapter-mission-egg{width:3.8%;height:6%}
#chapter-three-map[data-mission="6"] .chapter-mission-egg{width:4%;height:6.5%}
#chapter-three-map[data-mission="6"] .chapter-mission-nest{width:5.5%;height:10%;object-fit:contain}


#chapter-three-map[data-mission="6"] .chapter-mission-egg{transform:translate(-50%,-50%) scaleX(-1)}

#chapter-three-map[data-mission="6"] .chapter-delivered-egg{transform:translate(-50%,-50%) scaleX(-1)}


#chapter-three-map[data-mission="7"] .chapter-mission-egg{width:4.2%;height:6.7%;object-fit:contain}
#chapter-three-map[data-mission="7"] .chapter-mission-nest{width:5%;height:11%;object-fit:contain}


#chapter-three-map[data-mission="8"] .chapter-mission-egg,#chapter-three-map[data-mission="9"] .chapter-mission-egg,#chapter-three-map[data-mission="10"] .chapter-mission-egg{width:4.3%;height:6.8%;object-fit:contain}
#chapter-three-map[data-mission="8"] .chapter-mission-nest,#chapter-three-map[data-mission="9"] .chapter-mission-nest,#chapter-three-map[data-mission="10"] .chapter-mission-nest{width:5.4%;height:8%;object-fit:contain}


#chapter-three-map[data-mission="10"] .chapter-mission-nest{width:7%;height:14%;transform:translate(-50%,-65%);object-fit:contain}


#chapter-three-map[data-mission="10"] .chapter-mission-nest{width:5.3%;height:12%;transform:translate(-50%,-100%);transform-origin:50% 100%;z-index:3}


#chapter-three-map[data-mission="10"] .chapter-mission-nest{height:auto}


#chapter-three-map[data-mission="10"] .chapter-mission-nest{width:7.2%}

/* Four-direction chapter two: 4x4 grid and ten command slots. */
#journey-map .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#journey-map .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#journey-map .chapter-code-board{width:100%;height:100%;object-fit:fill}
#journey-map .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#journey-map .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#journey-map .chapter-command{top:69%;width:8%;height:13%}
#journey-map .chapter-command-up{left:58%}#journey-map .chapter-command-right{left:66.2%}#journey-map .chapter-command-down{left:74.4%}#journey-map .chapter-command-left{left:82.6%}#journey-map .chapter-command-delete{left:90.8%}
#journey-map .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#journey-map .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#journey-map .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#journey-map .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
.journey-goal,.journey-checkpoint,.journey-obstacle{position:absolute;transform:translate(-50%,-50%);object-fit:contain;z-index:2;pointer-events:none}.journey-checkpoint{z-index:3;filter:drop-shadow(0 0 6px #ffe250);animation:journey-target 2s ease-in-out infinite}.journey-goal-waiting{opacity:.5}.journey-obstacle{object-fit:fill}.journey-checkpoint[hidden]{display:none}
#journey-map[data-level="2"] .journey-goal,#journey-map[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
@keyframes journey-target{50%{transform:translate(-50%,-52%) rotate(1deg)}}
.journey-intro-paytak,.journey-intro-almila,.journey-intro-sign{position:absolute;object-fit:contain;transform:translate(-50%,-100%)}.journey-intro-paytak{left:27%;top:85%;width:16%;height:40%}.journey-intro-almila{left:76%;top:83%;width:22%;height:52%;animation:journey-breathe 3s ease-in-out infinite}.journey-intro-sign{left:52%;top:59%;width:16%;height:25%}.journey-continue{position:absolute;left:34%;top:80%;width:32%;height:17%}.journey-intro-home{position:absolute;left:3%;top:4%;width:9%;height:16%}
@keyframes journey-breathe{50%{transform:translate(-50%,-100%) translateY(-2px)}}
.chapter-badge-replacement{position:absolute;left:30%;top:4.7%;width:42%;height:17.5%;border-radius:18%;background:linear-gradient(120deg,#fffef2,#f9edc6);pointer-events:none}.chapter-badge-digit{position:absolute!important;left:40%!important;top:7%!important;width:20%!important;height:13%!important;object-fit:contain!important;pointer-events:none}

#journey-map .chapter-code-panel{top:27%;height:41%}#journey-map .chapter-star-board,#journey-map .chapter-mission-stars{top:10%}#journey-map .chapter-total-stars{top:3.5%;height:5.5%}

/* Four-chapter progression: preserve established geometry. */
#chapter-four-intro [hidden],#chapter-four-map [hidden]{display:none}
#chapter-four-map[data-mission="2"] .chapter-mission-egg{width:3%;height:7%}
#chapter-four-map[data-mission="2"] .chapter-mission-nest{width:5.1%;height:9%}
#chapter-four-map[data-mission="3"] .chapter-mission-egg{width:3.5%;height:6.5%}
#chapter-four-map[data-mission="3"] .chapter-mission-nest{width:5.2%;height:8.5%}
#chapter-four-map[data-mission="4"] .chapter-mission-egg{width:4%;height:6%}
#chapter-four-map[data-mission="4"] .chapter-mission-nest{width:4.8%;height:9%}
#chapter-four-map[data-mission="5"] .chapter-mission-nest{object-fit:fill}
#chapter-four-map[data-mission="5"] .chapter-mission-egg{width:3.8%;height:6%}
#chapter-four-map[data-mission="6"] .chapter-mission-egg{width:4%;height:6.5%}
#chapter-four-map[data-mission="6"] .chapter-mission-nest{width:5.5%;height:10%;object-fit:contain}
#chapter-four-map[data-mission="6"] .chapter-mission-egg{transform:translate(-50%,-50%) scaleX(-1)}
#chapter-four-map[data-mission="6"] .chapter-delivered-egg{transform:translate(-50%,-50%) scaleX(-1)}
#chapter-four-map[data-mission="7"] .chapter-mission-egg{width:4.2%;height:6.7%;object-fit:contain}
#chapter-four-map[data-mission="7"] .chapter-mission-nest{width:5%;height:11%;object-fit:contain}
#chapter-four-map[data-mission="8"] .chapter-mission-egg,#chapter-four-map[data-mission="9"] .chapter-mission-egg,#chapter-four-map[data-mission="10"] .chapter-mission-egg{width:4.3%;height:6.8%;object-fit:contain}
#chapter-four-map[data-mission="8"] .chapter-mission-nest,#chapter-four-map[data-mission="9"] .chapter-mission-nest,#chapter-four-map[data-mission="10"] .chapter-mission-nest{width:5.4%;height:8%;object-fit:contain}
#chapter-four-map[data-mission="10"] .chapter-mission-nest{width:7%;height:14%;transform:translate(-50%,-65%);object-fit:contain}
#chapter-four-map[data-mission="10"] .chapter-mission-nest{width:5.3%;height:12%;transform:translate(-50%,-100%);transform-origin:50% 100%;z-index:3}
#chapter-four-map[data-mission="10"] .chapter-mission-nest{height:auto}
#chapter-four-map[data-mission="10"] .chapter-mission-nest{width:7.2%}
#carry-map .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#carry-map .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#carry-map .chapter-code-board{width:100%;height:100%;object-fit:fill}
#carry-map .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#carry-map .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#carry-map .chapter-command{top:69%;width:8%;height:13%}
#carry-map .chapter-command-up{left:58%}#carry-map .chapter-command-right{left:66.2%}#carry-map .chapter-command-down{left:74.4%}#carry-map .chapter-command-left{left:82.6%}#carry-map .chapter-command-delete{left:90.8%}
#carry-map .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#carry-map .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#carry-map .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#carry-map .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
#carry-map[data-level="2"] .journey-goal,#carry-map[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
#carry-map .chapter-code-panel{top:27%;height:41%}#carry-map .chapter-star-board,#carry-map .chapter-mission-stars{top:10%}#carry-map .chapter-total-stars{top:3.5%;height:5.5%}
#carry-map .chapter-command-al{left:58%;top:84%;width:8%;height:13%}.carry-item,.carry-delivered{position:absolute;object-fit:contain;transform:translate(-50%,-50%);z-index:2;pointer-events:none}.carry-item[hidden],.carry-delivered[hidden]{display:none}#carry-map .chapter-guide-hand{width:4.5%;height:8%}

.chapter-carry-emblem{position:absolute!important;left:7%!important;top:30%!important;width:57%!important;height:43%!important;object-fit:contain!important;pointer-events:none}

/* Orman Dostları Şenliği — bağımsız üçüncü bölüm. */
#carry-intro .journey-intro-paytak{left:25%;top:82%;width:15%;height:37%}
#carry-intro .journey-intro-almila{left:77%;top:82%;width:23%;height:53%;animation:none;filter:drop-shadow(0 8px 5px #4a351744)}
#carry-intro .journey-continue{top:79%;left:34%;width:32%;height:17%}
#carry-map .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}
#carry-map.festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}
@keyframes festival-shimmer{50%{opacity:.3;transform:translateY(-8px)}}

.festival-intro-paytak{position:absolute;left:25%;top:82%;width:15%;height:37%;transform:translate(-50%,-100%);filter:drop-shadow(0 7px 5px #4a351755)}.festival-intro-paytak[hidden],#carry-intro .journey-intro-paytak[hidden]{display:none}

.festival-pinwheel{position:absolute;transform:translate(-50%,-100%);z-index:3;pointer-events:none}.festival-pinwheel i{position:absolute;left:46%;top:35%;width:8%;height:65%;border-radius:5px;background:linear-gradient(90deg,#6b3514,#eebd70,#9e602a);box-shadow:0 0 0 1px #542f14}.festival-pinwheel svg{position:absolute;left:0;top:0;width:100%;height:65%;overflow:visible}.festival-spinning-blades{transform-box:fill-box;transform-origin:center;animation:festival-spin 3s linear infinite}@keyframes festival-spin{to{transform:rotate(360deg)}}

img.festival-intro-paytak{object-fit:contain;object-position:center bottom}

/* Current game indicator shared across all chapters. */
.current-game-number{position:absolute;left:18.5%;top:4%;width:5.7%;height:9%;display:flex;align-items:center;justify-content:flex-start;gap:2%;z-index:8;pointer-events:none;filter:drop-shadow(0 2px 0 #60320d) drop-shadow(1px 0 0 #60320d) drop-shadow(-1px 0 0 #60320d) drop-shadow(0 0 3px #ffec65)}
.current-game-digit{display:block;width:47%;height:100%;mask-size:contain;mask-position:center;mask-repeat:no-repeat;-webkit-mask-size:contain;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;background:linear-gradient(#fff9bd 0%,#fff34a 24%,#ffd600 55%,#fff473 72%,#d99300 100%)}.current-game-digit img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply;opacity:.25}
.jump-number.current-game,.chapter-level-picker .jump-number.current-game.completed{border-color:#fff93a;outline:2px solid #fff36a;box-shadow:inset 0 0 9px 3px #ffff5a,0 0 8px 4px #ffe600,0 0 18px 6px #fff50099;background:#ffdb62;position:relative;z-index:1}
#level-picker,.chapter-level-picker{left:11%;top:15%;width:39%}
.completion-caption{position:absolute;left:20%;top:65%;width:60%;margin:0;text-align:center;color:#fff29b;font-family:'Trebuchet MS',Arial,sans-serif;font-size:clamp(16px,2.8vw,60px);font-weight:900;line-height:1.25;text-shadow:0 3px 0 #6c340f,2px 0 #6c340f,-2px 0 #6c340f,0 -1px #6c340f,0 5px 8px #0009;pointer-events:none}
#carry-intro .journey-intro-almila canvas{display:block;width:100%;height:100%}

/* Shared embossed chapter caption and original score numerals. */
.current-game-number{filter:drop-shadow(0 3px 2px #38220a88);width:7%;gap:0;align-items:center}
.current-game-digit{width:auto;height:100%;max-width:50%;object-fit:contain;background:none;mask-image:none!important;-webkit-mask-image:none!important;flex-shrink:0}
.completion-caption{font-family:"Arial Rounded MT Bold","Arial Black",Arial,sans-serif;font-weight:900;color:#542205;-webkit-text-stroke:clamp(1px,.13vw,3px) #ffc85b;paint-order:stroke fill;letter-spacing:.015em;text-shadow:0 -1px 0 #ffebaa,0 2px 0 #a95712,0 4px 0 #743306,0 6px 0 #301202,0 8px 6px #0009}

.current-game-number>.current-game-digit{max-width:none;object-fit:fill}

.completion-caption{color:#ffe238;-webkit-text-stroke:clamp(2px,.26vw,6px) #633008;font-family:"Arial Black","Arial Rounded MT Bold",Arial,sans-serif;font-weight:900;text-shadow:0 -2px 0 #fff6ad,0 3px 0 #bd790d,0 6px 0 #512508,0 9px 5px #0008;letter-spacing:.025em}
.shared-editor-bird{position:absolute;left:89.8%;top:19.2%;width:7.5%;height:10%;object-fit:contain;z-index:5;pointer-events:none;transform-origin:40% 96%;animation:bird-perch 4.8s ease-in-out infinite}
#chapter-four-map .shared-editor-bird{top:12.7%;left:88.4%}
@media(prefers-reduced-motion:reduce){.shared-editor-bird{animation:none}}
.shared-editor-bird{top:23.4%}
#chapter-four-map .shared-editor-bird{top:17%}
/* Exact requested family when installed; font asset can be embedded on delivery. */
@font-face{font-family:'Paytak TT Rounds Condensed Black';src:local('TT Rounds Condensed Black'),local('TTRoundsCondensed-Black');font-weight:900;font-style:normal;font-display:swap}
.completion-caption{font-family:'Paytak TT Rounds Condensed Black','Arial Black',sans-serif;color:#ffe238;-webkit-text-stroke:clamp(2px,.22vw,5px) #602807;paint-order:stroke fill;text-shadow:0 -1px 0 #fff6b0,0 2px 0 #e79816,0 4px 0 #a74b0c,0 6px 0 #4c2005,0 8px 5px #0009}
@font-face{font-family:'Paytak Coiny';src:url('assets/Coiny-Regular.otf') format('opentype');font-weight:400;font-style:normal;font-display:swap}
.completion-caption{font-family:'Paytak Coiny',sans-serif;font-weight:400;font-synthesis:none}
.completion-caption{-webkit-text-stroke:clamp(3px,.32vw,7px) #542205;paint-order:stroke fill;text-shadow:0 3px 0 #a95712,0 5px 0 #542205,0 7px 4px #0008}
.completion-caption{-webkit-text-stroke:clamp(5px,.55vw,12px) #542205}

.repair-map .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
.repair-map .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
.repair-map .chapter-code-board{width:100%;height:100%;object-fit:fill}
.repair-map .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
.repair-map .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
.repair-map .chapter-command{top:69%;width:8%;height:13%}
.repair-map .chapter-command-up{left:58%}
.repair-map .chapter-command-right{left:66.2%}
.repair-map .chapter-command-down{left:74.4%}
.repair-map .chapter-command-left{left:82.6%}
.repair-map .chapter-command-delete{left:90.8%}
.repair-map .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}
.repair-map .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
.repair-map .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
.repair-map .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
.repair-map[data-level="2"] .journey-goal,.repair-map[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
.repair-map .chapter-code-panel{top:27%;height:41%}
.repair-map .chapter-star-board,.repair-map .chapter-mission-stars{top:10%}
.repair-map .chapter-total-stars{top:3.5%;height:5.5%}
.repair-intro .journey-intro-paytak{position:absolute;left:27%;top:85%;width:18%;height:38%;object-fit:contain;transform:translate(-50%,-100%)}
.repair-map .chapter-code-slot{cursor:pointer;pointer-events:auto;padding:0;border:0;background:transparent}
.repair-map .chapter-code-slot.repair-selected{outline:5px solid #fff22a;box-shadow:0 0 14px 5px #ffe500;z-index:4}
.repair-gap{background:#ffd94a55!important;border:4px dashed #ffb927!important;box-sizing:border-box;border-radius:20%;animation:repair-pulse 1.5s ease-in-out infinite}
.repair-locked{cursor:default!important}
.repair-map .shared-editor-bird{top:23.4%}
@keyframes repair-pulse{50%{box-shadow:inset 0 0 15px #fff082,0 0 10px #ffd727}}
@media(prefers-reduced-motion:reduce){.repair-gap{animation:none}}

.repair-card-emblem{position:absolute;left:9%;top:27%;width:70%;height:41%;background:linear-gradient(#bce934,#80c620);border-radius:20%;display:flex;align-items:center;justify-content:center;gap:3%;box-shadow:0 2px 2px #3e7207;pointer-events:none}
.repair-card-emblem img,.repair-card-gap{width:43%;height:82%;object-fit:contain}
.repair-card-gap{border:3px dashed #ffdd32;border-radius:18%;background:#ffee7c66;box-sizing:border-box}
.repair-card-wrong{filter:drop-shadow(0 0 3px #ff7830)}
.repair-map .shared-editor-bird{top:18.9%}

.repair-intro-code{position:absolute;left:54%;top:36%;width:35%;height:23%;border:clamp(4px,.7vw,15px) solid #8c4418;border-radius:9%;background:linear-gradient(#ffe6a4,#efb968);box-shadow:inset 0 3px 0 #fff4b4,0 8px 0 #59260d,0 15px 20px #0005;display:flex;align-items:center;justify-content:center;gap:4%;box-sizing:border-box}
.repair-intro-code img,.repair-intro-code .repair-card-gap{width:26%;height:80%;object-fit:contain}
.repair-intro-error{filter:drop-shadow(0 0 7px #ff8b27);animation:repair-pulse 2s infinite}
.repair-map .shared-editor-bird{top:23.4%}

#repair-map-3 .journey-goal{filter:brightness(.78) saturate(.9);transition:filter .65s}
#repair-map-3 .journey-goal.light-garden-awake{filter:brightness(1.15) saturate(1.1) drop-shadow(0 0 12px #ffed83);animation:light-garden-glow 2s ease-in-out infinite}
#repair-map-4 .journey-goal.wind-workshop-awake{animation:wind-workshop-sway 1.4s ease-in-out infinite;transform-origin:50% 80%}
@keyframes light-garden-glow{50%{filter:brightness(1.28) drop-shadow(0 0 20px #ffe86c)}}
@keyframes wind-workshop-sway{0%,100%{transform:translate(-50%,-50%) rotate(-2deg)}50%{transform:translate(-50%,-50%) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){#repair-map-3 .journey-goal,#repair-map-4 .journey-goal{animation:none}}

.repair-card-emblem img:only-child{width:95%;height:98%;object-fit:contain}

/* Grounded, centered introductions. Character proportions are preserved. */
.repair-intro .journey-intro-paytak{left:50%;top:78%;width:15%;height:auto;object-fit:contain;z-index:2}
.repair-paytak-shadow{position:absolute;left:50%;top:78%;width:12%;height:2.5%;background:radial-gradient(ellipse,#39221266,transparent 70%);transform:translate(-50%,-50%);pointer-events:none;z-index:1}
#repair-map-3 .journey-goal,#repair-map-4 .journey-goal{filter:none;animation:none}
.concept-challenge{position:absolute;inset:0;background:#172b1acc;z-index:12;display:grid;place-items:center}
.concept-challenge[hidden]{display:none}
.concept-board{width:64%;height:84%;box-sizing:border-box;border:clamp(4px,.7vw,15px) solid #9b541d;border-radius:5%;background:linear-gradient(#fff1c7,#f5cf8a);box-shadow:inset 0 3px #fff8dd,0 6px #592b0e,0 14px 30px #0006;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5%;padding:2%}
.concept-model{display:flex;justify-content:center;gap:8%;width:80%;height:38%;pointer-events:none}
.concept-model-card{width:42%;height:100%;position:relative;border:3px solid #b88d55;border-radius:12%;background:#fffaf0}
.concept-model-card.concept-example{outline:clamp(3px,.4vw,8px) solid #ffc828;box-shadow:0 0 0 3px #804715,0 0 16px #ffe438}
.concept-picture{position:relative;width:100%;height:100%;overflow:hidden}
.concept-picture img{position:absolute;transform:translate(-50%,-50%);pointer-events:none}
.concept-example-hand{position:absolute;width:32%;height:48%;right:-12%;bottom:-12%;object-fit:contain;z-index:3}
.concept-match-arrow{width:9%;height:10%;display:grid;place-items:center}
.concept-match-arrow svg{width:100%;height:100%}
.concept-choices{width:91%;height:43%;display:flex;justify-content:center;gap:7%}
.concept-choice{width:43%;height:100%;padding:0;border:clamp(3px,.35vw,7px) solid #814817;border-radius:12%;background:#fff9e8;box-shadow:0 5px #a4692a;cursor:pointer;touch-action:manipulation}
.concept-choice:active{transform:translateY(3px);box-shadow:0 2px #a4692a}
.concept-choice:focus-visible{outline:4px solid #fff032;outline-offset:3px}
.concept-choice.concept-correct{outline:5px solid #64d93b;background:#edffcf;box-shadow:0 0 20px #a7ff42}

.concept-back{position:absolute;left:4%;top:6%;width:7%;height:12.44%;padding:0;border:0;background:transparent;cursor:pointer}.concept-back img{width:100%;height:100%;object-fit:contain}

/* Keep concept emblems inside their own area; locks remain a separate top layer. */
.repair-card-emblem{left:7%;top:25%;width:55%;height:44%;box-shadow:none}
.treasure-card .chapter-lock,.chapter-one-open .chapter-lock{z-index:3;pointer-events:none}
.chapter-badge-replacement,.chapter-badge-digit{z-index:4}

/* Shared command editing: white selection is distinct from yellow execution. */
.command-edit-slot,.command-drag-source{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.chapter-code-slot.command-edit-slot{pointer-events:auto;cursor:grab}
.command-edit-slot img,.command-drag-source img{pointer-events:none;-webkit-user-drag:none}
.command-edit-slot.command-selected,.repair-map .chapter-code-slot.repair-selected.command-selected{outline:4px solid #fff;outline-offset:1px;box-shadow:0 0 0 2px #78502c,0 0 12px 3px #ffffffb0;z-index:5;border-radius:16%}
.command-drop-before,.command-drop-after,.command-drop-fill{z-index:7!important;outline:3px dashed #fff!important;outline-offset:2px;background:#ffffff40;border-radius:16%;box-shadow:0 0 12px #fff!important}
.command-drop-before:before,.command-drop-after:after{content:'';position:absolute;top:0;bottom:0;width:5px;background:#fff;border-radius:5px;box-shadow:0 0 8px #fff}
.command-drop-before:before{left:-5px}.command-drop-after:after{right:-5px}
.command-drag-origin{opacity:.35}.command-trash-target{filter:brightness(1.25) drop-shadow(0 0 9px #fff)!important;outline:3px solid white;outline-offset:2px}
.command-drag-ghost{position:fixed;z-index:2147483000;pointer-events:none;object-fit:contain;transform:translate(-50%,-50%) scale(1.06);filter:drop-shadow(0 8px 6px #35210a88);opacity:.94}
.command-editor-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;pointer-events:none}
#free-commands .free-command-slot{position:absolute;width:6.35%;height:10.4%;pointer-events:auto;border-radius:16%}
#free-commands .free-command-slot img{position:static;width:100%;height:100%;object-fit:contain}
#free-commands .free-command-slot.command-active{outline:5px solid #fff52b;outline-offset:2px;box-shadow:0 0 0 2px #ffbc00,0 0 7px 4px #fff72b,0 0 17px 7px #ffda00cc;z-index:6}
#queued-right,#queued-up{pointer-events:none}

/* Complete one action, then wait for the next tap. */
.command-step{position:absolute;left:78%;top:85%;width:6.5%;height:11.56%;pointer-events:auto;z-index:9;border-radius:50%}
.command-step>img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.command-step>span{position:absolute;inset:19%;border-radius:50%;background:linear-gradient(#56dc26,#209b17);box-shadow:inset 0 2px 3px #abf878,inset 0 -2px 3px #136c18;display:grid;place-items:center;pointer-events:none}
.command-step svg{width:85%;height:85%;fill:#fff;stroke:#267424;stroke-width:2;stroke-linejoin:round;filter:drop-shadow(0 2px 1px #165b27)}
.command-step:disabled{filter:brightness(.72);cursor:default}
.chapter-editor .chapter-command-retry{left:70.5%}
#tutorial .command-step{left:81.2%;top:82%;width:7%;height:12.44%}
#tutorial #tutorial-retry{left:73.3%}
.command-error{animation:command-error-pulse 1.5s ease-in-out infinite!important;outline:5px solid #fff52b!important;outline-offset:2px;border-radius:16%;z-index:8!important}
@keyframes command-error-pulse{0%,100%{outline-color:#a77b16;box-shadow:0 0 2px 1px #b88a1a}50%{outline-color:#ffff83;box-shadow:0 0 0 2px #ffbc00,0 0 9px 5px #fff72b,0 0 22px 8px #ffda00cc}}
.command-route-error{border-radius:6%;animation:command-route-pulse 1.8s ease-in-out infinite!important}
@keyframes command-route-pulse{0%,100%{filter:drop-shadow(0 0 1px #e6b34430)}50%{filter:drop-shadow(0 0 8px #ffdc55b0)}}
@media(prefers-reduced-motion:reduce){.command-error{animation:none!important;outline-color:#fff52b!important;box-shadow:0 0 9px #ffdf36}.command-route-error{animation:none!important;filter:drop-shadow(0 0 6px #ffdc55)}}
#game .chapter-editor .chapter-command-retry{left:70.5%}

/* Prediction chapter shares the established forest board geometry. */
#prediction-map .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#prediction-map .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#prediction-map .chapter-code-board{width:100%;height:100%;object-fit:fill}
#prediction-map .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#prediction-map .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#prediction-map .chapter-command{top:69%;width:8%;height:13%}
#prediction-map .chapter-command-up{left:58%}#prediction-map .chapter-command-right{left:66.2%}#prediction-map .chapter-command-down{left:74.4%}#prediction-map .chapter-command-left{left:82.6%}#prediction-map .chapter-command-delete{left:90.8%}
#prediction-map .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#prediction-map .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#prediction-map .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#prediction-map .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
#prediction-map .chapter-code-panel{top:27%;height:41%}#prediction-map .chapter-star-board,#prediction-map .chapter-mission-stars{top:10%}#prediction-map .chapter-total-stars{top:3.5%;height:5.5%}
#prediction-map .journey-goal,#prediction-map .journey-checkpoint,#prediction-map .chapter-control-tray{display:none}
.prediction-choices{position:absolute;inset:0;pointer-events:none;z-index:5}
.prediction-cell{position:absolute;transform:translate(-50%,-50%);background:transparent;border:0;border-radius:14%;pointer-events:auto;cursor:pointer;touch-action:manipulation}
.prediction-cell:disabled{pointer-events:none}.prediction-cell span{display:none}
.prediction-cell.prediction-chosen{outline:4px dashed #fff;box-shadow:0 0 12px #ffe959;background:#ffe44855}
.prediction-cell.prediction-chosen span{display:grid;place-items:center;position:absolute;inset:20%;border-radius:50%;background:#ffdd3b;color:#6a330c;font-family:"Paytak Coiny",sans-serif;font-size:clamp(20px,4vw,58px);text-shadow:0 2px white}
.prediction-cell.prediction-wrong{outline-color:#ffad85;background:#f7776640}.prediction-cell.prediction-answer{outline:5px solid #fff568;box-shadow:0 0 18px #ffdf33;background:#fff39245}
.prediction-cell.prediction-answer span{display:none}
#prediction-map .chapter-mission-paytak{pointer-events:none;z-index:6}
#prediction-map .chapter-code-slots{pointer-events:none}
.prediction-flow{position:absolute;left:63%;top:71%;width:28%;height:10%;display:flex;align-items:center;justify-content:space-around;gap:4%;color:#fff5a2;font-size:clamp(20px,3vw,42px);text-shadow:0 2px 2px #613409}
.prediction-flow img{height:95%;width:24%;object-fit:contain}.prediction-flow b{font-family:"Paytak Coiny",sans-serif;color:#ffdc39;font-size:1.2em;-webkit-text-stroke:1px #754012}
.prediction-awaiting .prediction-flow b{animation:prediction-question 1.6s ease-in-out infinite}@keyframes prediction-question{50%{transform:scale(1.15)}}
#prediction-intro .journey-intro-paytak{left:48%;top:85%;width:16%}
#prediction-intro .journey-intro-sign{display:none}

.prediction-card-question{position:absolute;left:12%;top:28%;width:48%;height:42%;display:grid;place-items:center;border-radius:50%;background:linear-gradient(#fff36b,#f4a91a);font-family:"Paytak Coiny",sans-serif;font-size:clamp(24px,5vw,82px);color:#713713;-webkit-text-stroke:1px #fff3a3;box-shadow:inset 0 3px 3px #fff4b7,0 3px 2px #663a16}

.prediction-intro-puzzle{position:absolute;left:32%;top:22%;width:36%;height:16%;display:flex;align-items:center;justify-content:center;gap:5%;filter:drop-shadow(0 4px 3px #62441670);color:#fff3aa;font-size:clamp(24px,5vw,75px)}.prediction-intro-puzzle img{height:90%;width:24%;object-fit:contain}.prediction-intro-puzzle b{font-family:"Paytak Coiny",sans-serif;color:#ffe142;-webkit-text-stroke:2px #763b13;font-size:1.5em}

#prediction-map .prediction-guide-hand{z-index:20;pointer-events:none;width:4.5%;height:8%;object-fit:contain}

/* Renk ve Şekil Bahçesi */
#matching-map .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#matching-map .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#matching-map .chapter-code-board{width:100%;height:100%;object-fit:fill}
#matching-map .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#matching-map .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#matching-map .chapter-command{top:69%;width:8%;height:13%}
#matching-map .chapter-command-up{left:58%}#matching-map .chapter-command-right{left:66.2%}#matching-map .chapter-command-down{left:74.4%}#matching-map .chapter-command-left{left:82.6%}#matching-map .chapter-command-delete{left:90.8%}
#matching-map .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#matching-map .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#matching-map .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#matching-map .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
#matching-map[data-level="2"] .journey-goal,#matching-map[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
#matching-map .chapter-code-panel{top:27%;height:41%}#matching-map .chapter-star-board,#matching-map .chapter-mission-stars{top:10%}#matching-map .chapter-total-stars{top:3.5%;height:5.5%}
#matching-map .chapter-command-al{left:58%;top:84%;width:8%;height:13%}.carry-item,.carry-delivered{position:absolute;object-fit:contain;transform:translate(-50%,-50%);z-index:2;pointer-events:none}.carry-item[hidden],.carry-delivered[hidden]{display:none}#matching-map .chapter-guide-hand{width:4.5%;height:8%}
#matching-map .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}
#matching-map.festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}
#matching-intro .festival-intro-paytak{left:48%;top:82%;width:17%}#matching-intro .journey-intro-almila{display:none}
#matching-map .matching-option{pointer-events:none}#matching-map .matching-flying-piece{z-index:6;pointer-events:none}
#matching-map.matching-mismatch .journey-goal{animation:matching-shake .5s ease-in-out 2;filter:drop-shadow(0 0 8px #ff9655)}
@keyframes matching-shake{25%{transform:translate(-53%,-50%)}75%{transform:translate(-47%,-50%)}}

.matching-card-emblem{position:absolute;left:9%;top:29%;width:51%;height:42%;display:flex;align-items:center}.matching-card-emblem img{width:60%;height:90%;object-fit:contain;filter:drop-shadow(0 2px 1px #5e3618)}.matching-card-emblem img+img{margin-left:-18%}

/* Repeat and final integration chapters share the established board dimensions. */
#advanced-map-9 .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#advanced-map-9 .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#advanced-map-9 .chapter-code-board{width:100%;height:100%;object-fit:fill}
#advanced-map-9 .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#advanced-map-9 .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#advanced-map-9 .chapter-command{top:69%;width:8%;height:13%}
#advanced-map-9 .chapter-command-up{left:58%}#advanced-map-9 .chapter-command-right{left:66.2%}#advanced-map-9 .chapter-command-down{left:74.4%}#advanced-map-9 .chapter-command-left{left:82.6%}#advanced-map-9 .chapter-command-delete{left:90.8%}
#advanced-map-9 .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#advanced-map-9 .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#advanced-map-9 .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#advanced-map-9 .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
#advanced-map-9[data-level="2"] .journey-goal,#advanced-map-9[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
#advanced-map-9 .chapter-code-panel{top:27%;height:41%}#advanced-map-9 .chapter-star-board,#advanced-map-9 .chapter-mission-stars{top:10%}#advanced-map-9 .chapter-total-stars{top:3.5%;height:5.5%}
#advanced-map-9 .chapter-command-al{left:58%;top:84%;width:8%;height:13%}.carry-item,.carry-delivered{position:absolute;object-fit:contain;transform:translate(-50%,-50%);z-index:2;pointer-events:none}.carry-item[hidden],.carry-delivered[hidden]{display:none}#advanced-map-9 .chapter-guide-hand{width:4.5%;height:8%}
#advanced-map-9 .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}
#advanced-map-9.festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}
#advanced-intro-9 .festival-intro-paytak{left:48%;top:82%;width:17%}#advanced-intro-9 .journey-intro-almila{display:none}
#advanced-map-9 .matching-option{pointer-events:none}#advanced-map-9 .matching-flying-piece{z-index:6;pointer-events:none}
#advanced-map-9.matching-mismatch .journey-goal{animation:matching-shake .5s ease-in-out 2;filter:drop-shadow(0 0 8px #ff9655)}
#advanced-map-10 .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
#advanced-map-10 .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
#advanced-map-10 .chapter-code-board{width:100%;height:100%;object-fit:fill}
#advanced-map-10 .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
#advanced-map-10 .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
#advanced-map-10 .chapter-command{top:69%;width:8%;height:13%}
#advanced-map-10 .chapter-command-up{left:58%}#advanced-map-10 .chapter-command-right{left:66.2%}#advanced-map-10 .chapter-command-down{left:74.4%}#advanced-map-10 .chapter-command-left{left:82.6%}#advanced-map-10 .chapter-command-delete{left:90.8%}
#advanced-map-10 .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}#advanced-map-10 .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
#advanced-map-10 .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
#advanced-map-10 .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
#advanced-map-10[data-level="2"] .journey-goal,#advanced-map-10[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
#advanced-map-10 .chapter-code-panel{top:27%;height:41%}#advanced-map-10 .chapter-star-board,#advanced-map-10 .chapter-mission-stars{top:10%}#advanced-map-10 .chapter-total-stars{top:3.5%;height:5.5%}
#advanced-map-10 .chapter-command-al{left:58%;top:84%;width:8%;height:13%}.carry-item,.carry-delivered{position:absolute;object-fit:contain;transform:translate(-50%,-50%);z-index:2;pointer-events:none}.carry-item[hidden],.carry-delivered[hidden]{display:none}#advanced-map-10 .chapter-guide-hand{width:4.5%;height:8%}
#advanced-map-10 .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}
#advanced-map-10.festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}
#advanced-intro-10 .festival-intro-paytak{left:48%;top:82%;width:17%}#advanced-intro-10 .journey-intro-almila{display:none}
#advanced-map-10 .matching-option{pointer-events:none}#advanced-map-10 .matching-flying-piece{z-index:6;pointer-events:none}
#advanced-map-10.matching-mismatch .journey-goal{animation:matching-shake .5s ease-in-out 2;filter:drop-shadow(0 0 8px #ff9655)}
.chapter-badge-number{position:absolute;left:31%;top:1.5%;width:40%;height:18%;display:flex;justify-content:center;align-items:center;gap:0}.chapter-badge-number img{height:100%;width:auto;max-width:50%;object-fit:contain}.advanced-card-emblem{position:absolute;left:11%;top:30%;width:48%;height:40%}.advanced-card-emblem img{width:100%;height:100%;object-fit:contain}.advanced-intro-emblem{position:absolute;left:44%;top:25%;width:13%;height:24%;object-fit:contain;filter:drop-shadow(0 4px 3px #56371288)}
#game [id^="advanced-map-"] .chapter-command-repeat{left:66.3%;top:84%;width:8%;height:13%}
#game [id^="advanced-map-"] .chapter-command-retry{left:74.7%;top:86%;width:6.6%;height:11.8%}
#game [id^="advanced-map-"] .command-step{left:81.5%;top:86%;width:6.5%;height:11.8%}
.repeat-picker{position:absolute;left:59%;top:45%;width:36%;height:23%;display:flex;gap:3%;align-items:center;justify-content:center;background:#fff1cbee;border:.4cqw solid #8a411c;border-radius:1.4cqw;box-shadow:0 1cqw 2cqw #351c1688;z-index:25;padding:1%}.repeat-picker[hidden]{display:none}.repeat-picker button{position:relative!important;width:23%!important;height:94%!important;left:auto!important;top:auto!important}.repeat-picker button img{width:100%;height:100%;object-fit:contain}.repeat-progress{position:absolute;left:16%;right:16%;bottom:9%;height:9%;display:flex;gap:5%;justify-content:center;pointer-events:none}.repeat-progress i{width:12%;height:100%;border-radius:50%;background:#4f5b36;border:1px solid #fff7bb}.repeat-progress i.executing{background:#ffff66;box-shadow:0 0 8px 3px #fff633}.repeat-needed{filter:drop-shadow(0 0 6px #fff459)}.advanced-gap:after{content:'?';position:absolute;inset:5%;display:grid;place-items:center;font:900 3cqw Coiny,sans-serif;color:#ffe654;-webkit-text-stroke:2px #773b14;background:#fff4ce88;border:3px dashed #db891d;border-radius:14%;pointer-events:none}.advanced-predictions{position:absolute;inset:0;pointer-events:none;z-index:5}.advanced-guess{position:absolute;transform:translate(-50%,-50%);border:2px dashed #fff8c277;border-radius:14%;background:transparent;pointer-events:auto;cursor:pointer}.advanced-guess.chosen{border:4px solid #fff25b;background:#ffe92c33;box-shadow:0 0 14px #ffff69,inset 0 0 10px #ffff69}.advanced-guess:disabled{pointer-events:none}.finale-friend{position:absolute;left:calc(1% + var(--friend)*3%);top:calc(75% + var(--friend)*3%);width:10%;height:21%;object-fit:contain;z-index:6;pointer-events:none;animation:chapter-map-arrive .8s ease-out both}

#game [id^="advanced-map-"] .chapter-guide-hand{z-index:30}.chapter-badge-number{z-index:4;pointer-events:none;left:38%;top:7%;width:25%;height:13%}.chapter-badge-number img{position:static!important;inset:auto!important;height:100%!important;width:auto!important;max-width:50%!important;object-fit:contain!important}

.repeat-drop-target,.repeat-group-target{outline:4px solid #7cffe0!important;outline-offset:2px;box-shadow:0 0 12px 4px #12dfbd,inset 0 0 10px #a1fff2;border-radius:18%}.repeat-picker{flex-wrap:wrap;height:auto;min-height:23%;max-height:44%;gap:3%;padding:1%}.repeat-picker button{width:23%!important;height:auto!important;aspect-ratio:1}.repeat-picker button img{height:auto;aspect-ratio:1}.repeat-progress{bottom:5%;height:6%}
.repeat-picker{gap:2%;min-height:19%}.repeat-picker button{width:22%!important}

/* Approved A chapter cards: one common raster frame, independent picture, digits, stars and lock. */
.card.art-theme-A{border:0;box-shadow:none;background:none;isolation:isolate;overflow:visible;border-radius:10%}
.card.art-theme-A>img.card-a-illustration{position:absolute;left:5%;top:17%;width:90%;height:62%;object-fit:cover;border-radius:12%;z-index:0}
.card.art-theme-A>img.card-a-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;z-index:1}
.card-a-number{position:absolute;left:36%;top:4.5%;width:29%;height:13.5%;display:flex;justify-content:center;align-items:center;z-index:2;pointer-events:none}
.card-a-number img{width:auto;height:100%;max-width:48%;object-fit:fill}
.card-a-stars{position:absolute;left:10%;top:82.5%;width:61%;height:12.7%;display:flex;gap:4%;justify-content:space-between;z-index:2;pointer-events:none}
.card-a-star{width:30.66%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1px #6d391b66)}
.card.art-theme-A .chapter-lock{left:74%;top:81%;width:19%;height:15%;z-index:2;transform:none;filter:drop-shadow(0 1px 1px #4a291a77)}
.card.art-theme-A:not(.chapter-open){filter:brightness(.55) saturate(.65)}
.card.art-theme-A.chapter-open{filter:none}
.card.art-theme-A.pressed{transform:none;filter:brightness(.82)}
#chapter-unlock .art-theme-A.unlock-icon{width:17%;height:40.3%;filter:none}

/* Approved stone chapter selection C, dark forest backdrop. */
#levels .level-board-layer,#levels .level-heading-layer{display:none}

/* Grounded welcome pose behind the foreground continue button. */
#welcome-idle,#walker{left:50%;top:85%;width:21.5%;height:37%;z-index:2}
#welcome-fade{position:absolute;inset:0;background:#000;opacity:0;pointer-events:none;z-index:8}

/* Front-facing, grounded companions and reversed Almila pointing gesture. */
#carry-intro .journey-intro-almila canvas{transform:scaleX(-1)}
#matching-intro .festival-intro-paytak canvas,#advanced-intro-9 .festival-intro-paytak canvas,#advanced-intro-10 .festival-intro-paytak canvas{display:block;width:100%;height:100%;object-fit:contain}
#matching-intro .festival-intro-paytak,#advanced-intro-9 .festival-intro-paytak,#advanced-intro-10 .festival-intro-paytak{height:40%}

/* Shared, non-destructive failure feedback for every chapter. */
.execution-retry-overlay{position:absolute;inset:0;background:rgba(0,0,0,.18);z-index:90;display:grid;place-items:center}
.execution-retry-overlay[hidden]{display:none}
.execution-retry-button{position:relative;width:13%;aspect-ratio:1;filter:drop-shadow(0 8px 7px #39230b66);animation:retry-appear .25s ease-out}
.command-error::after,.command-route-error::after{content:'?';position:absolute;right:-9%;top:-25%;font-family:"Paytak Coiny",sans-serif;font-size:clamp(25px,4vw,70px);line-height:1;color:#ffe34b;-webkit-text-stroke:3px #713b15;paint-order:stroke fill;text-shadow:0 3px 0 #a9601d,0 5px 0 #5a2c10,0 7px 7px #4b260c66;pointer-events:none;z-index:12}
.command-route-error::after{right:3%;top:3%}
@keyframes retry-appear{from{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.execution-retry-button{animation:none}}

/* Three independent success awards; reuse the existing replay/next controls. */
.success-results{background:rgba(0,0,0,.22)!important}
.success-feedback{position:absolute;left:21%;top:18%;width:58%;height:61%;padding:4% 3% 8%;display:flex;gap:2%;background:linear-gradient(#fff2ca,#f8df9b);border:clamp(8px,1.3vw,24px) solid #bd702d;border-radius:7%;box-shadow:inset 0 0 0 4px #ffe4a0,0 0 0 4px #633415,0 12px 20px #25190766}
.success-criterion{position:relative;flex:1;display:flex;align-items:center;flex-direction:column;border-right:2px solid #c7974f44;padding:0 3%}.success-criterion:last-child{border:0}
.success-star{width:100%;height:55%;object-fit:contain;filter:drop-shadow(0 4px 1px #a66920)}
.success-criterion.unearned .success-star{filter:brightness(.3) sepia(1);opacity:.65}
.success-pictogram{position:relative;width:100%;height:42%;margin-top:8%}.success-pictogram svg{width:100%;height:100%;filter:drop-shadow(0 3px 1px #87561d66)}
.success-command-icons{display:flex;height:100%;align-items:center}.success-command-icons img{width:36%;margin-left:-3%;height:auto}
.success-check{position:absolute;right:-5%;bottom:-10%;font-family:"Paytak Coiny",sans-serif;font-size:clamp(20px,4vw,65px);color:#63d83b;-webkit-text-stroke:2px #28651d;paint-order:stroke fill;text-shadow:0 3px 0 #1e501b}
.success-results .chapter-completion-actions,.success-results .completion-actions{position:absolute!important;left:36%!important;top:70%!important;width:28%!important;height:20%!important;display:flex!important;gap:8%!important;transform:none!important;z-index:2}
.success-results .chapter-completion-actions button,.success-results .completion-actions button{position:relative!important;inset:auto!important;width:46%!important;height:100%!important;transform:none!important;object-fit:contain}
.success-results .chapter-completion-actions button img,.success-results .completion-actions button img{object-fit:contain}
.success-results .chapter-completed-caption{top:91%}

/* Exact approved artwork, scaled down as a single aligned composition. */
.success-feedback{left:12%;top:12%;width:76%;height:76%;padding:0;border:0;border-radius:0;box-shadow:none;background:none;display:block;pointer-events:none}
.success-approved-art,.success-criterion>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
.success-approved-art{clip-path:polygon(19.1% 24%,19.7% 18%,21% 13%,26% 12%,28% 14%,72% 14%,72% 12%,78% 12%,81% 17%,80% 26%,80% 66%,81% 69%,81% 79%,77% 81%,64% 81%,65% 86%,62% 90.8%,39% 90.8%,36% 87%,35% 81%,23% 81%,19% 78%,19% 68%,20% 65%,20% 26%)}
.success-criterion{position:absolute;inset:0;padding:0;border:0;display:block;pointer-events:none}
.success-criterion:nth-of-type(1){clip-path:inset(23% 59% 31% 24%)}
.success-criterion:nth-of-type(2){clip-path:inset(23% 42% 31% 42%)}
.success-criterion:nth-of-type(3){clip-path:inset(23% 23% 31% 59%)}
.success-criterion.unearned{filter:grayscale(1) brightness(.55)}
.success-results .chapter-completion-actions,.success-results .completion-actions{left:40.4%!important;top:65.2%!important;width:19.8%!important;height:15.6%!important;gap:7.5%!important;z-index:3}
.success-results .chapter-completion-actions button,.success-results .completion-actions button{width:46.25%!important;height:100%!important;opacity:0!important}
.success-results .chapter-completed-caption{top:83%}
/* Approved result-button artwork moves with its own touch target. */
.success-results .chapter-completion-actions button,.success-results .completion-actions button{opacity:1!important;overflow:visible;background:none!important}
.success-results .chapter-completion-actions button img,.success-results .completion-actions button img{visibility:hidden}
.success-results .chapter-completion-actions button::after,.success-results .completion-actions button::after{content:'';position:absolute;inset:0;background-image:url('assets/success-approved-clean-v2.webp');background-repeat:no-repeat;background-size:822% 487%;background-position:42.55% 88.08%;clip-path:ellipse(49% 49% at 50% 50%);pointer-events:none;opacity:0}
.success-results .chapter-completion-actions button:nth-child(2)::after,.success-results .completion-actions button:nth-child(2)::after{background-position:57.55% 88.08%}
.success-results .chapter-completion-actions button:active::after,.success-results .chapter-completion-actions button.pressed::after,.success-results .completion-actions button:active::after,.success-results .completion-actions button.pressed::after{opacity:1;filter:brightness(.72);box-shadow:inset 0 4px 7px #542b14}
/* Shade the exact artwork beneath the hit area; no duplicated or shifting image. */
.success-results .chapter-completion-actions button::after,.success-results .completion-actions button::after{background:rgba(55,27,5,.34);background-size:auto;clip-path:ellipse(48% 48% at 50% 50%);border-radius:50%;transition:opacity 80ms ease;box-shadow:inset 0 5px 8px #4e250c88,inset 0 -2px 2px #fff0ae55}

/* Chapter completion heading sits above the compact star feedback panel. */
.success-results .completion-caption{left:15%;top:12%;width:70%;z-index:5;font-size:clamp(19px,3.1vw,60px);line-height:1.25;margin:0}
.success-results.chapter-finished{background:rgba(0,0,0,.34)!important}

/* Compact chapter art with its readable name directly underneath. */
#levels .chapter-card-title{position:absolute;left:-9%;top:101%;width:118%;min-height:15%;display:block;text-align:center;font-family:'Paytak Coiny',sans-serif;font-size:clamp(9px,1.3vw,25px);line-height:1.18;color:#ffe346;-webkit-text-stroke:clamp(1px,.15vw,3px) #63300f;paint-order:stroke fill;text-shadow:0 2px 0 #542205,0 3px 2px #54220566;pointer-events:none;z-index:3;white-space:nowrap}
#chapter-unlock .chapter-card-title{display:none}

/* Approved joined wood header artwork; all text remains live and game-specific. */
#game .chapter-star-board,#game .chapter-mission-stars,#tutorial .star-panel-layer,#tutorial #tutorial-stars{display:none!important}
.instruction-header{position:absolute;z-index:7;pointer-events:none;background:url('assets/instruction-header-no-speaker-v3.webp') center/100% 100% no-repeat}
#game .instruction-header .header-star-counter{position:absolute!important;left:14%!important;top:4%!important;width:23%!important;height:25%!important;display:flex!important;align-items:center;justify-content:center;gap:0!important;padding:2% 3%!important;background:none;filter:none}
#game .instruction-header .header-star-counter img{height:100%!important;width:auto!important;max-width:35%;object-fit:contain;margin:0 -2%!important}
#game .instruction-header .header-star-counter .total-star-emblem{height:77%!important;margin:0 0 0 3%!important}
.header-chapter-name{position:absolute;left:41%;top:3%;width:43%;height:26%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1%;padding:0;font-family:'Paytak Coiny',sans-serif;color:#ffe347;-webkit-text-stroke:1.5px #66300e;paint-order:stroke fill;text-shadow:0 2px 0 #713910;line-height:1.02;background:none}
.header-chapter-name small{font-size:var(--chapter-font)}.header-chapter-name strong{font-size:var(--title-font);font-weight:400;white-space:nowrap}
.header-instruction{position:absolute;left:7%;top:40%;width:88%;height:45%;display:flex;align-items:center;background:none;padding:0 16% 0 2%}
.header-instruction p{font-family:'Paytak Coiny',sans-serif;font-size:var(--instruction-font);line-height:1.18;color:#53280f;margin:0;text-align:center;width:100%;overflow-wrap:break-word}
.instruction-listen{position:absolute;left:87%;top:7%;width:12%;height:87%;border-radius:50%;pointer-events:auto;transform:none;background:none}
.instruction-listen svg{display:none}.instruction-listen::after{content:'';position:absolute;inset:0;border-radius:50%;background:#24420b;opacity:0;transition:opacity 80ms}
.instruction-listen:active::after,.instruction-listen.pressed::after{opacity:.3}.instruction-listen.speaking{box-shadow:0 0 7px #c8ff66}
#game .shared-editor-bird{z-index:9}

/* Keep the perch beside the header, clear of the green listening button. */
#game .shared-editor-bird{left:94%;top:23.3%;width:5.5%;height:8.7%;z-index:9}
.header-chapter-name{-webkit-text-stroke:2px #66300e;paint-order:stroke fill}
#game .settings{z-index:50}
#game .shared-editor-bird{left:93%;top:22%;}

/* Object refresh: fixed trail marker, compact two-choice concept prompt. */
#journey-map .journey-checkpoint{animation:none;filter:none}
#journey-map[data-level="9"] .journey-goal,#journey-map[data-level="10"] .journey-goal{animation:none}
.concept-board{height:66%;width:61%;gap:5%;padding:2% 2% 3%}
.concept-instruction-plaque{position:relative;flex:0 0 27%;width:100%;box-sizing:border-box;display:flex;align-items:center;padding:1% 17% 1% 6%;background:#fff0cb;border:7px solid #ab602a;border-radius:22px;box-shadow:inset 0 3px #fffbe8,0 5px #69340e;background-image:url('assets/coding-panel-layer.webp');background-size:100% 100%}
.concept-instruction-plaque p{font-family:PaytakCoiny,Coiny,sans-serif;color:#60300e;text-align:center;width:100%;font-size:clamp(17px,2vw,38px);margin:0;line-height:1.2}
.concept-listen{position:absolute;right:3%;top:15%;height:70%;aspect-ratio:1;padding:0;border:0;background:none;border-radius:50%}
.concept-listen svg{height:100%;width:100%}.concept-listen:active{transform:translateY(3px) scale(.96)}
.concept-choices{height:66%;width:90%;flex:1;min-height:0}
.prediction-cell.prediction-chosen span{font-family:PaytakCoiny,Coiny,sans-serif;color:#fff6b4;-webkit-text-stroke:2px #733a0e;paint-order:stroke fill;border-radius:28%;background:linear-gradient(#fff275,#ffc21d);border:3px solid #a85b1c;box-shadow:inset 0 3px 2px #fffbd8, inset 0 -5px 4px #cb7916,0 5px 0 #793b12,0 7px 8px #59321766;text-shadow:0 3px 0 #b66b1d,0 -1px white}
#carry-intro .journey-intro-almila{display:none}
.concept-instruction-plaque{background-image:url('assets/instruction-plaque-v1.webp');background-size:100% 100%;border:0;box-shadow:none;border-radius:0}
.concept-instruction-plaque p,.prediction-cell.prediction-chosen span{font-family:'Paytak Coiny',sans-serif}

/* Clean alpha result artwork: keep every complete corner; dim the live game behind it. */
.success-results,.success-results.chapter-finished{background:rgba(0,0,0,.43)!important}
.success-approved-art{clip-path:none}

/* One result layer above every game control, guide, HUD and character. */
#game #completion,
#game .chapter-mission-completion{
 position:absolute;inset:0;z-index:1000!important;isolation:isolate;
}
#game #completion.success-results,
#game .chapter-mission-completion.success-results{
 background:rgba(0,0,0,.43)!important;
}
/* Approved C plaque only: compact title at the top center of existing intros. */
.chapter-intro-nameplate{position:absolute;left:50%;top:2.5%;width:29%;height:18%;transform:translateX(-50%);object-fit:contain;z-index:5;pointer-events:none}
#first-chapter-intro .first-intro-hero{position:absolute;left:50%;top:79%;width:17%;height:34%;transform:translate(-50%,-100%);z-index:2}
#first-chapter-intro .first-intro-walker{position:absolute;z-index:2;object-fit:contain}
#first-chapter-intro .first-intro-continue{left:34%;top:81%;width:32%;height:13%;z-index:4}
#first-chapter-intro .first-intro-hero{width:14.35%;height:34%}
#first-chapter-intro .first-intro-hero canvas{display:block;width:100%;height:100%;object-fit:contain}

/* First chapter uses the same grounded pose, scale and idle motion as chapter 7. */
#first-chapter-intro .first-intro-hero{left:48%;top:82%;width:17%;height:40%}

/* Narration buttons are independent square sprites; the wooden header may resize freely. */
.instruction-listen,.concept-listen{position:absolute;left:auto;top:50%;width:var(--narration-button-size,clamp(36px,4.5vw,84px));height:var(--narration-button-size,clamp(36px,4.5vw,84px));aspect-ratio:1;transform:translateY(-50%);padding:0;border:0;border-radius:50%;background:none;flex-shrink:0;overflow:visible}
.instruction-listen{right:1%}.concept-listen{right:3%}
#game .instruction-listen .narration-sound-art,#game .concept-listen .narration-sound-art{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:contain;pointer-events:none}
.instruction-listen:active,.instruction-listen.pressed,.concept-listen:active,.concept-listen.pressed{transform:translateY(calc(-50% + 2px)) scale(.96);filter:brightness(.9)}

/* Center the complete number + star group inside the recessed wooden plaque. */
#game .instruction-header .header-star-counter{left:16%!important;top:9%!important;width:19%!important;height:17%!important;padding:0!important;gap:2%!important;align-items:center!important;justify-content:center!important}
#game .instruction-header .header-star-counter img{height:100%!important;width:auto!important;max-width:none!important;flex:0 0 auto;margin:0!important}
#game .instruction-header .header-star-counter .total-star-emblem{height:90%!important;margin:0 0 0 2%!important}

/* The canonical Almila already points left toward the life tree. */
#chapter-four-intro .chapter-almila{transform:none}

/* Smaller optical group, centered within the plaque rather than against its rim. */
#game .instruction-header .header-star-counter{left:16%!important;top:11.5%!important;width:19%!important;height:12%!important;padding:0!important;gap:0!important;transform:none!important;align-items:center!important;justify-content:center!important}
#game .instruction-header .header-star-counter img{height:100%!important;max-width:none!important;margin:0!important;transform:none!important}
#game .instruction-header .header-star-counter .total-star-emblem{height:90%!important;margin:0 0 0 4%!important}

/* Invitation cue follows the spoken chapter name without shifting the button. */
.intro-continue-cue{animation:intro-continue-glow 1.1s ease-in-out infinite!important}
@keyframes intro-continue-glow{0%,100%{filter:drop-shadow(0 0 2px #e2ff9455)}50%{filter:brightness(1.08) drop-shadow(0 0 12px #d5ff7a)}}
@media(prefers-reduced-motion:reduce){.intro-continue-cue{animation:none!important;filter:drop-shadow(0 0 6px #d5ff7a)}}

/* Approved A feedback: blank production art with live, chapter-specific copy. */
#game .written-feedback.success-results .success-feedback{left:30%;top:12%;width:40%;height:66.67%;}
#game .written-feedback .success-approved-art{clip-path:none}
#game .written-feedback .success-criterion:nth-of-type(1){clip-path:inset(34% 64% 27% 12%)}
#game .written-feedback .success-criterion:nth-of-type(2){clip-path:inset(34% 38% 27% 39%)}
#game .written-feedback .success-criterion:nth-of-type(3){clip-path:inset(34% 10% 27% 64%)}
#game .written-feedback .completion-caption{display:none!important}
.outcome-success-heading{position:absolute;left:30%;top:12%;width:40%;height:66.67%;pointer-events:none;z-index:4}
.outcome-success-heading p{position:absolute;left:14%;top:6%;width:72%;height:15%;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;font-family:'Paytak Coiny',sans-serif;font-size:clamp(14px,1.65vw,36px);line-height:1.18;color:#ffdf57;-webkit-text-stroke:clamp(1.5px,.18vw,4px) #582506;paint-order:stroke fill;text-shadow:0 2px 0 #b86b16,0 4px 0 #4c2108,0 6px 3px #32170488}
.outcome-chapter-heading p{font-size:clamp(13px,1.5vw,33px)}
#game .written-feedback.success-results .chapter-completion-actions,#game .written-feedback.success-results .completion-actions{left:39.8%!important;top:61.1%!important;width:20.3%!important;height:16.1%!important;gap:10%!important;}
#game .written-feedback.success-results .chapter-completion-actions button,#game .written-feedback.success-results .completion-actions button{width:45%!important;height:100%!important;border-radius:50%;}
#game .written-feedback.success-results .chapter-completion-actions button::after,#game .written-feedback.success-results .completion-actions button::after{clip-path:ellipse(48% 48% at 50% 50%)}
#game .execution-retry-overlay.written-feedback{z-index:1001!important;isolation:isolate;background:rgba(0,0,0,.25);}
.outcome-error-board{position:absolute;left:32%;top:25%;width:36%;height:38%;background:url('assets/feedback-error-A-v1.webp') center/100% 100% no-repeat;pointer-events:none}
.outcome-error-board p{position:absolute;inset:18% 15% 20%;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;font-family:'Paytak Coiny',sans-serif;font-size:clamp(17px,2.2vw,46px);line-height:1.3;color:#542205;text-shadow:0 1px 0 #fff3c5;}
#game .written-feedback .execution-retry-button{position:absolute;left:45.5%;top:58%;width:9%;height:16%;aspect-ratio:1;z-index:2;}
#game .written-feedback .execution-retry-button img{width:100%;height:100%;object-fit:contain}
.outcome-success-heading p{white-space:pre-line;font-size:clamp(14px,1.85vw,40px);width:76%;left:12%}
.outcome-chapter-heading p{font-size:clamp(13px,1.65vw,36px)}
.outcome-error-board p{white-space:pre-line}
/* Paytak speaks from a compact C-style bubble, without moving the scene. */
.paytak-speech-bubble{position:absolute;left:36%;top:22%;width:48%;height:25%;z-index:6;background:url('assets/paytak-speech-bubble.svg') center/100% 100% no-repeat;filter:drop-shadow(0 4px 2px #4d2a1455);animation:paytak-bubble-in .4s ease-out}
.paytak-speech-bubble p{position:absolute;inset:14% 13% 25% 9%;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;font-family:'Paytak Coiny',sans-serif;font-size:clamp(14px,1.6vw,35px);line-height:1.25;color:#542205;text-shadow:0 1px 0 #fff7e1}
.paytak-speech-replay{position:absolute;right:3.5%;top:27%;width:8%;aspect-ratio:1;height:auto!important}
.paytak-speech-replay img{width:100%;height:100%;object-fit:contain}
.paytak-speaking-actor{position:absolute;z-index:3;pointer-events:none;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 5px 4px #4a351744)}
.paytak-speaking-actor[hidden]{display:none!important}
.welcome-speech-bubble{left:8%;top:43%;width:35%;height:23%;}
.welcome-speech-bubble p{font-size:clamp(14px,1.7vw,36px)}
#welcome.departing .paytak-speech-bubble,.chapter-departing .paytak-speech-bubble{display:none}
.splash-loading .welcome-speech-bubble{visibility:hidden}
@keyframes paytak-bubble-in{from{opacity:0;transform:translateY(6px) scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.paytak-speech-bubble{animation:none}}
.paytak-speech-bubble p{font-size:clamp(14px,1.85vw,39px)}
#chapter-four-intro .paytak-speech-bubble{width:42%}
#chapter-four-intro .paytak-speech-bubble p{font-size:clamp(14px,1.7vw,36px)}
.welcome-speech-bubble{background:none}
.welcome-speech-bubble::before{content:'';position:absolute;inset:0;background:url('assets/paytak-speech-bubble.svg') center/100% 100% no-repeat;transform:scaleX(-1);z-index:-1}
.paytak-speech-bubble[hidden]{display:none!important}
#game{container-type:inline-size}
.paytak-speech-bubble p{font-size:clamp(8px,1.85cqw,39px)}
#chapter-four-intro .paytak-speech-bubble p{font-size:clamp(8px,1.7cqw,36px)}
.welcome-speech-bubble p{font-size:clamp(8px,1.7cqw,36px)}
/* Compact oval speech bubbles, with measured text and scene-specific placement. */
.paytak-speech-bubble{background-size:100% 100%;background-repeat:no-repeat;filter:drop-shadow(0 3px 2px #4d2a1444)}
.paytak-speech-bubble p,#chapter-four-intro .paytak-speech-bubble p,.welcome-speech-bubble p{inset:12% 15% 27% 12%;font-size:clamp(8px,1.6cqw,34px);line-height:1.16;}
.paytak-speech-replay{right:5%;top:32%;width:7%;}
.welcome-speech-bubble::before{display:none}
#journey-intro .journey-intro-sign{left:79%;top:73%;width:13%;height:22%}
.card.art-theme-A .chapter-lock{left:69%;top:80%;width:23%;height:18%;}

/* Approved C: preserve the illustrated balloon's proportions and reserve its tail. */
.paytak-speech-bubble{background:none!important;isolation:isolate;filter:drop-shadow(0 3px 2px #4d2a1444)}
.paytak-speech-bubble::before,.welcome-speech-bubble::before{content:"";display:block;position:absolute;inset:0;z-index:-1;background:url("assets/paytak-speech-C-v1.webp") center/100% 100% no-repeat;pointer-events:none}
.paytak-speech-bubble.speech-tail-right::before{transform:scaleX(-1)}
.paytak-speech-bubble p,#chapter-four-intro .paytak-speech-bubble p,.welcome-speech-bubble p{inset:15% 17% 29% 10%;font-size:clamp(8px,1.48cqw,32px);line-height:1.18;margin:0;text-align:center;overflow:hidden}
.paytak-speech-replay{right:7%;top:35%;width:8%;aspect-ratio:1;height:auto}
.paytak-speech-replay img{width:100%;height:100%;object-fit:contain}


.fullscreen-toggle{position:absolute;right:2%;bottom:2%;z-index:12;display:flex;align-items:center;gap:.45em;max-width:25%;padding:.5em .8em;border:3px solid #77401f;border-radius:18px;background:linear-gradient(#ffe6a3,#d9a059);box-shadow:inset 0 2px #fff5d2,0 3px 0 #4e2e1b;color:#57301b;font-family:PaytakCoiny,sans-serif;font-size:clamp(11px,1.25cqw,22px);line-height:1.1;cursor:pointer;touch-action:manipulation}
.fullscreen-toggle svg{width:1.5em;height:1.5em;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.fullscreen-toggle:active{transform:translateY(2px);box-shadow:inset 0 2px #fff5d2,0 1px #4e2e1b}.fullscreen-toggle:focus-visible{outline:3px solid #fff3a4;outline-offset:3px}
/* Separate adult and child entry points; game saves are scoped to the chosen player. */
#welcome #continue{visibility:hidden;pointer-events:none}
.welcome-entries{position:absolute;left:25%;bottom:8%;width:50%;display:flex;gap:2%;z-index:7}
.welcome-entries a{flex:1;display:grid;place-items:center;min-height:3.4em;text-align:center;padding:.6em;border:4px solid #79411c;border-radius:22px;color:#fff4c4;text-shadow:1px 2px #3b5121;background:linear-gradient(#70c63e,#2d8c2b);box-shadow:inset 0 3px #b6f56c,0 4px #613819;font-family:PaytakCoiny,sans-serif;font-size:clamp(11px,1.6cqw,28px);line-height:1.2;text-decoration:none}
.welcome-entries a:first-child{background:linear-gradient(#f8cb65,#b88032);color:#512d18;text-shadow:none;box-shadow:inset 0 3px #fff0a6,0 4px #613819}
.player-identity{position:absolute;z-index:40;left:1%;bottom:.4%;background:#fff4dce8;border:1px solid #92562a;border-radius:8px;padding:3px 8px;font:clamp(10px,.8cqw,15px) system-ui;color:#57381d;text-decoration:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#welcome #continue{display:none!important}

/* Panel is the site entry; the original Continue button stays in the game welcome. */
#welcome #continue{display:block!important;visibility:visible;pointer-events:auto}

/* Approved B: cream inset and rounded carved wooden frame. */
.panel-return-B,.player-identity-B{position:absolute;z-index:18;top:3%;bottom:auto;left:2.4%;height:10%;background: url('assets/player-plaque-B-v1.webp') center/100% 100% no-repeat;border:0;border-radius:999px;box-shadow:none;padding:0;text-decoration:none;color:#542607;font-family:"Paytak Coiny",sans-serif;display:flex;align-items:center;white-space:nowrap;filter:drop-shadow(0 3px 2px #28150766)}
.panel-return-B{width:28%;padding-left:7.5%;font-size:1.65cqw}.panel-return-B img{position:absolute;left:-1%;height:123%;width:auto;aspect-ratio:1;object-fit:contain}.panel-return-B:active{transform:translateY(3px);filter:brightness(.9)}
.player-identity-B{left:12%;top:4%;width:18%;height:8.5%;max-width:none;overflow:visible;padding:0 1% 0 5.3%;font-size:1.75cqw;text-shadow:0 1px #fff6d7}
.player-avatar{position:absolute;left:-2%;height:118%;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;border:3px solid #6a320e;background:radial-gradient(circle at 40% 25%,#ffd67b,#bb6826 74%);box-shadow:inset 0 0 0 3px #ffbd52,0 2px 2px #4d240a80;font:3cqw system-ui}.player-name{overflow:hidden;text-overflow:ellipsis;display:block;width:100%;text-align:center}
.has-player-header #level-jump,.has-player-header .chapter-level-jump{left:31%}.has-player-header .current-game-number{left:39%}.has-player-header.panel-entry-visible #back{visibility:hidden}.panel-return-B[hidden],.player-identity-B[hidden]{display:none!important}
.panel-return-B,.player-identity-B{background-size:100% 140%}.panel-return-B:focus-visible{outline:3px solid #fff393;outline-offset:4px}.player-identity-B[data-unsynced=true]{outline:2px solid #f4b841}

/* Compact player navigation; all round controls retain their aspect ratio. */
.has-player-header .tutorial-home,.has-player-header .chapter-home{left:2.4%;top:3.2%;width:5.3%;height:9.42%}
.has-player-header .player-identity-B{left:8.5%;top:4%;width:13.5%;height:7%;padding-left:4.2%;padding-right:.7%;font-family:'Paytak Coiny',sans-serif;font-size:1.45cqw;font-weight:400;line-height:1.1}
.has-player-header .player-avatar{font-size:2.35cqw;border-width:2px}
.has-player-header .player-name{font-family:'Paytak Coiny',sans-serif;color:#542607;text-shadow:0 1px #fff2c4}
.has-player-header #level-jump,.has-player-header .chapter-level-jump{left:23%;top:3.6%;width:4.7%;height:8.36%}
.has-player-header .current-game-number{left:28.5%;top:4%;height:7%;width:5.5%}
.panel-return-B{font-family:'Paytak Coiny',sans-serif}
.has-player-header .player-identity-B{padding:0;font-size:1.65cqw}
.has-player-header .player-name{position:absolute;left:28%;right:7%;top:0;bottom:0;width:auto;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1;padding-top:.12em;white-space:nowrap;overflow:hidden}
/* Compact panel return on welcome and chapter selection. */
.panel-return-B{left:2.4%;top:3.5%;width:21%;height:7.5%;padding-left:5.8%;font-size:1.22cqw}
.panel-return-B img{height:120%;left:-1%}
/* Match sound control to the compact round navigation controls. */
.has-player-header #settings{top:3.2%;left:auto;right:2.4%;width:5.3%;height:9.42%}

.fullscreen-toggle.fullscreen-game{left:2%;right:auto;bottom:2%;font-family:'Paytak Coiny',sans-serif;font-size:clamp(10px,1.05cqw,18px);max-width:20%}
/* Intro home controls align with the shared sound button. */
#game .journey-intro-home,#game .chapter-intro-home{left:2.4%;top:3.2%;width:5.3%;height:9.42%;border-radius:50%}
/* Experimental spatial palette: no backing tray or decorative artwork. */
#game.command-cross-layout .chapter-control-tray,#game.command-cross-layout .control-tray-layer{display:none!important}
#game.command-cross-layout .chapter-code-panel{transform:scale(.88);transform-origin:100% 0}
#game.command-cross-layout .instruction-header{transform:scale(.88);transform-origin:100% 0}
#game.command-cross-layout .tutorial-code-scale{position:absolute;inset:0;transform:scale(.88);transform-origin:96.4% 28.5%;pointer-events:none}
#game.command-cross-layout .tutorial-code-scale .free-command-slot{pointer-events:auto}
#game.command-cross-layout .chapter-command-up,#game.command-cross-layout .tutorial-up{left:66.7%!important;top:65.5%!important}
#game.command-cross-layout .chapter-command-left,#game.command-cross-layout .tutorial-left{left:60.5%!important;top:76%!important}
#game.command-cross-layout .chapter-command-delete,#game.command-cross-layout .tutorial-delete{left:66.7%!important;top:76%!important}
#game.command-cross-layout .chapter-command-right,#game.command-cross-layout .tutorial-right{left:72.9%!important;top:76%!important}
#game.command-cross-layout .chapter-command-down,#game.command-cross-layout .tutorial-down{left:66.7%!important;top:86.5%!important}
#game.command-cross-layout .chapter-command-al{left:80.2%!important;top:74%!important}
#game.command-cross-layout .chapter-command-repeat{left:86.7%!important;top:74%!important}
#game.command-cross-layout :is(.chapter-command-up,.chapter-command-left,.chapter-command-delete,.chapter-command-right,.chapter-command-down,.chapter-command-al,.chapter-command-repeat,.tutorial-up,.tutorial-left,.tutorial-delete,.tutorial-right,.tutorial-down){width:5.6%!important;height:9.956%!important;transform:none;z-index:8}
#game.command-cross-layout :is(.chapter-command-retry,.tutorial-retry){left:80%!important;top:87%!important;width:5.2%!important;height:9.24%!important}
#game.command-cross-layout .command-step{left:85.7%!important;top:87%!important;width:5.2%!important;height:9.24%!important}
#game.command-cross-layout :is(.chapter-command-run,.tutorial-run){left:91.5%!important;top:85%!important;width:7.2%!important;height:12.8%!important}
#game.command-cross-layout .repeat-picker{bottom:34%;top:auto}
/* Larger map; all chapter actors and objects use the map's measured cell bounds. */
#game.command-cross-layout .chapter-map{left:10.4%;top:13.5%;width:46%;height:82%}
#game.command-cross-layout .tutorial-map-scale{position:absolute;inset:0;transform:scale(1.06);transform-origin:33% 54%;pointer-events:none}
/* Raise the cross and align AL/REPEAT with the right arrow. */
#game.command-cross-layout :is(.chapter-command-up,.tutorial-up){top:64%!important}
#game.command-cross-layout :is(.chapter-command-left,.chapter-command-delete,.chapter-command-right,.tutorial-left,.tutorial-delete,.tutorial-right,.chapter-command-al,.chapter-command-repeat){top:74.5%!important}
#game.command-cross-layout :is(.chapter-command-down,.tutorial-down){top:85%!important}
#game.command-cross-layout .chapter-map{left:6.5%;top:10.5%;width:50%;height:88%}
#game.command-cross-layout .tutorial-map-scale{transform:scale(1.13)}
/* Keep the enlarged map clear of the bottom-left fullscreen control. */
#game.command-cross-layout .chapter-map{left:8%;top:8.5%}
#game.command-cross-layout .tutorial-map-scale{translate:1.5% -2%}
/* Guide stays above command art and slots without intercepting pointer events. */
#game #tutorial-hand,#game .chapter-guide-hand{z-index:32!important;pointer-events:none!important;width:4.2%!important;height:7.47%!important;object-fit:contain}
/* Fit complete chapter titles and instructions inside the wooden safe areas. */
#game .header-chapter-name{box-sizing:border-box;padding:1% 1.2%;gap:0;line-height:1.05;-webkit-text-stroke:.055em #66300e;text-shadow:0 .06em 0 #713910}
#game .header-chapter-name small,#game .header-chapter-name strong{display:block;flex:0 0 auto;max-width:100%;min-width:0;white-space:nowrap;line-height:1.08;text-align:center}
#game .header-instruction{box-sizing:border-box;min-height:0}
#game .header-instruction p{flex:1 1 auto;min-width:0;max-width:100%;line-height:1.18;white-space:normal;overflow-wrap:break-word}
/* Keep playback controls comfortably inside the right edge. */
#game.command-cross-layout :is(.chapter-command-retry,.tutorial-retry){left:77.5%!important}
#game.command-cross-layout .command-step{left:83.2%!important}
#game.command-cross-layout :is(.chapter-command-run,.tutorial-run){left:89%!important}
#game #tutorial-hand,#game .chapter-guide-hand{animation:guide-tip-nudge 1s ease-in-out infinite}
@keyframes guide-tip-nudge{50%{transform:translate(2%,-3%)}}
@media(prefers-reduced-motion:reduce){#game #tutorial-hand,#game .chapter-guide-hand{animation:none}}

/* Appended chapter 11 shares the approved command geometry. */

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-code-board{width:100%;height:100%;object-fit:fill}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-star-board{left:61%;top:13%;width:32%;height:16%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command{top:69%;width:8%;height:13%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-up{left:58%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-right{left:66.2%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-down{left:74.4%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-left{left:82.6%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-delete{left:90.8%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-run{left:89%;top:83%;width:9%;height:16%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19)[data-level="2"] .journey-goal,:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19)[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-code-panel{top:27%;height:41%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-star-board,:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-mission-stars{top:10%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-total-stars{top:3.5%;height:5.5%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-command-al{left:58%;top:84%;width:8%;height:13%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-guide-hand{width:4.5%;height:8%}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19).festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}

:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .festival-intro-paytak{left:48%;top:82%;width:17%}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .journey-intro-almila{display:none}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .matching-option{pointer-events:none}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .matching-flying-piece{z-index:6;pointer-events:none}

:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19).matching-mismatch .journey-goal{animation:matching-shake .5s ease-in-out 2;filter:drop-shadow(0 0 8px #ff9655)}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .festival-intro-paytak canvas{display:block;width:100%;height:100%;object-fit:contain}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .festival-intro-paytak{height:40%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-control-tray{display:none} :is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .journey-intro-almila{display:none}

:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .paytak-speech-bubble p{font-size:1.3cqw;line-height:1.15}

/* A teaching hint, not a failed attempt: preserve the program and actor. */
.repeat-feedback-overlay{position:absolute;inset:0;z-index:1100;background:#0006;display:grid;place-items:center;isolation:isolate}
.repeat-feedback-overlay[hidden]{display:none!important}
.repeat-feedback-board{width:40%;padding:2% 3% 2.5%;background:linear-gradient(#ffe4a5,#edb86e);border:.35cqw solid #78401c;border-radius:2cqw;box-shadow:inset 0 0 0 .22cqw #ffebbb,0 .6cqw 1cqw #23140766;display:flex;align-items:center;flex-direction:column;gap:1cqw;text-align:center}
.repeat-feedback-board>img{width:8cqw;height:8cqw;object-fit:contain;filter:drop-shadow(0 .25cqw .15cqw #6b351b55)}
.repeat-feedback-board p{margin:0;color:#542205;font-family:'Paytak Coiny',sans-serif;font-size:1.9cqw;line-height:1.3;text-shadow:0 .1cqw #fff2bf}
.repeat-feedback-close{position:relative;padding:.8cqw 1.6cqw;background:linear-gradient(#94da53,#398b26);border:.22cqw solid #6b3a19;border-radius:1cqw;color:#fff8d7;font-family:'Paytak Coiny',sans-serif;font-size:1.4cqw;box-shadow:0 .25cqw #623617}
.repeat-feedback-close:active{transform:translateY(.2cqw);box-shadow:none}

/* Consistent dimming beneath every successful outcome panel, in all games. */
#game .success-results,#game .success-results.chapter-finished{background:rgba(0,0,0,.63)!important}
.care-scene-ghost,.care-flying-object{position:absolute;z-index:7;pointer-events:none;object-fit:contain;transform:translate(-50%,-50%)}
.care-water-splash{position:absolute;z-index:8;pointer-events:none;transform:translate(-50%,-50%);border:4px solid #d3f8ff;border-radius:50%;background:#78d9f099;animation:care-splash-ring 1.2s ease-out both}
.care-water-splash i{position:absolute;width:14%;height:32%;background:#b9efff;border:2px solid #f0fdff;border-radius:60%;left:calc(15% + var(--drop)*16%);top:0;animation:care-splash-drop 1s ease-out both}
.care-water-splash i:nth-child(1){--drop:0}.care-water-splash i:nth-child(2){--drop:1}.care-water-splash i:nth-child(3){--drop:2}.care-water-splash i:nth-child(4){--drop:3}.care-water-splash i:nth-child(5){--drop:4}
@keyframes care-splash-ring{0%{opacity:0;scale:.3}40%{opacity:1;scale:1}100%{opacity:0;scale:1.5}}
@keyframes care-splash-drop{0%{translate:0 0;opacity:0}40%{translate:0 -130%;opacity:1}100%{translate:0 65%;opacity:0}}
#game .repeat-picker{overflow-y:auto;max-height:48%;overscroll-behavior:contain;align-content:start}
#game .repeat-picker button{flex:0 0 22%;min-height:0}
@media(prefers-reduced-motion:reduce){.care-water-splash,.care-water-splash i{animation-duration:.15s}}

/* Water is hit at the destination tile; splash appears only on impact. */
.care-river-impact.care-water-splash{border:0;border-radius:0;background:none;animation:none;transform:translate(-50%,-50%);z-index:9}
.care-impact-surface{position:absolute;inset:10% 4%;border-radius:50%;background:radial-gradient(ellipse,#b8f7ffbb,#49c5ee99 55%,#1786be00 72%)}
.care-impact-ring{position:absolute;inset:20% 8%;border:3px solid #e6fdff;border-radius:50%;box-shadow:0 0 4px #75dcff;animation:care-impact-ring .85s ease-out both}
.care-impact-ring.second{inset:10% 0;animation-delay:.12s}
.care-impact-drop{position:absolute;left:50%;top:45%;width:7%;height:27%;border-radius:65% 65% 60% 60%;background:linear-gradient(#efffff,#65d3f6);border:1px solid #dafbff;filter:drop-shadow(0 1px 1px #1477b6);pointer-events:none}
@keyframes care-impact-ring{from{scale:.35;opacity:1}to{scale:1.9;opacity:0}}

/* Compact fullscreen controls, identically on every screen where they exist. */
#game .fullscreen-toggle{right:.55%;bottom:.55%;max-width:16.25%;gap:.45em;padding:.5em .8em;border-width:1.95px;border-radius:11.7px;font-family:'Paytak Coiny',sans-serif;font-size:clamp(7.15px,.8125cqw,14.3px);box-shadow:inset 0 1.3px #fff5d2,0 1.95px #4e2e1b}
#game .fullscreen-toggle.fullscreen-game{left:.55%;right:auto;bottom:.55%;max-width:13%;font-size:clamp(6.5px,.6825cqw,11.7px)}
#game .fullscreen-toggle:active{transform:translateY(1px);box-shadow:inset 0 1px #fff5d2,0 .5px #4e2e1b}
/* Success is the only bright foreground panel. */
#game .success-results,#game .success-results.chapter-finished{background:rgba(0,0,0,.84)!important}
/* Chapter 11 uses the same compact round navigation geometry as the other chapters. */
#game.chapter-eleven-visible #settings{left:auto;right:2.4%;top:3.2%;width:5.3%;height:9.42%}
#game :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-home{left:2.4%;top:3.2%;width:5.3%;height:9.42%;border-radius:50%}
#game:not(.has-player-header) :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-level-jump{left:8.5%;top:3.2%;width:5.3%;height:9.42%}
#game:not(.has-player-header) :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .current-game-number{left:14.6%;top:3.7%;width:5.5%;height:8%}
#game.has-player-header :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-level-jump{left:23%;top:3.6%;width:4.7%;height:8.36%}
#game.has-player-header :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .current-game-number{left:28.5%;top:4%;width:5.5%;height:7%}
#game #completion.success-results,#game .chapter-mission-completion.success-results,#game .chapter-mission-completion.success-results.chapter-finished{background:rgba(0,0,0,.84)!important}

/* The same five-by-two chapter board is reused for each ten-chapter page. */
#levels.chapter-pages #cards .card[hidden]{display:none!important}
#levels .chapter-page-arrow{position:absolute;top:48%;width:5.4%;height:9.6%;z-index:8;border-radius:50%}
#levels .chapter-page-previous{left:2.1%}
#levels .chapter-page-next{right:2.1%}
#levels .chapter-page-next img{transform:scaleX(-1)}
#levels .chapter-page-arrow[hidden]{display:none!important}
#levels .chapter-page-count{position:absolute;left:45%;bottom:1.8%;width:10%;text-align:center;font-family:'Paytak Coiny',sans-serif;font-size:clamp(10px,1.25cqw,22px);color:#ffe346;-webkit-text-stroke:1px #63300f;paint-order:stroke fill;text-shadow:0 2px #542205;pointer-events:none}
/* Selection uses the same lower-left fullscreen placement as the game pages. */
#game #levels .fullscreen-toggle{left:.55%;right:auto;bottom:.55%}

#levels .chapter-page-count{left:44%;bottom:1.6%;width:12%;height:5.2%;display:flex;align-items:center;justify-content:center;gap:.6%;font-size:clamp(18px,2.2cqw,42px);line-height:1;-webkit-text-stroke:1.5px #63300f}
#levels .chapter-page-count>span{height:100%;display:flex;align-items:center;justify-content:center;gap:1px}
#levels .chapter-page-count img{height:100%;width:auto;object-fit:contain;filter:drop-shadow(0 2px 1px #44200d88)}
#levels .chapter-page-count .chapter-page-divider{padding:0 .15em;color:#ffdf51;text-shadow:0 2px #67320d,0 -1px #fff2a0;font-size:.8em}

#levels .chapter-page-count{bottom:3.2%}
#levels .chapter-page-count .chapter-page-divider{padding:0 .1em}
#levels .chapter-page-divider svg{height:80%;width:auto;overflow:visible}

/* Chapter 11 keeps a planted, still body while its mouth follows the recording. */
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .festival-intro-paytak{top:84%;transform:translate(-50%,-100%);filter:none}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .paytak-speaking-actor{filter:none}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .care-intro-ground-shadow{position:absolute;left:48%;top:81.2%;width:10%;height:2.1%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#69451b66 0%,#69451b33 45%,#69451b00 72%);pointer-events:none;z-index:1}
/* Earned optional break, outside chapter numbering. */
.reward-mola-link{position:absolute;right:7.5%;bottom:2%;padding:.35% 1.4%;border:2px solid #8c4d20;border-radius:14px;background:linear-gradient(#ffe5a4,#e9b65b);box-shadow:inset 0 2px #fff5cc,0 3px #67401d;color:#603515;text-decoration:none;font-family:'Paytak Coiny',sans-serif;font-size:1.4cqw;z-index:8}.reward-mola-link:active{transform:translateY(2px)}.reward-completion-link{display:block;color:#573417;text-align:center;text-decoration:none;background:#ffe5a4;border:2px solid #9c6028;border-radius:14px;padding:8px;font-family:'Paytak Coiny',sans-serif;font-size:20px}

#levels .card[data-level="12"] .chapter-card-title{left:-5%;width:110%;white-space:normal;text-wrap:balance;font-size:clamp(9px,1.15vw,22px)}

/* Platform oyunları: turkuaz çerçeve. */
#levels .card[data-level="12"] .card-a-frame,#levels .card[data-level="13"] .card-a-frame{filter:hue-rotate(125deg) saturate(.85)}

#levels .card[data-level="14"] .card-a-frame{filter:hue-rotate(125deg) saturate(.85)}
#levels .card[data-level="14"] .chapter-card-title{white-space:normal;text-wrap:balance;font-size:clamp(9px,1.15vw,22px)}

/* New AL puzzle chapters use the established wooden header and Coiny font. */
.al-intro-nameplate{background:url("assets/al-intro-wood.svg") center/100% 100% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:"Paytak Coiny",sans-serif;color:#ffe06b;text-shadow:0 2px 1px #673212,-1px -1px #673212;box-sizing:border-box;padding:1% 2%;text-align:center}.al-intro-nameplate small{font-size:1.35cqw}.al-intro-nameplate strong{font-size:1.7cqw;line-height:1.1}

/* Registered temporary story layers for the new garden/workshop results. */
.al-story-layer{position:absolute;transform:translate(-50%,-50%);object-fit:contain;z-index:6;pointer-events:none}.al-story-particles{z-index:7}

.garden-memory{position:absolute;inset:0;z-index:1;pointer-events:none}.garden-memory-plot{position:absolute;width:13%;height:23.1%;transform:translate(-50%,-50%);filter:drop-shadow(0 4px 3px #64411b35)}
/* Leave a visible patch of ground between Paytak's feet and Continue. */
:is(#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .festival-intro-paytak{top:80%}
:is(#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-19) .care-intro-ground-shadow{top:77.8%}
.loop-repair-overlay{position:absolute;inset:0;z-index:35;background:#172c272e}.loop-repair-overlay[hidden]{display:none}.loop-repair-panel{position:absolute;left:57%;top:29%;width:40%;height:65%;background:#fff0cd;border:.4cqw solid #8a411c;border-radius:1.5cqw;box-shadow:0 .8cqw 2cqw #321c1788;font-family:'Paytak Coiny',sans-serif;color:#693210}.loop-repair-panel h2{position:absolute;left:7%;top:1%;width:86%;height:17%;display:grid;place-items:center;margin:0;background:url('assets/instruction-plaque-v1.webp') center/100% 100% no-repeat;font-size:2cqw;font-weight:400}.loop-repair-counts{position:absolute;left:21%;top:20%;width:58%;height:17%;display:flex;justify-content:center;gap:12%}.loop-repair-counts button{position:relative;width:30%;height:100%;background:url('assets/loop-count-frame.svg') center/contain no-repeat;border-radius:16%}.loop-repair-counts button img{padding:20%;object-fit:contain}.loop-repair-counts button:disabled{opacity:.6}.loop-repair-body{position:absolute;left:13%;top:40%;width:74%;height:21%;display:flex;justify-content:center;gap:7%}.loop-repair-body button{position:relative;width:26%;height:100%;aspect-ratio:1}.loop-repair-body button img{object-fit:contain}.loop-repair-body button:disabled{filter:saturate(.75)}.loop-body-gap{border:2px dashed #c87f3a;border-radius:16%;background:#fff9df;font:2.8cqw 'Paytak Coiny',sans-serif;color:#ffe654;-webkit-text-stroke:1px #773b14}.loop-repair-palette{position:absolute;left:7%;bottom:19%;width:86%;height:15%;display:flex;justify-content:center;gap:2%}.loop-repair-palette button{position:relative;width:15%;height:100%}.loop-repair-palette img{object-fit:contain}.loop-repair-palette button:disabled{opacity:.45}.loop-repair-done{left:30%;bottom:3%;width:40%;height:12%}.loop-repair-done img{object-fit:contain}.loop-repair-panel .chosen{outline:.22cqw solid #ffec45;outline-offset:3px;filter:drop-shadow(0 0 5px #ffe529);border-radius:17%}#game [id^="advanced-map-1"] .chapter-guide-hand{z-index:40}.loop-repair-incomplete{filter:drop-shadow(0 0 3px #ffd747)}
#game :is(#advanced-map-17,#advanced-map-18,#advanced-map-19) .chapter-guide-hand{z-index:45!important}

/* Coiny has a high optical baseline; center the fullscreen label beside its icon. */
#game .fullscreen-toggle{justify-content:center;align-items:center}
#game .fullscreen-toggle span{display:block;line-height:1;transform:translateY(.1em)}
/* Chapters with unrecorded narration have no speaker: use the full plaque safe area. */
:is(#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .header-instruction{left:7%;width:88%;padding:0 16% 0 2%;justify-content:center}
:is(#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-19) .header-instruction p{transform:translateY(.1em);text-wrap:balance}
/* TOPLA number tiles and a compact visible running total. */
#advanced-map-19 .sum-number{position:absolute;display:flex;align-items:center;justify-content:center;gap:2%;z-index:3;transform:translate(-50%,-50%);pointer-events:none;background:radial-gradient(circle at 35% 25%,#fff9b8,#ffc843 65%,#b77a25);border:2px solid #88511c;border-radius:50%;box-shadow:inset 0 2px 2px #fffbd9,0 3px 3px #4b381b55}
#advanced-map-19 .sum-number img{height:75%;width:auto;max-width:55%;object-fit:contain}
#advanced-map-19 .sum-number span{font:1.4cqw 'Paytak Coiny';color:#713d15}
#advanced-map-19 .sum-number-used{opacity:.32;filter:saturate(.2);box-shadow:none}
#advanced-map-19 .sum-status{position:absolute;left:25%;top:1.8%;width:29%;height:11%;z-index:8;background:url('assets/instruction-plaque-v1.webp') center/100% 100% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1% 2%;font-family:'Paytak Coiny',sans-serif;color:#63320d;pointer-events:none}
#advanced-map-19 .sum-status>div{display:flex;justify-content:center;gap:1.3cqw;font-size:1.22cqw;line-height:1.1;white-space:nowrap}
#advanced-map-19 .sum-status b{color:#97500d;font-size:1.8cqw;font-weight:400}
#advanced-map-19 .sum-status small{font-size:.96cqw;line-height:1.15;text-align:center}
#advanced-map-19 .chapter-command-topla:after{content:'TOPLA';position:absolute;top:100%;left:0;width:100%;font:.8cqw 'Paytak Coiny';color:#fff0b1;text-shadow:0 1px 2px #48220c}
#advanced-map-19 .chapter-command-repeat{display:none!important}
#game.command-cross-layout #advanced-map-19 .chapter-command-topla{left:80.2%;top:64%;width:5.6%;height:9.956%;z-index:8;transform:none}
#advanced-map-19 .sum-status>div{transform:translateY(.1em)}
/* Approved longer TOPLA wording stays below the upper-right sound control. */
#advanced-map-19 .header-instruction{top:40%;height:45%;padding:0 16% 0 2%;align-items:center;justify-content:center}

#advanced-map-19 .header-instruction p{transform:none;line-height:1.08;text-wrap:balance}
#advanced-map-19 .sum-instruction-main{display:block;width:80%;margin:0 auto;font-size:1em;line-height:1.15}
#advanced-map-19 .sum-instruction-reminder{display:block;width:100%;margin:.3em auto 0;font-size:.8em;line-height:1.18}

/* TOPLA status: center the larger target and total; show arithmetic only after adding. */
#advanced-map-19 .sum-status{padding:1% 2%;gap:.25cqw}
#advanced-map-19 .sum-status>div{font-size:1.65cqw;line-height:1.15;align-items:center;gap:1.5cqw;transform:translateY(.08em)}
#advanced-map-19 .sum-status>div span{display:flex;align-items:center;gap:.35cqw}
#advanced-map-19 .sum-status b{font-size:2.1cqw;line-height:1;font-weight:400}
#advanced-map-19 .sum-status small{font-size:1.02cqw;line-height:1.05}

#levels .card[data-level="19"] .chapter-card-title{white-space:normal;text-wrap:balance;line-height:1.1;font-size:clamp(9px,1.15vw,22px)}
/* Two compact plaques share the map's measured horizontal center. */
#advanced-map-19 .sum-hud{position:absolute;top:1.8%;width:26%;transform:translateX(-50%);z-index:8;display:flex;flex-direction:column;align-items:center;gap:.18cqw;pointer-events:none}
#advanced-map-19 .sum-hud .sum-status{position:relative;left:auto;top:auto;width:100%;height:3.05cqw;flex:none;padding:.25cqw 1.2cqw;background-size:100% 150%;gap:0}
#advanced-map-19 .sum-hud .sum-status>div{font-size:1.4cqw;gap:1.3cqw;line-height:1;transform:translateY(.08em)}
#advanced-map-19 .sum-hud .sum-status b{font-size:1.85cqw}
#advanced-map-19 .sum-equation{width:72%;height:2.75cqw;display:flex;align-items:center;justify-content:center;gap:.26cqw;padding:.3cqw .7cqw;background:url('assets/instruction-plaque-v1.webp') center/100% 150% no-repeat}
#advanced-map-19 .sum-equation img{height:2.05cqw;width:auto;max-width:15%;object-fit:contain;filter:drop-shadow(0 1px 0 #63380c)}
#advanced-map-19 .sum-equation img.sum-operator{width:1.85cqw;max-width:15%;height:1.85cqw}

/* Replay uses the clear outer margin, preserving the approved centered text. */
#game .new-chapter-voice-header .instruction-listen{top:50%;bottom:auto;right:1%;width:var(--narration-button-size);height:var(--narration-button-size);transform:translateY(-50%)}
#game .new-chapter-voice-header .instruction-listen:active{transform:translateY(calc(-50% + 2px)) scale(.96)}

/* Long introductory TOPLA guidance fills the plaque with one consistent type size. */
#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .header-instruction{left:7%;width:88%;top:43%;height:39%;padding:2% 16% 2% 3%}

/* Reserve only the speaker's actual middle-right footprint, not an entire column. */
#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .header-instruction{left:7%;width:88%;top:40%;height:45%;padding:0 1%;display:flex}
#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .header-instruction p{display:flow-root;width:100%;max-width:none;line-height:1.06;text-wrap:initial;text-align:center}
#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .header-instruction p::before{content:"";float:right;width:16%;height:4.6cqw;shape-outside:inset(0);}

#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .instruction-header{height:35%!important}
#advanced-map-19:is([data-level="1"],[data-level="2"],[data-level="3"]) .header-instruction{top:42%;height:40%}

/* Chapter 20 uses the established chapter geometry. */
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-map{left:13%;top:15%;width:43%;height:78%;object-fit:contain}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-code-panel{position:absolute;left:57%;top:31%;width:41%;height:37%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-code-board{width:100%;height:100%;object-fit:fill}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-star-board{left:61%;top:13%;width:32%;height:16%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-control-tray{left:57%;top:69%;width:41%;height:14%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command{top:69%;width:8%;height:13%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-up{left:58%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-right{left:66.2%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-down{left:74.4%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-left{left:82.6%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-delete{left:90.8%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-retry{left:81%;top:86%;width:6.6%;height:11.8%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-run{left:89%;top:83%;width:9%;height:16%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-mission-stars{left:61%;top:13%;width:32%;height:16%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-total-stars{left:70%;top:6%;width:16%;height:6%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20)[data-level="2"] .journey-goal,:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20)[data-level="3"] .journey-goal{animation:journey-target 3s ease-in-out infinite}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-code-panel{top:27%;height:41%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-star-board,:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-mission-stars{top:10%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-total-stars{top:3.5%;height:5.5%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-command-al{left:58%;top:84%;width:8%;height:13%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-guide-hand{width:4.5%;height:8%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .festival-completed{filter:drop-shadow(0 0 8px #ffe88c)}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20).festival-finale:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:radial-gradient(circle at 25% 30%,#fff59188 0 2px,transparent 6px),radial-gradient(circle at 75% 20%,#ffadfa99 0 3px,transparent 7px),radial-gradient(circle at 50% 60%,#a7fff888 0 2px,transparent 6px);background-size:145px 165px,185px 145px,125px 195px;animation:festival-shimmer 2s ease-in-out infinite}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .festival-intro-paytak{left:48%;top:82%;width:17%}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .journey-intro-almila{display:none}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .matching-option{pointer-events:none}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .matching-flying-piece{z-index:6;pointer-events:none}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20).matching-mismatch .journey-goal{animation:matching-shake .5s ease-in-out 2;filter:drop-shadow(0 0 8px #ff9655)}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .festival-intro-paytak canvas{display:block;width:100%;height:100%;object-fit:contain}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .festival-intro-paytak{height:40%}
:is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-control-tray{display:none} :is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .journey-intro-almila{display:none}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .paytak-speech-bubble p{font-size:1.3cqw;line-height:1.15}
#game :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-home{left:2.4%;top:3.2%;width:5.3%;height:9.42%;border-radius:50%}
#game:not(.has-player-header) :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-level-jump{left:8.5%;top:3.2%;width:5.3%;height:9.42%}
#game:not(.has-player-header) :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .current-game-number{left:14.6%;top:3.7%;width:5.5%;height:8%}
#game.has-player-header :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-level-jump{left:23%;top:3.6%;width:4.7%;height:8.36%}
#game.has-player-header :is(#advanced-map-11,#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .current-game-number{left:28.5%;top:4%;width:5.5%;height:7%}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .festival-intro-paytak{top:84%;transform:translate(-50%,-100%);filter:none}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .paytak-speaking-actor{filter:none}
:is(#advanced-intro-11,#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .care-intro-ground-shadow{position:absolute;left:48%;top:81.2%;width:10%;height:2.1%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#69451b66 0%,#69451b33 45%,#69451b00 72%);pointer-events:none;z-index:1}
:is(#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .festival-intro-paytak{top:80%}
:is(#advanced-intro-15,#advanced-intro-16,#advanced-intro-17,#advanced-intro-18,#advanced-intro-20) .care-intro-ground-shadow{top:77.8%}
#game :is(#advanced-map-17,#advanced-map-18,#advanced-map-20) .chapter-guide-hand{z-index:45!important}
:is(#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .header-instruction{left:7%;width:88%;padding:0 16% 0 2%;justify-content:center}
:is(#advanced-map-15,#advanced-map-16,#advanced-map-17,#advanced-map-18,#advanced-map-20) .header-instruction p{transform:translateY(.1em);text-wrap:balance}
#advanced-map-20 .sum-number{position:absolute;display:flex;align-items:center;justify-content:center;gap:2%;z-index:3;transform:translate(-50%,-50%);pointer-events:none;background:radial-gradient(circle at 35% 25%,#fff9b8,#ffc843 65%,#b77a25);border:2px solid #88511c;border-radius:50%;box-shadow:inset 0 2px 2px #fffbd9,0 3px 3px #4b381b55}
#advanced-map-20 .sum-number img{height:75%;width:auto;max-width:55%;object-fit:contain}
#advanced-map-20 .sum-number span{font:1.4cqw 'Paytak Coiny';color:#713d15}
#advanced-map-20 .sum-number-used{opacity:.32;filter:saturate(.2);box-shadow:none}
#advanced-map-20 .sum-status{position:absolute;left:25%;top:1.8%;width:29%;height:11%;z-index:8;background:url('assets/instruction-plaque-v1.webp') center/100% 100% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1% 2%;font-family:'Paytak Coiny',sans-serif;color:#63320d;pointer-events:none}
#advanced-map-20 .sum-status>div{display:flex;justify-content:center;gap:1.3cqw;font-size:1.22cqw;line-height:1.1;white-space:nowrap}
#advanced-map-20 .sum-status b{color:#97500d;font-size:1.8cqw;font-weight:400}
#advanced-map-20 .sum-status small{font-size:.96cqw;line-height:1.15;text-align:center}
#advanced-map-20 .chapter-command-topla:after{content:'TOPLA';position:absolute;top:100%;left:0;width:100%;font:.8cqw 'Paytak Coiny';color:#fff0b1;text-shadow:0 1px 2px #48220c}
#advanced-map-20 .chapter-command-repeat{display:none!important}
#game.command-cross-layout #advanced-map-20 .chapter-command-topla{left:80.2%;top:64%;width:5.6%;height:9.956%;z-index:8;transform:none}
#advanced-map-20 .sum-status>div{transform:translateY(.1em)}
#advanced-map-20 .header-instruction{top:40%;height:45%;padding:0 16% 0 2%;align-items:center;justify-content:center}
#advanced-map-20 .header-instruction p{transform:none;line-height:1.08;text-wrap:balance}
#advanced-map-20 .sum-status{padding:1% 2%;gap:.25cqw}
#advanced-map-20 .sum-status>div{font-size:1.65cqw;line-height:1.15;align-items:center;gap:1.5cqw;transform:translateY(.08em)}
#advanced-map-20 .sum-status>div span{display:flex;align-items:center;gap:.35cqw}
#advanced-map-20 .sum-status b{font-size:2.1cqw;line-height:1;font-weight:400}
#advanced-map-20 .sum-status small{font-size:1.02cqw;line-height:1.05}
#advanced-map-20 .sum-hud{position:absolute;top:1.8%;width:26%;transform:translateX(-50%);z-index:8;display:flex;flex-direction:column;align-items:center;gap:.18cqw;pointer-events:none}
#advanced-map-20 .sum-hud .sum-status{position:relative;left:auto;top:auto;width:100%;height:3.05cqw;flex:none;padding:.25cqw 1.2cqw;background-size:100% 150%;gap:0}
#advanced-map-20 .sum-hud .sum-status>div{font-size:1.4cqw;gap:1.3cqw;line-height:1;transform:translateY(.08em)}
#advanced-map-20 .sum-hud .sum-status b{font-size:1.85cqw}
#advanced-map-20 .sum-equation{width:72%;height:2.75cqw;display:flex;align-items:center;justify-content:center;gap:.26cqw;padding:.3cqw .7cqw;background:url('assets/instruction-plaque-v1.webp') center/100% 150% no-repeat}
#advanced-map-20 .sum-equation img{height:2.05cqw;width:auto;max-width:15%;object-fit:contain;filter:drop-shadow(0 1px 0 #63380c)}
#advanced-map-20 .sum-equation img.sum-operator{width:1.85cqw;max-width:15%;height:1.85cqw}
#advanced-map-20 .header-instruction{padding:0 16% 0 2%;top:40%;height:45%}
#advanced-map-20 .secret-inventory{position:absolute;left:20%;top:8%;display:flex;gap:.4cqw;z-index:7;pointer-events:none}
.secret-inventory img{width:3.2cqw;height:3.2cqw;object-fit:contain;background:#f9e5b0;border:2px solid #8e592a;border-radius:20%;opacity:.5}
.secret-inventory img.packed{opacity:1;border-color:#ffe632;box-shadow:0 0 8px 3px #ffe632}
.secret-unlock-symbol{position:absolute;width:5cqw;height:5cqw;object-fit:contain;z-index:15;pointer-events:none}

#advanced-intro-20 .secret-intro-label{position:absolute;left:35%;top:5.7%;width:30%;height:10%;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:6;color:#53280f;font-family:"Paytak Coiny",sans-serif;text-align:center;pointer-events:none}
.secret-intro-label small{font-size:1.35cqw}.secret-intro-label strong{font-size:2cqw;font-weight:400}

.secret-companion{position:absolute;object-fit:contain;transform:translate(-50%,-100%);z-index:7;pointer-events:none}

/* Hinged gate leaves, warm interior light and independently moving bridge deck. */
.secret-gate-stage{position:absolute;z-index:6;pointer-events:none;isolation:isolate;perspective:700px}
.secret-gate-stage>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.secret-gate-stage>svg{display:block;width:100%;height:100%;overflow:visible}
.secret-portal-depth{position:absolute;left:24%;top:24%;width:52%;height:64%;border-radius:48% 48% 6% 6%;background:linear-gradient(#fff1bb44,#d8b45c22),url("assets/secret-background-v1.webp") 52% 55%/auto 180%;z-index:0}
.secret-portal-light{position:absolute;left:24%;top:24%;width:52%;height:64%;border-radius:48% 48% 6% 6%;background:radial-gradient(ellipse at 50% 25%,#fffde0 0,#ffe59a 60%,#e4bd64 100%);box-shadow:0 0 16px 4px #ffe399;opacity:.08;z-index:1}
.secret-door-left{transform-origin:23% 56%;z-index:3;backface-visibility:visible}
.secret-door-right{transform-origin:77% 56%;z-index:3;backface-visibility:visible}
.secret-door-frame{z-index:5}
.secret-finale-entered .secret-portal-light{box-shadow:0 0 19px 5px #ffeab0}

.secret-door-foreground{position:absolute;z-index:9;object-fit:contain;pointer-events:none}

.secret-gate-stage:not(.secret-bridge-stage)::after{content:"";position:absolute;left:12%;top:82%;width:76%;height:18%;background:radial-gradient(ellipse,#ffe49b88,transparent 72%);opacity:0;transition:opacity .6s;z-index:0}
.secret-gate-stage.secret-gate-open::after{opacity:1}

/* TOPLA uses only its embossed plus symbol, matching the other command buttons. */
.chapter-command-topla>span{display:none}

#game .chapter-command-topla::after{content:none}

/* The portal interior follows its own door aperture; feathered edges merge into the frame. */
.secret-gate-stage .secret-portal-depth,.secret-gate-stage .secret-portal-light{inset:0;width:100%;height:100%;border-radius:0;-webkit-mask-image:var(--secret-aperture);mask-image:var(--secret-aperture);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;box-shadow:none}
.secret-portal-depth::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 52%,transparent 20%,#62451c33 65%,#42310f66 100%)}
#game.command-cross-layout .chapter-command-topla{width:5.6%!important;height:9.956%!important;transform:none}

/* Paytak remains above every chapter-20 target, portal interior and unlock prop. */
#advanced-map-20 .chapter-mission-paytak{z-index:20}
#advanced-map-20 .chapter-mission-transition{z-index:30}

/* Keep the complete command-card composition inside the selection window. */
.card.art-theme-A>img.card-a-illustration[src*="chapter-icon-"]{object-fit:contain;background:#315c39}

/* Five-card preview: one readable row, centered within the stone board. */
#levels.chapter-pages-five .card .chapter-card-title{white-space:normal;text-wrap:balance;font-size:1.35cqw;line-height:1.16;top:101%;left:0;width:100%}
#levels.chapter-pages-five .card.art-theme-A>img.card-a-illustration{left:7%;top:20.5%;width:86%;height:56.5%;object-fit:fill;background:none}

/* Page number inside the stone board, matching the marked area. */
#levels.chapter-pages-five .chapter-page-count{bottom:11.8%}

/* Reward games accompany their five-chapter group without a chapter number. */
#levels .chapter-group-reward{position:absolute;left:33%;top:74.5%;width:34%;height:9%;display:flex;align-items:center;gap:3%;padding:.5% 2%;background:url('assets/reward-group-board.svg') center/100% 100% no-repeat;text-decoration:none;color:#66300b;z-index:6;font-family:'Paytak Coiny',sans-serif;transition:transform .12s}
#levels .chapter-group-reward[hidden]{display:none}
#levels .chapter-group-reward>img{height:90%;aspect-ratio:1;object-fit:cover;border-radius:18%}
#levels .chapter-group-reward>span{flex:1;text-align:center;line-height:1.1}
#levels .chapter-group-reward small{display:block;font-size:1cqw;color:#215e3b}
#levels .chapter-group-reward strong{display:block;font-size:1.2cqw;font-weight:normal}
#levels .chapter-group-reward>b{font-size:1.4cqw}
#levels .chapter-group-reward:active{transform:translateY(3px) scale(.98)}

.reordered-nameplate.chapter-intro-nameplate{width:27%;height:auto;aspect-ratio:2.5;display:block}
.reordered-nameplate>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.reordered-nameplate>small,.reordered-nameplate>strong{position:absolute;display:flex;align-items:center;justify-content:center;font-family:'Paytak Coiny',sans-serif;color:#ffe04b;font-weight:normal;line-height:1;white-space:nowrap;-webkit-text-stroke:.14cqw #592005;paint-order:stroke fill;text-shadow:0 .19cqw #4a1808,0 -.065cqw #fff7ab;overflow:visible}
.reordered-nameplate>small{left:25%;top:16%;width:50%;height:23%;font-size:1.7cqw}
.reordered-nameplate>strong{left:9%;top:49%;width:82%;height:30%;font-size:2.2cqw}

/* Blue regular cards at slots 6, 11, 16; only a small subtitle marks the reward. */
#levels.chapter-pages-five .card .chapter-reward-marker{display:block;margin-top:.4cqw;font-size:.95cqw;line-height:1.15;color:#c6f8ff;-webkit-text-stroke:.09cqw #174855;paint-order:stroke fill;text-shadow:0 1px #174855}
#levels .chapter-group-reward{display:none!important}

/* Keep identity and navigation out of the arithmetic HUD in chapters 19–20. */
#game.has-player-header.has-sum-player-header .player-identity-B{left:46.5%;top:4%;width:13.5%;height:7%}
#game.has-player-header :is(#advanced-map-19,#advanced-map-20) .chapter-level-jump{left:61.1%;top:3.6%;width:4.7%;height:8.36%}
#game.has-player-header :is(#advanced-map-19,#advanced-map-20) .current-game-number,#game:not(.has-player-header) :is(#advanced-map-19,#advanced-map-20) .current-game-number{left:66.2%;top:4%;width:3.6%;height:7%;display:grid;grid-template-rows:minmax(0,1fr);grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);justify-content:center;gap:0}
#game :is(#advanced-map-19,#advanced-map-20) .current-game-number>.current-game-digit{width:100%;height:100%;max-width:100%;object-fit:contain}
