/* World panel: one docked, draggable, resizable HUD panel at top right. It holds the compass and minimap (zoom and sound as icon
   buttons on the map edge), a one-row location line, the enemy target, Nearby Players and Party. world-panel.js moves the existing
   nodes in here, so every id and the code that updates them stay as they were. Geometry comes from window-frame.js (data-wf-hud).
   Stacking uses the shared --z-hud token (modals.css): below every menu, modal and window. */
html body #kWorldPanel{position:fixed;top:70px;right:8px;left:auto;bottom:auto;z-index:var(--z-hud,10);box-sizing:border-box;width:248px;display:flex;flex-direction:column;container-type:inline-size;
 background:linear-gradient(#162a21f4,#0c1813f4);border:1px solid #8f7a51;border-radius:10px;box-shadow:0 8px 24px #000a;color:#f4efde;font:13px/1.35 Grenze Gotisch,Georgia,serif;pointer-events:auto;max-height:calc(100dvh - 16px)!important}
html body #kWorldPanel[hidden]{display:none}
#kWorldPanel header{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:36px;padding:0 4px 0 10px;border-bottom:1px solid #766847;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
#kWorldPanel header h2{margin:0;font:700 14px/1.2 Grenze Gotisch,Georgia,serif;letter-spacing:.06em;text-transform:uppercase;color:#f1d39a}
#kWorldPanel .kw-here{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#cfe5c8;font-size:13px;text-align:right}
#kWorldPanel[data-collapsed="false"] .kw-here{display:none}
#kWorldPanel .kw-toggle,#kWorldPanel .kw-sechead,#kWorldPanel .kw-more,#kWorldPanel .kw-name,#kWorldPanel .kw-next{font:inherit;color:inherit;cursor:pointer}
#kWorldPanel .kw-toggle{flex:0 0 auto;display:grid;place-items:center;width:36px;height:36px;margin:0 0 0 auto;padding:0;background:transparent;border:1px solid transparent;border-radius:7px;color:#f1d39a}
#kWorldPanel[data-collapsed="true"] .kw-here+.kw-toggle{margin-left:0}
#kWorldPanel .kw-toggle:hover,#kWorldPanel .kw-toggle:focus-visible{background:#2c4b3a;border-color:#8f7a51;outline:none}
#kWorldPanel .kw-toggle::before{content:"";width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
#kWorldPanel[data-collapsed="true"] .kw-toggle::before{transform:translateY(2px) rotate(-135deg)}
#kWorldPanel .kw-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin;scrollbar-color:#766847 transparent}
#kWorldPanel[data-collapsed="true"] .kw-body{display:none}
#kWorldPanel[data-collapsed="true"] .k-wf-h{display:none}
html body #kWorldPanel[data-collapsed="true"]{height:auto!important;min-height:0!important}
/* compass + minimap, with the zoom and sound buttons on the map edge */
#kWorldPanel .kw-map{display:flex;gap:6px;justify-content:center;align-items:flex-start;flex:0 0 auto}
#kWorldPanel .kw-mapcol{display:flex;flex-direction:column;gap:6px;align-items:center;min-width:0}
html body #kWorldPanel #kheldraCompass{position:relative!important;top:auto!important;left:auto!important;transform:none!important;width:100%!important;height:26px;margin:0;flex:0 0 auto;font-size:13px;line-height:24px;z-index:auto!important;box-shadow:none}
html body #kWorldPanel #kheldraCompass:not([hidden]){display:block!important}
html body #kWorldPanel #mmorpgMinimap{position:relative!important;inset:auto!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;width:var(--kw-map)!important;height:var(--kw-map)!important;margin:0!important;padding:0!important;transform:none!important;flex:0 0 auto;z-index:auto!important}
#kWorldPanel{--kw-map:clamp(104px,min(calc(100cqw - 16px - 50px - 6px),26dvh),250px)}
#kWorldPanel .kw-tools{display:flex;flex-direction:column;gap:4px;flex:0 0 auto;margin-top:30px}
#kWorldPanel .kw-tools .mm-zoom{position:static!important;display:flex!important;flex-direction:column;gap:4px!important;width:auto!important;height:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important}
html body #kWorldPanel .kw-tools button,html body #kWorldPanel .kw-tools .mm-zoom>*{position:static!important;display:grid!important;place-items:center;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;margin:0!important;padding:0!important;font:700 18px/1 Grenze Gotisch,Georgia,serif!important;color:#e5c276!important;background:#0c1b14!important;border:1px solid #ad9264!important;border-radius:8px!important;cursor:pointer;z-index:auto!important;left:auto!important;top:auto!important;right:auto!important}
html body #kWorldPanel .kw-tools button:hover{background:#2c4b3a!important}
html body #kWorldPanel .kw-tools button:focus-visible{outline:2px solid #f4d48c;outline-offset:1px}
html body #kWorldPanel .kw-tools #kaudioToggle::after{content:none}
/* one-row location line */
html body #kWorldPanel #mmorpgZone{position:static!important;inset:auto!important;transform:none!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:0 6px;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:2px 4px!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;text-align:center;color:#cfe5c8;z-index:auto!important;flex:0 0 auto;font-size:13px!important}
html body #kWorldPanel #mmorpgZone .k-zone-label{display:none!important}
html body #kWorldPanel #mmorpgZone #kheldraAreaName{font:700 14px Grenze Gotisch,Georgia,serif!important;color:#9ad58b}
html body #kWorldPanel #mmorpgZone #mmorpgCoordinates{font:700 14px Grenze Gotisch,Georgia,serif!important;color:#ebd391}
html body #kWorldPanel #mmorpgZone #mmorpgCoordinates::before{content:"\00b7\00a0";color:#9d9680}
/* target: only while something is targeted */
html body #kWorldPanel #mmorpgTarget{position:static!important;inset:auto!important;transform:none!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;z-index:auto!important;flex:0 0 auto;box-sizing:border-box;padding:7px 9px;background:#19261fe9;border:1px solid #ab895c;border-radius:8px;touch-action:auto}
html body #kWorldPanel #mmorpgTarget:not([data-visible="true"]){display:none!important}
html body #kWorldPanel #mmorpgTarget[data-visible="true"]{display:flex!important}
html body #kWorldPanel #mmorpgTargetHeader{cursor:default}
html body #kWorldPanel #mmorpgTargetName{font-size:15px}
html body #kWorldPanel #mmorpgTargetHealth{flex:0 0 auto;height:12px;min-height:12px}
html body #kWorldPanel #mmorpgTarget>div[style*="font-size"]{font-size:13px!important}
#kWorldPanel .kw-next{align-self:center;margin-top:5px;min-height:32px;padding:2px 12px;background:#0c1b14;border:1px solid #8f7a51;border-radius:7px;color:#f1d39a}
#kWorldPanel .kw-next:hover{background:#2c4b3a}
#kWorldPanel .kw-next[hidden]{display:none}
/* Nearby Players and Party sections */
html body #kWorldPanel .k-hud-panel{position:static!important;inset:auto!important;z-index:auto!important;width:auto!important;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0;flex:0 0 auto;display:block!important}
html body #kWorldPanel .k-hud-panel[hidden]{display:none!important}
#kWorldPanel .k-hud-panel h3{margin:0 0 2px;padding:0;border-bottom:1px solid #766847}
#kWorldPanel .kw-sechead{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:36px;padding:0 2px;background:none;border:0;font:700 13px/1.2 Grenze Gotisch,Georgia,serif;letter-spacing:.04em;color:#f1d39a;text-align:left}
#kWorldPanel .kw-sechead:hover{color:#ffe7b4}
#kWorldPanel .kw-sechead:focus-visible,#kWorldPanel .kw-more:focus-visible,#kWorldPanel .kw-name:focus-visible,#kWorldPanel .kw-next:focus-visible{outline:2px solid #f4d48c;outline-offset:1px}
#kWorldPanel .kw-caret::before{content:"";display:block;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
#kWorldPanel .k-hud-panel[data-collapsed="true"] .kw-caret::before{transform:translateY(1px) rotate(-45deg)}
#kWorldPanel .k-hud-panel[data-collapsed="true"] ul,#kWorldPanel .k-hud-panel[data-collapsed="true"] .kw-more{display:none}
#kWorldPanel .k-hud-panel li{align-items:center;min-height:30px;padding:0;gap:8px}
#kWorldPanel .k-hud-panel li>:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
#kWorldPanel .kw-name{display:block;min-height:30px;padding:0 2px;background:none;border:0;border-radius:5px;text-align:left;text-decoration:underline dotted #8f7a51;text-underline-offset:3px;color:#f4efde;white-space:nowrap}
#kWorldPanel .kw-name:hover{background:#2c4b3a;color:#fff}
#kWorldPanel .kw-leader::before{content:"\2605\00a0";color:#f1d39a}
#kWorldPanel .kw-more{display:block;width:100%;min-height:32px;margin-top:2px;padding:0 6px;background:none;border:0;border-top:1px dashed #766847;color:#cfe5c8;font-size:13px;text-align:center}
#kWorldPanel .kw-more:hover{color:#fff;background:#2c4b3a}
#kWorldPanel .kw-more[hidden]{display:none}
/* touch: 44px targets */
@media(pointer:coarse),(max-width:700px){
 #kWorldPanel header{min-height:44px}
 #kWorldPanel .kw-toggle{width:44px;height:44px}
 html body #kWorldPanel .kw-tools button,html body #kWorldPanel .kw-tools .mm-zoom>*{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 #kWorldPanel{--kw-map:clamp(104px,min(calc(100cqw - 16px - 58px - 6px),26dvh),250px)}
 #kWorldPanel .kw-sechead,#kWorldPanel .kw-name,#kWorldPanel .kw-more,#kWorldPanel .kw-next{min-height:44px}
 #kWorldPanel .k-hud-panel li{min-height:44px}
}
/* Default docking per breakpoint (before the player moves it): clear of the top menu bar, the context button, the portrait,
   the dock toggle, chat and hotbar. Phones get a slim bar (collapsed) with a button that expands the sections. */
@media(max-width:1100px){html body #kWorldPanel{top:104px}}
@media(max-width:700px){
 html body #kWorldPanel{right:8px}
 html body #kWorldPanel[data-collapsed="true"]{top:172px;width:112px}
 html body #kWorldPanel[data-collapsed="false"]{top:226px;right:56px;width:min(300px,calc(100vw - 172px))}
 #kWorldPanel .kw-here{display:none}
}
@media(max-height:500px){html body #kWorldPanel{top:104px;right:40px;width:300px}}
html body #kWorldPanel #kheldraNearbyPanel[data-off="true"]{display:none!important}
/* the frame's minimum width is the slim-bar width; an open panel keeps a usable minimum */
html body #kWorldPanel[data-collapsed="false"]{min-width:min(220px,calc(100vw - 16px))!important}
/* risk pill: a read-only label (not a button) with the current zone's risk colour */
#kWorldPanel .kw-risk{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.3;padding:1px 7px;border-radius:999px;border:1px solid currentColor;background:#0c1b14cc;pointer-events:none}
#kWorldPanel .kw-risk[data-tone="safe"]{color:#8fd18a}
#kWorldPanel .kw-risk[data-tone="wild"]{color:#e6b255}
#kWorldPanel .kw-risk[data-tone="danger"]{color:#e8645b}
