/* copy-edit-setup.css - the first working screen of Copy an Edit (2026-11-04).
   Goes with copy-edit-setup.js, which adds body.ce-v2. Loaded last, so it
   wins over flow/lyrc/capcut/polish/spacious without fighting them anywhere
   else: every rule is scoped to #cfSetup (setup stage only).
   House rules: one blue (#3B82F6), no gradients on controls, 12px type floor,
   44px taps, tones not outlines. */

body.ce-v2 .cf-copy-shell:not([data-stage="setup"]) #cfSetup { display: none !important; }
body.ce-v2 .cf-copy-shell[data-stage="setup"] #cfHow { display: none !important; }

body.ce-v2 #cfSetup {
  --cfs-blue: #3B82F6;
  --cfs-ink: var(--cf-text, #fff);
  --cfs-ink2: var(--cf-text-2, rgba(255, 255, 255, .72));
  --cfs-ink3: var(--cf-text-3, rgba(255, 255, 255, .55));
  --cfs-l1: var(--cf-surface, #141418);
  --cfs-l2: var(--cf-raised, #1E1E24);
  --cfs-frame-h: clamp(220px, 30svh, 300px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
  margin: 0; width: 100%;
}
html[data-theme="light"] body.ce-v2 #cfSetup { --cfs-l1: #FFFFFF; --cfs-l2: #EEF1F6; }

/* Phones: one column, title first, then the player, then the steps. */
body.ce-v2 #cfSetup .cfs-side { display: contents; }
body.ce-v2 #cfSetup .cf-copy-hero { order: 0; margin: 0 !important; padding: 0 !important; }
body.ce-v2 #cfSetup .cfs-stage { order: 1; }
body.ce-v2 #cfSetup .cf-lite:not(.is-quiet) { order: 2; }
body.ce-v2 #cfSetup #cfPair { order: 3; }
body.ce-v2 #cfSetup #cfGoRow { order: 4; }
body.ce-v2 #cfSetup .cf-lite.is-quiet { order: 5; }

/* ── title ─────────────────────────────────────────────────────────── */
body.ce-v2 #cfSetup .cf-copy-hero h1 {
  margin: 0 !important; color: var(--cfs-ink) !important; background: none !important;
  -webkit-text-fill-color: currentColor;
  font-size: 32px !important; line-height: 1.04 !important; font-weight: 800 !important;
  letter-spacing: -.04em !important; text-wrap: balance; max-width: 13ch;
}
body.ce-v2 #cfSetup .cf-copy-hero p { display: none !important; }

/* ── the player ────────────────────────────────────────────────────── */
body.ce-v2 #cfSetup .cfs-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
body.ce-v2 #cfSetup .cfs-frame {
  position: relative; height: var(--cfs-frame-h); aspect-ratio: 9 / 16; max-width: 100%;
  border-radius: 22px; overflow: hidden; background: #000; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .45);
  transition: box-shadow .2s ease, transform .2s ease;
}
html[data-theme="light"] body.ce-v2 #cfSetup .cfs-frame { box-shadow: 0 0 0 1px rgba(12, 14, 22, .08), 0 20px 48px rgba(16, 24, 40, .18); }
body.ce-v2 #cfSetup .cfs-frame.is-drag { box-shadow: 0 0 0 3px var(--cfs-blue), 0 24px 60px rgba(0, 0, 0, .45); transform: scale(1.01); }
body.ce-v2 #cfSetup .cfs-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
body.ce-v2 #cfSetup .cfs-flip {
  position: absolute; inset: 0; background: #000 center / cover no-repeat; opacity: 0;
  transition: opacity .35s ease; pointer-events: none;
}
body.ce-v2 #cfSetup .cfs-flip.is-on { opacity: 1; }
body.ce-v2 #cfSetup .cfs-label {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  padding: 5px 10px; border-radius: 8px; background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .01em;
}
body.ce-v2 #cfSetup .cfs-view {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2;
  display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.ce-v2 #cfSetup .cfs-view[hidden] { display: none; }
