/* The HUD's layout (hud-layout-plan.js decides, hud-layout.js applies). Loaded last: it is the one place the HUD's
   regions and sizes are set for play with a mouse and keyboard, over the older rules in lab.css, prayer.css,
   gear-sets.css, gather.css and chat-box.css, which still hold each piece's look and the whole of the touch layout.

   One number sizes everything: --hud-scale (hud-layout.js puts it on the root; --hs is its short name). Every length
   below is a length at scale 1 times that number. Words never go under 11px: a size that holds words is written
   max(11px, ...), and the boxes that hold those words keep a floor of their own (the same floors as in
   hud-layout-plan.js, which must agree with this file: BAR, STRIP, COLUMN, CORNER, BOSS).

   Everything for a mouse and keyboard is under .hud-desk (the root has it when the page is not played by touch), so
   the touch layout is exactly as it was: there the cluster is no box at all and each piece keeps its own place. */
:root { --hud-scale: 1; --hs: var(--hud-scale); }
.hud-safe-probe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }

/* ---------------- bottom center: the cluster ----------------
   A grid of three columns: the health globe, the bar with the strips attached to its top, the stamina globe. The
   strips are as wide as the bar and no wider (they add nothing to the column's width), the prayers on the bar and the
   gear sets beside them, or above them where the two do not fit side by side. Across the top of all three stands the
   status row while it has anything to show (runes and rules on the left, tools in the middle, what hinders the hero
   on the right), and over that the unlocked skill bar's panel. Neither adds to the cluster's width. */
