/* copy-edit-flow.css — layout for the guided copy-edit flow (copy-edit-flow.js).
 * LYRC: one blue accent #3B82F6, no gradients on controls, no clipped labels.
 * Animations touch only transform and opacity.
 */

/* ── which stage shows what ── */
.cf-copy-shell:not([data-stage="setup"]) .cf-copy-hero,
.cf-copy-shell:not([data-stage="setup"]) #cfHow,
.cf-copy-shell:not([data-stage="setup"]) #cfPair,
.cf-copy-shell:not([data-stage="setup"]) #cfGoRow,
.cf-copy-shell:not([data-stage="setup"]) #cfProgress,
.cf-copy-shell:not([data-stage="setup"]) #cfFootageProgress { display: none !important; }
.cf-copy-shell #cfBuildRow, .cf-copy-shell #cfPlan { display: none !important; }
.cf-studio[hidden], .cf-copy-shell [hidden] { display: none !important; }
.cf-copy-shell[data-stage="edit"] .cf-play,
.cf-copy-shell:not([data-stage="edit"]) .cf-ed { display: none !important; }
.cf-copy-shell[data-stage="play"] .cf-play-render,
.cf-copy-shell[data-stage="result"] .cf-play-screen { display: none !important; }

/* ── setup: the pair ── */
.cf-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.cf-pair .cf-drop {
  margin: 0 !important; position: relative; box-sizing: border-box; height: 340px; min-height: 340px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transition: border-color .25s ease;
}
.cf-pair .cf-drop.is-loaded { border-style: solid !important; border-color: rgba(59, 130, 246, .6) !important; }
.cf-pair .cf-drop.is-loaded p { display: none; }
.cf-pair-tag {
  position: absolute; top: 14px; left: 16px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55);
}
.cf-pair .cf-drop.is-loaded .cf-pair-tag { color: #CFE1FF; }
.cf-pair-thumbs { display: flex; gap: 4px; justify-content: center; margin: 10px 0 2px; }
.cf-pair-thumbs:empty { display: none; }
.cf-pair-thumb {
  width: 56px; height: 32px; border-radius: 4px; background: #000 center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, .14);
  animation: cf-pair-in .4s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes cf-pair-in { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
.cf-pair-status { margin-top: 10px; min-height: 36px; line-height: 18px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .78); overflow-wrap: anywhere; padding: 0 12px; }
.cf-pair .cf-drop.is-loaded .cf-pair-status { color: #CFE1FF; }

/* Build edit: sticks under the header, because the reading panels scroll
   themselves into view and used to carry it off screen. */
.cf-go {
  position: sticky; top: 68px; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin: 18px 0 6px; padding: 10px 14px; border-radius: 14px;
  background: rgba(10, 10, 13, .94); border: 1px solid #2A2C36;
}
.cf-go-btn { position: relative; min-width: 220px; height: 48px; font-size: 16px !important; }
.cf-go-btn:disabled { opacity: .45; cursor: not-allowed; }
.cf-go-btn.is-ready::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid #3B82F6;
  animation: cf-go-ring 1.8s ease-out infinite; pointer-events: none;
}
@keyframes cf-go-ring { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
.cf-go-hint { font-size: 13px; color: rgba(255, 255, 255, .66); }

@media (max-width: 720px) {
  .cf-pair { grid-template-columns: 1fr; }
  .cf-pair .cf-drop { height: 270px; min-height: 270px; }
  .cf-go { flex-direction: column; gap: 8px; }
  .cf-go-btn { width: 100%; }
}

/* ── play / result: just the video ── */
.cf-studio { margin-top: 8px; }
.cf-studio, #cfRenderProgress, #cfOutput { scroll-margin-top: 76px; }
.cf-play-head { margin-bottom: 12px; }
.cf-play-title { margin: 0; font-size: 24px; font-weight: 800; }
.cf-play-sub { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, .65); }
.cf-play-screen .cf-tl-pv {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px; background: #000; border: 1px solid #2A2C36; border-radius: 14px;
}
.cf-play-screen .cf-tl-pv-stage,
.cf-play-screen .cf-tl-pv-stage.is-tall {
  height: max(240px, calc(100vh - 290px)); height: max(240px, calc(100dvh - 290px)); width: auto; max-width: 100%; max-height: none;
}
.cf-play-screen .cf-tl-pv-bar { width: 100%; max-width: 960px; justify-content: center; }
.cf-play-screen .cf-tl-pv-note { flex: 0 1 auto; }
.cf-play-screen .cf-tl-pv-actions { display: none; }
.cf-play-screen.is-arriving .cf-tl-pv-stage { opacity: 0; transform: scale(.96); }
.cf-play-screen .cf-tl-pv-stage { transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.cf-play-render > * { margin-top: 12px; }

/* Edit more: bottom-right corner of the screen. */
.cf-editmore {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  height: 52px; padding: 0 22px !important; font-size: 16px !important; border-radius: 26px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(59, 130, 246, .5);
}
.cf-editmore.is-new { animation: cf-em-in .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes cf-em-in { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .cf-editmore { right: 16px; bottom: 16px; height: 46px; font-size: 15px !important; } }

/* ── edit: laid out like the beat-sync editor ── */
.cf-copy-shell[data-stage="edit"] .cf-studio {
  width: calc(100vw - 32px); max-width: 1680px; position: relative; left: 50%; transform: translateX(-50%);
}
.cf-ed-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cf-ed-title { margin: 0; font-size: 20px; font-weight: 800; }
.cf-ed-sub { margin: 2px 0 0; font-size: 12px; color: rgba(255, 255, 255, .62); }
.cf-ed-bar-actions { display: flex; gap: 8px; align-items: center; }
.cf-ed-bar-actions #cfGenBtn { min-width: 128px; height: 42px; }
.cf-ed-grid {
  display: grid; gap: 10px;
  grid-template-columns: minmax(280px, 340px) 1fr;
  grid-template-rows: minmax(300px, calc(100vh - 470px)) auto; grid-template-rows: minmax(300px, calc(100dvh - 470px)) auto;
  grid-template-areas: "side center" "bottom bottom";
}
.cf-ed-side {
  grid-area: side; display: flex; flex-direction: column; min-height: 0;
  background: #0D0E13; border: 1px solid #2A2C36; border-radius: 12px; overflow: hidden;
}
.cf-ed-center {
  grid-area: center; min-height: 0; min-width: 0; display: flex;
  background: #000; border: 1px solid #2A2C36; border-radius: 12px; overflow: hidden;
}
.cf-ed-bottom { grid-area: bottom; min-width: 0; }
.cf-ed-bottom .cf-tl { margin-top: 0; }

.cf-ed-tabs { display: flex; border-bottom: 1px solid #1F2128; }
.cf-ed-tab {
  flex: 1; height: 42px; background: none; border: 0; border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, .6); font: 700 13px/1 inherit; cursor: pointer;
}
.cf-ed-tab:hover { color: #fff; }
.cf-ed-tab.is-on { color: #fff; border-bottom-color: #3B82F6; background: rgba(59, 130, 246, .08); }
.cf-ed-tab:focus-visible { outline: 2px solid #3B82F6; outline-offset: -2px; }
.cf-ed-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cf-ed-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cf-ed-count { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .78); }
#cfEdBin { flex: 1 0 auto; }
#cfEdBin .cf-tl-binwrap { padding: 0; border: 0; }
#cfEdBin .cf-tl-bin { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; overflow: visible; }
#cfEdBin .cf-tl-scene { width: auto; height: auto; aspect-ratio: 16 / 9; }
.cf-tl-scene-name { display: none; }
#cfEdBin .cf-tl-scene-name {
  display: block; position: absolute; left: 3px; top: 3px; max-width: calc(100% - 6px); padding: 1px 4px; border-radius: 4px;
  background: rgba(0, 0, 0, .72); font-size: 9px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#cfEdInsp .cf-tl-insp { border: 1px solid #1F2128; border-radius: 10px; padding: 10px; background: #0B0C10; }
#cfStudioOpts .cf-orient { margin: 0 !important; flex-direction: column; align-items: flex-start; gap: 8px; }
#cfStudioOpts .cf-orient-group { flex-wrap: wrap; }

.cf-ed-center .cf-tl-pv {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; border: 0; background: #000;
}
.cf-ed-center .cf-tl-pv-stage,
.cf-ed-center .cf-tl-pv-stage.is-tall { height: calc(100% - 44px); width: auto; max-width: 100%; max-height: none; }
.cf-ed-center .cf-tl-pv-bar { width: 100%; justify-content: center; }
.cf-ed-center .cf-tl-pv-actions { display: none; }

@media (max-width: 900px) {
  .cf-ed-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; grid-template-areas: "center" "side" "bottom"; }
  .cf-ed-center .cf-tl-pv-stage, .cf-ed-center .cf-tl-pv-stage.is-tall { height: auto; width: 100%; max-height: 50vh; }
  .cf-ed-side { max-height: 360px; }
}

/* ── the build animation ── */
.cf-asm { position: fixed; inset: 0; z-index: 9000; pointer-events: none; overflow: hidden; }
.cf-asm-veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .9); }
.cf-asm-card, .cf-asm-tile { position: absolute; background: #000 center / cover no-repeat; will-change: transform, opacity; }
.cf-asm-card { border-radius: 12px; border: 1px solid rgba(59, 130, 246, .7); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 4px rgba(59, 130, 246, .15); }
.cf-asm-tile { border-radius: 4px; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.cf-asm-label { position: absolute; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .8); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .cf-go-btn.is-ready::after, .cf-pair-thumb, .cf-editmore.is-new { animation: none; }
}

/* ── the suck: a file pulled into its card ── */
.cf-suck-layer { position: fixed; inset: 0; z-index: 8000; pointer-events: none; overflow: hidden; }
.cf-suck-chip {
  position: absolute; border-radius: 8px; background: #111 center / cover no-repeat;
  border: 1px solid rgba(59, 130, 246, .8); box-shadow: 0 12px 34px rgba(0, 0, 0, .6), 0 0 22px rgba(59, 130, 246, .35);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 6px; text-align: center; overflow: hidden; will-change: transform, opacity;
}
.cf-suck-name {
  position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .72); font-size: 10px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-suck-ring { position: absolute; border-radius: 50%; border: 2px solid rgba(59, 130, 246, .7); box-shadow: 0 0 24px rgba(59, 130, 246, .35) inset; will-change: transform, opacity; }
.cf-suck-speck { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #CFE1FF; box-shadow: 0 0 8px #3B82F6; will-change: transform, opacity; }
.cf-suck-wave { position: absolute; border-radius: 50%; border: 3px solid #3B82F6; will-change: transform, opacity; }
.cf-suck-core { position: absolute; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(207, 225, 255, .95), rgba(59, 130, 246, .5) 45%, rgba(59, 130, 246, 0) 70%); will-change: transform, opacity; }
/* Until its thumbnail decodes, a chip still looks like a clip, not a hole. */
.cf-suck-chip { background-color: #10203D; }
.cf-suck-chip::before {
  content: "▶"; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  font-size: 20px; color: rgba(207, 225, 255, .9);
}
.cf-suck-chip[style*="background-image"]::before { content: none; }
.cf-suck-chip::after {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 6px, transparent 6px 12px);
  opacity: .5;
}
/* the grab beam: card -> chip, stretched and rotated live by the script */
.cf-suck-beam {
  position: absolute; width: 1px; height: 4px; margin-top: -2px; transform-origin: 0 50%;
  background: #8DB8FF; box-shadow: 0 0 10px 2px rgba(59, 130, 246, .8), 0 0 24px 6px rgba(59, 130, 246, .35);
  border-radius: 2px; will-change: transform, opacity;
}

/* Lite mode chip */
.cf-lite {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid #2A2C36; background: #0D0E13;
  font-size: 13px; color: rgba(255, 255, 255, .72);
}
.cf-lite.is-on { border-color: rgba(59, 130, 246, .55); background: rgba(59, 130, 246, .08); color: #CFE1FF; }
.cf-lite-text { flex: 1 1 240px; min-width: 0; }
.cf-lite-btn {
  background: none; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 8px;
  padding: 5px 10px; font: 600 12px/1 inherit; cursor: pointer; white-space: nowrap;
}
.cf-lite-btn:hover { border-color: #3B82F6; }
.cf-lite-btn:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }
.cf-copy-shell:not([data-stage="setup"]) .cf-lite { display: none; }

/* ── phones: everything on the first screen, CapCut order in the editor ── */
@media (max-width: 720px) {
  .cf-copy-shell[data-stage="setup"] .cf-copy-hero h1 { font-size: 24px; }
  .cf-copy-shell[data-stage="setup"] .cf-copy-hero p { font-size: 13px; }
  .cf-copy-shell #cfHow { display: none !important; }          /* the cards say it; space is precious */
  .cf-pair { gap: 10px; }
  .cf-pair .cf-drop { height: 196px !important; min-height: 196px !important; padding: 34px 14px 12px !important; }
  .cf-pair .cf-drop .cf-drop-icon { display: none; }
  .cf-pair .cf-drop h2 { font-size: 16px !important; margin: 0 0 4px !important; }
  .cf-pair .cf-drop p { font-size: 12px !important; margin: 0 0 8px !important; }
  .cf-pair .cf-drop .sb-bt-btn { height: 40px; }
  .cf-pair-thumbs { margin: 6px 0 0; }
  .cf-pair-thumb { width: 44px; height: 25px; }
  .cf-pair-status { margin-top: 6px; min-height: 18px; font-size: 12px; }
  .cf-lite { font-size: 12px; padding: 6px 10px; }
  .cf-go { margin: 12px 0 4px; top: 60px; }

  /* Editor: preview, then the timeline right under it, then clips and style. */
  .cf-ed-grid { grid-template-areas: "center" "bottom" "side" !important; }
  .cf-ed-sub { display: none; }
  .cf-ed-title { font-size: 18px; }
  .cf-ed-bar { margin-bottom: 8px; }
  .cf-ed-side { max-height: none !important; }
  .cf-copy-shell[data-stage="edit"] .cf-studio { width: calc(100vw - 20px); }
}

/* ── generating: clips swirling around the core (copy-edit-swirl.js) ── */
.cf-copy-shell.is-generating #cfRenderProgress { display: none !important; }
.cf-swirl { display: flex; flex-direction: column; align-items: center; padding: 8px 0 20px; }
.cf-swirl-stage { position: relative; width: min(92vw, 560px); aspect-ratio: 1 / 1; }
.cf-swirl-ring { position: absolute; inset: 0; border-radius: 50%; animation: cf-sw-spin 34s linear infinite; }
.cf-swirl-ring.r2 { inset: 15%; animation-duration: 24s; animation-direction: reverse; }
.cf-swirl-ring.r3 { inset: 29%; animation-duration: 17s; }
.cf-swirl-ring::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed rgba(59, 130, 246, .22); }
.cf-swirl-slot { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateX(calc(min(92vw, 560px) * .42)); }
.cf-swirl-ring.r2 .cf-swirl-slot { transform: rotate(var(--a)) translateX(calc(min(92vw, 560px) * .29)); }
.cf-swirl-ring.r3 .cf-swirl-slot { transform: rotate(var(--a)) translateX(calc(min(92vw, 560px) * .17)); }
.cf-swirl-tile {
  position: absolute; width: 74px; height: 42px; left: -37px; top: -21px; border-radius: 7px;
  background: #000 center / cover no-repeat; border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
  animation: cf-sw-counter 34s linear infinite;
}
.cf-swirl-ring.r2 .cf-swirl-tile { width: 62px; height: 35px; left: -31px; top: -17px; animation-duration: 24s; animation-direction: reverse; }
.cf-swirl-ring.r3 .cf-swirl-tile { width: 50px; height: 28px; left: -25px; top: -14px; animation-duration: 17s; }
/* Tiles stay upright while their ring turns. */
@keyframes cf-sw-spin { to { transform: rotate(360deg); } }
@keyframes cf-sw-counter { from { transform: rotate(calc(-1 * var(--a))); } to { transform: rotate(calc(-1 * var(--a) - 360deg)); } }
.cf-swirl-core {
  position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%);
  border-radius: 50%; overflow: hidden; background: #05070c; box-shadow: 0 0 0 1px rgba(59, 130, 246, .35), 0 0 60px rgba(59, 130, 246, .28);
}
.cf-swirl-core-img, .cf-swirl-core-live { position: absolute; inset: 0; width: 100%; height: 100%; background: center / cover no-repeat; opacity: .55; }
.cf-swirl-core-live { opacity: .8; }
.cf-swirl-progress { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cf-swirl-progress .trk { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.cf-swirl-progress .bar { fill: none; stroke: #3B82F6; stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.cf-swirl-core-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); background: radial-gradient(circle, rgba(0, 0, 0, .45), rgba(0, 0, 0, .15) 70%); }
.cf-swirl-pct { font: 800 clamp(22px, 6vw, 34px)/1 'JetBrains Mono', ui-monospace, monospace; color: #fff; font-variant-numeric: tabular-nums; }
.cf-swirl-lbl { margin-top: 4px; font-size: 11px; font-weight: 600; color: #CFE1FF; max-width: 86%; text-align: center; }
.cf-swirl-ghost { position: fixed; z-index: 70; border-radius: 7px; background: #000 center / cover no-repeat; border: 1px solid rgba(255, 255, 255, .3); pointer-events: none; will-change: transform, opacity; }
@media (max-width: 720px) {
  .cf-swirl-tile { width: 54px; height: 31px; left: -27px; top: -15px; }
  .cf-swirl-ring.r2 .cf-swirl-tile { width: 46px; height: 26px; left: -23px; top: -13px; }
  .cf-swirl-ring.r3 .cf-swirl-tile { width: 38px; height: 21px; left: -19px; top: -11px; }
}
/* The ring keeps spinning under prefers-reduced-motion (owner 2026-10-29): phones on battery saver report it,
   and a frozen ring reads as a stuck page. */

/* ── upload screen: illustrated cards, live mosaic, link node (phone task 162) ── */
.cf-pair { grid-template-columns: 1fr auto 1fr !important; align-items: stretch; }
.cf-pair .cf-drop {
  border-radius: 20px !important; background: #0D0E13 !important; border: 1px solid #2A2C36 !important;
  justify-content: flex-start !important; padding: 44px 18px 16px !important;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.cf-pair .cf-drop:hover { border-color: rgba(59, 130, 246, .45) !important; }
.cf-pair .cf-drop.is-drag { border-color: #3B82F6 !important; box-shadow: 0 0 0 4px rgba(59, 130, 246, .18), 0 18px 40px rgba(0, 0, 0, .45); transform: translateY(-2px); }
.cf-pair .cf-drop.is-loaded { border-color: rgba(59, 130, 246, .65) !important; box-shadow: 0 0 0 1px rgba(59, 130, 246, .25) inset; }
.cf-pair .cf-drop .cf-drop-icon, .cf-pair .cf-pair-thumbs { display: none !important; }

.cf-pair-art { position: relative; width: 100%; height: 118px; margin: 0 0 12px; border-radius: 14px; overflow: hidden; background: #080A10; flex: 0 0 auto; }
.cf-art-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .4s ease; }
.cf-pair-art.has-mosaic .cf-art-empty { opacity: 0; }
/* the edit: three film frames fanned, the front one playing, a beat pulsing under it */
.cf-pair-art--ref .f { position: absolute; width: 96px; height: 56px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .16); background: #121624; }
.cf-pair-art--ref .f1 { transform: translate(-46px, -6px) rotate(-10deg); opacity: .6; }
.cf-pair-art--ref .f2 { transform: translate(46px, -6px) rotate(10deg); opacity: .6; }
.cf-pair-art--ref .f3 { transform: translateY(-10px); background: #17203a; border-color: rgba(59, 130, 246, .55); display: grid; place-items: center; animation: cf-art-bob 2.6s ease-in-out infinite; }
.cf-pair-art--ref .f3 i { width: 0; height: 0; border-left: 14px solid #8DB8FF; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.cf-pair-art--ref .beat { position: absolute; bottom: 14px; display: flex; gap: 5px; align-items: flex-end; height: 18px; }
.cf-pair-art--ref .beat b { width: 4px; height: 18px; border-radius: 2px; background: #3B82F6; animation: cf-art-beat 1s ease-in-out infinite; transform-origin: bottom; }
.cf-pair-art--ref .beat b:nth-child(2) { animation-delay: .15s; }
.cf-pair-art--ref .beat b:nth-child(3) { animation-delay: .3s; }
.cf-pair-art--ref .beat b:nth-child(4) { animation-delay: .45s; }
.cf-pair-art--ref .beat b:nth-child(5) { animation-delay: .6s; }
/* your clips: three phone-shaped clips fanned, a plus on top */
.cf-pair-art--foot .p { position: absolute; width: 40px; height: 72px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: #121624; }
.cf-pair-art--foot .p1 { transform: translateX(-48px) rotate(-12deg); }
.cf-pair-art--foot .p2 { transform: translateY(-4px); background: #17203a; border-color: rgba(59, 130, 246, .55); animation: cf-art-bob 2.6s ease-in-out infinite .4s; }
.cf-pair-art--foot .p3 { transform: translateX(48px) rotate(12deg); }
.cf-pair-art--foot .plus { position: absolute; right: calc(50% - 64px); top: 18px; width: 26px; height: 26px; border-radius: 50%; background: #3B82F6; color: #fff; font-weight: 800; font-size: 18px; line-height: 26px; text-align: center; box-shadow: 0 6px 16px rgba(59, 130, 246, .45); }
@keyframes cf-art-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes cf-art-beat { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
/* once read: the shots / clips found, drifting in two rows */
.cf-art-mosaic { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; animation: cf-pair-in .5s ease both; }
.cf-art-row { display: flex; gap: 6px; width: max-content; animation: cf-art-drift 26s linear infinite; }
.cf-art-row.rev { animation-direction: reverse; animation-duration: 32s; }
.cf-art-row span { flex: 0 0 auto; width: 92px; height: 52px; border-radius: 7px; background: #000 center / cover no-repeat; border: 1px solid rgba(255, 255, 255, .12); }
@keyframes cf-art-drift { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

/* the link between the cards */
.cf-pair-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 74px; }
.cf-link-line { position: absolute; left: -8px; right: -8px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); animation: cf-link-flow 1.2s linear infinite; }
.cf-link-node { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #0D0E13; border: 1px solid #2A2C36; color: rgba(255, 255, 255, .6); transition: all .3s ease; }
.cf-link-text { position: relative; font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .5); text-align: center; line-height: 1.25; background: #000; padding: 2px 4px; border-radius: 6px; }
.cf-pair-link.is-ready .cf-link-node { background: #3B82F6; border-color: #3B82F6; color: #fff; animation: cf-link-pulse 1.8s ease-out infinite; }
.cf-pair-link.is-ready .cf-link-line { background: repeating-linear-gradient(90deg, #3B82F6 0 6px, transparent 6px 12px); }
.cf-pair-link.is-ready .cf-link-text { color: #CFE1FF; }
@keyframes cf-link-flow { to { background-position: 12px 0; } }
@keyframes cf-link-pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .55); } 100% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); } }

@media (max-width: 720px) {
  .cf-pair { grid-template-columns: 1fr !important; }
  .cf-pair .cf-drop { height: auto !important; min-height: 0 !important; padding: 36px 14px 12px !important; }
  .cf-pair-art { height: 64px; margin-bottom: 8px; }
  .cf-pair-art--ref .f, .cf-pair-art--foot .p { scale: .62; }
  .cf-pair-art--ref .beat, .cf-pair-art--foot .plus { display: none; }
  .cf-art-row span { width: 54px; height: 30px; }
  .cf-pair-link { width: auto; height: 30px; flex-direction: row; }
  .cf-link-line { left: 50%; right: auto; top: -6px; bottom: -6px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); }
  .cf-pair-link.is-ready .cf-link-line { background: repeating-linear-gradient(180deg, #3B82F6 0 6px, transparent 6px 12px); }
  .cf-link-node { width: 30px; height: 30px; transform: rotate(90deg); }
  .cf-link-text { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-art-row, .cf-link-line, .cf-pair-art--ref .f3, .cf-pair-art--foot .p2, .cf-pair-art--ref .beat b, .cf-pair-link.is-ready .cf-link-node { animation: none; }
}

/* The cards sit inside the comet tilt wrapper (home-comet-card.js): let it stretch so both cards match. */
.cf-pair > .cf-comet-wrap { display: flex; min-width: 0; }
.cf-pair > .cf-comet-wrap > .cf-comet-inner { flex: 1; display: flex; min-width: 0; }
.cf-pair .cf-drop { flex: 1; height: auto !important; min-height: 360px !important; }
@media (max-width: 720px) { .cf-pair .cf-drop { min-height: 0 !important; } }
@media (max-width: 720px) { .cf-pair .cf-drop p { display: none !important; } .cf-pair .cf-drop h2 { margin-bottom: 8px !important; } }

/* ── the finished video (copy-edit-result.js, phone task 164) ── */
.cf-output.cf-res { padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; display: flex; flex-direction: column; gap: 16px; }
.cf-res-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: center; }
.cf-res-stage { position: relative; display: flex; justify-content: center; align-items: center; min-width: 0; padding: 18px; }
.cf-res-glow { position: absolute; inset: 4% 8%; width: 84%; height: 92%; filter: blur(52px) saturate(1.5); opacity: .55; border-radius: 40px; pointer-events: none; }
.cf-res-frame { position: relative; z-index: 1; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 80px rgba(0, 0, 0, .65); background: #000; max-width: 100%; }
.cf-res-frame video { display: block; width: auto !important; max-width: 100%; max-height: 70vh !important; border-radius: 0 !important; }
.cf-res-side { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: #0D0E13; border: 1px solid #2A2C36; }
.cf-res-badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: rgba(52, 211, 153, .12); color: #7EE2B8; font-size: 12px; font-weight: 700; }
.cf-res-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.cf-res-stat { padding: 10px 12px; border-radius: 12px; background: #0B0C10; border: 1px solid #1F2128; }
.cf-res-stat dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.cf-res-stat dd { margin: 4px 0 0; font: 700 16px/1.2 'JetBrains Mono', ui-monospace, monospace; color: #fff; font-variant-numeric: tabular-nums; }
.cf-res-actions { display: flex; flex-direction: column; gap: 8px; }
.cf-res-actions .sb-bt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; width: 100%; }
.cf-res-download { height: 52px !important; font-size: 16px !important; }
.cf-res-tip { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .6); line-height: 1.45; }
.cf-res-tip b { color: #CFE1FF; }
.cf-res-stripwrap { position: relative; padding: 0 2px; }
.cf-res-strip { display: flex; gap: 2px; height: 46px; border-radius: 10px; overflow: hidden; background: #0B0C10; }
.cf-res-shot { flex: 1 1 0; min-width: 4px; padding: 0; border: 0; background: #111 center / cover no-repeat; cursor: pointer; opacity: .8; transition: opacity .15s ease; }
.cf-res-shot:hover { opacity: 1; }
.cf-res-shot:focus-visible { outline: 2px solid #3B82F6; outline-offset: -2px; opacity: 1; }
.cf-res-head { position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px rgba(59, 130, 246, .9); border-radius: 2px; pointer-events: none; }
@media (max-width: 900px) {
  .cf-res-top { grid-template-columns: 1fr; gap: 12px; }
  .cf-res-stage { padding: 6px 0; }
  .cf-res-frame video { max-height: 58vh !important; }
  .cf-res-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cf-res-stat { padding: 8px; }
  .cf-res-stat dd { font-size: 13px; }
  .cf-res-strip { height: 38px; }
}
/* Room for the corner Edit more button under the filmstrip. */
.cf-copy-shell[data-stage="result"] .cf-studio, .cf-copy-shell[data-stage="play"] .cf-studio { padding-bottom: 88px; }