body.ce-v2 #cfSetup .cfs-view button {
  min-height: 44px; min-width: 76px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: rgba(255, 255, 255, .8); font: 700 13px/1 var(--cf-font, Inter, sans-serif); cursor: pointer;
}
body.ce-v2 #cfSetup .cfs-view button.is-on { background: var(--cfs-blue); color: #fff; }
body.ce-v2 #cfSetup .cfs-view button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ── the slot strip: the edit's cuts, filled with your clips ───────── */
body.ce-v2 #cfSetup .cfs-strip {
  display: flex; gap: 6px; justify-content: center; width: 100%; max-width: 420px;
}
body.ce-v2 #cfSetup .cfs-slot {
  position: relative; flex: 1 1 0; min-width: 0; max-width: 40px; aspect-ratio: 9 / 16;
  border-radius: 8px; overflow: hidden; background: var(--cfs-l2);
  outline: 1.5px dashed color-mix(in srgb, var(--cfs-ink) 22%, transparent); outline-offset: -1.5px;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), outline-color .2s;
}
body.ce-v2 #cfSetup .cfs-slot i {
  position: absolute; inset: 0; background: center / cover no-repeat;
}
body.ce-v2 #cfSetup .cfs-slot .a { opacity: 0; transform: scale(.7); transition: opacity .35s ease, transform .45s cubic-bezier(.16, 1, .3, 1); }
body.ce-v2 #cfSetup .cfs-slot.is-in .a { opacity: 1; transform: none; }
body.ce-v2 #cfSetup .cfs-slot.is-in { outline-color: transparent; }
body.ce-v2 #cfSetup .cfs-slot .b { opacity: 0; transform: perspective(200px) rotateY(90deg); }
body.ce-v2 #cfSetup .cfs-slot.is-mine .b {
  opacity: 1; transform: none;
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.2) var(--d, 0ms), opacity .2s ease var(--d, 0ms);
}
body.ce-v2 #cfSetup .cfs-slot.is-wait { outline-color: transparent; }
body.ce-v2 #cfSetup .cfs-slot.is-wait::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .14) 50%, transparent 80%);
  background-size: 220% 100%; animation: cfs-shim 1.2s linear infinite;
}
@keyframes cfs-shim { from { background-position: 120% 0; } to { background-position: -120% 0; } }
body.ce-v2 #cfSetup .cfs-slot.is-now { transform: translateY(-4px); outline: 2px solid var(--cfs-blue); outline-offset: 0; }
body.ce-v2 #cfSetup .cfs-cap { margin: 0; font-size: 14px; font-weight: 600; color: var(--cfs-ink2); text-align: center; min-height: 18px; }

/* ── the steps ─────────────────────────────────────────────────────── */
body.ce-v2 #cfSetup #cfPair {
  display: flex !important; flex-direction: column; gap: 10px !important; margin: 0 !important;
  grid-template-columns: none !important; align-items: stretch !important; height: auto !important; min-height: 0 !important; max-height: none !important;
}
body.ce-v2 #cfSetup .cf-pair-link,
body.ce-v2 #cfSetup .cf-drop .cf-drop-icon,
body.ce-v2 #cfSetup .cf-drop h2,
body.ce-v2 #cfSetup .cf-pair-thumbs { display: none !important; }

body.ce-v2 #cfSetup #cfPair .cf-drop {
  height: auto !important; min-height: 0 !important; margin: 0 !important;
  padding: 14px 14px 14px 12px !important; border-radius: 16px !important;
  background: var(--cfs-l1) !important; background-image: none !important;
  border: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  display: grid !important; text-align: left !important; gap: 2px 12px !important;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas: "num text act" "art art art" "yt yt yt";
  align-items: center !important; justify-items: stretch !important; align-content: center !important;
  flex: 0 0 auto !important; max-height: none !important; width: 100% !important; box-sizing: border-box;
  transition: background-color .2s ease;
}
html[data-theme="light"] body.ce-v2 #cfSetup #cfPair .cf-drop { box-shadow: 0 1px 2px rgba(16, 24, 40, .06) !important; }
body.ce-v2 #cfSetup #cfPair .cf-drop.is-drag { box-shadow: 0 0 0 2px var(--cfs-blue) inset !important; transform: none; }
body.ce-v2 #cfSetup .cfs-num {
  grid-area: num; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cfs-l2); color: var(--cfs-ink2); font-size: 15px; font-weight: 800; align-self: center;
}
body.ce-v2 #cfSetup .cfs-open > .cfs-num { background: var(--cfs-blue); color: #fff; }
body.ce-v2 #cfSetup .cfs-done:not(.cfs-open) > .cfs-num { font-size: 0; background: color-mix(in srgb, var(--cfs-blue) 18%, transparent); color: var(--cfs-blue); }
body.ce-v2 #cfSetup .cfs-done:not(.cfs-open) > .cfs-num::after { content: "\2713"; font-size: 16px; font-weight: 800; }
body.ce-v2 #cfSetup .cfs-text { grid-area: text; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.ce-v2 #cfSetup #cfPair .cf-pair-tag { position: static !important; margin: 0 !important; padding: 0 !important;
  font: 700 16px/1.25 var(--cf-font, Inter, sans-serif) !important; letter-spacing: -.01em !important;
  text-transform: none !important; color: var(--cfs-ink) !important;
}
body.ce-v2 #cfSetup #cfPair .cf-pair-status {
  margin: 0 !important; padding: 0 !important; min-height: 0 !important;
  font-size: 13px !important; line-height: 1.35 !important; font-weight: 600 !important; color: var(--cfs-ink3) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.ce-v2 #cfSetup #cfPair .cf-pair-status:empty { display: none; }
