/* Echo Reapers game UI — hud.css (ER-1234, ER-1240, ER-1241, ER-1260): the persistent HUD, concept A "Plaque & Ledger".
   100 percent CSS, no background images, border-image or url() for chrome (ER-1169). The look is the shared menu material of
   menu-base.css, read only from the --menu-* tokens of er.css (section 2b): surface gradient, 2 px brass edge, 5 px radius
   shell; 44 px gold controls; 24 px status chips; the shared progress bar. The two content images that remain are the
   rarity badge on the plot plaque and the icons inside controls.
   Loaded after polish.css and fx.css so it is the last word on the HUD. DOM (main.js renderHud) and class names are unchanged:
   .plot-plaque, .hud-chips, .rail > .rail-btn, .hud-corner, .prealpha, plus the toasts and the tower plaques on the plot.
   Desktop geometry at 1536x864: plaque x16/y12 480x112 (grows with the owner name, ER-1348); rail x16, vertically centred on the screen (ER-1349), icon-only 44 px rows whose text slides out to the right
   on hover and keyboard focus; clock/balance/pending/account top right; Queues and Daily Amber bottom right; version bottom left. */

/* -- shell material shared by the HUD groups ------------------------------------------------------------------------- */
.hud :is(.plot-plaque, .hud-chips, .rail, .hud-corner) {
  box-sizing: border-box; margin: 0; overflow: visible; isolation: isolate;
  border: 1.5px solid color-mix(in srgb, var(--menu-brass) 62%, transparent); border-image: none; border-radius: 5px;
  background: linear-gradient(color-mix(in srgb, var(--menu-surface-bottom) 64%, transparent), color-mix(in srgb, var(--menu-surface-bottom) 72%, transparent));
  color: var(--menu-ink);
  box-shadow: inset 0 0 0 1px var(--menu-inset), 0 8px 22px var(--menu-shadow);
  -webkit-backdrop-filter: none; backdrop-filter: none; filter: none;
}
.hud .plot-plaque::before { display: none; content: none; }
.hud :is(button, a):focus-visible { outline: 3px solid var(--menu-focus); outline-offset: 2px; }
.hud .hud-kit-icon { display: block; flex: none; background-position: center; background-size: contain; background-repeat: no-repeat; }
.hud .ico.painted { width: 22px; height: 22px; vertical-align: middle; }
.hud .ico.painted :is(img, .kit-atlas-icon) { filter: drop-shadow(0 1px 1px var(--menu-shadow)); }

/* -- plot plaque (ER-1280, approved with change from review plot-plaque-v1): rarity gem in a brass well column, serif label, rarity chip,
   terrain / worksite (with its resource icon) / owner, and one fact row read from the board. Our own gem, NO hexagon well behind it. ------ */