#hudCluster, .hud-attach { display: contents; }
/* (two rules, not one list: a browser that does not know :has() drops the second and keeps the first) */
.action-bar[hidden] ~ .hud-attach { display: none; }
#hudCluster:has(> .action-bar[hidden]) ~ .slot-tip { display: none; }
.hud-desk #hudCluster {
  position: fixed; z-index: 7; left: var(--safe-l); right: var(--safe-r); bottom: calc(8px * var(--hs) + var(--safe-b)); margin: 0 auto;
  width: max-content; max-width: calc(100vw - var(--safe-l) - var(--safe-r));
  display: grid; grid-template-columns: auto auto auto; grid-template-areas: "arrange arrange arrange" "status status status" "hp attach st" "hp bar st"; align-items: end;
  column-gap: calc(12px * var(--hs)); pointer-events: none;
}
.hud-desk #hudCluster:has(> .action-bar[hidden]) { display: none; }
.hud-desk #hudCluster > .action-bar {
  grid-area: bar; position: relative; left: auto; right: auto; bottom: auto; transform: none; z-index: auto;
  --s: calc(56px * var(--hs)); gap: calc(6px * var(--hs)); padding: calc(7px * var(--hs)); border-radius: calc(12px * var(--hs));
}
.hud-desk .action-bar .slots { display: flex; gap: calc(6px * var(--hs)); }
.hud-desk .action-bar .slot { border-radius: calc(9px * var(--hs)); }
.hud-desk .action-bar .slot.attack { --s2: calc(var(--s) * 1.25); }
.hud-desk body:not(.pad-on) .action-bar:not(.touch) .slot .key { min-width: max(16px, calc(16px * var(--hs))); height: max(15px, calc(15px * var(--hs))); padding: 0 max(3px, calc(4px * var(--hs))); font-size: max(11px, calc(10.5px * var(--hs))); }
.hud-desk body.pad-on .action-bar:not(.touch) .slot .key { width: calc(22px * var(--hs)); height: calc(22px * var(--hs)); }
.hud-desk .action-bar .slot .key svg { width: calc(9px * var(--hs)); height: calc(12px * var(--hs)); }
.hud-desk .action-bar .slot .auto { font-size: max(11px, calc(11px * var(--hs))); line-height: max(14px, calc(14px * var(--hs))); }
.hud-desk .action-bar .slot .count { min-width: max(16px, calc(16px * var(--hs))); height: max(16px, calc(16px * var(--hs))); border-radius: max(8px, calc(8px * var(--hs))); font-size: max(11px, calc(11px * var(--hs))); line-height: max(16px, calc(16px * var(--hs))); }
.hud-desk .action-bar .slot .cdtext { font-size: max(14px, calc(20px * var(--hs))); }
.hud-desk .action-bar .slot .pips { gap: calc(3px * var(--hs)); }
.hud-desk .action-bar .slot .pips i { width: calc(6px * var(--hs)); height: calc(6px * var(--hs)); }
.hud-desk .action-bar .slot.vacant .word { font-size: max(11px, calc(10px * var(--hs))); }
.hud-desk .action-bar .slot .lvl { font-size: max(11px, calc(11px * var(--hs))); }
.hud-desk .action-bar .bar-lock { align-self: stretch; width: calc(30px * var(--hs)); height: auto; min-height: 0; border-radius: calc(9px * var(--hs)); }
.hud-desk .action-bar .bar-lock svg { width: calc(24px * var(--hs)); height: calc(24px * var(--hs)); max-width: 92%; max-height: 92%; }
.hud-desk .action-bar .bar-lock .lock-word { z-index: 3; font-size: max(11px, calc(11px * var(--hs))); }
/* (the lock's word shows over the bar; with a strip attached there it shows over the strip, and over both where they stand one on the other) */
.hud-desk #hudCluster:has(.hud-attach > :not([hidden])) .bar-lock .lock-word { bottom: calc(100% + 19px * var(--hs) + max(42px, calc(46px * var(--hs))) + 10px); }
.hud-desk.hud-compact #hudCluster:has(.pr-bar:not([hidden])):has(.gs-bar:not([hidden])) .bar-lock .lock-word { bottom: calc(100% + 31px * var(--hs) + 2 * max(42px, calc(46px * var(--hs))) + 14px); }
/* (the lock shares its column with the auto attack button: its word is placed from the column, which is as tall as the lock was) */
.hud-desk .action-bar .bar-side { position: relative; }
.hud-desk .action-bar .bar-side > .bar-lock { position: static; }
/* The auto attack button (Assisted combat controls), over the lock in the lock's own column: as wide as the lock, and round. */
.hud-desk .action-bar .bar-side { gap: calc(4px * var(--hs)); }
.hud-desk .action-bar .bar-auto .auto-fire { width: calc(30px * var(--hs)); height: calc(30px * var(--hs)); }
.hud-desk .action-bar .bar-auto .auto-fire svg { width: calc(24px * var(--hs)); height: calc(24px * var(--hs)); }
/* The status row and the unlocked bar's panel, across the top of the cluster. The row keeps its height while it is
   empty (it is only not drawn), so the cluster is as tall with a plate as without one, and neither the chat box nor
   the prompt to interact moves when a rune is won or something hinders the hero for a moment. */
