*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#b8dde8;color:#665541;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}button{font:inherit;color:inherit;cursor:pointer;min-height:44px;padding:9px 14px;border:1px solid #8acacb;background:#fff6e3;border-radius:12px}button:disabled{opacity:.4;cursor:default}button:active{background:#d4eeea}button:focus{outline-color:#29aab5}#world{position:absolute;left:0;top:0;width:100%;height:100%;touch-action:none}#world canvas{display:block;width:100%;height:100%}#hud{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}#hud button{pointer-events:auto}header{position:absolute;top:14px;top:calc(14px + env(safe-area-inset-top));left:22px;right:22px;display:flex;align-items:center;justify-content:space-between;text-shadow:0 1px 3px #fff}.brand{font-size:20px;letter-spacing:3px}.brand span{font-size:10px;letter-spacing:1px;color:#688b7b;margin-left:10px}#day{font-size:12px;margin-right:14px}#menu{font-size:19px;background:rgba(255,249,230,.95);border-color:#b1cebb;width:44px;padding:4px}#reticle{position:absolute;left:50%;top:50%;width:5px;height:5px;margin:-2px;border-radius:50%;background:#477a68;opacity:.8}#target{position:absolute;left:20%;right:20%;top:57%;text-align:center;font-size:13px;color:#345f4f;text-shadow:0 1px 4px #fff}#result{position:absolute;top:27%;left:15%;right:15%;text-align:center;font-size:26px;font-weight:600;letter-spacing:3px;text-shadow:0 2px 5px #fff}#held-label{position:absolute;bottom:84px;left:30%;right:30%;text-align:center;font-size:12px;color:#345f4f;text-shadow:0 1px 4px #fff}#wallet{position:absolute;left:24px;bottom:22px;bottom:calc(22px + env(safe-area-inset-bottom));color:#587958;font-size:19px;text-shadow:0 2px 3px #fff}#items{position:absolute;bottom:18px;bottom:calc(18px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex}#items button{background:rgba(255,249,230,.95);font-size:11px;white-space:nowrap;min-height:44px;padding:8px 12px;margin:0 3px;border-color:#b2cebc}#items b{color:#d09257;margin-left:5px}#desktop-controls{position:absolute;right:22px;bottom:24px;color:#507561;font-size:10px;text-shadow:0 1px 3px #fff}#movement,#touch-actions{display:none}.modal{position:fixed;top:0;bottom:0;left:0;right:0;z-index:10;background:rgba(49,80,64,.35);display:flex;align-items:center;justify-content:center;padding:18px;padding-top:calc(18px + env(safe-area-inset-top));padding-bottom:calc(18px + env(safe-area-inset-bottom))}.modal[hidden]{display:none}.dialog{position:relative;background:#fff6e4;border:1px solid #accbb5;border-radius:18px;width:680px;max-width:100%;max-height:100%;overflow:auto;padding:25px}#close{position:absolute;right:6px;top:6px;border:0;background:transparent;font-size:24px;width:44px;padding:0}.dialog h2{font-size:20px;letter-spacing:2px;margin:0 42px 22px 0}.dialog p{font-size:12px;line-height:1.8;color:#658273}.cards{display:flex;flex-wrap:wrap;margin:0 -5px}.card{width:33.333%;padding:5px}.card-inner{height:100%;padding:16px;border:1px solid #e4cf9f;background:#fff1d5;display:flex;flex-direction:column}.card h3{font-size:15px;margin:0 0 10px}.card p{flex:1;margin:0 0 14px;min-height:46px}.card button{font-size:12px;background:#caeae5;border-color:#75bfc4}.card small{font-size:10px;color:#6d8b75}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.toolbar span{font-size:12px;color:#658273}.dialog .wide{width:100%;margin-top:10px}.danger{color:#b96d62}.tool-row{display:flex;align-items:center;border-bottom:1px solid #d7e3d0;padding:10px 0}.tool-row div{flex:1}.tool-row strong{font-size:13px}.tool-row p{margin:3px 10px 0 0;font-size:11px}.tool-row button{font-size:11px}.fallback{padding:40px;line-height:2}.fallback a{color:#497f62}
@media(pointer:coarse),(max-width:850px){#desktop-controls{display:none}#movement,#touch-actions{display:block;position:absolute;bottom:20px;bottom:calc(20px + env(safe-area-inset-bottom));pointer-events:auto}#movement{left:20px;text-align:center}#movement>button{margin-bottom:4px}#movement button{width:44px;padding:6px;background:rgba(255,250,233,.94);font-size:18px;border-color:#aac6b1}#movement div{display:flex}#movement div button+button{margin-left:4px}#touch-actions{right:20px;display:flex;flex-direction:column}#touch-actions button{width:76px;min-height:48px;padding:6px;font-size:14px;background:rgba(235,248,234,.96)}#touch-actions button+button{margin-top:6px}#wallet{bottom:145px;bottom:calc(145px + env(safe-area-inset-bottom));left:22px;font-size:16px}#items{bottom:20px;left:50%}#items button{padding:5px 7px;font-size:10px;margin:0 2px}#held-label{bottom:78px;left:35%;right:35%;font-size:11px}header{left:15px;right:15px}.brand span{display:none}#target{top:57%;font-size:12px}}
@media(max-width:520px){.brand{font-size:16px}#day{font-size:11px;margin-right:6px}.dialog{padding:20px 14px}.card{width:100%}.card p{min-height:0}.card-inner{padding:12px}.card h3{margin-bottom:6px}#items{bottom:20px;bottom:calc(20px + env(safe-area-inset-bottom));width:105px;flex-wrap:wrap;justify-content:center}#items button{width:48px;margin-bottom:4px;padding:4px;font-size:10px}#held-label{bottom:122px;left:25%;right:25%}#target{left:10%;right:10%;top:59%}#result{font-size:20px}#movement{left:12px}#touch-actions{right:12px}#touch-actions button{width:62px}.toolbar{flex-wrap:wrap}.toolbar button{margin-top:5px}}
@media(max-height:440px){header{top:7px}.dialog{padding-top:18px}.dialog h2{margin-bottom:12px}#result{top:18%;font-size:20px}#target{top:58%}#wallet{bottom:130px}#movement,#touch-actions{bottom:12px}#items{bottom:12px}#held-label{bottom:65px}}

@media(max-width:520px){#items{bottom:124px;bottom:calc(124px + env(safe-area-inset-bottom))}#held-label{bottom:224px;bottom:calc(224px + env(safe-area-inset-bottom))}}

#menu,#movement button,#touch-actions button{border:2px solid #fff5dc;border-bottom:4px solid #8dbdb9;border-radius:18px}#touch-actions button{color:#378e96}.card-inner{border-radius:14px}.card button{border-radius:14px;border-bottom:3px solid #86beba}

#target{white-space:pre-line;line-height:1.6}

header>div:last-child{display:flex;align-items:center}#catalog{min-width:44px;min-height:44px;padding:6px 9px;margin-right:7px;background:rgba(255,249,230,.95);border:2px solid #fff5dc;border-bottom:4px solid #8dbdb9;border-radius:14px;font-size:12px;letter-spacing:0}@media(max-width:360px){header{left:10px;right:10px}.brand{font-size:14px;letter-spacing:0}#day{font-size:10px;margin-right:5px}#catalog{padding:5px;min-width:44px;margin-right:4px}}
/* Keep interaction information on physical signs and controls. */
#target,#result,#held-label,#desktop-controls{display:none}
#result.egg-notice{display:block;top:22%;left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 32px);padding:9px 14px;border-radius:8px;background:rgba(0,0,0,.85);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:#fff;text-shadow:none;white-space:nowrap}
#touch-actions #take.transfer-egg{font-size:10px;line-height:1.3;white-space:pre-line;padding:5px 6px}

@media(min-width:851px) and (pointer:fine){#touch-actions.bench-context{display:flex;position:absolute;right:22px;bottom:88px;flex-direction:column;pointer-events:auto}#touch-actions.bench-context button{min-width:76px;min-height:48px;padding:6px;color:#378e96;background:#ebf8ea}#touch-actions.bench-context button+button{margin-top:6px}}

header{justify-content:flex-end}.item-tag{display:inline-block;padding:6px 10px;border-radius:8px;background:#e0eee0;color:#537b69;font-size:12px}.dialog .item-effect{font-size:20px;line-height:1.7;color:#425f51;margin:22px 0}.item-price{font-size:13px;color:#826645;padding:14px 0;border-top:1px solid #dfd3b5}.item-detail .wide{background:#c9e9df;border-bottom:4px solid #86b6aa;font-size:16px}

button,#world canvas{touch-action:none;-webkit-tap-highlight-color:transparent}#movement button.pressed{background:#bce5d9;border-bottom-width:2px;transform:translateY(2px)}#mobile-shortcuts{display:none}.station-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.station-links button{background:#d9eee3;min-height:54px}.help-steps{padding-left:22px;font-size:15px;line-height:1.9}.help-steps li+li{margin-top:12px}#result.action-notice,#result.egg-notice{display:block;top:14%;left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 32px);width:max-content;padding:9px 14px;border-radius:8px;background:rgba(0,0,0,.85);color:#fff!important;font-size:14px;line-height:1.5;letter-spacing:0;text-shadow:none;white-space:normal}#result:empty{display:none}
@media(pointer:coarse),(max-width:850px){#items{display:none}#mobile-shortcuts{display:flex;position:absolute;bottom:calc(130px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);gap:8px;pointer-events:auto}#mobile-shortcuts button{min-width:68px;background:#eef8e8;border:2px solid #fff5dc;border-bottom:4px solid #8dbdb9;font-size:14px}#touch-actions button{font-size:12px;line-height:1.3}#target:not(:empty){display:block;position:absolute;top:auto!important;bottom:calc(192px + env(safe-area-inset-bottom));left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 28px);width:max-content;padding:5px 10px;border-radius:8px;background:rgba(255,246,228,.92);font-size:12px;color:#416956;text-shadow:none;white-space:pre-line}#held-label:not(:empty){display:block;bottom:calc(108px + env(safe-area-inset-bottom));left:18%;right:18%;font-size:12px;color:#365e4f}#wallet{bottom:calc(188px + env(safe-area-inset-bottom));font-size:15px}#movement{user-select:none;-webkit-user-select:none}#movement button{min-width:44px;min-height:44px}#touch-actions button:disabled{opacity:.55}.dialog p{font-size:14px}.tool-row p{font-size:13px}}
@media(pointer:coarse) and (max-height:440px),(max-width:850px) and (max-height:440px){#mobile-shortcuts{bottom:calc(14px + env(safe-area-inset-bottom))}#target:not(:empty){bottom:calc(75px + env(safe-area-inset-bottom))}#held-label:not(:empty){bottom:calc(119px + env(safe-area-inset-bottom))}#wallet{bottom:calc(132px + env(safe-area-inset-bottom))}}

@media(pointer:coarse),(max-width:850px){#touch-actions #interact.long-action{font-size:11px;white-space:normal}#touch-actions #interact.long-action:not(:disabled){letter-spacing:0}}

#rotate-phone{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#fff3d6;color:#456f60;text-align:center;padding:24px}#rotate-phone[hidden]{display:none}#rotate-phone strong{font-size:24px}#rotate-phone span{font-size:15px}@media(pointer:coarse),(max-width:850px){header{left:calc(15px + env(safe-area-inset-left));right:calc(15px + env(safe-area-inset-right))}#movement{left:calc(16px + env(safe-area-inset-left))}#touch-actions{right:calc(16px + env(safe-area-inset-right))}}
/* Show the same playable controls in full-page desktop and mobile previews. */
#desktop-controls,#items{display:none}
#movement{display:block;position:absolute;left:calc(20px + env(safe-area-inset-left));bottom:calc(20px + env(safe-area-inset-bottom));text-align:center;pointer-events:auto;user-select:none;-webkit-user-select:none}
#movement>button{margin-bottom:4px}#movement button{width:44px;min-height:44px;padding:6px;background:rgba(255,250,233,.94);font-size:18px;border-color:#aac6b1}#movement div{display:flex}#movement div button+button{margin-left:4px}
#touch-actions,#touch-actions.bench-context{display:flex;position:absolute;right:calc(20px + env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom));flex-direction:column;pointer-events:auto}
#touch-actions button,#touch-actions.bench-context button{width:76px;min-width:0;min-height:48px;padding:6px;font-size:14px;line-height:1.3;background:rgba(235,248,234,.96);color:#378e96}#touch-actions button+button{margin-top:6px}#touch-actions #interact.long-action{font-size:12px}#touch-actions #take.transfer-egg{font-size:10px}
#mobile-shortcuts{display:flex;position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);gap:8px;pointer-events:auto}#mobile-shortcuts button{min-width:68px;background:#eef8e8;border:2px solid #fff5dc;border-bottom:4px solid #8dbdb9;font-size:14px}
#wallet{bottom:calc(132px + env(safe-area-inset-bottom))}
@media(min-height:441px) and (max-width:850px){#mobile-shortcuts{bottom:calc(130px + env(safe-area-inset-bottom))}}

/* Default wheel relocates to each press; other HUD controls stay above its entire hit area. */
#movement{left:0;bottom:0;width:36vw;max-width:320px;height:40vh;max-height:260px;z-index:0;border:0;border-radius:0;background:transparent;box-shadow:none;touch-action:none;cursor:default;overflow:visible}
#movement #joystick-base{position:absolute;display:block;left:calc(76px + env(safe-area-inset-left));top:auto;bottom:calc(20px + env(safe-area-inset-bottom));opacity:.65;width:112px;height:112px;transform:translateX(-50%);border-radius:50%;border:3px solid #fff5dc;background:rgba(197,230,215,.85);box-shadow:inset 0 0 0 16px rgba(109,171,158,.12),0 4px 0 #8dbdb9;pointer-events:none}
#movement.pressed{background:transparent;cursor:grabbing}
#movement.pressed #joystick-base{bottom:auto;transform:translate(-50%,-50%);opacity:1}
#hud header,#touch-actions,#touch-actions.bench-context,#mobile-shortcuts{z-index:2}
#movement #joystick-knob{position:absolute;display:block;left:50%;top:50%;width:48px;height:48px;border-radius:50%;background:#fff5dc;border:2px solid #a8cec1;box-shadow:0 3px 0 #7eaca4;transform:translate(-50%,-50%);pointer-events:none}
#touch-actions button[hidden]{display:none!important}#mobile-shortcuts{display:none!important}
