.analysis-scene {
  --view-left: 260px;
  --view-top: 322px;
  --view-width: 646px;
  --view-height: 1416px;
  position: absolute;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .78s cubic-bezier(.22, .8, .22, 1), visibility 0s linear .78s;
}

.analysis-scene.is-visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.analysis-skin {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .5s ease, transform .9s cubic-bezier(.22, .8, .22, 1);
}

.scene-tag {
  position:absolute;
  left:13.7%;
  top:15.7%;
  z-index:100;
  box-sizing:border-box;
  width:310px;
  padding:14px 20px 11px;
  color:#97105c;
  border:2px solid #bd6793;
  background:#fffafd;
  font:700 28px/1 "Alkatra",cursive;
  letter-spacing:.4px;
  transform:rotate(-3deg);
  box-shadow:4px 4px 0 rgba(75,125,206,.13);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .28s ease, visibility 0s linear .28s;
}
.scene-tag.is-visible { opacity:1; visibility:visible; transition-delay:0s; }
.scene-tag::before { content:"✦"; margin-right:12px; }
.scene-tag::after { content:"✦"; float:right; color:#77a9e8; font-size:18px; }
.analysis-scene[data-scene-state="calculating"] .scene-tag { display:none; }

.analysis-viewport {
  position: absolute;
  left: var(--view-left);
  top: var(--view-top);
  z-index: 2;
  width: var(--view-width);
  height: var(--view-height);
  overflow: hidden;
  border-radius: var(--view-radius, 26px);
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 188, 223, .12), transparent 28%),
    radial-gradient(circle at 78% 70%, rgba(122, 180, 255, .12), transparent 30%),
    #e8e7e9;
  box-shadow: inset 0 0 48px rgba(70, 52, 66, .08);
  transition: left .8s cubic-bezier(.22,.8,.22,1), top .8s cubic-bezier(.22,.8,.22,1), width .8s cubic-bezier(.22,.8,.22,1), height .8s cubic-bezier(.22,.8,.22,1);
}

