@font-face{font-family:Fredoka;src:url('assets/fredoka.woff2') format('woff2');font-display:swap}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:Fredoka,'Trebuchet MS',sans-serif;color:#51341e;background:#e6e9bc;--edge:max(12px,env(safe-area-inset-bottom));--wm-controls-width:280px}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;filter:grayscale(.6);opacity:.5}button:focus-visible{outline:4px solid #174a7e;outline-offset:3px}button:active:not(:disabled){transform:translateY(2px) scale(.97)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.world{position:fixed;inset:0;pointer-events:none}.world img{width:100%;height:100%;object-fit:cover}#game,#playground{position:absolute;inset:0}#opening{position:absolute;inset:0;z-index:20;background:#e6e9bc}#opening picture,#opening picture img{display:block;width:100%;height:100%;object-fit:cover;object-position:center top}.art-button{border:0;background:none;padding:0;width:78px;height:78px;filter:drop-shadow(0 5px 5px #4a2b2244)}.art-button img{width:100%;height:100%;object-fit:contain}.play{position:absolute;bottom:7%;left:50%;transform:translateX(-50%);width:120px;height:120px}.play:active:not(:disabled){transform:translateX(-50%) scale(.97)}
header{position:absolute;right:max(16px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:flex;gap:20px;align-items:center}.source-controls{position:absolute;visibility:hidden;pointer-events:none}.journeys{display:flex;gap:8px}.journeys span{width:38px;height:38px;display:grid;place-items:center;border:3px solid #ae7846;border-radius:50%;background:#fff3d7;font-size:21px}.journeys .current{background:#f2c141}.journeys .done{background:#d1dfac;border-color:#607947;color:#304624}#turnBadge{padding:8px 12px;border-radius:18px;background:#fff4dc;font-size:16px}
.help-button{position:fixed;z-index:240;top:max(12px,env(safe-area-inset-top));left:calc(max(10px,env(safe-area-inset-left)) + var(--wm-controls-width) + 14px);display:flex;gap:8px;align-items:center;background:#fff1ce!important;font-size:18px!important;padding:8px 12px!important;min-height:52px!important}.help-button svg{width:28px;height:28px}body[data-state=intro] .help-button{left:auto;right:18px}.guide{position:absolute;top:84px;left:50%;transform:translateX(-50%);width:min(520px,60%);height:68px;display:flex;align-items:center;gap:8px;z-index:3}.guide img{width:70px;height:84px;object-fit:contain;flex:none;filter:drop-shadow(0 5px 6px #40240f33)}.guide p{flex:1;margin:0;padding:12px 18px;border-radius:24px;background:#fff9e9f2;font-size:22px;line-height:1.2;text-align:center;text-wrap:balance}
#board{position:absolute;inset:0;isolation:isolate}.route{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route path{fill:none;stroke:#966835;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;opacity:.28;stroke-dasharray:4 19;vector-effect:non-scaling-stroke}.space{position:absolute;width:76px;height:66px;display:grid;place-items:center;transform:translate(-50%,-50%);border:3px solid #9b642f;border-bottom:6px solid #845021;border-radius:48%;background:radial-gradient(ellipse,#fae5bb 0 60%,#dfb374 62% 69%,#f5d69c 71%);box-shadow:0 6px 9px #4e341b35,inset 0 0 0 3px #fbe8c1;font-size:27px;color:#664021}.space:disabled{opacity:1;filter:none}.space:active:not(:disabled){transform:translate(-50%,-48%) scale(.96)}.space.available{background:#fff0c8;box-shadow:0 0 0 4px #fff8dd,0 8px 14px #68492166}.space.selected{background:#f4c654;box-shadow:0 0 0 4px #fff8dd,0 0 0 7px #9ba759}.space img{width:34px;height:34px;object-fit:contain}.space svg{width:27px;height:27px}.space.branch .bridge-art{width:88%;height:88%}#pawn{position:absolute;width:100px;height:124px;object-fit:contain;transform:translate(-50%,-88%);pointer-events:none;z-index:5;filter:drop-shadow(0 5px 3px #5c341e44);transition:left .42s,top .42s}#pawn.hop{animation:hop .4s}
.cargo{position:absolute;bottom:var(--edge);right:max(16px,env(safe-area-inset-right));max-width:23%;padding:8px 12px;background:#fff9e9f2;border-radius:20px;pointer-events:none;text-align:center}#levelName{margin:0;font-size:16px}#crates{display:none}#cargoText{margin:4px 0 0;display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;font-size:15px}#cargoText img{width:26px;height:26px;object-fit:contain}#cargoText strong{font-size:23px;white-space:nowrap}#cargoText span{white-space:nowrap}
footer{position:absolute;bottom:var(--edge);left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:16px}.die{position:relative;display:grid;place-items:center;width:76px;height:76px;padding:10px;border:3px solid #af793e;border-radius:20px;background:linear-gradient(145deg,#fff3cc,#e5b473);box-shadow:0 5px 9px #76512f40}.die:disabled{opacity:1;filter:none;background:#d4bd97;box-shadow:inset 0 3px 7px #79553244}.pips{display:grid;grid-template-columns:repeat(3,10px);grid-template-rows:repeat(3,10px);gap:3px}.pip{width:10px;height:10px;border-radius:50%;background:#613d20}.pip.one{grid-area:2/2}.pip.two-a,.pip.three-a{grid-area:1/1}.pip.two-b,.pip.three-c{grid-area:3/3}.pip.three-b{grid-area:2/2}.die-label{display:none}#moveHint{font-size:21px;padding:10px 14px;background:#fff8e6ed;border-radius:20px;white-space:nowrap;text-align:center}#stepTrail{position:absolute;left:50%;bottom:calc(100% + 5px);transform:translateX(-50%);background:#fff4d9;border-radius:12px;padding:2px 10px;font-size:18px;white-space:nowrap;pointer-events:none}#stepTrail:empty{display:none}.rune{position:fixed;z-index:10;left:max(10px,env(safe-area-inset-left));bottom:var(--edge);width:48px;height:48px;object-fit:contain;background:#fff4dc;border-radius:14px;padding:5px;pointer-events:none}
.task-panel{position:absolute;z-index:20;left:max(12px,calc(50% - 350px));right:max(12px,calc(50% - 350px));top:90px;bottom:auto;height:max-content;max-height:calc(100% - 90px - var(--edge));padding:22px;border-radius:28px;background:#fff8e8;box-shadow:0 18px 60px #49341c65;display:flex;flex-direction:column;align-items:center;gap:10px;overflow:auto;overscroll-behavior:contain}.task-panel>*{flex-shrink:0}.task-panel h2{font-size:28px;margin:0;text-align:center}.task-panel p{font-size:18px;margin:0;text-align:center}#taskVisual{display:flex;align-items:center;justify-content:center;gap:8px;min-height:32px}#taskVisual strong{font-size:23px}.goal-frame{display:grid;grid-template-columns:repeat(6,24px);gap:3px;padding:5px;background:#dbb885;border-radius:10px}.goal-frame span{width:24px;height:25px;border-radius:4px;background:#fff0d0}.goal-frame span.added{background:#c8da98}.goal-frame img{width:24px;height:25px;object-fit:contain}#frames{display:flex;justify-content:center;gap:14px;width:100%}.frame{display:grid;gap:4px;padding:8px;background:#c58d53;border-radius:15px;box-shadow:0 6px 10px #74452c25}.frame.harvest{grid-template-columns:repeat(4,1fr);width:min(100%,330px)}.frame.split{grid-template-columns:repeat(3,minmax(48px,1fr));width:48%;max-width:250px}.slot{width:100%;height:56px;min-width:48px;border:0;border-radius:10px;background:#f4dfb8;padding:2px;box-shadow:inset 0 3px 5px #94613525}.slot:disabled{opacity:1;filter:none}.slot img{width:100%;height:100%;object-fit:contain;animation:apple-in .25s}.recipient{grid-column:1/-1;display:flex;justify-content:center;align-items:center;gap:8px;font-size:20px}.recipient img{width:32px;height:32px;object-fit:contain}#appleSupply{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-height:30px}.harvest-supply{display:flex}#appleSupply img{width:26px;height:26px;object-fit:contain}.task-actions{display:flex;align-items:center;gap:20px}.task-actions .check{width:62px;height:62px}#feedback{min-height:24px}.wood{background:#f4d19a;border:2px solid #b7844f;border-radius:18px;padding:10px 18px;min-height:52px;font-size:20px;box-shadow:0 4px 8px #80563322}.wood.primary{background:#174a7e;color:#fff;border-color:#174a7e}.wood.small{font-size:18px}#undo{min-width:60px}
.overlay{position:fixed;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;margin:0;border:0;color:inherit;background:#4c321e70;display:none;padding:20px max(18px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}#overlay[open]{display:grid;place-items:center}.overlay-sheet{width:min(620px,100%);max-height:100%;overflow:auto;padding:28px;background:#fff8e6;border-radius:30px;text-align:center;box-shadow:0 20px 70px #39251450}.overlay h2{font-size:32px;margin:0 0 16px;line-height:1.1}.overlay p{font-size:20px;line-height:1.35}#overlayActions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:18px}.reward-art{width:100%;height:min(26vh,210px);object-fit:contain}.level-options{display:flex;flex-direction:column;gap:8px}.mode{display:flex;justify-content:center;gap:10px;margin-bottom:15px}.mode button[aria-pressed=true]{background:#efd083;border-color:#7e512d}.route-options button{flex:1;max-width:240px}.route-options svg{display:block;width:100%;height:55px;margin-bottom:8px}
#helpDialog{color:#51341e;border:0;border-radius:28px;padding:24px;width:min(700px,calc(100% - 24px));max-height:calc(100dvh - 24px);background:#fff8e6;overflow:auto}#helpDialog::backdrop{background:#3227189c}.help-heading{display:flex;align-items:center;gap:16px}.help-heading img{width:80px;height:80px;object-fit:contain}.help-heading h2{margin:0;font-size:28px}.help-heading p{margin:6px 0}.help-steps{padding-left:26px;font-size:18px;line-height:1.4}.help-steps li{padding-left:6px;margin:12px 0}.help-actions{display:flex;flex-wrap:wrap;gap:8px;position:sticky;bottom:-24px;background:#fff8e6;padding:12px 0 5px}.help-actions button{flex:1;min-width:110px;font-size:16px;padding:8px}#skipDemo{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:var(--edge);z-index:230}#demoPointer{position:fixed;z-index:220;width:42px;height:42px;border-radius:50%;border:5px solid white;background:#f2c14199;pointer-events:none;transform:translate(-50%,-50%);animation:point 1s infinite}
body[data-task=true] footer,body[data-task=true] .cargo,body[data-task=true] .guide{visibility:hidden}body[data-task=true] #board{opacity:.3}body[data-paused=true] *{animation-play-state:paused!important}@keyframes hop{50%{margin-top:-10px}}@keyframes apple-in{from{transform:translateY(-12px) scale(.8)}to{transform:none}}@keyframes point{50%{transform:translate(-50%,-50%) scale(.8)}}
@media(orientation:landscape) and (min-height:501px) and (max-height:700px){.guide{top:70px;height:54px}.guide img{width:60px;height:64px}.guide p{font-size:18px}.space{width:64px;height:52px;font-size:23px}#pawn{width:80px;height:96px}}
@media(orientation:portrait){body{--wm-controls-width:198px}body #wm-game-controls{gap:2px}body #wm-game-controls button{flex-basis:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}.help-button{width:48px;height:48px;min-height:48px!important;padding:9px!important;justify-content:center}.help-button span{display:none}header{right:10px;gap:4px;flex-direction:column;align-items:flex-end}.journeys{gap:3px}.journeys span{width:25px;height:25px;font-size:15px;border-width:2px}#turnBadge{font-size:14px;padding:3px 6px}.guide{top:78px;width:calc(100% - 24px);height:62px}.guide img{width:52px;height:64px}.guide p{font-size:17px;padding:10px 12px}.space{width:54px;height:50px;font-size:22px}.space img{width:28px;height:28px}#pawn{width:70px;height:86px}.cargo{bottom:calc(var(--edge) + 76px);right:50%;transform:translateX(50%);max-width:none;padding:4px 12px}#levelName{display:none}#cargoText{margin:0;font-size:14px}#cargoText strong{font-size:20px}footer{gap:10px}.die,.check{width:58px;height:58px}#moveHint{font-size:17px;padding:8px 10px}.task-panel{top:76px;max-height:calc(100% - 76px - var(--edge));padding:16px 8px;gap:10px}.task-panel h2{font-size:24px}.task-panel p{font-size:16px}#frames{gap:8px;flex-direction:column;align-items:center}.frame.split{width:100%;max-width:480px;grid-template-columns:repeat(6,minmax(48px,1fr));padding:5px;gap:3px}.slot{height:48px;min-width:48px}.recipient{font-size:18px}.recipient img{height:28px}.goal-frame{grid-template-columns:repeat(6,22px)}.goal-frame span,.goal-frame img{width:22px}.overlay-sheet{padding:22px 16px}.overlay h2{font-size:28px}.overlay p{font-size:18px}.play{width:100px;height:100px}#helpDialog{padding:18px}.help-heading img{width:60px;height:65px}.help-heading h2{font-size:24px}.help-steps{font-size:17px}.help-actions{bottom:-18px}}
@media(orientation:landscape) and (max-height:500px){body{--wm-controls-width:198px}body #wm-game-controls{gap:2px}body #wm-game-controls button{flex-basis:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}.help-button{width:48px;height:48px;min-height:48px!important;padding:9px!important;justify-content:center}.help-button span{display:none}header{gap:8px;top:12px}.journeys span{width:28px;height:28px;font-size:16px}#turnBadge{font-size:14px;padding:5px 8px}.guide{top:66px;left:12px;transform:none;width:calc(100% - 160px);height:38px;gap:5px}.guide img{width:34px;height:40px}.guide p{font-size:16px;padding:7px 10px}.space{width:48px;height:48px;font-size:20px;border-width:2px;border-bottom-width:4px}.space img{width:26px;height:26px}#pawn{width:50px;height:56px}footer{left:auto;right:max(12px,env(safe-area-inset-right));top:138px;bottom:auto;transform:none;width:118px;flex-wrap:wrap;gap:8px}.die,.check{width:52px;height:52px}#moveHint{order:3;width:100%;font-size:15px;padding:7px 4px;white-space:normal}#stepTrail{bottom:calc(100% + 5px);font-size:16px}.cargo{max-width:122px;width:122px;right:max(10px,env(safe-area-inset-right));padding:5px;bottom:var(--edge)}#levelName{display:none}#cargoText{font-size:13px}#cargoText strong{font-size:19px}#cargoText span{width:100%}.rune{width:32px;height:32px;left:auto;right:max(54px,env(safe-area-inset-right));top:74px;bottom:auto}.task-panel{top:70px;max-height:calc(100% - 70px - var(--edge));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));padding:10px;gap:6px;display:grid;grid-template-columns:minmax(0,1fr) 128px;align-content:start;align-items:center}.task-panel h2,.task-panel #taskHint,.task-panel #feedback{grid-column:1/-1}.task-panel h2{font-size:22px}.task-panel p{font-size:15px}#taskVisual{grid-column:1;grid-row:3}#frames{grid-column:1;grid-row:4;gap:8px}.frame.split{width:48%;max-width:260px;padding:5px;gap:3px}.slot{height:48px;min-width:48px}.recipient{font-size:17px}.recipient img{height:25px}#appleSupply{grid-column:2;grid-row:3;font-size:15px}.task-actions{grid-column:2;grid-row:4;flex-direction:column;gap:5px}.task-actions .check{width:50px;height:50px}.task-actions .wood{min-height:48px;padding:7px 12px;font-size:17px}#taskVisual strong{font-size:18px}.goal-frame{grid-template-columns:repeat(6,20px);gap:2px}.goal-frame span,.goal-frame img{width:20px;height:20px}.overlay-sheet{padding:16px}.overlay h2{font-size:25px;margin-bottom:10px}.overlay p{font-size:17px;margin:10px 0}.reward-art{height:90px}.wood{min-height:48px;font-size:17px;padding:8px 14px}.route-options svg{height:35px}.level-options{flex-direction:row}.level-options button{flex:1}#overlayActions{margin-top:10px}.play{width:64px;height:64px}.help-heading img{height:50px}.help-steps{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
