/* sev10 interactive 3D board — all classes prefixed b3d- */
.b3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.b3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff;
  overflow: hidden;
}

/* Hover / attract label */
.b3d-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: stretch;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.01em;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.18s ease;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}
.b3d-label.is-on { opacity: 1; }
.b3d-label b {
  background: #FFC20E;
  color: #000;
  font-weight: 900;
  font-stretch: 125%;
  padding: 6px 7px 5px;
  border: 2px solid #000;
  border-right: 0;
}
.b3d-label span {
  background: #000;
  color: #fff;
  font-weight: 700;
  padding: 6px 8px 5px;
  border: 2px solid #000;
}
.b3d-label::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 2px;
  height: 9px;
  margin-left: -1px;
  background: #000;
}

/* Failure-mode card */
.b3d-card {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: min(360px, calc(100% - 24px));
  background: #000;
  color: #fff;
  padding: 22px 22px 16px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
}
.b3d-card.is-open { opacity: 1; transform: none; visibility: visible; }
.b3d-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: #FFC20E;
}
.b3d-card-ref {
  display: inline-block;
  margin-top: 4px;
  background: #FFC20E;
  color: #000;
  font-weight: 900;
  font-stretch: 125%;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 4px 7px 3px;
}
.b3d-card h3 {
  margin: 10px 36px 10px 0;
  font-size: 21px;
  line-height: 1.08;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.b3d-card-story {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: #e6e6e6;
}
.b3d-nc { text-transform: none; }
.b3d-fields { margin: 0; padding: 0; }
.b3d-fields div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #2c2c2c;
}
.b3d-fields dt {
  font-size: 10px;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFC20E;
  padding-top: 2px;
}
.b3d-fields dd { margin: 0; font-size: 12px; line-height: 1.38; font-weight: 500; color: #fff; }
.b3d-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid #fff;
}
.b3d-ratings span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 18px;
  font-weight: 900;
  font-stretch: 125%;
  padding: 3px 8px 2px;
  border: 1px solid #3a3a3a;
}
.b3d-ratings span i { font-style: normal; font-size: 11px; color: #9a9a9a; font-weight: 800; }
.b3d-ratings .b3d-ap { margin-left: auto; border-color: #FFC20E; }
.b3d-ratings .b3d-ap i { color: #FFC20E; }
.b3d-ratings .b3d-ap--high { background: #FFC20E; color: #000; }
.b3d-ratings .b3d-ap--high i { color: #000; }
.b3d-card-foot {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.b3d-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: 700 18px/32px system-ui, sans-serif;
  cursor: pointer;
}
.b3d-close:hover, .b3d-close:focus-visible { background: #FFC20E; color: #000; outline: none; }

/* Narrow containers: dock the card to the bottom */
.b3d-card.is-docked {
  left: 10px !important;
  right: 10px;
  top: auto !important;
  bottom: 10px;
  width: auto;
  max-height: max(46%, calc(100% - 170px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 12px;
  box-shadow: none;
}
.b3d-card.is-docked h3 { font-size: 18px; }
.b3d-card.is-docked .b3d-card-story { font-size: 13px; margin-bottom: 10px; }

/* Hint */
.b3d-hint {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  max-width: calc(100% - 36px);
  line-height: 1.3;
  transition: opacity 0.6s ease;
}
.b3d-hint::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background: #000;
  border: 3px solid #FFC20E;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #000;
  animation: b3d-pulse 1.8s ease-in-out infinite;
}
.b3d-hint.is-hidden { opacity: 0; }
@keyframes b3d-pulse { 50% { box-shadow: 0 0 0 2px #000, 0 0 0 7px rgba(0, 0, 0, 0.14); } }

/* Clickable-part markers: black/yellow numbered pins, screen-space constant size */
.b3d-marker {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 2px solid #000;
  border-radius: 50%;
  background: #FFC20E;
  color: #000;
  font: 900 12px/22px 'Archivo', system-ui, sans-serif;
  font-stretch: 125%;
  text-align: center;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.15s ease, color 0.15s ease;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}
.b3d-marker.is-on { opacity: 1; pointer-events: auto; }
.b3d-marker::before {
  /* pulse ring */
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid #FFC20E;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000;
  opacity: 0;
  animation: b3d-ring 2.8s ease-out infinite;
  animation-delay: var(--b3d-delay, 0s);
}
.b3d-marker::after {
  /* stem down to the part */
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: #000;
}
.b3d-marker.is-active { background: #000; color: #FFC20E; border-color: #FFC20E; }
.b3d-marker.is-active::before { animation: none; opacity: 0; }
@keyframes b3d-ring {
  0% { transform: scale(0.8); opacity: 0; }
  12% { opacity: 1; }
  45%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (hover: none) { .b3d-marker { width: 28px; height: 28px; line-height: 24px; } }

/* Keyboard access: visually hidden until focused */
.b3d-parts {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 24px);
  clip-path: inset(50%);
  pointer-events: auto;
}
.b3d-parts:focus-within { clip-path: none; }
.b3d-parts button {
  font: 800 11px/1 'Archivo', system-ui, sans-serif;
  text-transform: uppercase;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  padding: 6px 8px;
  cursor: pointer;
}
.b3d-parts button:focus-visible { background: #FFC20E; color: #000; outline: none; }

@media (prefers-reduced-motion: reduce) {
  .b3d-card, .b3d-label, .b3d-hint, .b3d-marker { transition: none; }
  .b3d-hint::before, .b3d-marker::before { animation: none; }
}