.analysis-live,
.analysis-portrait,
.analysis-effects {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.calculating-reference{position:absolute;left:-156px;top:-301px;z-index:0;width:1080px;height:1920px;max-width:none;opacity:0;pointer-events:none;transition:opacity .48s cubic-bezier(.22,.8,.22,1)}
.analysis-scene[data-scene-state="calculating"].comparisons-ready .calculating-reference{opacity:1}

.analysis-live,
.analysis-effects { z-index: 3; }
.analysis-portrait {
  z-index: 2;
  object-fit: cover;
  transform: scaleX(-1) scale(var(--camera-zoom, 1));
  opacity: 0;
  transition: opacity .65s ease, filter .8s ease, transform .9s cubic-bezier(.22,.8,.22,1);
}
.analysis-effects { z-index: 4; pointer-events: none; }

.analysis-scene[data-scene-state="locked"] .analysis-portrait,
.analysis-scene[data-scene-state="scanning"] .analysis-portrait,
.analysis-scene[data-scene-state="analysing"] .analysis-portrait,
.analysis-scene[data-scene-state="mapping"] .analysis-portrait,
.analysis-scene[data-scene-state="distorting"] .analysis-portrait,
.analysis-scene[data-scene-state="rebuilding"] .analysis-portrait { opacity: 1; }
.analysis-scene[data-scene-state="separating"] .analysis-portrait { opacity: .12; filter: blur(5px); }
.analysis-scene[data-scene-state="distorting"] .analysis-portrait { opacity: 0; }

.analysis-scene[data-scene-state="calculating"] {
  --view-left: 15.2%;
  --view-top: 19.4%;
  --view-width: 70.5%;
  --view-height: 68.7%;
}

.analysis-scene[data-scene-state="result"] {
  --view-left: 130px;
  --view-top: 300px;
  --view-width: 830px;
  --view-height: 1420px;
}

.analysis-motion,
.analysis-balls,
.analysis-data-cards,
.analysis-fusion-pairs {
  position: absolute;
  left: var(--view-left);
  top: var(--view-top);
  width: var(--view-width);
  height: var(--view-height);
  transition: left .85s cubic-bezier(.22,.8,.22,1), top .85s cubic-bezier(.22,.8,.22,1), width .85s cubic-bezier(.22,.8,.22,1), height .85s cubic-bezier(.22,.8,.22,1), opacity .45s ease;
}

.analysis-motion { z-index:5; overflow:visible; opacity:0; pointer-events:none; }
.analysis-balls { z-index:6; pointer-events:none; }
.analysis-data-cards { z-index:5; opacity:0; pointer-events:none; }
.analysis-fusion-pairs { z-index:6; opacity:0; pointer-events:none; }
.analysis-scene:is([data-scene-state="align"],[data-scene-state="noFace"],[data-scene-state="locked"],[data-scene-state="scanning"],[data-scene-state="analysing"]) .analysis-motion { opacity:1; }

.analysis-foreground {
  position:absolute;
  inset:0;
  z-index:6;
  width:100%;
  height:100%;
  opacity:0;
  pointer-events:none;
  transition:opacity .28s ease;
}
.analysis-foreground.is-active { opacity:1; }
.analysis-foreground-raster {
  position:absolute;
  inset:0;
  z-index:9;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  pointer-events:none;
  transition:opacity .28s ease;
}
.analysis-foreground-raster.is-active { opacity:1; }
.analysis-scene.has-reference-foreground .analysis-skin { opacity:0; }
.analysis-scene.has-reference-foreground .analysis-viewport { border-radius:0; }
.analysis-scene.has-reference-foreground .scene-status { opacity:0; }
.analysis-scene.has-reference-foreground .scene-tag {
  left:12.1%;
  top:14.75%;
  z-index:22;
  width:400px;
  min-height:84px;
  padding:17px 22px 14px;
  opacity:1;
  box-shadow:none;
}
.analysis-scene.has-reference-foreground .scene-tag::before { content:"✦"; margin-right:12px; }
.analysis-scene.has-reference-foreground .scene-tag::after { content:"✦"; float:right; color:#77a9e8; font-size:18px; }
.analysis-tulip-overlay { filter:drop-shadow(0 3px 1px rgba(151, 5, 87, .2)); }
.analysis-tulip-overlay .tulip-back { fill:#f177a5; stroke:#c54783; stroke-width:2; }
.analysis-tulip-overlay .tulip-front { fill:#f58fb2; }
.analysis-tulip-overlay .tulip-shine { fill:none; stroke:#ffc1d9; stroke-width:5; stroke-linecap:round; opacity:.72; }

.analysis-arrows { opacity:0; transition:opacity .4s ease; }
.analysis-scene:is([data-scene-state="align"],[data-scene-state="noFace"],[data-scene-state="locked"],[data-scene-state="scanning"],[data-scene-state="analysing"]) .analysis-arrows { opacity:1; }
.motion-arrow {
  fill:none;
  stroke-width:4;
  stroke-linecap:round;
  stroke-dasharray:12 13;
  vector-effect:non-scaling-stroke;
  animation:arrow-flow 1.9s linear infinite;
}
.arrow-pink { stroke:#ff4f9b; }
.arrow-blue { stroke:#4f8dea; }
.arrow-violet { stroke:#8b63df; }
.arrow-orange { stroke:#ff7653; }
.analysis-scene[data-scene-state="scanning"] .motion-arrow { animation-duration:.62s; stroke-width:5; }

.analysis-target { color:#a40c67; transition:opacity .4s ease, filter .45s ease; }
.analysis-target path { fill:none; stroke:currentColor; stroke-width:9; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.analysis-target circle { fill:currentColor; }
.analysis-scene[data-scene-state="noFace"] .analysis-target { opacity:.48; }
.analysis-scene[data-scene-state="locked"] .analysis-target { animation:target-lock 1.4s ease-out 1; filter:drop-shadow(0 0 12px #ff4f9b); }

.analysis-ball {
  position: absolute;
  width:118px;
  height:108px;
  color:var(--ball);
  transition:left .9s cubic-bezier(.2,.9,.2,1), top .9s cubic-bezier(.2,.9,.2,1), width .75s ease, height .75s ease, opacity .5s ease, transform .75s cubic-bezier(.2,.9,.2,1);
  filter:drop-shadow(0 10px 0 rgba(115,29,91,.12));
  will-change:left,top,transform;
}
.ball-art { display:block; width:100%; height:100%; overflow:visible; animation:ball-breathe 2.7s ease-in-out infinite alternate; transform-origin:center; }
.ball-shape { fill:color-mix(in srgb,currentColor 82%,white); stroke:color-mix(in srgb,currentColor 70%,#70104f); stroke-width:4; stroke-linejoin:round; transition:d .72s cubic-bezier(.2,.8,.2,1); }
.ball-eye { fill:#fff; transform-box:fill-box; transform-origin:center; }
.ball-brow,.ball-mouth { fill:none; stroke:#fff; stroke-width:4; stroke-linecap:round; transition:d .34s ease, transform .34s ease; transform-box:fill-box; transform-origin:center; }
.ball-brow { stroke-width:3; opacity:.82; }
.ball-face { transform-box:fill-box; transform-origin:center; }
.ball-afterimage { position:absolute; inset:12px; z-index:-1; border-radius:50%; background:currentColor; opacity:.18; filter:blur(1px); transform:translate(18px,15px); }
.ball-pink { --ball:#f14491; left:13%; top:12%; --delay:0ms; --seek-x:42px; --seek-y:56px; }
.ball-blue { --ball:#5593e9; left:70%; top:12%; --delay:110ms; --seek-x:-42px; --seek-y:56px; }
.ball-violet { --ball:#8b62df; left:14%; top:68%; --delay:220ms; --seek-x:42px; --seek-y:-56px; }
.ball-orange { --ball:#ff7551; left:70%; top:68%; --delay:330ms; --seek-x:-42px; --seek-y:-56px; }
.analysis-scene:is([data-scene-state="align"],[data-scene-state="noFace"],[data-scene-state="locked"],[data-scene-state="scanning"],[data-scene-state="analysing"]) .analysis-ball {
  left:calc(var(--ball-left) * 1%);
  top:calc(var(--ball-top) * 1%);
}
.analysis-scene:is([data-scene-state="align"],[data-scene-state="noFace"],[data-scene-state="locked"]) .analysis-ball { width:146px; height:132px; }
.ball-blue .ball-art { animation-delay:-.6s; }
.ball-violet .ball-art { animation-delay:-1.2s; }
.ball-orange .ball-art { animation-delay:-1.8s; }

.analysis-scene[data-scene-state="noFace"] .analysis-ball { animation:seek-centre 2.25s cubic-bezier(.45,0,.2,1) infinite; }
.analysis-scene[data-scene-state="locked"] .ball-art { animation:lock-celebrate 2.05s cubic-bezier(.2,.8,.25,1) var(--delay) 1 both; }
.analysis-scene[data-scene-state="scanning"] .analysis-ball { width:116px; height:160px; transform:rotate(calc(var(--ball-rotation) * 1deg)); }
.analysis-scene[data-scene-state="scanning"] .ball-shape { d:path("M42 7C58 1 79 7 87 24L100 75C104 93 91 112 73 116L58 119C40 122 24 110 20 92L8 42C3 24 18 11 42 7Z"); }
.analysis-scene[data-scene-state="scanning"] .ball-pink { --scan-x:22px; }
.analysis-scene[data-scene-state="scanning"] .ball-blue { --scan-x:-22px; }
.analysis-scene[data-scene-state="scanning"] .ball-violet { --scan-x:20px; }
.analysis-scene[data-scene-state="scanning"] .ball-orange { --scan-x:-20px; }
.analysis-scene[data-scene-state="scanning"] .ball-art { animation:scan-dash .72s cubic-bezier(.45,0,.25,1) infinite alternate; }
.analysis-scene[data-scene-state="scanning"] .ball-afterimage { opacity:.28; box-shadow:0 22px 0 color-mix(in srgb,currentColor 55%,transparent),0 44px 0 color-mix(in srgb,currentColor 28%,transparent); }

.analysis-scene[data-scene-state="analysing"] .analysis-ball { width:118px; height:106px; }
.analysis-scene[data-scene-state="analysing"] :is(.ball-pink,.ball-violet) .ball-art { animation:fuse-left 1.55s cubic-bezier(.6,0,.25,1) infinite; }
.analysis-scene[data-scene-state="analysing"] :is(.ball-blue,.ball-orange) .ball-art { animation:fuse-right 1.55s cubic-bezier(.6,0,.25,1) infinite; }
.analysis-scene[data-scene-state="analysing"] .ball-afterimage { opacity:.34; filter:blur(8px); transform:scale(1.12); }
.analysis-scene:is([data-scene-state="mapping"],[data-scene-state="distorting"],[data-scene-state="separating"],[data-scene-state="rebuilding"]) .analysis-ball { width:84px; height:74px; }
.analysis-scene[data-scene-state="mapping"] .ball-pink { left:7%; top:11%; }
.analysis-scene[data-scene-state="mapping"] .ball-blue { left:78%; top:11%; }
.analysis-scene[data-scene-state="mapping"] .ball-violet { left:9%; top:67%; }
.analysis-scene[data-scene-state="mapping"] .ball-orange { left:76%; top:67%; }
.analysis-scene[data-scene-state="distorting"] .ball-pink { left:76%; top:8%; }
.analysis-scene[data-scene-state="distorting"] .ball-blue { left:84%; top:13%; }
.analysis-scene[data-scene-state="distorting"] .ball-violet { left:7%; top:67%; }
.analysis-scene[data-scene-state="distorting"] .ball-orange { left:76%; top:75%; }
.analysis-scene[data-scene-state="separating"] .ball-pink { left:7%; top:17%; }
.analysis-scene[data-scene-state="separating"] .ball-blue { left:77%; top:25%; }
.analysis-scene[data-scene-state="separating"] .ball-violet { left:10%; top:66%; }
.analysis-scene[data-scene-state="separating"] .ball-orange { left:76%; top:76%; }
.analysis-scene[data-scene-state="rebuilding"] .ball-pink { left:5%; top:11%; }
.analysis-scene[data-scene-state="rebuilding"] .ball-blue { left:80%; top:12%; }
.analysis-scene[data-scene-state="rebuilding"] .ball-violet { left:7%; top:72%; }
.analysis-scene[data-scene-state="rebuilding"] .ball-orange { left:78%; top:71%; }
.analysis-scene:is([data-scene-state="calculating"],[data-scene-state="result"]) .analysis-ball { opacity:0; }

.analysis-scene[data-scene-state="analysing"] .analysis-data-cards { opacity:1; }
.data-card { position:absolute; width:31%; height:9%; display:grid; grid-template-columns:38px 1fr; grid-template-rows:1fr 1fr; align-items:center; gap:3px 10px; padding:13px 16px; border:3px solid currentColor; border-radius:9% 14% 10% 13%; background:color-mix(in srgb,currentColor 22%,#fff 78%); box-shadow:0 10px 0 color-mix(in srgb,currentColor 18%,transparent); animation:data-card-float 2.4s ease-in-out infinite alternate; }
.data-card i { grid-row:1/3; font:700 30px/1 Alexandria,sans-serif; }
.data-card b { display:block; height:4px; border-radius:4px; background:currentColor; opacity:.72; }
.data-card-pink { left:14%; top:11%; color:#e94692; }
.data-card-blue { right:14%; top:11%; color:#4f8de4; animation-delay:-.6s; }
.data-card-violet { left:14%; top:74%; color:#8961d9; animation-delay:-1.2s; }
.data-card-orange { right:14%; top:74%; color:#ff7653; animation-delay:-1.8s; }

/* The first five calibration states use the exact artwork cut from 04-08.png.
   All moving parts share the stage's 1080 x 1920 coordinate system. */
.analysis-scene.has-original-motion :is(.analysis-motion,.analysis-balls,.analysis-data-cards,.analysis-fusion-pairs) {
  left:0;
  top:0;
  width:1080px;
  height:1920px;
}
.analysis-scene.has-original-motion :is(.scene-tag,.analysis-foreground,.analysis-tulip-overlay) { display:none; }
.analysis-scene.has-original-motion .analysis-motion { z-index:5; }
.analysis-scene.has-original-motion .analysis-balls { z-index:6; }
.analysis-scene.has-original-motion .analysis-data-cards,
.analysis-scene.has-original-motion .analysis-fusion-pairs { z-index:7; }
.analysis-scene.has-original-motion .analysis-ball {
  left:var(--ball-left);
  top:var(--ball-top);
  width:150px;
  height:135px;
  filter:drop-shadow(0 9px 0 rgba(115,29,91,.12));
  transform-origin:center;
}
.analysis-scene.has-original-motion .ball-art { display:block; }
.analysis-scene.has-original-motion .ball-afterimage { display:block; }
.analysis-scene.has-original-motion .ball-shape { d:path("M28 22C42 5 65 12 70 27C88 17 108 31 104 50C119 61 108 87 89 86C81 105 51 107 43 89C21 98 5 76 17 59C2 44 10 22 28 22Z"); }
.analysis-scene.has-original-motion .analysis-data-cards { opacity:0; }
.analysis-scene.has-original-motion[data-scene-state="analysing"] .analysis-data-cards,
.analysis-scene.has-original-motion[data-scene-state="analysing"] .analysis-fusion-pairs { opacity:1; }
.analysis-scene.has-original-motion .data-card {
  position:absolute;
  display:block;
  box-sizing:border-box;
  padding:0;
  border:0;
  border-radius:0;
  background-color:transparent;
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
}
.analysis-scene.has-original-motion .data-card > * { display:none; }
.analysis-fusion-pairs .fusion-pair {
  position:absolute;
  display:block;
  left:410px;
  width:260px;
  height:150px;
  overflow:visible;
  opacity:0;
  transform-origin:center;
}
.analysis-fusion-pairs .fusion-pair-top { top:610px; }
.analysis-fusion-pairs .fusion-pair-bottom { top:1135px; }
.fusion-body { stroke:#95105d; stroke-width:4; stroke-linejoin:round; filter:drop-shadow(0 9px 0 rgba(82,35,94,.15)); }
.fusion-face ellipse { fill:#fff; }
.fusion-face path { fill:none; stroke:#fff; stroke-width:4; stroke-linecap:round; }

.analysis-scene.has-original-motion .ball-pink {
  --wait-x:24px; --wait-y:22px; --approach-x:103px; --approach-y:103px;
  --wait-start-x:-11px; --wait-start-y:-10px; --wait-mid-x:6px; --wait-mid-y:6px;
  --approach-back-x:37px; --approach-back-y:37px; --scan-x:50px; --scan-y:50px;
  --scan-start-x:-25px; --scan-start-y:-25px; --lock-tilt:-4deg; --lock-back-tilt:3deg;
  --shadow-x-one:-13px; --shadow-y-one:-13px; --shadow-x-two:-25px; --shadow-y-two:-25px; --ball-angle:0deg; --face-squeeze:-8px;
}
.analysis-scene.has-original-motion .ball-blue {
  --wait-x:-24px; --wait-y:22px; --approach-x:-103px; --approach-y:103px;
  --wait-start-x:11px; --wait-start-y:-10px; --wait-mid-x:-6px; --wait-mid-y:6px;
  --approach-back-x:-37px; --approach-back-y:37px; --scan-x:-50px; --scan-y:50px;
  --scan-start-x:25px; --scan-start-y:-25px; --lock-tilt:4deg; --lock-back-tilt:-3deg;
  --shadow-x-one:13px; --shadow-y-one:-13px; --shadow-x-two:25px; --shadow-y-two:-25px; --ball-angle:0deg; --face-squeeze:8px;
}
.analysis-scene.has-original-motion .ball-violet {
  --wait-x:24px; --wait-y:-22px; --approach-x:103px; --approach-y:-103px;
  --wait-start-x:-11px; --wait-start-y:10px; --wait-mid-x:6px; --wait-mid-y:-6px;
  --approach-back-x:37px; --approach-back-y:-37px; --scan-x:50px; --scan-y:-50px;
  --scan-start-x:-25px; --scan-start-y:25px; --lock-tilt:4deg; --lock-back-tilt:-3deg;
  --shadow-x-one:-13px; --shadow-y-one:13px; --shadow-x-two:-25px; --shadow-y-two:25px; --ball-angle:0deg; --face-squeeze:-8px;
}
.analysis-scene.has-original-motion .ball-orange {
  --wait-x:-24px; --wait-y:-22px; --approach-x:-103px; --approach-y:-103px;
  --wait-start-x:11px; --wait-start-y:10px; --wait-mid-x:-6px; --wait-mid-y:-6px;
  --approach-back-x:-37px; --approach-back-y:-37px; --scan-x:-50px; --scan-y:-50px;
  --scan-start-x:25px; --scan-start-y:25px; --lock-tilt:-4deg; --lock-back-tilt:3deg;
  --shadow-x-one:13px; --shadow-y-one:13px; --shadow-x-two:25px; --shadow-y-two:25px; --ball-angle:0deg; --face-squeeze:8px;
}
.analysis-scene.has-original-motion[data-scene-state="align"] .analysis-ball {
  animation:original-wait 2.4s cubic-bezier(.42,0,.25,1) var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="noFace"] .analysis-ball {
  animation:original-approach 1.8s cubic-bezier(.32,.02,.2,1) var(--delay) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="locked"] .analysis-ball {
  animation:original-lock 2.1s cubic-bezier(.2,.75,.2,1) var(--delay) 1 both;
}
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-art {
  animation:original-locked-float 2.4s ease-in-out calc(2.1s + var(--delay)) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="scanning"] .analysis-ball {
  animation:original-scan .75s cubic-bezier(.45,0,.2,1) var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="scanning"] .ball-art {
  animation:cloud-cell-pulse 1.1s ease-in-out var(--delay) infinite alternate;
  filter:drop-shadow(var(--shadow-x-one) var(--shadow-y-one) 0 rgba(133,78,142,.20))
         drop-shadow(var(--shadow-x-two) var(--shadow-y-two) 0 rgba(105,155,224,.11));
}
.analysis-scene.has-original-motion:is([data-scene-state="scanning"],[data-scene-state="analysing"]) .ball-shape {
  d:path("M30 18C49 7 72 7 91 22C108 36 112 58 101 77C90 96 68 103 47 96C31 92 18 82 13 67C8 52 12 34 24 23C26 21 28 19 30 18Z");
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] .ball-art {
  animation:cloud-cell-pulse .9s ease-in-out var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] :is(.ball-pink,.ball-violet) {
  animation:original-fuse-left 1.8s cubic-bezier(.55,0,.25,1) var(--delay) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] :is(.ball-blue,.ball-orange) {
  animation:original-fuse-right 1.8s cubic-bezier(.55,0,.25,1) var(--delay) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] .fusion-pair {
  animation:original-fusion-reveal 1.8s cubic-bezier(.55,0,.25,1) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] .fusion-pair-bottom { animation-delay:-.12s; }
.analysis-scene.has-original-motion[data-scene-state="analysing"] .data-card {
  animation:original-card-float 2.35s ease-in-out infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] .data-card-blue { animation-delay:-.55s; }
.analysis-scene.has-original-motion[data-scene-state="analysing"] .data-card-violet { animation-delay:-1.1s; }
.analysis-scene.has-original-motion[data-scene-state="analysing"] .data-card-orange { animation-delay:-1.65s; }

.analysis-scene.has-original-motion[data-scene-state="align"] .ball-eye {
  animation:cloud-blink 3.2s ease-in-out var(--delay) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="noFace"] .ball-face {
  animation:cloud-puzzled 1.8s ease-in-out var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="noFace"] .ball-mouth { d:path("M53 79Q61 70 69 79"); }
.analysis-scene.has-original-motion[data-scene-state="noFace"] .brow-left { transform:rotate(13deg) translateY(-1px); }
.analysis-scene.has-original-motion[data-scene-state="noFace"] .brow-right { transform:rotate(-13deg) translateY(-1px); }
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-mouth {
  d:path("M50 72Q61 89 72 72");
  animation:cloud-happy 1.05s ease-in-out var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-pink .ball-face { transform:rotate(-2deg); }
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-blue .ball-face { transform:translateY(-2px); }
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-violet .ball-face { transform:rotate(2deg); }
.analysis-scene.has-original-motion[data-scene-state="locked"] .ball-orange .ball-face { transform:translateX(2px); }
.analysis-scene.has-original-motion[data-scene-state="scanning"] .ball-face {
  animation:cloud-focus .75s ease-in-out var(--delay) infinite alternate;
}
.analysis-scene.has-original-motion[data-scene-state="scanning"] .ball-mouth { d:path("M53 76Q61 73 69 76"); }
.analysis-scene.has-original-motion[data-scene-state="analysing"] .ball-face {
  animation:cloud-collision-face 1.8s cubic-bezier(.55,0,.25,1) var(--delay) infinite;
}
.analysis-scene.has-original-motion[data-scene-state="analysing"] .ball-mouth { d:path("M53 76Q61 80 69 76"); }

@keyframes original-wait {
  0% { transform:translate(var(--wait-start-x),var(--wait-start-y)) rotate(-4deg) scale(.98,1.025); }
  52% { transform:translate(var(--wait-mid-x),var(--wait-mid-y)) rotate(2deg) scale(1.025,.98); }
  100% { transform:translate(var(--wait-x),var(--wait-y)) rotate(4deg) scale(.97,1.035); }
}
@keyframes original-approach {
  0%,100% { transform:translate(0,0) rotate(-3deg) scale(1); }
  48% { transform:translate(var(--approach-x),var(--approach-y)) rotate(4deg) scale(.82,1.18); }
  61% { transform:translate(var(--approach-x),var(--approach-y)) rotate(-2deg) scale(1.15,.84); }
  78% { transform:translate(var(--approach-back-x),var(--approach-back-y)) scale(.96,1.04); }
}
@keyframes original-lock {
  0% { transform:translateY(0) scale(1); }
  10% { transform:translateY(-105px) rotate(var(--lock-tilt)) scale(.89,1.12); }
  19% { transform:translateY(0) scale(1.17,.80); }
  31% { transform:translateY(-65px) rotate(var(--lock-back-tilt)) scale(.93,1.08); }
  42% { transform:translateY(0) scale(1.12,.84); }
  55% { transform:translateY(-35px) rotate(var(--lock-tilt)) scale(.97,1.04); }
  67% { transform:translateY(0) scale(1.07,.91); }
  78%,100% { transform:translateY(0) scale(1); }
}
@keyframes original-locked-float {
  from { transform:translate(var(--wait-start-x),var(--wait-start-y)) rotate(-3deg); }
  to { transform:translate(var(--wait-x),var(--wait-y)) rotate(3deg); }
}
@keyframes original-scan {
  from { transform:translate(var(--scan-start-x),var(--scan-start-y)) rotate(var(--ball-angle,0deg)) scale(.82,1.3); }
  to { transform:translate(var(--scan-x),var(--scan-y)) rotate(var(--ball-angle,0deg)) scale(1.3,.82); }
}
@keyframes original-fuse-left {
  0%,100% { transform:translateX(-55px) scale(1) rotate(-3deg); opacity:1; }
  36% { transform:translateX(25px) scale(1.13,.87) rotate(2deg); opacity:1; }
  48%,64% { transform:translateX(55px) scale(.78,1.2); opacity:.08; }
  76% { transform:translateX(18px) scale(1.08,.9); opacity:1; }
}
@keyframes original-fuse-right {
  0%,100% { transform:translateX(55px) scale(1) rotate(3deg); opacity:1; }
  36% { transform:translateX(-25px) scale(1.13,.87) rotate(-2deg); opacity:1; }
  48%,64% { transform:translateX(-55px) scale(.78,1.2); opacity:.08; }
  76% { transform:translateX(-18px) scale(1.08,.9); opacity:1; }
}
@keyframes original-fusion-reveal {
  0%,36%,78%,100% { opacity:0; transform:scale(.72,1.12); }
  48% { opacity:1; transform:scale(1.12,.86); }
  58% { opacity:1; transform:scale(.96,1.06); }
  66% { opacity:.92; transform:scale(1.06,.94); }
}
@keyframes original-card-float {
  from { transform:translateY(11px) rotate(-1.4deg); }
  to { transform:translateY(-11px) rotate(1.4deg); }
}
@keyframes cloud-blink {
  0%,42%,46%,100% { transform:scaleY(1); }
  44% { transform:scaleY(.12); }
}
@keyframes cloud-puzzled {
  from { transform:translateX(-2px) rotate(-3deg); }
  to { transform:translateX(3px) rotate(3deg); }
}
@keyframes cloud-happy {
  from { transform:scale(.9,.86) translateY(-1px); }
  to { transform:scale(1.08,1.12) translateY(1px); }
}
@keyframes cloud-focus {
  from { transform:scale(1,.78) translateY(1px); }
  to { transform:scale(.94,.62) translateY(3px); }
}
@keyframes cloud-collision-face {
  0%,32%,78%,100% { transform:translateX(0) scale(1); }
  48%,64% { transform:translateX(var(--face-squeeze,0)) scale(.72,1.08); }
}
@keyframes cloud-cell-pulse {
  from { transform:scale(.96,1.04); }
  to { transform:scale(1.05,.94); }
}

.scene-status {
  position: absolute;
  left: 29.5%;
  bottom: 11.9%;
  z-index: 7;
  width: 45%;
  box-sizing:border-box;
  min-height:90px;
  display:grid;
  place-content:center;
  padding:16px 20px 14px;
  color: #97105c;
  border: 3px solid #c04b88;
  border-radius: 22px;
  background: rgba(255,252,254,.96);
  font: 700 30px/1.02 "Alkatra", cursive;
  text-align: center;
  letter-spacing: .4px;
  box-shadow: 6px 7px 0 rgba(73, 121, 201, .17);
  transition: opacity .35s ease, transform .65s cubic-bezier(.2,.9,.2,1);
}
.analysis-scene[data-scene-state="calculating"] .scene-status { left:20%; bottom:8.5%; width:60%; }
.analysis-scene[data-scene-state="result"] .scene-status { display:none; }

.feature-cards {
  position:absolute;
  inset:0;
  z-index:5;
  opacity:0;
  transition:opacity .5s ease;
}
.analysis-scene[data-scene-state="separating"] .feature-cards { opacity:1; }
.feature-card {
  position:absolute;
  overflow:hidden;
  border:3px solid #bd85a8;
  border-radius:16px;
  background:#fff9fd;
  box-shadow:0 8px 18px rgba(94,29,76,.16);
  transform:translate(var(--from-x), var(--from-y)) scale(.35);
  opacity:0;
  animation:feature-arrive 1.15s cubic-bezier(.2,.9,.2,1) forwards;
  animation-delay:var(--delay);
}
.feature-card strong { position:absolute; left:10px; top:7px; z-index:2; color:#97105c; font:700 15px/1 "Alkatra", cursive; }
.feature-card canvas { position:absolute; left:0; right:0; bottom:0; width:100%; height:calc(100% - 28px); }
.feature-eyes { left:10%; top:9%; width:55%; height:17%; }
.feature-nose { right:5%; top:31%; width:32%; height:20%; }
.feature-lips { left:7%; top:54%; width:37%; height:16%; }
.feature-shape { right:5%; top:62%; width:34%; height:19%; }
.feature-skin { left:12%; top:76%; width:34%; height:15%; }

.comparison-rail {
  position:absolute;
  left:-36%;
  right:auto;
  bottom:8%;
  z-index:6;
  display:none;
  width:max-content;
  height:34%;
  align-items:center;
  gap:20px;
  animation:comparison-sort 5.4s cubic-bezier(.45,0,.2,1) infinite;
  will-change:transform;
}
.analysis-scene[data-scene-state="calculating"] .comparison-rail { display:flex; }
.comparison-card {
  position:relative;
  flex:0 0 185px;
  width:185px;
  height:240px;
  overflow:hidden;
  border:8px solid #fff;
  border-radius:26px;
  background:#fffafd;
  box-shadow:0 12px 0 rgba(151,16,92,.15), 0 18px 28px rgba(93,27,73,.17);
}
.comparison-card:nth-child(odd) { background:#ffb9da; }
.comparison-card img { width:100%; height:100%; object-fit:cover; }
.comparison-card[data-source="visitor"] { border-color:#ff4f9b; scale:1.13; z-index:3; }
.comparison-card[data-source="visitor"]::after { position:absolute; inset:auto 12px 10px; content:"YOU"; padding:6px; color:#97105c; border-radius:10px; background:#fff; font:800 14px/1 Alexandria,sans-serif; text-align:center; }

.scoring-stack { position:absolute; left:20%; top:7%; z-index:5; display:none; width:60%; height:42%; }
.analysis-scene[data-scene-state="calculating"] .scoring-stack { display:block; }
.score-blob { position:absolute; left:15%; width:70%; height:30%; border-radius:48% 57% 44% 58%; filter:drop-shadow(0 9px 0 rgba(97,32,91,.1)); animation:score-breathe 1.8s ease-in-out infinite alternate; }
.score-blob-blue { top:0; background:#75a9ed; }
.score-blob-pink { top:20%; background:#ed4c9a; animation-delay:-.25s; }
.score-blob-orange { top:41%; height:39%; background:#ff775d; animation-delay:-.5s; }
.score-blob-violet { top:72%; background:#9971df; animation-delay:-.75s; }
.scene-score { position:absolute; left:23%; top:54%; z-index:4; width:54%; padding:16px 8px 8px; color:#97105c; border:5px solid #a92a70; border-radius:24px; background:#f5f1f4; font:700 54px/1 "Alkatra",cursive; text-align:center; }

/* Approved result profile layout */
.scene-result{position:absolute;inset:0;z-index:8;display:none;overflow:hidden;box-sizing:border-box;color:#a90068;background:#fff3fa}
.analysis-scene[data-scene-state="result"] .scene-result{display:block}
.scene-result-layout{position:absolute;inset:0;box-sizing:border-box;padding:42px 30px 8px}
.scene-result-topline{position:relative;z-index:3;height:148px}
.scene-meter{position:relative;left:auto;top:auto;width:100%;height:34px;overflow:hidden;border:3px solid #a93476;border-radius:999px;background:#fff}
.scene-meter i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffca78,#f36ba9 53%,#74baff);transition:width .9s cubic-bezier(.2,.9,.2,1)}
.scene-result h2{position:relative;left:auto;top:auto;width:auto;margin:18px 0 0;font:700 48px/1 "Alkatra",cursive;text-align:center}
.scene-result-main{position:relative;z-index:3;height:650px;display:grid;grid-template-columns:minmax(0,54fr) minmax(0,46fr);gap:12px}
.scene-portrait-card{position:relative;margin:0;padding:10px;border:3px solid #bb5b8c;border-radius:26px;background:#fff9fd}
.scene-portrait-dots{position:absolute;inset:-12px 34px auto;height:84px;border-radius:50%;background:radial-gradient(circle,#f4a4cb 0 4px,transparent 5px) 0 0/20px 20px;opacity:.7}
.scene-result-portrait{position:relative;left:auto;top:auto;z-index:2;width:100%;height:100%;object-fit:cover;transform:scaleX(-1);border:0;border-radius:20px}
.scene-portrait-heart,.scene-portrait-spark{position:absolute;z-index:3;font-style:normal;text-shadow:0 2px 0 #fff}
.scene-portrait-heart{left:-8px;top:-14px;font:700 58px/1 Alexandria,sans-serif}.scene-portrait-spark{right:-10px;top:28px;color:#5f90df;font:700 70px/1 Alexandria,sans-serif}
.scene-feature-rows{display:grid;grid-template-rows:repeat(4,minmax(0,1fr));min-height:0;gap:6px}
.scene-feature-card{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:44px minmax(0,1fr);column-gap:8px;row-gap:0;align-items:center;min-width:0;min-height:0;box-sizing:border-box;padding:6px 12px;border:3px solid #d0669d;border-radius:20px;background:#fffafd}
.scene-feature-card>span{display:contents}
.scene-feature-card>i{display:grid;place-items:center;width:40px;height:40px;border:2px solid #c45a91;border-radius:12px;font:700 35px/1 Alexandria,sans-serif;font-style:normal}
.scene-feature-card b{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:space-between;min-width:0;gap:8px;font:800 40px/1 Alexandria,sans-serif}
.scene-feature-card em{flex:0 0 auto;padding:2px 6px 0;border:2px solid #ce6a9f;border-radius:12px;font:800 38px/1 Alexandria,sans-serif;font-style:normal}
.scene-feature-card small{grid-column:1/-1;grid-row:2;align-self:end;display:block;margin-top:5px;font:500 35px/1.06 Alexandria,sans-serif}
.scene-score-divider{position:absolute;left:36px;right:36px;top:914px;border-top:5px dotted #f0a0c8}
.scene-result-score{position:absolute;left:35%;top:864px;z-index:3;width:30%;height:94px;display:grid;place-items:center;box-sizing:border-box;padding:0;border:4px solid #a93476;border-radius:28px;background:#fffafd;font:700 72px/1 "Alkatra",cursive;text-align:center;box-shadow:0 6px 0 rgba(91,117,195,.13)}
.scene-result-details{position:absolute;left:30px;right:30px;top:958px;bottom:92px;z-index:3;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:174px 186px;gap:10px}
.scene-profile-block,.scene-result-meta,.scene-advice-card,.scene-qr-card{min-width:0;box-sizing:border-box;border:3px solid #d0669d;border-radius:20px;background:#fffafd}
.scene-profile-block{position:relative;display:block;padding:8px 10px;overflow:visible}
.scene-profile-block>div{position:relative;z-index:2}
.scene-profile-title{position:relative;left:auto;top:auto;width:auto;display:block;font:800 35px/1.05 Alexandria,sans-serif}
.scene-profile-summary{position:relative;left:auto;top:auto;width:auto;margin:9px 0 0;font:500 35px/1.05 Alexandria,sans-serif}
.scene-animal-art{position:absolute;right:6px;bottom:4px;z-index:1;width:96px;height:125px;overflow:visible;opacity:.42;pointer-events:none}
.scene-result-meta{position:relative;right:auto;top:auto;width:auto;display:grid;align-content:center;gap:12px;padding:14px;font:800 35px/1 Alexandria,sans-serif}
.scene-result-meta span{padding:12px;border:2px solid #edb0cf;border-radius:12px;background:#fff}
.scene-advice-card{padding:12px}.scene-advice-card b{font:700 40px/1 "Alkatra",cursive}.scene-advice-card p{margin:12px 0 0;font:500 35px/1.08 Alexandria,sans-serif}
.scene-qr-card{display:grid;grid-template-columns:116px 1fr;align-items:center;gap:12px;margin:0;padding:10px;border-style:dashed}
.scene-qr-card img{width:112px;height:112px;border:3px solid #a90068;border-radius:12px;background:#fff}.scene-qr-card figcaption{font:800 35px/1 Alexandria,sans-serif;text-align:center}
.scene-qr-card[data-share-state="loading"]{grid-template-columns:1fr;opacity:.72}.scene-qr-card[data-share-state="offline"]{grid-template-columns:1fr}.scene-qr-card[data-share-state="loading"] figcaption{grid-column:1/-1}.scene-qr-card[data-share-state="offline"] figcaption{grid-column:1/-1}.scene-qr-card[data-share-state="offline"] img{display:none}.scene-qr-card[data-share-state="ready"]{border-style:solid;background:#fffafd}
.scene-result-actions{position:absolute;left:30px;right:30px;bottom:8px;z-index:3;height:68px;pointer-events:auto}.scene-retry{position:relative;left:auto;bottom:auto;width:84%;margin:0 auto;box-sizing:border-box;padding:10px 12px 8px;color:inherit;border:4px solid #b34d83;border-radius:18px;background:#fffafd;font:700 42px/1 "Alkatra",cursive;text-align:center;box-shadow:5px 5px 0 rgba(76,116,199,.14);cursor:pointer;pointer-events:auto}.scene-retry:focus-visible{outline:5px solid #4c74c7;outline-offset:5px}
.scene-confetti{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none}

#stage:is([data-state="align"],[data-state="noFace"],[data-state="locked"],[data-state="scanning"],[data-state="analysing"],[data-state="mapping"],[data-state="distorting"],[data-state="separating"],[data-state="rebuilding"],[data-state="calculating"],[data-state="result"]) :is(.mirror,.masthead,.status-area,.paper-grid,.decor,.checker,.blue-ribbon,.tulip) { visibility:hidden; }
#stage:is([data-state="align"],[data-state="noFace"],[data-state="locked"],[data-state="scanning"],[data-state="analysing"],[data-state="mapping"],[data-state="distorting"],[data-state="separating"],[data-state="rebuilding"],[data-state="calculating"],[data-state="result"]) .voice-dock { z-index:95; }

@keyframes arrow-flow { to { stroke-dashoffset:-50; } }
@keyframes ball-breathe { from { transform:translate(-4px,5px) rotate(-2deg) scale(.98,1.02); } to { transform:translate(7px,-8px) rotate(3deg) scale(1.035,.97); } }
@keyframes seek-centre { 0%,100% { transform:translate(0,0) scale(1); } 48% { transform:translate(var(--seek-x),var(--seek-y)) scale(.94,1.06); } 67% { transform:translate(var(--seek-x),var(--seek-y)) scale(1.05,.95); } }
@keyframes lock-celebrate { 0% { transform:translateY(0) scale(1); } 16% { transform:translateY(-30px) scale(.91,1.1) rotate(-4deg); } 28% { transform:translateY(0) scale(1.12,.84); } 43% { transform:translateY(-20px) scale(.95,1.07) rotate(3deg); } 56% { transform:translateY(0) scale(1.08,.9); } 70% { transform:translateY(-11px); } 82%,100% { transform:translateY(0) scale(1); } }
@keyframes target-lock { 0% { opacity:.7; transform:scale(.88); } 28% { opacity:1; transform:scale(1.1); } 62%,100% { opacity:1; transform:scale(1); } }
@keyframes scan-dash { from { transform:translateX(0) scale(.9,1.06); } to { transform:translateX(var(--scan-x)) scale(1.05,.93); } }
@keyframes fuse-left { 0%,100% { transform:translateX(-15px) scale(1); } 42% { transform:translateX(24px) scale(1.13,.88); } 58% { transform:translateX(29px) scale(.92,1.11); } 76% { transform:translateX(5px) scale(1.04,.96); } }
@keyframes fuse-right { 0%,100% { transform:translateX(15px) scale(1); } 42% { transform:translateX(-24px) scale(1.13,.88); } 58% { transform:translateX(-29px) scale(.92,1.11); } 76% { transform:translateX(-5px) scale(1.04,.96); } }
@keyframes data-card-float { to { transform:translateY(-12px) rotate(1.5deg); } }
@keyframes feature-arrive { to { transform:translate(0,0) scale(1); opacity:1; } }
@keyframes comparison-sort { 0%,10% { transform:translateX(0); } 42%,58% { transform:translateX(-205px); } 90%,100% { transform:translateX(-410px); } }
@keyframes score-breathe { to { transform:translateY(-7px) scale(1.025,.97); } }

@media (prefers-reduced-motion:reduce) {
  .analysis-scene,
  .analysis-skin,
  .analysis-viewport,
  .analysis-ball,
  .scene-status { transition-duration:.01ms; }
  .ball-art,
  .analysis-ball,
  .motion-arrow,
  .data-card,
  .fusion-pair,
  .feature-card,
  .comparison-rail,
  .score-blob { animation:none !important; }
  .confetti-piece { animation:none !important; display:none; }
  .scene-result-score { transition:none; }
}

/* 04-14 high-resolution runtime layers. The 4K transparent reference frame is
   always last, so camera pixels can never cover its rounded border or labels. */
.analysis-live,.analysis-portrait,.analysis-distortion,.analysis-effects{position:absolute;inset:0;width:100%;height:100%}
.analysis-live{z-index:1}.analysis-portrait{z-index:2}.analysis-distortion{z-index:3;display:none;pointer-events:none}.analysis-effects{z-index:4}
.analysis-scene[data-scene-state="distorting"] .analysis-distortion{display:block}
.analysis-scene[data-scene-state="distorting"] .analysis-portrait{opacity:1}
.analysis-scene[data-scene-state="separating"] .analysis-portrait{opacity:1;filter:none}
.analysis-foreground-raster{image-rendering:auto;z-index:20}
.analysis-scene.has-original-motion .scene-tag,.analysis-scene.has-original-motion .analysis-foreground,.analysis-scene.has-original-motion .analysis-tulip-overlay{display:none}
.analysis-scene:is([data-scene-state="mapping"],[data-scene-state="distorting"],[data-scene-state="separating"],[data-scene-state="rebuilding"]) .analysis-ball{width:112px;height:100px;animation:late-cloud-roam 1.55s cubic-bezier(.45,0,.2,1) var(--delay) infinite alternate}
.analysis-scene[data-scene-state="mapping"] .analysis-ball{--roam-x:46px;--roam-y:38px}
.analysis-scene[data-scene-state="distorting"] .analysis-ball{--roam-x:-52px;--roam-y:42px;animation-duration:1.08s}
.analysis-scene[data-scene-state="separating"] .analysis-ball{--roam-x:88px;--roam-y:-74px;animation:late-feature-chase 1.25s cubic-bezier(.55,0,.2,1) var(--delay) infinite alternate}
.analysis-scene[data-scene-state="rebuilding"] .analysis-ball{--roam-x:70px;--roam-y:55px;animation:late-cell-fuse 1.45s cubic-bezier(.55,0,.2,1) var(--delay) infinite}
.analysis-scene:is([data-scene-state="distorting"],[data-scene-state="rebuilding"]) .ball-shape{d:path("M27 19C45 5 66 8 75 25C91 17 109 31 104 50C119 63 105 88 86 84C76 104 49 105 41 87C21 99 3 77 16 58C2 43 10 22 27 19Z")}
.analysis-scene[data-scene-state="rebuilding"] .ball-afterimage{opacity:.42;filter:blur(4px);box-shadow:45px 8px 0 -8px currentColor,-24px 44px 0 -17px currentColor}
.analysis-scene[data-scene-state="separating"] .feature-cards,.analysis-scene[data-scene-state="rebuilding"] .feature-cards{opacity:1}
.feature-card{z-index:3;border-width:4px;background:#fff7fb;box-shadow:0 10px 0 rgba(91,42,100,.14),0 18px 28px rgba(94,29,76,.16)}
.feature-card strong{left:13px;top:10px;font-size:18px}.feature-card strong em{margin-left:7px;color:#e64a96;font-style:normal;text-shadow:0 0 8px #fff}
.feature-card canvas{height:calc(100% - 34px)}
.feature-eyes{left:4%;top:7%;width:50%;height:16%}.feature-nose{right:4%;top:28%;width:36%;height:17%}.feature-lips{left:4%;top:48%;width:38%;height:15%}.feature-shape{right:3%;top:61%;width:40%;height:18%}.feature-skin{left:7%;top:79%;width:37%;height:14%}
.analysis-scene[data-scene-state="rebuilding"] .feature-card{animation:feature-return 4.25s cubic-bezier(.5,0,.15,1) forwards;animation-delay:var(--delay)}
.comparison-rail{display:none!important}

.scoring-stack{left:8%;top:4%;width:84%;height:82%;z-index:8}
.score-creature{position:absolute;left:19%;width:62%;overflow:visible;filter:drop-shadow(0 12px 0 rgba(77,40,105,.12));transform-origin:center;animation:score-cell 1.25s cubic-bezier(.5,0,.2,1) infinite alternate}
.score-creature path{stroke:rgba(133,34,100,.18);stroke-width:4}.score-creature g{fill:#fff}.score-creature g path{fill:none;stroke:#fff;stroke-width:7;stroke-linecap:round}
.score-creature-blue{top:2%;fill:#6fa8ed}.score-creature-pink{top:20%;fill:#ed4d9b;animation-delay:-.27s}.score-creature-orange{top:38%;fill:#ff795d;animation-delay:-.54s}.score-creature-violet{top:64%;fill:#9470df;animation-delay:-.81s}
.scene-score{left:31%;top:49%;width:38%;z-index:10;padding:22px 8px 10px;border-width:6px;border-radius:30px;font-size:72px;box-shadow:0 8px 0 rgba(83,119,201,.2)}
.score-person{position:absolute;left:17%;bottom:1%;width:66%;height:12%;border-radius:30px;background:#fff;box-shadow:inset 0 0 0 5px #ec98c0}
.score-person:before,.score-person:after{content:"";position:absolute;top:43%;width:25%;height:8px;background:#b74484}.score-person:before{left:4%}.score-person:after{right:4%}.score-person i{position:absolute;left:44%;top:15%;width:12%;aspect-ratio:1;border:7px solid white;border-radius:50%;background:#d77cb0;box-shadow:0 0 0 32px #d77cb0}.score-person span{position:absolute;left:42%;bottom:8%;width:16%;height:38%;border:7px solid white;border-bottom:0;border-radius:50% 50% 0 0}

.confetti-piece{position:absolute;left:var(--x);top:-5%;width:14px;height:24px;background:var(--colour);border-radius:8px 2px;animation:confetti-fall 1.8s cubic-bezier(.2,.7,.25,1) var(--delay) both}.confetti-1{clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%)}.confetti-2{border-radius:50% 50% 0 50%;transform:rotate(45deg)}.confetti-3{background:repeating-linear-gradient(90deg,#111 0 8px,#fff 8px 16px);border-radius:0}

@keyframes late-cloud-roam{from{transform:translate(0,0) rotate(-5deg) scale(.95,1.05)}to{transform:translate(var(--roam-x),var(--roam-y)) rotate(7deg) scale(1.08,.92)}}
@keyframes late-feature-chase{0%{transform:translate(-30px,30px) rotate(-8deg) scale(.9,1.1)}65%{transform:translate(var(--roam-x),var(--roam-y)) rotate(10deg) scale(1.16,.84)}100%{transform:translate(calc(var(--roam-x)*.65),calc(var(--roam-y)*.55)) rotate(-3deg) scale(.97,1.03)}}
@keyframes late-cell-fuse{0%,100%{transform:translate(-35px,0) scale(.9,1.1)}42%{transform:translate(var(--roam-x),var(--roam-y)) scale(1.3,.72)}58%{transform:translate(var(--roam-x),var(--roam-y)) scale(.76,1.3)}78%{transform:translate(12px,-18px) scale(1.08,.94)}}
@keyframes feature-return{0%,18%{opacity:1;transform:translate(0,0) scale(1)}75%{opacity:.9;transform:translate(calc(var(--from-x)*-.82),calc(var(--from-y)*-.82)) scale(.42)}100%{opacity:0;transform:translate(calc(var(--from-x)*-1),calc(var(--from-y)*-1)) scale(.16)}}
@keyframes score-cell{0%{transform:translate(-15px,8px) scale(.94,1.08) rotate(-2deg)}55%{transform:translate(20px,-6px) scale(1.12,.88) rotate(2deg)}100%{transform:translate(-4px,-12px) scale(.86,1.16) rotate(-1deg)}}
@keyframes confetti-fall{0%{opacity:0;transform:translate(0,-30px) rotate(0) scale(.5)}10%{opacity:1}100%{opacity:0;transform:translate(var(--drift),1320px) rotate(720deg) scale(1)}}

/* Reference 12: visitor feature cut-outs rebuild over a neutral, static field. */
.rebuild-stage{position:absolute;inset:0;z-index:5;display:none;overflow:hidden;background:#dedede}
.analysis-scene[data-scene-state="rebuilding"] .rebuild-stage{display:block}
.analysis-scene[data-scene-state="rebuilding"] .analysis-portrait{opacity:0}
.rebuild-piece{position:absolute;z-index:3;object-fit:contain;filter:drop-shadow(0 5px 0 rgba(123,55,111,.16));transform-origin:center}
.rebuild-face{left:20%;top:8%;z-index:2;width:60%;height:78%;opacity:.9;animation:rebuild-face-in 1.2s cubic-bezier(.2,.85,.2,1) both}
.rebuild-left-eye{left:18%;top:31%;width:36%;height:17%;--piece-x:-340px;--piece-y:-210px;--piece-rotate:-14deg;--piece-delay:.15s}
.rebuild-right-eye{left:47%;top:31%;width:36%;height:17%;--piece-x:350px;--piece-y:-180px;--piece-rotate:13deg;--piece-delay:.28s}
.rebuild-nose{left:37%;top:40%;width:26%;height:27%;--piece-x:300px;--piece-y:40px;--piece-rotate:9deg;--piece-delay:.48s}
.rebuild-mouth{left:31%;top:57%;width:38%;height:17%;--piece-x:-310px;--piece-y:240px;--piece-rotate:-10deg;--piece-delay:.68s}
.rebuild-stage.is-assembling .rebuild-piece:not(.rebuild-face){animation:rebuild-piece-arrive 3.65s cubic-bezier(.18,.78,.18,1) var(--piece-delay) both}
.rebuild-patch{position:absolute;z-index:1;border:3px dotted currentColor;border-radius:48% 52% 43% 57%;opacity:.34;filter:saturate(1.15)}
.patch-pink{left:18%;top:10%;width:42%;height:43%;color:#ed4b98;background:#ed4b98;transform:rotate(-10deg)}
.patch-blue{left:43%;top:17%;width:40%;height:48%;color:#5b9bea;background:#5b9bea;transform:rotate(8deg)}
.patch-orange{left:46%;top:48%;width:39%;height:35%;color:#ff7954;background:#ff7954;transform:rotate(-7deg)}
.patch-violet{left:20%;top:47%;width:37%;height:38%;color:#8d66dd;background:#8d66dd;transform:rotate(9deg)}
.rebuild-axis{position:absolute;left:50%;top:10%;z-index:4;height:76%;border-left:4px dashed #a91968;opacity:.58}
.rebuild-arrow{position:absolute;z-index:4;width:90px;height:120px;border:5px dashed currentColor;border-left:0;border-radius:0 90px 90px 0;opacity:.78}
.rebuild-arrow:after{content:"";position:absolute;right:-11px;bottom:-8px;border:12px solid transparent;border-top-color:currentColor;transform:rotate(-24deg)}
.rebuild-arrow-left{left:12%;top:55%;color:#825ed7;transform:rotate(180deg)}
.rebuild-arrow-right{right:11%;top:51%;color:#ff7652}

/* Reference 13: cloud score above, fixed visitor portrait over a moving dataset rail. */
.analysis-scene[data-scene-state="calculating"] .scoring-stack{left:11%;top:3%;width:78%;height:62%}
.analysis-scene[data-scene-state="calculating"] .score-person{display:none}
.analysis-scene[data-scene-state="calculating"] .comparison-rail{display:block!important;left:0;right:0;bottom:3%;width:100%;height:27%;overflow:hidden;animation:none;z-index:9}
.comparison-track{position:absolute;left:0;top:13%;display:flex;width:max-content;gap:18px;animation:dataset-photo-scroll 12s linear infinite;will-change:transform}
.comparison-track .comparison-card{flex:0 0 148px;width:148px;height:196px;border-width:7px;border-radius:22px;opacity:.78}
.comparison-visitor{position:absolute;left:50%;top:50%;z-index:4;width:185px;height:238px;border-color:#ef4e9b;transform:translate(-50%,-50%);box-shadow:0 0 0 12px rgba(255,255,255,.88),0 15px 0 rgba(151,16,92,.2)}
.comparison-card.comparison-visitor{scale:1}.comparison-card.comparison-visitor::after{display:none}
.comparison-visitor img{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.comparison-visitor b{position:absolute;left:18px;right:18px;bottom:10px;padding:7px;color:#99105c;border-radius:10px;background:#fff;font:800 13px/1 Alexandria,sans-serif;text-align:center}

/* Keep the original 13.png scoring artwork pixel-for-pixel. Only the live
   model score and the moving comparison photographs sit above the source. */
.analysis-scene[data-scene-state="calculating"] .analysis-viewport{background:#dedede;box-shadow:none}
.analysis-scene[data-scene-state="calculating"] .score-creature{display:none}
.analysis-scene[data-scene-state="calculating"] .scoring-stack{inset:0;width:100%;height:100%}
.analysis-scene[data-scene-state="calculating"] .scene-score{left:298px;top:622px;width:180px;height:94px;display:grid;place-items:center;box-sizing:border-box;padding:0;border:0;background:#dedede;font-size:68px;box-shadow:none}
.analysis-scene[data-scene-state="calculating"] .comparison-rail{height:34%;background:#dedede}

@keyframes rebuild-face-in{from{opacity:0;transform:scale(.72) rotate(-3deg)}to{opacity:.9;transform:scale(1) rotate(0)}}
@keyframes rebuild-piece-arrive{0%{opacity:.25;transform:translate(var(--piece-x),var(--piece-y)) rotate(var(--piece-rotate)) scale(.32,.9)}55%{opacity:1;transform:translate(12px,-7px) rotate(2deg) scale(1.16,.86)}75%{transform:translate(-8px,5px) rotate(-1deg) scale(.96,1.05)}100%{opacity:1;transform:translate(0,0) rotate(0) scale(1)}}
@keyframes dataset-photo-scroll{from{transform:translateX(-12%)}to{transform:translateX(-52%)}}

/* Persistent analysis shell: the outer artwork never moves or swaps. */
.analysis-scene:is([data-scene-state="calculating"],[data-scene-state="result"]){--view-left:156px;--view-top:301px;--view-width:782px;--view-height:1419px;--view-radius:70px}
.analysis-scene .scene-tag{display:block!important;left:140px;top:300px;z-index:30;width:390px;min-height:92px;padding:20px 24px 14px;background:#fffafd;font-size:36px}
.analysis-scene[data-scene-state="result"] .scene-tag{top:255px}

/* iPad Pro 11 unified stage: the permanent shell is rendered by #fixedShell.
   This scene owns only the inset camera/result content and live motion. */
.analysis-scene {
  --view-left: 244px;
  --view-top: 460px;
  --view-width: 1195px;
  --view-height: 1746px;
  --view-radius: 72px;
}

.analysis-scene.has-original-motion :is(.analysis-motion,.analysis-balls) {
  left: 0;
  top: 0;
  width: 1668px;
  height: 2388px;
}
.analysis-scene.has-original-motion :is(.analysis-data-cards,.analysis-fusion-pairs) {
  left: 0;
  top: 0;
  width: 1080px;
  height: 1920px;
  transform: matrix(1.5358,0,0,1.2347,1.4,85.4);
  transform-origin: 0 0;
}
.analysis-scene.has-original-motion .analysis-ball {
  width: 190px;
  height: 171px;
}

.analysis-scene .analysis-foreground,
.analysis-scene .analysis-tulip-overlay { display: none; }
.analysis-scene.has-original-motion .scene-tag,
.analysis-scene[data-scene-state="calculating"] .scene-tag,
.analysis-scene[data-scene-state="result"] .scene-tag {
  display: block;
}
.scene-tag {
  left: 260px;
  top: 444px;
  z-index: 100;
  width: 470px;
  min-height: 92px;
  padding: 19px 25px 16px;
  font-size: 40px;
  box-shadow: 5px 6px 0 rgba(75,125,206,.13);
}
.scene-tag[data-scene-state="result"] { top: 444px; }
.scene-status {
  left: 31%;
  bottom: 8.4%;
  z-index: 22;
  width: 38%;
  min-height: 104px;
  padding: 20px 28px 15px;
  border-radius: 28px;
  font-size: 38px;
}
.analysis-scene[data-scene-state="calculating"] .scene-status {
  left: 27%;
  bottom: 8.4%;
  width: 46%;
}
.analysis-scene[data-scene-state="calculating"] .score-creature {
  display: block;
  left: 24%;
  width: 52%;
}
.analysis-scene[data-scene-state="calculating"] .score-creature-blue { top: 1%; }
.analysis-scene[data-scene-state="calculating"] .score-creature-pink { top: 16%; }
.analysis-scene[data-scene-state="calculating"] .score-creature-orange { top: 31%; }
.analysis-scene[data-scene-state="calculating"] .score-creature-violet { top: 46%; }
.analysis-scene[data-scene-state="calculating"] .scene-score {
  left: 430px;
  top: 670px;
  width: 330px;
  height: 140px;
  border: 5px solid #a92a70;
  border-radius: 34px;
  background: #f5f1f4;
  font-size: 96px;
  box-shadow: 0 8px 0 rgba(83,119,201,.16);
}

.analysis-distortion { transform: scale(var(--camera-zoom, 1)); }

.scene-result-layout {
  width: 830px;
  height: 1420px;
  inset: 0 auto auto 0;
  transform: scale(1.439759,1.229577);
  transform-origin: 0 0;
}

#stage[data-state="result"] .voice-dock{display:flex;min-width:430px;height:62px;font-size:25px;background:#db3f91}