.hud .plot-plaque {
  position: absolute; left: 16px; top: 12px; width: max-content; min-width: min(480px, calc(100vw - 32px)); height: 112px; max-width: calc(100vw - 32px);   /* ER-1348: variant B; grows with the owner name; main.js fitPlaque caps it at the clock group */
  display: flex; align-items: stretch; gap: 0; padding: 0;
  text-align: left; font: inherit; white-space: normal; cursor: pointer;
}
.hud .plot-plaque::before { content: none; display: none; }
.hud .plot-plaque > * { position: relative; z-index: 2; }
.hud .plot-plaque:hover { border-color: var(--menu-focus); }
.hud .plot-plaque .pp-col {
  flex: none; width: 68px; display: flex; align-items: center; justify-content: center;
  background: var(--menu-head); border-right: 1px solid var(--menu-brass); border-radius: 3px 0 0 3px;
}
.hud .plot-plaque .gem {
  flex: none; display: block; position: static; width: 52px; height: 52px; margin: 0; transform: none; clip-path: none; border: 0;
  border-radius: 0; box-shadow: none; animation: none; vertical-align: baseline; filter: drop-shadow(0 2px 3px var(--menu-shadow));
  background: var(--gem-common) center / contain no-repeat;   /* ER-1302: Set B gems via icon-set.js (--gem-<rarity>) */
}
.hud .plot-plaque .gem::before, .hud .plot-plaque .gem::after { display: none; content: none; }
.hud .plot-plaque .gem[data-kind="rare"] { background-image: var(--gem-rare); }
.hud .plot-plaque .gem[data-kind="epic"] { background-image: var(--gem-epic); }
.hud .plot-plaque .gem[data-kind="legendary"] { background-image: var(--gem-legendary); }
.hud .plot-plaque .gem[data-kind="mythic"] {
  background-image: var(--gem-mythic);
  animation: mythic-gem-shimmer 6s ease-in-out infinite;
}
.hud .plot-plaque .gem-mini {
  display: block; flex: none; width: 13px; height: 13px; background: var(--gem-common-sm) center / contain no-repeat;
}
.hud .plot-plaque .gem-mini[data-kind="rare"] { background-image: var(--gem-rare-sm); }
.hud .plot-plaque .gem-mini[data-kind="epic"] { background-image: var(--gem-epic-sm); }
.hud .plot-plaque .gem-mini[data-kind="legendary"] { background-image: var(--gem-legendary-sm); }
.hud .plot-plaque .gem-mini[data-kind="mythic"] { background-image: var(--gem-mythic-sm); }
@keyframes mythic-gem-shimmer {
  0%, 13%, 100% { filter: brightness(1) drop-shadow(0 2px 3px var(--menu-shadow)); }
  6% { filter: brightness(1.22) drop-shadow(0 0 5px var(--menu-focus)); }
}
@media (prefers-reduced-motion: reduce) { .hud .plot-plaque .gem[data-kind="mythic"] { animation: none; } }
.hud .plaque-text { display: flex; flex-direction: column; justify-content: flex-start; gap: 0; min-width: 0; flex: 1 1 auto; padding: 0; line-height: 1.2; }
.hud .plaque-sub, .hud .plaque-stats { padding: 5px 12px 0; }
/* ER-1348 header band: title left, owner chip right, Yours badge after the name; the name truncates last */
.hud .plaque-text .band {
  display: flex; align-items: center; gap: 10px; min-width: 0; height: 46px; padding: 0 10px 0 12px;
  background: none; border-radius: 0 3px 0 0; position: relative;   /* ER-1660: no own background; the plaque glass shows through. ER-1673: the old 1px divider is the shared banner line below */
}
.hud .band .plot-label { flex: none; }
.hud .own-chip {
  position: relative; display: flex; align-items: center; gap: 5px; min-width: 0; flex: 0 1 auto; margin-left: auto; justify-content: flex-end; height: 30px; padding: 0 6px;
  border: 1px solid var(--menu-edge); border-radius: 3px; background: var(--menu-card);
}
.hud .own-chip.mine > .ico { display: none; }
.hud .own-chip > .ico { width: 20px; height: 20px; }
.hud .own-chip .plaque-owner { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.2 var(--font-body); }
.hud .own-chip .plaque-yours { flex: none; min-height: 22px; padding: 0 7px; font: 700 13px/1 var(--font-body); }
.hud .own-chip .full-tip {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 9; max-width: 360px; padding: 6px 10px; border: 1px solid var(--menu-focus); border-radius: 3px;
  background: var(--menu-surface-bottom); color: var(--menu-title); font: 600 14px/1.2 var(--font-body); box-shadow: 0 6px 16px var(--menu-shadow); white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 120ms;
}
.hud .own-chip .full-tip::before {
  content: ""; position: absolute; right: 30px; top: -6px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--menu-surface-bottom);
  border-left: 1px solid var(--menu-focus); border-top: 1px solid var(--menu-focus);
}
.hud .own-chip:hover .full-tip, .hud .plot-plaque:focus-visible .full-tip { opacity: 1; visibility: visible; }
.hud .plaque-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud .plot-label {
  display: block; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 700 24px/1.2 var(--font-display); letter-spacing: 0; color: var(--menu-title); text-shadow: none;
}
/* the chip is an inline box inside the label so the label reads "Plot X · Rarity" as one line of text */
.hud .plaque-kind {
  display: inline; margin-left: 8px; padding: 3px 8px; border: 1px solid var(--menu-brass); border-radius: 3px; vertical-align: middle;
  background: var(--menu-status); color: var(--menu-title); font: 600 12px/1.2 var(--font-body); white-space: nowrap;
}
.hud .plaque-kind .gem-mini { display: inline-block; vertical-align: -2px; margin-right: 4px; }
.hud .plaque-kind .sep { font-size: 0; line-height: 0; }   /* kept in the text for readers of the label (Plot X · Rarity); never drawn, never clipped */
.hud .plaque-yours { flex: none; }
.hud .plaque-sub {
  display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 14px/1.2 var(--font-body); letter-spacing: 0; font-variant-caps: normal; text-transform: none; color: var(--menu-muted);
}
.hud .plaque-owner { text-transform: none; color: var(--menu-ink); }
.hud .plaque-stats {
  display: flex; align-items: center; justify-content: space-evenly; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap;
  font: 600 13px/1.2 var(--font-body); color: var(--menu-ink);
}
.hud .plaque-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.hud .plaque-stats .ico.painted { width: 20px; height: 20px; }
.hud .res-icon { display: inline-block; width: 16px; height: 16px; margin: -3px 0 0 4px; vertical-align: middle; object-fit: contain; }

