@import url("/play/v/27f78c09dca44bb7f349/progress-bar.css");
:root {
  /* Plot plaques use the display serif; HUD and status rows use the body sans. */
  --plot-display: Georgia, 'Times New Roman', serif;
  --plot-body: Inter, 'Segoe UI', system-ui, sans-serif;
}
.plot-view {
  /* ER-1145: ONE contact-shadow recipe for worksite, plinth, tower and Reaper. Light from the upper left, so the
     shadow sits a hair to the lower right of the base. Tune here only:
     --sh-strength  peak opacity of the ink (about a third of the study's Option A)
     --sh-blur      softness of the gradient edge
     --sh-dx/--sh-dy  offset of the shadow to the lower right
     --sh-worksite-scale  multiplier on the worksite silhouette layers (plot.js)
     --plot-ground  set by plot.js from the painted backdrop; the ink is that ground mixed with the shadow token. */
  --sh-strength: .30;
  --sh-blur: 2px;
  --sh-dx: 1px;
  --sh-dy: 1px;
  --sh-worksite-scale: .30;
  --sh-worksite-reach: .35; /* multiplier on the worksite layers' offsets and ambient height: smaller hugs the base */
  --sh-ink: color-mix(in srgb, var(--plot-ground, var(--bg3)) 45%, var(--shadow));
  --sh-fill: radial-gradient(ellipse at center, color-mix(in srgb, var(--sh-ink) calc(var(--sh-strength) * 100%), transparent), color-mix(in srgb, var(--sh-ink) calc(var(--sh-strength) * 45%), transparent) 55%, transparent 75%);
  --plot-title-size: 14px;
  --plot-status-size: 12px;
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* ER-1803: NOT an isolated stacking context. The tower art must stack above the HUD boxes (.hud z 10, a sibling of the stage),
     which only works when the plot-view's layers share the app's stacking context. Everything below stays at z 0..9 except the tower art. */
  isolation: auto;
  background: #172316;
  font-family: var(--plot-display);
}
.plot-view > img, .plot-view > .plot-site {
  position: absolute;
}
.plot-view img { display: block; user-select: none; pointer-events: none; }
.plot-view img[hidden] { display: none; }
.plot-view > .terrain-backdrop, .plot-view > .terrain-preview { max-width: none; } /* ER-1452: er.css img max-width would clamp the cover-sized painting on tall views */
.plot-view .terrain-art-coming {
  position: absolute;
  z-index: 4;
  top: 100px;
  left: 14px;   /* placeFallback() in plot.js centres it under the plaque text (ER-0645) */
  text-align: center;
  padding: 5px 9px;
  border: 1px solid #d9b86b;
  border-radius: 3px;
  background: rgba(22, 19, 14, .88);
  color: #f5e6bb;
  font: 600 12px/1.2 var(--plot-body);
  white-space: nowrap;
  pointer-events: none;
}
.plot-view .structure { z-index: 0; object-fit: contain; } /* ER-0640: the worksite sits BELOW towers and reapers (plot-site is z auto, later in DOM) */
.plot-view .worksite-shadow { position: absolute; z-index: -1; pointer-events: none; }
.plot-view .worksite-shadow > span { position: absolute; display: block; pointer-events: none; }
.plot-view .worksite-shadow .contact,
.plot-view .worksite-shadow .soft-contact {
  inset: 0;
  width: 100%; height: 100%;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.plot-view .worksite-shadow .ambient { border-radius: 50%; }
.plot-view .plot-site {
  /* Let each plaque's own layer paint above neighbouring figures. */
  z-index: auto;
  display: block;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: initial;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.plot-view .plot-site:focus-visible { outline: 2px solid #f3d16d; outline-offset: 2px; }
.plot-view .plot-site > *, .plot-view .topclip > * { position: absolute; display: block; }
.plot-view .plot-site img[hidden] { display: none; }
.plot-view .plot-site .glow {
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,215,120,.50), rgba(255,215,120,0) 68%);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.plot-view .plot-site.selected .glow { opacity: 1; }
/* ER-1186: subtle hover on each tower: a soft glow under it and a slight brighten; the art never moves or resizes. */
@media (hover: hover) {
  .plot-view .plot-site:hover .glow { opacity: .55; }
  .plot-view .plot-site:hover .figure:not(.fallen) { filter: brightness(1.07); }
  .plot-view .plot-site .figure { transition: filter .15s ease; }
}
.plot-view .plot-site .gshadow {
  border-radius: 50%;
  background: var(--sh-fill);
  filter: blur(var(--sh-blur));
  pointer-events: none;
}
.plot-view .plot-site .plinth { object-fit: fill; }
.plot-view .plot-site .topclip { overflow: hidden; border-radius: 50%; pointer-events: none; }
.plot-view .plot-site .topclip .contact {
  border-radius: 50%;
  background: var(--sh-fill);
  filter: blur(var(--sh-blur));
}
.plot-view .plot-site .scaffold { object-fit: fill; }
.plot-view .plot-site .figure { object-fit: contain; }   /* ER-1104: box has the image's own ratio, never stretch */
.plot-view .plot-site .pending-figure { object-fit: contain; z-index: 4; pointer-events: none; }
.plot-view .plot-site .figure.fallen { filter: saturate(.2); }
.plot-view .plaque {
  /* Art dark well: x=180..1237, y=70..280 of 1417x357. */
  --plaque-inner-left: 12.7%;
  --plaque-inner-right: 12.7%;
  --plaque-inner-top: 19.6%;
  --plaque-inner-bottom: 21.6%;
  z-index: 5;
  box-sizing: border-box;
  overflow: visible;
  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: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}
.plot-view .plaque .t {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #f4e3b8;
  text-align: center;
  min-width: 0;
  line-height: 1;
  text-shadow: 0 1px 2px #100d09;
}
.plot-view .plaque .t b { font: 700 14px/16px var(--plot-display); display: -webkit-box; max-width: 100%; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; pointer-events: auto; }
.plot-view .plaque .t .subtitle { font: 600 12px/14px var(--plot-body); letter-spacing: -.035em; color: #f3dfaa; display: block; max-width: 100%; min-width: 0; flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plot-view .plaque .bar {
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;
  height: 4px;
  border: 1px solid #6b5320;
  border-radius: 3px;
  overflow: hidden;
  background: #120e08;
}
.plot-view .plaque .bar i { display: block; height: 100%; }
.plot-view .plaque .bar i.hp { background: linear-gradient(#7ed957,#3f9a2a); }
.plot-view .plaque .bar i.dur { background: linear-gradient(#f0c25a,#b9852a); }
.plot-view .plaque.compact .bar { height: 3px; }
.plot-view .plaque .t .title-row { position: relative; display: flex; flex: 0 0 auto; max-width: 100%; min-width: 0; }
.plot-view .plaque .t .title-row .band-gem {
  position: absolute; right: 100%; top: 50%; width: auto; height: calc(var(--plot-title-size) * 1.15); margin-right: .45em;
  transform: translateY(-50%); object-fit: contain; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .plot-view .plot-site .glow, .plot-view .plot-site .figure { transition: none; }
}

/* ER-0481: the Pending badge of a site uses the same painted plaque, colours and type as the main site plaque. */
.plot-view .pending-badge {
  box-sizing: border-box;
  position: absolute;
  pointer-events: none;
  overflow: hidden;
}
.plot-view .pending-badge .t {
  position: absolute;
  left: 8%; right: 8%; top: 0; bottom: 12%;
  display: flex; align-items: center; justify-content: center;
  color: #f4e3b8;
  text-shadow: 0 1px 2px #100d09;
  line-height: 1.1;
}
.plot-view .pending-badge .t b { font: 700 var(--plot-status-size)/1.1 var(--plot-display); white-space: nowrap; letter-spacing: .02em; }
@media (max-width: 600px) and (orientation: portrait) {
  .plot-view { --plot-title-size: 12px; --plot-status-size: 12px; }
  .plot-view .terrain-art-coming { top: 118px; left: 60px; }
}

/* ER-1072: progressive reveal when a different plot opens. Opacity and transform only; static under reduced motion. */
.plot-view.plot-reveal .terrain-preview { filter: blur(10px); transform: scale(1.03); }
.plot-view.plot-reveal .terrain-backdrop { opacity: 0; transition: opacity .55s ease; }
.plot-view.plot-reveal.terrain-ready .terrain-backdrop { opacity: 1; }
.plot-view.plot-reveal .structure,
.plot-view.plot-reveal .worksite-shadow,
.plot-view.plot-reveal .plot-site { animation: plot-rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.plot-view.plot-reveal .structure, .plot-view.plot-reveal .worksite-shadow { animation-delay: 60ms; }
@keyframes plot-rise { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .plot-view.plot-reveal .terrain-backdrop { transition: none; opacity: 1; }
  .plot-view.plot-reveal .structure, .plot-view.plot-reveal .worksite-shadow, .plot-view.plot-reveal .plot-site { animation: none; }
}

/* ER-1803 + style-guide rule: tower art stacks ABOVE menus (plot box, chips, rail). Art layers sit at z 11, over .hud (z 10); they are
   pointer-events:none (img rule above, spans below), so the tower's own button (z auto, under the HUD) still takes the click and the
   HUD boxes stay clickable where the art overlaps them. The banner plaque stays above its own art. */
.plot-view .plot-site > :is(.glow, .spot-ring, .gshadow, .plinth, .topclip, .figure, .scaffold, .pending-figure) { z-index: 11; pointer-events: none; }
.plot-view .plot-site .plaque { z-index: 12; }
/* ER-1803: with the plot-view no longer isolated, plot.js's negative inline z-indexes (terrain -3/-2, shadow -1) would fall behind the view's own
   background. Re-stack the ground layers at z 0..5 (still below the HUD at 10); inline styles need !important. */
.plot-view > .terrain-preview { z-index: 0 !important; }
.plot-view > .terrain-backdrop { z-index: 1 !important; }
.plot-view .er-echo-layer { z-index: 2; }
.plot-view .worksite-shadow { z-index: 3; }
.plot-view .structure { z-index: 4; }
.plot-view .worksite-open { z-index: 5; }
/* The rig follows the same figure rectangle; plaques stay above its glow. */
.plot-view .plot-site > .ta-rig,.plot-view .plot-site > .ta-still{z-index:11;}
/* ER-1886: hud.css gives .spot-lit sites z 7, which makes the site a stacking context below .hud and hides the tower behind the plot box; keep it auto. */
.plot-view .plot-site.spot-lit:is(button) { z-index: auto; } /* extra type specificity: hud.css has the same selector and loads later */

/* A fullscreen view hides the plot itself. Its rig must also leave that stacking layer. */
body:is(.tower-scene-open,.land-panel-open,.land-board-open) .plot-view :is(.ta-rig,.ta-still){display:none!important;}
/* ER-1887: the fullscreen Land board covers the whole scene. Tower layers sit at z 11 (above menus), so the covered plot view is hidden, not out-stacked. */
body.land-board-open:has(.land-board:not([inert])) .plot-view{visibility:hidden;}

/* Banner node uses the compact shared meter inside its existing row. */
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar:has(.progress-bar--standard) { display:block; box-sizing:border-box; height:30px; padding:0 8px; overflow:hidden; }
.plot-view .plaque.banner .bn-bar .progress-bar--compact .progress-bar__head { height:14px; margin-bottom:0; }
.plot-view .plaque.banner .bn-bar .progress-bar--compact .progress-bar__status { font-size:13px; }
.plot-view .plaque.banner .bn-bar .progress-bar--compact .progress-bar__percent { font-size:18px; }
.plot-view .plaque.banner .bn-bar .progress-bar--compact .progress-bar__track { height:16px; }
/* The banner uses the shared standard track and the box/tile radius. */
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar .progress-bar--standard .progress-bar__track,
html[data-theme] body .plot-view .plot-site .plaque.banner .bn-bar .progress-bar--standard .progress-bar__fill { border-radius:var(--radius-frame,5px); }
