/* Fengshen HUD (owner 2026-11-05): three separate floating pieces along the bottom of the game - the chat (left, chat.css),
   the resources with the seven windows on top (middle, #hud) and the queues + Shop (right, #hudq). Clean dark glass + gold
   hairline like the chat; the resources keep the game's two-column layout and icons. Sizes follow the game. */
#hud,#hudq{--glass:rgba(9,10,12,.86);--line:rgba(227,179,86,.35);--txt:#e8e6e3;--dim:rgba(232,230,227,.55);--field:rgba(255,255,255,.055);--gap:.44em;
  position:absolute;bottom:var(--gap);z-index:5;display:none;box-sizing:border-box;color:var(--txt);
  font:min(1.06cqw,14.5px)/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--glass);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);border:1px solid var(--line);border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,.4)}
#hud.on{display:block}#hudq.on{display:flex}#hud.fullview,#hudq.fullview{display:none!important}
#hud button,#hudq button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
#hud button:focus-visible,#hudq button:focus-visible{outline:1px solid rgba(227,179,86,.8);outline-offset:1px}
#hud svg,#hudq svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}

/* ---------- middle: windows + resources, filling the space between the chat and the queues */
#hud{left:calc(32.6% + 2 * var(--gap));right:calc(22% + 2 * var(--gap));padding:.5em .65em .6em}
/* 2026-11-09 redesign (owner: "doesn't look that great and in line with our design language"): the island's language -
   ghost icon buttons that light up gold on hover, hairline dividers instead of boxes, the numbers as a ledger */
#hud .hd-nav{position:relative;display:flex;gap:.4em;padding:0 .1em .55em;margin-bottom:.35em}
/* owner: "the buttons on top need to be a little more visible and obvious" (no labels) - a soft fill + hairline at rest,
   brighter and slightly larger icons; the island's gold hover on top */
#hud .hd-nav button{position:relative;flex:1;min-width:0;height:2.95em;display:grid;place-items:center;border-radius:10px;
  color:rgba(240,236,228,.95);background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.11);
  transition:color .15s,background .15s,box-shadow .15s}
#hud .hd-nav button:hover{color:#f0c766;background:rgba(227,179,86,.15);box-shadow:inset 0 0 0 1px rgba(227,179,86,.6)}
#hud .hd-nav button:active{background:rgba(227,179,86,.24)}
#hud .hd-nav svg{width:1.75em;height:1.75em}
#hud .hd-nav .dot{position:absolute;top:.4em;right:calc(50% - 1.3em);width:.5em;height:.5em;border-radius:50%;background:#ff6b5e;box-shadow:0 0 0 2px #0b0c0f;display:none}
#hud .hd-nav .new .dot{display:block}
#hud .hd-body{display:flex;align-items:stretch;gap:1em;padding:0 .15em}
#hud .hd-res{flex:1;min-width:0;display:flex;flex-direction:column}
#hud .hd-split{width:1px;background:rgba(255,255,255,.09);margin:.35em 0}
#hud .hd-row{display:flex;align-items:center;min-width:0}
#hud .hd-row+.hd-row{border-top:1px solid rgba(255,255,255,.06)}
#hud .hd-c{flex:1;min-width:0;height:2.3em;display:flex;align-items:center;gap:.45em;padding:0 .1em 0 0;border-radius:7px;transition:background .15s}
#hud .hd-c:hover{background:rgba(255,255,255,.035)}
#hud .hd-ic{flex:0 0 auto;width:2.3em;height:2em;display:grid;place-items:center;border-radius:7px;transition:background .15s}
#hud .hd-ic:hover{background:rgba(227,179,86,.12)}
#hud .hd-ic img{max-width:2.15em;max-height:1.7em;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
#hud .hd-fld{flex:1;min-width:0;height:100%;display:flex;align-items:center;gap:.5em}
#hud .hd-v{flex:1;min-width:0;text-align:right;font-weight:650;font-size:1.05em;color:#f3ead6;font-variant-numeric:tabular-nums;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hud .hd-s{flex:0 0 auto;min-width:4.6em;text-align:right;font-size:.84em;color:var(--dim);font-variant-numeric:tabular-nums;white-space:nowrap}
#hud .hd-v em{font-style:normal;color:#f0a24a}
#hud .up{color:#8fd27a!important}#hud .dn{color:#ff8f7d!important}
#hud .hd-plus{flex:0 0 auto;width:1.7em;height:1.7em;border-radius:999px;display:grid;place-items:center;font-size:1.05em;font-weight:500;line-height:1;
  color:var(--dim);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);transition:color .15s,background .15s,box-shadow .15s}
