/* 대본 구성(#/script)·쇼츠 만들기(#/clips) 화면. style.css 의 :root 값만 쓰고 새 색은 없다(모서리 6/8/10/999).
   카드 왼쪽 색 띠 없이 바탕색·제목·위계로 나눈다. 360px 폭에서도 가로로 넘치지 않게 칸마다 min-width:0. */
.sc-out { display: flex; flex-direction: column; gap: 16px; min-width: 0; word-break: keep-all; }
.sc-form select { min-width: 132px; height: 36px; border-radius: var(--r-md); }
.sc-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }

/* 구성안 */
.sc-outline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc-step { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.sc-step:first-child { border-top: 0; padding-top: 2px; }
.sc-step:last-child { padding-bottom: 0; }
.sc-time { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.sc-time b { color: var(--text); }
.sc-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-name { font-weight: 600; color: var(--text); font-size: 14px; }
.sc-ex { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-raised); border: 1px solid var(--border); min-width: 0; }
.sc-ex-h { font-size: 12px; color: var(--text-4); }
.sc-ex a { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 8px; margin: 0 -8px; border-radius: var(--r-sm); min-width: 0; }
.sc-ex a:hover { background: var(--bg-hover); }
.sc-ex-t { color: var(--text-2); overflow-wrap: anywhere; }
.sc-ex a:hover .sc-ex-t { color: var(--text); }
.sc-ex-v { font-size: 12px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* 챕터 흐름: 앞·가운데·끝 */
.sc-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sc-part { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sc-part h3 { margin: 0; font-size: 13px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.sc-part .sc-ex { margin-top: 0; }
.sc-part .chip .muted { margin-left: 2px; }

/* 근거 영상 */
.sc-vids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
.sc-vids .vid, .sc-video .vid { min-width: 0; }
.sc-vids .vid > div, .sc-video .vid > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-video .vid { margin: -6px; }
.sc-video .vid img { width: 120px; height: 68px; }

/* 쇼츠 만들기: 많이 다시 본 장면 그래프 */
.sc-heat { position: relative; padding-top: 24px; }
.sc-heat svg { width: 100%; height: 120px; display: block; }
.sc-heat rect { fill: var(--text-4); opacity: .45; }
.sc-heat rect.hd { opacity: .2; }
.sc-heat rect.on { fill: var(--accent); opacity: 1; }
.sc-heat rect.band { fill: var(--accent-soft); opacity: 1; }
.sc-marks { position: absolute; left: 0; right: 0; top: 0; height: 20px; }
.sc-marks span { position: absolute; top: 0; height: 20px; min-width: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-accent); border-bottom: 1px solid var(--accent); }

/* 고른 구간 */
.sc-segs, .sc-chs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sc-seg { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); min-width: 0; }
.sc-seg:first-child { border-top: 0; padding-top: 0; }
.sc-seg:last-child { padding-bottom: 0; }
.sc-seg-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.sc-seg-h b { font-size: 14px; color: var(--text); }
.sc-num { width: 22px; height: 22px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--text-accent); flex: none; }
.sc-cut { gap: 8px; }
.sc-ch { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); min-width: 0; }
.sc-ch:first-child { border-top: 0; }
.sc-ch-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: var(--r-sm); }
.sc-ch-t:hover { background: var(--bg-hover); color: var(--text); }
.sc-ch-t b { font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; min-width: 92px; }
.sc-ch-t span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 1180px) { .sc-vids { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) { .sc-parts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .sc-form select { flex: 1 1 120px; min-width: 0; }
  .sc-form .btn { flex: 1 1 120px; }
  .sc-step { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sc-time { flex-direction: row; align-items: baseline; gap: 8px; }
  .sc-ex a, .sc-ch-t { min-height: 44px; }
  .sc-video .vid img { width: 96px; height: 54px; }
  .sc-seg .row .btn { flex: 1 1 auto; }
  .sc-cut .btn { width: 100%; }
  .sc-ch-t { flex-direction: column; align-items: flex-start; gap: 0; justify-content: center; }
  .sc-heat svg { height: 96px; }
}
@media (max-width: 640px) { .sc-out details.how summary { min-height: 44px; display: inline-flex; align-items: center; } }
