*{box-sizing:border-box}html,body{color:#fff;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none;background:#1a1208;height:100%;margin:0;font-family:system-ui,-apple-system,Segoe UI,sans-serif;overflow:hidden}#game,#game canvas{display:block;position:fixed;inset:0}button{font:inherit;cursor:pointer}#hud{pointer-events:none;text-shadow:0 1px 2px #000;background:linear-gradient(#0000008c,#0000);padding:10px 12px;position:fixed;top:0;left:0;right:0}.hud-row{flex-wrap:wrap;align-items:center;gap:8px 16px;display:flex}#hp{background:#400;border:2px solid #000;border-radius:12px;width:min(260px,100%);height:24px;position:relative;overflow:hidden}#hp-fill{background:#3c3;height:100%;transition:width .15s}#hunger{background:#3a2400;border:2px solid #000;border-radius:12px;width:min(180px,100%);height:24px;display:none;position:relative;overflow:hidden}#hunger-fill{background:#e8902a;height:100%;transition:width .3s}#hunger-text{text-align:center;font-size:13px;font-weight:700;line-height:20px;position:absolute;inset:0}#btn-eat{display:none}#hp-text{text-align:center;font-size:14px;font-weight:700;line-height:20px;position:absolute;inset:0}#wallet{flex-wrap:wrap;gap:4px 12px;font-size:16px;font-weight:700;display:flex}#where{opacity:.95;margin-top:6px;font-size:14px}#actions{gap:10px;display:flex;position:fixed;bottom:16px;right:12px}#actions button{color:#000;background:#fff0c8d9;border:3px solid #000;border-radius:50%;width:68px;height:68px;font-size:22px;font-weight:800;position:relative}#actions small{color:#fff;background:#000;border-radius:6px;padding:1px 5px;font-size:11px;position:absolute;top:-6px;right:-4px}#hotbar{flex-wrap:wrap-reverse;justify-content:flex-end;gap:8px 6px;width:min(560px,100% - 170px);display:none;position:fixed;bottom:96px;right:12px}body.in-village #hotbar{justify-content:center;width:min(560px,100% - 24px);bottom:90px;left:50%;right:auto;transform:translate(-50%)}#hotbar button{color:#000;background:#fff0c8d9;border:3px solid #000;border-radius:10px;flex-direction:column;justify-content:center;align-items:center;width:50px;height:50px;padding:0;font-weight:800;line-height:1;display:flex;position:relative}#hotbar button.selected{background:#fff6d8;border-color:#ffd84a;box-shadow:0 0 0 3px #000,0 0 12px #ffd84a}#hotbar button.drop{color:#fff;background:#3c281ed9}#hotbar .icon{font-size:22px}#hotbar .count{font-size:12px;position:absolute;bottom:2px;right:4px}#hotbar .stripe{border:1px solid #0006;border-radius:3px;height:5px;position:absolute;bottom:4px;left:6px;right:6px}#hotbar .eq{color:#fff;background:#2a8a3a;border-radius:6px;padding:1px 4px;font-size:10px;position:absolute;top:-6px;left:-5px}#hotbar small{color:#fff;background:#000;border-radius:6px;padding:1px 5px;font-size:11px;position:absolute;top:-7px;right:-5px}@media (width<=500px){#hotbar{gap:7px 5px;width:calc(100% - 130px);bottom:90px}body.in-village #hotbar{width:calc(100% - 24px);bottom:84px}#hotbar button{width:42px;height:42px}#hotbar .icon{font-size:18px}}.effects{color:#ffd84a;font-weight:800}#btn-restart{color:#fff;background:#1e140acc;border:2px solid #000;border-radius:10px;padding:8px 12px;font-size:15px;font-weight:800;display:none;position:fixed;top:10px;right:12px}#btn-restart:hover{background:#781e14e6}#btn-coop{color:#fff;background:#1446a0d9;border:2px solid #000;border-radius:10px;padding:8px 12px;font-size:15px;font-weight:800;display:none;position:fixed;top:10px;right:12px}#btn-coop:hover{background:#2864d2f2}#btn-world{color:#fff;background:#1e783ce0;border:2px solid #000;border-radius:10px;padding:8px 12px;font-size:15px;font-weight:800;display:none;position:fixed;top:52px;right:12px}#btn-world:hover{background:#28964bf2}#home-link{color:#fff;background:#1e140acc;border:2px solid #000;border-radius:10px;padding:8px 12px;font-size:15px;font-weight:800;text-decoration:none;display:none;position:fixed;top:94px;right:12px}#home-link:hover{background:#463214e6}body.in-village #home-link:not([hidden]){display:block}#where .coop{color:#9df}.hud-row{margin-right:150px}@media (width<=500px){#btn-restart .long,#btn-coop .long,#btn-world .long{display:none}.hud-row{margin-right:110px}}#btn-battle{color:#fff;background:#c22;border:3px solid #000;border-radius:14px;padding:14px 26px;font-size:20px;font-weight:800;position:fixed;bottom:20px;left:50%;transform:translate(-50%);box-shadow:0 4px #000}#btn-battle:active{transform:translate(-50%)translateY(3px);box-shadow:0 1px #000}#minimap{opacity:.85;pointer-events:none;border:3px solid #000;border-radius:10px;width:140px;height:140px;display:none;position:fixed;bottom:16px;left:12px}#minimap.wide{width:200px;height:126px}@media (width<=500px){#minimap{width:104px;height:104px}#minimap.wide{width:150px;height:95px}}#boss-bar{pointer-events:none;text-align:center;text-shadow:0 2px #000;width:min(520px,100% - 32px);display:none;position:fixed;top:84px;left:50%;transform:translate(-50%)}#boss-name{color:#ffd84a;margin-bottom:4px;font-size:18px;font-weight:900}#boss-hp{background:#300;border:2px solid #000;border-radius:8px;height:16px;overflow:hidden}#boss-fill{background:linear-gradient(#ff5a3a,#b3121f);height:100%;transition:width .15s}.joystick{pointer-events:none;background:#ffffff1f;border:3px solid #fff9;border-radius:50%;width:110px;height:110px;margin:-55px 0 0 -55px;display:none;position:fixed}.joystick-knob{background:#ffffffb3;border-radius:50%;width:46px;height:46px;margin:-23px 0 0 -23px;position:absolute;top:50%;left:50%}#panel{background:#00000073;justify-content:center;align-items:center;padding:16px;display:none;position:fixed;inset:0}.panel-card{color:#2a1a08;background:#fbf0d4;border:4px solid #5a3a1a;border-radius:16px;flex-direction:column;width:min(560px,100%);max-height:100%;display:flex;box-shadow:0 8px 30px #00000080}.panel-head{background:#e8cf98;border-bottom:3px solid #5a3a1a;border-radius:12px 12px 0 0;justify-content:space-between;align-items:center;padding:10px 14px;display:flex}.panel-head h2{margin:0;font-size:22px}#panel-close{background:#fff;border:2px solid #5a3a1a;border-radius:8px;padding:4px 10px;font-size:18px}#panel-body{padding:8px 14px 14px;overflow-y:auto}#panel-body h3{margin:14px 0 4px}.who{margin:6px 0 10px}.shop-row{border-bottom:1px dashed #c9a86a;align-items:center;gap:10px;padding:10px 0;display:flex}.shop-row .info{flex:1;min-width:0}.shop-row .name{font-size:17px;font-weight:800}.shop-row .desc{opacity:.85;font-size:14px}.shop-row button{color:#fff;background:#3a3;border:2px solid #2a1a08;border-radius:10px;flex-shrink:0;min-width:104px;padding:10px 12px;font-weight:800}.shop-row button:disabled{color:#555;cursor:default;background:#bbb}.swatch{vertical-align:-1px;border:1px solid #000;border-radius:3px;width:14px;height:14px;margin-right:6px;display:inline-block}.stars{color:#d90;letter-spacing:1px}#overlay{background:#0a060099;justify-content:center;align-items:center;padding:16px;display:none;position:fixed;inset:0}#overlay .card{text-align:center;color:#2a1a08;background:#fbf0d4;border:4px solid #5a3a1a;border-radius:18px;width:min(560px,100%);padding:22px 20px}#overlay h1{margin:0 0 10px;font-size:34px}#overlay p{line-height:1.5}#overlay .btns{flex-wrap:wrap;justify-content:center;gap:10px;margin-top:12px;display:flex}#overlay button{color:#fff;background:#c22;border:3px solid #000;border-radius:12px;padding:12px 22px;font-size:19px;font-weight:800;box-shadow:0 4px #000}#banner{text-align:center;pointer-events:none;color:#ffd84a;text-shadow:0 3px #000,0 0 12px #000;opacity:0;font-size:clamp(28px,7vw,56px);font-weight:900;position:fixed;top:32%;left:0;right:0}#banner.show{animation:2.2s ease-out forwards banner}@keyframes banner{0%{opacity:0;transform:scale(.6)}15%{opacity:1;transform:scale(1.08)}25%{transform:scale(1)}75%{opacity:1}to{opacity:0}}#floaters{pointer-events:none;position:fixed;inset:0;overflow:hidden}.floater{white-space:nowrap;text-shadow:0 2px #000,0 0 4px #000;font-size:20px;font-weight:900;position:absolute;top:0;left:0}#toasts{pointer-events:none;flex-direction:column;align-items:center;gap:6px;width:calc(100% - 32px);display:flex;position:fixed;bottom:100px;left:50%;transform:translate(-50%)}.toast{text-align:center;background:#000c;border-radius:10px;padding:8px 14px;font-weight:700}