#hud .hd-plus:hover{color:#f0c766;background:rgba(227,179,86,.14);box-shadow:inset 0 0 0 1px rgba(227,179,86,.55)}
@media (prefers-reduced-motion:reduce){#hud .hd-nav button,#hud .hd-c,#hud .hd-ic,#hud .hd-plus{transition:none}}

/* ---------- right: queue buttons on top, the list, the Shop along the bottom */
#hudq{right:var(--gap);width:22%;flex-direction:column;gap:.45em;padding:.45em}
#hudq .hq-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;padding-bottom:.7em;margin-bottom:.3em}
#hudq .hq-tabs{display:flex;gap:.3em;padding-top:.4em;border-top:1px solid rgba(255,255,255,.07)}
#hudq .hq-tabs button{position:relative;flex:1;display:flex;align-items:center;justify-content:center;gap:.35em;height:2.4em;border-radius:7px;color:var(--dim);
  background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
#hudq .hq-tabs button:hover{background:rgba(255,255,255,.08);color:var(--txt)}
#hudq .hq-tabs button.on{color:var(--txt);background:rgba(227,179,86,.12);box-shadow:inset 0 0 0 1px rgba(227,179,86,.45)}
#hudq .hq-tabs svg{width:1.35em;height:1.35em}
#hudq .hq-tabs .n{font-style:normal;font-size:.78em;font-weight:700;min-width:1.4em;text-align:center;border-radius:999px;padding:.05em .3em;background:rgba(227,179,86,.22);color:#f0c766}
#hudq .hq-list{min-height:4.8em;max-height:52cqh;overflow:auto;padding:.15em .25em;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.13) transparent}
#hudq .hq-empty{display:flex;align-items:center;justify-content:center;min-height:4.4em;color:var(--dim);text-align:center}
#hudq .hq-it{display:flex;align-items:center;gap:.5em;padding:.38em .2em;border-top:1px solid rgba(255,255,255,.07)}
#hudq .hq-it:first-child{border-top:0}
#hudq .hq-it .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hudq .hq-it .nm small{display:block;color:var(--dim);font-size:.85em;margin-top:.1em}
#hudq .hq-it .nm small .wait{color:#ff8f7d}#hudq .hq-it .nm small .go{color:#8fd27a}
#hudq .hq-it .t{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
#hudq .hq-it .sp{border:1px solid rgba(227,179,86,.55);color:#f0c766;background:rgba(227,179,86,.08);border-radius:6px;padding:.3em .55em;font-weight:650;white-space:nowrap}
#hudq .hq-it .sp:hover{background:rgba(227,179,86,.18)}
#hudq .hq-it .cx{color:var(--dim);padding:.2em .3em;border-radius:5px}
#hudq .hq-it .cx:hover{color:#ff8f7d;background:rgba(255,143,125,.1)}
/* the Shop, full width along the bottom */
#hudq .hd-shop{height:4.4em;display:flex;align-items:center;justify-content:center;gap:.55em;border-radius:9px;font-size:1.12em;font-weight:650;letter-spacing:.03em;
  color:#f6ead0;background:linear-gradient(180deg,rgba(227,179,86,.2),rgba(227,179,86,.07));
  box-shadow:inset 0 0 0 1px rgba(227,179,86,.6),inset 0 1px 0 rgba(255,230,170,.25),0 2px 10px rgba(0,0,0,.35);transition:background .15s,box-shadow .15s}
