/* World plates (UI-PLATES-01). Every name starts with wp- so nothing collides with ui.css. --wp-ui is set by plates.js (1..2).
   Theme: art/ui/openworld-v1/hud-kit-v3 - flat espresso and cream, slanted tags, diamonds, a bright cursor on bars. No outlines. */
.wp-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden;--wp-u:calc(1px * var(--wp-ui,1));
  --wp-ink:#33200e;--wp-cream:#f6e7c8;--wp-soft:0 1px 2px #221206,0 0 3px #221206,0 0 3px #221206,0 0 7px rgba(34,18,6,.85)}
.wp-label,.wp-self,.wp-me{position:absolute;left:0;top:0;white-space:nowrap;will-change:transform}
.wp-label[hidden],.wp-self[hidden],.wp-me[hidden]{display:none}

/* monster name over the head: text only, no tag and no frame; a soft shadow carries it on grass and paths.
   Attacks first = red name with a small fang. Does not attack first = cream name.
   The selected target is a little larger and adds element and level */
.wp-label{display:flex;align-items:center;gap:calc(var(--wp-u) * 3);padding:0 calc(var(--wp-u) * 2);color:#fff3d6;
  font-family:Kanit,'Noto Sans Thai Looped',sans-serif;font-weight:500;font-size:calc(var(--wp-u) * 13);line-height:1.35;text-shadow:var(--wp-soft)}
.wp-label.wp-hostile{color:#ff9a84;font-weight:600}
.wp-label.wp-full{font-size:calc(var(--wp-u) * 13.5);gap:calc(var(--wp-u) * 4)}
.wp-fang,.wp-rank,.wp-el{display:grid;place-items:center}
.wp-fang{display:none}
.wp-hostile .wp-fang{display:grid;filter:drop-shadow(0 0 2px rgba(34,18,6,1)) drop-shadow(0 1px 1px rgba(34,18,6,.9))}
.wp-fang svg{width:calc(var(--wp-u) * 10);height:calc(var(--wp-u) * 9);fill:currentColor}
.wp-rank,.wp-el{width:calc(var(--wp-u) * 13);height:calc(var(--wp-u) * 13);background:var(--wp-mark);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.wp-rank svg,.wp-el svg{width:calc(var(--wp-u) * 7.5);height:calc(var(--wp-u) * 7.5);fill:var(--wp-ink)}
.wp-el,.wp-lv{display:none}
.wp-full .wp-el{display:grid}
.wp-full .wp-lv{display:inline;font-weight:600;font-size:calc(var(--wp-u) * 11.5);color:#f2c94c}
.wp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

/* player: cream diamond emblem + name over the head; the bars sit at the feet and appear only while hurt or spent */
.wp-self{display:flex;flex-direction:column;align-items:center;gap:calc(var(--wp-u) * 2)}
.wp-id{display:flex;align-items:center;gap:calc(var(--wp-u) * 4)}
.wp-emblem{width:calc(var(--wp-u) * 17);height:calc(var(--wp-u) * 17);display:grid;place-items:center;
  background:var(--wp-cream);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.wp-emblem svg{width:62%;height:62%;fill:none;stroke:var(--wp-ink);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.wp-gm{color:#f2c14e;font-weight:700}
.wp-myname{font-family:Kanit,'Noto Sans Thai Looped',sans-serif;font-weight:600;font-size:calc(var(--wp-u) * 13);color:#fff8e8;line-height:1.35;text-shadow:var(--wp-soft)}
.wp-bar{--wp-end:calc(var(--wp-u) * 5);position:relative;width:calc(var(--wp-u) * 82);display:none;filter:drop-shadow(0 2px 3px rgba(34,18,6,.45))}
.wp-track{position:absolute;inset:0;background:rgba(51,32,14,.86);clip-path:polygon(0 0,calc(100% - var(--wp-end)) 0,100% 50%,calc(100% - var(--wp-end)) 100%,0 100%)}
.wp-track i{position:absolute;inset:0;transform-origin:left center;transition:transform .16s ease-out}
.wp-track .wp-chip{background:#ffd4a8;transition:transform .6s ease-in .18s}
.wp-cursor{position:absolute;top:calc(var(--wp-u) * -2);bottom:calc(var(--wp-u) * -2);width:calc(var(--wp-u) * 3);margin-left:calc(var(--wp-u) * -1.5);
  border-radius:99px;background:#fff8ec;box-shadow:0 0 calc(var(--wp-u) * 6) calc(var(--wp-u) * 1) rgba(255,154,154,.9);transition:left .16s ease-out}
.wp-cursor[hidden]{display:none}
.wp-hp{height:calc(var(--wp-u) * 9)}
.wp-hp .wp-fill{background:linear-gradient(#ff6a5e 45%,#e13f3f 45%)}
.wp-tab{position:absolute;right:100%;top:50%;transform:translateY(-50%);width:calc(var(--wp-u) * 18);height:calc(var(--wp-u) * 14);display:grid;place-items:center;
  background:var(--wp-cream);clip-path:polygon(0 0,100% 0,calc(100% - var(--wp-u) * 4) 100%,0 100%)}
.wp-tab svg{width:calc(var(--wp-u) * 10);height:calc(var(--wp-u) * 10);margin-right:calc(var(--wp-u) * 3);fill:var(--wp-ink)}
.wp-en{height:calc(var(--wp-u) * 5)}.wp-en .wp-fill{background:#58c9b0}
.wp-en .wp-cursor{box-shadow:0 0 calc(var(--wp-u) * 5) calc(var(--wp-u) * 1) rgba(150,255,226,.85)}
.wp-showhp .wp-hp,.wp-showen .wp-en{display:block}
/* low HP: stripes and a "!" as well as the pulse of the bar's length */
.wp-low .wp-hp .wp-fill{background:repeating-linear-gradient(115deg,#ef4a4a 0 5px,#ffb6a4 5px 8px)}
.wp-low .wp-id::after{content:'!';display:grid;place-items:center;width:calc(var(--wp-u) * 22);height:calc(var(--wp-u) * 22);background:#ef4a4a;color:#fff;
  font:700 calc(var(--wp-u) * 16)/1 Kanit,sans-serif;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}

@media (pointer:coarse) and (max-height:500px){
  .wp-label{font-size:calc(var(--wp-u) * 11)}
  .wp-label.wp-full{font-size:calc(var(--wp-u) * 12)}
  .wp-full .wp-lv{font-size:calc(var(--wp-u) * 10.5)}
  .wp-rank,.wp-el{width:calc(var(--wp-u) * 12);height:calc(var(--wp-u) * 12)}
  .wp-myname{font-size:calc(var(--wp-u) * 11.5)}
  .wp-emblem{width:calc(var(--wp-u) * 15);height:calc(var(--wp-u) * 15)}
}
body.calm .wp-track i,body.calm .wp-cursor{transition-duration:0s;transition-delay:0s}
/* LEVEL-GAP-01: level text colour by the gap to the player (the red band also shows a skull) */
.wp-label[data-gap="grey"] .wp-lv{color:#b9b2a6}
.wp-label[data-gap="yellow"] .wp-lv{color:#ffe066}
.wp-label[data-gap="orange"] .wp-lv{color:#ffa14a}
.wp-label[data-gap="red"] .wp-lv{color:#ff6a5a}
.wp-label[data-gap="even"] .wp-lv{color:#f5e4c4}