body.ce-v2 #cfSetup #cfPair .cf-drop p { display: block !important; margin: 0 !important; font-size: 13px !important; color: var(--cfs-ink3) !important; text-align: left !important; }
body.ce-v2 #cfSetup #cfPair .cf-drop:not(.cfs-open) p { display: none !important; }
/* The card itself is a transparent file input (tap anywhere to pick); the
   button and the link line sit above it so they get their own taps. */
body.ce-v2 #cfSetup #cfPair .cf-drop-actions, body.ce-v2 #cfSetup .cfs-yt-toggle { position: relative; z-index: 2; }
body.ce-v2 #cfSetup #cfPair .cf-drop-actions { grid-area: act; margin: 0 !important; display: flex !important; justify-content: flex-end; }
body.ce-v2 #cfSetup #cfPair .cf-drop-actions .sb-bt-btn {
  min-height: 44px !important; height: 44px !important; padding: 0 16px !important; border-radius: 12px !important;
  background: var(--cfs-l2) !important; background-image: none !important; color: var(--cfs-ink) !important;
  border: 0 !important; box-shadow: none !important; font-size: 14px !important; font-weight: 700 !important; white-space: nowrap;
}
/* The mosaic of what was found becomes a thin moving strip on a finished step. */
body.ce-v2 #cfSetup #cfPair .cf-pair-art {
  grid-area: art; display: none !important; height: 40px !important; margin: 8px 0 0 !important; border-radius: 10px !important;
}
@media (min-width: 900px) {
  body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-done:not(.cfs-open) .cf-pair-art.has-mosaic { display: block !important; }
}
body.ce-v2 #cfSetup .cfs-label[hidden] { display: none; }
body.ce-v2 #cfSetup #cfPair .cf-pair-art .cf-art-row span { height: 18px !important; }

/* The open step: big title, big blue button. */
body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-open {
  grid-template-areas: "num text" "act act" "yt yt" "art art";
  grid-template-columns: 36px minmax(0, 1fr); padding: 18px 16px 16px !important; gap: 2px 12px !important;
}
body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-open .cf-pair-tag { font-size: 20px !important; font-weight: 800 !important; letter-spacing: -.02em !important; }
body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-open .cf-drop-actions { margin-top: 14px !important; }
body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-open .cf-drop-actions .sb-bt-btn {
  width: 100%; height: 56px !important; min-height: 56px !important; font-size: 17px !important; font-weight: 800 !important;
  background: var(--cfs-blue) !important; color: #fff !important;
}
body.ce-v2 #cfSetup #cfPair .cf-drop.cfs-open .cf-drop-actions .sb-bt-btn:hover { background: #2F74E8 !important; }

/* Link import: one quiet line until asked for. */
body.ce-v2 #cfSetup .cfs-yt-toggle {
  grid-area: yt; justify-self: start; min-height: 44px; padding: 0 2px; margin-top: 4px; border: 0; background: none;
  color: var(--cfs-blue); font: 600 13px/1 var(--cf-font, Inter, sans-serif); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
body.ce-v2 #cfSetup .cf-drop:not(.cfs-open) .cfs-yt-toggle,
body.ce-v2 #cfSetup .cfs-yt-open .cfs-yt-toggle { display: none; }
body.ce-v2 #cfSetup #cfYtCopy, body.ce-v2 #cfSetup #cfYtFootage { grid-area: yt; display: none; text-align: left; }
body.ce-v2 #cfSetup .cfs-yt-open.cfs-open #cfYtCopy, body.ce-v2 #cfSetup .cfs-yt-open.cfs-open #cfYtFootage { display: block; margin-top: 10px; }

