/* 롱폼 제작 스튜디오 — docs/LONGFORM_STUDIO_PLAN.md §7.
   css/shortform.css 와 같은 시각 언어(스테이지 칩·배지·그리드)를 쓰되 가로 16:9 다. */

.watch-frame { aspect-ratio: 16 / 9; }
.watch-frame video, .watch-frame img { width: 100%; height: 100%; }

.stage-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.stage-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9999px; border: 1px solid #e5e7eb; background: #fff; font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap; }
.stage-tab:hover { border-color: #0ea5e9; }
.stage-tab.active { background: #f0f9ff; border-color: #0ea5e9; color: #0369a1; font-weight: 600; }
.stage-tab .dot { width: 8px; height: 8px; border-radius: 9999px; background: #d1d5db; }
.stage-tab[data-status="RUNNING"] .dot { background: #3b82f6; animation: pulse 1.2s infinite; }
.stage-tab[data-status="REVIEW"] .dot { background: #f59e0b; }
.stage-tab[data-status="APPROVED"] .dot, .stage-tab[data-status="SKIPPED"] .dot { background: #22c55e; }
.stage-tab[data-status="FAILED"] .dot { background: #ef4444; }
.stage-tab[data-status="PENDING"] .dot { background: #a78bfa; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 9999px; background: #f3f4f6; color: #4b5563; }
.badge.RUNNING { background: #dbeafe; color: #1d4ed8; }
.badge.REVIEW { background: #fef3c7; color: #b45309; }
.badge.APPROVED, .badge.SKIPPED { background: #dcfce7; color: #15803d; }
.badge.FAILED { background: #fee2e2; color: #b91c1c; }
.badge.PENDING { background: #ede9fe; color: #6d28d9; }
.badge.external { background: #e0e7ff; color: #3730a3; }
.badge.stale { background: #fee2e2; color: #b91c1c; }
.badge.local { background: #f1f5f9; color: #475569; }

/* 샷·클립 그리드 — 가로라 카드가 넓다 */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shot-card { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.shot-media { aspect-ratio: 16 / 9; background: #0f172a; position: relative; }
.shot-media img, .shot-media video { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.shot-media .nomedia { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #94a3b8; font-size: 12px; text-align: center; padding: 8px; }
.shot-body { padding: 8px 10px; font-size: 12px; color: #374151; display: flex; flex-direction: column; gap: 3px; }
.shot-body .heading { font-weight: 600; color: #111827; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shot-body .muted { color: #9ca3af; }
.shot-body details summary { cursor: pointer; color: #0369a1; }
.shot-body details p { margin-top: 4px; color: #4b5563; line-height: 1.5; word-break: break-word; }

/* 막 구분 머리 */
.act-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid #e5e7eb; }
.act-head h4 { font-size: 13px; font-weight: 700; color: #0f172a; }
.act-head .sub { font-size: 12px; color: #6b7280; }

/* 렌더 진행 바 */
.seg-bar { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0 12px; }
.seg-cell { width: 26px; height: 26px; border-radius: 5px; background: #e5e7eb; font-size: 10px; color: #6b7280; display: flex; align-items: center; justify-content: center; }
.seg-cell.done { background: #22c55e; color: #fff; }
.seg-cell.run { background: #3b82f6; color: #fff; animation: pulse 1.2s infinite; }

.lf-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0 10px; }
.lf-table th, .lf-table td { border-bottom: 1px solid #f3f4f6; padding: 5px 8px; text-align: left; white-space: nowrap; }
.lf-table th { color: #6b7280; font-weight: 500; }
.lf-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lf-table tr.total td { font-weight: 700; border-top: 2px solid #e5e7eb; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 13px; }
.kv dt { color: #6b7280; }
.kv dd { color: #111827; }

.note { font-size: 12px; color: #6b7280; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6; }
.note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.music-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.music-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 8px; font-size: 12px; background: #fafafa; }
.music-item audio { width: 100%; height: 30px; margin-top: 4px; }

/* 시청 영역 마스터 칩 — css/shortform.css 와 같은 모양. 2026-09-26: 이 파일에 없어 칩이 기본 버튼으로 그려졌다. */
.part-chip { padding: 3px 10px; font-size: 12px; border-radius: 999px; border: 1px solid #e5e7eb; background: #fff; color: #6b7280; cursor: pointer; }
.part-chip.on { background: #fff7ed; border-color: #fdba74; color: #c2410c; font-weight: 600; }
.part-chip .sub { color: #9ca3af; font-weight: 400; margin-left: 4px; }

/* 전체화면 뷰어(fullscreen-viewer.js 규약: .fullscreen-mode 로 표시) — css/shortform.css 와 같은 규칙.
   2026-09-26: 이 파일에 없어 숨겨져야 할 오버레이(× 버튼·빈 <video controls>)가 스튜디오 아래에 그대로 그려졌다. */
.fullscreen-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: #000; align-items: center; justify-content: center; }
.fullscreen-overlay.fullscreen-mode { display: flex; }
.fullscreen-overlay img, .fullscreen-overlay video { max-width: 100vw; max-height: 100vh; display: none; transform: translate(var(--fs-tx, 0), var(--fs-ty, 0)) scale(var(--fs-scale, 1)); }
.fullscreen-overlay.show-img img, .fullscreen-overlay.show-video video { display: block; }
.fullscreen-close { position: absolute; top: 12px; right: 16px; z-index: 2; color: #fff; font-size: 32px; background: transparent; border: 0; cursor: pointer; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 14px; padding: 18px; max-width: 560px; width: 100%; max-height: 86vh; overflow: auto; }
