/* ============================================================
   CoreRoom — 3D Workspace styling
   Glassy HUD over a three.js block. Matches app tokens.
   ============================================================ */
.ws3d-pane { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 0%, #F1EDE4 0%, #E4DFD4 100%); z-index: 700; overflow: hidden; }
/* MUST win over `.ws3d-pane.ws-4panel { display: grid }` below (same specificity, declared later) —
   without !important the 4-panel grid keeps the absolutely-positioned pane painted over every other view. */
.ws3d-pane[hidden] { display: none !important; }
.ws3d-pane [hidden] { display: none !important; }
#ws3d-mount { position: absolute; inset: 0; }
#ws3d-mount canvas { display: block; width: 100%; height: 100%; }

/* ---- loading ---- */
.ws-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 5; }
.ws-spin { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--hairline); border-top-color: var(--accent); animation: ws-spin 0.9s linear infinite; }
@keyframes ws-spin { to { transform: rotate(360deg); } }
.ws-load-msg { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.ws-load-sub { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--faint); max-width: 320px; text-align: center; line-height: 1.5; }
.ws-retry-btn { margin-top: 6px; font-family: var(--sans); font-size: 13px; font-weight: 500; color: #fff; background: var(--accent); border: none; border-radius: 8px; padding: 9px 22px; cursor: pointer; transition: filter 0.15s; }
.ws-retry-btn:hover { filter: brightness(1.07); }

/* ---- full-height right-edge drawer (mirrors the Map tab's .f-layers) ---- */
.glass { background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow); }
.ws-drawer { position: absolute; top: 0; left: 0; bottom: 0; width: 372px; z-index: 8;
  background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: none; border-right: 1px solid var(--hairline); border-radius: 0;
  box-shadow: 8px 0 32px rgba(24,22,15,0.10);
  display: flex; flex-direction: column;
  transition: transform 0.36s cubic-bezier(0.4,0,0.1,1); }
.ws-drawer.collapsed { transform: translateX(-100%) !important; pointer-events: none; }
.ws-extent-inline { font-family: var(--sans); font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400; }

/* ---- toggle button (collapsed state), top-right like the map ---- */
.ws-layers-btn { position: absolute; top: 18px; left: 18px; z-index: 7; display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: var(--r); border: 1px solid var(--hairline); font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; opacity: 1; }
.ws-layers-btn svg { width: 17px; height: 17px; color: var(--accent); }
.ws-layers-btn:hover { color: var(--accent-ink); }
.ws-layers-btn.hide { display: none; }

/* ---- reset row ---- */
.ws-reset-row { display: flex; align-items: center; gap: 9px; width: 100%; margin: 4px 0 2px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface-warm); font-family: var(--sans); font-size: 12.5px; color: var(--muted); cursor: pointer; transition: 0.15s; }
.ws-reset-row svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.ws-reset-row:hover { color: var(--ink); border-color: var(--faint); }

.ws-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.ws-row-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.ws-val { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent-ink); }

.ws-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); outline: none; margin: 0 0 14px; }
.ws-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(24,22,15,0.25); }
.ws-slider::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: pointer; }

/* ---- overlay list (expandable groups) ---- */
.ws-ov-list { display: flex; flex-direction: column; gap: 1px; }
.ws-ov-group { border-top: 1px solid var(--hairline-soft); }
.ws-ov-ghead { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 8px; background: transparent; border: none; cursor: pointer; font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.ws-ov-glabel { display: flex; align-items: center; gap: 7px; }
.ws-chev { width: 12px; height: 12px; color: var(--faint); transition: transform 0.24s; flex: none; }
.ws-ov-group.open .ws-chev { transform: rotate(90deg); }
.ws-ov-gcount { margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ws-ov-gbody { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.3s cubic-bezier(0.4,0,0.1,1), opacity 0.2s; }
.ws-ov-group.open .ws-ov-gbody { max-height: 320px; opacity: 1; }
.ws-ov-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 22px; border: none; background: transparent; border-radius: 8px; font-family: var(--sans); font-size: 13px; color: var(--muted); cursor: pointer; text-align: left; transition: 0.14s; width: 100%; }
.ws-ov-row[data-ov="none"] { padding-left: 8px; }
.ws-ov-row:hover { background: rgba(180,83,9,0.06); }
.ws-ov-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--faint); transition: 0.14s; box-sizing: border-box; }
.ws-ov-row.on { color: var(--ink); font-weight: 500; }
.ws-ov-row.on .ws-ov-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ws-ov-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-ov-src { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: 0.02em; }
.ws-ov-row.loading .ws-ov-dot { border-color: var(--accent); border-top-color: transparent; animation: ws-spin 0.7s linear infinite; background: transparent; box-shadow: none; }