#hudq .hd-shop:hover{background:linear-gradient(180deg,rgba(227,179,86,.3),rgba(227,179,86,.12));box-shadow:inset 0 0 0 1px rgba(240,199,102,.9),inset 0 1px 0 rgba(255,230,170,.35),0 0 14px rgba(227,179,86,.25)}
#hudq .hd-shop svg{width:2.1em;height:2.1em;color:#f0c766;stroke-width:1.6}
/* a soft light sweep across the Shop every few seconds (owner: "a subtle effect" that entices players) */
#hudq .hd-shop{position:relative;overflow:hidden;isolation:isolate}
#hudq .hd-shop::after{content:"";position:absolute;top:-20%;bottom:-20%;left:-60%;width:45%;z-index:-1;pointer-events:none;
  background:linear-gradient(105deg,transparent 0%,rgba(255,236,190,0) 20%,rgba(255,236,190,.3) 50%,rgba(255,236,190,0) 80%,transparent 100%);
  transform:skewX(-18deg);animation:hd-sheen 5.5s ease-in-out infinite}
@keyframes hd-sheen{0%,62%{left:-60%}100%{left:130%}}
#hudq .hd-shop svg{animation:hd-glint 5.5s ease-in-out infinite}
@keyframes hd-glint{0%,70%,100%{filter:none}82%{filter:drop-shadow(0 0 5px rgba(255,214,120,.75))}}
@media (prefers-reduced-motion:reduce){#hudq .hd-shop::after,#hudq .hd-shop svg{animation:none}}
/* dividers: windows | resources, queues | Shop - a soft gold line with room around it */
#hud .hd-nav::after,#hudq .hq-main::after{content:"";position:absolute;left:4%;right:4%;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(227,179,86,.5) 20%,rgba(227,179,86,.5) 80%,transparent)}
/* Speed up as an icon (owner: the words repeat on every row): gold fast-forward in a small square button */
#hudq .hq-it .sp{width:2.1em;height:2.1em;padding:0;display:grid;place-items:center}
#hudq .hq-it .sp svg{width:1.2em;height:1.2em;fill:#f0c766;stroke:#f0c766;stroke-width:1.2}
/* coming back from a battle: a quick fade-in (restarts each time the panels reappear); leaving is instant */
#game #chat:not(.pre),#hud,#hudq{animation:fs-in .15s ease-out}
@keyframes fs-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){#game #chat,#hud,#hudq{animation:none}}
/* ---------- player card, top left (owner's sketch): a big portrait medallion with the info panel joined behind it; the VIP
   badge breaks out over the medallion's top-left, level bottom-left, the gift bag bottom-right */
#hudme{position:absolute;left:1.25cqw;top:1.1cqw;z-index:5;display:none;align-items:center;
  color:#e8e6e3;font:min(1.2cqw,16.5px)/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;animation:fs-in .15s ease-out}
#hudme.on{display:flex}#hudme.fullview{display:none!important}
#hudme button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
#hudme button:focus-visible{outline:1px solid rgba(227,179,86,.8);outline-offset:2px}
/* compact card (owner 2026-11-05: "too wide and too much in height"): medallion, VIP, gift, level and Mini Home ~25% smaller;
   the info is four short lines - name + rank, title . faction, alliance . post, then Reputation and Cash chips */
/* the medallion */
#hudme .pm-por{position:relative;z-index:2;width:7.2em;height:7.2em;flex:0 0 auto;border-radius:50%;padding:.26em;box-sizing:border-box;
  background:radial-gradient(circle at 50% 30%,#2a2620,#0d0e11 70%);
  box-shadow:inset 0 0 0 2px rgba(227,179,86,.85),inset 0 0 0 .26em rgba(9,10,12,.95),0 0 0 1px rgba(227,179,86,.3),0 5px 14px rgba(0,0,0,.55)}
#hudme .pm-por img{width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:top;background:#000;display:block;
  box-shadow:0 0 0 1px rgba(227,179,86,.45)}
