/* Kheldra HUD: dark-fantasy frames (worn gold on near-black) for the in-game overlay.
   Selectors are prefixed with `html body` so they win over the older inline HUD rules. */
:root{--k-gold:#b9954f;--k-gold-hi:#ebd391;--k-gold-lo:#6e5a35;--k-ink:#0a0f0d;--k-panel:#111a16;--k-text:#eadfc4;--k-muted:#9d9680}

/* ---- Character frame (built by hud.js) --------------------------------- */
html body #kPlayerFrame{position:absolute;left:14px;top:14px;z-index:9;display:flex;align-items:center;gap:12px;padding:6px 18px 6px 6px;pointer-events:none;
 background:linear-gradient(180deg,#16211cf2,#0a0f0df5);border:1px solid var(--k-gold);border-radius:48px 14px 14px 48px;
 box-shadow:0 8px 20px #000b,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39122}
html body #kPlayerFrame[hidden]{display:none}
html body .k-portrait{position:relative;flex:none;width:66px;height:66px;border-radius:50%;border:3px solid var(--k-gold);
 background:#0a0f0d url(/assets/hero.webp) 50% 6%/240% no-repeat;box-shadow:0 0 0 2px #000,inset 0 0 14px #000c}
html body .k-level{position:absolute;right:-8px;bottom:-5px;min-width:26px;height:26px;padding:0 3px;box-sizing:border-box;border-radius:13px;
 background:#1b1309;border:2px solid var(--k-gold);color:var(--k-gold-hi);font:700 13px/22px Grenze Gotisch,Georgia,serif;text-align:center}
html body .k-level[hidden]{display:none}
html body .k-bars{display:grid;gap:4px;width:min(216px,38vw)}
html body .k-name{font:700 14.5px/1.1 Grenze Gotisch,Georgia,serif;letter-spacing:.05em;color:var(--k-gold-hi);text-transform:capitalize;text-shadow:0 1px 2px #000}
html body .k-bar{position:relative;height:15px;border-radius:3px;background:#070908;border:1px solid #000;box-shadow:0 0 0 1px #5d4a2a;overflow:hidden}
html body .k-bar i{position:absolute;inset:0 auto 0 0;width:100%;transition:width .25s}
html body .k-bar.hp i{background:linear-gradient(#e24c4f,#a02024 55%,#6b1215)}
html body .k-bar.mp i{background:linear-gradient(#5199f2,#2559b8 55%,#173b82)}
html body .k-bar.sp i{background:linear-gradient(#ebc258,#b98a25 55%,#7f5b14)}
html body .k-bar b{position:relative;display:block;text-align:center;font:700 11.5px/15px Grenze Gotisch,Georgia,serif;color:#fff;text-shadow:0 1px 2px #000}

/* Retire the plain text readouts the frame replaces. */
html body #hudVitals,html body #worldSystemSummary{display:none!important}

/* ---- Top controls ------------------------------------------------------- */
html body .hud-top{justify-content:flex-end;pointer-events:none}
html body .hud-top>*{pointer-events:auto}
html body #hudContextToggle{background:#0e1613d9;border:1px solid var(--k-gold-lo);border-radius:6px;color:var(--k-gold-hi);font:600 12px Grenze Gotisch,Georgia,serif;padding:5px 10px;min-height:0}
html body #hudMenuToggle{border:1px solid var(--k-gold);border-radius:10px;background:linear-gradient(#18231e,#0b100e);box-shadow:0 4px 12px #000a,inset 0 0 0 1px #000;color:var(--k-gold-hi)}

/* ---- Hotbar ------------------------------------------------------------- */
/* Space the floating panels above the desktop hotbar need: its 6px bottom inset, about 42px of bar (compact slots), and an 8px margin. */
:root{--k-hotbar-clear:56px}
html body .hud-bottom{gap:5px;padding:7px 9px;border:1px solid var(--k-gold);border-radius:10px;
 background:linear-gradient(180deg,#141e19f2,#090d0bf5);box-shadow:0 10px 24px #000c,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39120}
html body .hud-bottom .hud-action{border:1px solid var(--k-gold-lo);border-radius:6px;background-color:#0b100e;
 background-image:var(--hud-sprite),radial-gradient(circle at 50% 30%,#26332c,#0b100e 78%);background-repeat:no-repeat;background-position:center;background-size:70% auto,cover;
 box-shadow:inset 0 0 0 1px #000,inset 0 -10px 14px #0008}
html body .hud-bottom .hud-action:hover:not(:disabled){border-color:var(--k-gold-hi);filter:brightness(1.18)}
html body .hud-bottom .hud-action[aria-pressed="true"]{border-color:var(--k-gold-hi);box-shadow:0 0 0 2px #ebd39166,inset 0 0 12px #ebd39133}
/* Names live in the tooltip; the 10px captions were clipped ("Attack se"). */
html body .hud-bottom .hud-action .hud-caption{display:none}
html body .hud-bottom .hud-action .hud-key{top:2px;left:4px;padding:0 3px;border-radius:3px;background:#000b;color:var(--k-gold-hi);font:700 11px/14px Grenze Gotisch,Georgia,serif}

/* ---- Menu dock ---------------------------------------------------------- */
html body #mmorpgUtilities{right:14px;top:292px;bottom:auto;max-width:none;display:grid;grid-template-columns:repeat(2,58px);gap:5px;padding:7px;
 background:linear-gradient(180deg,#141e19ee,#090d0bf2);border:1px solid var(--k-gold);border-radius:10px;
 box-shadow:0 10px 24px #000b,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39120}
html body #mmorpgUtilities button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:2px;
 width:58px;min-height:54px;margin:0;padding:30px 2px 4px;box-sizing:border-box;border:1px solid var(--k-gold-lo);border-radius:6px;
 background:radial-gradient(circle at 50% 28%,#26332c,#0b100e 80%);box-shadow:inset 0 0 0 1px #000;color:var(--k-text);
 font:600 11px/1.1 Grenze Gotisch,Georgia,serif;text-align:center;overflow:hidden;white-space:normal}
html body #mmorpgUtilities button::before{content:"";position:absolute;top:4px;left:50%;width:24px;height:24px;margin-left:-12px;
 background:var(--k-icon,none) center/contain no-repeat;opacity:.95}
html body #mmorpgUtilities button:hover{border-color:var(--k-gold-hi);filter:brightness(1.18)}
html body #mmorpgUtilities button:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:1px}
html body #mmorpgCharacter{--k-icon:url(/assets/generated/art-pack/ui/backpack_button.png)}
html body #mmorpgJournal{--k-icon:url(/assets/generated/art-pack/ui/quest_button.png)}
html body #mmorpgTown{--k-icon:url(/assets/generated/hud-glyphs/map-compass.svg)}
html body #mmorpgSettingsButton{--k-icon:url(/assets/generated/hud-glyphs/settings-cog.svg)}
html body #kheldraWorldLogout{--k-icon:url(/assets/generated/hud-glyphs/logout-door.svg)}
html body #mmorpgShops{--k-icon:url(/assets/generated/hud-glyphs/guild-crest.svg)}
html body #mmorpgSpellbookButton{--k-icon:url(/assets/generated/art-pack/ui/spell_button.png)}
html body #mmorpgGearButton{--k-icon:url(/assets/generated/art-pack/ui/gear_button.png)}
html body #kheldraSwitchCharacter{--k-icon:url(/assets/generated/hud-glyphs/party-banner.svg)}
html body #mmorpgHotbarButton{--k-icon:url(/assets/generated/combat-hud-actions/target-reticle.svg)}
html body #mmorpgLegacyButton{--k-icon:url(/assets/generated/combat-hud-actions/zoom-lens.svg)}

/* ---- Minimap and position ----------------------------------------------- */
html body #mmorpgMinimap{border:3px solid var(--k-gold);background:#0a0f0d;
 box-shadow:0 0 0 2px #000,0 10px 22px #000b,inset 0 0 0 2px #000,inset 0 0 22px #000a}
html body #mmorpgZone{background:linear-gradient(180deg,#141e19ee,#090d0bf2);border:1px solid var(--k-gold);color:var(--k-gold-hi);
 font:700 13px Grenze Gotisch,Georgia,serif;box-shadow:0 4px 12px #000a,inset 0 0 0 1px #000}

@media (max-width:760px){
 html body #mmorpgUtilities{grid-template-columns:repeat(2,52px);top:270px}
 html body #mmorpgUtilities button{width:52px}
 html body #kPlayerFrame{left:8px;top:8px}
 html body .k-portrait{width:54px;height:54px}
 html body .k-bars{width:min(170px,44vw)}
}
@media (prefers-reduced-motion:reduce){html body .k-bar i{transition:none}}

/* ---- Death and level-up screens ----------------------------------------- */
html body #gameSplash{background:radial-gradient(ellipse at center,#0c0806c8 0%,#040302f4 78%)}
html body #gameSplash>div{position:relative;max-width:min(94vw,640px);padding:2.4rem 2rem!important;border-radius:0;background:none!important}
html body #gameSplash>div::before,html body #gameSplash>div::after{content:"";display:block;width:min(440px,72%);height:2px;margin:0 auto;
 background:linear-gradient(90deg,transparent,var(--k-gold),transparent)}
html body #gameSplash>div::before{margin-bottom:1.1rem}
html body #gameSplash>div::after{margin-top:1.1rem}
html body #gameSplash strong{font-family:Grenze Gotisch,Georgia,serif;letter-spacing:.14em;font-weight:700}
html body #gameSplash p{margin:.6rem 0 0;color:#d9cdb0;letter-spacing:.04em}
html body #gameSplash[data-kind="death"]{background:radial-gradient(ellipse at center,#3b0d10cc 0%,#0b0304f5 80%)}
html body #gameSplash[data-kind="death"] strong{color:#e2766c;text-shadow:0 0 28px #b3201c99,0 3px 14px #000}
html body #gameSplash[data-kind="level"]{background:radial-gradient(ellipse at center,#4f3a12b8 0%,#080602f2 76%)}
html body #gameSplash[data-kind="level"] strong{color:var(--k-gold-hi);text-shadow:0 0 30px #e0b04e99,0 3px 14px #000}
html body #gameSplash[data-kind="level"]::before{content:"";position:absolute;inset:-30%;pointer-events:none;opacity:.55;
 background:repeating-conic-gradient(from 0deg,#ebd39124 0 5deg,transparent 5deg 12deg);
 -webkit-mask:radial-gradient(circle,#000 0,transparent 62%);mask:radial-gradient(circle,#000 0,transparent 62%);animation:k-rays 24s linear infinite}
@keyframes k-rays{to{transform:rotate(360deg)}}
html body #gameSplash>div{z-index:1}
/* While dead the screen takes the click so the recovery buttons work. */
html body #gameSplash[data-kind="death"][data-visible="true"]{pointer-events:auto}
html body .k-splash-actions{display:none;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:1.4rem}
html body #gameSplash[data-kind="death"] .k-splash-actions{display:flex}
html body .k-splash-actions button{min-width:150px;min-height:42px;padding:8px 18px;border:1px solid var(--k-gold);border-radius:6px;cursor:pointer;
 background:linear-gradient(#3a1517,#1b0a0b);color:var(--k-gold-hi);font:700 14.5px Grenze Gotisch,Georgia,serif;letter-spacing:.06em}
html body .k-splash-actions button:hover{filter:brightness(1.25)}
html body .k-splash-actions button:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:2px}
@media (prefers-reduced-motion:reduce){html body #gameSplash[data-kind="level"]::before{animation:none}}
html body #gameSplash[data-kind="death"]{-webkit-backdrop-filter:grayscale(.85) blur(1.5px);backdrop-filter:grayscale(.85) blur(1.5px)}
html body #gameSplash[data-kind="level"]{-webkit-backdrop-filter:saturate(1.25) brightness(1.08);backdrop-filter:saturate(1.25) brightness(1.08)}


/* ==========================================================================
   Gold-framed modal windows (#mmorpgWindow): ornate double frame, corner
   brackets (CSS only), gold tab strips, red X close, thin gold scrollbars.
   ========================================================================== */
#mmorpgOverlay[data-open="true"] #mmorpgWindow{position:absolute;isolation:isolate;
 border:3px double var(--k-gold);box-shadow:0 24px 90px #000d,inset 0 0 0 1px #000,inset 0 0 0 4px #0a0f0d,inset 0 0 0 5px #6e5a3577}
#mmorpgOverlay[data-open="true"] #mmorpgWindow::before,
#mmorpgOverlay[data-open="true"] #mmorpgWindow::after{content:"";position:absolute;width:26px;height:26px;pointer-events:none;z-index:2;
 border:0 solid var(--k-gold-hi);opacity:.9}
#mmorpgOverlay[data-open="true"] #mmorpgWindow::before{top:6px;left:6px;border-top-width:2px;border-left-width:2px;border-top-left-radius:8px}
#mmorpgOverlay[data-open="true"] #mmorpgWindow::after{bottom:6px;right:6px;border-bottom-width:2px;border-right-width:2px;border-bottom-right-radius:8px}
#mmorpgOverlay[data-open="true"] #mmorpgWindow .corner-tr,
#mmorpgOverlay[data-open="true"] #mmorpgWindow .corner-bl{position:absolute;width:26px;height:26px;pointer-events:none;z-index:2}
#mmorpgOverlay #mmorpgWindowHeader{background:linear-gradient(180deg,#1a2620,#0b100e);border-bottom:1px solid var(--k-gold);
 box-shadow:inset 0 -2px 0 #000,inset 0 -3px 0 #ebd39122;font-family:Grenze Gotisch,Georgia,serif}
html body #mmorpgOverlay #mmorpgWindowTitle{font:700 17.5px/1.2 Grenze Gotisch,Georgia,serif;letter-spacing:.08em;color:var(--k-gold-hi);text-shadow:0 1px 2px #000}
html body #mmorpgOverlay #mmorpgClose{border:1px solid #8a2a24;border-radius:50%;background:radial-gradient(circle,#5a1a17,#2a0b0a);color:#f3d6c8;box-shadow:inset 0 0 0 1px #000}
html body #mmorpgOverlay #mmorpgClose:hover{border-color:#e2766c;background:radial-gradient(circle,#8a2a24,#3a0f0d)}
html body #mmorpgOverlay #mmorpgClose:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:2px}

/* Tab strips: gold underline on the active tab. */
#mmorpgOverlay [role="tablist"]{display:flex;gap:4px;border-bottom:1px solid var(--k-gold-lo);padding:0 6px;overflow-x:auto;scrollbar-width:thin}
#mmorpgOverlay [role="tab"]{min-height:44px;margin:0;padding:8px 14px;border:1px solid var(--k-gold-lo);border-bottom:0;border-radius:6px 6px 0 0;
 background:linear-gradient(#1b2822,#0b100e);color:var(--k-muted);font:700 14.5px/1.1 Grenze Gotisch,Georgia,serif;letter-spacing:.04em;white-space:nowrap;cursor:pointer}
#mmorpgOverlay [role="tab"][aria-selected="true"]{color:var(--k-gold-hi);border-color:var(--k-gold);background:linear-gradient(#2a3a30,#12191500);box-shadow:inset 0 -3px 0 var(--k-gold-hi)}
#mmorpgOverlay [role="tab"]:hover{color:var(--k-gold-hi);filter:brightness(1.15)}
#mmorpgOverlay [role="tab"]:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:2px}

/* Thin gold-on-dark scrollbars inside modal windows. */
#mmorpgOverlay *{scrollbar-width:thin;scrollbar-color:var(--k-gold-lo) #070908}
#mmorpgOverlay ::-webkit-scrollbar{width:8px;height:8px}
#mmorpgOverlay ::-webkit-scrollbar-track{background:#070908}
#mmorpgOverlay ::-webkit-scrollbar-thumb{background:var(--k-gold-lo);border-radius:4px;border:1px solid #000}
#mmorpgOverlay ::-webkit-scrollbar-thumb:hover{background:var(--k-gold)}

/* ---- Town services and bank panels -------------------------------------- */
html body .town-service-panel,html body .bank-panel{background:linear-gradient(180deg,#16211cf7,#0a0f0df8);color:var(--k-text);
 border:1px solid var(--k-gold);border-radius:10px;box-shadow:0 10px 24px #000c,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39120;scrollbar-width:thin;scrollbar-color:var(--k-gold-lo) #070908}
html body .town-service-panel h2,html body .bank-panel h2{font:700 16.5px/1.2 Grenze Gotisch,Georgia,serif;letter-spacing:.06em;color:var(--k-gold-hi);
 margin:0 0 8px;padding-bottom:6px;border-bottom:1px solid var(--k-gold-lo)}
html body .town-service-panel a,html body .bank-panel a{color:var(--k-gold-hi)}
html body .town-service-panel button,html body .bank-panel button{min-height:44px;border:1px solid var(--k-gold-lo);border-radius:6px;
 background:linear-gradient(#1b2822,#0b100e);color:var(--k-gold-hi);font:700 14.5px Grenze Gotisch,Georgia,serif;cursor:pointer}
html body .town-service-panel button:focus-visible,html body .bank-panel button:focus-visible,html body .town-service-panel a:focus-visible,html body .bank-panel a:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:2px}

/* ---- Target health (#mmorpgTarget) -------------------------------------- */
html body #mmorpgTarget{border:1px solid var(--k-gold);border-radius:10px;background:linear-gradient(180deg,#16211cf2,#0a0f0df5);
 box-shadow:0 8px 20px #000b,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39120;padding:8px 12px}
html body #mmorpgTarget{touch-action:none}
html body #mmorpgTargetHeader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 6px;flex:0 0 auto;cursor:grab}
html body #mmorpgTargetName{font:700 clamp(12px,7cqw,22px)/1.2 Grenze Gotisch,Georgia,serif;letter-spacing:.05em;color:var(--k-gold-hi);text-shadow:0 1px 2px #000}
html body #mmorpgTargetHealth{position:relative;flex:1 1 auto;min-height:10px;max-height:48px;height:12px;margin-top:6px;background:#070908;border:1px solid #000;border-radius:3px;
 box-shadow:0 0 0 1px #5d4a2a;overflow:hidden}
html body #mmorpgTargetFill{height:100%;background:linear-gradient(#e24c4f,#a02024 55%,#6b1215);transition:width .25s}
@media (prefers-reduced-motion:reduce){html body #mmorpgTargetFill{transition:none}}

/* ---- Chat and quest HUD panels ------------------------------------------ */
html body #mmorpgChat,html body #mmorpgQuest{border:1px solid var(--k-gold);border-radius:10px;
 background:linear-gradient(180deg,#141e19ee,#090d0bf2);box-shadow:0 8px 18px #000b,inset 0 0 0 1px #000,inset 0 0 0 2px #ebd39118}
html body #mmorpgQuest{border-left:1px solid var(--k-gold)}
html body #mmorpgChat strong,html body #mmorpgQuest strong{font-family:Grenze Gotisch,Georgia,serif;color:var(--k-gold-hi);letter-spacing:.05em}
html body #mmorpgChatLines{scrollbar-width:thin;scrollbar-color:var(--k-gold-lo) #070908;color:var(--k-text)}
html body #mmorpgQuest button,html body #mmorpgChat button{min-height:44px;border:1px solid var(--k-gold-lo);border-radius:6px;background:linear-gradient(#1b2822,#0b100e);color:var(--k-gold-hi)}
html body #mmorpgQuest button:focus-visible,html body #mmorpgChat button:focus-visible,html body #mmorpgCommandInput:focus-visible{outline:2px solid var(--k-gold-hi);outline-offset:2px}

/* ---- Phone layout (<=560px) --------------------------------------------- */
@media (max-width:560px){
 #mmorpgOverlay[data-open="true"] #mmorpgWindow{border-width:2px;border-radius:8px}
 #mmorpgOverlay[data-open="true"] #mmorpgWindow::before,
 #mmorpgOverlay[data-open="true"] #mmorpgWindow::after{width:16px;height:16px}
 html body .town-service-panel,html body .bank-panel{left:8px;right:8px;width:auto;max-height:60%}
 html body #mmorpgTarget{max-width:calc(100vw - 16px)}
 html body #mmorpgOverlay [role="tab"]{padding:8px 10px}
}
@media (prefers-reduced-motion:reduce){#mmorpgOverlay *{transition:none!important;animation:none!important}}

/* World context menu (right-click) */
#worldContextMenu{position:fixed;z-index:calc(var(--z-popover,100000) + 3);min-width:190px;padding:5px;background:#101d18;border:1px solid #b49a6a;border-radius:8px;box-shadow:0 12px 30px #000c;display:flex;flex-direction:column;gap:2px}
#worldContextMenu .menu-head{padding:5px 9px 6px;color:#f0d59c;font:700 13px Grenze Gotisch,Georgia,serif;border-bottom:1px solid #b49a6a40;margin-bottom:3px}
#worldContextMenu button{margin:0;text-align:left;padding:6px 10px;min-height:28px;background:transparent;border:0;border-radius:5px;color:#f4e6c8;font:14.5px Grenze Gotisch,Georgia,serif;cursor:pointer}
#worldContextMenu button:hover:not(:disabled),#worldContextMenu button:focus-visible{background:#2d4a3a;outline:none}
#worldContextMenu .menu-head small{display:block;font:500 13px Grenze Gotisch,Georgia,serif;color:#cdbb94}
#worldContextMenu .menu-group{display:flex;justify-content:space-between;align-items:center;gap:14px}
#worldContextMenu .menu-group[aria-expanded=true]{background:#24402f}
#worldContextMenu .menu-sub{position:fixed;z-index:100004;min-width:180px;padding:5px;background:#101d18;border:1px solid #b49a6a;border-radius:8px;box-shadow:0 12px 30px #000c;flex-direction:column;gap:2px}
#worldContextMenu .menu-sub[style*="block"]{display:flex!important}
#worldContextMenu .menu-acc{padding-left:14px;border-left:2px solid #b49a6a60;margin-left:8px;flex-direction:column;gap:2px}
#worldContextMenu .menu-acc[hidden]{display:none!important}
#worldContextMenu .menu-sub button,#worldContextMenu .menu-acc button{display:block;width:100%}
@media (pointer:coarse),(max-width:600px){html body #worldContextMenu button{min-height:44px;font-size:15px}html body #worldContextMenu{min-width:min(260px,calc(100vw - 16px))}}
#worldHoverLabel{position:fixed;left:10px;top:10px;z-index:var(--z-world-label,12);pointer-events:none;padding:3px 8px;background:#101d18d9;border:1px solid #b49a6a80;border-radius:5px;color:#f4e6c8;font:600 14.5px Grenze Gotisch,Georgia,serif;display:none}
#worldHoverLabel.wn-tip{padding:6px 10px;max-width:min(280px,calc(100vw - 16px))}
#worldHoverLabel .wn-tip-row{display:block;font-size:13.5px;font-weight:500;color:#b9c4b8}
#worldHoverLabel .wn-tip-row[data-tone="good"]{color:#7fd487}#worldHoverLabel .wn-tip-row[data-tone="bad"]{color:#f08a7a}
#worldHoverLabel b{color:#f0d59c;font-weight:700}#worldHoverLabel i{color:#9fb7a8;font-style:normal;margin-left:6px}

/* ---- Instant tooltip ---------------------------------------------------- */
html body #kTip{position:fixed;z-index:calc(var(--z-popover,100000) + 3);pointer-events:none;max-width:260px;padding:6px 10px;background:#0f1c17f5;
 border:1px solid var(--k-gold);border-radius:6px;box-shadow:0 8px 18px #000b,inset 0 0 0 1px #0008;color:var(--k-text);
 font:14px/1.4 Grenze Gotisch,Georgia,serif;white-space:pre-line}
html body #kTip[hidden]{display:none}

/* Short windows: use three columns so the menu dock never runs off the bottom. */
@media (max-height:720px){
 html body #mmorpgUtilities{grid-template-columns:repeat(3,58px);top:236px}
}

/* K1-003: phone landscape (about 390px high). The dock starts collapsed (touch.js). Opened, it sits in the free band between the top HUD and the
   hotbar, left of the minimap column (right:160px), and scrolls inside itself, so it no longer runs to y=581 over the hotbar and the touch buttons.
   Its slide-away tab follows the dock rect (hud.js), so it stays attached to the dock's left edge. */
@media (max-height:520px){
 html body #mmorpgUtilities{top:64px!important;right:160px!important;bottom:auto!important;grid-template-columns:repeat(5,58px)!important;max-height:calc(100vh - 224px)!important;max-height:calc(100dvh - 224px)!important;overflow-y:auto;overscroll-behavior:contain}
 html body #mmorpgUtilities.k-dock-hidden{display:none!important}
}

/* Location box: "My Location:" label over the coordinates instead of a diamond glyph. */
html body #mmorpgZone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;text-align:center;line-height:1.15}
html body #mmorpgZone .k-zone-label{font:600 11px Grenze Gotisch,Georgia,serif;letter-spacing:.06em;text-transform:uppercase;color:var(--k-muted,#9d9680)}
html body #mmorpgZone #mmorpgCoordinates{font:700 16.5px Grenze Gotisch,Georgia,serif;font-variant-numeric:tabular-nums;color:var(--k-gold-hi,#ebd391)}
/* Slide-away dock */
html body #mmorpgUtilities{transition:transform .22s ease}
html body #mmorpgUtilities.k-dock-hidden{transform:translateX(calc(100% + 24px));pointer-events:none}
html body #kDockToggle{position:fixed;z-index:30;width:22px;height:48px;padding:0;border:1px solid var(--k-gold-lo,#6e5a35);border-right:0;border-radius:8px 0 0 8px;background:linear-gradient(180deg,#1b2822,#0b100e);color:var(--k-gold-hi,#ebd391);font:700 20px/46px Grenze Gotisch,Georgia,serif;cursor:pointer;transition:right .22s ease,top .22s ease}
html body #kDockToggle:hover{filter:brightness(1.3)}
html body .k-bar.xp i{background:linear-gradient(#b48cf0,#7a4fc4 55%,#4e2d8a)}
html body .k-bar.xp{height:14px!important;min-height:0}
html body .k-bar.xp b{font-size:11px!important;line-height:14px!important}
html body .k-bar.xp[hidden]{display:none}

/* Target frame: sits under the minimap; the zone and nearby panels step down by --k-target-push (set by window-frame) while it is there. */
html body #mmorpgZone,html body #kheldraNearbyPanel{margin-top:var(--k-target-push,0px)!important}
/* Shared frame edge/corner resize handles (window-frame.js, opt-in with data-wf-edges). */
.k-wf-h{position:absolute;z-index:2;touch-action:none;background:transparent}
.k-wf-h[data-edge=n],.k-wf-h[data-edge=s]{left:12px;right:12px;height:8px;cursor:ns-resize}
.k-wf-h[data-edge=e],.k-wf-h[data-edge=w]{top:12px;bottom:12px;width:8px;cursor:ew-resize}
.k-wf-h[data-edge=n]{top:0}.k-wf-h[data-edge=s]{bottom:0}.k-wf-h[data-edge=e]{right:0}.k-wf-h[data-edge=w]{left:0}
.k-wf-h[data-edge=nw],.k-wf-h[data-edge=ne],.k-wf-h[data-edge=sw],.k-wf-h[data-edge=se]{width:14px;height:14px}
.k-wf-h[data-edge=nw]{top:0;left:0;cursor:nwse-resize}.k-wf-h[data-edge=se]{bottom:0;right:0;cursor:nwse-resize}
.k-wf-h[data-edge=ne]{top:0;right:0;cursor:nesw-resize}.k-wf-h[data-edge=sw]{bottom:0;left:0;cursor:nesw-resize}
.k-wf-h[data-edge=se]::after{content:"";position:absolute;right:3px;bottom:3px;width:7px;height:7px;border-right:2px solid #ebd391aa;border-bottom:2px solid #ebd391aa}
@media (pointer:coarse){
 .k-wf-h[data-edge=n],.k-wf-h[data-edge=s]{left:24px;right:24px;height:22px}
 .k-wf-h[data-edge=e],.k-wf-h[data-edge=w]{top:24px;bottom:24px;width:22px}
 .k-wf-h[data-edge=nw],.k-wf-h[data-edge=ne],.k-wf-h[data-edge=sw],.k-wf-h[data-edge=se]{width:28px;height:28px}
}
