*{box-sizing:border-box}html,body{color:#f2f2f2;background:#0f1218;height:100%;margin:0;font-family:system-ui,-apple-system,Segoe UI,sans-serif;overflow:hidden}[hidden]{display:none!important}#game{touch-action:none;width:100vw;height:100vh;display:block;position:fixed;inset:0}.panel{background:#10141cf0;border:2px solid #2c3444;border-radius:8px;flex-direction:column;gap:12px;width:min(320px,100vw - 32px);padding:20px;display:flex;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.panel h1{margin:0 0 4px;font-size:22px}.panel p{margin:0}.panel label{color:#aab3c2;flex-direction:column;gap:4px;font-size:13px;display:flex}.panel input{font:inherit;color:#fff;background:#0c0f15;border:1px solid #3a4456;border-radius:6px;padding:8px 10px;font-size:15px}#world{text-transform:uppercase}button{font:inherit;color:#fff;cursor:pointer;background:#3f7fd9;border:0;border-radius:6px;padding:9px;font-weight:600}button.quiet{background:#2a3140}.error{color:#ff8a7a;min-height:1em;font-size:13px}#hud{pointer-events:none;position:fixed;inset:0}#top{pointer-events:auto;gap:6px;display:flex;position:absolute;top:12px;left:12px}#world-name,#exit,#sound{background:#00000073;border-radius:6px;padding:6px 10px;font-size:14px;font-weight:700}#hp{background:#00000073;border-radius:6px;align-self:center;width:120px;height:12px;padding:2px}#hp-fill{background:#4cc75a;border-radius:4px;width:100%;height:100%;transition:width .2s}#hp-fill.low{background:#e5533d}#gems{background:#00000073;border-radius:6px;align-self:center;align-items:center;gap:4px;padding:3px 9px 3px 5px;font-size:14px;display:flex}#gems img{width:20px;height:20px;image-rendering:pixelated}.who{color:#aab3c2;font-size:14px}.who b{color:#fff}.slot b{color:#fff;text-shadow:0 1px #000,1px 0 #000,-1px 0 #000,0 -1px #000;font-size:11px;position:absolute;bottom:1px;right:3px}#store-btn{background:#c48a1c;border-radius:6px;padding:6px 12px;font-size:14px;font-weight:700}#store{pointer-events:auto;background:#10202b;border:2px solid #3f6b82;border-radius:8px;width:min(480px,100vw - 24px);max-height:calc(100vh - 140px);position:absolute;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}#store-head{background:#16303f;border-bottom:1px solid #2b5063;align-items:center;gap:10px;padding:10px 12px;font-size:16px;display:flex}#store-head b{flex:1}#store-gems{align-items:center;gap:4px;font-weight:700;display:flex}#store-gems img,.price img{width:18px;height:18px;image-rendering:pixelated}#store-head button{padding:5px 12px}.pack{border-bottom:1px solid #1f3b4b;align-items:center;gap:12px;padding:10px 12px;display:flex}.pack>img{width:48px;height:48px;image-rendering:pixelated;flex:none}.pack div{flex:1;min-width:0}.pack h3{margin:0 0 2px;font-size:15px}.pack p{color:#9cb4c2;margin:0;font-size:13px}.pack .price{white-space:nowrap;align-items:center;gap:4px;font-weight:700;display:flex}.pack button{background:#3fae5a;padding:7px 16px}#store-msg{min-height:1.2em;padding:10px 12px;font-size:14px}#store-msg.bad{color:#ff8a7a}#store-msg .got{align-items:center;gap:2px;margin:2px 8px 2px 0;display:inline-flex}#store-msg .got img{width:20px;height:20px;image-rendering:pixelated}#keys{color:#ffffffbf;text-shadow:0 1px 2px #000;font-size:12px;position:absolute;top:14px;right:12px}#dock{pointer-events:auto;flex-direction:column;align-items:center;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}#inv-panel{background:#10202b;border:0 solid #3f6b82;border-radius:8px 8px 0 0;width:min(452px,100vw);max-height:0;transition:max-height .18s ease-out;overflow:hidden}#dock.open #inv-panel{border-width:2px 2px 0;max-height:420px}#inv-grid{grid-template-columns:repeat(8,48px);justify-content:center;gap:4px;max-height:268px;padding:8px;display:grid;overflow-y:auto}#inv-bar,#inv-ask{background:#16303f;border-bottom:1px solid #2b5063;align-items:center;gap:8px;padding:8px 10px;font-size:14px;display:flex}#inv-sel-icon{width:28px;height:28px;image-rendering:pixelated}#inv-sel,#inv-ask-text{color:#e3edf3;flex:1;font-weight:600}#inv-bar button,#inv-ask button{padding:6px 14px}#inv-ask-n{width:72px;font:inherit;color:#fff;background:#0b1820;border:1px solid #3f6b82;border-radius:6px;padding:5px 8px}button.danger{background:#c2412f}button:disabled{opacity:.35;cursor:default}#inv-handle{cursor:ns-resize;touch-action:none;background:#16303f;border:2px solid #3f6b82;border-bottom:0;border-radius:10px 10px 0 0;justify-content:center;align-items:center;width:84px;height:18px;margin-top:6px;padding:0;display:flex}#inv-handle span{background:#9cc4d8;border-radius:2px;width:32px;height:3px}#hotbar{background:#10202bd9;border:2px solid #3f6b82;border-radius:8px;gap:4px;padding:4px;display:flex}#dock:not(.open) #inv-handle{margin-bottom:0}.slot{background:#18303f;border:2px solid #3f6b82;border-radius:4px;width:48px;height:48px;padding:6px;position:relative;box-shadow:inset 0 0 0 2px #0f2230}.slot.empty{cursor:default}.slot img{width:32px;height:32px;image-rendering:pixelated;display:block}.slot.on{border-color:#ffd25a;box-shadow:inset 0 0 0 2px #7a5a10,0 0 6px #ffd25a99}.slot span{color:#9cc4d8;font-size:10px;position:absolute;top:1px;left:4px}#chat{width:min(420px,100vw - 24px);position:absolute;bottom:100px;left:12px}#hud:has(#dock.open) #chat{bottom:440px}#chat-log{text-shadow:0 1px 2px #000;flex-direction:column;gap:2px;font-size:14px;display:flex}#chat-log .sys{color:#9fc4ff}#chat-log b{color:#ffd25a;font-weight:600}#chat-input{pointer-events:auto;width:100%;font:inherit;color:#fff;background:#080a0ed9;border:1px solid #3a4456;border-radius:6px;margin-top:6px;padding:7px 9px;font-size:14px}@media (width<=1100px){#keys{display:none}}
