/* copy-edit-reading-phone.css — the "reading your edit" screen on phones (owner, 2026-10-29: "I just want you to
 * show the preview that I gave you" — his reference is the desktop reading screen, horizontal: the viewfinder on
 * the left, the big cut count and the checklist on the right, the shot strip along the bottom).
 *
 * Phones used to get that panel stacked tall (~500px) below the Generate button, i.e. off screen. Here, while the
 * reference is being read in setup, it floats near the top of the screen as one dark card in the same horizontal
 * layout, scaled to the phone's width so the whole thing fits. It goes away with the panel when reading ends.
 * Loaded last on copy-edit.html; touches the reference panel (#cfProgress) only.
 */
@media (max-width: 760px) {
  .cf-copy-shell[data-stage="setup"] #cfProgress.cfm-has-stage:not([hidden]) {
    position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 60px); z-index: 90;
    margin: 0 !important; padding: 12px 12px 10px !important; border-radius: 16px;
    background: #0B0D12 !important; color: #fff; border: 1px solid rgba(255, 255, 255, .08) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55); max-height: calc(100dvh - 150px); overflow: hidden;
    animation: cfrp-in .36s cubic-bezier(.16, 1, .3, 1) both;
  }
  @keyframes cfrp-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

  #cfProgress .cfm-ref .cfm-head { min-height: 18px; gap: 8px; }
  #cfProgress .cfm-ref .cfm-title { font-size: 13px; }
  #cfProgress .cfm-ref .cfm-meta { font-size: 12px; }

  /* the reference's horizontal layout: viewfinder | count + checklist */
  #cfProgress .cfm-ref .cfm-grid { grid-template-columns: minmax(0, 1fr) 30%; gap: 10px; margin-top: 10px; align-items: center; }
  #cfProgress .cfm-ref .cfm-hero { aspect-ratio: 16 / 9; max-height: none; border-radius: 8px; }
  #cfProgress .cfm-ref .cfm-side { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 0; }
  #cfProgress .cfm-ref .cfm-big-n { font-size: 30px; }
  #cfProgress .cfm-ref .cfm-big-u { font-size: 13px; }
  #cfProgress .cfm-ref .cfm-big-l { margin-top: 2px; font-size: 10px; line-height: 1.2; }
  #cfProgress .cfm-ref .cfm-steps--col { flex-direction: column; flex-wrap: nowrap; gap: 3px; margin-top: 6px; width: auto; }
  #cfProgress .cfm-ref .cfm-step { font-size: 9.5px; padding: 2px 7px 2px 6px; line-height: 1.35; }
  #cfProgress .cfm-ref .cfm-step::before { width: 5px; height: 5px; }

  /* viewfinder details scaled to the smaller frame */
  #cfProgress .cfm-ref .cfm-hud { font-size: 8.5px; padding: 3px 5px; gap: 4px; }
  #cfProgress .cfm-ref .cfm-hud.tl { top: 7px; left: 20px; }
  #cfProgress .cfm-ref .cfm-hud.br { bottom: 7px; right: 20px; }
  #cfProgress .cfm-ref .cfm-br { width: 12px; height: 12px; }
  #cfProgress .cfm-ref .cfm-br.tl { top: 5px; left: 5px; }
  #cfProgress .cfm-ref .cfm-br.tr { top: 5px; right: 5px; }
  #cfProgress .cfm-ref .cfm-br.bl { bottom: 5px; left: 5px; }
  #cfProgress .cfm-ref .cfm-br.br { bottom: 5px; right: 5px; }

  /* the card is dark in both themes; the light theme's text colours must not reach inside it */
  #cfProgress .cfm-ref .cfm-title, #cfProgress .cfm-ref .cfm-big-n, #cfProgress .cfm-ref .cfm-meta b { color: #fff !important; }
  #cfProgress .cfm-ref .cfm-meta, #cfProgress .cfm-ref .cfm-big-u, #cfProgress .cfm-ref .cfm-big-l,
  #cfProgress.cfm-has-stage > .cf-progress-msg { color: rgba(255, 255, 255, .70) !important; }
  #cfProgress .cfm-ref .cfm-step { color: rgba(255, 255, 255, .50) !important; border-color: rgba(255, 255, 255, .10) !important;
    background: transparent !important; }
  #cfProgress .cfm-ref .cfm-step.is-done { color: rgba(255, 255, 255, .72) !important; border-color: #2A2C36 !important; }
  #cfProgress .cfm-ref .cfm-step.is-active { color: #fff !important; background: rgba(59, 130, 246, .16) !important;
    border-color: rgba(59, 130, 246, .45) !important; }

  /* the shot strip along the bottom, full width */
  #cfProgress .cfm-ref .cfm-strip { height: 40px; margin-top: 10px; }
  #cfProgress.cfm-has-stage > .cf-progress-msg { font-size: 11px; margin-top: 6px; }
}
