/* Refined HUD: live values and controls, generated transparent menu assets. */
:root{--slot:44px}
body #game-shell{height:100dvh}
body .hero-hud,body .topbar,body #original-hud,body .zone-title,body .movement-hint,body .training-card,body .hud-utilities{display:none}
/* Original client: font.ini = MS Sans Serif, size 12. The Windows bitmap
   font is not a web asset; use its installed outline counterpart as fallback.
   The simple translucent location frame is recreated in CSS. */
body #map-banner{position:absolute;inset:0 auto auto 50%;transform:translateX(-50%);display:flex;align-items:stretch;width:max-content;max-width:calc(100% - 24px);min-height:26px;margin:0;padding:0;overflow:hidden;border:1px solid #a7a7ab;border-radius:0;background:#15151580;box-shadow:inset 0 0 0 1px #d0d0d02b;color:#c1c100;font:400 16px/24px "MS Sans Serif","Microsoft Sans Serif",Tahoma,sans-serif;letter-spacing:0;text-align:center;text-shadow:1px 1px #292900;white-space:nowrap;z-index:7;pointer-events:none}
body #location-nation{display:block;flex:0 0 auto;min-width:72px;padding:0 8px;border-right:1px solid #a7a7ab;color:#b9b9b9;text-shadow:1px 1px #000}
body #location-nation[data-nation="vyseus"]{color:#0000d4}
body #location-nation[data-nation="zypern"]{color:#e00000}
body #location-nation[data-nation="yllse"]{color:#ded600}
body #location-place{display:flex;justify-content:center;min-width:0;padding:0 12px}
body #location-city{overflow:hidden;text-overflow:ellipsis}
body #location-coordinates{flex:0 0 auto}
body .hud-windows{position:absolute;inset:18px 20px auto auto;display:flex;align-items:center;gap:6px;width:auto;z-index:7;padding:6px;border:1px solid #a38a554a;border-radius:8px;background:linear-gradient(#171a16e8,#0d100edb);box-shadow:0 4px 18px #0005}
body .hud-windows button{position:relative;width:48px;height:49px;flex-shrink:0;display:grid;place-items:center;padding:4px;border:1px solid transparent;border-image:none;border-radius:5px!important;background:transparent;box-shadow:none;color:#d7c39c}
body .hud-windows button:hover,body .hud-windows button[aria-expanded=true]{background:#be9f5725;border-color:#c2a66888}
body .hud-windows img{width:38px;height:38px;object-fit:contain;filter:drop-shadow(0 2px 2px #000);image-rendering:auto}
body .hud-windows kbd{position:absolute;right:2px;bottom:0;font:8px Tahoma;color:#e5d8ba;opacity:.7}
body .resource-hud{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));width:108px;height:113px;z-index:6;pointer-events:none;color:#f6e9d1;text-align:center;filter:drop-shadow(0 3px 5px #0009)}
body .resource-health{left:14px}body .resource-mana{right:14px}
body .resource-hud .orb{position:relative;display:block;width:88px;height:88px;margin:0 auto;border:3px solid #927d52;border-radius:50%;background:radial-gradient(ellipse at 40% 22%,#393027,#0b100d 72%);box-shadow:inset 0 0 0 2px #10130f,0 0 0 1px #151a14,inset 0 0 12px #000c;overflow:hidden}
body .resource-hud .orb:after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(ellipse at 35% 18%,#fff5,transparent 28%,#0002 65%,#0009);box-shadow:inset 0 0 7px #000}
body .resource-hud .orb>div{position:absolute;left:0;bottom:0;top:auto;width:100%!important;height:var(--resource-fill,100%)!important;max-height:100%;border-radius:0;background:radial-gradient(ellipse at 40% 25%,#f04e48,#ad2028 55%,#450b15);transition:height .2s}
body .resource-hud .orb.mana>div{background:radial-gradient(ellipse at 40% 25%,#6bc6f0,#207ebc 55%,#103251)}
body .resource-hud .orb.divine>div{background:radial-gradient(ellipse at 40% 25%,#ade0a6,#438b62 55%,#173b2d)}
body .resource-hud .orb>span{position:absolute;inset:27px 0 auto;font:18px Georgia;color:#ffebd4;text-shadow:0 2px 3px #000;z-index:2}
body .resource-hud .orb strong{position:absolute;inset:auto 0 10px;font:10px Tahoma;color:#fff3df;text-shadow:0 1px 3px #000;z-index:2;white-space:nowrap}
body .resource-hud:after{display:block;margin-top:7px;font:9px Tahoma;letter-spacing:1px;color:#d8c8a6}
body .resource-health:after{content:'HEALTH'}body .resource-mana:after{content:'ENERGY'}
body .adventure-dock{position:absolute;bottom:43px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;max-width:calc(100% - 270px);padding:8px;border:1px solid #a88c574f;border-radius:7px;background:linear-gradient(#20221bd9,#101410ed);box-shadow:0 3px 14px #0006;z-index:6}
body .hotbar,body .quick-items,body #spell-bar{position:static;inset:auto;display:flex;align-items:center;gap:3px;padding:0;margin:0;width:auto;height:auto;max-width:none;transform:none;border:0;border-image:none;background:none;box-shadow:none;pointer-events:auto}
body .hotbar,body .quick-items{padding-right:8px;border-right:1px solid #ba9e5c44}
body .quick-items button,body #spell-bar button,body .hotbar .action-button{position:relative;width:var(--slot);height:var(--slot);min-width:0;flex-shrink:0;display:grid;place-items:center;padding:4px;border:1px solid #9e8b606b;border-image:none;border-radius:4px!important;background:linear-gradient(135deg,#30352b99,#0b100fbb);box-shadow:inset 0 1px #d6c79b0d;color:#85795e;touch-action:manipulation}
body .quick-items button:hover,body #spell-bar button:hover,body .hotbar .action-button:hover{background:#9b875a35;border-color:#dbc08a}
body .quick-items kbd,body #spell-bar kbd,body .hotbar .action-button kbd{position:absolute;display:block;inset:3px auto auto 4px;font:8px Tahoma;color:#cfc5ab;text-shadow:0 1px #000}
body .quick-items small{position:absolute;right:3px;bottom:2px;font:12px Tahoma;color:#fff0ce;text-shadow:0 1px #000}
body .quick-items>button>span{font-size:0}
body #spell-bar img,body .hotbar .action-button img{width:30px;height:30px;object-fit:contain;image-rendering:pixelated}
body .hotbar .action-button small{display:none}body .hotbar .weapon-icon{font-size:26px}body #cooldown:not(:empty){font-size:16px}
body .adventure-progress{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);width:min(730px,calc(100% - 280px));z-index:5;pointer-events:none}
body .hero-experience{display:flex;align-items:center;gap:12px;margin:0;height:14px}
body #hud-exp{flex-shrink:0;min-width:100px;font:10px Tahoma;color:#e0d2b2;text-shadow:0 1px 3px #000;text-align:left}
body .hero-experience .bar{flex:1;height:5px;margin:0;border:1px solid #ab925b80;border-radius:3px;background:#101712de;box-shadow:0 1px 3px #0006;overflow:hidden}
body .hero-experience .bar>div{background:linear-gradient(90deg,#987b42,#e2c88d);height:100%}body .adventure-progress #hud-tactics{display:none}
body .map-widget{top:92px;right:20px;width:222px;padding:8px 8px 0;overflow:hidden;pointer-events:auto;border:1px solid #a98b50;border-radius:4px;background:#151912ed;box-shadow:0 3px 10px #0006;border-image:none}
body .map-widget canvas{width:204px;height:142px;border-radius:0;opacity:1;transition:transform .15s;pointer-events:none}
body .map-widget>.minimap-controls{position:absolute;top:12px;right:12px;display:flex;flex-direction:column;gap:5px;margin:0}
body .minimap-controls button{width:28px;height:29px;font:22px Georgia;border:1px solid #a98d55;background:#1b2119ed;color:#e6c992;border-radius:3px}
body .map-widget>.minimap-caption{position:relative;display:flex;justify-content:space-between;gap:5px;margin:0;padding:6px 0;background:#151912;color:#e0cda4;letter-spacing:0}
body .map-widget .minimap-caption span{font:11px Tahoma}body #map-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body #coords{flex-shrink:0}
body #spell-buffs{top:20px;left:20px}body #spell-casting{bottom:124px}body #toast{z-index:12;top:110px;max-width:calc(100% - 28px);white-space:normal}
body .original-window .top-actions,body .original-window .hud-utilities{position:static;inset:auto;display:flex;gap:10px;flex-wrap:wrap;width:auto;height:auto;padding:16px;background:none}
body .original-window .top-actions button,body .original-window .hud-utilities button{min-width:44px;min-height:40px;background:#262d23;border:1px solid #9a8658;color:#ead8ae;font:14px Tahoma}
body .original-window .top-actions input{accent-color:#b69a64;max-width:100px}
/* System controls have their own layout; toolbar icon sizes must not constrain labels. */
body #aux-window[data-kind="system"]{inset:20px 20px auto auto;width:min(480px,calc(100% - 24px));max-width:none;max-height:calc(100% - 40px);overflow:auto}
body #aux-window[data-kind="system"] .panel-heading{min-height:78px;padding:16px 22px}
body #aux-window[data-kind="system"] .panel-heading h2{font-size:23px}
body #aux-window[data-kind="system"] #aux-body{padding:6px 22px 22px}
body #aux-window[data-kind="system"] .top-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:0;margin:0}
body #aux-window[data-kind="system"] .system-section{min-width:0;padding:16px 0;border-bottom:1px solid #b69a642b}
body #aux-window[data-kind="system"] .system-section:last-child{border-bottom:0}
body #aux-window[data-kind="system"] .system-section h3{margin:0 0 10px;color:#c5a46a;font:700 12px/1.5 Tahoma,sans-serif;letter-spacing:.4px}
body #aux-window[data-kind="system"] .system-section-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
body #aux-window[data-kind="system"] .system-section-controls>*{grid-column:auto;grid-row:auto}
body #aux-window[data-kind="system"] :is(.system-character,.system-help) .system-section-controls{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
body #aux-window[data-kind="system"] .top-actions button{box-sizing:border-box;width:auto;height:auto;min-width:0;max-width:none;min-height:44px;margin:0;padding:10px 8px;border:1px solid #8f79534d;border-radius:4px!important;background:linear-gradient(135deg,#29383c,#19252b);color:#e9dcc1;font:400 14px/1.5 Tahoma,sans-serif;white-space:normal;overflow-wrap:normal;word-break:normal;box-shadow:inset 0 1px #ffffff06}
body #aux-window[data-kind="system"] .top-actions button:hover{border-color:#c5a46a;background:linear-gradient(135deg,#394849,#26353a)}
body #aux-window[data-kind="system"] .top-actions button:focus-visible{outline:2px solid #e0c58f;outline-offset:2px}
body #aux-window[data-kind="system"] :is(.system-row,.weather-option){box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:6px 6px 6px 14px;border:1px solid #8f795326;border-radius:4px;background:#ffffff05;font:14px/1.5 Tahoma,sans-serif;color:#e9dcc1}
body #aux-window[data-kind="system"] .top-actions .system-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:6px 14px;text-align:left}
body #aux-window[data-kind="system"] .system-row-label{display:flex;flex-direction:column;min-width:0}
body #aux-window[data-kind="system"] .system-row-label small{color:#8f9893;font-size:11px;line-height:1.4}
body #aux-window[data-kind="system"] .system-switch{position:relative;flex:none;width:40px;height:22px;border-radius:11px;background:#0f171b;border:1px solid #8f795380;transition:background .15s}
body #aux-window[data-kind="system"] .system-switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#8f9893;transition:transform .15s,background .15s}
body #aux-window[data-kind="system"] .top-actions .system-toggle:is([aria-pressed="true"],[aria-expanded="true"]){border-color:#b69a64;background:linear-gradient(135deg,#3a3a2c,#222a27);color:#f7db9b}
body #aux-window[data-kind="system"] :is([aria-pressed="true"],[aria-expanded="true"])>.system-switch{background:#7a6438;border-color:#e0c58f}
body #aux-window[data-kind="system"] :is([aria-pressed="true"],[aria-expanded="true"])>.system-switch:after{transform:translateX(18px);background:#f7db9b}
body #aux-window[data-kind="system"] .top-actions #mode-button{flex:none;min-width:88px;min-height:38px;padding:6px 14px;border-color:#b69a64;color:#f7db9b}
body #aux-window[data-kind="system"] .system-volume-row{gap:14px;padding-right:14px}
body #aux-window[data-kind="system"] .system-volume-label{flex:none}
body #aux-window[data-kind="system"] #system-volume{flex:1;width:auto;max-width:none;min-width:0;height:28px;margin:0;cursor:pointer;accent-color:#b69a64}
body #aux-window[data-kind="system"] #system-volume:disabled{opacity:.4;cursor:not-allowed}
body #aux-window[data-kind="system"] output{flex:none;width:40px;font:12px Tahoma;color:#e0c58f;text-align:right;font-variant-numeric:tabular-nums}
body #aux-window[data-kind="system"] .weather-option select{box-sizing:border-box;min-width:140px;min-height:38px;padding:6px 10px;background:#19252b;color:#ead8ae;border:1px solid #8f795380;border-radius:4px;font:14px Tahoma}
@media(max-width:600px){body #aux-window[data-kind="system"]{inset:12px 12px auto;width:calc(100% - 24px);max-height:calc(100% - 24px)}body #aux-window[data-kind="system"] #aux-body{padding-inline:16px}}
body .training-card.adventure-training-open{display:block;top:100px;right:20px;left:auto;bottom:auto;width:215px;max-height:calc(100% - 240px);overflow:auto;z-index:8;background:#171e16f5;border-image:none}
@media(max-width:1100px){:root{--slot:36px}body .adventure-dock{gap:5px;padding:6px;max-width:calc(100% - 230px)}body .hotbar,body .quick-items{padding-right:5px}body .resource-hud{width:90px;height:98px}body .resource-hud .orb{width:76px;height:76px}body .resource-hud .orb>span{top:20px;font-size:16px}body .resource-hud .orb strong{font-size:9px}body .hud-windows button{width:42px;height:43px}body .hud-windows img{width:34px;height:34px}}
@media(max-width:850px){:root{--slot:32px}body .adventure-dock{bottom:51px;max-width:calc(100% - 190px);flex-wrap:wrap;justify-content:center;row-gap:5px}body .adventure-progress{width:calc(100% - 210px);bottom:25px}body .resource-health{left:6px}body .resource-mana{right:6px}body .resource-hud{bottom:8px}body #hud-exp{min-width:90px;font-size:9px}body .hotbar .action-button img,body #spell-bar img{width:24px;height:24px}body .quick-items .real-icon{transform:scale(.85)}body .hud-windows{top:12px;right:12px;gap:3px;padding:4px}body .hud-windows button{width:35px;height:37px}body .hud-windows img{width:29px;height:29px}}
@media(max-width:600px){:root{--slot:34px}body .hud-windows{left:auto;right:10px;top:10px;gap:1px;padding:3px}body .hud-windows button{width:34px;height:37px}body .hud-windows img{width:29px;height:29px}body .adventure-dock{left:50%;bottom:109px;max-width:calc(100% - 20px);width:max-content;padding:6px;gap:6px;row-gap:7px}body .hotbar,body .quick-items,body #spell-bar{gap:3px}body #spell-bar{flex-basis:100%;justify-content:center;padding-top:6px;border-top:1px solid #aa925a33}body .quick-items{border:0;padding-right:0}body .adventure-progress{bottom:36px;width:calc(100% - 192px)}body .hero-experience{flex-direction:column;gap:5px;height:auto}body #hud-exp{text-align:center;min-width:0;font-size:9px}body .hero-experience .bar{width:100%;flex:none;height:5px}body .resource-hud{width:90px;height:92px;bottom:max(5px,env(safe-area-inset-bottom))}body .resource-hud .orb{width:72px;height:72px}body .resource-hud .orb>span{top:19px;font-size:16px}body .resource-hud .orb strong{font-size:8px;bottom:9px}body .resource-hud:after{font-size:8px;margin-top:5px}body #joystick{bottom:215px;left:18px;width:90px;height:90px}body #spell-buffs{top:64px;left:12px}body #spell-casting{bottom:207px;font-size:11px;max-width:90%}body #toast{top:82px;bottom:auto}body .map-widget{top:64px;right:12px;width:170px}body .map-widget canvas{width:152px;height:105px}body .map-widget .minimap-caption span{font-size:9px}}
@media(max-width:360px){:root{--slot:31px}body .hud-windows button{width:30px;height:34px}body .hud-windows img{width:27px;height:27px}body .adventure-dock{gap:4px;padding:5px}body .resource-hud{width:80px}body .resource-hud .orb{width:66px;height:66px}body .adventure-progress{width:calc(100% - 170px)}}
@media(max-height:500px) and (min-width:601px){:root{--slot:31px}body .resource-hud{height:88px;bottom:4px}body .resource-hud .orb{width:68px;height:68px}body .adventure-dock{bottom:36px}body .adventure-progress{bottom:12px}body .hud-windows{top:8px}body #joystick{bottom:108px}body .map-widget{top:70px;width:160px}body .map-widget canvas{width:142px;height:85px}}
@media(prefers-reduced-motion:reduce){body .resource-hud .orb>div,body .map-widget canvas{transition:none}}
/* Keep the menu below the location strip when horizontal space is limited. */
@media(max-width:1250px){body .hud-windows{top:42px}}
@media(max-width:600px){body #map-banner{font-size:13px;line-height:22px;min-height:24px}body #location-nation{min-width:60px;padding:0 6px}body #location-place{padding:0 8px}body .hud-windows{top:34px}}
