/* CSS-3D viewer (drag to orbit). */
/* ============================================================
   3D VIEW (CSS 3D — zero-dependency, drag to orbit)
   ============================================================ */
.view-toggle { display: flex; gap: 2px; }
.vt-btn {
  padding: 3px 9px; font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint);
  background: transparent; border: 1px solid transparent; border-radius: 3px; cursor: pointer;
}
.vt-btn.active { color: var(--green); background: var(--green-pale); border-color: var(--success-rule); }
.vt-btn:hover:not(.active) { color: var(--ink-mid); }

.scene3d {
  position: relative; width: 100%; height: 420px;
  perspective: 1100px; perspective-origin: 50% 42%;
  overflow: hidden; cursor: grab; touch-action: none;
  background:
    radial-gradient(120% 90% at 50% 8%, var(--paper) 0%, var(--paper-warm) 55%, var(--paper-warmer) 100%);
  border-radius: 3px; user-select: none;
}
.scene3d.grabbing { cursor: grabbing; }
.stage3d {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform-style: preserve-3d;
  transition: transform 0.05s linear;
}
.face3d { position: absolute; transform-style: preserve-3d; backface-visibility: visible; }
.face3d.wall { box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), inset 0 -2px 4px rgba(0,0,0,0.16); }
.cap3d  { position: absolute; }
.post3d { position: absolute; background: #1C1C18; border-radius: 1px; box-shadow: 0 0 2px rgba(0,0,0,0.4); }
.gate3d { position: absolute; box-sizing: border-box; }
.ground3d { position: absolute; }
.contact-shadow {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.10) 55%, rgba(0,0,0,0) 78%);
  filter: blur(1px);
}
.v3d-toolbar {
  position: absolute; left: 10px; bottom: 10px; z-index: 5; display: flex; gap: 6px; align-items: center;
}
.v3d-hint {
  position: absolute; right: 10px; bottom: 10px; z-index: 5;
  font-size: 10px; color: var(--ink-faint); pointer-events: none;
  background: rgba(250,250,246,0.7); padding: 2px 6px; border-radius: 3px;
}
.v3d-btn {
  font-size: 10px; font-weight: 700; color: var(--ink-mid); background: rgba(255,255,255,0.85);
  border: 1px solid var(--rule-strong); border-radius: 3px; padding: 3px 8px; cursor: pointer;
}
.v3d-btn:hover { background: white; border-color: var(--green); color: var(--green); }
.v3d-controls {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  display: flex; gap: 4px; align-items: center;
}
.v3d-zoom-btn {
  font-size: 13px; font-weight: 700; line-height: 1; color: var(--ink-mid);
  background: rgba(255,255,255,0.85); border: 1px solid var(--rule-strong);
  border-radius: 3px; width: 24px; height: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.v3d-zoom-btn:hover { background: white; border-color: var(--green); color: var(--green); }
.v3d-legend {
  display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 12px 0; font-size: 10px; color: var(--ink-faint);
  min-height: 22px;
}
.v3d-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.v3d-legend .sw { width: 11px; height: 8px; border-radius: 1px; display: inline-block; }

/* Hero view layout — 3D is the main stage; the wrapper keeps the scene at a
   constant full width regardless of legend text length (color-name changes
   previously squeezed the flex-centered scene). */
.v3d-wrap { width: 100%; min-width: 0; }
.view-body-hero { position: relative; min-height: 470px; }
.plan-inset {
  position: absolute; top: 20px; right: 20px; width: 148px; z-index: 6;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  padding: 5px 6px 6px;
  pointer-events: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}
.plan-inset .pi-label {
  font-size: 8px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 3px;
}
.plan-inset .pi-art { aspect-ratio: 1 / 1; width: 100%; color: var(--ink); }
.plan-inset .pi-art svg { width: 100%; height: 100%; display: block; }
.plan-inset svg { width: 100% !important; max-width: 100% !important; display: block; }
@media (max-width: 700px) { .plan-inset { width: 108px; top: 16px; right: 16px; } }

/* VARIANT PANEL — product-style selector to the right of the 3D view */
.variant-panel {
  width: 252px;
  flex-shrink: 0;
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 12px 12px 14px;
  max-height: 560px;
  overflow-y: auto;
}
.variant-panel .section { margin-bottom: 14px; }
.variant-panel .section:last-child { margin-bottom: 0; }
.vpanel-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--rule);
}
@media (max-width: 940px) {
  .variant-panel { width: 100%; max-height: none; }
}

/* INFO ICON + OVERLAY (capped/uncapped + height guide) */
.info-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--ink-light); color: var(--ink-light);
  font-size: 10px; font-weight: 800; font-style: italic; font-family: Georgia, serif;
  background: white; cursor: pointer; line-height: 1; padding: 0;
  text-transform: none; letter-spacing: 0;
}
.info-ic:hover { border-color: var(--green); color: var(--green); }
.info-ov {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(30, 34, 28, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.info-modal {
  background: var(--paper, #FAFAF6);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  width: 440px; max-width: 100%;
  max-height: 82vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.info-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--rule);
  font-size: 13px; font-weight: 800; color: var(--ink);
}
.info-x {
  border: none; background: none; font-size: 20px; line-height: 1;
  color: var(--ink-light); cursor: pointer; padding: 0 2px;
}
.info-x:hover { color: var(--ink); }
.info-body { padding: 12px 14px 14px; overflow-y: auto; }

/* Height guide rows */
.hg-list { display: flex; flex-direction: column; gap: 5px; }
.hg-row {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--rule-strong); border-radius: 6px;
  background: white; padding: 8px 10px; cursor: pointer;
  transition: border-color 0.07s, background 0.07s;
}
.hg-row:hover { border-color: var(--green); }
.hg-row.active { border-color: var(--green); background: var(--green-pale); }
.hg-depth { display: flex; flex-direction: column; min-width: 58px; }
.hg-depth b { font-size: 11px; color: var(--ink); }
.hg-depth span { font-size: 10px; color: var(--ink-faint); }
.hg-title { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.hg-note { font-size: 10.5px; color: var(--ink-mid); line-height: 1.4; margin-top: 1px; }
.hg-check { margin-left: auto; color: var(--green); font-weight: 800; font-size: 13px; }

