:root {
  --icti-m02-green: #abd91a;
  --icti-m02-deep: #162019;
  --icti-m02-paper: #f5f7f2;
  --icti-m02-ink: rgba(245, 247, 242, .94);
  --icti-m02-muted: rgba(245, 247, 242, .34);
  --icti-m02-faint: rgba(245, 247, 242, .13);
  --icti-m02-duration: 10s;
}

.icti-motion02 {
  height: 78%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46%;
  z-index: 3;
}

.icti-motion02__viewport {
  aspect-ratio: 1;
  height: 100%;
  left: 50%;
  max-width: 100%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.icti-m02,
.icti-motion02__final {
  height: 100%;
  inset: 0;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.icti-m02 {
  overflow: visible;
  z-index: 2;
}

.icti-motion02__final {
  opacity: 0;
  visibility: visible;
  z-index: 3;
}

.icti-scene .icti-motion02__final {
  height: 100%;
  width: 100%;
}

.icti-m02 path,
.icti-m02 rect,
.icti-m02 circle {
  vector-effect: non-scaling-stroke;
}

.icti-m02__framework,
.icti-m02__condition,
.icti-m02__assembly-guide,
.icti-m02__assembly-piece,
.icti-m02__candidate,
.icti-m02__validated,
.icti-m02__scan {
  opacity: 0;
}

.icti-m02__framework rect,
.icti-m02__framework path,
.icti-m02__assembly-guide circle,
.icti-m02__assembly-guide path {
  fill: none;
}

.icti-m02__framework rect {
  stroke: var(--icti-m02-faint);
  stroke-width: 1.15;
}

.icti-m02__framework-line {
  stroke: var(--icti-m02-muted);
  stroke-width: 1;
}

.icti-m02__framework-tick {
  stroke: var(--icti-m02-green);
  stroke-width: 2;
}

.icti-m02__framework text {
  fill: var(--icti-m02-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: .13em;
}

.icti-m02__candidate,
.icti-m02__validated,
.icti-m02__assembly-piece {
  transform-box: view-box;
  transform-origin: 50% 50%;
}

.icti-m02__candidate-mark,
.icti-m02__curve-fragment,
.icti-m02__gap-arc,
.icti-m02__gap-rule,
.icti-m02__center-arc,
.icti-m02__center-axis,
.icti-m02__scan {
  fill: none;
  stroke-linecap: round;
}

.icti-m02__candidate-mark {
  stroke: var(--icti-m02-muted);
  stroke-width: 1.35;
}

.icti-m02__curve-fragment,
.icti-m02__gap-arc,
.icti-m02__center-arc {
  stroke: var(--icti-m02-ink);
  stroke-width: 11;
}

.icti-m02__endpoint {
  fill: var(--icti-m02-deep);
  stroke: var(--icti-m02-ink);
  stroke-width: 1.5;
}

.icti-m02__gap-rule,
.icti-m02__center-axis {
  stroke: var(--icti-m02-muted);
  stroke-dasharray: 2 8;
  stroke-width: 1.15;
}

.icti-m02__center-dot {
  fill: var(--icti-m02-ink);
  stroke: none;
}

.icti-m02__validated .icti-m02__candidate-mark,
.icti-m02__validated .icti-m02__curve-fragment,
.icti-m02__validated .icti-m02__gap-arc,
.icti-m02__validated .icti-m02__gap-rule,
.icti-m02__validated .icti-m02__center-arc,
.icti-m02__validated .icti-m02__center-axis,
.icti-m02__validated .icti-m02__endpoint {
  stroke: var(--icti-m02-green);
}

.icti-m02__validated .icti-m02__center-dot {
  fill: var(--icti-m02-green);
}

.icti-m02__scan {
  stroke: var(--icti-m02-green);
  stroke-width: 2.2;
}

.icti-m02__assembly-guide circle,
.icti-m02__assembly-guide path {
  stroke: var(--icti-m02-muted);
  stroke-dasharray: 3 11;
  stroke-linecap: round;
  stroke-width: 1.1;
}

.icti-m02__assembly-guide .icti-m02__assembly-notch {
  stroke: var(--icti-m02-green);
  stroke-dasharray: none;
  stroke-width: 1.8;
}

.icti-m02__assembly-piece image {
  image-rendering: auto;
}

.icti-motion02.is-playing .icti-m02 {
  animation: ictiM02Process var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-motion02__final {
  animation: ictiM02Final var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__framework {
  animation: ictiM02Framework var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__condition--curve {
  animation: ictiM02CurvePhase var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__condition--gap {
  animation: ictiM02GapPhase var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__condition--center {
  animation: ictiM02CenterPhase var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--curve-flat {
  animation: ictiM02RejectCurveFlat var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--curve-tight {
  animation: ictiM02RejectCurveTight var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__validated--curve {
  animation: ictiM02KeepCurve var(--icti-m02-duration) cubic-bezier(.2, .74, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--gap-narrow {
  animation: ictiM02RejectGapNarrow var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--gap-wide {
  animation: ictiM02RejectGapWide var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__validated--gap {
  animation: ictiM02KeepGap var(--icti-m02-duration) cubic-bezier(.2, .74, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--center-high {
  animation: ictiM02RejectCenterHigh var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__candidate--center-low {
  animation: ictiM02RejectCenterLow var(--icti-m02-duration) cubic-bezier(.3, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__validated--center {
  animation: ictiM02KeepCenter var(--icti-m02-duration) cubic-bezier(.2, .74, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__scan--curve {
  animation: ictiM02ScanCurve var(--icti-m02-duration) cubic-bezier(.2, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__scan--gap {
  animation: ictiM02ScanGap var(--icti-m02-duration) cubic-bezier(.2, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__scan--center {
  animation: ictiM02ScanCenter var(--icti-m02-duration) cubic-bezier(.2, .7, .2, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-guide {
  animation: ictiM02AssemblyGuide var(--icti-m02-duration) linear 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-piece--left {
  animation: ictiM02PieceLeft var(--icti-m02-duration) cubic-bezier(.16, .82, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-piece--upper-mid {
  animation: ictiM02PieceUpperMid var(--icti-m02-duration) cubic-bezier(.16, .82, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-piece--lower-mid {
  animation: ictiM02PieceLowerMid var(--icti-m02-duration) cubic-bezier(.16, .82, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-piece--upper-core {
  animation: ictiM02PieceUpperCore var(--icti-m02-duration) cubic-bezier(.16, .82, .18, 1) 1 both;
}

.icti-motion02.is-playing .icti-m02__assembly-piece--lower-core {
  animation: ictiM02PieceLowerCore var(--icti-m02-duration) cubic-bezier(.16, .82, .18, 1) 1 both;
}

.icti-motion02__replay {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  bottom: -27px;
  color: #fff;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 10px;
  letter-spacing: .04em;
  padding: 8px 12px;
  position: absolute;
  right: -4px;
  z-index: 6;
}

.icti-motion02__replay:hover,
.icti-motion02__replay:focus-visible {
  background: var(--icti-m02-green);
  border-color: var(--icti-m02-green);
  color: var(--icti-m02-deep);
  outline: none;
}

.icti-motion02.is-resetting .icti-m02,
.icti-motion02.is-resetting .icti-motion02__final,
.icti-motion02.is-final .icti-m02 {
  opacity: 0 !important;
}

.icti-motion02.is-resetting *,
.icti-motion02.is-final * {
  animation: none !important;
}

.icti-motion02.is-final .icti-m02 {
  visibility: hidden;
}

.icti-motion02.is-final .icti-motion02__final {
  opacity: 1 !important;
  visibility: visible;
}

@keyframes ictiM02Process {
  0%, 72.282% { opacity: 1; }
  73.913%, 100% { opacity: 0; }
}

@keyframes ictiM02Final {
  0%, 72.282% { opacity: 0; }
  73.913%, 100% { opacity: 1; }
}

@keyframes ictiM02Framework {
  0%, 2.5% { opacity: 0; }
  5%, 47.8% { opacity: 1; }
  50.5%, 100% { opacity: 0; }
}

@keyframes ictiM02CurvePhase {
  0%, 3.5% { opacity: 0; }
  6%, 49.1% { opacity: 1; }
  50.5%, 100% { opacity: 0; }
}

@keyframes ictiM02GapPhase {
  0%, 18% { opacity: 0; }
  21%, 49.1% { opacity: 1; }
  50.5%, 100% { opacity: 0; }
}

@keyframes ictiM02CenterPhase {
  0%, 34% { opacity: 0; }
  37%, 49.1% { opacity: 1; }
  50.5%, 100% { opacity: 0; }
}

@keyframes ictiM02RejectCurveFlat {
  0%, 4% { opacity: 0; transform: translateX(-10px); }
  7%, 14% { opacity: .38; transform: translateX(0); }
  18% { opacity: .1; transform: translateX(18px); }
  21%, 100% { opacity: 0; transform: translateX(28px); }
}

@keyframes ictiM02RejectCurveTight {
  0%, 7% { opacity: 0; transform: translateX(-10px); }
  10%, 16% { opacity: .38; transform: translateX(0); }
  20% { opacity: .1; transform: translateX(18px); }
  23%, 100% { opacity: 0; transform: translateX(28px); }
}

@keyframes ictiM02KeepCurve {
  0%, 10% { opacity: 0; transform: translateX(-8px); }
  13%, 17% { opacity: 1; transform: translateX(0); }
  20% { opacity: 1; transform: translate(0, -235px) scale(.72); }
  47.8% { opacity: 1; transform: translate(0, -235px) scale(.72); }
  50.4%, 100% { opacity: 0; transform: translate(220px, -90px) scale(.8); }
}

@keyframes ictiM02RejectGapNarrow {
  0%, 19% { opacity: 0; transform: translateY(-8px); }
  22%, 30% { opacity: .38; transform: translateY(0); }
  34% { opacity: .1; transform: translateY(-15px); }
  37%, 100% { opacity: 0; transform: translateY(-24px); }
}

@keyframes ictiM02RejectGapWide {
  0%, 22% { opacity: 0; transform: translateY(8px); }
  25%, 32% { opacity: .38; transform: translateY(0); }
  36% { opacity: .1; transform: translateY(15px); }
  39%, 100% { opacity: 0; transform: translateY(24px); }
}

@keyframes ictiM02KeepGap {
  0%, 26% { opacity: 0; transform: scale(.96); }
  29%, 33% { opacity: 1; transform: scale(1); }
  36% { opacity: 1; transform: translateY(-235px) scale(.72); }
  47.8% { opacity: 1; transform: translateY(-235px) scale(.72); }
  50.4%, 100% { opacity: 0; transform: translateY(-36px) scale(.82); }
}

@keyframes ictiM02RejectCenterHigh {
  0%, 35% { opacity: 0; transform: translateY(-8px); }
  38%, 43% { opacity: .38; transform: translateY(0); }
  46% { opacity: .1; transform: translateY(-14px); }
  49%, 100% { opacity: 0; transform: translateY(-22px); }
}

@keyframes ictiM02RejectCenterLow {
  0%, 38% { opacity: 0; transform: translateY(8px); }
  41%, 45% { opacity: .38; transform: translateY(0); }
  48% { opacity: .1; transform: translateY(14px); }
  50.5%, 100% { opacity: 0; transform: translateY(22px); }
}

@keyframes ictiM02KeepCenter {
  0%, 40% { opacity: 0; transform: scale(.96); }
  43%, 46% { opacity: 1; transform: scale(1); }
  48% { opacity: 1; transform: translateY(-235px) scale(.72); }
  49.1% { opacity: 1; transform: translateY(-235px) scale(.72); }
  50.5%, 100% { opacity: 0; transform: translate(-220px, -45px) scale(.82); }
}

@keyframes ictiM02ScanCurve {
  0%, 4% { opacity: 0; transform: translateY(0); }
  6% { opacity: 1; }
  17% { opacity: 1; transform: translateY(360px); }
  20%, 100% { opacity: 0; transform: translateY(360px); }
}

@keyframes ictiM02ScanGap {
  0%, 20% { opacity: 0; transform: translateY(0); }
  22% { opacity: 1; }
  33% { opacity: 1; transform: translateY(360px); }
  36%, 100% { opacity: 0; transform: translateY(360px); }
}

@keyframes ictiM02ScanCenter {
  0%, 36% { opacity: 0; transform: translateY(0); }
  38% { opacity: 1; }
  47% { opacity: 1; transform: translateY(360px); }
  49.4%, 100% { opacity: 0; transform: translateY(360px); }
}

@keyframes ictiM02AssemblyGuide {
  0%, 49.2% { opacity: 0; transform: scale(.92); }
  51.2%, 69.5% { opacity: .72; transform: scale(1); }
  72.282% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes ictiM02PieceLeft {
  0%, 49.2% { opacity: 0; transform: translate(-260px, 4px) scale(.64); }
  51% { opacity: 1; }
  62% { opacity: 1; transform: translate(0, 0) scale(1); }
  72.282% { opacity: 1; transform: translate(0, 0) scale(1); }
  73.913%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

@keyframes ictiM02PieceUpperMid {
  0%, 51.5% { opacity: 0; transform: translate(-10px, -245px) scale(.72); }
  54% { opacity: 1; }
  64.5% { opacity: 1; transform: translate(0, 0) scale(1); }
  72.282% { opacity: 1; transform: translate(0, 0) scale(1); }
  73.913%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

@keyframes ictiM02PieceLowerMid {
  0%, 54.5% { opacity: 0; transform: translate(-8px, 245px) scale(.72); }
  57% { opacity: 1; }
  66.5% { opacity: 1; transform: translate(0, 0) scale(1); }
  72.282% { opacity: 1; transform: translate(0, 0) scale(1); }
  73.913%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

@keyframes ictiM02PieceUpperCore {
  0%, 57.5% { opacity: 0; transform: translate(250px, -145px) scale(.68); }
  60% { opacity: 1; }
  68.5% { opacity: 1; transform: translate(0, 0) scale(1); }
  72.282% { opacity: 1; transform: translate(0, 0) scale(1); }
  73.913%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

@keyframes ictiM02PieceLowerCore {
  0%, 60.5% { opacity: 0; transform: translate(250px, 145px) scale(.68); }
  63% { opacity: 1; }
  70% { opacity: 1; transform: translate(0, 0) scale(1); }
  72.282% { opacity: 1; transform: translate(0, 0) scale(1); }
  73.913%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
}

@media (max-width: 656px) {
  .icti-motion02 {
    height: 310px;
    left: auto;
    margin: 0 auto 32px;
    position: relative;
    top: auto;
    transform: none;
    width: 78%;
  }

  .icti-motion02__replay {
    bottom: -24px;
    right: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .icti-motion02 *,
  .icti-motion02 *::before,
  .icti-motion02 *::after {
    animation: none !important;
  }

  .icti-motion02 .icti-m02 {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .icti-motion02 .icti-motion02__final {
    opacity: 1 !important;
  }

  .icti-motion02__replay {
    display: none;
  }
}

/* Standalone preview and deterministic renderer */
body[data-icti-motion02-preview="true"] {
  background: var(--icti-m02-deep);
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}

body[data-icti-motion02-preview="true"][data-icti-motion02-capture="true"] {
  --icti-m02-deep: #ffffff;
  --icti-m02-ink: rgba(22, 32, 25, .92);
  --icti-m02-muted: rgba(22, 32, 25, .34);
  --icti-m02-faint: rgba(22, 32, 25, .12);
  background: #ffffff;
}

body[data-icti-motion02-preview="true"][data-icti-motion02-capture="true"] .icti-motion02__replay {
  display: none !important;
}

.icti-motion02-standalone {
  height: 100vh;
  position: relative;
  width: 100vw;
}

.icti-motion02-standalone .icti-motion02 {
  height: min(76vh, 820px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(76vh, 820px);
}

.icti-motion02-standalone .icti-motion02__replay {
  bottom: 4.6vh;
  position: fixed;
  right: 4.6vw;
}

@media (max-width: 656px) {
  .icti-motion02-standalone .icti-motion02 {
    height: min(78vw, 560px);
    left: 50%;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(78vw, 560px);
  }
}

/* Keep the integrated replay control clear of the existing anatomy notes. */
.icti-anatomy .icti-motion02__replay {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