/* Step 3: Generate. Quiet row until everything is read. */
body.ce-v2 #cfSetup #cfGoRow {
  position: static !important; top: auto !important; margin: 0 !important; z-index: auto !important;
  display: grid !important; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "num btn" "num hint";
  gap: 2px 12px !important; align-items: center !important; justify-items: stretch !important; text-align: left;
  padding: 14px 14px 14px 12px !important; border-radius: 16px !important; background: var(--cfs-l1) !important;
  box-shadow: none !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html[data-theme="light"] body.ce-v2 #cfSetup #cfGoRow { box-shadow: 0 1px 2px rgba(16, 24, 40, .06) !important; }
body.ce-v2 #cfSetup #cfGoRow .cf-go-btn {
  grid-area: btn; justify-self: start; width: auto !important; min-width: 0 !important; height: 44px !important;
  padding: 0 !important; background: none !important; background-image: none !important; border: 0 !important; box-shadow: none !important;
  color: var(--cfs-ink) !important; font-size: 16px !important; font-weight: 700 !important; opacity: 1 !important;
}
body.ce-v2 #cfSetup #cfGoRow .cf-go-btn:disabled { color: var(--cfs-ink3) !important; cursor: default; }
body.ce-v2 #cfSetup #cfGoRow .cf-go-hint { grid-area: hint; font-size: 13px !important; color: var(--cfs-ink3) !important; text-align: left !important; }
body.ce-v2 #cfSetup #cfGoRow.cfs-ready { grid-template-areas: "num hint" "btn btn"; padding: 16px !important; }
body.ce-v2 #cfSetup #cfGoRow.cfs-ready > .cfs-num { background: var(--cfs-blue); color: #fff; }
body.ce-v2 #cfSetup #cfGoRow.cfs-ready .cf-go-hint { color: var(--cfs-ink) !important; font-size: 15px !important; font-weight: 700; }
body.ce-v2 #cfSetup #cfGoRow.cfs-ready .cf-go-btn {
  width: 100% !important; justify-self: stretch; height: 60px !important; margin-top: 12px; border-radius: 12px !important;
  background: var(--cfs-blue) !important; color: #fff !important; font-size: 18px !important; font-weight: 800 !important;
}

body.ce-v2 #cfSetup .cf-lite.is-quiet { margin: 0 !important; }
body.ce-v2 #cfSetup .cf-lite-btn { min-height: 44px; display: inline-flex; align-items: center; }

/* ── desktop: the player on the left, the steps on the right ───────── */
@media (min-width: 900px) {
  body.ce-v2 .cf-copy-shell[data-stage="setup"] .cf-copy-main { width: min(1200px, 100%) !important; padding-top: 28px !important; }
  body.ce-v2 #cfSetup {
    --cfs-frame-h: clamp(380px, calc(100vh - 330px), 600px);
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
    min-height: calc(100vh - 140px);
  }
  body.ce-v2 #cfSetup .cfs-stage { order: 2; }
  body.ce-v2 #cfSetup .cfs-side { order: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 500px; }
  body.ce-v2 #cfSetup .cf-copy-hero { margin-bottom: 14px !important; }
  body.ce-v2 #cfSetup .cf-copy-hero h1 { font-size: clamp(44px, 4.4vw, 64px) !important; line-height: 1 !important; max-width: 11ch; }
  body.ce-v2 #cfSetup .cfs-stage {
    padding: 28px 24px 22px; border-radius: 28px; background: var(--cfs-l1); gap: 16px;
  }
  body.ce-v2 #cfSetup .cfs-strip { max-width: 470px; gap: 8px; }
  body.ce-v2 #cfSetup .cfs-slot { max-width: 56px; }
}
@media (min-width: 900px) and (max-height: 800px) {
  body.ce-v2 #cfSetup .cf-copy-hero h1 { font-size: clamp(40px, 4vw, 52px) !important; }
  body.ce-v2 #cfSetup .cfs-stage { padding: 20px 20px 16px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body.ce-v2 #cfSetup .cfs-slot.is-wait::after { animation: none; }
}
/* The footage card's hint is the page's long one; the status line says enough. */
body.ce-v2 #cfSetup #cfFootageDrop .cfs-text p { display: none !important; }
