*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#10151c;color:#fff;font:14px system-ui}canvas{width:100%;height:100%;image-rendering:pixelated}#top{position:fixed;top:12px;left:12px;right:12px;display:flex;gap:18px;align-items:center;background:#111cdd;border:1px solid #d6b66c;padding:10px 14px;border-radius:8px;background:rgba(15,20,28,.88)}#top b{font-size:18px;color:#f2d38a}#top span:nth-child(2){color:#ffcf5b;font-weight:800}#region{margin-left:auto}#hud{position:fixed;left:12px;bottom:12px;background:rgba(15,20,28,.9);border:1px solid #876f45;padding:10px 14px;border-radius:8px}.keys{font-size:12px;color:#d6c9ad;margin-top:5px}#notice{position:fixed;right:12px;bottom:12px;max-width:360px;background:rgba(15,20,28,.9);border:1px solid #876f45;padding:10px;border-radius:8px;color:#e8d8b7}#panel{position:fixed;inset:80px 10% 80px 10%;background:rgba(12,16,22,.96);border:2px solid #d6b66c;border-radius:10px;padding:20px;overflow:auto}.hidden{display:none}.item{display:inline-block;margin:5px;padding:8px;border:1px solid #555;border-radius:6px}.coming{color:#ffcf5b}
#touchControls{position:fixed;inset:auto 0 10px 0;z-index:40;display:flex;justify-content:space-between;align-items:flex-end;padding:10px 14px;pointer-events:none}
#touchControls button{pointer-events:auto;min-width:52px;min-height:52px;margin:3px;border:1px solid rgba(255,255,255,.28);border-radius:14px;background:rgba(10,15,22,.72);color:#fff;font-weight:800;font-size:16px;touch-action:none}
.touch-dpad>button{display:block;margin:auto}.touch-dpad div{display:flex}.touch-actions{display:grid;grid-template-columns:repeat(2,56px);gap:4px}
@media (min-width:900px) and (hover:hover){#touchControls{display:none}}
@media (max-width:700px){#panel{max-width:92vw;max-height:78vh;overflow:auto}.hud,.panel{font-size:12px}canvas{touch-action:none}}

/* v0.4.1 mobile/playability polish */
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:700px){
 #touchControls{padding-bottom:max(10px,env(safe-area-inset-bottom))}
 #touchControls button{min-width:58px;min-height:58px;font-size:17px}
 body{overscroll-behavior:none}
 #panel{width:min(94vw,560px);box-sizing:border-box}
}
@media(max-height:520px) and (orientation:landscape){
 #touchControls button{min-width:46px;min-height:46px}
 #panel{max-height:72vh}
}

.creator47{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center;margin:12px 0}
.creator47 button{min-height:36px}
@media(max-width:600px){.creator47{grid-template-columns:1fr auto}.creator47 b{grid-column:1}.creator47 button{grid-column:2}}

/* v0.7.2 PvP opt-in HUD */
#pvp72{position:fixed;right:12px;top:64px;z-index:35;display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:320px;padding:8px 10px;border:1px solid #876f45;border-radius:8px;background:rgba(15,20,28,.9)}
#pvp72 button{min-width:92px;border:1px solid #8a8f98;border-radius:6px;padding:7px 10px;background:#252c35;color:#fff;font-weight:900;cursor:pointer}
#pvp72 .pvp72status{font-size:11px;color:#d6c9ad;text-align:right}
#pvp72[data-state="on"]{border-color:#d85b5b}#pvp72[data-state="on"] button{background:#722b31;border-color:#ff7a7a}
#pvp72[data-state="safe"]{border-color:#5aaec5}#pvp72[data-state="safe"] button{background:#24566a;border-color:#7edcf4}
#pvp72[data-state="locked"] button{opacity:.58;cursor:not-allowed}
@media(max-width:700px){#pvp72{top:58px;right:8px;max-width:210px;padding:6px}#pvp72 .pvp72status{font-size:10px}#pvp72 button{padding:6px 8px}}

/* v0.8.9 character creator + inventory/equipment */
.ui89{max-width:1180px;margin:auto}.ui89 header{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid #66563b;padding-bottom:12px}.ui89 h2,.ui89 h3{color:#f2d38a;margin:.2em 0}.ui89 button,.ui89 select{background:#222d38;color:#fff;border:1px solid #8d784e;border-radius:6px;padding:7px 10px;cursor:pointer}.creatorGrid89,.equipGrid89{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(360px,1.5fr);gap:18px;margin-top:16px}.preview89{display:flex;flex-direction:column;align-items:center;gap:7px;background:#18222c;border:1px solid #66563b;border-radius:10px;padding:18px}.rig89{position:relative;width:144px;height:144px;image-rendering:pixelated;background:repeating-linear-gradient(0deg,#15202a,#15202a 23px,#1b2833 24px);transform-origin:center bottom}.rig89 i{position:absolute;display:block}.head89{width:42px;height:34px;left:51px;top:28px;border-radius:45%;background:#c88d68}.hair89{width:48px;height:19px;left:48px;top:20px;background:#24232a;border-radius:60% 60% 20% 20%;z-index:3}.body89{width:58px;height:49px;left:43px;top:59px;background:#315d83;border-radius:8px}.legs89{width:48px;height:32px;left:48px;top:103px;border-left:18px solid #202832;border-right:18px solid #202832}.feet89{width:56px;height:8px;left:44px;top:134px;border-left:24px solid #584b40;border-right:24px solid #584b40}.mask89{left:61px;top:45px;color:#202832;z-index:5}.weapon89{left:104px;top:65px;font:48px monospace;color:#d8d2bd}.preview89[data-dir="left"] .weapon89{left:18px;transform:scaleX(-1)}.preview89[data-dir="up"] .mask89{display:none}.previewControls89{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.previewControls89 .active{border-color:#ffcf5b;color:#ffcf5b}.creatorOpts89{display:grid;gap:7px}.creatorOpts89 label{display:grid;grid-template-columns:1fr 1.5fr auto;align-items:center;gap:8px;background:#171e27;border:1px solid #39434d;border-radius:7px;padding:8px}.slots89{display:grid;grid-template-columns:repeat(2,minmax(130px,1fr));gap:8px}.slot89{min-height:80px;background:#171e27;border:1px solid #4b5661;border-radius:8px;padding:9px;display:flex;flex-direction:column;gap:5px}.slot89 small,.invCard89 small{color:#b8ab91;text-transform:capitalize}.inventory89{display:grid;grid-template-columns:repeat(2,minmax(210px,1fr));gap:8px;max-height:55vh;overflow:auto;padding-right:4px}.invCard89{display:flex;justify-content:space-between;gap:8px;background:#171e27;border:1px solid #4b5661;border-radius:8px;padding:10px}.invCard89 p{font-size:11px;color:#d2c8b4;margin:6px 0}.rarity-rare{border-color:#668bd1}.rarity-epic{border-color:#a775d4}.rarity-legendary{border-color:#d6a94e}
@media(max-width:760px){#panel{inset:58px 3% 64px}.ui89 header{align-items:flex-start;flex-direction:column}.creatorGrid89,.equipGrid89{grid-template-columns:1fr}.inventory89{grid-template-columns:1fr;max-height:none}.slots89{grid-template-columns:repeat(2,1fr)}.creatorOpts89 label{grid-template-columns:1fr 1fr auto}.preview89{padding:10px}.rig89{transform:scale(.85);margin:-10px 0}}

/* v0.9.0 world + HUD readability */
#top{backdrop-filter:blur(4px);border-color:#9d814c;box-shadow:0 5px 18px rgba(0,0,0,.28)}
#notice{bottom:74px;max-width:min(460px,44vw)}
#hud{bottom:74px;opacity:.94}
@media(max-width:700px){#top{gap:8px;padding:7px 9px}#top b{font-size:14px}#region{font-size:10px}#notice{right:8px;bottom:130px;max-width:54vw;font-size:10px}#hud{left:8px;bottom:130px;font-size:10px}}
/* v0.9.3 interactive service UI */
.service93{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;max-height:55vh;overflow:auto}.service93 button{min-height:42px;text-align:left}@media(max-width:680px){.service93{grid-template-columns:1fr}#panel{max-width:94vw;max-height:86vh;overflow:auto}}

.story94{max-width:760px;margin:auto}.story94 header{border-bottom:1px solid #6f5a37;margin-bottom:12px}.story94 header span{font-size:11px;color:#d6b66c}.quest94,.reward94,.bossIntro94{margin:10px 0;padding:12px;border:1px solid #554a38;border-radius:8px;background:#151d26}.bossIntro94{border-color:#a34c4c;color:#ff9b9b;font-weight:800}

.bossGrid95{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}.bossGrid95 article{padding:12px;background:#171b22;border:1px solid #713f43;border-radius:8px}.bossGrid95 small{display:block;color:#d9a6a6;margin-top:4px}.bossGrid95 p{font-size:12px;color:#d6c9ad}

.bars96,.equip96{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}.bars96 b,.equip96 div{padding:10px;border:1px solid #4e5964;background:#171e27;border-radius:7px}.equip96 small{display:block;text-transform:capitalize;color:#b8ab91}

:root{--uiScale:1}#top,#hud,#notice,#panel,#pvp72{font-size:calc(1em * var(--uiScale))}.settings97{display:grid;gap:12px;max-width:720px;margin:auto}.settings97 label{display:flex;justify-content:space-between;gap:14px;padding:10px;border-bottom:1px solid #3e4650}.highContrast97 #top,.highContrast97 #hud,.highContrast97 #notice,.highContrast97 #panel{background:#05070a;border-color:#ffe28a}.reducedMotion97 *{animation-duration:.001ms!important;transition-duration:.001ms!important}