/* -- top right: clock, balance, pending, account (one ledger group) ----------------------------------------------------- */
.hud .hud-chips {
  position: absolute; right: 16px; top: 12px; left: auto; height: auto; max-width: calc(100vw - 32px);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 4px;
}
.hud .hud-corner {
  position: absolute; right: 16px; bottom: 12px; top: auto; left: auto; display: flex; align-items: center; gap: 8px; padding: 4px;
}
.hud .chip {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; height: auto; min-height: 44px; margin: 0;
  padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--menu-brass) 40%, transparent); border-image: none; border-radius: 4px; transform: none; filter: none;
  background: color-mix(in srgb, var(--menu-inset) 55%, transparent); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--menu-title); font: 600 14px/1.15 var(--font-body); letter-spacing: 0; white-space: nowrap; text-shadow: 0 1px 3px var(--menu-shadow);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 150ms, border-color 150ms;
}
.hud .chip:hover { background: color-mix(in srgb, var(--menu-inset) 72%, transparent); border-color: var(--menu-focus); transform: none; filter: none; }
.hud .chip .ico { box-sizing: border-box; display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; overflow: hidden; border-radius: 3px; background-color: color-mix(in srgb, var(--menu-inset) 40%, transparent); color: var(--menu-brass); }
.hud .chip-stack { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; min-width: 0; text-align: left; }
.hud .chip-stack > :first-child { font-weight: 600; color: var(--menu-title); }
.hud .chip-sub { font: 400 12px/1.15 var(--font-body); color: var(--menu-muted); white-space: nowrap; }
.hud .chip .unit { font-weight: 600; }
.hud .chip .avatar-frame { position: static; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 3px; background-color: color-mix(in srgb, var(--menu-inset) 40%, transparent); }
.hud .chip.avatar { padding: 2px 10px 2px 6px; }
.hud .chip.avatar img {
  display: block; width: 28px; height: 28px; margin: 0; border: 1px solid var(--menu-brass); border-radius: 50%; object-fit: cover; background: var(--menu-surface-bottom);
}
.hud .chip .avatar-name { position: static; width: auto; height: auto; max-width: 160px; overflow: hidden; clip: auto; text-overflow: ellipsis; font-weight: 600; }
.hud .daily-amber-chip { white-space: nowrap; }
.hud .daily-amber-chip .daily-amber-pending { min-width: 8.5em; color: var(--menu-muted); }
/* ER-1946: HUD buttons use the shared Smoked Quartz .btn face. */

