/* ============================================================
   BLACKLENS — CARD SHAPE (round 321, js/shape.js): the 3D card and its chips, the maps, the SHAPE editor; MAP INSPECT's CARD
   SHAPE box (A) and 3D SHAPE view (B); BLACKVAULT's SHAPE section (C) and summary row (D); the A4 page (E); STAGE/CAM's
   HEIGHT CALIBRATION (G)
   ============================================================ */

/* ---- the turnable card ---- */
.shp-vp { position: relative; min-height: 0; overflow: hidden; border-radius: 6px; border: 1px solid #2c2c2c;
  background: radial-gradient(ellipse at 50% 35%, #2b2b2b 0%, #161616 70%); }
.shp-vp > canvas.shp-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.shp-vp > canvas.shp-gl:active { cursor: grabbing; }
.shp-ov { position: absolute; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; max-width: calc(100% - 12px); }
.shp-ov.tl { left: 6px; top: 6px; }
.shp-ov.tr { right: 6px; top: 6px; justify-content: flex-end; max-width: 60%; }
.shp-ov.bl { left: 6px; bottom: 6px; max-width: 70%; }
.shp-ov.br { right: 6px; bottom: 6px; }
.shp-ov .shp-chip { pointer-events: auto; }
.shp-chip { font: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: 1px; line-height: 1; padding: 5px 7px; border-radius: 5px;
  border: 1px solid #3a3a3a; background: rgba(20, 20, 20, .82); color: #bdbdbd; cursor: pointer; white-space: nowrap; }
.shp-chip:hover { border-color: #5a5a5a; color: #f2f2f2; }
.shp-chip.on { background: #3a1615; border-color: #DC4F4C; color: #fff; }
.shp-chip.info { cursor: default; color: #8a8a8a; background: rgba(20, 20, 20, .7); }
.shp-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #7f7f7f; font-size: 11px; letter-spacing: 1.5px; }
.shp-prof, .shp-side { display: block; width: 100%; height: auto; font-family: Bahnschrift, Arial, sans-serif; }
.shp-pill { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #DC4F4C; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.shp-pill.flat { background: #2f5f3f; color: #c9f5d4; }

/* ---- the SHAPE editor (over the card on the map) ---- */
.shp-edsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; cursor: crosshair; touch-action: none; }
.shp-edsvg [data-h] { cursor: grab; }
.shp-edsvg [data-sel] { cursor: pointer; }
.shp-edhead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.shp-edhead b { font-size: 11px; letter-spacing: 2px; color: #DC4F4C; font-weight: 700; }
.shp-edhead span { font-size: 9.5px; color: #8a8a8a; letter-spacing: .6px; }
.shp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; align-items: center; }
.shp-chips .shp-chip { background: #1d1d1d; }
.shp-chips .shp-chip.on { background: #3a1615; }
.shp-gap { width: 8px; }
.shp-none { font-size: 10.5px; color: #8a8a8a; }
.shp-rng { display: flex; flex-direction: column; gap: 3px; margin: 0 0 6px; font-size: 9.5px; letter-spacing: 1.2px; color: #8a8a8a; }
.shp-rng b { color: #f2f2f2; font-weight: 700; letter-spacing: .4px; }
.shp-rng input[type=range] { width: 100%; accent-color: #DC4F4C; }
.shp-edbtns { display: flex; flex-wrap: wrap; gap: 5px; }
.shp-edbtns .btn { flex: 1 1 auto; }
#ai-shape3d-foot .btn, #view-ai .ai-shape .btn { border-radius: 5px; }

/* ---- MAP INSPECT: A — CARD SHAPE under SEVERITY ---- */
.ai-shape { flex: 0 0 auto; display: flex; flex-direction: column; gap: 5px; }
.ai-shape .ai-lbl span { font-size: 8.5px; letter-spacing: 1.2px; color: #8a8a8a; font-weight: 700; }
.ai-shape-body { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 7px; align-items: center; }
.ai-shape-vp { position: relative; height: 58px; border-radius: 5px; border: 1px solid #2c2c2c; background: radial-gradient(ellipse at 50% 35%, #2b2b2b 0%, #161616 70%); overflow: hidden; cursor: pointer; }
.ai-shape-vp > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ai-shape-vp > .shp-chip { position: absolute; right: 2px; bottom: 2px; font-size: 8px; padding: 2px 4px; letter-spacing: .4px; }
.ai-shape-vp.empty > img { display: none; }
.ai-shape-vp.empty::after { content: 'NO SHAPE'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #555; font-size: 10px; letter-spacing: 2px; }
.ai-shape-vp:hover { border-color: #5a5a5a; }
.ai-shape-rd { display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.ai-shape-rd b { font-size: 14px; color: #f2f2f2; font-weight: 700; letter-spacing: .3px; }
.ai-shape-rd b.flat { color: #7ED4A6; }
.ai-shape-rd i { font-style: normal; font-size: 8.5px; letter-spacing: .8px; color: #a6a6a6; line-height: 1.3; }
.ai-shape-rd i.ok { color: #7ED4A6; }
.ai-shape-rd i.bad { color: #f0a19f; }
.ai-shape #ai-shape-mark { width: 100%; }

/* ---- MAP INSPECT: B — 3D SHAPE over the live view ---- */
.ai-shape3d { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #121212; }
.ai-shape3d[hidden] { display: none; }
.ai-shape3d-vp { flex: 1 1 auto; min-height: 160px; }
.ai-shape3d-msg { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; margin: 0;
  color: #a6a6a6; font-size: 11.5px; line-height: 1.5; letter-spacing: .3px; }
.ai-shape3d-msg[hidden] { display: none; }
.ai-shape3d-foot { flex: 0 0 auto; max-height: 48%; overflow-y: auto; scrollbar-width: thin; }
.ai-shape3d-foot:empty { display: none; }
.ai-shape3d-prof { padding: 2px 0; }
.ai-shape3d-prof > b { display: block; font-size: 9px; letter-spacing: 1.6px; color: #8a8a8a; font-weight: 700; margin: 0 0 1px 2px; }
#ai-shape3d-btn.on { background: #3a1615; border-color: #DC4F4C; color: #fff; }
/* H: the editor's host over the card */
.ai-shape-ed { position: absolute; z-index: 6; outline: 1px dashed rgba(220, 79, 76, .55); }
#ai-nav.shaping { cursor: crosshair; }

/* ---- BLACKVAULT: C — the SHAPE section ---- */
/* round 322 — layout D (operator 2026-11-18: 'Build D'): the card is the stage, the figures, the edge and a small map float over it;
   nothing scrolls. On a phone the card takes the width and the rest follows under it */
.bv-shp-wrap { height: 100%; }
.bv-shp { min-height: 0; }
.bv-shp-d { position: relative; flex: 1 1 auto; min-height: 0; }
.bv-shp-stage { position: absolute; inset: 0; }
.bv-shp-hud, .bv-shp-strip, .bv-shp-mini { position: absolute; z-index: 3; background: rgba(18, 18, 18, .84); border: 1px solid #333; border-radius: 6px; }
/* round 324: the 3D card first — the figures smaller (MORE opens the rest), and both the figures and the map fold away (– / +) */
.bv-shp-hud { left: 8px; top: 38px; width: max-content; min-width: 180px; max-width: 270px; padding: 6px 8px 5px; display: flex; flex-direction: column; gap: 3px; }
.bv-shp-num { display: flex; align-items: center; gap: 7px; }
.bv-shp-num > b { font-size: calc(17px + var(--bv-up2)); color: #f2f2f2; font-weight: 700; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.bv-shp-num .shp-pill { font-size: 9px; padding: 2px 6px; letter-spacing: 1.2px; }
.bv-shp-body { display: flex; flex-direction: column; gap: 2px; }
.bv-shp-at { font-style: normal; font-size: calc(8.5px + var(--bv-up)); color: #8a8a8a; letter-spacing: .6px; }
.bv-shp-kv { display: grid; grid-template-columns: min-content minmax(0, 1fr); gap: 1px 9px; margin-top: 2px; font-size: calc(9.5px + var(--bv-up)); }
.bv-shp-kv > span { color: #8a8a8a; letter-spacing: 1px; font-size: calc(8px + var(--bv-up)); padding-top: 1px; white-space: nowrap; }
.bv-shp-more { display: none; }
.bv-shp-d.more-on .bv-shp-more { display: grid; }
.bv-shp-mtog { align-self: flex-start; margin-top: 1px; padding: 1px 0; border: 0; background: none; font: inherit; font-size: calc(8px + var(--bv-up)); font-weight: 700; letter-spacing: 1.4px; color: #7f7f7f; cursor: pointer; }
.bv-shp-mtog:hover { color: #f2f2f2; }
.bv-shp-mtog::after { content: ' ▾'; }
.bv-shp-d.more-on .bv-shp-mtog::after { content: ' ▴'; }
.bv-shp-fold { flex: 0 0 auto; margin-left: auto; width: 20px; height: 20px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
  border: 1px solid #3a3a3a; background: rgba(28, 28, 28, .9); color: #bdbdbd; font: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.bv-shp-fold:hover { border-color: #DC4F4C; color: #fff; }
.bv-shp-d.hud-off .bv-shp-body { display: none; }
.bv-shp-d.hud-off .bv-shp-hud { min-width: 0; padding: 4px 5px 4px 7px; }
.bv-shp-kv > b { color: #e6e6e6; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bv-shp-kv > b.ok { color: #7ED4A6; }
.bv-shp-kv > b.bad { color: #f0a19f; }
.bv-shp-strip { left: 8px; right: 146px; bottom: 40px; height: 58px; padding: 2px 7px 0; display: flex; flex-direction: column; background: rgba(18, 18, 18, .66); }
.bv-shp-strip .bv-s2-rule { margin: 0; }
.bv-shp-strip .bv-s2-rule > b, .bv-shp-strip .bv-s2-rule > span { font-size: calc(8px + var(--bv-up)); letter-spacing: 1.4px; }
.bv-shp-d.map-off .bv-shp-strip { right: 86px; }
/* ===== round 336 (operator 2026-11-19: 'the edge measurement collapsable and more compact'; 'the details box smaller, a smaller font, both
   expanded and collapsed') ===== */
.bv-shp-strip { height: 44px; padding: 1px 6px 0; bottom: 38px; }
.bv-shp-strip .bv-s2-rule { gap: 6px; align-items: center; }
.bv-shp-strip .bv-s2-rule > b, .bv-shp-strip .bv-s2-rule > span { font-size: calc(7.5px + var(--bv-up)); letter-spacing: 1.2px; }
.bv-shp-strip .bv-shp-fold { margin-left: 0; width: 15px; height: 15px; font-size: 11px; }
.bv-shp-d.strip-off .bv-shp-strip { right: auto; height: auto; padding: 3px 4px 3px 7px; }
.bv-shp-d.strip-off .bv-shp-pf, .bv-shp-d.strip-off .bv-shp-strip .bv-s2-rule > :is(i, span) { display: none; }
.bv-shp-hud { left: 6px; top: 34px; min-width: 140px; max-width: 220px; padding: 4px 6px 4px; gap: 2px; }
.bv-shp-num { gap: 5px; }
.bv-shp-num > b { font-size: calc(13px + var(--bv-up2)); }
.bv-shp-num .shp-pill { font-size: 7.5px; padding: 1px 5px; letter-spacing: 1px; }
.bv-shp-at { font-size: calc(7.5px + var(--bv-up)); }
.bv-shp-kv { gap: 0 7px; margin-top: 1px; font-size: calc(8px + var(--bv-up)); }
.bv-shp-kv > span { font-size: calc(7px + var(--bv-up)); letter-spacing: .8px; }
.bv-shp-mtog { font-size: calc(7px + var(--bv-up)); letter-spacing: 1.2px; }
.bv-shp-hud .bv-shp-fold { width: 16px; height: 16px; font-size: 12px; }
.bv-shp-d.hud-off .bv-shp-hud { padding: 3px 4px 3px 6px; }
.bv-shp-pf { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.bv-shp-pf .shp-prof { display: block; width: 100%; height: 100%; }
.bv-shp-mini { right: 8px; bottom: 8px; width: 130px; padding: 5px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bv-shp-mini canvas { display: block; width: 118px; height: auto; border-radius: 4px; }
.bv-shp-mhead { display: flex; align-items: center; gap: 4px; width: 100%; }
.bv-shp-mlbl { display: none; font-size: calc(8.5px + var(--bv-up)); font-weight: 700; letter-spacing: 1.6px; color: #a6a6a6; padding-left: 2px; }
.bv-shp-tabs { display: inline-flex; gap: 2px; }
.bv-shp-tabs .shp-chip { padding: 3px 4px; font-size: 8px; letter-spacing: .6px; }
.bv-shp-d.map-off .bv-shp-mini { width: auto; padding: 4px 4px 4px 7px; }
.bv-shp-d.map-off .bv-shp-mini > :not(.bv-shp-mhead), .bv-shp-d.map-off .bv-shp-tabs { display: none; }
.bv-shp-d.map-off .bv-shp-mlbl { display: inline; }
.bv-shp-legend { display: flex; align-items: center; gap: 6px; width: 100%; font-size: calc(8px + var(--bv-up)); color: #8a8a8a; letter-spacing: .8px; }
.bv-shp-legend[hidden] { display: none; }
/* quiet tints inside 0.35 mm (FLAT), strong colours past it (BENT) */
.bv-shp-legend > i { flex: 1 1 auto; height: 7px; border-radius: 3px; background: linear-gradient(90deg, #e9e9e9 0%, #d6ccaa 35%, #f2d14a 35%, #f08a3a 64%, #DC4F4C 100%); }
.bv-shp-legend > i.f { background: linear-gradient(90deg, #4a2bb0, #7a4cff 35%, #b9a7ff 70%, #fff); }
/* round 345: both halves — UP (blue, raised towards you) on the left, the map's own flat ground in the middle, DOWN (yellow → red) on the
   right; the quiet tints run to ±0.35 mm (FLAT), the strong colours to 1 mm (js/shape.js heat()) */
.bv-shp-legend.two { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1px 4px; cursor: help; }
.bv-shp-legend.two[hidden] { display: none; }
.bv-shp-legend.two > i { grid-area: 2 / 1 / 3 / 4; height: 7px; border-radius: 3px;
  background: linear-gradient(90deg, #2f80ed 0%, #7ed4e6 32.5%, #b8cddc 32.5%, #5c6266 41.25%, #3e3e3e 50%, #646159 58.75%, #d6ccaa 67.5%, #f2d14a 67.5%, #f08a3a 82%, #DC4F4C 100%); }
.bv-shp-legend.two > span { white-space: nowrap; font-size: calc(7.5px + var(--bv-up)); letter-spacing: .5px; line-height: 1.1; }
.bv-shp-legend.two > .u { grid-area: 1 / 1; text-align: left; color: #7fb4f0; font-weight: 700; letter-spacing: 1px; }
.bv-shp-legend.two > .d { grid-area: 1 / 3; text-align: right; color: #f0a19f; font-weight: 700; letter-spacing: 1px; }
.bv-shp-legend.two > .l { grid-area: 3 / 1; text-align: left; }
.bv-shp-legend.two > .c { grid-area: 3 / 2; text-align: center; }
.bv-shp-legend.two > .r { grid-area: 3 / 3; text-align: right; }
/* round 352: a suspected dent's colour (js/shape.js DENT_RGB) — the key between UP and DOWN, only on a side that has one */
.bv-shp-legend.two > .dn { grid-area: 1 / 2; text-align: center; color: #e58ee0; font-weight: 700; letter-spacing: 1px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.bv-shp-legend.two > .dn > i { display: inline-block; width: 12px; height: 7px; border-radius: 2px; background: linear-gradient(90deg, rgb(246, 186, 240), rgb(214, 76, 208)); }   /* round 354: MICRO → MAJOR */
.bv-shp-kv > b.dent { color: #e58ee0; }
.bv-shp-kv > span.dl { white-space: normal; line-height: 1.15; }                 /* SUSPECTED / DENT on two lines, the value keeps its room */
.bv-shp-none { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; color: #555; font-size: calc(10px + var(--bv-up)); letter-spacing: 2px; min-height: 160px; }
.bv-shp-stage .shp-ov.tl { max-width: 50%; }
.bv-shp-stage .shp-ov.bl { bottom: 8px; }
.shp-vp.panning > canvas.shp-gl { cursor: move; }
/* round 345 (operator 2026-11-19): the edge strip on the bottom line, between the 3D card's view buttons and the map — js/vault.js placeStrip
   measures both (--shp-vl, --shp-mr); with too little room between them it goes back above the buttons (strip-up) */
.bv-shp-d .bv-shp-strip { left: var(--shp-vl, 290px); right: var(--shp-mr, 146px); bottom: 8px; }
.bv-shp-d.strip-up .bv-shp-strip { left: 8px; bottom: 38px; }
.bv-shp-d.strip-off .bv-shp-strip { right: auto; }
.bv-shp-stage .shp-ov.tr { max-width: calc(100% - 200px); }
/* a short window: the strip and the map smaller still (round 324: the figures show four rows at most, the rest under MORE) */
@media (max-height: 820px) { .bv-shp-strip { height: 40px; right: 124px; } .bv-shp-mini { width: 108px; } .bv-shp-mini canvas { width: 96px; } .bv-shp-tabs .shp-chip { padding: 2px 3px; font-size: 7.5px; letter-spacing: .3px; } }
/* the phone: the card first, then the figures, the map beside the edge's profile */
body.mv .bv-shp-d { position: static; display: flex; flex-direction: column; gap: 8px; }
body.mv .bv-shp-stage { position: relative; inset: auto; height: 420px; }
body.mv .bv-shp-hud, body.mv .bv-shp-strip, body.mv .bv-shp-mini { position: static; width: auto; background: #161616; border-color: #262626; }
body.mv .bv-shp-hud { padding: 10px 12px; max-width: none; min-width: 0; }
body.mv .bv-shp-kv { grid-template-columns: minmax(8.8em, auto) minmax(0, 1fr);   /* round 355: the figures and MORE share one label width (their values line up) */ gap: 5px 14px; font-size: calc(11.5px + var(--bv-up)); }
body.mv .bv-shp-kv > span { font-size: calc(10px + var(--bv-up)); }

body.mv .bv-shp-kv > b { white-space: normal; }
body.mv .bv-shp-strip { height: 84px; padding: 5px 9px 2px; }
body.mv .bv-shp-mini { align-items: stretch; padding: 10px; }
body.mv .bv-shp-mini .bv-shp-mhead { justify-content: center; }
body.mv .bv-shp-d.map-off .bv-shp-mhead { justify-content: flex-start; }
body.mv .bv-shp-fold { width: 30px; height: 30px; font-size: 17px; }
body.mv .bv-shp-mtog { font-size: calc(10px + var(--bv-up)); padding: 6px 0 2px; }
body.mv .bv-shp-mini canvas { width: min(200px, 58%); align-self: center; }
body.mv .bv-shp-tabs .shp-chip { padding: 7px 12px; font-size: 11px; }
body.mv .bv-shp { overflow: visible; }
/* round 345: six views — on a phone they run the full width under the scale chips (two rows), not a column down the card */
body.mv .bv-shp-stage .shp-ov.tr { left: 6px; right: 6px; top: 34px; max-width: none; justify-content: flex-start; }
/* round 354 (operator 2026-11-19): on the phone the card, then the edge at TRUE SCALE, then the figures (folded by default, js/vault.js),
   then the map */
body.mv .bv-shp-stage { order: 0; } body.mv .bv-shp-strip { order: 1; } body.mv .bv-shp-hud { order: 2; } body.mv .bv-shp-mini { order: 3; }

/* ---- BLACKVAULT: D — the SHAPE row under the pillars ---- */
.bv-s2-shape { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 5px 6px; border-radius: 5px;
  border: 1px solid #2a2a2a; background: #161616; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.bv-s2-shape:hover { border-color: #DC4F4C; }
.bv-s2-shape .sv svg { display: block; width: 100%; height: auto; max-height: 34px; }
.bv-s2-shape .rd { display: flex; flex-direction: column; min-width: 0; }
.bv-s2-shape .rd b { font-size: calc(13px + var(--bv-up)); color: #f2f2f2; font-weight: 700; }
.bv-s2-shape.flat .rd b { color: #7ED4A6; }
.bv-s2-shape .rd i { font-style: normal; font-size: calc(8px + var(--bv-up)); color: #8a8a8a; letter-spacing: .8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bv-s2-shape .rd i.jx { color: #f0a19f; }

/* ---- the A4: E — page 4, CARD SHAPE – MEASUREMENT ---- */
.jr .jr-shp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 6px 0 4px; }
.jr .jr-shp figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.jr .jr-shp figure.v img { width: 100%; height: auto; border: 1px solid #e3e3e3; border-radius: 3px; background: #2a2a2a; }
.jr .jr-shp figure.m img { height: 250px; width: auto; border: 1px solid #d9d9d9; }
.jr .jr-shp figcaption { font-size: 9px; letter-spacing: 1.4px; color: #555; font-weight: 700; }
.jr .jr-shprof { margin: 6px 0 2px; }
.jr .jr-shprof > i { display: block; font-style: normal; font-size: 9px; letter-spacing: 1.4px; color: #555; font-weight: 700; margin-bottom: 2px; }
.jr .jr-shprof svg { width: 100%; height: auto; }
.jr .jr-shfigs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 6px; }
.jr .jr-shfigs span { display: flex; flex-direction: column; gap: 2px; padding: 6px 7px; border: 1px solid #e3e3e3; border-radius: 3px; font-size: 8px; letter-spacing: 1.2px; color: #6a6a6a; }
.jr .jr-shfigs b { font-size: 12.5px; color: #1a1a1a; letter-spacing: .2px; }
.jr .jr-shfigs b.red { color: #DC4F4C; }
.jr .jr-shnote { font-size: 9px; color: #555; line-height: 1.45; margin: 6px 0 0; }

/* ---- STAGE/CAM: G — HEIGHT CALIBRATION ---- */
.stg-hcal { display: flex; flex-direction: column; gap: 6px; }
.stg-stair { display: block; width: 100%; max-width: 360px; }
.stg-stair svg { display: block; width: 100%; height: auto; font-family: Bahnschrift, Arial, sans-serif; }
.stg-hcal-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stg-hcal-thk { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: 1.2px; color: #a6a6a6; }
.stg-hcal-thk input { width: 48px; padding: 3px 5px; border-radius: 4px; border: 1px solid #3a3a3a; background: #1b1b1b; color: #f2f2f2; font: inherit; text-align: right; }
.stg-hcal-at { margin-left: auto; }
.stg-hcal-chip { margin-left: 8px; font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; padding: 2px 8px; border-radius: 4px; color: #8a8a8a; background: #232323; }
.stg-hcal-chip.ok { color: #0d2b12; background: #39FF14; }
.stg-hcal-chip.bad { color: #fff; background: #DC4F4C; }
.stg-hcal-chip.run { color: #262626; background: #f2d14a; }
.stg-hcal-why { margin: 0; font-size: 10.5px; color: #f0a19f; line-height: 1.4; }
.stg-hcal-sh { display: inline-block; width: 46px; height: 5px; margin-right: 5px; border-radius: 3px; background: #2c2c2c; vertical-align: middle; overflow: hidden; }
.stg-hcal-sh i { display: block; height: 100%; background: #7ED4A6; }
.stg-hcal-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: 10.5px; }
.stg-hcal-kv span { color: #8a8a8a; font-size: 8.5px; letter-spacing: 1.2px; padding-top: 2px; }
.stg-hcal-kv b { color: #f2f2f2; font-weight: 500; }
/* round 330: the jig — a row a position, two lines (tick · name · X · Y · GO, then known → measured · sharpness), the picture beside both;
   the STAGE/CAM column is ~250 px wide at 1920 */
.stg-stair { max-width: 380px; }
.stg-hcal-lvs { display: flex; flex-direction: column; gap: 3px; }
.stg-hcal-lv { display: grid; grid-template-columns: 14px minmax(0, 1fr) 38px 30px 28px 54px; grid-template-rows: auto auto; column-gap: 4px; row-gap: 1px; align-items: center;
  padding: 3px 3px; border-radius: 4px; border-bottom: 1px solid #1f1f1f; font-size: 10.5px; font-variant-numeric: tabular-nums; color: #e6e6e6; }
.stg-hcal-lv > .stg-hcal-pc { grid-column: 6; grid-row: 1 / span 2; justify-self: end; }
.stg-hcal-lv > .stg-hcal-rd { grid-column: 2 / 6; grid-row: 2; display: flex; justify-content: space-between; gap: 6px; color: #a6a6a6; font-size: 10px; white-space: nowrap; overflow: hidden; }
.stg-hcal-rd b { color: #f2f2f2; font-weight: 500; }
.stg-hcal-hd { padding-top: 0; padding-bottom: 2px; border-bottom-color: #2c2c2c; font-size: 8px; letter-spacing: 1.1px; color: #8a8a8a; font-weight: 700; }
.stg-hcal-hd > span { color: #8a8a8a; }
.stg-hcal-hd > .stg-hcal-rd { font-size: 8px; letter-spacing: .6px; }
.stg-hcal-hd .stg-hcal-nm { font-weight: 700; letter-spacing: 1.1px; }
.stg-hcal-lv input[type="checkbox"] { margin: 0; accent-color: #DC4F4C; cursor: pointer; }
.stg-hcal-xy { width: 100%; min-width: 0; box-sizing: border-box; padding: 1px 3px; border-radius: 4px; border: 1px solid #3a3a3a; background: #1b1b1b; color: #f2f2f2; font: inherit; font-size: 10.5px; text-align: right; }
.stg-hcal-xy:disabled { color: #7f7f7f; border-color: #2c2c2c; }
.stg-hcal-lv .stg-hcal-go1 { padding: 0 4px; min-height: 0; height: 19px; font-size: 9px; letter-spacing: .8px; }
.stg-hcal-nm { font-weight: 600; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stg-hcal-lv.act { background: rgba(220, 79, 76, .14); }
.stg-hcal-lv.act .stg-hcal-nm { color: #DC4F4C; }
.stg-hcal-lv.off > :not(input[type="checkbox"]) { opacity: .45; }
.stg-hcal-lo { font-style: normal; font-size: 8px; letter-spacing: 1px; color: #f2d14a; margin-left: 3px; }
.stg-hcal-pcb { display: block; padding: 0; border: 1px solid #2c2c2c; border-radius: 3px; background: none; cursor: zoom-in; line-height: 0; }
.stg-hcal-pcb:hover, .stg-hcal-pcb:focus-visible { border-color: #DC4F4C; outline: none; }
.stg-hcal-pic { display: block; width: 52px; height: auto; border-radius: 2px; }
.stg-hcal-rd .stg-hcal-sh { width: 34px; }
#view-stage .stg-hcal-lv .stg-hcal-xy { height: 19px; padding: 0 3px; font-size: 10.5px; line-height: 17px; }
#view-stage .stg-hcal-lv .stg-hcal-go1 { height: 19px; padding: 0 4px; font-size: 9px; line-height: 17px; }
#view-stage .stg-hcal-lv input[type="checkbox"] { width: 13px; height: 13px; }
/* FOCUS AT EACH STEP: the frames side by side */
.stg-hfocus { position: fixed; inset: 0; z-index: 9000; background: rgba(8, 8, 8, .9); display: flex; align-items: center; justify-content: center; padding: 16px; }
.stg-hfocus-in { width: min(1500px, 100%); max-height: 100%; overflow: auto; background: #1b1b1b; border: 1px solid #333; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.stg-hfocus-hd { display: flex; align-items: center; gap: 12px; }
.stg-hfocus-hd b { font-size: 13px; letter-spacing: 1.6px; color: #f2f2f2; }
.stg-hfocus-hd .btn { margin-left: auto; }
.stg-hfocus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stg-hfocus figure { margin: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid #2c2c2c; border-radius: 6px; background: #141414; }
.stg-hfocus figure.top { border-color: #39FF14; }
.stg-hfocus figcaption { display: flex; align-items: baseline; gap: 10px; font-size: 10.5px; letter-spacing: .8px; color: #a6a6a6; }
.stg-hfocus figcaption b { color: #f2f2f2; letter-spacing: 1.2px; }
.stg-hfocus figcaption em { margin-left: auto; font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; padding: 1px 6px; border-radius: 3px; color: #0d2b12; background: #39FF14; }
.stg-hfocus img { display: block; width: 100%; height: auto; border-radius: 3px; cursor: zoom-in; }
@media (max-width: 760px) { .stg-hfocus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
