/* Luma Isles 1.8 — a bright harbour adventure, with the existing board motion. */
:root{--paper:#166e98;--white:#fff5d9;--ink:#244269;--muted:#52708a;--teal:#279bb0;--teal-dark:#146b8e;--coral:#ff8862;--gold:#ffd36a;--line:#d4ab60;--font:ui-rounded,'Arial Rounded MT Bold','Trebuchet MS',system-ui,sans-serif;--shadow:0 10px 0 #084b722e,0 18px 40px #04334d35}
html{background:#166e98}body{color:var(--ink);background:radial-gradient(ellipse at 75% 0,#70d8e6 0,transparent 55%),linear-gradient(#2b99ba,#17668e 72%,#174d7c);padding-bottom:30px;min-height:100dvh;font-weight:550}
body::before{content:'';position:fixed;inset:0;background:linear-gradient(#0e6e8caa,#15537de6),url('./assets/backdrops/island.webp?v=1.56') center/cover;opacity:.28;pointer-events:none;z-index:-1}
button:focus-visible,a:focus-visible{outline:3px solid #fff6b2;outline-offset:3px}button:disabled{opacity:.65}h1,h2,h3{font-family:var(--font);font-weight:900;letter-spacing:-.6px}button{font-weight:800}.topbar{max-width:1180px;height:102px;padding:12px 28px;gap:20px}.brand{gap:11px}.brand-emblem{height:55px;width:47px;display:grid;place-items:center;border-radius:17px;background:linear-gradient(#ffe27e,#ffb72e);border:2px solid #fff2b7;box-shadow:0 4px 0 #b96f26,0 4px 15px #0c4b7950;transform:rotate(-8deg)}.brand-emblem svg{width:33px;height:42px}.brand-name{font:900 37px/.95 var(--font);letter-spacing:-1.7px;color:#fff2b3;text-shadow:0 3px 0 #12618b,0 5px 0 #0a4b70}.brand-tag{font-size:9px;letter-spacing:2.1px;color:#d5f8fa;margin-top:9px}.view-tabs{background:#0b5682;border:2px solid #65bed1;box-shadow:0 4px 0 #08436b;border-radius:20px;padding:4px;gap:5px}.view-tabs button{color:#c7ebf3;font-size:13px;min-width:102px;border-radius:13px;padding:8px 13px;min-height:47px;display:flex;align-items:center;justify-content:center;gap:7px}.nav-icon{width:25px;height:25px;filter:drop-shadow(0 2px 0 #153c5733)}body.view-island [data-view=island],body.view-puzzle [data-view=puzzle],body.view-journal [data-view=journal]{background:linear-gradient(#fff2b0,#ffd571);color:#694c2d;box-shadow:inset 0 1px 0 white,0 3px 0 #c18b31}.view-tabs button:hover{color:white}.header-tools{gap:9px}.star-wallet{height:43px;min-width:76px;padding:0 13px 0 9px;border:2px solid #ffe5a0;background:linear-gradient(#fff9df,#ffe4a3);box-shadow:0 3px 0 #b88637,0 5px 12px #0b446a30;color:#574a68;font-size:20px}.star-wallet .icon{width:30px;height:30px}.icon-button{height:39px;width:39px;min-height:39px;color:#ecf7f7;background:linear-gradient(#2c9cb6,#18628e);border:2px solid #90dae6;box-shadow:0 3px 0 #104d76}.icon-button:hover{background:#3aabc4}.icon-button[aria-pressed=true]{background:#286c94;color:#fff}.game-layout{display:block;max-width:1120px;margin:auto;padding:5px 25px 35px}.island-view,.puzzle-view,.journal-view{display:none}.view-island .island-view{display:grid;grid-template-columns:minmax(0,1fr) 310px;column-gap:24px;align-items:start}.view-puzzle .puzzle-view{display:block;max-width:570px;margin:0 auto}.view-journal .journal-view{display:block}.island-heading{grid-column:1/-1;min-height:100px;margin:0 0 20px;position:relative;justify-content:flex-start;padding-right:125px}.island-heading .eyebrow{color:#cff9f5;font-size:10px;letter-spacing:1.5px}.chapter-line{height:3px;width:22px;border-radius:3px;background:#ffda6b}.island-heading h1{font:900 38px/1.12 var(--font);color:#fff7d4;text-shadow:0 3px 0 #116387;letter-spacing:-1px;margin:7px 0}.intro-text{font-size:14px;color:#d3f6f4}.island-pip{position:absolute;right:0;bottom:-7px;width:143px;height:143px;object-fit:contain;filter:drop-shadow(0 5px 2px #07466d55);pointer-events:none}.world-card{grid-column:1;grid-row:2;border:4px solid #ffe3a0;border-radius:25px;background:#fff0bc;box-shadow:0 6px 0 #b8873b,0 15px 30px #07395840;overflow:hidden;position:relative}.world{aspect-ratio:3/2}.world-base{filter:saturate(1.14) brightness(1.07)}.world-layer,.world-finished{filter:saturate(1.14) brightness(1.07)}.world:after{background:linear-gradient(transparent,#124670a1);inset:65% 0 0}.world-caption{bottom:12px;left:18px}.world-caption strong{font:900 24px/1.2 var(--font);text-shadow:0 2px 3px #164e64}.world-weather{display:none}.place-kicker{font-size:8px;letter-spacing:1.8px}.world-pin{height:36px;width:36px;min-height:36px;background:linear-gradient(#fff3b5,#ffc95a);border:2px solid #fff4c0;box-shadow:0 3px 0 #a16e32,0 5px 8px #16466d60}.world-pin .icon{width:23px;height:23px}.world-pin.available{background:linear-gradient(#fff3ba,#ffd06a);opacity:1}.world-pin.done{background:linear-gradient(#b6f39b,#5dc582);border-color:#e5ffd6;color:#236f55;box-shadow:0 3px 0 #397a54}.world-pin.current{background:#fff3b3;border-color:white;box-shadow:0 0 0 3px #f6bd46,0 0 24px #ffdb69}.world-progress{font-size:12px;font-weight:800;padding:13px 16px 8px;gap:10px;color:#8a6230}.world-progress strong{font-size:13px;color:#745528}.world-progress progress{height:12px;background:#d6b87d;border:2px solid #c29f60;border-radius:12px}.world-progress progress::-webkit-progress-bar{background:#d4b37b}.world-progress progress::-webkit-progress-value{background:linear-gradient(#9ee881,#43b58c);border-radius:9px}.world-progress progress::-moz-progress-bar{background:#68cd8a}.primary-button{font-size:16px;font-weight:900;border-radius:16px;min-height:52px;background:linear-gradient(#9be977,#40ba77);border:2px solid #e1ffb7;color:#174f3e;box-shadow:0 5px 0 #22855c,0 8px 15px #134c6633;text-shadow:0 1px 0 #e6ffc18c}.primary-button:hover:not(:disabled){background:linear-gradient(#b6f88d,#54c982);transform:translateY(-1px)}.primary-button:active:not(:disabled){box-shadow:0 1px 0 #22855c;transform:translateY(4px)}.island-play{width:calc(100% - 32px);margin:4px 16px 17px;font-size:22px;min-height:61px;justify-content:center}.island-play::before{content:'▶';font-size:19px;margin-right:3px}.task-card{grid-column:2;grid-row:2;margin-top:0;background:#fff3d2;border:3px solid #f9d48a;border-radius:23px;box-shadow:0 5px 0 #ba873d,0 12px 25px #11436130;overflow:visible}.story-line{background:#ffedbb;border-radius:20px 20px 0 0;padding:16px 14px;align-items:flex-start;gap:10px;border-bottom:2px solid #eac98b}.story-line p{font:600 13px/1.55 var(--font);color:#6f5e43;margin-top:6px}.character-name{font-size:11px;letter-spacing:.7px;color:#a65b3e}.character-name span{display:block;font-size:10px;color:#927646;line-height:1.3}.avatar{height:53px;width:53px;border:2px solid #fff8dd;box-shadow:0 3px 0 #cdad6d;background:#67c6c4}.avatar:after,.avatar>span{display:none}.avatar .portrait{position:absolute;width:100%;height:100%;inset:0;z-index:1}.avatar .portrait-oren{display:none}.avatar[data-character=oren] .portrait-mara{display:none}.avatar[data-character=oren] .portrait-oren{display:block}.task-content{padding:17px 17px 20px}.task-number{font-size:35px;color:#e5aa38}.small.eyebrow{font-size:9px;letter-spacing:.7px;color:#a67b31}.task-heading h2{font:900 21px/1.2 var(--font);color:#324f6c;margin-top:5px}.task-content>p{font-size:13px;color:#7a704f;line-height:1.6;max-width:100%;margin:13px 0}.style-options{margin:15px 0 20px}.style-options>span{font-size:11px;color:#8d784e}.style-swatch{border-color:#fff8dd;width:27px;height:27px;min-height:27px;outline-color:#d4ae66}.style-swatch[aria-pressed=true]{outline-color:#268fa1}.restore-button{font-size:14px;justify-content:center;min-height:53px;background:linear-gradient(#ffbc69,#f28752);border-color:#ffe6a5;color:#723d26;box-shadow:0 4px 0 #c26438}.restore-button:hover:not(:disabled){background:linear-gradient(#ffd186,#ffab6a)}.restore-button.can-restore{background:linear-gradient(#9de777,#43b77c);box-shadow:0 4px 0 #24895c;color:#1d5c44}.repair-choice-heading{grid-column:1/-1;grid-row:3;margin-top:28px}.repair-choice-heading h2{font:900 25px/1.2 var(--font);color:#fff3c2;text-shadow:0 2px 0 #145d83}.repair-choice-heading p{font-size:13px;color:#c9eef5;margin-top:6px}.renovation-list{grid-column:1/-1;grid-row:4;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:17px 0 0;padding:0}.renovation-row{display:flex;flex-direction:column;align-items:stretch;gap:0;border:3px solid #c7e6e7;background:#e9f8ee;border-radius:18px;padding:0;overflow:hidden;box-shadow:0 4px 0 #104d73;font-size:13px;color:#31576d;line-height:1.3;text-align:center;position:relative}.renovation-row>span:nth-child(2){padding:10px 10px 7px;flex:1;min-height:50px;font-weight:850}.renovation-row small{padding:0 10px 12px;color:#84602c;font-size:13px}.repair-thumb{height:104px;width:100%;position:relative;display:block;background:#7dd1d8;overflow:hidden;border-bottom:2px solid #b1d7d7}.repair-thumb>svg{width:100%;height:100%;display:block}.renovation-number{position:absolute;right:7px;bottom:7px;height:27px;width:27px;border:2px solid #fff2b2;background:#ffdb6a;box-shadow:0 2px 0 #b88737}.renovation-list .renovation-number .icon{width:20px;height:20px}.renovation-row.current{border:3px solid #ffdc74;background:#fff3c9;box-shadow:0 4px 0 #bb862e,0 0 18px #ffe07b38}.renovation-row:hover{border-color:#fff0bd;transform:translateY(-2px)}.renovation-row.done{background:#d4eed9;border-color:#93dab6}.renovation-row.done .renovation-number{background:#77d79b;color:#28684c;border-color:#e8ffce}.renovation-row.done small{color:#317258}
/* Dedicated play scene: generous board, chunky targets and tactile controls. */
.puzzle-view{padding-top:7px}.puzzle-card{background:linear-gradient(#1e87a8,#17648f);border:3px solid #a0ddeb;border-radius:28px;padding:19px 20px 20px;box-shadow:0 7px 0 #0b456e,0 20px 45px #073c5b50;position:relative;overflow:visible}.puzzle-heading{min-height:68px;position:relative;padding-right:90px}.puzzle-heading .eyebrow{font-size:10px;color:#c5f3f2;letter-spacing:1.7px}.puzzle-heading h2{font:900 26px/1.15 var(--font);letter-spacing:-.5px;color:#fff4ca;text-shadow:0 2px 0 #175779;margin-top:7px}.puzzle-pip{position:absolute;right:-4px;bottom:-3px;height:96px;width:96px;object-fit:contain;filter:drop-shadow(0 4px 0 #155c7d60);pointer-events:none}.level-description{font-size:12px;line-height:1.5;color:#d6f3f1;margin-top:10px;min-height:36px}.goal-bar,.goal-bar:has(.obstacle-goal:not([hidden])){grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;background:transparent;border:0;padding:0;margin:13px 0 18px;min-height:80px}.goal-bar:has(.obstacle-goal:not([hidden])){grid-template-columns:.85fr 1fr 1fr 1fr}.goal{border:2px solid #f8d688;border-radius:14px;background:linear-gradient(#fff6d9,#ffe6a4);box-shadow:0 4px 0 #b68a45;min-width:0;min-height:80px;gap:5px;padding:7px 2px;color:#755529}.goal+.goal{border-left:2px solid #f8d688}.goal-label{font-size:9px;letter-spacing:.7px;color:#96713f;font-weight:900}.goal>strong,.goal>div strong,.obstacle-goal>strong,#colorGoal>span{font-size:20px;font-weight:900;color:#3a5779;white-space:nowrap}.goal.moves-goal{background:linear-gradient(#beef9d,#7fd68a);border-color:#c8f4a9}.moves-goal .goal-label{color:#3b7946}.moves-goal>strong{font-size:31px;color:#23593f}.goal.done{border-color:#b9ef9b;background:#dcf4b5}.goal svg:not(.icon),.goal .icon{width:25px;height:25px}.goal>div{gap:3px}.board-shell{padding:10px;border:3px solid #ffe6a1;border-radius:22px;background:linear-gradient(130deg,#f0b84e,#ffdc77 30%,#daa13e);box-shadow:0 5px 0 #a96b24,0 9px 15px #093c6655,inset 0 2px 0 #fff8c3;overflow:hidden}.board-shell:before{content:'';position:absolute;inset:7px;border-radius:13px;background:#667ab4;box-shadow:inset 0 3px 6px #2b3e7655;pointer-events:none}#board{gap:3px}.cell{border:0;border-radius:9px;background:linear-gradient(135deg,#a2b4e3,#8c9ed0);box-shadow:inset 0 1px 0 #cbd8ff5c,inset 0 -2px 0 #6679b23d;padding:0}.cell:nth-of-type(even){background:linear-gradient(135deg,#96a9da,#8295c7)}.cell .piece{inset:0;z-index:2}.piece>svg{width:94%;height:94%;filter:drop-shadow(0 3px 1px #34467555) saturate(1.2)}.cell.path,.cell.path:nth-of-type(even){background:linear-gradient(135deg,#ffeeb6,#eabe5b);box-shadow:inset 0 0 0 2px #ffe5a0}.cell.lit,.cell.lit:nth-of-type(even){background:linear-gradient(#fff6a9,#ffdd65);box-shadow:inset 0 0 0 2px #fff6b8,0 0 12px #ffe58280}.cell.chained,.cell.chained:nth-of-type(even){background:linear-gradient(135deg,#a4b4c9,#7893b5);box-shadow:inset 0 0 0 2px #d1e1e3}.tile-chain svg{fill:#f4ead033;stroke:#376187;stroke-width:4.4;filter:drop-shadow(0 2px 0 #ecf6ff)}.tile-seal{background:linear-gradient(#c9f7ffe6,#78cbe8e6);border:2px solid #e5ffff;border-radius:7px}.tile-seal svg{fill:#e3f8ff;stroke:#3874a7}.cell.sealed{box-shadow:inset 0 0 0 2px #d0fbff,0 0 5px #b1e9ff}.cell.is-special{background:linear-gradient(#b9b5ed,#9790ce);border:0}.piece>.power-art{width:96%;height:96%;filter:drop-shadow(0 3px 1px #41305e70)}.cell.is-special:has(use[href='#prism']) .piece>svg{width:98%;height:98%}.power-direction{font-size:10px;line-height:12px;padding:0 4px;background:#fff2b1;color:#64508f;border-color:#ffdb6a}.cell.selected{outline:3px solid white;outline-offset:-2px;background:#fff0b3;box-shadow:0 0 0 2px #ffd370}.cell:focus-visible{outline:3px solid white;outline-offset:-2px}.path-lantern{background:#ffe195;border:1px solid #ce9233;width:14px;height:14px}.light-route polyline{stroke:#ffe39a;opacity:.6}.board-message{font-size:12px;line-height:1.45;color:#fff4c8;padding:14px 4px 6px;min-height:46px;font-weight:750}.puzzle-tools{margin-top:10px;gap:10px}.puzzle-tools button{display:flex;flex-direction:column;gap:4px;min-height:69px;border-radius:16px;border:2px solid #88d3e2;background:linear-gradient(#2e9fc0,#2074a6);box-shadow:0 4px 0 #104d78;color:#e4faff;font-size:11px;padding:8px 4px;font-weight:800}.puzzle-tools button:hover:not(:disabled){background:linear-gradient(#56bbcc,#3089b4)}.tool-icon{font-size:29px;color:#ffe697;height:28px;line-height:28px}.tool-icon svg{height:29px;width:29px}.puzzle-tools button:disabled{opacity:.48}.play-button{margin:6px 0 4px;justify-content:center;font-size:18px}.play-button:hover:not(:disabled){background:linear-gradient(#b1f48b,#55c881)}.help-inline{color:#c7e7eb;font-size:11px;border-color:#67b3c55c;margin-top:13px;padding-top:10px;min-height:35px}.help-inline .icon{opacity:1}.level-dots{gap:6px;margin:20px 0 7px;justify-content:center}.level-dots>.level-dot{color:#c9ebf1;background:#1a6088;border:1px solid #4993b0;box-shadow:0 2px 0 #0c486c;border-radius:9px;font-size:11px;width:31px;height:33px;min-height:33px}.level-dots>.level-dot.done{color:#e9ffd8;background:#368d83;border-color:#7dccad}.level-dots>.level-dot.current{color:#6e5026;background:#ffdc7c;border:2px solid #fff1b8}.prototype-note{color:#afd9e4;font-size:10px}.replay-note{background:#124c75;color:#dbf1f6}.puzzle-completion{color:#e2f5f1}.puzzle-completion h3{font:900 28px var(--font);color:#fff0b5}.puzzle-completion p{color:#d7f0ed}.puzzles-done .puzzle-pip{height:95px}
/* Storybook and rewards share the same warm illustrated game materials. */
.journal-view{max-width:970px;margin:0 auto}.journal-hero{padding:24px 0}.journal-hero h1{font:900 46px/1.08 var(--font);color:#fff1ba;text-shadow:0 3px 0 #165b7c}.journal-hero>.eyebrow{color:#d1f8f3}.journal-hero>p:last-child{font-size:15px;color:#d8f5f3;line-height:1.8}.chapter-card{border:3px solid #f9d58d;background:#fff2cf;border-radius:22px;box-shadow:0 5px 0 #ba873e;padding:25px}.chapter-card h2{font:900 29px/1.2 var(--font);color:#2d5572}.chapter-card p:not(.eyebrow){color:#716447}.chapter-journal-heading h2{font:900 28px var(--font);color:#fff1b9}.chapter-journal-heading p{color:#d0eef0}.story-entry.current{background:#fbecc7;border:2px solid #e3be78;color:#48677b}.story-entry.unlocked{background:#fff5db;border:2px solid #f0d18c}.story-entry strong{font-weight:850}.story-entry small,.story-entry span>span{color:#7c714c}.story-number{background:#ffe5a0;color:#9b7029}.story-entry button:hover{background:#fff0bf}.save-note{color:#c3e2e8}.text-button{color:#ffdcbd}.game-modal{border:4px solid #ffdc87;border-radius:27px;background:linear-gradient(#fff8df,#fff0ca);box-shadow:0 7px 0 #b4823c,0 25px 80px #082b586b;color:#294f70;padding:35px 25px 27px}.game-modal::backdrop{background:#063657b5;backdrop-filter:blur(4px)}.game-modal h2{font:900 31px/1.15 var(--font);color:#30557a;text-shadow:0 2px 0 white;letter-spacing:-.8px}.game-modal>.eyebrow{color:#ad7c32;font-size:10px}.modal-text{font-size:14px;color:#75684d;line-height:1.7}.modal-text strong{color:#3a667b}.modal-icon{width:82px;height:82px;background:radial-gradient(#fff7b0,#ffda6e);border:3px solid #f7c560;box-shadow:0 3px 0 #cd9334}.modal-icon svg{width:57px;height:57px}.modal-close{background:linear-gradient(#ff9d7b,#eb665a);border:2px solid #ffe7be;color:white;box-shadow:0 3px 0 #b84f41;width:34px;height:34px;min-height:34px;font-weight:900}.modal-actions button{font-size:15px;min-height:51px;background:linear-gradient(#95e576,#45bc7a);color:#225943;border:2px solid #d5f5a6;box-shadow:0 3px 0 #2a9264;border-radius:13px}.modal-actions button.secondary{color:#426b83;background:#d9eff0;border:2px solid #b4dadd;box-shadow:0 3px 0 #97c2c9}.toast{background:#0a4c76f5;color:#fff1bf;border:2px solid #5cbbd1;border-radius:17px;font-weight:750;box-shadow:0 4px 0 #083c60}.loading-state{color:#fff0bd}.game-modal.victory{border-color:#ffdb73;box-shadow:0 6px 0 #c4913e,0 0 60px #ffe29450,0 25px 90px #102d625c}.repair-comparison figure{border:2px solid #e0bf7e;background:#f7e6b9}.repair-comparison figcaption{color:#77603d;font-size:12px}.repair-comparison figure:last-child{border-color:#8bcead;background:#dff2d6}
@media(max-width:900px) and (min-width:761px){.topbar{padding:12px 25px}.brand-name{font-size:30px}.brand-tag{font-size:7px;letter-spacing:1.7px}.view-tabs button{min-width:80px;padding:8px}.view-island .island-view{grid-template-columns:minmax(0,1fr) 270px;gap:20px}.island-heading h1{font-size:33px}.world-caption strong{font-size:20px}.world-progress{font-size:10px}.task-heading h2{font-size:19px}.renovation-list{gap:10px}.repair-thumb{height:85px}}
@media(max-width:760px){body{background:radial-gradient(ellipse at 80% 0,#55c6d7,transparent 48%),linear-gradient(#218fb0,#16638d);padding-bottom:93px}.topbar{height:83px;padding:8px 17px;gap:10px}.brand{gap:8px}.brand-emblem{height:42px;width:35px;border-radius:12px}.brand-emblem svg{width:26px;height:33px}.brand-name{font-size:28px;letter-spacing:-1.3px}.brand-tag{font-size:6px;letter-spacing:1.3px;margin-top:7px}.header-tools{gap:7px}.header-tools .icon-button{height:32px;width:32px;min-height:32px;border-width:1.5px}.header-tools .icon-button .icon{width:18px;height:18px}.star-wallet{height:34px;min-width:55px;gap:4px;font-size:17px;padding:0 8px 0 5px}.star-wallet .icon{height:24px;width:24px}.view-tabs{bottom:0;left:0;transform:none;width:100%;border:0;border-top:3px solid #91d4dc;background:linear-gradient(#1a7ca5,#135a89);border-radius:18px 18px 0 0;padding:6px 13px max(8px,env(safe-area-inset-bottom));gap:12px;box-shadow:0 -4px 18px #0d42683a;backdrop-filter:none}.view-tabs button{min-height:57px;min-width:0;flex-direction:column;gap:2px;font-size:10px;padding:4px 6px;border-radius:13px;color:#c2e8ee}.nav-icon{height:27px;width:27px}body.view-island [data-view=island],body.view-puzzle [data-view=puzzle],body.view-journal [data-view=journal]{background:linear-gradient(#fff1b1,#ffcc6a);box-shadow:0 3px 0 #c5913d;color:#765428}.game-layout{padding:0 12px 20px;max-width:540px}.view-island .island-view{display:flex;flex-direction:column;gap:0}.island-heading{margin:5px 2px 16px;min-height:90px;padding:0 93px 0 1px;align-items:center;width:calc(100% - 4px)}.island-heading .eyebrow{font-size:8px;letter-spacing:.6px;gap:5px}.chapter-line{width:12px;flex-shrink:0}.island-heading h1{font-size:28px;letter-spacing:-.7px;margin:7px 0 6px;line-height:1.02}.intro-text{font-size:11px;line-height:1.4;max-width:215px}.island-pip{width:110px;height:110px;right:-7px;bottom:-9px}.world-card{border-width:3px;border-radius:21px;width:100%;margin-bottom:24px}.world{aspect-ratio:3/2}.world-pin{width:29px;height:29px;min-height:29px}.world-pin .icon{width:18px;height:18px}.world-caption{left:13px;bottom:11px}.world-caption strong{font-size:20px}.place-kicker{font-size:7px}.world-progress{font-size:10px;padding:10px 12px 8px;gap:9px}.world-progress strong{font-size:11px}.world-progress progress{height:10px}.island-play{width:calc(100% - 24px);margin:4px 12px 15px;min-height:54px;font-size:22px;border-radius:14px}.task-card{width:100%;margin-top:0;border-radius:20px}.story-line{padding:13px 14px;border-radius:17px 17px 0 0;gap:10px;align-items:center}.avatar{width:46px;height:46px}.character-name{font-size:10px}.character-name span{display:inline;font-size:9px}.story-line p{font-size:12px;line-height:1.45;margin-top:4px}.task-content{padding:15px 15px 18px}.task-heading h2{font-size:20px}.task-content>p{font-size:12px;line-height:1.6;margin:10px 0}.style-options{margin:14px 0 17px}.restore-button{font-size:14px;min-height:50px}.repair-choice-heading{margin:26px 2px 0}.repair-choice-heading h2{font-size:25px}.repair-choice-heading p{font-size:12px}.renovation-list{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.renovation-row{min-height:0;font-size:12px;padding:0;border-radius:15px;border-width:3px;gap:0}.repair-thumb{height:95px}.renovation-row>span:nth-child(2){padding:9px 8px 6px;min-height:49px}.renovation-row small{font-size:12px;padding-bottom:10px}.renovation-row.current{border-width:3px}.puzzle-view{padding:0}.puzzle-card{padding:13px 10px 16px;border-radius:23px;border-width:2px}.puzzle-heading{padding-right:78px;min-height:63px;margin:0 4px}.puzzle-heading .eyebrow{font-size:9px;letter-spacing:1.3px}.puzzle-heading h2{font-size:25px;margin-top:6px;line-height:1.1}.puzzle-pip{height:87px;width:87px;right:-5px;bottom:-5px}.level-description{font-size:11px;line-height:1.45;margin:6px 5px 0;min-height:32px}.goal-bar,.goal-bar:has(.obstacle-goal:not([hidden])){gap:5px;margin:11px 0 14px;padding:0;min-height:73px}.goal{min-height:73px;gap:5px;border-radius:11px;padding:6px 1px}.goal-label{font-size:8px;letter-spacing:.3px}.goal-bar:has(.obstacle-goal:not([hidden])) .goal-label{font-size:8px}.goal>strong,.goal>div strong,#colorGoal>span{font-size:17px}.moves-goal>strong{font-size:28px}.goal svg:not(.icon),.goal .icon{width:20px;height:20px}.goal>div{gap:1px;min-height:25px}.board-shell{padding:6px;border-width:3px;border-radius:16px}.board-shell:before{inset:4px;border-radius:9px}#board{gap:2px}.cell{border-radius:7px}.piece>svg{height:96%;width:96%}.tile-chain{inset:10% 1%}.path-lantern{height:12px;width:12px;border-radius:3px}.path-lantern .icon{width:10px;height:10px}.power-direction{bottom:0;font-size:9px;line-height:10px;padding:0 3px}.board-message{font-size:11px;min-height:42px;padding:12px 3px 4px}.puzzle-tools{margin-top:8px;gap:9px}.puzzle-tools button{min-height:62px;border-radius:13px;padding:7px 2px;font-size:11px;gap:3px}.tool-icon{font-size:26px;height:25px;line-height:25px}.tool-icon svg{height:26px;width:26px}.play-button{font-size:18px;margin:7px 0 4px;min-height:49px}.level-dots{gap:5px;margin:17px 0 6px}.level-dots>.level-dot{width:28px;min-width:28px;height:31px;min-height:31px;border-radius:8px;font-size:10px}.help-inline{font-size:10px;line-height:1.5;padding-top:9px;margin-top:10px;min-height:35px}.prototype-note{font-size:9px;gap:6px;margin:13px 0 4px}.game-modal{width:calc(100vw - 28px);padding:32px 20px 24px;max-height:calc(100dvh - 30px);border-radius:24px}.game-modal h2{font-size:28px}.modal-text{font-size:13px}.modal-actions button{font-size:14px}.toast{bottom:87px;font-size:12px;padding:12px 16px}.journal-hero{padding:24px 5px}.journal-hero h1{font-size:37px}.journal-hero>p:last-child{font-size:13px}.chapter-card{padding:20px}.chapter-card h2{font-size:25px}.chapter-card p:not(.eyebrow){font-size:13px}.save-note{font-size:11px}.loading-state{font-size:15px}}
@media(max-width:350px){.topbar{padding:8px 12px;gap:6px}.brand-name{font-size:24px}.brand-emblem{width:30px;height:37px}.brand-tag{font-size:5px}.header-tools{gap:5px}.header-tools .icon-button{width:29px;height:29px;min-height:29px}.star-wallet{min-width:47px;font-size:15px}.game-layout{padding-left:8px;padding-right:8px}.island-heading h1{font-size:25px}.island-heading .eyebrow{font-size:7px}.island-pip{width:99px;height:99px}.puzzle-card{padding:12px 7px}.puzzle-heading h2{font-size:23px}.goal>div strong,#colorGoal>span{font-size:15px}.goal svg:not(.icon),.goal .icon{height:18px;width:18px}.world-progress{font-size:9px}.puzzle-tools button{min-height:58px}.level-description{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* 1.9: the puzzle occupies the available viewport; menus stay outside play. */
.puzzle-back{display:none}
.levels-button{display:block;margin:-5px auto 13px;padding:6px 14px;min-height:38px;font-size:12px;color:#85612f;text-decoration:underline;text-underline-offset:3px}
.level-picker{width:min(420px,calc(100vw - 28px));padding-top:39px}
.level-picker>p:not(.eyebrow){font-size:13px;line-height:1.6;color:#78674a}
.level-picker .level-dots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:21px 0 2px}
.level-picker .level-dots>.level-dot{width:100%;min-width:0;height:44px;min-height:44px;font-size:16px;border-radius:11px}
.level-picker .level-dots>.level-dot:disabled{opacity:.45}
body.view-puzzle{height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none;padding:0;display:grid;grid-template-rows:calc(52px + env(safe-area-inset-top,0px)) minmax(0,1fr)}
.view-puzzle .topbar{width:100%;max-width:600px;height:100%;min-height:0;margin:0 auto;padding:env(safe-area-inset-top,0px) 12px 0;gap:12px}
.view-puzzle .brand,.view-puzzle .view-tabs{display:none}
.view-puzzle .puzzle-back{display:flex;align-items:center;gap:7px;font-size:12px;color:#fff3c6;border:1px solid #8bd6df;border-radius:12px;background:#17698f;box-shadow:0 3px 0 #104c73;padding:5px 10px;min-height:37px}
.view-puzzle .puzzle-back .icon{width:23px;height:23px}
.view-puzzle .header-tools{gap:8px;margin-left:auto}
.view-puzzle .header-tools .icon-button{width:33px;height:33px;min-height:33px;border-width:1.5px}
.view-puzzle .star-wallet{height:34px;min-width:57px;font-size:17px;padding:0 9px 0 5px;gap:4px}
.view-puzzle .star-wallet .icon{width:25px;height:25px}
.view-puzzle .game-layout{height:100%;width:100%;min-height:0;max-width:600px;margin:0 auto;padding:0 10px max(10px,env(safe-area-inset-bottom,0px));overflow:hidden}
.view-puzzle .puzzle-view{display:block;max-width:580px;height:100%;width:100%;min-height:0;padding:0;margin:0 auto}
.view-puzzle .puzzle-card{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:44px 64px minmax(0,1fr) 34px auto 52px;gap:6px;padding:6px 0 0;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:hidden}
.view-puzzle .puzzle-heading{grid-row:1;min-height:0;margin:0 2px;padding-right:65px;align-items:center}
.view-puzzle .puzzle-heading .eyebrow{font-size:9px;letter-spacing:1px;line-height:1.3}
.view-puzzle .puzzle-heading h2{font-size:23px;line-height:1.1;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.view-puzzle .puzzle-pip{width:61px;height:61px;right:0;bottom:-3px}
.view-puzzle .level-description,.view-puzzle .help-inline,.view-puzzle .prototype-note,.view-puzzle .replay-note{display:none}
.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){grid-row:2;height:64px;min-height:0;margin:0;padding:0;gap:6px}
.view-puzzle .goal{height:100%;min-height:0;gap:3px;padding:4px 1px;border-radius:12px}
.view-puzzle .goal-label,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])) .goal-label{font-size:8px;letter-spacing:.4px}
.view-puzzle .goal>div{min-height:23px;gap:3px}
.view-puzzle .goal>div strong,.view-puzzle #colorGoal>span{font-size:18px}
.view-puzzle .moves-goal>strong{font-size:28px}
.view-puzzle .goal svg:not(.icon),.view-puzzle .goal .icon{width:21px;height:21px}
.view-puzzle .board-stage{grid-row:3;display:grid;place-items:center;min-height:0;min-width:0;width:100%;height:100%;container-type:size}
.view-puzzle .board-shell{width:min(100%,calc(100dvh - 290px));height:auto;max-width:100%;max-height:100%;aspect-ratio:1;margin:0;padding:6px;border-width:3px;border-radius:18px}
@supports(width:1cqw){.view-puzzle .board-shell{width:min(100cqw,100cqh);height:min(100cqw,100cqh)}}
.view-puzzle #board{width:100%;height:100%;aspect-ratio:1;grid-template-rows:repeat(7,minmax(0,1fr));gap:3px}
.view-puzzle .cell{height:100%;aspect-ratio:auto;min-height:0}
.view-puzzle .board-message{grid-row:4;min-height:0;height:34px;margin:0;padding:0 4px;font-size:11px;line-height:15px;overflow:hidden;align-self:center}
.view-puzzle .play-button{grid-row:5;min-height:43px;margin:0;font-size:16px;padding:7px 12px;border-radius:13px}
.view-puzzle .play-button.is-playing{display:none}
.view-puzzle .puzzle-tools{grid-row:6;height:52px;min-height:0;margin:0;gap:9px}
.view-puzzle .puzzle-tools button{height:100%;min-height:0;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;font-size:12px;padding:4px;border-radius:13px}
.view-puzzle .tool-icon{height:25px;line-height:25px;font-size:26px}
.view-puzzle .tool-icon svg{width:25px;height:25px}
.view-puzzle .toast{bottom:77px}
.view-puzzle.puzzles-done .puzzle-card{grid-template-rows:52px minmax(0,1fr) auto;gap:12px}
.view-puzzle.puzzles-done .board-stage{display:none}
.view-puzzle.puzzles-done .puzzle-completion{grid-row:2;align-self:center;max-height:100%;overflow:auto;padding:14px 8px}
.view-puzzle.puzzles-done .play-button{grid-row:3}
@media(max-height:620px){.view-puzzle .puzzle-card{grid-template-rows:38px 57px minmax(0,1fr) 30px auto 45px;gap:4px;padding-top:3px}.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){height:57px}.view-puzzle .puzzle-heading h2{font-size:20px}.view-puzzle .puzzle-pip{height:52px;width:52px}.view-puzzle .board-message{height:30px;font-size:10px;line-height:14px}.view-puzzle .puzzle-tools{height:45px}.view-puzzle .play-button{min-height:38px}.view-puzzle .puzzle-tools button{font-size:11px}}
@media(max-width:350px){.view-puzzle .game-layout{padding-left:7px;padding-right:7px}.view-puzzle .goal>div strong,.view-puzzle #colorGoal>span{font-size:16px}.view-puzzle .goal>div{gap:1px}.view-puzzle .goal svg:not(.icon),.view-puzzle .goal .icon{width:19px;height:19px}.view-puzzle .puzzle-heading h2{font-size:21px}.view-puzzle #board{gap:2px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:600px){
 .view-puzzle .game-layout,.view-puzzle .topbar{max-width:900px}
 .view-puzzle .puzzle-view{max-width:none}
 .view-puzzle .puzzle-card{grid-template-columns:minmax(200px,.8fr) minmax(0,1.2fr);grid-template-rows:42px 60px minmax(0,1fr) auto 45px;column-gap:16px}
 .view-puzzle .puzzle-heading{grid-column:1;grid-row:1}
 .view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){grid-column:1;grid-row:2;height:60px}
 .view-puzzle .board-stage{grid-column:2;grid-row:1/-1}
 .view-puzzle .board-message{grid-column:1;grid-row:3}
 .view-puzzle .play-button{grid-column:1;grid-row:4}
 .view-puzzle .puzzle-tools{grid-column:1;grid-row:5;height:45px}
 .view-puzzle.puzzles-done .puzzle-card{display:flex;flex-direction:column}
}

/* 1.10 — harbour crates, four power types and a target / Pip / moves HUD. */
.view-puzzle .puzzle-card{grid-template-rows:26px 106px minmax(0,1fr) 34px auto 52px}
.view-puzzle .puzzle-heading{padding-right:0;align-items:center;min-height:0}
.view-puzzle .puzzle-heading>div{display:flex;align-items:center;gap:10px;min-width:0;width:100%}
.view-puzzle .puzzle-heading .eyebrow{flex-shrink:0;font-size:9px}
.view-puzzle .puzzle-heading h2{font-size:15px;margin:0;opacity:.85;letter-spacing:0}
.view-puzzle .puzzle-pip{display:none}
.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){height:106px;grid-template-columns:minmax(0,1.35fr) 100px minmax(0,1fr);gap:7px;align-items:stretch}
.goal-targets{display:flex;align-items:stretch;justify-content:space-evenly;border:3px solid #f6d485;border-radius:15px;background:linear-gradient(#fff7d7,#ffe5a6);box-shadow:0 4px 0 #b68035;min-width:0;overflow:hidden}
.view-puzzle .goal-targets .goal{flex:1;height:100%;border:0;border-radius:0;box-shadow:none;background:transparent;padding:7px 2px;gap:6px}
.view-puzzle .goal-targets .goal+.goal{border-left:1px solid #dfc17a}
.view-puzzle .goal-targets .goal.done{background:#d8efaf}
.view-puzzle .goal-targets .goal>div{flex-direction:column;gap:3px}
.view-puzzle .goal-targets .goal .icon{height:28px;width:28px}
.view-puzzle .goal-targets .goal>div strong,.view-puzzle .goal-targets #colorGoal>span{font-size:20px;color:#3c5276;text-shadow:0 1px 0 white}
.view-puzzle .goal-targets[data-count="1"] .goal .icon{height:42px;width:42px}
.view-puzzle .goal-targets[data-count="1"] .goal>div{flex-direction:row;gap:5px}
.view-puzzle .goal-targets[data-count="1"] .goal>div strong{font-size:30px}
.view-puzzle .goal-targets .goal-label{font-size:8px;letter-spacing:.3px}
.goal-guide{position:relative;border:3px solid #ffe293;border-radius:50% 50% 15px 15px;background:radial-gradient(#85e1d2,#398eac);box-shadow:0 4px 0 #b68035;overflow:visible}
.goal-guide img{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:110px;height:110px;object-fit:contain;max-width:none;filter:drop-shadow(0 3px 0 #235f7a33)}
.view-puzzle .moves-goal{border:3px solid #f6d485;border-radius:15px;background:linear-gradient(#fff7d7,#ffe5a6);box-shadow:0 4px 0 #b68035;gap:5px;padding:9px 0}
.view-puzzle .moves-goal .goal-label{color:#946d35;font-size:9px;letter-spacing:.8px}
.view-puzzle .moves-goal>strong{font-size:43px;color:#215876;text-shadow:0 2px 0 white}
.view-puzzle .board-shell{aspect-ratio:var(--board-ratio,1)}
@supports(width:1cqw){.view-puzzle .board-shell{width:min(100cqw,calc((100cqh - 18px)*var(--board-ratio,1) + 18px));height:min(100cqh,calc((100cqw - 18px)/var(--board-ratio,1) + 18px))}}
.view-puzzle #board{aspect-ratio:var(--board-ratio,1);grid-template-columns:repeat(var(--board-cols,7),minmax(0,1fr));grid-template-rows:repeat(var(--board-rows,7),minmax(0,1fr));gap:2px}
.cell.crate,.cell.crate:nth-of-type(even){background:#bf8d52;box-shadow:none;border-radius:7px}
.cell.crate .box-piece{inset:-1px;z-index:3}
.cell.crate .box-piece>svg{height:103%;width:103%;filter:drop-shadow(0 2px 1px #66402a65)}
.piece.power-propeller{background:radial-gradient(#fdf6c1a0,transparent 70%)}
.fx-propeller{position:absolute;width:34px;height:34px;z-index:9;animation:propellerFlight 470ms cubic-bezier(.35,0,.6,.8) var(--delay) both;filter:drop-shadow(0 0 9px #fff4a6)}
.fx-propeller>svg{width:100%;height:100%;animation:propellerSpin 120ms linear infinite}
@keyframes propellerSpin{to{transform:rotate(360deg)}}
@keyframes propellerFlight{0%{opacity:0;transform:translate(-50%,-50%) scale(.7)}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(1.2)}}
.modal-text{white-space:pre-line}
@media(max-width:350px){.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){grid-template-columns:minmax(0,1.25fr) 85px minmax(0,.85fr);gap:5px}.goal-guide img{width:100px;height:100px}.view-puzzle .goal-targets .goal>div strong,.view-puzzle .goal-targets #colorGoal>span{font-size:16px}.view-puzzle .goal-targets .goal .icon{width:22px;height:22px}.view-puzzle .goal-targets[data-count="1"] .goal>div strong{font-size:27px}}
@media(max-height:620px){.view-puzzle .puzzle-card{grid-template-rows:22px 88px minmax(0,1fr) 30px auto 45px}.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){height:88px}.goal-guide img{width:95px;height:95px}.view-puzzle .moves-goal>strong{font-size:36px}.view-puzzle .goal-targets .goal{padding:4px 1px;gap:4px}.view-puzzle .goal-targets[data-count="1"] .goal .icon{width:35px;height:35px}.view-puzzle .puzzle-heading h2{font-size:13px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:600px){.view-puzzle .puzzle-card{grid-template-rows:26px 98px minmax(0,1fr) auto 45px}.view-puzzle .goal-bar,.view-puzzle .goal-bar:has(.obstacle-goal:not([hidden])){height:98px;grid-template-columns:minmax(0,1.2fr) 80px minmax(0,.85fr)}.goal-guide img{width:90px;height:98px}.view-puzzle .puzzle-heading h2{font-size:14px}}
.fx-wood{position:absolute;width:9px;height:13px;background:linear-gradient(90deg,#f4bd66,#bc742c);border:1px solid #ffe4a0;clip-path:polygon(0 10%,80% 0,100% 90%,20% 100%);animation:woodBurst 240ms ease-out both;box-shadow:0 1px 3px #76502666}
@keyframes woodBurst{from{opacity:1;transform:translate(-50%,-50%) rotate(0)}to{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) rotate(var(--turn)) scale(.6)}}

/* App 1.11: anticipation, readable impact waves and a visible afterglow. */
.board-fx{overflow:hidden;border-radius:12px}
.fx-rocket-traveller{width:42px;height:42px;animation:rocketTravel 580ms cubic-bezier(.4,0,.8,.55) var(--delay,0ms) both}
.fx-rocket-traveller::before{content:"";position:absolute;inset:4px;border-radius:50%;background:#ffe7a4;filter:blur(8px);opacity:.8}
.fx-rocket-traveller .icon{position:relative}
.fx-beam{height:12px!important;animation:beamWake 650ms ease-out var(--delay,0ms) both;box-shadow:0 0 13px 4px #ffc54499}
.fx-beam.vertical{height:100%!important;width:12px}
@keyframes beamWake{0%{opacity:0;scale:.05}20%{opacity:.9;scale:.6}48%{opacity:.8;scale:1}100%{opacity:0;scale:1}}
.fx-blast-core{position:absolute;width:22%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#fffdf0 4%,#fff0a0 27%,#ffbc36 50%,#f6843133 72%,transparent 75%);box-shadow:0 0 22px #ffd565;animation:blastCore 850ms ease-out var(--delay,0ms) both}
@keyframes blastCore{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.3)}50%{opacity:.8}100%{opacity:0;transform:translate(-50%,-50%) scale(2.6)}}
.fx-ring{width:20%;border-width:5px;box-shadow:0 0 16px #ffc85c;animation:bombImpact 900ms cubic-bezier(.12,.6,.3,1) var(--delay,0ms) both}
.fx-ring.wide{width:30%}.fx-ring.second{animation-delay:calc(var(--delay,0ms) + 110ms);border-width:3px}
@keyframes bombImpact{0%{opacity:0;transform:translate(-50%,-50%) scale(.15)}12%{opacity:.95}70%{opacity:.5}100%{opacity:0;transform:translate(-50%,-50%) scale(2.8)}}
.fx-smoke{position:absolute;width:18%;aspect-ratio:1;background:radial-gradient(circle,var(--smoke) 20%,#f0b76866 55%,transparent 73%);border-radius:50%;animation:blastSmoke 950ms ease-out var(--delay,0ms) both}
@keyframes blastSmoke{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}20%{opacity:.8}100%{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(1.5)}}
.fx-petal{animation-duration:720ms}.fx-spark{animation-duration:420ms;animation-delay:var(--delay,0ms)}
.fx-wood{animation-duration:430ms;animation-delay:var(--delay,0ms)}
.prism-rays{animation:prismGather 760ms ease-in-out var(--delay,0ms) both}
.prism-rays line{stroke-width:1;stroke-dasharray:150;animation:prismTrace 560ms ease-out var(--delay,0ms) both}
@keyframes prismTrace{from{stroke-dashoffset:150}to{stroke-dashoffset:0}}
@keyframes prismGather{0%{opacity:0}22%{opacity:.9}65%{opacity:1}100%{opacity:0}}
.fx-prism-halo{width:25%;animation:prismBloom 780ms ease-out var(--delay,0ms) both}
.fx-propeller{width:42px;height:42px;animation:propellerVoyage var(--flight-duration,620ms) cubic-bezier(.35,0,.6,.8) var(--delay,0ms) both}
@keyframes propellerVoyage{0%{opacity:0;transform:translate(-50%,-50%) scale(.8)}15%{opacity:1;transform:translate(-50%,-65%) scale(1.08)}98%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(1)}}
@media(prefers-reduced-motion:reduce){.board-fx{display:none!important}}
@keyframes woodBurst{0%{opacity:0;transform:translate(-50%,-50%) rotate(0)}12%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) rotate(var(--turn)) scale(.6)}}
@keyframes sparkFloat{0%{opacity:0;transform:translate(-50%,-50%) rotate(0)}12%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(150deg)}}
/* Chapter travel and persistent unlock ceremonies. */
.chapter-select{display:grid;grid-template-columns:1fr 1fr;gap:12px;grid-column:1/-1;margin-bottom:16px}
.chapter-select button{display:flex;align-items:center;gap:12px;padding:8px;border:2px solid #8bd4d8;border-radius:16px;background:#126a8d;color:#fff0bb;text-align:left;min-height:76px;box-shadow:0 4px 0 #0d506f}
.chapter-select button.current{border-color:#ffde84;background:linear-gradient(120deg,#208ba0,#136383)}
.chapter-select img{width:78px;height:58px;object-fit:cover;border-radius:10px}
.chapter-select span{font-size:14px;font-weight:900}.chapter-select small{display:block;font-size:10px;font-weight:600;line-height:1.5;margin-top:5px;color:#cef1ec}
.chapter-select .locked img{filter:saturate(.35) brightness(.65)}.chapter-select .locked small:before{content:'🔒 '}
.chapter-unlock{margin:0 15px 15px;width:calc(100% - 30px);font-size:15px;animation:chapterInvite 2.8s ease-in-out infinite}
@keyframes chapterInvite{50%{box-shadow:0 5px 0 #936f24,0 0 20px #ffe9a855}}
#worldBuildFX{position:absolute;inset:0;pointer-events:none;z-index:6;overflow:hidden}
.build-burst{position:absolute;width:0;height:0}.build-halo{position:absolute;left:0;top:0;width:180px;height:180px;border:3px solid #fff0ad;border-radius:50%;background:radial-gradient(#fff6cbaa,transparent 65%);animation:buildHalo 1250ms ease-out both}
@keyframes buildHalo{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}35%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) scale(1.7)}}
.build-tools{position:absolute;color:#fff3a5;font-size:70px;line-height:1;filter:drop-shadow(0 0 8px #ffbc47);animation:buildStar 1250ms ease-out both}
@keyframes buildStar{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(-60deg)}35%{opacity:1;transform:translate(-50%,-50%) scale(1.3) rotate(10deg)}100%{opacity:0;transform:translate(-50%,-70%) scale(.5) rotate(90deg)}}
.build-burst i{position:absolute;width:7px;height:13px;background:#ffe892;border-radius:3px;animation:buildDust 1200ms ease-out both;rotate:var(--a)}
@keyframes buildDust{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(calc(-1 * var(--d)))}}
.build-label{position:absolute;bottom:14%;left:50%;transform:translateX(-50%);max-width:90%;padding:10px 18px;border:2px solid #ffe9a0;border-radius:30px;background:#176a8ee8;color:#fff4c5;white-space:nowrap;font-size:14px;animation:buildLabel 1400ms both}
@keyframes buildLabel{0%{opacity:0;translate:0 10px}20%,80%{opacity:1;translate:0 0}100%{opacity:0}}
.world-pin.affordable:not(.done){box-shadow:0 0 0 4px #ffedaa55,0 0 20px #ffe28799}
.unlock-reveal{position:relative;margin:0 0 18px;overflow:hidden;border-radius:18px;background:radial-gradient(ellipse,#ffe6a5,#238d9e 75%);border:2px solid #efd288;padding-bottom:12px}
.unlock-reveal[hidden]{display:none}.unlock-reveal>img{width:100%;height:165px;object-fit:cover;display:block;animation:areaUnveil 1400ms cubic-bezier(.2,.7,.3,1) both}
@keyframes areaUnveil{from{filter:brightness(.25) saturate(.3);scale:1.15}to{filter:brightness(1) saturate(1);scale:1}}
.unlock-aura{position:relative;height:74px;display:grid;place-items:center}.unlock-reveal>img+.unlock-aura{margin-top:-35px}
.unlock-lock{height:66px;width:66px;border-radius:50%;display:grid;place-items:center;background:#fff0ac;border:3px solid #ffe6a3;box-shadow:0 0 30px #fff5af;animation:unlockPop 1100ms cubic-bezier(.15,.7,.25,1) both}
.unlock-lock .icon{height:43px;width:43px;animation:unlockTurn 900ms ease-out both}
@keyframes unlockPop{0%{scale:.4;opacity:0}40%{scale:1.2;opacity:1}70%{scale:.95}100%{scale:1}}
@keyframes unlockTurn{0%,25%{transform:rotate(-15deg)}50%{transform:rotate(15deg) scale(1.12)}100%{transform:rotate(0)}}
.unlock-stars{position:absolute;color:#fff3bc;font-size:25px;letter-spacing:24px;white-space:nowrap;animation:unlockStars 1100ms both;pointer-events:none}
@keyframes unlockStars{from{opacity:0;scale:.3;translate:0 10px}50%{opacity:1;scale:1.15}to{opacity:0;scale:1.5;translate:0 -40px}}
.unlock-reveal>strong{display:block;position:relative;color:#fff2bd;font-size:17px;text-align:center;padding:0 8px;text-shadow:0 2px #15546d}.unlock-modal #modalIcon{display:none}
.carried-power{position:absolute;width:60%;height:60%;left:45%;top:55%;filter:drop-shadow(0 1px 3px #123)}
@media(max-width:760px){.chapter-select{gap:8px;margin:0 0 20px}.chapter-select button{min-height:70px;gap:7px;padding:6px}.chapter-select img{width:48px;height:54px}.chapter-select span{font-size:11px}.chapter-select small{font-size:9px}.build-label{font-size:11px;padding:7px 10px}.unlock-reveal>img{height:145px}}
@media(prefers-reduced-motion:reduce){.build-burst,.build-label{display:none}.unlock-reveal>img{filter:none;scale:1}.unlock-lock{scale:1;opacity:1}.unlock-stars{display:none}}
.unlock-padlock{width:45px;height:45px;overflow:visible}.unlock-shackle{transform-origin:34px 22px;animation:shackleOpen 1000ms cubic-bezier(.2,.75,.3,1) both}
@keyframes shackleOpen{0%,35%{transform:translateY(0) rotate(0)}70%,100%{transform:translateY(-4px) rotate(-35deg)}}
@media(prefers-reduced-motion:reduce){.unlock-shackle{transform:translateY(-4px) rotate(-35deg)}}

/* A single repair-based chapter gate, independent of continuous puzzle numbering. */
.world-guide{margin:0 18px 14px;color:#685b3c;font-size:14px;line-height:1.5;text-align:center;font-weight:650}
.style-options[hidden]{display:none}

.refill-portal{position:absolute;overflow:hidden;pointer-events:none;z-index:4}.refill-portal .piece>svg{width:100%;height:100%}

.fx-sunburst{width:var(--blast,55%)}.fx-pressure{width:calc(var(--blast,46%)*.5)}
