/* Only SVGs successfully registered by motion-design.js are handed to GSAP.
   Without JS / any missing plugin the original, complete artwork survives. */
.cm-tech-svg.cm-motion-drawing *,
svg[data-structure-drawing].cm-motion-drawing * {
  animation: none !important;
}
/* The previous CSS trace assigned a dash to its parent group. DrawSVG owns
   strokes individually now; restore the solid authored portal outline. */
.cm-tech-svg.cm-motion-drawing .cm-tech-portal-trace {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}
/* No visibility, opacity or translate defaults: disabling motion cannot hide
   content or leave a structural member displaced from its connections. */

/* Temporary line wrappers are reverted at completion (under one second for a
   two-line heading). No clipping masks: accents and descenders keep their room. */
.cm-motion-title .cm-motion-line {
  will-change: transform;
}

/* Photo motion is a response to deliberate exploration, never a reveal that
   hides imagery while scrolling. Touch devices keep the authored crop. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) :is(.prefab-visual-tile,.industrial-model-photo) img {
    transition: transform 420ms cubic-bezier(.2,.65,.3,1);
  }
  body:not(.motion-off) :is(.prefab-visual-tile,.industrial-model-photo):is(:hover,:focus-visible) img {
    transform: scale(1.025);
  }
}

body.prefab-gallery-open { overflow: hidden; }
.prefab-image-dialog { overscroll-behavior: contain; }
.prefab-image-dialog button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.prefab-image-dialog .prefab-image-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}
.prefab-image-dialog .prefab-image-controls span { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  :is(.prefab-visual-tile,.industrial-model-photo) img { transition: none !important; transform: none !important; }
}
body.motion-off :is(.prefab-visual-tile,.industrial-model-photo) img { transition: none !important; transform: none !important; }
