/* The logo opens game options; the bottom strip selects equipment directly. */
.brand,.bag-toggle,.quest-button{display:none!important}
.game-menu-button{left:calc(8px + env(safe-area-inset-left))!important;right:auto!important;top:calc(7px + env(safe-area-inset-top));height:36px;padding:3px;border-radius:10px;gap:0}
.game-menu-button img{width:30px;height:30px}.game-menu-word{display:none}
.mission-button,.game-hud-stack .survival-hud{display:none!important}
.play-status{position:fixed;z-index:12;left:auto;right:calc(8px + env(safe-area-inset-right));top:calc(7px + env(safe-area-inset-top));width:max-content;max-width:calc(100vw - 60px - env(safe-area-inset-left) - env(safe-area-inset-right));height:36px;display:flex;align-items:center;gap:9px;padding:4px 10px;border:1px solid #ffffffb0;border-radius:12px;background:#f8fff0e8;color:#254536;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;overflow-x:auto;scrollbar-width:none;box-shadow:0 2px 12px #173a3255;touch-action:manipulation}
.play-status::-webkit-scrollbar{display:none}.play-status span{flex:none}.play-status-quest{color:#634790;border-left:1px solid #a7b9a2;padding-left:8px}
.play-status-world{order:1}.play-status-target{order:2;color:#803b1e}.play-status-treasure{order:3;color:#765927}.play-status-health{order:4}.play-status-fruit{order:5}.play-status-magic{order:6}.play-status-quest{order:7}
body:has(#modal:not(.hidden)) .play-status{display:none}
.inventory-nav,.bar{display:flex!important;z-index:8;left:50%;right:auto;transform:translateX(-50%)}
.inventory-nav{bottom:calc(80px + env(safe-area-inset-bottom))}
.bar{bottom:calc(10px + env(safe-area-inset-bottom))}
.inventory-nav button[data-category="fruit"],.inventory-nav button[data-category="items"]{display:none}
.mobile-inventory-toggle{display:none!important}
@media(pointer:coarse) and (max-width:1366px){
 .mobile-play .game-menu-button{left:calc(5px + env(safe-area-inset-left))!important;right:auto!important;top:calc(5px + env(safe-area-inset-top));height:31px;width:31px;padding:2px}
 .mobile-play .game-menu-button img{width:27px;height:27px}
 .mobile-play .play-status{left:auto;right:calc(5px + env(safe-area-inset-right));top:calc(5px + env(safe-area-inset-top));max-width:calc(100vw - 46px - env(safe-area-inset-left) - env(safe-area-inset-right));height:31px;gap:6px;padding:3px 7px;font-size:10px;border-radius:9px}
 .mobile-play .inventory-nav,.mobile-play .bar{display:flex!important;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 230px);background:#173b32d8}
 .mobile-play .inventory-nav{bottom:calc(52px + env(safe-area-inset-bottom));min-height:27px}
 .mobile-play .bar{bottom:calc(3px + env(safe-area-inset-bottom));height:45px;padding:3px;gap:3px}
 .mobile-play .bar .slot{height:37px;flex-basis:40px;font-size:8px}
 .mobile-play .map-dock:not(.collapsed){left:auto!important;right:calc(6px + env(safe-area-inset-right))!important;top:calc(43px + env(safe-area-inset-top))!important;width:min(188px,43vw)!important;max-height:min(57dvh,calc(100dvh - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important;padding:4px!important;background:#173e46a8!important;backdrop-filter:blur(2px);box-shadow:0 3px 12px #102c3855}
 .mobile-play .map-dock:not(.collapsed) .map-goal{background:#123842b8;font-size:9px;line-height:1.15}
 .mobile-play .map-dock:not(.collapsed) .map-legend,.mobile-play .map-dock:not(.collapsed) .map-resize{display:none}
}
@media(pointer:coarse) and (max-width:1366px) and (orientation:portrait){.mobile-play .map-dock:not(.collapsed){width:min(182px,47vw)!important;max-height:46dvh!important}.mobile-play .inventory-nav,.mobile-play .bar{max-width:calc(100vw - 150px)}}
@media(pointer:coarse) and (max-width:600px){
 .mobile-play .inventory-nav,.mobile-play .bar{max-width:calc(100vw - 230px)}
 .mobile-play .inventory-nav strong,.mobile-play .inventory-current{display:none}
 .mobile-play .inventory-nav button{padding:5px 6px;font-size:9px}
 .mobile-play .play-status{gap:4px;font-size:9px}
 .mobile-play .play-status-magic{display:none}
}
@media(pointer:coarse) and (max-width:600px) and (orientation:portrait){.mobile-play .inventory-nav,.mobile-play .bar{max-width:calc(100vw - 150px)}}
/* Touch play: one movement stick and a thumb-sized circle for each action. */
@media(pointer:coarse) and (max-width:1366px){
 .mobile-play .pad{left:calc(14px + env(safe-area-inset-left));bottom:calc(92px + env(safe-area-inset-bottom));width:116px;height:116px;border:3px solid #e5f7e5ae;border-radius:50%;background:radial-gradient(circle,#ffffff1c 0 27%,#142f397a 28% 30%,#234b5994 31% 73%,#e4f9e247 74%);box-shadow:0 5px 17px #0b2b37a6,inset 0 0 18px #eaffff44;z-index:9;touch-action:none}
 .mobile-play .knob{left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border:2px solid #ffffffcf;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fcffefd9,#82babbc4 65%,#27627bbd);box-shadow:0 3px 12px #143943a0}
 .mobile-play .actions{display:contents!important}
 .mobile-play .actions button,.mobile-play .mobile-attack,.mobile-play .mobile-use,.mobile-play .meadow-fire-button{position:fixed;z-index:10;display:flex;align-items:center;justify-content:center;flex-direction:column;width:49px;min-width:0;height:49px;min-height:0;padding:2px;border:2px solid #f1ffe6b8;border-radius:50%;background:radial-gradient(circle at 32% 22%,#ffffffeb,#d9f4ded9 66%,#83baa5d9);color:#234936;font-size:9px;font-weight:800;line-height:1.05;text-align:center;white-space:normal;box-shadow:0 4px 12px #112e3d9c,inset 0 1px 4px #ffffffa6;touch-action:none;user-select:none}
 .mobile-play .actions button:active,.mobile-play .mobile-attack:active,.mobile-play .mobile-use:active{transform:scale(.92);filter:brightness(1.12)}
 .mobile-play .mobile-attack{right:calc(18px + env(safe-area-inset-right));bottom:calc(101px + env(safe-area-inset-bottom));width:65px;height:65px;background:radial-gradient(circle at 30% 20%,#fff4d1,#f1ae70 65%,#a95637);color:#492920;font-size:29px}
 .mobile-play .mobile-attack:after{content:'Attack';font-size:9px}
 .mobile-play.auto-attack-on .mobile-attack{display:none!important}
 .mobile-play .mobile-use{right:calc(91px + env(safe-area-inset-right));bottom:calc(166px + env(safe-area-inset-bottom));font-size:10px}
 .mobile-play #up{right:calc(150px + env(safe-area-inset-right));bottom:calc(156px + env(safe-area-inset-bottom))}
 .mobile-play #down{right:calc(154px + env(safe-area-inset-right));bottom:calc(101px + env(safe-area-inset-bottom))}
 .mobile-play #break{right:calc(95px + env(safe-area-inset-right));bottom:calc(87px + env(safe-area-inset-bottom))}
 .mobile-play #place{right:calc(22px + env(safe-area-inset-right));bottom:calc(51px + env(safe-area-inset-bottom));background:radial-gradient(circle at 30% 20%,#e7ffda,#79ba80 70%,#2a7552);color:#fff}
 .mobile-play #up:before{content:'↥';font-size:19px;line-height:19px}.mobile-play #down:before{content:'🍎';font-size:16px;line-height:18px}
 .mobile-play #break:before{content:'⛏';font-size:18px;line-height:18px}.mobile-play #place:before{content:'▣';font-size:18px;line-height:18px}
 .mobile-play .meadow-fire-button{right:calc(210px + env(safe-area-inset-right));bottom:calc(171px + env(safe-area-inset-bottom));background:radial-gradient(circle at 30% 20%,#ffe9bd,#f66c2c 66%,#a32e21);color:#fff;font-size:9px}
 .mobile-play .meadow-fire-button.hidden{display:none!important}
}
@media(pointer:coarse) and (max-width:1366px) and (orientation:portrait){
 .mobile-play .pad{bottom:calc(112px + env(safe-area-inset-bottom));width:112px;height:112px}
 .mobile-play .mobile-attack{right:calc(16px + env(safe-area-inset-right));bottom:calc(148px + env(safe-area-inset-bottom))}
 .mobile-play .mobile-use{right:calc(89px + env(safe-area-inset-right));bottom:calc(211px + env(safe-area-inset-bottom))}
 .mobile-play #up{right:calc(147px + env(safe-area-inset-right));bottom:calc(235px + env(safe-area-inset-bottom))}
 .mobile-play #down{right:calc(153px + env(safe-area-inset-right));bottom:calc(173px + env(safe-area-inset-bottom))}
 .mobile-play #break{right:calc(94px + env(safe-area-inset-right));bottom:calc(111px + env(safe-area-inset-bottom))}
 .mobile-play #place{right:calc(20px + env(safe-area-inset-right));bottom:calc(64px + env(safe-area-inset-bottom))}
 .mobile-play .meadow-fire-button{right:calc(25px + env(safe-area-inset-right));bottom:calc(284px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse) and (min-width:701px) and (max-width:1366px){
 .mobile-play .pad{width:132px;height:132px}
 .mobile-play .knob{left:calc(50% - 25px);top:calc(50% - 25px);width:50px;height:50px}
 .mobile-play .actions button,.mobile-play .mobile-use{width:55px;height:55px}
 .mobile-play .mobile-attack{width:73px;height:73px}
}

/* Corner layout: keep the map visible and leave the centre clear for looking. */
@media(pointer:coarse) and (max-width:1366px){
 .mobile-play{--corner-map:136px;--edge-left:max(10px,env(safe-area-inset-left));--edge-right:max(10px,env(safe-area-inset-right));--edge-bottom:calc(14px + env(safe-area-inset-bottom))}
 .mobile-play .map-dock:not(.collapsed){left:var(--edge-left)!important;right:auto!important;top:calc(8px + env(safe-area-inset-top))!important;width:var(--corner-map)!important;max-height:none!important;overflow:hidden;padding:3px!important;background:#173e466b!important;border-radius:12px;backdrop-filter:none}
 .mobile-play .map-heading{padding:0 2px 3px;font-size:8px;letter-spacing:0;cursor:default}
 .mobile-play .map-heading button{width:24px;height:24px;flex:none}
 .mobile-play .map-dock canvas{aspect-ratio:1;object-fit:cover;border-radius:7px}
 .mobile-play .map-goal{padding:3px!important;margin:3px 0 0;border:0;background:#12384291!important}
 .mobile-play .map-chapter{font-size:9px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-play .map-counts,.mobile-play .map-boss,.mobile-play .map-next,.mobile-play .map-missions,.mobile-play .map-legend,.mobile-play .map-resize{display:none}
 .mobile-play .map-restore{display:block!important;left:var(--edge-left);right:auto;top:calc(8px + env(safe-area-inset-top))}
 .mobile-play .map-restore.hidden{display:none!important}
 .mobile-play .game-menu-button{left:calc(var(--edge-left) + var(--corner-map) + 8px)!important;top:calc(8px + env(safe-area-inset-top))}
 .mobile-play .play-status{left:calc(var(--edge-left) + var(--corner-map) + 8px);right:var(--edge-right);top:calc(46px + env(safe-area-inset-top));width:auto;max-width:none;height:auto;min-height:30px;max-height:62px;flex-wrap:wrap;overflow:auto;gap:3px 7px;background:#173b3285;color:#f3ffe8;border:1px solid #ffffff40;font-size:9px;box-shadow:none}
 .mobile-play .play-status-target,.mobile-play .play-status-treasure,.mobile-play .play-status-quest{color:#fff0c7}
 .mobile-play .play-status-world,.mobile-play .play-status-quest{display:none}
 .mobile-play .pad{left:var(--edge-left);bottom:var(--edge-bottom);width:112px;height:112px;background:radial-gradient(circle,#93ddff1c 0 28%,#77cfff55 29% 31%,#164b6866 32% 72%,#b2edff4a 74%);border:2px solid #c9f7ff85;box-shadow:inset 0 0 18px #a4ecff26}
 .mobile-play .knob{left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;background:radial-gradient(circle at 35% 30%,#e2fbffaf,#65bcd688);border-color:#e5ffffaa}
 .mobile-play .actions button,.mobile-play .mobile-use,.mobile-play .meadow-fire-button{width:48px;height:48px;border-color:#d9f6ff91;background:radial-gradient(circle at 32% 22%,#c4f1ff99,#204b708f 70%);color:#fff;text-shadow:0 1px 3px #102a35;box-shadow:inset 0 0 8px #8dd5ff44,0 2px 8px #102a3555}
 .mobile-play .mobile-attack,.mobile-play.auto-attack-on .mobile-attack{display:flex!important;right:var(--edge-right);bottom:var(--edge-bottom);width:72px;height:72px;border-color:#f8dfa5b8;background:radial-gradient(circle at 30% 20%,#d7f7ffb3,#397e9aa8 65%,#173b69b3);color:white;box-shadow:inset 0 0 12px #b9ecff66}
 .mobile-play #place{right:calc(var(--edge-right) + 83px);bottom:var(--edge-bottom)}
 .mobile-play #break{right:calc(var(--edge-right) + 135px);bottom:calc(var(--edge-bottom) + 24px)}
 .mobile-play #down{right:calc(var(--edge-right) + 127px);bottom:calc(var(--edge-bottom) + 78px)}
 .mobile-play #up{right:calc(var(--edge-right) + 82px);bottom:calc(var(--edge-bottom) + 112px)}
 .mobile-play .mobile-use{right:calc(var(--edge-right) + 25px);bottom:calc(var(--edge-bottom) + 89px)}
 .mobile-play .meadow-fire-button{right:var(--edge-right);bottom:calc(var(--edge-bottom) + 151px)}
 .mobile-play .inventory-nav,.mobile-play .bar{display:none!important}
 .mobile-play .mobile-inventory-toggle{display:block!important;left:50%;bottom:calc(5px + env(safe-area-inset-bottom));transform:translateX(-50%);min-height:32px;padding:5px 9px;max-width:130px;font-size:10px;background:#173b3299;color:#fff;border-radius:20px}
 .mobile-play.mobile-inventory-open .inventory-nav{display:flex!important;bottom:calc(77px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);z-index:19}
 .mobile-play.mobile-inventory-open .bar{display:flex!important;bottom:calc(34px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);height:40px;z-index:19}
 .mobile-play.mobile-inventory-open .mobile-inventory-toggle{bottom:calc(111px + env(safe-area-inset-bottom));z-index:20}
 .mobile-play .forage-badge{bottom:calc(42px + env(safe-area-inset-bottom));max-width:27vw}
 .mobile-play .toast{bottom:calc(181px + env(safe-area-inset-bottom));max-width:50vw}
}
@media(pointer:coarse) and (min-width:701px) and (max-width:1366px) and (min-height:550px){
 .mobile-play{--corner-map:174px;--edge-bottom:calc(22px + env(safe-area-inset-bottom))}
 .mobile-play .pad{width:136px;height:136px}
 .mobile-play .play-status{font-size:11px;max-height:70px}
}
@media(pointer:coarse) and (max-height:420px){
 .mobile-play{--corner-map:112px}
 .mobile-play .pad{width:96px;height:96px}
 .mobile-play .map-heading strong{font-size:7px}
}
/* Computer layout: keep the mission map in view at the lower right. */
body:not(.mobile-play) .map-dock:not(.collapsed){left:auto!important;right:18px!important;top:auto!important;bottom:154px!important;width:232px!important;max-height:calc(100dvh - 200px);overflow:auto;background:#173e46b9}
body:not(.mobile-play) .map-heading button,body:not(.mobile-play) .map-resize{display:none!important}
body:not(.mobile-play) .inventory-eat{background:#ffe7a1;color:#523d1b}
.mobile-play .inventory-eat{display:none!important}
/* Reserve the center of the top row for the clock. */
.play-status{max-width:min(48vw,calc(100vw - 320px))}
@media(pointer:coarse) and (max-width:1366px){.mobile-play .play-status{top:calc(43px + env(safe-area-inset-top));max-width:calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right))}.mobile-play .map-dock:not(.collapsed){top:calc(72px + env(safe-area-inset-top))!important;max-height:calc(100dvh - 149px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}}
@media(max-width:700px){.play-status{top:calc(43px + env(safe-area-inset-top));max-width:calc(100vw - 16px)}}