/* ---- ? tooltip (fixed, never clipped) ---- */
.ws-q { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--hairline); background: transparent; display: grid; place-items: center; font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--faint); cursor: help; padding: 0; }
.ws-q:hover { color: var(--accent); border-color: var(--accent); }
.ws-layer-tip { position: fixed; display: none; width: 210px; padding: 9px 11px; background: var(--ink); color: #fff; font-family: var(--sans); font-size: 11px; font-weight: 400; line-height: 1.45; border-radius: 8px; z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,0.28); pointer-events: none; text-align: left; }
.ws-ov-oprow { margin-top: 4px; }

/* ---- legend (right, dynamic) ---- */
.ws-legend { position: absolute; top: 18px; right: 18px; width: 224px; max-height: calc(100% - 36px); overflow-y: auto; padding: 13px 14px; border-radius: var(--r); z-index: 6; }
.ws-legend::-webkit-scrollbar { width: 6px; }
.ws-legend::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
.ws-leg-block { margin-bottom: 13px; }
.ws-leg-block:last-child { margin-bottom: 0; }
.ws-leg-title { margin: 0 0 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ws-leg-sub { margin: -5px 0 7px; font-size: 11px; font-weight: 600; color: var(--ink); }
.ws-leg-ramp { height: 9px; border-radius: 5px; }
.ws-leg-ramp.grade { background: linear-gradient(90deg, #5a8f3a, #C98A2B, #E0631F, #9E1B1B); }
.ws-leg-scale { display: flex; justify-content: space-between; margin: 4px 0 0; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.ws-leg-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.ws-leg-sw { flex: none; width: 13px; height: 13px; border-radius: 3px; }
.ws-leg-sw.dot { border-radius: 50%; }
.ws-leg-sw.dash { background: transparent !important; border: 1.5px dashed #B45309; }
.ws-leg-sw.shell { background: rgba(180,83,9,0.4); border: 1px solid #E0631F; }
.ws-leg-sw.ghost { background: rgba(124,106,82,0.3); border: 1px solid #7c6a52; }
.ws-leg-cats { display: flex; flex-direction: column; gap: 4px; }

/* ---- geology legend: identify + clickable units + structural key ---- */
.ws-identify-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 9px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--hairline); background: rgba(255,255,255,0.55); font-family: var(--sans); font-size: 11.5px; font-weight: 500; color: var(--ink); cursor: pointer; transition: 0.15s; text-align: left; }
.ws-identify-btn svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.ws-identify-btn:hover { border-color: var(--accent); }
.ws-identify-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ws-identify-btn.on svg { color: #fff; }
.ws-leg-units { display: flex; flex-direction: column; gap: 1px; }
.ws-geo-click { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 5px 6px; border: none; background: transparent; border-radius: 7px; cursor: pointer; text-align: left; transition: background 0.12s; }
.ws-geo-click:hover { background: rgba(180,83,9,0.07); }
.ws-geo-click i { flex: none; width: 12px; height: 12px; border-radius: 3px; margin-top: 2px; border: 1px solid rgba(24,22,15,0.1); }
.ws-geo-l { display: flex; flex-direction: column; line-height: 1.25; color: var(--ink); font-size: 11.5px; }
.ws-geo-l em { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--faint); margin-top: 1px; }
.ws-geo-go { width: 12px; height: 12px; color: var(--faint); margin-left: auto; flex: none; align-self: center; opacity: 0; transition: opacity 0.12s; }
.ws-geo-click:hover .ws-geo-go { opacity: 1; }
.ws-leg-note { font-size: 10px; color: var(--faint); font-style: italic; padding: 4px 0 1px; }
.ws-leg-cta { font-size: 9.5px; color: var(--faint); font-style: italic; margin-top: 8px; }
.ws-leg-struct { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--hairline-soft); }
.ws-leg-sub { margin: 0 0 5px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ws-leg-line { flex: none; width: 22px; height: 0; }
.ws-leg-line.fault { border-top: 2px solid #c0392b; }
.ws-leg-line.contact { border-top: 1px solid #6b6357; }
.ws-leg-line.fold { border-top: 2px dashed #7a5aa8; }

/* ---- scale bars (bottom-right, clear of the panel) ---- */
.ws-scales { position: absolute; right: 18px; bottom: 16px; z-index: 6; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ws-scale-h { display: flex; align-items: center; gap: 8px; }
.ws-scale-h-bar { height: 8px; box-sizing: border-box; border: 2px solid var(--ink); border-top: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.55); }
.ws-scale-v { display: flex; align-items: center; gap: 8px; }
.ws-scale-v-bar { width: 8px; box-sizing: border-box; border: 2px solid var(--ink); border-right: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.55); }
.ws-scale-lbl { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink); background: rgba(255,255,255,0.74); padding: 1px 6px; border-radius: 4px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ---- hint ---- */
.ws-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--faint); background: rgba(255,255,255,0.6); padding: 5px 12px; border-radius: 100px; z-index: 6; pointer-events: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---- asset / AOI tree (Stage 2) ---- */
.ws-tree { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px; }
.ws-tree-row { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 12px; color: var(--ink); transition: background 0.12s; }
.ws-tree-row:hover { background: rgba(180,83,9,0.08); }
.ws-tree-row.on { background: rgba(180,83,9,0.14); font-weight: 600; }
.ws-tree-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-tree-tag { flex: none; font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); opacity: 0.85; }
.ws-tree-meta { flex: none; font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ws-empty { display: block; font-size: 11.5px; line-height: 1.45; color: var(--muted); padding: 3px 8px 5px; }

/* ---- block inspect card (Stage 3.5) ---- */
.ws-inspect { position: absolute; right: 18px; top: 220px; z-index: 7; width: 218px; padding: 11px 13px; border-radius: 12px; font-family: var(--sans); }
.ws-insp-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.ws-insp-x { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px; line-height: 1; padding: 2px; }
.ws-insp-x:hover { color: var(--ink); }
.ws-insp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; padding: 2.5px 0; color: var(--muted); }
.ws-insp-row b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-size: 11.5px; }

/* ---- compare-models control + export buttons (Stage 6) ---- */
.ws-cmp-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.ws-cmp-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--faint); width: 12px; flex: none; }
.ws-sel { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface-warm); font-family: var(--sans); font-size: 12px; color: var(--ink); cursor: pointer; }
.ws-sel:focus { outline: none; border-color: var(--accent); }
.base-opt.off { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   Stage 6 — professional 4-panel layout
   left: project/layers/models · center: viewport · right: model
   controls/inspect · bottom: activity log + exports (collapsible)
   ============================================================ */
.ws3d-pane.ws-4panel {
  --ws-left: 290px; --ws-right: 328px; --ws-bottom: 158px;
  display: grid;
  grid-template-columns: var(--ws-left) minmax(0, 1fr) var(--ws-right);
  grid-template-rows: minmax(0, 1fr) var(--ws-bottom);
  grid-template-areas: "left center right" "bottom bottom bottom";
}
.ws3d-pane.ws-4panel.ws-left-collapsed { --ws-left: 0px; }
.ws3d-pane.ws-4panel.ws-right-collapsed { --ws-right: 0px; }
.ws-4panel.ws-right-collapsed .ws-pane-right { display: none; }
.ws3d-pane.ws-4panel.ws-bottom-collapsed { --ws-bottom: 40px; }
.ws-4panel #ws3d-mount { position: relative; inset: auto; grid-area: center; min-width: 0; min-height: 0; }

/* LEFT panel — dock the slide-out drawer into the grid */
.ws-4panel .ws-pane-left {
  position: relative; top: auto; left: auto; bottom: auto; width: auto; grid-area: left;
  transform: none !important; opacity: 1 !important; pointer-events: auto !important;
  box-shadow: none; min-width: 0; overflow: hidden;
}
.ws-4panel.ws-left-collapsed .ws-pane-left { display: none; }
.ws-4panel .ws-pane-left .panel-body { flex: 1; overflow-y: auto; }

/* RIGHT panel — active-model controls / metadata / inspect */
.ws-pane-right { grid-area: right; display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--hairline); box-shadow: -8px 0 32px rgba(24,22,15,0.07); min-width: 0; overflow: hidden; z-index: 8; }
.ws-pane-right .panel-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.ws-4panel .ws-inspect { position: static; width: auto; margin-top: 12px; border-top: 1px solid var(--hairline-soft); padding: 12px 0 0; }
.ws-right-empty { padding: 18px 2px; line-height: 1.55; }

/* model-metadata card */
#ws-model-meta { margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface-warm); }
.ws-mm-name { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px; display: flex; align-items: center; gap: 7px; }
.ws-mm-tag { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.ws-mm-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 7px; }
.ws-mm-grid span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--faint); text-transform: uppercase; }
.ws-mm-grid b { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink); text-align: right; }
/* per-model colour legend (the ramp the blocks + surface drape use for the active attribute) */
.ws-mm-legend { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--hairline-soft); }
.ws-mm-leg-title { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.ws-mm-leg-ramp { height: 9px; border-radius: 3px; border: 1px solid var(--hairline-soft); }
.ws-mm-leg-scale { display: flex; justify-content: space-between; margin-top: 3px; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

/* BOTTOM panel — activity log + exports */
.ws-pane-bottom { grid-area: bottom; display: flex; flex-direction: column; background: var(--surface);
  border-top: 1px solid var(--hairline); box-shadow: 0 -6px 24px rgba(24,22,15,0.06); min-height: 0; z-index: 9; }
.ws-bottom-head { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--hairline-soft); flex: none; }
.ws-bottom-tabs { display: flex; gap: 4px; }
.ws-bt-tab { padding: 4px 11px; border: none; background: transparent; border-radius: 7px; font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: 0.14s; }
.ws-bt-tab:hover { color: var(--ink); }
.ws-bt-tab.on { background: var(--accent-soft); color: var(--accent-ink); }
.ws-bottom-hint { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--faint); }
.ws-bottom-toggle { flex: none; width: 24px; height: 24px; border: 1px solid var(--hairline); background: var(--surface-warm); border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 11px; line-height: 1; transition: transform 0.2s; }
.ws-bottom-toggle:hover { color: var(--ink); }
.ws-bottom-body { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 0; }
.ws3d-pane.ws-4panel.ws-bottom-collapsed .ws-bottom-body { display: none; }
.ws3d-pane.ws-4panel.ws-bottom-collapsed .ws-bottom-toggle { transform: rotate(180deg); }
.ws-log-row { display: flex; gap: 9px; align-items: baseline; padding: 3.5px 0; border-bottom: 1px solid var(--hairline-soft); font-family: var(--sans); font-size: 11.5px; color: var(--muted); }
.ws-log-row time { font-family: var(--mono); font-size: 10px; color: var(--faint); flex: none; }
.ws-log-row b { color: var(--ink); font-weight: 600; }
.ws-exp-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-family: var(--sans); font-size: 12px; border-bottom: 1px solid var(--hairline-soft); }
.ws-exp-row .ws-exp-k { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.ws-exp-row a { color: var(--accent-ink); text-decoration: none; }
.ws-exp-row a:hover { text-decoration: underline; }

/* legend + reopen button positioned around the docked panels */
.ws-4panel .ws-legend { right: calc(var(--ws-right) + 16px); top: 16px; }
.ws-4panel .ws-layers-btn { top: 14px; left: 14px; }
.ws-4panel:not(.ws-left-collapsed) .ws-layers-btn { display: none; }

/* right "Models" reopen rail — mirrors the layers button, shown only when the Models panel is collapsed */
.ws-models-btn { position: absolute; top: 14px; right: 14px; z-index: 7; display: none; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--hairline); background: var(--surface); font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; box-shadow: 0 6px 20px rgba(24,22,15,0.12); }
.ws-models-btn svg { width: 18px; height: 18px; }
.ws-4panel.ws-right-collapsed .ws-models-btn { display: flex; }