.hud-desk #hudCluster > .hud-status { grid-area: status; width: 0; min-width: 100%; min-height: max(24px, calc(28px * var(--hs))); box-sizing: border-box; margin-bottom: calc(5px * var(--hs)); column-gap: calc(10px * var(--hs)); }
.hud-desk #hudCluster > .hud-status[hidden] { display: grid; visibility: hidden; }
.hud-desk .hud-status .hs-group { gap: calc(3px * var(--hs)) calc(9px * var(--hs)); }
.hud-desk .hud-status .hs-set { gap: calc(3px * var(--hs)); }
.hud-desk .hud-status .hs-plate { width: max(24px, calc(28px * var(--hs))); height: max(24px, calc(28px * var(--hs))); font-size: max(11px, calc(11px * var(--hs))); }
.hud-desk .hud-status .hs-debuff svg { width: calc(16px * var(--hs)); height: calc(16px * var(--hs)); }
.hud-desk .hud-status .tool-belt, .hud-desk .hud-status .tool-belt .tb-row { gap: calc(3px * var(--hs)); }
.hud-desk .hud-status .tool-belt .tb-slot { width: max(24px, calc(28px * var(--hs))); height: max(24px, calc(28px * var(--hs))); }
.hud-desk .hud-status .tool-belt .tb-all { width: max(20px, calc(22px * var(--hs))); height: max(24px, calc(28px * var(--hs))); }
.hud-desk .hud-status .tool-belt .tb-tip, .hud-desk .hud-status .tool-belt .tb-card { font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk #hudCluster > .bar-arrange { grid-area: arrange; width: 0; min-width: 100%; max-width: none; box-sizing: border-box; margin-bottom: calc(6px * var(--hs)); padding: calc(8px * var(--hs)) calc(10px * var(--hs)); font-size: max(11px, calc(14px * var(--ts, 1) * var(--hs))); }
.hud-desk #hudCluster > .bar-arrange .ba-row .chip { min-height: max(32px, calc(40px * var(--hs))); padding: 0 calc(12px * var(--hs)); font-size: max(11px, calc(14px * var(--ts, 1) * var(--hs))); }
/* The globes, at either end of the bar. */
.hud-desk #hudCluster > .orb { position: relative; left: auto; right: auto; bottom: auto; --globe: calc(96px * var(--hs)); border-width: max(3px, calc(4px * var(--hs))); }
.hud-desk #hudCluster > .orb.hp { grid-area: hp; }
.hud-desk #hudCluster > .orb.st { grid-area: st; }
.hud-desk .orb .orb-val { font-size: max(13px, calc(18px * var(--hs))); }
.hud-desk .orb .orb-val small { font-size: max(11px, 0.62em); }
.hud-desk .orb .orb-name { font-size: max(11px, calc(10px * var(--hs))); }
/* The strips, attached to the top of the bar: square where they meet it, and the bar's corner under a strip is square too. */
.hud-desk .hud-attach {
  grid-area: attach; display: flex; flex-wrap: wrap-reverse; align-items: flex-end; justify-content: space-between; gap: 0 calc(6px * var(--hs));
  width: 0; min-width: 100%; pointer-events: none;
}
.hud-desk .hud-attach > .pr-bar:not(.touch), .hud-desk .hud-attach > .gs-bar:not(.touch) {
  position: relative; left: auto; right: auto; bottom: auto; transform: none; z-index: auto; flex: none; box-sizing: border-box;
  gap: calc(5px * var(--hs)); padding: calc(5px * var(--hs)); margin-bottom: -1px; border-radius: calc(10px * var(--hs)) calc(10px * var(--hs)) 0 0; box-shadow: none;
}
.hud-desk .hud-attach > .pr-bar { order: 0; }
.hud-desk .hud-attach > .gs-bar { order: 1; }
.hud-desk .hud-attach > [hidden] { display: none; }
.hud-desk #hudCluster:has(.hud-attach > :not([hidden])) > .action-bar { border-top-left-radius: 0; }
.hud-desk:not(.hud-compact) #hudCluster:has(.pr-bar:not([hidden])):has(.gs-bar:not([hidden])) > .action-bar { border-top-right-radius: 0; }
/* The prayer strip: the points (their name over their number, and the meter), then a button for each prayer. */
.hud-desk .pr-bar:not(.touch) .pr-points { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center; row-gap: 1px; width: max(52px, calc(58px * var(--hs))); padding: 0; line-height: 1; }
.hud-desk .pr-bar:not(.touch) .pr-points-name, .hud-desk .pr-bar:not(.touch) .pr-points-word { font-size: max(11px, calc(11px * var(--hs))); line-height: 1; }
.hud-desk .pr-bar:not(.touch) .pr-points-num { font-size: max(12px, calc(15px * var(--hs))); line-height: 1; }
.hud-desk .pr-bar:not(.touch) .pr-meter { width: 100%; height: max(4px, calc(5px * var(--hs))); box-sizing: border-box; }
.hud-desk .pr-bar:not(.touch) .pr-list { gap: calc(5px * var(--hs)); }
.hud-desk .pr-bar:not(.touch) .pr-btn { min-width: 0; width: max(44px, calc(50px * var(--hs))); height: max(42px, calc(46px * var(--hs))); padding: 1px 0 2px; gap: 1px; }
.hud-desk .pr-bar:not(.touch) .pr-glyph { width: calc(16px * var(--hs)); height: calc(16px * var(--hs)); }
.hud-desk .pr-bar:not(.touch) .pr-short { font-size: max(11px, calc(11px * var(--hs))); letter-spacing: 0; }
.hud-desk .pr-bar:not(.touch) .pr-state, .hud-desk .pr-bar:not(.touch) .pr-key { font-size: max(11px, calc(10px * var(--hs))); letter-spacing: 0; }
.hud-desk .pr-bar:not(.touch) .pr-key { padding: 0 3px; }
/* The gear set strip: its name on two lines, then a button for each set. */
.hud-desk .gs-bar:not(.touch) .gs-title { flex-direction: column; justify-content: center; gap: 1px; width: max(32px, calc(36px * var(--hs))); padding: 0; white-space: normal; text-align: center; line-height: 1.1; font-size: max(11px, calc(11px * var(--hs))); letter-spacing: 0.02em; }
.hud-desk .gs-bar:not(.touch) .gs-list { gap: calc(5px * var(--hs)); }
.hud-desk .gs-bar:not(.touch) .gs-set { width: max(34px, calc(40px * var(--hs))); height: max(42px, calc(46px * var(--hs))); padding: 1px 0 2px; border-radius: calc(8px * var(--hs)); }
.hud-desk .gs-bar:not(.touch) .gs-set .gs-num { font-size: max(13px, calc(17px * var(--hs))); }
.hud-desk .gs-bar:not(.touch) .gs-set .gs-key, .hud-desk .gs-bar:not(.touch) .gs-set .gs-state { font-size: max(11px, calc(10px * var(--hs))); letter-spacing: 0; }
.hud-desk .gs-bar:not(.touch) .gs-set .gs-key { padding: 0 3px; }
/* Tight (a scale under 0.9, in a window smaller than 1280 by 720): the words are at their 11px floor, so the strips give
   up what they can to stay side by side on the bar: the gear sets their title (each button still says its number and
   Worn or Empty), the prayer points their name (the number and the meter stay); and a slot's Auto word is set in
   plain case, which is narrower. */
.hud-desk.hud-tight .gs-bar:not(.touch) .gs-title { display: none; }
.hud-desk.hud-tight .pr-bar:not(.touch) .pr-points { width: 36px; }
.hud-desk.hud-tight .pr-bar:not(.touch) .pr-points-name { display: none; }
.hud-desk.hud-tight .action-bar .slot .auto { text-transform: none; letter-spacing: 0; padding: 0 2px; }
/* Compact (the window is narrower than the cluster at its smallest scale): no key hints, tighter gaps, smaller globes. */
.hud-desk.hud-compact #hudCluster { column-gap: calc(6px * var(--hs)); }
.hud-desk.hud-compact #hudCluster > .action-bar { gap: calc(3px * var(--hs)); padding: calc(4px * var(--hs)); }
.hud-desk.hud-compact .action-bar .slots { gap: calc(3px * var(--hs)); }
.hud-desk.hud-compact .action-bar:not(.touch) .slot .key { display: none; }
.hud-desk.hud-compact .action-bar .bar-lock { width: calc(26px * var(--hs)); }
.hud-desk.hud-compact .action-bar .bar-auto .auto-fire { width: calc(26px * var(--hs)); height: calc(26px * var(--hs)); }
.hud-desk.hud-compact .action-bar .bar-auto .auto-fire svg { width: calc(21px * var(--hs)); height: calc(21px * var(--hs)); }
.hud-desk.hud-compact #hudCluster > .orb { --globe: calc(76px * var(--hs)); }
/* Wrapped (narrower still): the bar is two rows of three, and Attack is a slot like the others. The wrapped bar is
   narrower than a strip, so the strips stand over the whole cluster, the globes and the bar alike. */
.hud-desk.hud-wrap #hudCluster { grid-template-areas: "attach attach attach" "hp bar st"; }
.hud-desk.hud-wrap .action-bar .slots { display: grid; grid-template-columns: repeat(3, var(--s)); }
.hud-desk.hud-wrap .action-bar .slot.attack { --s2: var(--s); }
/* The prompt to interact stands just over the cluster, however tall the cluster is (hud-layout.js measures the rise). */
.hud-desk body.kit .act.interact {
  bottom: calc(var(--hud-rise, calc(170px * var(--hs))) + 8px * var(--hs)); min-height: max(40px, calc(48px * var(--hs))); min-width: calc(180px * var(--hs));
  max-width: min(calc(300px * var(--hs)), calc(100vw - 32px)); padding: calc(6px * var(--hs)) calc(16px * var(--hs)); gap: calc(10px * var(--hs));
  white-space: normal; text-align: center; line-height: 1.2; overflow-wrap: anywhere;
  font-size: max(12px, calc(15px * var(--ts, 1) * var(--hs)));
}
.hud-desk body.kit .act.interact .key { font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }

/* ---------------- top left: one line ----------------
   Where the hero is and how the fight stands, on one line: where it is too long the place is cut short with an
   ellipsis, never the count of the fight or a countdown (lab.css gives the two parts their shares).
   A tip, a pickup and the drill yard's way out stand under it while they are up, drawn over the chat box, so a tip
   that runs long is never under it. Everything else that used to stand here is on the cluster or in the chat box. */
.hud-desk #hudStack { z-index: 2; left: calc(12px * var(--hs) + var(--safe-l)); gap: calc(6px * var(--hs)); width: min(calc(480px * var(--hs)), calc(100vw - 174px * var(--hs) - var(--safe-l) - var(--safe-r))); min-width: 160px; }
.hud-desk body.kit #hudStack { top: calc(10px * var(--hs) + var(--safe-t)); }
.hud-desk body.kit.boss #hudStack { top: calc(76px * var(--hs) + var(--safe-t)); }
.hud-desk body.kit #hudStack #objective { flex-wrap: nowrap; font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); padding: calc(3px * var(--hs)) calc(10px * var(--hs)); }
.hud-desk #hudStack .rune-bar { min-height: max(32px, calc(40px * var(--hs))); padding: calc(3px * var(--hs)) calc(12px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk body.kit #hudStack #tip { max-width: min(calc(380px * var(--hs)), 100%); padding: calc(6px * var(--hs)) calc(8px * var(--hs)) calc(6px * var(--hs)) calc(10px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk body.kit #hudStack #tip button, .hud-desk body.kit #hudStack #pickup button { min-height: max(32px, calc(40px * var(--hs))); padding: calc(4px * var(--hs)) calc(10px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk body.kit #hudStack #pickup { padding: calc(6px * var(--hs)) calc(8px * var(--hs)) calc(6px * var(--hs)) calc(12px * var(--hs)); font-size: max(11px, calc(14px * var(--ts, 1) * var(--hs))); }

/* ---------------- top right: the Menu button and the route map ---------------- */
.hud-desk .top-right { right: calc(12px * var(--hs) + var(--safe-r)); top: calc(10px * var(--hs) + var(--safe-t)); }
.hud-desk body.kit #menuBtn { min-height: max(34px, calc(44px * var(--hs))); min-width: max(34px, calc(44px * var(--hs))); padding: 0 calc(11px * var(--hs)); gap: calc(8px * var(--hs)); font-size: max(12px, calc(15px * var(--hs))); }
.hud-desk body.kit #menuBtn .menu-glyph { width: calc(22px * var(--hs)); height: calc(22px * var(--hs)); }
.hud-desk body.kit #menuBtn kbd { min-width: max(20px, calc(24px * var(--hs))); height: max(20px, calc(24px * var(--hs))); font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }
.hud-desk .route-map { right: calc(12px * var(--hs) + var(--safe-r)); top: calc(18px * var(--hs) + max(34px, calc(44px * var(--hs))) + var(--safe-t)); width: calc(132px * var(--hs)); height: calc(150px * var(--hs)); padding: calc(4px * var(--hs)); }
.hud-desk .route-map.icon { width: calc(56px * var(--hs)); height: calc(48px * var(--hs)); padding: 0; font-size: max(11px, calc(13px * var(--hs))); }
.hud-desk .route-map.big { left: 50%; top: 50%; right: auto; width: min(calc(340px * var(--hs)), 86vw); height: min(calc(360px * var(--hs)), 78vh); }

/* ---------------- top center: the boss, and a boss's call ---------------- */
.hud-desk body.kit #bossBar { top: calc(8px * var(--hs) + var(--safe-t)); width: min(calc(560px * var(--hs)), calc(100vw - 304px * var(--hs) - var(--safe-l) - var(--safe-r))); min-width: 180px; padding: calc(6px * var(--hs)) calc(12px * var(--hs)) calc(8px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk body.kit #bossBar .boss-name { gap: calc(10px * var(--hs)); font-size: max(13px, calc(16px * var(--hs))); }
.hud-desk body.kit #bossBar .boss-name .muted, .hud-desk body.kit #bossBar #bossChannel span { font-size: max(11px, calc(12px * var(--hs))); }
.hud-desk body.kit #bossBar .track { height: calc(12px * var(--hs)); margin-top: calc(4px * var(--hs)); }
.hud-desk body.kit #bossBar .track.thin { height: calc(5px * var(--hs)); }
.hud-desk #alert { max-width: min(calc(520px * var(--hs)), calc(100vw - 32px)); padding: calc(8px * var(--hs)) calc(18px * var(--hs)); font-size: max(13px, calc(20px * var(--ts, 1) * var(--hs))); }
.hud-desk #alert.hazard { font-size: max(12px, calc(17px * var(--ts, 1) * var(--hs))); }

/* ---------------- markers that follow the world ----------------
   Sized by the same number. hud-layout.js gives the regions' measured boxes, and the markers step clear of them
   (door-arrows.js, gather.js, prayer.js and the name plates in main.js; hud-layout-plan.js clearMarker). */
.hud-desk .label3d { font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }
.hud-desk .label3d .mini { width: calc(56px * var(--hs)); height: max(4px, calc(5px * var(--hs))); }
.hud-desk .label3d.plain .mini { width: calc(34px * var(--hs)); height: max(3px, calc(4px * var(--hs))); }
.hud-desk .label3d.marked > div:first-child { font-size: max(12px, calc(13px * var(--hs))); }
.hud-desk .float { font-size: max(12px, calc(18px * var(--ts, 1) * var(--hs))); }
.hud-desk .float.miss { font-size: max(11px, calc(14px * var(--hs))); }
.hud-desk .float.gather { font-size: max(11px, calc(15px * var(--ts, 1) * var(--hs))); }
.hud-desk .float.gather.miss { font-size: max(11px, calc(14px * var(--ts, 1) * var(--hs))); }
.hud-desk .world-label { padding: calc(3px * var(--hs)) calc(8px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk .style-tell { gap: calc(4px * var(--hs)); padding: calc(2px * var(--hs)) calc(7px * var(--hs)) calc(2px * var(--hs)) calc(5px * var(--hs)); font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }
.hud-desk .style-tell .st-glyph { width: calc(14px * var(--hs)); height: calc(14px * var(--hs)); }
.hud-desk .gather-mark { gap: calc(3px * var(--hs)); min-width: max(40px, calc(48px * var(--hs))); min-height: max(36px, calc(44px * var(--hs))); padding: calc(4px * var(--hs)) calc(8px * var(--hs)) calc(5px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk .gather-mark svg { width: calc(20px * var(--hs)); height: calc(20px * var(--hs)); }
.hud-desk .gather-mark b { font-size: max(12px, calc(15px * var(--ts, 1) * var(--hs))); }
.hud-desk .gather-mark .gm-pips i { width: calc(12px * var(--hs)); height: calc(7px * var(--hs)); }
.hud-desk .gather-mark .gm-note { font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }
/* A door's marker: a box of 80 at scale 1 (door-arrows-plan.js ARROW_HALF is half of it), everything in it by the same number. */
.hud-desk .door-arrow { width: calc(80px * var(--hs)); height: calc(80px * var(--hs)); }
.hud-desk .door-arrow .da-plate { left: calc(18px * var(--hs)); top: calc(18px * var(--hs)); width: calc(44px * var(--hs)); height: calc(44px * var(--hs)); }
.hud-desk .door-arrow .da-plate svg { width: calc(26px * var(--hs)); height: calc(26px * var(--hs)); }
.hud-desk .door-arrow .da-point { left: calc(31px * var(--hs)); top: calc(31px * var(--hs)); width: calc(18px * var(--hs)); height: calc(18px * var(--hs)); }
.hud-desk .door-arrow .da-point svg { width: calc(18px * var(--hs)); height: calc(18px * var(--hs)); }
.hud-desk .door-arrow .da-word { top: calc(64px * var(--hs)); max-width: calc(96px * var(--hs)); font-size: max(11px, calc(11px * var(--ts, 1) * var(--hs))); }
.hud-desk .door-arrow.word-above .da-word { top: auto; bottom: calc(64px * var(--hs)); }

/* ---------------- bottom left: the chat box ----------------
   chat-box.js gives the box its place and its size (chat-plan.js placeBox among the regions), and --chat-scale, the
   HUD's scale held closer to 1. The words are the player's own text size by that number, never under 11px. */
.hud-desk .chat { font-size: max(11px, calc(var(--chat-text, 14px) * var(--ts, 1) * var(--chat-scale, 1))); }
.hud-desk .chat-tab, .hud-desk .chat-cog { min-height: max(26px, calc(26px * var(--chat-scale, 1))); }
.hud-desk .chat-tab b { font-size: max(11px, calc(12px * var(--chat-scale, 1))); }
.hud-desk .chat-tab small { font-size: max(11px, calc(10px * var(--chat-scale, 1))); min-height: 12px; }
.hud-desk .chat-cog { width: max(26px, calc(30px * var(--chat-scale, 1))); }
.hud-desk .chat.narrow .chat-tab b, .hud-desk .chat.narrow .chat-tab small { font-size: 11px; letter-spacing: -0.02em; }
.hud-desk .chat-latest { font-size: max(11px, calc(12px * var(--chat-scale, 1))); }
/* The small form on a desktop (no place for the whole box): its button is a mouse's size, in the corner it was asked for. */
.hud-desk .chat.compact .chat-open { width: max(32px, calc(40px * var(--hs))); height: max(32px, calc(40px * var(--hs))); }

/* ---------------- the UI scale's row on the Settings screen: a sample drawn at the scale in use ---------------- */
.hud-desk .camp .ui-scale .ui-scale-line { display: block; margin-top: 4px; font-weight: 700; color: var(--text); }
.hud-desk .camp .ui-scale .ui-scale-line:empty { display: none; }
.hud-desk .camp .ui-scale .ui-scale-set { display: flex; align-items: center; gap: 8px; }
.hud-desk .camp .ui-scale .ui-scale-set .option-state { min-width: 64px; }
.hud-desk .camp .ui-scale button[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.hud-desk .camp .ui-scale .ui-scale-sample { display: flex; align-items: center; gap: calc(8px * var(--hs)); margin-top: 8px; }
.hud-desk .camp .ui-scale .ui-scale-slot { position: relative; flex: none; width: calc(56px * var(--hs)); height: calc(56px * var(--hs)); border: 1px solid #6b5d44; border-radius: calc(9px * var(--hs)); background: #1d1a14; }
.hud-desk .camp .ui-scale .ui-scale-slot kbd { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); min-width: 0; height: auto; padding: 0 4px; border: 1px solid #5a4e3a; border-radius: 4px; box-shadow: none; background: #0a0805; color: #f0c27a; font: inherit; font-style: normal; font-size: max(11px, calc(10.5px * var(--hs))); line-height: 1.3; }
.hud-desk .camp .ui-scale .ui-scale-word { font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); color: var(--text); }

/* ---------------- the hall ----------------
   The hall's own HUD is sized by the same number: the Menu button, the small map under it (or the Map button), the
   line of the quest, and the plates over people and places. */
.hud-desk body.in-hall #menuBtn { min-height: max(40px, calc(48px * var(--hs))); min-width: max(40px, calc(48px * var(--hs))); padding: 0 calc(11px * var(--hs)); gap: calc(8px * var(--hs)); font-size: max(12px, calc(15px * var(--hs))); }
.hud-desk body.in-hall #menuBtn .menu-glyph { width: calc(22px * var(--hs)); height: calc(22px * var(--hs)); }
.hud-desk body.in-hall #menuBtn kbd { min-width: max(20px, calc(24px * var(--hs))); height: max(20px, calc(24px * var(--hs))); font-size: max(11px, calc(12px * var(--ts, 1) * var(--hs))); }
.hud-desk body.in-hall .hall-mini { right: calc(12px * var(--hs) + var(--safe-r)); top: calc(18px * var(--hs) + max(40px, calc(48px * var(--hs))) + var(--safe-t)); transform: scale(var(--hs)); transform-origin: top right; }
.hud-desk body.in-hall .hall-map-btn { right: calc(12px * var(--hs) + var(--safe-r)); top: calc(18px * var(--hs) + max(40px, calc(48px * var(--hs))) + var(--safe-t)); min-width: max(40px, calc(48px * var(--hs))); min-height: max(36px, calc(44px * var(--hs))); padding: 0 calc(12px * var(--hs)); font-size: max(11px, calc(15px * var(--ts, 1) * var(--hs))); }
.hud-desk body.in-hall #hudStack { top: calc(10px * var(--hs) + var(--safe-t)); }
.hud-desk body.in-hall #hudStack #objective { max-width: min(62vw, calc(460px * var(--hs))); padding: calc(5px * var(--hs)) calc(10px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
.hud-desk .plate3d { padding: calc(2px * var(--hs)) calc(8px * var(--hs)) calc(3px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }

/* ---------------- the Saving mark ----------------
   It used to stand in the bottom left, which is the chat box's corner. With a mouse and keyboard it stands in the
   bottom right (it shows in the hall and the camp only, where nothing else is there), and in the bottom left only
   for a player who has put the chat box in the bottom right. */
.hud-desk body:has(#chat[data-at="bottom-right"]) #saveMark { left: calc(10px * var(--hs) + var(--safe-l)); right: auto; }
.hud-desk #saveMark { left: auto; right: calc(10px * var(--hs) + var(--safe-r)); bottom: calc(10px * var(--hs) + var(--safe-b)); padding: calc(7px * var(--hs)) calc(12px * var(--hs)); font-size: max(11px, calc(13px * var(--ts, 1) * var(--hs))); }