/* -- rail: icon only; the text slides out to the right on hover and keyboard focus (ER-1260) ----------------------------- */
.hud .rail {
  position: absolute; left: 16px; top: 50%; bottom: auto; transform: translateY(-50%); width: auto; height: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px;   /* ER-1349: vertically centred on the screen */
}
.hud .rail-btn {
  position: relative; box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0;
  border: 1px solid color-mix(in srgb, var(--menu-brass) 40%, transparent); border-image: none; border-radius: 3px; background: color-mix(in srgb, var(--menu-inset) 40%, transparent); color: var(--menu-title); box-shadow: none;
  font: 500 14px/1.2 var(--font-body); letter-spacing: 0; text-transform: none; text-shadow: none; cursor: pointer; transform: none; filter: none;
  transition: background-color 150ms, border-color 150ms;
}
.hud .rail-btn .ico { width: 24px; height: 24px; margin: 0; font-size: 1rem; }
.hud .rail-btn:hover, .hud .rail-btn:focus-visible { border-color: var(--menu-focus); transform: none; filter: none; }
.hud .rail-btn[aria-current="true"], .hud .rail-btn.active {
  border-color: var(--menu-focus); background: color-mix(in srgb, var(--menu-inset) 40%, transparent); box-shadow: inset 4px 0 0 var(--menu-focus); color: var(--menu-title);
}
.hud .rail-label {
  position: absolute; left: calc(100% + 10px); top: 0; bottom: 0; z-index: 3; display: flex; align-items: center; box-sizing: border-box; padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--menu-brass) 40%, transparent); border-radius: 4px; background: color-mix(in srgb, var(--menu-inset) 72%, transparent); box-shadow: 0 6px 16px var(--menu-shadow);
  color: var(--menu-title); font: 600 14px/1.2 var(--font-body); white-space: nowrap; text-align: left;
  opacity: 0; visibility: hidden; transform: translateX(-12px); pointer-events: none;
  transition: opacity 150ms, transform 150ms, visibility 0s linear 150ms;
}
.hud .rail-btn:is(:hover, :focus-visible) .rail-label { opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .hud .rail-label, .hud .chip, .hud .btn, .hud .rail-btn { transition: none; }
}

/* -- version chip -------------------------------------------------------------------------------------------------------- */
.prealpha {
  position: fixed; z-index: 40; left: 16px; bottom: 12px; top: auto; right: auto; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px;
  min-height: 24px; max-width: calc(100vw - 32px); padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--menu-brass) 40%, transparent); border-radius: 4px;
  background: color-mix(in srgb, var(--menu-inset) 72%, transparent); color: var(--menu-title); font: 600 12px/1.2 var(--font-body); letter-spacing: 0; font-variant-caps: normal;
  white-space: nowrap; pointer-events: none; user-select: none;
}
.prealpha .version-compact, .prealpha .reload-short { display: none; }
.prealpha .version-reload {
  display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 -10px 4px; padding: 0 10px; pointer-events: auto;
  color: var(--menu-focus); text-decoration: underline;
}
.prealpha .version-reload[hidden] { display: none; }
.prealpha:has(.version-reload:not([hidden])) { min-height: 44px; }

/* narrow desktops (up to 1300 px): a slimmer version chip so it never reaches a site plate of the classic stage */
@media (max-width: 1300px) and (min-width: 601px) {
  .prealpha { left: 8px; gap: 3px; padding: 2px 4px; font-size: 12px; letter-spacing: -0.02em; }
}

