html,body{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overscroll-behavior:none;background:#8fd3ff;height:100%;margin:0;font-family:system-ui,sans-serif;overflow:hidden}#game{touch-action:none;width:100%;height:100%;display:block;position:fixed;inset:0}#joystick{box-sizing:border-box;pointer-events:none;background:#ffffff40;border:3px solid #fff9;border-radius:50%;width:120px;height:120px;margin:-60px 0 0 -60px;display:none;position:fixed}#joystick-knob{background:#ffffffd9;border-radius:50%;width:56px;height:56px;margin:-28px 0 0 -28px;position:absolute;top:50%;left:50%}button{color:#fff;touch-action:none;-webkit-tap-highlight-color:transparent;border:4px solid #fff;font-weight:800;position:fixed;box-shadow:0 4px #0003}button:active{transform:translateY(3px);box-shadow:0 1px #0003}#jump{right:calc(24px + env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));background:#ff5fa2;border-radius:50%;width:96px;height:96px;font-size:44px}#switch{right:calc(16px + env(safe-area-inset-right));top:calc(16px + env(safe-area-inset-top));background:#7a5cff;border-radius:999px;padding:10px 18px;font-size:20px}[hidden]{display:none!important}#stars{left:calc(16px + env(safe-area-inset-left));top:calc(16px + env(safe-area-inset-top));color:#fff;pointer-events:none;background:#00000059;border-radius:999px;padding:8px 16px;font-size:22px;font-weight:800;position:fixed}#bubble{left:50%;top:calc(16px + env(safe-area-inset-top));color:#333;pointer-events:none;background:#fff;border-radius:18px;max-width:min(52vw,520px);padding:10px 18px;font-size:18px;line-height:1.3;position:fixed;transform:translate(-50%);box-shadow:0 4px #00000026}.screen{color:#fff;text-align:center;background:#3c288c8c;flex-direction:column;justify-content:center;align-items:center;gap:20px;display:flex;position:fixed;inset:0}.screen h1{text-shadow:0 3px #00000040;margin:0;font-size:clamp(26px,6vw,48px)}.screen p{margin:0;font-size:40px}.row{gap:28px;display:flex}.screen button{background:#ff5fa2;border-radius:50%;width:110px;height:110px;font-size:52px;position:static}#castle-hud button{-webkit-tap-highlight-color:transparent}#goal{left:calc(16px + env(safe-area-inset-left));top:calc(16px + env(safe-area-inset-top));box-sizing:border-box;text-align:left;background:#0000008c;border-radius:14px;max-width:22vw;padding:6px 10px;font-size:15px;line-height:1.25}#tools{right:calc(16px + env(safe-area-inset-right));top:calc(70px + env(safe-area-inset-top));gap:8px;display:flex;position:fixed}#tools button{background:#7a5cff;border-radius:12px;width:52px;height:52px;padding:0;font-size:24px;position:static}#hotbar{left:calc(182px + env(safe-area-inset-left));right:calc(132px + env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom));pointer-events:none;justify-content:center;gap:5px;display:flex;position:fixed}#hotbar .slot{pointer-events:auto}#switch[hidden]~#castle-hud #tools{top:calc(16px + env(safe-area-inset-top))}@media (orientation:portrait){#hotbar{left:8px;right:8px;bottom:calc(180px + env(safe-area-inset-bottom))}#goal{max-width:50vw}#tools{flex-direction:column}}.slot{width:46px;height:46px;box-shadow:none;box-sizing:border-box;background:#ffffff1f;border:3px solid #ffffff59;border-radius:6px;padding:0;position:relative}#castle-hud .slot{position:relative}.slot.selected{background:#ffe45e73;border-color:#ffe45e;transform:scale(1.14)}.slot img{width:100%;height:100%;image-rendering:pixelated;display:block}.slot span{font-size:24px;line-height:40px}.slot small{color:#fff;text-shadow:1px 1px #000;font-size:13px;font-weight:800;position:absolute;bottom:0;right:2px}#panel{z-index:5;box-sizing:border-box;background:#281c5aeb;padding:12px;overflow:hidden}#panel h2{margin:0;font-size:clamp(20px,4vw,30px)}#panel p{max-width:640px;margin:0;font-size:clamp(22px,4vw,32px);line-height:1.35}#panel button{background:#ff5fa2;border-radius:12px;width:auto;height:auto;padding:8px 14px;font-size:20px;position:static}#panel .close{right:calc(12px + env(safe-area-inset-right));top:calc(12px + env(safe-area-inset-top));background:#7a5cff;position:fixed}.recipes{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:4px;width:84vw;max-height:72vh;display:grid;overflow:hidden}#panel .recipes button{background:#5a43c9;border-width:2px;justify-content:center;align-items:center;gap:5px;padding:2px 4px;font-size:12px;display:flex}#panel .recipes button.lacking{opacity:.45}.recipes img{width:24px;height:24px;image-rendering:pixelated}#stick{left:calc(16px + env(safe-area-inset-left));bottom:calc(16px + env(safe-area-inset-bottom));box-sizing:border-box;touch-action:none;background:#ffffff38;border:3px solid #fff9;border-radius:50%;width:150px;height:150px;position:fixed}#stick-knob{pointer-events:none;background:#fffc;border-radius:50%;width:64px;height:64px;margin:-32px 0 0 -32px;position:absolute;top:50%;left:50%}#panel .inventory{flex-wrap:wrap;justify-content:center;gap:6px;max-width:84vw;display:flex}#panel .inventory .slot{background:#ffffff1f;border-width:3px;width:56px;height:56px;padding:0;position:relative}#panel .inventory .slot.selected{background:#ffe45e73}
