html,body{margin:0;height:100%;background:#1b1f3a;overflow:hidden;font-family:monospace}
#game{display:block;width:100%;height:100%;image-rendering:pixelated}
#hud{position:fixed;top:8px;left:8px;color:#fff;background:#0007;padding:4px 10px;border-radius:6px;z-index:2}
#pad{position:fixed;bottom:12px;left:0;right:0;display:flex;justify-content:space-between;padding:0 16px;z-index:2}
#pad button{width:64px;height:64px;font-size:24px;border:0;border-radius:12px;background:#ffffff40;color:#fff}
@media(hover:hover) and (pointer:fine){#pad{display:none}}
#auth{position:fixed;inset:0;background:#1b1f3aee;display:flex;align-items:center;justify-content:center;z-index:5}
#auth .box{background:#2a2f5a;padding:20px;border-radius:12px;width:260px;color:#fff;display:flex;flex-direction:column;gap:10px}
#auth h2{margin:0;text-align:center}
#auth input{padding:10px;border:0;border-radius:8px;font-size:16px}
#auth .row{display:flex;gap:8px}
#auth .row button{flex:1;padding:10px;border:0;border-radius:8px;background:#3fa34d;color:#fff;font-size:16px}
#msg{color:#ffb4b4;min-height:18px;font-size:13px;text-align:center}
#chat{position:fixed;top:44px;left:8px;width:min(92vw,380px);z-index:2;color:#fff;font-size:12px}
#log{background:#0006;border-radius:6px;padding:4px 6px;min-height:14px;max-height:120px;overflow:hidden;word-break:break-word}
#cin{display:flex;gap:4px;margin-top:4px}
#cin input{flex:1;min-width:0;padding:6px;border:0;border-radius:6px}
#cin select,#cin button{border:0;border-radius:6px;padding:6px;background:#ffffff50;color:#fff}
#cin select option{color:#000}
#top{position:fixed;top:8px;right:8px;z-index:2;display:flex;gap:6px;align-items:center}
#cur{background:#0007;color:#fff;padding:4px 8px;border-radius:6px;font-size:12px}
#invbtn{border:0;border-radius:6px;padding:6px 10px;background:#ffffff50;color:#fff}
#invp{position:fixed;top:44px;right:8px;width:min(80vw,260px);max-height:60vh;overflow:auto;z-index:3;background:#1b1f3af2;border-radius:10px;padding:8px;color:#fff;font-size:13px}
#invp[hidden]{display:none}
#items{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
#items .it{text-align:left;border:0;border-radius:6px;padding:6px;background:#ffffff25;color:#fff}
#items .it.sel{background:#3fa34d}
#invp .row{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
#invp .row button{flex:1;min-width:46%;border:0;border-radius:6px;padding:6px;background:#ffffff40;color:#fff;font-size:12px}
#wbtn{border:0;border-radius:6px;padding:6px 10px;background:#ffffff50;color:#fff}
#wbtn.on{background:#3fa34d}
#top{flex-wrap:wrap;justify-content:flex-end;max-width:70vw}
#gbtn{border:0;border-radius:6px;padding:6px 10px;background:#e0a030;color:#fff}
#gp{position:fixed;top:44px;right:8px;width:min(80vw,260px);max-height:70vh;overflow:auto;z-index:3;background:#1b1f3af2;border-radius:10px;padding:10px;color:#fff;font-size:12px;text-align:center}
#gp[hidden]{display:none}
#reel{width:64px;height:64px;margin:8px auto;border:4px solid #fff;background:#444}
#reel.pop{animation:pop .5s}
@keyframes pop{0%{transform:scale(.6)}60%{transform:scale(1.3)}100%{transform:scale(1)}}
#gspin{width:100%;border:0;border-radius:8px;padding:8px;background:#3fa34d;color:#fff;font-size:14px;margin:6px 0}
#gspin:disabled{opacity:.5}
#gl div{text-align:left;padding:3px 6px;margin-top:3px;background:#ffffff20;border-radius:4px}
#trbtn{border:0;border-radius:6px;padding:6px 10px;background:#2f6fd9;color:#fff}
#tp{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(90vw,330px);max-height:80vh;overflow:auto;z-index:4;background:#1b1f3afa;border-radius:12px;padding:10px;color:#fff;font-size:12px}
#tp[hidden]{display:none}
#tp .tl{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 8px;min-height:20px}
#tp .tl button{border:0;border-radius:6px;padding:5px 8px;background:#ffffff30;color:#fff;font-size:12px}
#ts{margin:6px 0;padding:6px;background:#ffffff18;border-radius:6px}
#tp .row{display:flex;gap:6px}
#tp .row button{flex:1;border:0;border-radius:8px;padding:8px;color:#fff;background:#3fa34d;font-size:14px}
#tp .row button:disabled{opacity:.5}
#tcan{background:#c0392b!important}
#mbtn{border:0;border-radius:6px;padding:6px 10px;background:#8e44ad;color:#fff}
#mp,#ap{position:fixed;top:44px;right:8px;width:min(90vw,300px);max-height:75vh;overflow:auto;z-index:3;background:#1b1f3af2;border-radius:10px;padding:10px;color:#fff;font-size:12px}
#mp[hidden],#ap[hidden]{display:none}
#mp input,#mp select,#ap input{padding:6px;border:0;border-radius:6px;min-width:60px;flex:1;box-sizing:border-box}
#mp>#mtools>input{width:100%}
#mp .row,#ap .row{display:flex;gap:4px;margin:4px 0;flex-wrap:wrap}
#mp .row button,#ap .row button{flex:1;border:0;border-radius:6px;padding:6px;background:#ffffff40;color:#fff}
#mres,#ares{margin-top:6px;padding:6px;background:#ffffff18;border-radius:6px;min-height:16px;word-break:break-word}
#ddup{background:#c0392b!important}
#dres{display:flex;align-items:center;gap:6px;min-height:24px}
#dres i{display:inline-block;width:20px;height:20px;border:2px solid #fff}
#ap>input{width:100%}
#ares{white-space:pre-wrap;max-height:200px;overflow:auto}
#abtn{border:0;border-radius:6px;padding:6px 10px;background:#c0392b;color:#fff}
#abtn[hidden]{display:none}

/* ===== Tampilan ala game: panel biru, slot ikon, hotbar ===== */
#hud,#cur,#log,#invp,#gp,#sp,#tp,#mp,#ap{background:linear-gradient(#3f86e0,#255ca8)!important;border:3px solid #12306a;border-radius:10px;box-shadow:inset 0 0 0 2px #7db4f5,0 2px 6px #0006;color:#fff;text-shadow:1px 1px 0 #0b2350}
#top button,#cin button,#cin select,#gspin,#invp .row button,#tp .row button{background:linear-gradient(#5aa0f0,#2f6fc0)!important;border:2px solid #12306a!important;border-radius:8px;color:#fff;font-weight:bold;text-shadow:1px 1px 0 #0b2350}
#tcan{background:linear-gradient(#e0584a,#b02a1e)!important}
#pad button{background:linear-gradient(#5aa0f0,#2f6fc0);border:3px solid #12306a;border-radius:14px;color:#fff;font-weight:bold}
#cur{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:bold;padding:3px 8px}
#cur span{display:flex;align-items:center;gap:3px}
#cur img{width:18px;height:18px;image-rendering:pixelated}
#invp,#gp,#sp,#mp,#ap{top:96px!important}
#sp{position:fixed;right:8px;width:min(86vw,280px);max-height:65vh;overflow:auto;z-index:3;padding:10px;font-size:12px}
#sp[hidden]{display:none}
#sl{display:flex;flex-direction:column;gap:4px;margin-top:6px}
#sl button{display:flex;align-items:center;gap:8px;text-align:left;padding:4px;border:2px solid #0f2a5c;border-radius:6px;background:#1b3e7a;color:#fff;font-size:12px}
#sl img{width:26px;height:26px;image-rendering:pixelated}
#selname{margin-bottom:6px;font-weight:bold}
#items{display:grid!important;grid-template-columns:repeat(5,1fr);gap:4px}
#items .it{position:relative;aspect-ratio:1;padding:2px!important;border:2px solid #0f2a5c!important;background:#1b3e7a!important;border-radius:6px}
#items .it img,#hotbar img{width:100%;height:100%;image-rendering:pixelated;display:block}
#items .it i,#hotbar i{position:absolute;right:3px;bottom:1px;font-style:normal;font-size:11px;font-weight:bold;color:#fff;text-shadow:1px 1px 0 #000}
#items .it.sel,#hotbar button.sel{border-color:#ffd84a!important;box-shadow:0 0 6px #ffd84a}
#hotbar{position:fixed;bottom:84px;left:50%;transform:translateX(-50%);display:flex;gap:4px;z-index:2;padding:4px;background:#0b2350aa;border-radius:10px}
#hotbar button{position:relative;width:42px;height:42px;padding:3px;border:2px solid #0f2a5c;background:#1b3e7a;border-radius:6px}