/* -- toasts: the same material, bottom right above the corner chips ------------------------------------------------------- */
.toasts {
  position: fixed; z-index: 100; right: 16px; left: auto; top: auto; bottom: 76px; transform: none; width: min(400px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; pointer-events: none;
}
.toast {
  position: relative; box-sizing: border-box; display: grid; grid-template-columns: 24px minmax(0, 1fr) 44px; align-items: start; gap: 10px; min-height: 48px;
  padding: 4px 4px 4px 12px; pointer-events: auto; border: 2px solid var(--menu-edge); border-left: 6px solid var(--menu-brass); border-radius: 5px;
  background: linear-gradient(var(--menu-surface-top), var(--menu-surface-bottom)); box-shadow: inset 0 0 0 1px var(--menu-inset), 0 8px 22px var(--menu-shadow);
  color: var(--menu-ink); font: 400 14px/1.35 var(--font-body); animation: none;
}
.toast::before { content: none; display: none; }
.toast > .ico { width: 24px; height: 24px; margin-top: 8px; color: var(--menu-brass); }
.toast-warn { border-left-color: var(--warn); }
.toast-warn > .ico { color: var(--warn); }
.toast-danger { border-left-color: var(--danger); }
.toast-danger > .ico { color: var(--danger); }
.toast-text { min-width: 0; padding: 10px 0; overflow-wrap: anywhere; }
.toast-close {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--menu-brass); border-radius: 3px;
  background: var(--menu-card); color: var(--menu-title); cursor: pointer;
}
.toast-close:hover { background: var(--menu-hover); border-color: var(--menu-focus); }
.toast-close:focus-visible { outline: 3px solid var(--menu-focus); outline-offset: 2px; }
.toast-close .ico { width: 20px; height: 20px; }

/* -- tower plaques on the plot (ER-1280): the approved BANNER (review tower-plaques-v1). A 272 px menu tile with one more layer of detail:
   the band crest hangs over the top edge like a seal, the name sits centred in a header band in the display serif, rarity (Set B painted gem, ER-1302) /
   band / level and the owner under it, two icon wells (Power; Reapers inside with the band multiplier) or one state chip, and the bar with its
   percent. 100 percent CSS; only content images (crest, gem, element and painted icons). The whole site stays the click target. ------------------ */