#hudme .pm-por:hover{box-shadow:inset 0 0 0 2px #f0c766,inset 0 0 0 .26em rgba(9,10,12,.95),0 0 0 1px rgba(240,199,102,.5),0 0 14px rgba(240,199,102,.3)}
#hudme .pm-lv{position:absolute;left:.2em;bottom:.2em;min-width:2.2em;padding:.14em .38em;border-radius:999px;font-size:.8em;font-weight:750;text-align:center;
  color:#f3e7c8;background:#15161a;box-shadow:inset 0 0 0 1.5px rgba(227,179,86,.8),0 2px 5px rgba(0,0,0,.6)}
/* VIP over the medallion's top-left */
#hudme .pm-vip{position:absolute;z-index:3;left:-.42em;top:.55em;font-size:.98em;font-weight:900;letter-spacing:.06em;padding:.18em .5em;border-radius:6px;
  color:#2a1c05;background:linear-gradient(#ffe39a,#d9a43c 55%,#a8761f);
  box-shadow:inset 0 1px 0 rgba(255,250,225,.7),inset 0 0 0 1px rgba(110,70,10,.6),0 2px 6px rgba(0,0,0,.55)}
#hudme .pm-vip:hover{filter:brightness(1.08)}
/* gift bag, bottom-right of the medallion: dim while waiting, glowing when a reward can be claimed */
#hudme .pm-gift{position:absolute;z-index:3;left:4.9em;top:4.45em;width:3.15em;height:3.15em;display:grid;place-items:center;opacity:.8;
  filter:grayscale(.35) drop-shadow(0 2px 3px rgba(0,0,0,.75))}
#hudme .pm-gift img{width:100%;height:auto;display:block}
#hudme .pm-gift.ready{opacity:1;filter:none;animation:pm-gift 1.8s ease-in-out infinite}
@keyframes pm-gift{0%,100%{filter:drop-shadow(0 0 3px rgba(255,214,120,.45))}50%{filter:drop-shadow(0 0 10px rgba(255,214,120,1))}}
/* the info panel, starting behind the medallion's centre */
#hudme .pm-panel{position:relative;z-index:1;margin-left:-3.6em;padding:.6em .95em .6em 4.6em;border-radius:13px;
  background:rgba(9,10,12,.86);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);border:1px solid rgba(227,179,86,.35);
  box-shadow:0 5px 16px rgba(0,0,0,.4)}
#hudme .pm-info{display:flex;flex-direction:column;gap:.14em;min-width:13.5em;max-width:16.5em;white-space:nowrap}
#hudme .pm-info>div{display:flex;align-items:baseline;gap:.4em;min-width:0}
#hudme .pm-l1{margin-bottom:.05em}
#hudme .pm-name{font-size:1.12em;font-weight:700;overflow:hidden;text-overflow:ellipsis;min-width:0}
#hudme .pm-rank{flex:0 0 auto;font-size:.68em;font-weight:750;padding:.1em .4em;border-radius:999px;color:#f0c766;
  background:rgba(227,179,86,.12);box-shadow:inset 0 0 0 1px rgba(227,179,86,.4);font-variant-numeric:tabular-nums}
#hudme .pm-rank:empty{display:none}
#hudme .pm-l2{font-size:.8em;color:rgba(232,230,227,.78)}
#hudme .pm-l2 span{overflow:hidden;text-overflow:ellipsis;min-width:0}
#hudme .pm-l2 span+span::before{content:"·";margin-right:.4em;color:rgba(232,230,227,.4)}
#hudme .pm-l2 span:empty{display:none}
#hudme .pm-none{color:rgba(232,230,227,.4)}
/* what you have: Reputation and Cash as two labelled rows under a gold hairline, values right-aligned in tabular figures */
#hudme .pm-stats{display:flex!important;flex-direction:column;align-items:stretch!important;gap:.12em!important;margin-top:.35em;padding-top:.35em;
  border-top:1px solid rgba(227,179,86,.22)}
