/* Independent Video workspace with shared branding — Video를 분리하고 브랜드는 공유한다. */
.sv-workspace { color: var(--sm-ink); background: var(--sm-ground); min-height: 100dvh; }
.sv-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: calc(100dvh - 118px); }
.sv-controls { border-right: 1px solid var(--sm-line); background: var(--sm-surface); min-width: 0; scroll-margin-top: 118px; }
.sv-intro { padding: 26px 26px 22px; border-bottom: 1px solid var(--sm-line); }
.sv-intro h1 { margin: 8px 0 10px; font-size: 30px; line-height: 1.1; letter-spacing: -.04em; font-weight: 400; }
.sv-intro p { font-size: 13px; color: var(--sm-muted); }
.sv-tool-tabs, .sv-input-tabs { display: flex; }
.sv-tool-tabs { border-bottom: 1px solid var(--sm-line); }
.sv-tool-tabs button { width: 50%; min-height: 49px; font-size: 13px; border-bottom: 2px solid transparent; }
.sv-tool-tabs button[aria-pressed='true'] { border-bottom-color: var(--sm-ink); }
.sv-inputs { padding: 18px 26px 16px; border-bottom: 1px solid var(--sm-line); }
.sv-input-tabs { gap: 24px; margin-bottom: 14px; }
.sv-input-tabs button { min-height: 36px; color: var(--sm-muted); border-bottom: 1px solid transparent; font-size: 12px; }
.sv-input-tabs button[aria-pressed='true'] { color: var(--sm-ink); border-color: var(--sm-ink); }
.sv-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sv-ingredients { grid-template-columns: repeat(3, minmax(0,1fr)); }
.sv-upload { position: relative; min-width: 0; }
.sv-upload-target { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; height: 124px; border: 1px solid var(--sm-line); background: #FEF5F8; overflow: hidden; cursor: pointer; }
.sv-upload-target:focus-within { outline: 2px solid var(--sm-ink); outline-offset: 2px; }
.sv-upload-target:has(input:disabled) { cursor: default; opacity: .6; }
.sv-upload-target input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: inherit; }
.sv-upload-target img { width: 100%; height: 100%; object-fit: contain; }
.sv-upload-target img + .sv-upload-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(254,245,248,.92); padding: 4px; }
.sv-upload-plus { font-size: 24px; font-weight: 400; line-height: 1; margin-bottom: 12px; }
.sv-upload-caption { font-size: 12px; text-align: center; }
.sv-upload-caption small { display: block; font-size: 10px; color: var(--sm-muted); margin-top: 3px; }
.sv-remove { position: absolute; top: 0; right: 0; width: 36px; height: 36px; font-size: 20px; background: var(--sm-ground); border: 1px solid var(--sm-line); }
.sv-hint { font-size: 11px; line-height: 1.6; color: var(--sm-muted); margin: 10px 0 0; }
.sv-extension { padding: 24px 26px; border-bottom: 1px solid var(--sm-line); min-height: 174px; }
.sv-extension > p { margin-top: 12px; font-size: 13px; line-height: 1.7; }
.sv-prompt { padding: 19px 26px 17px; border-bottom: 1px solid var(--sm-line); }
.sv-prompt > label { display: block; font-size: 13px; margin-bottom: 12px; }
.sv-prompt textarea { background: transparent; color: var(--sm-ink); width: 100%; border: 0; resize: vertical; min-height: 114px; font-size: 14px; line-height: 1.65; padding: 0; border-radius: 0; }
.sv-prompt textarea::placeholder { color: #6C7A9E; opacity: 1; }
.sv-prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--sm-muted); margin-top: 12px; }
.sv-model { padding: 16px 26px; border-bottom: 1px solid var(--sm-line); }
.sv-model .sv-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sv-select { display: block; min-width: 0; }
.sv-select > span { font-size: 11px; color: var(--sm-muted); display: block; }
.sv-select select { display: block; background: transparent; font-size: 13px; color: var(--sm-ink); min-height: 32px; max-width: 100%; width: 100%; border: 0; border-radius: 0; padding-right: 2px; }
.sv-model select { width: auto; max-width: 80%; }
.sv-select select:disabled { opacity: .65; }
.sv-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--sm-line); }
.sv-options .sv-select { padding: 14px 18px; border-right: 1px solid var(--sm-line); }
.sv-options .sv-select:last-child { border: 0; }
.sv-submit { padding: 0 26px 22px; }
.sv-submit .sv-hint, .sv-submit .sm-error { margin: 12px 0; }
.sv-generate { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 20px; padding: 15px 18px; min-height: 52px; background: var(--sm-action); border: 1px solid rgba(34,48,85,.1); color: var(--sm-ink); font-size: 14px; }
.sv-generate:not(:disabled):hover { background: var(--sm-pink); }
.sv-generate > span:last-child { font-size: 22px; line-height: 1; }
.sv-billing { font-size: 10px; line-height: 1.6; color: var(--sm-muted); margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sv-results { min-width: 0; padding: 28px 32px; scroll-margin-top: 118px; }
.sv-result-heading, .sv-recent-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; gap: 12px; }
.sv-results h2 { font-size: 13px; font-weight: 400; }
.sv-result-heading > span, .sv-recent-heading > span { color: var(--sm-muted); font-size: 11px; }
.sv-stage { display: grid; place-items: center; min-height: 360px; aspect-ratio: 16/10; background: #FDEAF0; border: 1px solid var(--sm-line); overflow: hidden; }
.sv-stage:has(video) { background: #1a2030; }
.sv-stage video { width: 100%; height: 100%; max-height: 65dvh; object-fit: contain; }
.sv-stage-message { padding: 34px; text-align: center; max-width: 440px; }
.sv-stage-message svg { margin: 0 auto 28px; opacity: .65; }
.sv-stage-message h3 { font-size: 20px; line-height: 1.25; font-weight: 400; letter-spacing: -.025em; }
.sv-stage-message p { font-size: 13px; color: var(--sm-muted); margin: 12px 0 0; line-height: 1.7; overflow-wrap: anywhere; }
.sv-stage-message button { margin-top: 20px; }
.sv-timer { display: block; font-variant-numeric: tabular-nums; margin-top: 24px; font-size: 12px; color: var(--sm-muted); }
.sv-result-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--sm-line); }
.sv-outline { min-height: 42px; padding: 10px 14px; border: 1px solid var(--sm-line); color: var(--sm-ink); font-size: 12px; background: transparent; }
.sv-save { background: var(--sm-action); }
.sv-result-error { padding: 16px 0; font-size: 13px; color: #a62d42; overflow-wrap: anywhere; }
.sv-result-error button { margin-top: 10px; }
.sv-take-info { padding: 16px 0; border-bottom: 1px solid var(--sm-line); }
.sv-take-info p { font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.sv-take-info > span { display: block; font-size: 11px; color: var(--sm-muted); margin-top: 10px; }
.sv-recent-heading { padding-top: 28px; border-bottom: 1px solid var(--sm-line); }
.sv-takes { list-style: none; margin: 0; padding: 0; }
.sv-takes li { border-bottom: 1px solid var(--sm-line); }
.sv-takes button { display: flex; gap: 18px; align-items: center; width: 100%; min-height: 58px; text-align: left; padding: 12px 10px; font-size: 12px; }
.sv-takes button[aria-pressed='true'] { background: var(--sm-surface); }
.sv-take-number { font-size: 11px; color: var(--sm-muted); flex: none; }
.sv-take-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-take-status { flex: none; color: var(--sm-muted); font-size: 10px; }
.sv-no-takes { padding: 20px 0; font-size: 12px; color: var(--sm-muted); border-bottom: 1px solid var(--sm-line); }
.sv-retention { font-size: 11px; color: var(--sm-muted); line-height: 1.7; margin-top: 18px; }
@media (min-width: 1101px) { .sv-layout { grid-template-columns: 390px minmax(0, 1fr); } }
@media (max-width: 1000px) and (min-width: 769px) { .sv-layout { grid-template-columns: 330px minmax(0, 1fr); } .sv-results { padding: 22px; } .sv-stage { min-height: 320px; } }
@media (max-width: 768px) {
  .sv-layout { display: block; }
  .sv-controls { border-right: 0; scroll-margin-top: 100px; }
  .sv-intro { padding: 22px 20px; }
  .sv-intro h1 { font-size: 26px; }
  .sv-inputs, .sv-prompt, .sv-model { padding-left: 20px; padding-right: 20px; }
  .sv-upload-target { height: 128px; }
  .sv-upload-caption, .sv-input-tabs button { font-size: 13px; }
  .sv-prompt textarea { font-size: 16px; min-height: 128px; }
  .sv-select select { font-size: 16px; min-height: 38px; }
  .sv-model select { font-size: 14px; }
  .sv-submit { padding: 0 20px 24px; }
  .sv-options .sv-select { padding: 14px 20px; }
  .sv-extension { padding: 22px 20px; }
  .sv-results { padding: 22px 20px 32px; border-top: 1px solid var(--sm-line); scroll-margin-top: 100px; }
  .sv-stage { min-height: 270px; aspect-ratio: auto; }
  .sv-stage video { max-height: 65dvh; min-height: 220px; }
  .sv-stage-message { padding: 34px 20px; }
  .sv-stage-message h3 { font-size: 18px; }
  .sv-outline { min-height: 44px; }
  .sv-result-actions { gap: 8px; }
  .sv-result-actions button { flex: 1; white-space: nowrap; }
  .sv-result-actions .sv-save { flex-basis: 100%; }
  .sv-retention { padding-bottom: env(safe-area-inset-bottom); }
}
/* Separate desktop panes; stack on mobile — 데스크톱은 분할, 모바일은 세로 배치한다. */
@media (min-width: 769px) {
  .sv-workspace { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .sv-layout { flex: 1; min-height: 0; overflow: hidden; }
  .sv-controls, .sv-results { overflow-y: auto; }
}
.sv-cutbar { display: flex; flex: none; align-items: stretch; min-height: 43px; border-bottom: 1px solid var(--sm-line); background: var(--sm-surface); }
.sv-cuttabs { display: flex; overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.sv-cuttabs button { min-width: 94px; padding: 10px 18px; border-right: 1px solid var(--sm-line); font-size: 12px; color: var(--sm-muted); white-space: nowrap; }
.sv-cuttabs button[aria-selected='true'] { background: var(--sm-ground); color: var(--sm-ink); box-shadow: inset 0 -2px var(--sm-ink); }
.sv-cut-busy { margin-left: 8px; font-size: 20px; line-height: 0; color: #a62d42; }
.sv-add-cut { width: 46px; flex: 0 0 46px; border-right: 1px solid var(--sm-line); font-size: 22px; }
.sv-cut-note { margin-left: auto; padding: 12px 24px; font-size: 10px; color: var(--sm-muted); white-space: nowrap; }
.sv-cut-panel[hidden], .sv-cut-content[hidden] { display: none !important; }
.sv-intro { position: relative; }
.sv-clear { position: absolute; top: 23px; right: 22px; font-size: 10px; min-height: 28px; color: var(--sm-muted); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 769px) {
  .sv-cut-panel, .sv-cut-content { display: flex; flex: 1; min-height: 0; }
  .sv-cut-content > .sv-layout { width: 100%; }
}
@media (max-width: 768px) { .sv-cut-note { display: none; } .sv-cuttabs button { min-width: 86px; padding: 12px; } .sv-clear { right: 20px; } }
.sv-tab-wrap { display: flex; border-right: 1px solid var(--sm-line); flex: none; }
.sv-tab-wrap:has([aria-selected='true']) { background: var(--sm-ground); }
.sv-cuttabs .sv-tab-wrap [role='tab'] { border: 0; min-width: 80px; padding-right: 8px; }
.sv-cuttabs .sv-close-cut { min-width: 34px; width: 34px; padding: 8px; border: 0; font-size: 17px; }
.sv-close-cut:hover { color: #a62d42; }
.sv-archive { position: relative; flex: none; margin-left: auto; }
.sv-archive > button { height: 100%; padding: 8px 16px; font-size: 11px; }
.sv-archive-list { position: absolute; top: 100%; right: 0; z-index: 55; min-width: 160px; max-height: 250px; overflow-y: auto; background: var(--sm-surface); border: 1px solid var(--sm-line); }
.sv-archive-list button { width: 100%; min-height: 44px; text-align: left; padding: 12px 16px; font-size: 12px; }
.sv-archive-list button + button { border-top: 1px solid var(--sm-line); }
@media (max-width: 768px) { .sv-cuttabs .sv-close-cut { min-width: 40px; width: 40px; } .sv-archive > button { padding: 8px; font-size: 10px; } }
/* Keep a 32px target for closing tabs — 탭 닫기는 32px 터치 영역을 유지한다. */
.sv-tab-wrap { position: relative; }
.sv-cuttabs .sv-tab-wrap [role='tab'] { min-width: 112px; padding: 13px 32px 12px 18px; }
.sv-cuttabs .sv-close-cut { position: absolute; top: 0; right: 0; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 4px 4px 12px 12px; font-size: 12px; line-height: 1; opacity: .7; }
.sv-cuttabs .sv-close-cut:hover, .sv-cuttabs .sv-close-cut:focus-visible { opacity: 1; }
.sv-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 26px; }
.sv-intro h1 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.sv-clear { position: static; font-size: 11px; min-height: 28px; margin: 0; }
@media (max-width: 768px) { .sv-intro { padding: 13px 20px; } .sv-intro h1 { font-size: 18px; } }
.sv-stage { width: 100%; min-width: 0; }
.sv-draft-status { margin-left: auto; font-size: 10px; color: var(--sm-muted); }
.sv-intro { gap: 16px; }
.sv-duplicate-cut { padding: 8px 14px; border-right: 1px solid var(--sm-line); font-size: 11px; }
.sv-cut-name { width: 112px; padding: 10px 12px; border: 0; background: var(--sm-ground); font-size: 12px; color: var(--sm-ink); }
.sv-details-export { display: block; padding: 10px 0 0; font-size: 11px; color: var(--sm-muted); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) { .sv-cut-note { display: none; } }
@media (max-width: 768px) { .sv-duplicate-cut { padding: 8px 10px; font-size: 10px; } .sv-cut-name { font-size: 16px; } }
