/* Tools and Actions: rows of name-only pills, and one panel with an animated explainer scene and a
   line of text. js/explain.js writes each scene into .xp-stage. Every scene is plain HTML and SVG
   animated with CSS keyframes on one shared loop (--d), so all its parts stay in step. Sizes inside
   a scene are in cqw (percent of the stage width), so a scene scales with the panel.
   Most keyframes hold the finished state to 100 %, so with reduced motion (one instant run) each
   scene shows its result standing still. */

.tools { background: var(--soft); }
.actions { background: var(--soft); }

.xp {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start;
}
.xp-groups { display: grid; gap: clamp(22px, 3vw, 34px); }
.xp-group > h3 {
  font-size: 15px; font-family: var(--font-body); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.xp-group > h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sheen), var(--c); box-shadow: var(--sheen-edge); }
.xp-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.xp-pills button {
  font: 600 18px/1 var(--font-display); color: var(--ink); cursor: pointer; border: 0;
  min-height: 46px; padding: 13px 20px 12px; border-radius: 999px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px rgba(23, 20, 28, .05);
  transition: transform .18s var(--ease-spring), box-shadow .18s, background-color .18s;
}
.xp-pills button:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line), var(--pop-sm); }
.xp-pills button[aria-pressed="true"] {
  background: var(--sheen), var(--c); color: var(--on-c, var(--ink));
  box-shadow: var(--sheen-edge), 0 12px 22px -12px color-mix(in srgb, var(--c) 85%, #000);
}
.xp-actions { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); align-items: center; }
.xp-actions .xp-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.xp-panel {
  position: sticky; top: 96px; background: var(--paper); border-radius: calc(var(--radius) + 6px);
  box-shadow: inset 0 0 0 1px var(--line), var(--pop); padding: 14px; display: grid; gap: 4px;
}
.xp-text { padding: 12px 14px 8px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; }
.xp-title { font-size: clamp(26px, 2.8vw, 34px); margin: 0; white-space: nowrap; }
.xp-body { margin: 0; color: var(--ink-2); font-size: 17px; line-height: 1.45; }
.xp-many {
  grid-column: 1 / -1; justify-self: start; font: 600 14px/1 var(--font-body); color: var(--ink-2);
  background: var(--soft); border-radius: 999px; padding: 7px 12px 6px; margin-top: 4px;
}
@media (max-width: 1060px) { .xp-text { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .xp, .xp-actions { grid-template-columns: minmax(0, 1fr); }
  .xp-panel { position: static; margin-top: 4px; }
  /* phones: the panel is moved under the group that holds the chosen pill (explain.js) */
  .xp-group .xp-panel { margin-top: 16px; }
  .xp-actions .xp-pills { display: flex; }
  .xp-pills button { font-size: 17px; padding: 12px 17px 11px; }
}

/* ---------- the stage ---------- */
.xp-stage {
  --c2: color-mix(in srgb, var(--c, var(--pink)) 16%, #fff);
  position: relative; aspect-ratio: 4 / 3; container-type: size; overflow: hidden; user-select: none;
  border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 40%, #fff 0%, var(--c2) 100%);
}
.xp-stage.paused *, .xp-stage.paused *::before, .xp-stage.paused *::after { animation-play-state: paused !important; }
.sc { --d: 6s; position: absolute; inset: 0; animation: sc-in var(--d) linear infinite; }
@keyframes sc-in { 0% { opacity: 0; } 4%, 100% { opacity: 1; } }
/* every animated part: same loop as its scene */
.sc .a { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  .xp-stage *, .xp-stage *::before, .xp-stage *::after { animation-fill-mode: forwards !important; }
}

/* ---------- parts shared by many scenes ---------- */
.sc .pos { position: absolute; }
.sc svg { display: block; width: 100%; height: 100%; }
.ph { position: absolute; border-radius: 2cqw; overflow: hidden; box-shadow: 0 2.4cqw 5cqw -2.4cqw rgba(23, 20, 28, .45), 0 0 0 .25cqw #fff; background: #fff; }
.ph.mid { left: 20%; top: 14%; width: 60%; aspect-ratio: 3 / 2; }
.chk { position: absolute; inset: 0; background: repeating-conic-gradient(#e6e1da 0 25%, #fff 0 50%) 0 0 / 4cqw 4cqw; }
.sc .chip {
  position: absolute; display: inline-flex; align-items: center; gap: 1cqw; white-space: nowrap; color: var(--ink);
  font: 600 2.6cqw/1 var(--font-display); background: #fff; border-radius: 99px; padding: 1.1cqw 1.8cqw 1cqw 1.2cqw;
  box-shadow: inset 0 0 0 .2cqw var(--line), 0 1.4cqw 3cqw -1.4cqw rgba(23, 20, 28, .4);
}
.sc .chip::before { content: ""; width: 2cqw; height: 2.5cqw; flex: none; border-radius: .5cqw 1cqw .5cqw .5cqw; background: var(--sheen), var(--sky); }
.sc .chip.new { background: var(--sheen), var(--green); }
.sc .chip.new::before { background: var(--sheen), #fff; }
.sc .chip.c { left: 50%; bottom: 6%; transform: translateX(-50%); }
.sc .tag {
  position: absolute; font: 700 2.4cqw/1 var(--font-display); color: var(--ink); background: var(--sheen), var(--gold);
  border-radius: 99px; padding: 1cqw 1.6cqw .9cqw; box-shadow: var(--sheen-edge), 0 1cqw 2cqw -1cqw rgba(0, 0, 0, .5);
}
.sc .cur { position: absolute; width: 4.4cqw; height: 4.4cqw; filter: drop-shadow(0 .5cqw .6cqw rgba(11, 11, 16, .3)); z-index: 5; }
/* a small app window */
.win { position: absolute; background: #fff; border-radius: 2cqw; overflow: hidden; box-shadow: inset 0 0 0 .2cqw var(--line), 0 3cqw 6cqw -3cqw rgba(23, 20, 28, .45); }
.win-bar { display: flex; align-items: center; justify-content: space-between; height: 5.4cqw; padding: 0 2cqw; font: 600 2.2cqw/1 var(--font-body); color: var(--ink-2); background: var(--soft); }
.win-bar i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #d8d1c7; }
.ctl { display: inline-block; font: 600 2.1cqw/1 var(--font-body); color: var(--ink-2); background: var(--soft); border-radius: 99px; padding: .9cqw 1.4cqw .8cqw; white-space: nowrap; }
/* a document page */
.doc { position: absolute; background: #fff; border-radius: 1cqw; box-shadow: inset 0 0 0 .2cqw var(--line), 0 1.6cqw 3.2cqw -1.6cqw rgba(23, 20, 28, .45); overflow: hidden; }
.doc::before { content: ""; position: absolute; left: 14%; right: 14%; top: 16%; height: 46%;
  background: repeating-linear-gradient(#d9d3cb 0 .8cqw, transparent .8cqw 2.2cqw); }
.doc b { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font: 700 2.4cqw/1 var(--font-display); color: var(--ink-2); }
/* a waveform: bars with --h heights */
.wv { position: absolute; display: flex; align-items: center; gap: .6cqw; padding: 0 2cqw; background: var(--night); border-radius: 2cqw; }
.wv i { flex: 1 1 0; height: calc(var(--h) * 100%); min-height: .6cqw; border-radius: .6cqw; background: var(--sheen), var(--green); }
.vid { position: absolute; border-radius: 2cqw; overflow: hidden; background: var(--night); box-shadow: 0 2.4cqw 5cqw -2.4cqw rgba(23, 20, 28, .5); }
.folder { position: absolute; width: 16cqw; height: 12.5cqw; }

/* ---------- Remove BG ---------- */
.x-rbg .bg { position: absolute; inset: 0; animation-name: rbg-cut; }
@keyframes rbg-cut { 0%, 22% { clip-path: inset(0 0 0 0); } 58%, 100% { clip-path: inset(0 0 0 100%); } }
.x-rbg .scan { position: absolute; top: 0; bottom: 0; width: .6cqw; margin-left: -.3cqw; background: #fff; box-shadow: 0 0 2cqw 1cqw rgba(255, 255, 255, .9); animation-name: rbg-scan; }
@keyframes rbg-scan { 0%, 22% { left: 0; opacity: 0; } 25% { opacity: 1; } 55% { opacity: 1; } 58%, 100% { left: 100%; opacity: 0; } }
.x-rbg .who { position: absolute; left: 30%; top: 14%; width: 44%; height: 86%; }
.x-rbg .chip.new { animation-name: pop-62; }

/* shared pops: hidden, then pops in at the given percent and stays */
@keyframes pop-62 { 0%, 60% { opacity: 0; transform: translateX(-50%) scale(.4); } 66%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes pop-in { 0%, 60% { opacity: 0; transform: scale(.4); } 66%, 100% { opacity: 1; transform: scale(1); } }

/* ---------- Upscale ---------- */
.x-up .ph { left: 50%; top: 46%; width: 64%; aspect-ratio: 3 / 2; animation-name: up-grow; }
@keyframes up-grow { 0%, 24% { transform: translate(-50%, -50%) scale(.5); } 56%, 100% { transform: translate(-50%, -50%) scale(1); } }
.x-up .ph svg { animation: inherit; animation-name: up-sharp; }
@keyframes up-sharp { 0%, 30% { filter: blur(.9cqw) saturate(.8); } 58%, 100% { filter: blur(0) saturate(1); } }
.x-up .px { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.25) .15cqw, transparent .15cqw) 0 0 / 3cqw 3cqw, linear-gradient(rgba(255,255,255,.25) .15cqw, transparent .15cqw) 0 0 / 3cqw 3cqw; animation-name: up-px; }
@keyframes up-px { 0%, 30% { opacity: 1; } 54%, 100% { opacity: 0; } }
.x-up .sz { position: absolute; left: 50%; bottom: 6%; width: 30cqw; height: 5cqw; margin-left: -15cqw; }
.x-up .sz .chip { left: 50%; top: 0; transform: translateX(-50%); }
.x-up .s1 { animation-name: fade-out-50; }
.x-up .s2 { animation-name: fade-in-56; }
@keyframes fade-out-50 { 0%, 46% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes fade-in-56 { 0%, 52% { opacity: 0; } 58%, 100% { opacity: 1; } }
.x-up .tag { right: 13%; top: 7%; font-size: 3.6cqw; animation-name: pop-in; }

/* ---------- Erase ---------- */
.x-er .win { left: 12%; top: 7%; width: 76%; height: 84%; }
.x-er .tb { display: flex; gap: 1cqw; padding: 1.6cqw 2cqw 0; }
.x-er .tb .ctl:first-child { background: var(--sheen), var(--c); color: var(--ink); }
.x-er .ph { left: 2cqw; right: 2cqw; top: 13.4cqw; bottom: 2cqw; box-shadow: none; border-radius: 1.4cqw; }
.x-er .ball { animation-name: er-ball; }
@keyframes er-ball { 0%, 54% { opacity: 1; } 62%, 100% { opacity: 0; } }
.x-er .strk { stroke-dasharray: 190; animation-name: er-strk; }
@keyframes er-strk { 0%, 18% { stroke-dashoffset: 190; opacity: .6; } 50% { stroke-dashoffset: 0; opacity: .6; } 54% { stroke-dashoffset: 0; opacity: .6; } 62%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.x-er .brush { animation-name: er-brush; }
@keyframes er-brush {
  0%, 16% { transform: translate(214px, 150px); opacity: 0; } 18% { transform: translate(214px, 150px); opacity: 1; }
  24.4% { transform: translate(250px, 146px); } 30.8% { transform: translate(216px, 160px); } 37.2% { transform: translate(250px, 158px); }
  43.6% { transform: translate(218px, 172px); } 50% { transform: translate(248px, 172px); opacity: 1; } 56%, 100% { transform: translate(248px, 172px); opacity: 0; }
}
.x-er .spark { transform-origin: 232px 160px; transform-box: view-box; animation-name: er-spark; }
@keyframes er-spark { 0%, 58% { opacity: 0; transform: scale(.2); } 64% { opacity: 1; transform: scale(1); } 74%, 100% { opacity: 0; transform: scale(1.3); } }

/* ---------- Edit ---------- */
.x-ed .win { left: 7%; top: 9%; width: 86%; height: 80%; }
.x-ed .body { position: absolute; inset: 5.4cqw 0 0 0; display: grid; grid-template-columns: 1fr 30%; gap: 2.4cqw; padding: 2.4cqw; align-items: center; }
.x-ed .ph { position: relative; width: 100%; aspect-ratio: 3 / 2; box-shadow: none; border-radius: 1.2cqw; }
.x-ed .ph svg { animation: inherit; animation-name: ed-look; }
@keyframes ed-look { 0%, 18% { filter: brightness(.72) saturate(.45) contrast(.9); } 40% { filter: brightness(1.05) saturate(.6) contrast(.95); } 64%, 100% { filter: brightness(1.06) saturate(1.35) contrast(1.06); } }
.x-ed .sl { display: grid; gap: 1cqw; margin-bottom: 2.6cqw; font: 600 2.1cqw/1 var(--font-body); color: var(--ink-2); }
.x-ed .sl i { position: relative; display: block; height: .8cqw; border-radius: 1cqw; background: var(--soft); }
.x-ed .sl i::after { content: ""; position: absolute; top: 50%; left: 0; width: 3cqw; height: 3cqw; margin: -1.5cqw 0 0 -1.5cqw; border-radius: 50%; background: var(--sheen), var(--c); box-shadow: var(--sheen-edge), 0 .6cqw 1.2cqw -.4cqw rgba(0, 0, 0, .4); animation: inherit; }
.x-ed .sl1 i::after { animation-name: ed-k1; } .x-ed .sl2 i::after { animation-name: ed-k2; } .x-ed .sl3 i::after { animation-name: ed-k3; }
.x-ed .sl i { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
@keyframes ed-k1 { 0%, 18% { left: 30%; } 40%, 100% { left: 66%; } }
@keyframes ed-k2 { 0%, 42% { left: 30%; } 64%, 100% { left: 78%; } }
@keyframes ed-k3 { 0%, 50% { left: 50%; } 64%, 100% { left: 62%; } }

/* ---------- Mark up ---------- */
.x-mu .ph { left: 13%; top: 10%; width: 74%; aspect-ratio: 3 / 2; }
.x-mu .arw { stroke-dasharray: 130; animation-name: mu-arw; }
@keyframes mu-arw { 0%, 14% { stroke-dashoffset: 130; } 32%, 100% { stroke-dashoffset: 0; } }
.x-mu .arh { animation-name: mu-arh; }
@keyframes mu-arh { 0%, 31% { opacity: 0; } 33%, 100% { opacity: 1; } }
.x-mu .box { stroke-dasharray: 260; animation-name: mu-box; }
@keyframes mu-box { 0%, 34% { stroke-dashoffset: 260; } 50%, 100% { stroke-dashoffset: 0; } }
.x-mu .txt { transform-origin: 112px 46px; transform-box: view-box; animation-name: mu-txt; }
@keyframes mu-txt { 0%, 50% { opacity: 0; transform: scale(.3); } 56%, 100% { opacity: 1; transform: scale(1); } }
.x-mu .hide { transform-origin: 170px 152px; transform-box: view-box; animation-name: mu-hide; }
@keyframes mu-hide { 0%, 60% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); } }

/* ---------- Compress ---------- */
.x-cp .card { position: absolute; left: 50%; top: 42%; width: 34cqw; height: 40cqw; transform: translate(-50%, -50%); }
.x-cp .doc { inset: 0; animation-name: cp-squish; }
@keyframes cp-squish { 0%, 24% { transform: scale(1); } 34% { transform: scale(1.06, .82); } 44% { transform: scale(.84, .9); } 52%, 100% { transform: scale(.74); } }
.x-cp .doc::before { display: none; }
.x-cp .ico { position: absolute; left: 18%; right: 18%; top: 14%; height: 52%; border-radius: 1.6cqw; background: var(--sheen), var(--c); display: grid; place-items: center; }
.x-cp .ico svg { width: 56%; height: auto; }
.x-cp .doc b { bottom: 12%; font-size: 2.8cqw; }
.x-cp .sizes { position: absolute; left: 50%; top: 79%; transform: translateX(-50%); width: 40cqw; height: 6cqw; text-align: center; font: 700 4.6cqw/1 var(--font-display); }
.x-cp .sizes span { position: absolute; inset: 0; }
.x-cp .s1 { animation-name: fade-out-50; color: var(--ink-3); }
.x-cp .s2 { animation-name: fade-in-56; color: var(--ink); }
.x-cp .tag { right: 18%; top: 12%; animation-name: pop-in; background: var(--sheen), var(--green); }

/* ---------- Metadata ---------- */
.x-md .win { left: 18%; top: 9%; width: 64%; height: 80%; }
.x-md .rows { padding: 2.4cqw 3cqw; display: grid; gap: 1.6cqw; }
.x-md .row { display: flex; justify-content: space-between; gap: 2cqw; font: 500 2.5cqw/1.2 var(--font-body); color: var(--ink-2); padding: 1.2cqw 1.6cqw; border-radius: 1.2cqw; background: var(--soft); position: relative; }
.x-md .row b { color: var(--ink); font-weight: 700; }
.x-md .row::after { content: ""; position: absolute; left: 1.6cqw; right: 1.6cqw; top: 50%; height: .35cqw; background: var(--red); border-radius: 1cqw; transform-origin: left; animation: inherit; }
.x-md .row { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: ease-in-out; }
.x-md .r1 { animation-name: md-r1; } .x-md .r2 { animation-name: md-r2; } .x-md .r3 { animation-name: md-r3; }
.x-md .r1::after { animation-name: md-l1; } .x-md .r2::after { animation-name: md-l2; } .x-md .r3::after { animation-name: md-l3; }
@keyframes md-l1 { 0%, 24% { transform: scaleX(0); } 32%, 100% { transform: scaleX(1); } }
@keyframes md-l2 { 0%, 34% { transform: scaleX(0); } 42%, 100% { transform: scaleX(1); } }
@keyframes md-l3 { 0%, 44% { transform: scaleX(0); } 52%, 100% { transform: scaleX(1); } }
@keyframes md-r1 { 0%, 34% { opacity: 1; } 40%, 100% { opacity: .35; } }
@keyframes md-r2 { 0%, 44% { opacity: 1; } 50%, 100% { opacity: .35; } }
@keyframes md-r3 { 0%, 54% { opacity: 1; } 60%, 100% { opacity: .35; } }
.x-md .tag { left: 50%; bottom: 14%; animation-name: pop-62; background: var(--sheen), var(--green); }

/* ---------- Collage and Make PDF: three photos fly in ---------- */
.x-cl .frame { position: absolute; left: 26%; top: 12%; width: 48%; height: 62%; border-radius: 1.6cqw; background: #fff; box-shadow: inset 0 0 0 .2cqw var(--line), 0 2cqw 4cqw -2cqw rgba(23, 20, 28, .4); animation-name: cl-frame; }
@keyframes cl-frame { 0%, 20% { opacity: 0; transform: scale(.9); } 28%, 100% { opacity: 1; transform: scale(1); } }
.x-cl .t { position: absolute; border-radius: 1.2cqw; overflow: hidden; box-shadow: 0 0 0 .3cqw #fff, 0 1.4cqw 2.4cqw -1.2cqw rgba(23, 20, 28, .5); }
.x-cl .t1 { left: 28%; top: 15%; width: 44%; height: 30%; animation-name: cl-t1; }
.x-cl .t2 { left: 28%; top: 47%; width: 21.5%; height: 24%; animation-name: cl-t2; }
.x-cl .t3 { left: 50.5%; top: 47%; width: 21.5%; height: 24%; animation-name: cl-t3; }
@keyframes cl-t1 { 0%, 10% { transform: translate(-30cqw, -4cqw) rotate(-10deg) scale(.7); } 36%, 100% { transform: none; } }
@keyframes cl-t2 { 0%, 18% { transform: translate(-30cqw, 8cqw) rotate(8deg) scale(.8); } 44%, 100% { transform: none; } }
@keyframes cl-t3 { 0%, 26% { transform: translate(30cqw, 8cqw) rotate(-8deg) scale(.8); } 52%, 100% { transform: none; } }
.x-cl .chip.new { animation-name: pop-62; }
.x-mp .pdf { position: absolute; left: 36%; top: 12%; width: 28%; height: 56%; }
.x-mp .pdf .doc { inset: 0; }
.x-mp .pdf .doc::before { display: none; }
.x-mp .pdf .doc:nth-child(1) { transform: translate(2cqw, -2cqw); }
.x-mp .pdf .doc:nth-child(2) { transform: translate(1cqw, -1cqw); }
.x-mp .pg { position: absolute; left: 12%; right: 12%; top: 10%; height: 56%; border-radius: .8cqw; overflow: hidden; }
.x-mp .p1 { animation-name: mp-1; } .x-mp .p2 { animation-name: mp-2; } .x-mp .p3 { animation-name: mp-3; }
@keyframes mp-1 { 0%, 8% { opacity: 1; transform: translate(-40cqw, 4cqw) rotate(-8deg); } 30%, 100% { opacity: 1; transform: none; } }
@keyframes mp-2 { 0%, 18% { transform: translate(-40cqw, 14cqw) rotate(6deg); } 40%, 100% { transform: none; } }
@keyframes mp-3 { 0%, 28% { transform: translate(40cqw, 8cqw) rotate(-6deg); } 50%, 100% { transform: none; } }
.x-mp .chip.new { animation-name: pop-62; }

/* ---------- Video: a strip of frames ---------- */
.strip { position: absolute; display: flex; gap: .5cqw; height: 9cqw; }
.strip i { flex: 1 1 0; min-width: 0; border-radius: .8cqw; background: linear-gradient(180deg, var(--f1), var(--f2)); position: relative; }

/* ---------- Trim ---------- */
.x-tr .vid { left: 25%; top: 8%; width: 50%; aspect-ratio: 16 / 9; }
.x-tr .strip { left: 8%; right: 8%; top: 57%; justify-content: center; }
.x-tr .strip i { flex: 0 0 6.5cqw; }
.x-tr .strip i { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
.x-tr .strip i.k { animation-name: tr-keep; }
.x-tr .strip i.x { animation-name: tr-cut; }
@keyframes tr-keep { 0%, 16% { box-shadow: none; } 24%, 100% { box-shadow: 0 0 0 .5cqw var(--gold); } }
@keyframes tr-cut { 0%, 34% { flex-basis: 6.5cqw; opacity: 1; margin: 0; } 42% { opacity: .2; flex-basis: 6.5cqw; } 58%, 100% { flex-basis: 0; opacity: 0; margin: 0 -.25cqw; } }
.x-tr .parts { position: absolute; left: 50%; top: 74%; transform: translateX(-50%); display: flex; gap: 1.4cqw; }
.x-tr .parts .ctl { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; }
.x-tr .parts .ctl:nth-child(1) { animation-name: tr-p1; } .x-tr .parts .ctl:nth-child(2) { animation-name: tr-p2; }
@keyframes tr-p1 { 0%, 18% { opacity: 0; } 24%, 100% { opacity: 1; background: color-mix(in srgb, var(--gold) 40%, #fff); } }
@keyframes tr-p2 { 0%, 22% { opacity: 0; } 28%, 100% { opacity: 1; background: color-mix(in srgb, var(--gold) 40%, #fff); } }
.x-tr .chip.new { animation-name: pop-62; background: var(--sheen), var(--purple); color: #fff; }
.x-tr .chip.new::before { background: #fff; }

/* ---------- Edit video ---------- */
.x-ve .vid { left: 50%; top: 40%; width: 64%; aspect-ratio: 16 / 9; transform: translate(-50%, -50%); animation-name: ve-crop; }
@keyframes ve-crop { 0%, 14% { clip-path: inset(0 0 0 0 round 2cqw); } 30%, 100% { clip-path: inset(0 21.9% 0 21.9% round 2cqw); } }
.x-ve .run { position: absolute; left: 0; bottom: 26%; width: 18%; height: 30%; animation: ve-run 3s linear infinite; }
@keyframes ve-run { from { transform: translateX(-100%); } to { transform: translateX(560%); } }
.x-ve .ctls { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); display: flex; gap: 1.4cqw; }
.x-ve .ctls .ctl { animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; }
.x-ve .ctls .ctl:nth-child(1) { animation-name: ve-c1; } .x-ve .ctls .ctl:nth-child(2) { animation-name: ve-c2; } .x-ve .ctls .ctl:nth-child(3) { animation-name: ve-c3; }
@keyframes ve-c1 { 0%, 12% { background: var(--soft); color: var(--ink-2); } 16%, 30% { background: var(--purple); color: #fff; } 34%, 100% { background: var(--soft); color: var(--ink-2); } }
@keyframes ve-c2 { 0%, 34% { background: var(--soft); color: var(--ink-2); } 38%, 52% { background: var(--purple); color: #fff; } 56%, 100% { background: var(--soft); color: var(--ink-2); } }
@keyframes ve-c3 { 0%, 56% { background: var(--soft); color: var(--ink-2); } 60%, 76% { background: var(--purple); color: #fff; } 80%, 100% { background: var(--soft); color: var(--ink-2); } }
.x-ve .sp { right: 29%; top: 6%; animation-name: ve-sp; }
@keyframes ve-sp { 0%, 38% { opacity: 0; transform: scale(.4); } 44%, 100% { opacity: 1; transform: scale(1); } }
.x-ve .mute { position: absolute; left: 29%; top: 6%; width: 7cqw; height: 7cqw; border-radius: 50%; background: #fff; box-shadow: var(--pop-sm); padding: 1.4cqw; animation-name: ve-mu; }
@keyframes ve-mu { 0%, 60% { opacity: 0; transform: scale(.4); } 66%, 100% { opacity: 1; transform: scale(1); } }

/* ---------- Frames ---------- */
.x-fr .vid { left: 22%; top: 6%; width: 56%; aspect-ratio: 16 / 9; }
.x-fr .bar { position: absolute; left: 22%; width: 56%; top: 51%; height: 1cqw; border-radius: 1cqw; background: rgba(23, 20, 28, .12); }
.x-fr .head { position: absolute; top: -1.2cqw; width: 3.4cqw; height: 3.4cqw; margin-left: -1.7cqw; border-radius: 50%; background: var(--sheen), var(--purple); box-shadow: var(--sheen-edge); animation-name: fr-head; animation-timing-function: linear; }
@keyframes fr-head { 0% { left: 0; } 100% { left: 100%; } }
.x-fr .flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation-name: fr-flash; animation-timing-function: linear; }
@keyframes fr-flash { 0%, 19% { opacity: 0; } 20% { opacity: .8; } 24%, 44% { opacity: 0; } 45% { opacity: .8; } 49%, 69% { opacity: 0; } 70% { opacity: .8; } 74%, 100% { opacity: 0; } }
.x-fr .still { position: absolute; top: 60%; width: 22cqw; aspect-ratio: 16 / 9; border-radius: 1.4cqw; overflow: hidden; box-shadow: 0 0 0 .4cqw #fff, 0 1.6cqw 3cqw -1.4cqw rgba(23, 20, 28, .5); }
.x-fr .f1 { left: 14%; animation-name: fr-1; } .x-fr .f2 { left: 39%; animation-name: fr-2; } .x-fr .f3 { left: 64%; animation-name: fr-3; }
@keyframes fr-1 { 0%, 20% { opacity: 0; transform: translateY(-18cqw) scale(.5); } 30%, 100% { opacity: 1; transform: none; } }
@keyframes fr-2 { 0%, 45% { opacity: 0; transform: translateY(-18cqw) scale(.5); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes fr-3 { 0%, 70% { opacity: 0; transform: translateY(-18cqw) scale(.5); } 80%, 100% { opacity: 1; transform: none; } }
.x-fr .still svg { width: 100%; height: 100%; }

/* ---------- Redact ---------- */
.x-rd .vid { left: 10%; top: 8%; width: 80%; aspect-ratio: 16 / 9; }
/* a box over one spot, from a start time to an end time; it does not follow anything */
.x-rd .mover, .x-rd .blur { position: absolute; top: 30%; left: 40%; width: 20%; height: 52%; }
.x-rd .blur { animation-name: rd-blur; animation-timing-function: linear; }
@keyframes rd-blur { 0%, 29% { opacity: 0; } 30%, 80% { opacity: 1; } 81%, 100% { opacity: 0; } }
.x-rd .blur { top: 24%; height: 44%; left: 39%; width: 22%; border-radius: 1.6cqw; backdrop-filter: blur(1.8cqw); -webkit-backdrop-filter: blur(1.8cqw); background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .7); }
.x-rd .rd-bar { position: absolute; left: 10%; width: 80%; top: 78%; height: 2cqw; border-radius: 2cqw; background: rgba(23, 20, 28, .12); }
.x-rd .rd-range { position: absolute; top: 0; bottom: 0; left: 30%; width: 50%; border-radius: 2cqw; background: var(--sheen), var(--purple); transform-origin: left; animation-name: rd-range; animation-timing-function: linear; }
@keyframes rd-range { 0%, 30% { transform: scaleX(0); } 80%, 100% { transform: scaleX(1); } }
.x-rd .rd-head { position: absolute; top: -1cqw; width: 4cqw; height: 4cqw; margin-left: -2cqw; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 .5cqw var(--purple), var(--pop-sm); animation-name: fr-head; animation-timing-function: linear; }

/* ---------- Join ---------- */
.x-jn .strip { top: 30%; height: 11cqw; }
.x-jn .s1 { left: 6%; width: 26%; animation-name: jn-1; }
.x-jn .s2 { left: 37%; width: 26%; animation-name: jn-2; }
.x-jn .s3 { left: 68%; width: 26%; animation-name: jn-3; }
@keyframes jn-1 { 0%, 22% { transform: translate(0, -6cqw) rotate(-4deg); } 50%, 100% { transform: translate(5cqw, 0); } }
@keyframes jn-2 { 0%, 22% { transform: translate(0, 5cqw) rotate(3deg); } 50%, 100% { transform: translate(0, 0); } }
@keyframes jn-3 { 0%, 22% { transform: translate(0, -3cqw) rotate(4deg); } 50%, 100% { transform: translate(-5cqw, 0); } }
.x-jn .chip.new { animation-name: pop-62; background: var(--sheen), var(--purple); color: #fff; }
.x-jn .chip.new::before { background: #fff; }

/* ---------- Audio ---------- */
.x-at .wv, .x-sd .wv, .x-bl .wv { left: 8%; right: 8%; top: 22%; height: 34cqw; }
.x-at .wv { justify-content: center; }
.x-at .wv i { flex: 0 0 1.4cqw; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
.x-at .wv i.q { background: #4a4552; animation-name: at-cut; }
@keyframes at-cut { 0%, 30% { flex-basis: 1.4cqw; opacity: 1; } 40% { opacity: .3; flex-basis: 1.4cqw; } 58%, 100% { flex-basis: 0; opacity: 0; margin: 0 -.3cqw; } }
.x-at .br { position: absolute; top: 18%; height: 40cqw; width: 1cqw; border-radius: 1cqw; background: var(--gold); animation-name: at-br; }
.x-at .b1 { left: 19%; } .x-at .b2 { right: 19%; }
@keyframes at-br { 0%, 12% { opacity: 0; } 18%, 34% { opacity: 1; } 40%, 100% { opacity: 0; } }
.x-at .chip.new, .x-sd .chip.new, .x-bl .chip.new, .x-vz .chip.new { animation-name: pop-62; }

.x-sd .wv i { transform-origin: center; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); animation-name: sd-even; }
@keyframes sd-even { 0%, 24% { transform: scaleY(var(--a)); } 54%, 100% { transform: scaleY(var(--b)); } }
.x-sd .ctls { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); display: flex; gap: 1.4cqw; }
.x-sd .lr { position: absolute; right: 9%; top: 68%; display: flex; gap: .8cqw; }

.x-bl .wv i.m { background: var(--sheen), var(--gold); animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-name: bl-bar; }
@keyframes bl-bar { 0%, 40% { transform: scaleY(1); background-color: var(--gold); } 48%, 100% { transform: scaleY(var(--f)); background-color: var(--pink); } }
.x-bl .word { position: absolute; top: 11%; transform: translateX(-50%); }
.x-bl .word span { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font: 700 3.2cqw/1 var(--font-display); color: var(--ink); background: var(--sheen), var(--gold); border-radius: 99px; padding: 1.1cqw 1.8cqw 1cqw; white-space: nowrap; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; }
.x-bl .w1 { animation-name: fade-out-44; }
.x-bl .w2 { animation-name: bl-beep; background-color: var(--pink) !important; background-image: var(--sheen); }
@keyframes fade-out-44 { 0%, 40% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes bl-beep { 0%, 44% { opacity: 0; transform: translateX(-50%) scale(.4); } 50%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } }
.x-bl .cur { animation-name: bl-cur; }
@keyframes bl-cur { 0%, 10% { left: 30%; top: 70%; opacity: 0; } 14% { opacity: 1; left: 30%; top: 70%; } 26% { left: 46%; top: 44%; } 36% { left: 58%; top: 44%; opacity: 1; } 44%, 100% { left: 58%; top: 44%; opacity: 0; } }
.x-bl .sel { position: absolute; top: 22%; height: 34cqw; border-radius: 1cqw; background: rgba(245, 179, 1, .18); box-shadow: inset 0 0 0 .4cqw var(--gold); animation-name: bl-sel; }
@keyframes bl-sel { 0%, 26% { opacity: 0; } 32%, 100% { opacity: 1; } }

.x-vz .song { left: 8%; top: 44%; animation-name: vz-song; }
@keyframes vz-song { 0%, 14% { transform: none; opacity: 1; } 34% { transform: translate(22cqw, -2cqw) scale(.5); opacity: 0; } 100% { opacity: 0; } }
.x-vz .vid { left: 34%; top: 12%; width: 58%; aspect-ratio: 16 / 9; background: linear-gradient(160deg, #2b2340, #15131a); animation-name: vz-vid; }
@keyframes vz-vid { 0%, 26% { transform: scale(.94); } 36% { transform: scale(1.04); } 42% { transform: none; } 56%, 100% { transform: translateX(-13cqw); } }
.x-vz .bars { position: absolute; left: 10%; right: 10%; top: 18%; bottom: 18%; display: flex; align-items: center; gap: 1.2%; opacity: 0; animation: vz-on var(--d) infinite both; }
@keyframes vz-on { 0%, 32% { opacity: 0; } 38%, 100% { opacity: 1; } }
.x-vz .bars i { flex: 1 1 0; height: 100%; border-radius: 1cqw; background: linear-gradient(180deg, var(--pink), var(--purple)); transform-origin: center; animation: vz-dance .9s ease-in-out infinite alternate; }
@keyframes vz-dance { from { transform: scaleY(.15); } to { transform: scaleY(1); } }

/* ---------- PDF Pages ---------- */
.x-pg .doc { top: 22%; width: 15cqw; height: 20cqw; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
.x-pg .doc b { font-size: 3cqw; color: var(--ink); }
.x-pg .d1 { left: 14cqw; animation-name: pg-1; }
.x-pg .d2 { left: 33cqw; animation-name: pg-2; }
.x-pg .d3 { left: 52cqw; animation-name: pg-3; }
.x-pg .d4 { left: 71cqw; animation-name: pg-4; background: color-mix(in srgb, var(--sky) 22%, #fff); }
@keyframes pg-1 { 0%, 34% { transform: none; } 46%, 74% { transform: translateX(19cqw); } 86%, 100% { transform: translateX(28.5cqw); } }
@keyframes pg-2 { 0%, 12% { transform: none; } 22%, 34% { transform: rotate(90deg); } 46%, 74% { transform: translateX(19cqw) rotate(90deg); } 86%, 100% { transform: translateX(28.5cqw) rotate(90deg); } }
@keyframes pg-3 { 0%, 34% { transform: none; opacity: 1; } 46%, 58% { transform: translateX(19cqw); opacity: 1; } 70%, 100% { transform: translate(19cqw, 18cqw) rotate(18deg) scale(.6); opacity: 0; } }
@keyframes pg-4 { 0%, 32% { transform: none; } 38% { transform: translateY(-7cqw); } 44% { transform: translate(-57cqw, -7cqw); } 48%, 74% { transform: translate(-57cqw, 0); } 86%, 100% { transform: translate(-47.5cqw, 0); } }
.x-pg .bin { position: absolute; left: 68cqw; top: 54cqw; width: 8cqw; height: 9cqw; animation-name: pg-bin; }
@keyframes pg-bin { 0%, 52% { opacity: 0; transform: scale(.5); } 58%, 74% { opacity: 1; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(.8); } }
.x-pg .chip.new { animation-name: pop-62; background: var(--sheen), var(--sky); }

/* ---------- Merge ---------- */
.x-mg .doc { top: 18%; width: 20cqw; height: 27cqw; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(.45, .05, .3, 1); }
.x-mg .a1 { left: 18cqw; background: color-mix(in srgb, var(--pink) 18%, #fff); animation-name: mg-1; }
.x-mg .a2 { left: 62cqw; background: color-mix(in srgb, var(--sky) 22%, #fff); animation-name: mg-2; }
@keyframes mg-1 { 0%, 22% { transform: none; } 48%, 100% { transform: translate(20cqw, -1.5cqw) rotate(-3deg); } }
@keyframes mg-2 { 0%, 22% { transform: none; } 48%, 100% { transform: translate(-22cqw, 1.5cqw) rotate(3deg); } }
.x-mg .plus { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); font: 700 7cqw/1 var(--font-display); color: var(--ink-3); animation-name: mg-plus; }
@keyframes mg-plus { 0%, 20% { opacity: 1; } 30%, 100% { opacity: 0; } }
.x-mg .chip.new { animation-name: pop-62; background: var(--sheen), var(--sky); }

/* ---------- Actions ---------- */
.x-ac .fil { position: absolute; width: 14cqw; height: 18cqw; }
.x-ac .fil .doc { inset: 0; }
.x-ac .name { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1.4cqw; font: 600 2.4cqw/1 var(--font-display); color: var(--ink-2); white-space: nowrap; }
.x-ac .fname { font: 600 2.4cqw/1 var(--font-display); color: var(--ink-2); position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* Open with: a menu of apps, then the app opens */
.x-ow .fil { left: 18%; top: 26%; }
.x-ow .menu { position: absolute; left: 40%; top: 18%; width: 34cqw; padding: 1.4cqw; border-radius: 2cqw; background: #fff; box-shadow: inset 0 0 0 .2cqw var(--line), 0 2.4cqw 5cqw -2.4cqw rgba(23, 20, 28, .45); transform-origin: 0 0; animation-name: ow-menu; }
@keyframes ow-menu { 0%, 14% { opacity: 0; transform: scale(.6); } 22%, 52% { opacity: 1; transform: scale(1); } 58%, 100% { opacity: 0; transform: scale(.9); } }
.x-ow .menu div { display: flex; align-items: center; gap: 1.6cqw; padding: 1.4cqw; border-radius: 1.2cqw; font: 600 2.6cqw/1 var(--font-body); color: var(--ink); animation: inherit; animation-name: none; }
.x-ow .menu div i { width: 3.4cqw; height: 3.4cqw; border-radius: 1cqw; background: var(--sheen), var(--ic); flex: none; }
.x-ow .menu .pick { animation-name: ow-pick; animation-duration: var(--d); animation-iteration-count: infinite; animation-fill-mode: both; }
@keyframes ow-pick { 0%, 32% { background: transparent; } 38%, 100% { background: color-mix(in srgb, var(--gold) 35%, #fff); } }
.x-ow .win { left: 34%; top: 14%; width: 56%; height: 60%; transform-origin: 30% 40%; animation-name: ow-win; }
@keyframes ow-win { 0%, 56% { opacity: 0; transform: scale(.4); } 66%, 100% { opacity: 1; transform: scale(1); } }
.x-ow .win .ph { left: 2cqw; right: 2cqw; top: 7.4cqw; bottom: 2cqw; box-shadow: none; border-radius: 1cqw; }
.x-ow .cur { animation-name: ow-cur; }
@keyframes ow-cur { 0%, 22% { left: 52%; top: 72%; } 34%, 50% { left: 56%; top: 42%; } 56%, 100% { left: 56%; top: 42%; opacity: 0; } }

/* Copy to and Move to: into a folder */
.x-mv .fil { left: 16%; top: 24%; }
.x-mv .folder { left: 66%; top: 26%; animation-name: mv-bump; }
@keyframes mv-bump { 0%, 50% { transform: scale(1); } 55% { transform: scale(1.12, .9); } 62%, 100% { transform: scale(1); } }
.x-mv .fly { animation-name: mv-fly; z-index: 3; }
@keyframes mv-fly { 0%, 18% { transform: none; opacity: 1; } 34% { transform: translate(20cqw, -10cqw) rotate(8deg) scale(.85); opacity: 1; } 50% { transform: translate(52cqw, 3cqw) scale(.4); opacity: 1; } 52%, 100% { transform: translate(52cqw, 3cqw) scale(.4); opacity: 0; } }
.x-mv .gap { left: 16%; top: 24%; width: 14cqw; height: 18cqw; border-radius: 1cqw; border: .4cqw dashed rgba(23, 20, 28, .25); animation-name: mv-gap; }
@keyframes mv-gap { 0%, 20% { opacity: 0; } 30%, 100% { opacity: 1; } }
.x-mv .fname { top: 46%; }
.x-mv .fname.at-folder { left: 74cqw; }
.x-mv .fname.at-file { left: 23cqw; top: 50%; }
.x-mv .tag { left: 66%; top: 12%; animation-name: pop-in; background: var(--sheen), var(--green); }

/* Zip: three files squeeze into one */
.x-zp .fil { top: 22%; }
.x-zp .z1 { left: 14%; animation-name: zp-1; } .x-zp .z2 { left: 43%; animation-name: zp-2; } .x-zp .z3 { left: 72%; animation-name: zp-3; }
@keyframes zp-1 { 0%, 18% { transform: none; opacity: 1; } 44% { transform: translateX(29cqw) scale(.5); opacity: 1; } 48%, 100% { transform: translateX(29cqw) scale(.4); opacity: 0; } }
@keyframes zp-2 { 0%, 18% { transform: none; opacity: 1; } 44% { transform: scale(.5); opacity: 1; } 48%, 100% { transform: scale(.4); opacity: 0; } }
@keyframes zp-3 { 0%, 18% { transform: none; opacity: 1; } 44% { transform: translateX(-29cqw) scale(.5); opacity: 1; } 48%, 100% { transform: translateX(-29cqw) scale(.4); opacity: 0; } }
.x-zp .zip { position: absolute; left: 50%; top: 20%; width: 18cqw; height: 22cqw; margin-left: -9cqw; animation-name: zp-zip; }
@keyframes zp-zip { 0%, 44% { opacity: 0; transform: scale(.3); } 52% { opacity: 1; transform: scale(1.12); } 58%, 100% { opacity: 1; transform: scale(1); } }
.x-zp .chip.new { animation-name: pop-62; background: var(--sheen), var(--gold); }

/* Copy path: the path types out, then Copied */
.x-pa .fil { left: 43%; top: 12%; }
.x-pa .path { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); padding: 1.8cqw 2.4cqw; border-radius: 1.6cqw; background: var(--night); color: #fff; font: 500 2.9cqw/1 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: nowrap; }
.x-pa .path span { display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; animation: pa-type var(--d) steps(31) infinite both; }
@keyframes pa-type { 0%, 16% { width: 0; } 50%, 100% { width: 31ch; } }
.x-pa .tag { left: 50%; top: 74%; margin-left: -6cqw; animation-name: pop-in; background: var(--sheen), var(--green); }

/* Print: into the printer, a page comes out */
.x-pr .fil { left: 12%; top: 22%; animation-name: pr-in; }
@keyframes pr-in { 0%, 16% { transform: none; opacity: 1; } 36% { transform: translate(40cqw, -6cqw) scale(.6); opacity: 1; } 40%, 100% { transform: translate(40cqw, -6cqw) scale(.5); opacity: 0; } }
.x-pr .printer { position: absolute; left: 46cqw; top: 18%; width: 32cqw; height: 30cqw; }
.x-pr .paper { position: absolute; left: 52cqw; top: 38cqw; width: 20cqw; height: 22cqw; border-radius: .6cqw; background: #fff; box-shadow: inset 0 0 0 .2cqw var(--line), 0 1cqw 2cqw -1cqw rgba(0, 0, 0, .3); overflow: hidden; clip-path: inset(0 0 100% 0); animation-name: pr-out; }
@keyframes pr-out { 0%, 42% { clip-path: inset(0 0 100% 0); } 70%, 100% { clip-path: inset(0 0 0 0); } }
.x-pr .paper .ph { left: 10%; right: 10%; top: 10%; height: 50%; box-shadow: none; border-radius: .4cqw; }

/* ---------- Crop: the full drag-into-the-ring demo (explain.js drives it) ---------- */
.cd-stage { position: absolute; inset: 0; overflow: hidden; }
.cd-ring { position: absolute; left: 50%; top: 50%; width: 480px; height: 480px; transform: translate(-50%, -50%) scale(var(--cd-s, .7));
  transition: opacity .3s, transform .4s var(--ease-spring); }
.cd-ring .pm { position: absolute; inset: 0; }
.cd-stage:not(.ring) .cd-ring { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--cd-s, .7) * .8)); }
.cd-win {
  position: absolute; left: 6%; top: 8%; width: 88%; height: 78%; border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -20px rgba(11, 11, 16, .45);
  display: grid; grid-template-rows: auto 1fr; opacity: 0; transform: scale(.85); transition: opacity .3s, transform .4s var(--ease-spring);
}
.cd-stage.win .cd-win { opacity: 1; transform: scale(1); }
.cd-stage.saved .cd-win { opacity: 0; transform: scale(.6) translateY(30%); }
.cd-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font: 600 13px/1 var(--font-body); color: var(--ink-2); background: var(--soft); }
.cd-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d8d1c7; }
.cd-body { display: grid; grid-template-columns: minmax(0, 1fr) 30%; gap: 4%; padding: 4%; min-height: 0; }
.cd-photo { position: relative; align-self: center; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; }
.cd-photo svg { width: 100%; height: 100%; display: block; }
.cd-crop {
  position: absolute; left: var(--cl, 5%); top: var(--ct, 7%); width: var(--cw, 90%); height: var(--ch, 86%);
  box-shadow: 0 0 0 999px rgba(11, 11, 16, .45), inset 0 0 0 2px #fff;
  background: linear-gradient(#fff6 0 0) 33.33% 0 / 1px 100% no-repeat, linear-gradient(#fff6 0 0) 66.66% 0 / 1px 100% no-repeat,
              linear-gradient(#fff6 0 0) 0 33.33% / 100% 1px no-repeat, linear-gradient(#fff6 0 0) 0 66.66% / 100% 1px no-repeat;
  transition: left .7s cubic-bezier(.45, .05, .3, 1), top .7s cubic-bezier(.45, .05, .3, 1), width .7s cubic-bezier(.45, .05, .3, 1), height .7s cubic-bezier(.45, .05, .3, 1);
}
.cd-crop b { position: absolute; width: 10px; height: 10px; background: #fff; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.cd-crop b:nth-child(1) { left: -4px; top: -4px; } .cd-crop b:nth-child(2) { right: -4px; top: -4px; }
.cd-crop b:nth-child(3) { left: -4px; bottom: -4px; } .cd-crop b:nth-child(4) { right: -4px; bottom: -4px; }
.cd-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; }
.cd-lab { font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.cd-select, .cd-size { border-radius: 8px; padding: 7px 9px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: box-shadow .2s, background .2s; }
.cd-select.press { box-shadow: inset 0 0 0 2px var(--pink); background: #fff; }
.cd-save { margin-top: auto; text-align: center; border-radius: 999px; padding: 9px 10px; font: 600 14px/1 var(--font-display); color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%), var(--night); transition: transform .15s; }
.cd-save.press { transform: scale(.92); }
.cd-files { position: absolute; left: 50%; bottom: 8%; display: flex; gap: 10px; transform: translateX(-50%); opacity: 0; transition: opacity .25s; }
.cd-files .hero-chip.new { background: var(--sheen), var(--pink); transform: scale(0); transition: transform .45s var(--ease-spring) .25s; }
.cd-stage.done .cd-files { opacity: 1; }
.cd-stage.done .cd-files .hero-chip.new { transform: scale(1); }
.cd-ghost { z-index: 6; }
@media (max-width: 520px) {
  .cd-side { font-size: 11px; gap: 4px; }
  .cd-select, .cd-size { padding: 5px 6px; }
  .cd-size, .cd-size-lab { display: none; }
  .cd-files .hero-chip { font-size: 12px; }
  .cd-bar { padding: 6px 10px; font-size: 12px; }
}