#hudme .pm-stat{display:flex;align-items:center;gap:.5em;font-size:.84em;min-height:1.45em}
#hudme .pm-stat>i{font-style:normal;color:rgba(232,230,227,.55);flex:0 0 auto}
#hudme .pm-stat b{margin-left:auto;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:.01em}
#hudme .pm-cv{margin-left:auto;display:inline-flex;align-items:center;gap:.3em}
#hudme .pm-cv b{margin-left:0;color:#f3d48a}
#hudme .pm-cv .fs-cash{width:1.05em;height:1em}
#hudme .pm-home{position:absolute;right:.85em;top:-.85em;font-size:.72em;font-weight:600;padding:.22em .75em;border-radius:999px;color:rgba(232,230,227,.85);
  background:#15161a;box-shadow:inset 0 0 0 1px rgba(227,179,86,.5),0 2px 5px rgba(0,0,0,.45)}
#hudme .pm-home:hover{color:#f0c766;box-shadow:inset 0 0 0 1px rgba(227,179,86,.9),0 2px 5px rgba(0,0,0,.45)}
@media (prefers-reduced-motion:reduce){#hudme,#hudme .pm-gift.ready{animation:none}}
/* "+" beside Cash -> Game Cash page */
#hudme .pm-add{position:relative;flex:0 0 auto;width:1.25em;height:1.25em;border-radius:4px;text-decoration:none;
  color:#f0c766;background:rgba(227,179,86,.12);box-shadow:inset 0 0 0 1px rgba(227,179,86,.55)}
#hudme .pm-add:hover{background:rgba(227,179,86,.25);box-shadow:inset 0 0 0 1px rgba(240,199,102,.95)}
#hudme .pm-add:focus-visible{outline:1px solid rgba(227,179,86,.8);outline-offset:2px}
/* the cross drawn exactly in the middle (a text "+" sits off-centre in most fonts) */
#hudme .pm-add::before,#hudme .pm-add::after{content:"";position:absolute;left:50%;top:50%;background:#f0c766;border-radius:1px;transform:translate(-50%,-50%)}
#hudme .pm-add::before{width:.58em;height:.12em}#hudme .pm-add::after{width:.12em;height:.58em}
/* ---------- compact mode of the middle panel: same buttons and resources, shorter */
#hud .hd-compact{position:absolute;right:1em;top:-.95em;z-index:2;width:2.2em;height:1.5em;display:grid;place-items:center;border-radius:999px;
  color:rgba(232,230,227,.75);background:#15161a;box-shadow:inset 0 0 0 1px rgba(227,179,86,.5),0 2px 6px rgba(0,0,0,.45)}
#hud .hd-compact:hover{color:#f0c766;box-shadow:inset 0 0 0 1px rgba(227,179,86,.9),0 2px 6px rgba(0,0,0,.45)}
#hud .hd-compact svg{width:1.15em;height:1.15em;transition:transform .2s}
#hud.compact .hd-compact svg{transform:rotate(180deg)}
/* compact: the window buttons stay as they are; the resource table gives way to two calm rows of icon + amount */
#hud .hd-strip{display:none}
#hud.compact .hd-body{display:none}
#hud.compact .hd-strip{display:flex;justify-content:space-between;gap:.15em;padding:.1em .1em 0}
#hud .hd-chip{display:flex;align-items:center;justify-content:center;gap:.28em;height:2em;padding:0 .15em;border-radius:7px;min-width:0;white-space:nowrap;font-size:.9em}
#hud .hd-chip:hover{background:rgba(255,255,255,.06)}
#hud .hd-chip img{width:auto;height:1.45em;max-width:1.8em;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
#hud .hd-chip b{font-weight:650;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
@media (prefers-reduced-motion:reduce){#hud .hd-compact svg{transition:none}}
/* resource hover details */
#hudtip{position:absolute;z-index:8;display:none;min-width:13em;padding:.55em .7em .6em;border-radius:9px;pointer-events:none;
  color:#e8e6e3;font:min(1cqw,13.5px)/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:rgba(14,15,18,.96);border:1px solid rgba(227,179,86,.4);box-shadow:0 8px 24px rgba(0,0,0,.55)}
#hudtip.on{display:block}
#hudtip h5{margin:0 0 .35em;font-size:.95em;font-weight:650;color:#f0c766}
#hudtip .tr{display:flex;justify-content:space-between;gap:1.4em;padding:.12em 0}
#hudtip .tr span{color:rgba(232,230,227,.6)}
#hudtip .tr b{font-weight:600;font-variant-numeric:tabular-nums}
#hudtip .up{color:#8fd27a}#hudtip .dn{color:#ff8f7d}
/* queue list folded away: just the tabs and the Shop */
#hudq.folded .hq-list{display:none}
#hudq.folded .hq-tabs{padding-top:0;border-top:0}
#hudme .pm-stat:not(.pm-cash) b{margin-right:1.75em}   /* numbers line up: Cash has the 1.25em "+" and a .5em gap after it */
/* ---------- top-right buttons (#hudtop): the card's medallion look, the game's own art inside, English labels */
#hudtop{position:absolute;right:2.1cqw;top:.6cqw;z-index:5;display:none;gap:.55em;font:min(1.32cqw,18.15px)/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:#e8e6e3;animation:fs-in .15s ease-out}
#hudtop.on{display:flex}#hudtop.fullview{display:none!important}
#hudtop .ht-btn{position:relative;display:flex;flex-direction:column;align-items:center;gap:.25em;font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
#hudtop .ht-art{width:3.9em;height:3.9em;border-radius:50%;padding:.2em;box-sizing:border-box;background:radial-gradient(circle at 50% 30%,#2a2620,#0d0e11 70%);
  box-shadow:inset 0 0 0 2px rgba(227,179,86,.75),inset 0 0 0 .2em rgba(9,10,12,.95),0 0 0 1px rgba(227,179,86,.25),0 4px 12px rgba(0,0,0,.55);
  transition:box-shadow .15s,transform .15s}
#hudtop .ht-art img{width:100%;height:100%;border-radius:50%;display:block;object-fit:cover}
#hudtop .ht-lbl{font-size:.72em;font-weight:650;padding:.1em .55em;border-radius:999px;background:rgba(9,10,12,.82);box-shadow:inset 0 0 0 1px rgba(227,179,86,.3);
  text-shadow:0 1px 2px #000;white-space:nowrap}
#hudtop .ht-btn:hover .ht-art{transform:translateY(-1px);box-shadow:inset 0 0 0 2px #f0c766,inset 0 0 0 .2em rgba(9,10,12,.95),0 0 0 1px rgba(240,199,102,.5),0 0 14px rgba(240,199,102,.35)}
#hudtop .ht-btn:hover .ht-lbl{color:#f0c766}
#hudtop .ht-btn:focus-visible{outline:none}#hudtop .ht-btn:focus-visible .ht-art{box-shadow:inset 0 0 0 2px #f0c766,0 0 0 2px rgba(240,199,102,.7)}
#hudtop .ht-dot{display:none;position:absolute;top:.1em;right:.15em;width:.75em;height:.75em;border-radius:50%;background:#e3b356;box-shadow:0 0 0 2px rgba(9,10,12,.9),0 0 8px rgba(240,199,102,.9)}
#hudtop .ht-btn.new .ht-dot{display:block}
@media (prefers-reduced-motion:reduce){#hudtop .ht-art{transition:none}}
/* ---------- building hover bar (#hudbld): the HUD's dark glass + gold hairline, a notch pointing at the building */
#hudbld{position:absolute;z-index:6;display:none;box-sizing:border-box;min-width:15em;max-width:27em;padding:.5em .6em .55em;border-radius:10px;
  color:#e8e6e3;font:min(1.06cqw,14.5px)/1.25 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:rgba(9,10,12,.9);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);border:1px solid rgba(227,179,86,.45);
  box-shadow:0 8px 22px rgba(0,0,0,.55);animation:bb-in .14s ease-out}
#hudbld.on{display:block}
#hudbld::after{content:"";position:absolute;left:var(--nx,50%);bottom:-.42em;width:.75em;height:.75em;margin-left:-.375em;transform:rotate(45deg);
  background:rgba(9,10,12,.95);border-right:1px solid rgba(227,179,86,.45);border-bottom:1px solid rgba(227,179,86,.45)}
