:root { font-family: "Malgun Gothic", Arial, sans-serif; color: #17191b; background: #f2f3f4; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 0 28px; color: #fff; background: #17191b; }
.brand { color: inherit; font-weight: 800; text-decoration: none; }
.save-state { display: flex; align-items: center; gap: 8px; color: #d6d8da; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8d9399; }
.dot.ok { background: #35a66f; }
.dot.busy { background: #e2b52e; }
.dot.error { background: #c84b41; }
main { width: min(1240px, 100%); margin: 0 auto; padding: 28px; }
.episode-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 8px; color: #9a332a; font-size: 13px; font-weight: 800; }
h1 { margin: 0; font-size: 26px; letter-spacing: 0; }
.board-scope { margin: 7px 0 0; color: #6b7176; font-size: 13px; }
.head-actions { display: flex; gap: 8px; }
button, select, input, textarea { border: 1px solid #cdd1d4; border-radius: 4px; background: #fff; }
button { min-height: 38px; padding: 0 13px; font-weight: 700; }
button:hover { border-color: #737a80; }
.primary { border-color: #17191b; color: #fff; background: #17191b; }
.primary:hover { background: #303438; }
.icon-button { width: 40px; padding: 0; font-size: 20px; }
.summary { display: grid; grid-template-columns: repeat(3, 110px) 1fr; align-items: center; gap: 20px; padding: 16px 18px; border-top: 3px solid #17191b; background: #fff; }
.summary div:not(.progress) { display: flex; gap: 8px; align-items: baseline; }
.summary strong { font-size: 22px; }
.summary span { color: #6b7176; font-size: 13px; }
.progress { height: 6px; overflow: hidden; background: #e2e5e7; }
.progress span { display: block; width: 0; height: 100%; background: #35a66f; transition: width .2s; }
.cut-nav { position: sticky; top: 58px; z-index: 9; display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; background: #f2f3f4; }
.cut-nav a { flex: 0 0 74px; padding: 9px 8px; border-bottom: 3px solid #cdd1d4; color: #34383b; font-size: 12px; font-weight: 800; text-align: center; text-decoration: none; background: #fff; }
.cut-nav a.approved { border-color: #35a66f; }
.cut-nav a.review { border-color: #e2b52e; }
.cut-nav a.replace { border-color: #c84b41; }
.scene-list { display: grid; gap: 12px; }
.scene { display: grid; grid-template-columns: 96px 1fr; background: #fff; border-left: 4px solid #cdd1d4; }
.scene[data-status="approved"] { border-left-color: #35a66f; }
.scene[data-status="review"] { border-left-color: #e2b52e; }
.scene[data-status="replace"] { border-left-color: #c84b41; }
.scene-index { padding: 22px 16px; border-right: 1px solid #e3e5e7; }
.scene-index strong, .scene-index span { display: block; }
.scene-index strong { text-transform: uppercase; }
.scene-index span { margin-top: 6px; color: #72787d; font-size: 12px; }
.scene-main { min-width: 0; padding: 20px; }
.narration { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.65; }
.intent { margin: 7px 0 16px; color: #666c71; font-size: 13px; }
.segmented { display: inline-flex; gap: 0; }
.segmented button { border-radius: 0; margin-left: -1px; background: #fff; }
.segmented button:first-child { margin-left: 0; border-radius: 4px 0 0 4px; }
.segmented button:last-child { border-radius: 0 4px 4px 0; }
.segmented button.active { z-index: 1; border-color: #17191b; color: #fff; background: #17191b; }
.asset-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(260px, 1.3fr); gap: 18px; align-items: center; margin-top: 16px; }
.media-frame { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #202326; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.provider { position: absolute; left: 8px; bottom: 8px; padding: 4px 6px; color: #fff; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.72); }
.asset-info { display: grid; gap: 6px; min-width: 0; }
.asset-label { margin: 0; color: #6c7277; font-size: 12px; font-weight: 700; }
.asset-info strong { font-size: 19px; }
.asset-info > span { overflow: hidden; color: #6c7277; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.review-links { display: flex; gap: 6px; margin-top: 10px; }
.review-links a { padding: 9px 11px; border: 1px solid #cdd1d4; border-radius: 4px; color: #34383b; font-size: 12px; font-weight: 700; text-decoration: none; }
label { display: grid; gap: 6px; color: #555b60; font-size: 12px; font-weight: 700; }
select, input { min-height: 38px; padding: 0 9px; }
.decision-row { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e3e5e7; }
.note-label { grid-template-columns: auto 1fr; align-items: center; }
.note { width: 100%; }
@media (max-width: 820px) {
  main { padding: 16px; }
  .episode-head { align-items: flex-start; }
  h1 { font-size: 22px; }
  .summary { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .progress { grid-column: 1 / -1; }
  .scene { grid-template-columns: 1fr; }
  .scene-index { display: flex; justify-content: space-between; padding: 14px 16px; border-right: 0; border-bottom: 1px solid #e3e5e7; }
  .scene-index span { margin: 0; }
  .asset-layout, .decision-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .episode-head { display: grid; }
  .head-actions { width: 100%; }
  #syncBtn { flex: 1; }
  .summary div:not(.progress) { display: grid; gap: 2px; }
  .scene-main { padding: 16px; }
  .segmented { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .status-control { grid-template-columns: repeat(3, 1fr); }
  .segmented button { padding: 0 7px; white-space: nowrap; }
}
