/* ER-1671: one gridded Worksite plot frame. The persistent HUD plaque occupies its first cell visually;
   terrain, Power, picture and production are in-flow children of this frame. */
.wh-frame { position: fixed; z-index: 3; display: grid; box-sizing: border-box; grid-template-columns: var(--wh-left) minmax(0, 1fr); grid-template-rows: var(--wh-plaque) var(--wh-terrain) var(--wh-power-h); overflow: visible; pointer-events: none;
  border: 1px solid var(--glass-rim); border-radius: var(--radius-frame);
  background: var(--glass-frame);
  box-shadow: var(--glass-shadow); color: var(--menu-ink); }
.wh-frame > * { min-width: 0; min-height: 0; }
.wh-frame .lp-tpref { grid-area: 2 / 1; position: relative; inset: auto; width: 100%; min-width: 0; max-width: none; height: 100%; padding: 0; margin: 0; pointer-events: auto; }
.wh-frame .wh-power { grid-area: 3 / 1; }
.wh-frame .wh-pic { grid-area: 1 / 2 / 3 / 3; box-sizing: border-box; min-width: 0; padding: 0; border-radius: 0 3.5px 0 0; }   /* ER-1684: the right column takes the whole inner width (no gap before the right border) and the picture is clipped to the frame's inner top-right radius (5px - 1.5px border), so the border stays on top at the corner. ER-1679: the terrain picture fills its whole cell edge to edge: no padding, no inner rounded box */
.wh-frame .wh-out { grid-area: 3 / 2; }
.wh-frame .lp-tpref, .wh-frame :is(.wh-power, .wh-out) { border: 0; border-radius: 0; background: none; box-shadow: none; }
.wh-frame .lp-tpref::before, .wh-frame :is(.wh-power, .wh-out)::before { content: none; }
.wh-frame :is(.lp-tpref, .wh-power, .wh-out) .tp-well { border-radius: 0; }
.wh-frame :is(.lp-tpref, .wh-power) .tp-well { background: var(--glass-art-well); }
.wh-frame .lp-tpref, .wh-frame .wh-power { border-top: 1px solid var(--glass-divider); }
.wh-frame .wh-pic, .wh-frame .wh-out { border-left: 1px solid var(--glass-divider); }
.wh-frame .wh-out { border-top: 1px solid var(--glass-divider); }
.wh-pic { position: relative; overflow: hidden; pointer-events: none; }
.wh-pic .wh-snap { position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 0; background: var(--glass-art-well); }
.wh-pic .wh-scene { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.wh-pic .wh-back { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wh-pic .wh-ws { position: absolute; transform: translateX(-50%); width: auto; max-width: none; object-fit: contain; }
.wh-snap-ico { width: 40%; height: 40%; object-fit: contain; opacity: .8; }
.wh-title { position: fixed; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .22em; box-sizing: border-box; pointer-events: none; }
.wh-title .wh-line { display: flex; align-items: center; justify-content: center; gap: .28em; max-width: 100%; white-space: nowrap; }
.wh-title .wh-name { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: .01em; padding: 0 .05em .08em;
  background: linear-gradient(180deg, var(--menu-title) 8%, var(--menu-focus) 45%, var(--menu-brass) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 5px var(--menu-shadow)) drop-shadow(0 0 3px var(--menu-shadow)) drop-shadow(0 0 12px color-mix(in srgb, var(--menu-shadow) 80%, transparent)); }
.wh-title .menu-banner-rule { --banner-gap: 8px; }   /* ER-1680: the same gap as the tower and plot titles (8 px + the shared extra) */
.wh-title .wh-ico { flex: none; width: 1em; height: 1em; margin: 0; object-fit: contain; filter: drop-shadow(0 2px 6px var(--menu-shadow)) drop-shadow(0 0 2px var(--menu-shadow)); }
.wh-row { position: fixed; z-index: 3; display: flex; align-items: stretch; box-sizing: border-box; margin: 0; font-size: 13px; line-height: 1.2; color: var(--menu-ink); }
.land-panel.is-picking-view .wh-row { pointer-events: none; }   /* ER-1847: the row is invisible while a picker is open (its frames are hidden), so it must not cover the Title and Power tiles */
.wh-row dl, .wh-row dd, .wh-row dt, .wh-frame dl, .wh-frame dd, .wh-frame dt { margin: 0; }   /* ER-1679: the Power and Harvest/Food boxes now live in .wh-frame, so the dl/dd reset must reach them (the browser's 40 px dd indent pushed the Power figures to the side) */
.wh-row .res-icon, .wh-frame .res-icon { object-fit: contain; flex: none; width: 22px; height: 22px; margin: 0; }
.wh-box { display: flex; align-items: stretch; padding: 0; }
.wh-box .tp-well { width: var(--wh-well, 68px); }
.wh-box .wh-well-ico { width: 36px; height: 36px; filter: drop-shadow(0 2px 3px var(--menu-shadow)); }
.wh-k { font: 600 var(--box-label-size)/1.1 var(--font-numeric); letter-spacing: .07em; text-transform: uppercase; color: var(--menu-muted); white-space: nowrap; }
.wh-v { display: flex; align-items: center; font: 700 var(--box-primary-size)/1.1 var(--font-numeric); color: var(--menu-title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wh-v.hi { color: var(--menu-focus); }
.wh-st { display: flex; flex-direction: column; min-width: 0; }
.wh-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .95fr); gap: 0; padding: 0; align-content: stretch; }
.wh-grid .wh-st { align-items: center; justify-content: center; gap: 7px; text-align: center; padding: 0 6px; }
.wh-grid .wh-st + .wh-st { border-left: 1px solid var(--glass-divider); }
.wh-grid .wh-k { font-size: var(--box-label-size); letter-spacing: .06em; }
.wh-grid .wh-v { justify-content: center; font-size: var(--box-secondary-size); line-height: 1; }
.wh-grid .wh-st:first-child .wh-v { font-size: var(--box-primary-size); color: var(--menu-focus); }
.wh-grid .wh-v.wh-pill { font: 700 var(--box-secondary-size)/1 var(--font-numeric); color: var(--menu-focus); padding: 0; background: none; }
.wh-out .wh-out-well { flex: none; box-sizing: border-box; width: 52px; display: flex; align-items: center; justify-content: center; background: none; border-right: 1px solid var(--glass-divider); }   /* ER-1679: divider restored, the icon is centred in the well's empty space */
.wh-outs { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 12px; }
.wh-o { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wh-o + .wh-o { border-top: 1px solid color-mix(in srgb, var(--menu-brass) 35%, transparent); }
.wh-o .wh-v { font-size: var(--box-secondary-size); gap: 6px; }
.wh-recv { --wh-ico: 84px; --st: var(--menu-brass); display: grid; grid-template-columns: var(--wh-ico) var(--wh-padl, 14px) auto auto var(--wh-padr, 14px) var(--wh-ico); column-gap: 0; gap: 0; align-items: center; width: max-content; max-width: 100%; padding: 0 10px; border: 1px solid var(--glass-rim); border-radius: var(--radius-frame);
  background: var(--glass-frame); box-shadow: var(--glass-shadow); }
.wh-recv::before { content: none; }
/* ER-1716: ring at the left edge, cog at the right edge, the amount and the harvest sickle sit side by side in the middle (equal flexible gaps), so the pair is centred in the box and the box is centred under the title */
.wh-recv > .wh-ring { grid-column: 1; } .wh-recv > .wh-rl { grid-column: 3; } .wh-recv > .wh-btns { grid-column: 4; margin-left: 6px; } .wh-recv > .wh-cogwrap { grid-column: 6; }
.wh-recv.green { --st: var(--menu-confirm); }
.wh-recv.amber { --st: var(--menu-warn); }
.wh-recv.red { --st: var(--menu-attention); }
.wh-rv { display: block; font: 700 40px/1 var(--font-numeric); color: var(--menu-title); font-variant-numeric: tabular-nums; text-align: right; padding-left: 4px; white-space: nowrap; }
.wh-rl { padding: 0 3px; min-width: 0; }
.wh-row.short .wh-rv { font-size: 36px; }
.wh-rv-dec { font-family: var(--font-display); font-size: .56em; letter-spacing: -.07em; display: inline-block; transform: scaleX(.85); transform-origin: left center; margin-right: 0; }
.wh-btns, .wh-btnwrap { width: var(--wh-ico); height: var(--wh-ico); }
.wh-btnwrap { display: inline-flex; }
.wh-btns .wh-btnwrap .btn { width: 100%; }
/* ER-1946: harvest and settings join the shared .btn icon-only glass tile. */
.wh-big, .wh-cog { box-sizing: border-box; width: var(--wh-ico); height: var(--wh-ico); min-height: 0; padding: 0; display: grid; place-items: center; }
.wh-harvest-icon, .wh-cog .hdr-ic { width: var(--wh-ico); height: var(--wh-ico); max-width: none; object-fit: contain; display: block; }
.wh-recv .wh-btnwrap .btn:is(.wh-big, .wh-cog):is(:disabled, [disabled], [aria-disabled="true"]) { opacity: .45; cursor: default; }
@media (prefers-reduced-motion: reduce) { .wh-recv .wh-btnwrap .btn > :is(.wh-harvest-icon, .hdr-ic) { transition: none; } }
/* ER-1715: the ring track and the inner disc are the approved HUD glass (--lp-glass over --menu-surface-bottom, brass rim like the plaques); only the arc keeps its green/amber/red colour */
.wh-recv { --wh-glass: var(--glass-frame); --wh-rim: var(--glass-rim); }
.wh-ring { box-sizing: border-box; width: var(--wh-ico); height: var(--wh-ico); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--st) var(--wh-fill), transparent var(--wh-fill) 100%), var(--wh-glass); box-shadow: inset 0 0 0 1px var(--wh-rim), 0 2px 5px var(--menu-shadow); }
.wh-recv.red .wh-ring { box-shadow: 0 0 11px var(--menu-attention), inset 0 0 0 1px var(--wh-rim); }
.wh-ring::before { content: ''; grid-area: 1 / 1; box-sizing: border-box; width: calc(var(--wh-ico) * .773); height: calc(var(--wh-ico) * .773); border-radius: 50%; border: 1px solid var(--wh-rim); background: var(--wh-glass), var(--menu-surface-bottom); box-shadow: 0 0 0 1px color-mix(in srgb, var(--menu-shadow) 55%, transparent); }
.wh-ring .wh-well-ico { grid-area: 1 / 1; z-index: 1; width: calc(var(--wh-ico) * .636); height: calc(var(--wh-ico) * .636); }
.wh-row.tight .wh-k { font-size: 9px; letter-spacing: .04em; }
.wh-frame.tight .wh-grid .wh-v { font-size: 14px; } .wh-frame.tight .wh-grid .wh-st:first-child .wh-v { font-size: 22px; } .wh-frame.tight .wh-grid .wh-v.wh-pill { font-size: 11px; padding: 3px 8px; } .wh-frame.tight .wh-grid .wh-st { padding: 0 4px; }
.wh-frame.tight .wh-outs { padding: 0 10px; } .wh-frame.tight .wh-o .wh-v { font-size: 18px; }
.wh-frame.short .wh-grid .wh-st { gap: 5px; } .wh-frame.short .wh-grid .wh-v { font-size: 14px; } .wh-frame.short .wh-grid .wh-st:first-child .wh-v { font-size: 22px; } .wh-frame.short .wh-grid .wh-v.wh-pill { font-size: 11px; }
.wh-frame.short .wh-outs { padding: 0 12px; } .wh-frame.short .wh-o .wh-v { font-size: 18px; }
.wh-frame.short .wh-ring .wh-well-ico, .wh-frame.tight .wh-ring .wh-well-ico { width: calc(var(--wh-ico) * .636); height: calc(var(--wh-ico) * .636); }
.wh-frame.short.tight .wh-grid .wh-v { font-size: 13px; } .wh-frame.short.tight .wh-grid .wh-st:first-child .wh-v { font-size: 21px; }
body:has(.land-panel:not(.is-picking-view)) .hud .plot-plaque { border: 0; border-radius: 0; background: none; box-shadow: none; }   /* the plaque fill lives in .wh-frame::before so the divider line is not dimmed by the HUD plaque layer */
body:has(.land-panel:not(.is-picking-view)) .hud .plot-plaque::before { content: none; }
body:has(.land-panel:not(.is-picking-view)) .hud .plot-plaque:hover { background: none; }
body:has(.land-panel:not(.is-picking-view)) .hud .plot-plaque .pp-col { border-radius: 0; background: none; border-right: 0; }   /* ER-1679/1685: the rarity (gem) divider is drawn once, by .wh-frame::after */
.wh-frame::before { content: ''; grid-area: 1 / 1; background: var(--glass-art-well); pointer-events: none; }
body:has(.hud .plot-plaque:hover) .wh-frame::before { background: color-mix(in srgb, var(--menu-hover) 55%, transparent); }
.wh-frame::after { content: ''; grid-area: 1 / 1 / 4 / 2; width: var(--wh-well); box-sizing: border-box; border-right: 1px solid var(--glass-divider); pointer-events: none; position: relative; z-index: 7; }   /* ER-1685/1686: one divider, full height, at one x */
.wh-frame :is(.lp-tpref, .wh-power) .tp-well { border-right: 0; }
/* ER-1662: the harvest status pill sits under the harvest box at its width (positioned by layoutHeader); compact so even the pending state stays above the worker tiles */
.lp-pendingbar.wh-harvest-pending { gap: 6px; padding: 3px 8px; font-size: 13px; line-height: 1.2; text-align: center; min-height: 0; }
html body .lp-pendingbar.wh-harvest-pending .btn { min-height: 24px; height: 24px; padding: 0 10px; font-size: 12px; }
.lp-pendingbar.wh-harvest-pending input { min-width: 0; flex: 1 1 120px; height: 24px; }

/* Rich resource tips can be hovered inside the frame, whose decorative cells otherwise pass pointer events through. */
.wh-frame .wh-out .wh-o { pointer-events: auto; }
.wh-row .wh-recv .wh-rv { pointer-events: auto; }