#hudbld.below::after{bottom:auto;top:-.42em;transform:rotate(225deg)}
@keyframes bb-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
#hudbld.below{animation-name:bb-in2}@keyframes bb-in2{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
#hudbld .bb-h{display:flex;align-items:baseline;gap:.55em;white-space:nowrap}
#hudbld .bb-h b{font-size:1.1em;font-weight:700;color:#f3e7c8;overflow:hidden;text-overflow:ellipsis;min-width:0}
#hudbld .bb-lv{color:rgba(232,230,227,.7);font-variant-numeric:tabular-nums}
#hudbld .bb-lv i{font-style:normal;color:#8fd27a}
#hudbld .bb-tag{margin-left:auto;font-size:.78em;font-weight:700;padding:.1em .5em;border-radius:999px;color:#f0c766;background:rgba(227,179,86,.12);box-shadow:inset 0 0 0 1px rgba(227,179,86,.4)}
/* next level's cost: icon + amount per resource, red when you are short; the time at the end */
#hudbld .bb-cost{display:flex;flex-wrap:wrap;align-items:center;gap:.25em .7em;margin-top:.45em;padding-top:.4em;border-top:1px solid rgba(255,255,255,.08);
  font-variant-numeric:tabular-nums;font-weight:600}
#hudbld .bb-cost span{display:inline-flex;align-items:center;gap:.25em;white-space:nowrap}
#hudbld .bb-cost img{height:1.3em;width:auto;max-width:1.6em;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
#hudbld .bb-cost .short{color:#ff8f7d}
#hudbld .bb-need{margin-top:.3em;font-size:.88em;color:#ff8f7d}
#hudbld .bb-run{display:flex;align-items:baseline;gap:.8em;margin-top:.45em;padding-top:.4em;border-top:1px solid rgba(255,255,255,.08)}
#hudbld .bb-run span{color:rgba(232,230,227,.75)}
#hudbld .bb-run b{margin-left:auto;font-weight:650;font-variant-numeric:tabular-nums;color:#8fd27a}
#hudbld .bb-ask{margin-top:.45em;padding-top:.4em;border-top:1px solid rgba(255,255,255,.08);max-width:24em;white-space:normal}
/* actions: Upgrade in the Shop's gold, the rest quiet; Destroy / Cancel turn red on hover */
#hudbld .bb-act{display:flex;gap:.35em;margin-top:.5em}
#hudbld button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;white-space:nowrap}
#hudbld .bb-act button{display:inline-flex;align-items:center;justify-content:center;gap:.3em;height:2.15em;padding:0 .8em;border-radius:7px;font-weight:600}
#hudbld .bb-go{color:#f6ead0;background:linear-gradient(180deg,rgba(227,179,86,.28),rgba(227,179,86,.1));box-shadow:inset 0 0 0 1px rgba(227,179,86,.7),inset 0 1px 0 rgba(255,230,170,.2)}
#hudbld .bb-go:hover{background:linear-gradient(180deg,rgba(227,179,86,.4),rgba(227,179,86,.16));box-shadow:inset 0 0 0 1px rgba(240,199,102,.95)}
#hudbld .bb-go.danger{color:#ffd9d2;background:rgba(255,120,100,.16);box-shadow:inset 0 0 0 1px rgba(255,143,125,.65)}
#hudbld .bb-go.danger:hover{background:rgba(255,120,100,.26)}
#hudbld .bb-go.off{color:rgba(232,230,227,.4);background:rgba(255,255,255,.04);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);cursor:not-allowed}
#hudbld .bb-go svg{width:1.05em;height:1.05em;fill:currentColor;stroke:currentColor;stroke-width:1.2}
#hudbld .bb-b{color:rgba(232,230,227,.85);background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
#hudbld .bb-b:hover{color:#fff;background:rgba(255,255,255,.1)}
#hudbld .bb-x:hover{color:#ff8f7d;background:rgba(255,143,125,.1);box-shadow:inset 0 0 0 1px rgba(255,143,125,.4)}
#hudbld button:focus-visible{outline:1px solid rgba(227,179,86,.8);outline-offset:1px}
#hudbld.busy .bb-act{opacity:.55;pointer-events:none}
@media (prefers-reduced-motion:reduce){#hudbld{animation:none}}
