:root{color-scheme:dark;font-family:Segoe UI,Arial,sans-serif;color:#f0f1e9;background:#141a17;--line:#586052;--accent:#dac98e}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;min-height:42px;border:1px solid #737b67;border-radius:4px;background:#29382f;color:#f6f4e6;padding:8px 14px}button:hover{background:#415348}button:disabled{opacity:.55;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #e2d28b;outline-offset:2px}input,select{width:100%;padding:11px;border:1px solid #6d7768;border-radius:4px;background:#151f1a;color:#fff}label{display:block;font-size:14px;color:#d4dbce}label input,label select{margin-top:6px}h1,h2,p{margin:0}h2{font-size:20px}#game{height:100dvh;min-height:480px;position:relative;overflow:hidden}#scene{width:100%;height:100%;display:block;touch-action:none}.hud{position:absolute;top:0;left:0;right:0;display:flex;align-items:flex-start;gap:24px;padding:16px 22px;background:linear-gradient(#141a17ed,#141a1700);pointer-events:none}.hud>*{pointer-events:auto}.brand{font-family:Georgia,serif;font-size:25px;color:#f2e1aa;min-width:138px;text-shadow:0 2px 3px #000}.brand b{color:#de7159}.brand span{display:block;font:12px Segoe UI,sans-serif;margin-top:4px;color:#d5e6d6}#vitals{width:242px;background:#141a17d9;padding:10px;border:1px solid #6a7359;border-radius:4px}#level{float:right;color:#e2cb86;font-size:12px}.meter{position:relative;background:#0c110e;border:1px solid #4d584a;height:17px;margin-top:5px;overflow:hidden}.meter i{display:block;height:100%;width:0;transition:width .16s}.meter span{position:absolute;inset:0;text-align:center;font-size:11px;line-height:15px;text-shadow:0 1px 2px #000}.hp i{background:#b44643}.mp i{background:#398eac}.xp{height:13px}.xp i{background:#aa994c}.xp span{font-size:9px;line-height:11px}.connection{margin-left:auto;font-size:12px;background:#111c16d9;border:1px solid #56694f;padding:8px;border-radius:4px;display:flex;align-items:center;gap:10px}.connection button{padding:0;width:34px;min-height:32px;font-size:22px}#menu{position:absolute;right:18px;top:78px;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:420px}#menu button{font-size:13px;background:#1a2b20ed}#target{position:absolute;left:50%;top:155px;transform:translateX(-50%);background:#141f18eb;padding:9px 14px;border:1px solid #a4976c;display:flex;align-items:center;gap:12px;max-width:calc(100% - 28px);font-size:13px}#target strong{overflow-wrap:anywhere}#targetLife{color:#dcad92;white-space:nowrap}#targetAction{font-size:12px;white-space:nowrap}#chat{position:absolute;left:20px;bottom:20px;width:330px;background:#0e1913d9;border:1px solid #62745a;border-radius:4px}#messages{height:126px;overflow:auto;padding:10px;font-size:12px;line-height:1.55;overflow-wrap:anywhere}#messages p{margin-bottom:4px}#messages b{color:#e4ca83}#chatForm{display:flex;border-top:1px solid #53634c}#chatText{border:0;border-radius:0;min-width:0;background:transparent;font-size:13px}#chatForm button{border:0;border-radius:0;background:transparent;width:44px;padding:4px;font-size:20px}#controls{position:absolute;inset:0;pointer-events:none}#dpad{position:absolute;bottom:175px;left:25px;display:grid;grid-template-columns:42px 42px 42px;grid-template-rows:42px 42px;gap:3px;pointer-events:auto}#dpad button{padding:0;font-size:23px;background:#243a2dcc;touch-action:none}#dpad button:first-child{grid-column:2}#dpad button:nth-child(2){grid-row:2;grid-column:1}#dpad button:nth-child(3){grid-row:2;grid-column:2}#dpad button:nth-child(4){grid-row:2;grid-column:3}.actions{position:absolute;right:24px;bottom:27px;display:flex;align-items:flex-end;gap:10px;pointer-events:auto}.potion{width:48px;height:48px;padding:0;color:#faa8a0}.potion:nth-child(2){color:#9ce0f1}.attack{border-radius:50%;width:86px;height:86px;background:#405c36eb;border:2px solid #c9ca93;font-size:13px;padding:8px;box-shadow:0 0 0 4px #172817a8}#toast{position:absolute;top:125px;left:50%;transform:translateX(-50%);background:#20291af2;border:1px solid #bdb583;padding:10px 20px;font-size:13px;max-width:80%;text-align:center;pointer-events:none}dialog{width:min(430px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;background:#19251fea;color:#ecefe4;border:1px solid #a8af8b;border-radius:6px;padding:24px;box-shadow:0 18px 70px #0009}dialog::backdrop{background:#0b160d77}dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}dialog header button{width:38px;min-height:38px;padding:0;font-size:23px}#auth{background:#18251ff5}.auth-title{text-align:center;margin-bottom:26px}.auth-title span{font-size:11px;color:#c4cba8}.auth-title h1{font-family:Georgia,serif;font-size:46px;color:#eee0ac;margin-top:5px}form{display:grid;gap:16px}.form-actions,.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.primary{background:#596843;border-color:#b8bd83;color:#fff7d2}.error{color:#ffaaa0;font-size:13px;min-height:16px}#roles{display:grid;gap:8px;margin:14px 0 20px}#roles button{text-align:left;display:flex;justify-content:space-between}#roles small{color:#d5dcba}#backLogin{margin-top:16px;width:100%}#panelBody{font-size:14px;line-height:1.6}.item-row,.social-row{padding:12px 0;border-bottom:1px solid #52614d;display:flex;align-items:center;justify-content:space-between;gap:10px}.item-row div,.social-row div{min-width:0;overflow-wrap:anywhere}.item-row small,.social-row small{display:block;color:#c1ccae}.item-row button,.social-row button{font-size:12px;padding:6px 9px}.panel-form{margin-top:18px}.panel-form button{width:100%}.section-title{margin-top:18px;margin-bottom:8px;color:#e3cc91;font-size:16px}#dialogText{line-height:1.7;white-space:pre-line;font-size:14px}#dialogChoices{display:grid;gap:9px;margin-top:18px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(max-width:700px){#game{min-height:400px}.hud{padding:10px;gap:10px}.brand{font-size:19px;min-width:88px}.brand span{font-size:10px;max-width:96px}#vitals{width:170px;padding:7px;font-size:12px}.connection{padding:4px;font-size:10px;max-width:96px;flex-wrap:wrap;gap:3px}.connection button{width:28px;min-height:26px}#menu{top:109px;right:10px;max-width:100%;gap:4px}#menu button{font-size:11px;padding:6px 8px;min-height:34px}#target{top:153px;font-size:11px;padding:5px 8px;gap:6px}#targetAction{font-size:11px;padding:6px}#chat{left:10px;bottom:10px;width:calc(100% - 177px);min-width:172px}#messages{height:80px;padding:7px;font-size:10px}#chatText{font-size:11px;padding:9px}#dpad{left:14px;bottom:140px}.actions{right:10px;bottom:15px;gap:6px;display:grid;grid-template-columns:38px 70px}.potion{width:38px;height:38px;font-size:12px}.potion:nth-child(2){grid-column:1}.attack{grid-column:2;grid-row:1/3;width:70px;height:70px;font-size:12px;align-self:end}#toast{top:205px;font-size:12px;width:max-content;max-width:90%;padding:8px 12px}dialog{padding:20px}.auth-title h1{font-size:38px}}
@media(max-height:520px) and (min-width:701px){#menu{top:10px;right:120px;max-width:365px}#target{top:110px}#messages{height:65px}#dpad{bottom:132px}#toast{top:195px}}
#toast{margin:0;bottom:auto;color:#f0f1e9;border-radius:4px}
#chatChannel{width:62px;border:0;border-radius:0;padding:4px;font-size:11px;background:#1d2d22}
@media(min-width:701px) and (min-height:521px){#dpad{bottom:195px}}
#game{min-height:0}
#game{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overscroll-behavior:none}
#game input,#game textarea,#game select,#game [contenteditable=true]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
#scene{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none}
#gameTools{position:absolute;z-index:60;top:6px;right:8px;display:flex;gap:6px;align-items:center;pointer-events:auto}
#gameTools button{min-height:30px;padding:4px 10px;border:1px solid #6f8170;border-radius:4px;background:#16241ccc;color:#eef4e8;font-size:12px;line-height:1.2;touch-action:manipulation}
#gameTools button:hover{background:#294237}
#gameTools button:focus-visible{outline:2px solid #e2d28b;outline-offset:2px}
body.game-fallback-fullscreen #game{position:fixed;z-index:1000;inset:0;width:100vw;height:100dvh;min-height:0}
body.game-fallback-fullscreen #gameTools{position:fixed;top:6px;right:8px}
@media(max-height:520px) and (min-width:701px){.connection{font-size:10px;padding:4px;gap:4px}}
@media(max-height:520px) and (min-width:701px){.hud{padding:10px;gap:10px}.brand{font-size:19px;min-width:100px}.brand span{font-size:10px}#vitals{width:170px;padding:7px;font-size:12px}#menu{top:12px;right:115px;max-width:calc(100% - 420px);gap:4px}#menu button{padding:5px 7px;font-size:11px;min-height:32px}#target{top:110px}#chat{bottom:10px;left:10px;width:270px}#messages{height:55px}#dpad{bottom:120px;left:14px;grid-template-columns:36px 36px 36px;grid-template-rows:36px 36px}#dpad button{min-height:36px;font-size:21px}.actions{bottom:15px}}

.game-asset-tools{position:absolute;z-index:30;top:4px;right:8px;display:flex;gap:4px}#auth .game-asset-tools button{font:12px/1.2 Tahoma,Arial,sans-serif;min-height:32px;padding:6px;background:#123633;border:1px solid #8cae9e;color:#fff}#gameTools{right:128px}@media(max-width:600px){#gameTools{right:100px;top:110px;flex-direction:column;align-items:flex-end}}
.connection-recovery-banner{position:absolute;z-index:900;top:55px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:10px 14px;background:#0b3534;border:2px solid #abd4bf;color:#fff2aa;font:16px/1.4 LDDialog,Tahoma,sans-serif;box-shadow:0 3px 14px #0009}
.connection-recovery-banner[hidden]{display:none}.connection-recovery-banner button{padding:7px 10px;background:#174a49;color:#fff;border:1px solid #b9dbcb;white-space:nowrap;font:inherit;cursor:pointer}.connection-recovery-banner button:focus-visible{outline:2px solid #fff2aa;outline-offset:2px}
@media(max-width:600px){.connection-recovery-banner{top:12px;flex-direction:column;gap:6px;text-align:center;font-size:14px}}