html[data-theme] body .plot-view .plot-site .plaque.banner {
  box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; container-type: normal; min-height: 0; padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--menu-brass) 62%, transparent); border-radius: 5px; background: linear-gradient(color-mix(in srgb, var(--menu-surface-bottom) 64%, transparent), color-mix(in srgb, var(--menu-surface-bottom) 72%, transparent));
  box-shadow: inset 0 0 0 1px var(--menu-inset), 0 8px 18px var(--menu-shadow); overflow: visible; color: var(--menu-ink); text-align: center;
}
html[data-theme] body .plot-view .plot-site .plaque.banner::before { content: none; display: none; }
html[data-theme] body .plot-view .plot-site .plaque.banner::after {
  content: ""; display: block; position: absolute; inset: 0; flex: none; margin: 0; pointer-events: none; z-index: 1; background:
    linear-gradient(var(--menu-focus), var(--menu-focus)) 3px 3px / 12px 1px no-repeat, linear-gradient(var(--menu-focus), var(--menu-focus)) 3px 3px / 1px 12px no-repeat,
    linear-gradient(var(--menu-focus), var(--menu-focus)) right 3px top 3px / 12px 1px no-repeat, linear-gradient(var(--menu-focus), var(--menu-focus)) right 3px top 3px / 1px 12px no-repeat,
    linear-gradient(var(--menu-focus), var(--menu-focus)) 3px bottom 3px / 12px 1px no-repeat, linear-gradient(var(--menu-focus), var(--menu-focus)) 3px bottom 3px / 1px 12px no-repeat,
    linear-gradient(var(--menu-focus), var(--menu-focus)) right 3px bottom 3px / 12px 1px no-repeat, linear-gradient(var(--menu-focus), var(--menu-focus)) right 3px bottom 3px / 1px 12px no-repeat;
}
/* stage.css anchors every plaque to its plinth (top: anchor(bottom), margin -8 px) and pins 266/290 px widths with !important: the banner is 272 px, 6 px below the plinth */
@media (min-width: 601px) {
  /* ER-1288: the banner sits 25 px higher than under the plinth edge so the crest and the bar stay on screen above the bottom-right chips */
  html[data-theme] body .plot-view { --bn-lift: 25px; }
  html[data-theme] body .plot-view .plot-site .plaque.banner { width: 272px !important; height: auto !important; min-height: 0; margin-top: calc(6px - var(--bn-lift)); transform-origin: 50% 0; transform: scale(var(--bn-k, 1)); }
  /* below 1536 px the plot scene is narrower than the 288 px site pitch needs: plot.js sets --bn-k (viewport / 1536 x 864, at least .78) so neighbours never touch */
  html[data-theme] body .plot-view .plot-site:is(.state-tower, .state-grace, .state-outpost) .plaque.banner { transform: translateX(-50%) scale(var(--bn-k, 1)); }
}
html[data-theme] body .plot-view .plot-site .plaque.banner > * { position: relative; z-index: 2; flex: none; }
html[data-theme] body .plot-view .plot-site .plaque.banner > .bn-crest {
  position: absolute; left: 50%; top: -16px; width: 36px; height: 36px; margin-left: -18px; z-index: 3; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 2px 2px var(--menu-shadow));
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-head {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 34px; padding: 15px 10px 2px; background: var(--menu-head); border-bottom: 1px solid var(--menu-brass); border-radius: 3px 3px 0 0;
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-head .title {
  display: block; min-width: 0; font: 600 18px/1 var(--font-display); letter-spacing: 0; color: var(--menu-title); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none;
}
html[data-theme] body .plot-view .plot-site .plaque.banner.is-down .bn-head .title { color: var(--menu-muted); }
html[data-theme] body .plot-view .plot-site .plaque.banner.is-fallen { opacity: .9; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-meta {
  display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 5px 8px 0; overflow: hidden; white-space: nowrap;
  font: 500 11.5px/1.2 var(--font-body); color: var(--menu-muted);
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-meta.bn-owner { padding-top: 0; font-size: 10.5px; gap: 4px; min-height: 14px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-part { display: inline-flex; align-items: center; gap: 3px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-meta .sep { padding: 0 1px; opacity: .6; }
html[data-theme] body .plot-view .plot-site .plaque.banner :is(.bn-gem, .bn-el) { display: block; width: 15px; height: 15px; flex: none; object-fit: contain; }
html[data-theme] body .plot-view .plot-site .plaque.banner .ico.painted { display: inline-block; flex: none; width: 14px; height: 14px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .ico.painted img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px var(--menu-shadow)); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-own { color: var(--menu-ink); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-yours { color: var(--ok); font-weight: 600; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-wells { display: flex; gap: 6px; padding: 3px 8px 0; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 1px 6px;
  border: 1px solid var(--menu-edge); border-radius: 3px; background: var(--menu-card);
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well .ico.painted, html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well .bn-el { width: 20px; height: 20px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well-text { display: block; text-align: left; min-width: 0; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well b {
  display: block; font: 600 13.5px/1.1 var(--font-body); color: var(--menu-title); font-variant-numeric: tabular-nums; white-space: nowrap;
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-well small {
  display: block; font: 600 9.5px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--menu-muted); white-space: nowrap;
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state { display: flex; justify-content: center; align-items: center; padding: 3px 8px 0; min-height: 29px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state:last-child { padding-bottom: 6px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip { gap: 5px; max-width: 100%; padding: 2px 6px; font-size: 11.5px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip .ico.painted { width: 16px; height: 16px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip .state-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip.is-danger { color: var(--menu-attention-ink); background: var(--menu-attention-bg); border-color: var(--menu-attention-border); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip.is-warn { color: var(--menu-warn-ink); background: var(--menu-warn-bg); border-color: var(--menu-warn-border); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-state .menu-chip.bn-open { border-style: dashed; color: var(--menu-muted); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar { display: flex; align-items: center; gap: 6px; padding: 3px 8px 5px; margin-top: auto; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar small { flex: 1 1 auto; text-align: center; font: 600 9px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--menu-muted); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar .ico.painted { width: 16px; height: 16px; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track {
  position: static; flex: 1 1 auto; height: 8px; border: 1px solid var(--menu-brass); border-radius: 3px; background: var(--menu-inset); overflow: hidden;
}
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track i { display: block; height: 100%; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track i.dur { background: var(--menu-brass); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track i.hp { background: var(--ok); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track i.warn { background: var(--warn); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-track i.danger { background: var(--danger); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-pct { min-width: 34px; text-align: right; font: 600 12px/1 var(--font-body); color: var(--menu-title); font-variant-numeric: tabular-nums; }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-pct.warn { color: var(--menu-warn-ink); }
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-pct.danger { color: var(--menu-attention-ink); }
html[data-theme] body .plot-view .plot-site .plaque.banner.is-down { border-color: var(--danger); }
html[data-theme] body .plot-view .plot-site:is(:hover, :focus-visible) .plaque.banner { border-color: var(--menu-focus); }
html[data-theme] body .plot-view .plot-site[aria-pressed="true"] .plaque.banner { border-color: var(--menu-focus); }
/* 5-site plots: the plinths sit closer and lower, so the banner keeps crest, name, the two stat boxes or the state chip, and the bar (rarity / owner lines hide) */
html[data-theme] body .plot-view[data-sites="5"] .plot-site .plaque.banner .bn-meta { display: none; }
/* the plain title/subtitle fallback tile (no banner facts) keeps the same material */
html[data-theme] body .plot-view .plot-site .plaque:not(.banner) {
  border: 1.5px solid color-mix(in srgb, var(--menu-brass) 62%, transparent); border-radius: 5px; background: linear-gradient(color-mix(in srgb, var(--menu-surface-bottom) 64%, transparent), color-mix(in srgb, var(--menu-surface-bottom) 72%, transparent));
  box-shadow: inset 0 0 0 1px var(--menu-inset), 0 8px 18px var(--menu-shadow); overflow: hidden;
}
html[data-theme] body .plot-view .plot-site .plaque:not(.banner) .t { color: var(--menu-title); text-shadow: none; }
html[data-theme] body .plot-view .plot-site .pending-badge {
  display: flex; align-items: center; justify-content: center; z-index: 6; box-shadow: none; overflow: hidden;
}
html[data-theme] body .plot-view .plot-site .pending-badge .t { position: static; display: flex; align-items: center; justify-content: center; color: var(--menu-warn-ink); text-shadow: none; }
html[data-theme] body .plot-view .plot-site .pending-badge .t b { font: 600 12px/1.2 var(--font-body); letter-spacing: 0; color: var(--menu-warn-ink); white-space: nowrap; }

/* -- phone: plaque on top, chips beneath, icon rail along the bottom (desktop first, kept usable) ------------------------------ */
@media (max-width: 600px) and (orientation: portrait) {
  .hud .plot-plaque { left: 8px; top: 8px; width: calc(100vw - 16px); min-width: 0; height: auto; min-height: 112px; padding: 0; }
  .hud .plot-plaque .pp-col { width: 56px; }
  .hud .plot-plaque .gem { width: 40px; height: 40px; }
  .hud .plaque-text .band { flex-wrap: wrap; height: auto; padding: 4px 10px 5px 12px; gap: 2px 10px; }   /* 360 px: the owner chip wraps to its own line */
  .hud .own-chip { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  .hud .own-chip.mine > .ico { display: block; }
  .hud .own-chip .plaque-yours { display: inline-flex; margin-left: auto; }
  html[data-theme] body .plot-view .plot-site .plaque.banner :is(.bn-wells, .bn-meta) { display: none; }   /* phone: crest, name, state chip and bar only (desktop first) */
  .hud .plot-label { font-size: 17px; }
  .hud .hud-chips { top: 78px; right: 8px; left: 8px; gap: 4px; }
  .hud .chip { padding: 2px 6px; gap: 4px; font-size: 12px; }
  .hud .chip .chip-sub, .hud .chip .avatar-name, .hud .tick-chip .ico { display: none; }
  .hud .rail { position: absolute; left: 8px; right: 8px; top: auto; bottom: 8px; transform: none; flex-direction: row; justify-content: space-between; }
  .hud .rail-label { display: none; }
  .hud .hud-corner { display: none; }
  .prealpha { left: 8px; bottom: 72px; }
  .prealpha .version-label { display: none; }
  .prealpha .version-compact { display: inline; }
  .prealpha .reload-long { display: none; }
  .prealpha .reload-short { display: inline; }
  .toasts { right: 8px; bottom: 112px; width: calc(100vw - 16px); }
}

/* spotlight hover (ER-1274/1299): style B of review site-hover-v1. On hover or keyboard focus of any clickable site (every tower and plinth state,
   and the worksite) the backdrop dims around the art, soft fade in 180 ms and out 220 ms. plot.js measures the art's alpha box and sets --spot-x/y/rx/ry;
   the lit site is raised above the overlay (held until the fade-out ends), the plaque is never dimmed. No layout shift, no resizing. Reduced motion: instant. */
@property --spot-x { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --spot-y { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --spot-rx { syntax: "<length>"; inherits: true; initial-value: 300px; }
@property --spot-ry { syntax: "<length>"; inherits: true; initial-value: 300px; }
.plot-view .spot-dim {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse var(--spot-rx) var(--spot-ry) at var(--spot-x) var(--spot-y),
    transparent 0, transparent 62%, color-mix(in srgb, var(--spot-dim) 26%, transparent) 82%, color-mix(in srgb, var(--spot-dim) 42%, transparent) 100%);
  transition: opacity .22s ease-out, --spot-x .2s ease, --spot-y .2s ease, --spot-rx .2s ease, --spot-ry .2s ease;
}
.plot-view .spot-dim.is-on { opacity: 1; transition: opacity .18s ease-in, --spot-x .2s ease, --spot-y .2s ease, --spot-rx .2s ease, --spot-ry .2s ease; }
.plot-view .plot-site.spot-lit { z-index: 7; }
.plot-view .structure.spot-lit, .plot-view .worksite-shadow.spot-lit, .plot-view .spot-ring-worksite.spot-lit { z-index: 5; }
.plot-view .plot-site .spot-ring, .plot-view .spot-ring-worksite {
  border-radius: 50%; border: 3px solid var(--menu-brass); box-sizing: border-box; pointer-events: none; opacity: 0; transition: opacity .22s ease-out;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--spot-dim) 60%, transparent), 0 0 18px color-mix(in srgb, var(--menu-focus) 50%, transparent), inset 0 0 14px color-mix(in srgb, var(--menu-focus) 40%, transparent);
}
.plot-view .spot-ring-worksite { position: absolute; }
.plot-view .plot-site .spot-ring.is-hot, .plot-view .spot-ring-worksite.is-hot, .plot-view .plot-site.is-hot .spot-ring { opacity: 1; transition-duration: .18s; }
.plot-view .spot-tag {
  position: absolute; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .22s ease-out, transform .22s ease-out; transform: translateY(4px);
}
.plot-view .spot-tag { z-index: 7; transform: translate(-50%, 4px); white-space: nowrap; }
.plot-view .spot-tag.is-hot { opacity: 1; transform: translate(-50%, 0); transition-duration: .18s; }
.plot-view .worksite-open:hover:hover { background: transparent; }   /* the spotlight is the hover look (ER-1274); the old tint is retired */
@media (prefers-reduced-motion: reduce) {
  .plot-view .spot-dim, .plot-view .spot-dim.is-on, .plot-view .plot-site .spot-ring, .plot-view .spot-ring-worksite,
  .plot-view .spot-tag { transition: none; }
  .plot-view .spot-tag, .plot-view .spot-tag.is-hot { transform: translate(-50%, 0); }
}
/* end of spotlight hover (ER-1274/1299) */