/* Models manager (run launcher + list + compare) */
.ws-run { margin-bottom: 12px; }
.ws-run-row { display: flex; gap: 6px; margin-bottom: 7px; }
.ws-run-row .ws-sel { flex: 1; min-width: 0; }
.ws-run-go { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border: none; border-radius: 9px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; }
.ws-run-go svg { width: 15px; height: 15px; }
.ws-run-go:disabled { opacity: 0.6; cursor: default; }
.ws-run-out { margin-top: 7px; font-size: 12px; min-height: 0; }
.ws-run-prog { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.ws-run-err { color: #B91C1C; }
.ws-spin-sm { width: 12px; height: 12px; border: 2px solid var(--hairline); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: wsSpin 0.7s linear infinite; }
@keyframes wsSpin { to { transform: rotate(360deg); } }
.ws-count { font-family: var(--mono); font-size: 10px; color: var(--faint); background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.ws-mdl-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.ws-mdl-row { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.ws-mdl-row:hover { background: var(--surface-warm); }
.ws-mdl-row.on { background: var(--accent-soft); border-color: var(--accent); }
.ws-mdl-main { flex: 1; min-width: 0; }
.ws-mdl-nm { font-size: 12.5px; font-weight: 600; color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-mdl-note { color: var(--accent-ink); font-size: 11px; }
.ws-mdl-sub { font-family: var(--mono); font-size: 10px; color: var(--faint); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-mdl-act { flex: none; width: 24px; height: 24px; border: none; background: transparent; border-radius: 6px; color: var(--faint); cursor: pointer; padding: 4px; }
.ws-mdl-act:hover { background: var(--hairline); color: var(--ink); }
.ws-mdl-act svg { width: 15px; height: 15px; }
.ws-mdl-menu { position: fixed; z-index: 6300; min-width: 172px; padding: 5px; }
.ws-cmp { margin-top: 2px; }

/* ══ H9d — workspace panel life: hover states, softer section rhythm ══ */
.ws-pane-left .lyr, .ws-tree .ws-aoi-row { transition: background 0.12s ease, border-color 0.12s ease; border-radius: 8px; }
.ws-pane-left .lyr:hover { background: rgba(180, 83, 9, 0.05); }
.ws-pane-left .sub-label { letter-spacing: 0.09em; }
.ws-pane-right .panel-body > div { transition: background 0.12s ease; }
#ws-models-mgr .ws-model-row:hover, #ws-models-mgr [data-model]:hover { background: rgba(180, 83, 9, 0.05); border-radius: 8px; }
.ws-legend { transition: box-shadow 0.15s ease; }
.ws-legend:hover { box-shadow: 0 10px 30px rgba(24, 20, 12, 0.14); }
.base-opt, .ws-reset-row { transition: 0.13s ease; }
.base-opt:hover, .ws-reset-row:hover { border-color: var(--accent); color: var(--ink); }

/* R10 — the legend must never sit under the Models panel: in 4-panel mode it is offset past the
   right pane (with a hard fallback width when the var is missing), and it yields z-order to panels. */
.ws3d-pane.ws-4panel .ws-legend { right: calc(var(--ws-right, 328px) + 16px); top: 16px; z-index: 5; }
.ws3d-pane.ws-4panel.ws-right-collapsed .ws-legend { right: 16px; }

/* R10 — Models panel: collapsible launcher/compare, grouped rows with method dots */
.ws-fold { border: 1px solid var(--hairline); border-radius: 11px; margin-bottom: 14px; background: var(--surface); }
.ws-fold-sum { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ws-fold-sum::-webkit-details-marker { display: none; }
.ws-fold-sum svg { width: 15px; height: 15px; color: var(--accent); }
.ws-fold-chev { margin-left: auto; font-size: 10px; color: var(--faint); transition: transform 0.15s; }
.ws-fold[open] .ws-fold-chev { transform: rotate(180deg); }
.ws-fold .ws-run, .ws-fold .ws-cmp { padding: 0 12px 12px; }
.ws-run-hint { font-size: 10.5px; color: var(--faint); margin-top: 8px; line-height: 1.4; }
.ws-mdl-ghead { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 10px 2px 4px; }
.ws-mdl-ghead:first-child { margin-top: 2px; }
.ws-mdl-gct { color: var(--faint); }
.ws-mdl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); margin-right: 2px; }
.ws-mdl-dot.idw { background: #B45309; }
.ws-mdl-dot.kriging { background: #1E3A5F; }
.ws-mdl-dot.prospectivity { background: #3F6212; }
.ws-mdl-dot.anomaly { background: #7C2D12; }
.ws-mdl-dot.difference { background: #5b5247; }
.ws-mdl-row { display: flex; align-items: center; gap: 8px; }
