/* 편집 도구 화면: 썸네일 층 편집기(프로젝트 화면 마무리) · 영상편집 스튜디오. vidia.css 의 토큰을 그대로 쓴다. */

/* ---------- 썸네일 층 편집기 ---------- */
.vd-thumbed { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: var(--s-5); align-items: start; }
.vd-thumbed__main { display: grid; gap: var(--s-3); min-width: 0; position: sticky; top: 76px; }
.vd-thumbed__main > p { margin: 0; }
.vd-thumbed__stage { position: relative; width: min(100%, calc(64vh * var(--stage-ar, 1.7778))); aspect-ratio: 16 / 9; margin: 0 auto; border-radius: var(--r-2); overflow: hidden; background: #111; box-shadow: var(--sh-1); }
.vd-thumbed__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vd-thumbed__ui { touch-action: none; outline: none; }
.vd-thumbed__ui:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.vd-thumbed__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vd-thumbed__preset .vd-select { min-height: 32px; padding-block: 4px; font-size: 13px; }
.vd-thumbed__hist { display: inline-flex; margin-left: auto; }
.vd-thumbed__layers-head h4 { margin: 0; font-size: 14px; font-weight: 800; }
.vd-thumbed__layers-head small { font-weight: 500; font-size: 12px; margin-left: 6px; }
.vd-thumbed__layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vd-thumbed__layer { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 2px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); }
.vd-thumbed__layer.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.vd-thumbed__layer-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; text-align: left; font-size: 13.5px; color: var(--ink); border-radius: var(--r-1); }
.vd-thumbed__layer-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-thumbed__layer-acts { display: inline-flex; gap: 0; flex: none; }
.vd-thumbed__side { display: grid; gap: var(--s-3); min-width: 0; }
.vd-thumbed__sec { border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s-3) var(--s-4); background: var(--surface-2); display: grid; gap: var(--s-3); }
.vd-thumbed__sec > summary, .vd-thumbed__sub > summary { cursor: pointer; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.vd-thumbed__sec[open] > summary { margin-bottom: var(--s-2); }
.vd-thumbed__sec input[type="range"], .vd-thumbed__props input[type="range"] { width: 100%; accent-color: var(--accent); }
.vd-thumbed__props { display: grid; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.vd-thumbed__ptitle { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; }
.vd-thumbed__hint { margin: 0; }
.vd-thumbed__row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: end; }
.vd-thumbed__row .vd-field { min-width: 0; }
.vd-thumbed__row input[type="color"] { width: 48px; height: 34px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--surface); }
.vd-thumbed__rn { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; align-items: center; }
.vd-thumbed__rn .vd-input { min-height: 32px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.vd-thumbed__seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-1); overflow: hidden; }
.vd-thumbed__seg button { min-height: 34px; padding: 0 12px; font-size: 13px; color: var(--ink-2); background: var(--surface); }
.vd-thumbed__seg button + button { border-left: 1px solid var(--line-2); }
.vd-thumbed__seg button[aria-checked="true"] { background: var(--accent-fill); color: var(--on-fill); }
.vd-thumbed__sub { border-top: 1px solid var(--line); padding-top: var(--s-2); display: grid; gap: var(--s-2); }
.vd-thumbed__pos { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-2); min-width: 0; }
.vd-thumbed__pos legend { font-size: 13.5px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.vd-thumbed__grid { display: grid; grid-template-columns: repeat(3, 26px); gap: 3px; }
.vd-thumbed__grid button { width: 26px; height: 18px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface-2); }
.vd-thumbed__grid button:hover, .vd-thumbed__grid button:focus-visible { background: var(--accent); border-color: var(--accent); }
.vd-thumbed__xy { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.vd-thumbed__chooser { border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--sh-2); padding: var(--s-3); display: grid; gap: var(--s-2); }
.vd-thumbed__chooser-head { display: flex; align-items: center; gap: 8px; }
.vd-thumbed__chooser-head strong { margin-right: auto; }
.vd-thumbed__chooser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; }
.vd-thumbed__chooser-grid button { display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface-2); text-align: left; font-size: 11.5px; color: var(--ink-2); }
.vd-thumbed__chooser-grid button:hover, .vd-thumbed__chooser-grid button:focus-visible { border-color: var(--accent); }
.vd-thumbed__chooser-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 4px; background: repeating-conic-gradient(#d9dde3 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.vd-thumbed__chooser-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-finish__danger { color: var(--danger); }
.vd-finish__logo-preview { margin: 0; display: grid; gap: 4px; }
.vd-finish__logo-preview canvas { width: 100%; height: auto; border-radius: var(--r-1); background: #111; touch-action: none; cursor: move; }
.vd-finish__logo-preview canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vd-finish__media .vdp { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 900px) {
	.vd-thumbed { grid-template-columns: minmax(0, 1fr); }
	.vd-thumbed__main { position: static; }
	.vd-thumbed__hist { margin-left: 0; }
}

/* ---------- 영상편집 스튜디오: 타임라인(위) · 미리보기 · 작은 창 ---------- */
/* 배치(2026-09-30): 도구 줄 → 패널 탭 → 장면 목록·미리보기·설정(위) → 타임라인(아래). 일반 편집 도구처럼 미리보기가 첫 화면에 다 보이게 한다. */
.vd-ed2 > .vd-editor__tabs { order: 1; }
.vd-ed2 > .vd-ed2__grid { order: 2; }
.vd-ed2 > .vd-ed2__timeline { order: 3; }
/* 좌우 패널은 미리보기 높이 근처에서 안쪽 스크롤 — 긴 설정 패널이 타임라인을 화면 밖으로 밀지 않게. */
@media (min-width: 1025px) {
	.vd-ed2__grid > .vd-editor__scenes, .vd-ed2__grid > .vd-editor__side { max-height: var(--ed-pane-h, clamp(360px, calc(100vh - 470px), 760px)); overflow-y: auto; overscroll-behavior: contain; }
}
.vd-ed2__timeline { position: relative; display: grid; gap: 8px; padding: 10px 12px; }
.vd-ed2__transport { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.vd-ed2__icon { padding-inline: 8px; }
.vd-ed2__clock { font-size: 13.5px; font-weight: 700; padding: 4px 8px; border-radius: var(--r-1); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.vd-ed2__spacer { flex: 1 1 auto; }
.vd-ed2__check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.vd-ed2__check input { width: 16px; height: 16px; accent-color: var(--accent); }
.vd-ed2__zoom { display: inline-flex; align-items: center; gap: 6px; }
.vd-ed2__zoom input { width: 120px; accent-color: var(--accent); }
.vd-ed2__tracks { display: grid; grid-template-columns: 68px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); outline: none; }
.vd-ed2__tracks:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.vd-tl2__labels { display: grid; grid-template-rows: 22px 46px 24px 30px 34px 34px; border-right: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.vd-tl2__labels span { display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); }
.vd-tl2__scroll { overflow-x: auto; overflow-y: hidden; min-width: 0; scrollbar-width: thin; }
.vd-tl2 { position: relative; display: grid; grid-template-rows: 22px 46px 24px 30px 34px 34px; user-select: none; -webkit-user-select: none; }
.vd-tl2__ruler { position: relative; border-bottom: 1px solid var(--line); cursor: text; }
.vd-tl2__tick { position: absolute; top: 2px; padding-left: 3px; border-left: 1px solid var(--line-2); height: 18px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.vd-tl2__row { position: relative; border-bottom: 1px solid var(--line); }
.vd-tl2__row:last-child { border-bottom: 0; }
.vd-tl2__scene { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 4px; padding: 0 10px 0 2px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 5px; background: var(--surface-2); color: var(--ink); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.vd-tl2__scene.is-image { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.vd-tl2__scene.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.vd-tl2__stitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; pointer-events: none; }
.vd-tl2__stitle em { font-style: normal; color: var(--accent); }
.vd-tl2__splay { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-fill); color: var(--on-fill); }
.vd-tl2__splay .vd-ic { width: 12px; height: 12px; }
.vd-tl2__splay:hover, .vd-tl2__splay:focus-visible { background: var(--accent-hover); }
.vd-tl2__edge { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: ew-resize; background: linear-gradient(90deg, transparent 2px, var(--line-2) 2px 4px, transparent 4px 6px, var(--line-2) 6px 8px); }
.vd-tl2__scene.is-selected .vd-tl2__edge { background: linear-gradient(90deg, transparent 2px, var(--accent) 2px 4px, transparent 4px 6px, var(--accent) 6px 8px); }
.vd-tl2__freeze { position: absolute; top: 0; bottom: 0; right: 8px; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(148, 163, 184, .35) 4px 6px); pointer-events: none; }
.vd-tl2__cue, .vd-tl2__ov, .vd-tl2__narr, .vd-tl2__bgm { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; cursor: grab; overflow: hidden; }
.vd-tl2__cue { display: flex; align-items: center; padding: 0 6px; background: #F59E0B; color: #1F1300; font-size: 11px; font-weight: 700; }
.vd-tl2__cue > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.vd-tl2__cue.is-selected { box-shadow: 0 0 0 2px var(--ink); }
.vd-tl2__ov { display: flex; align-items: center; gap: 4px; padding: 0 4px; background: #8B5CF6; }
.vd-tl2__ov img { height: 14px; width: auto; max-width: 30px; object-fit: contain; pointer-events: none; }
.vd-tl2__ov.is-selected { box-shadow: 0 0 0 2px var(--ink); }
.vd-tl2__h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; background: rgba(0, 0, 0, .18); }
.vd-tl2__h--l { left: 0; }
.vd-tl2__h--r { right: 0; }
.vd-tl2__narr { background: var(--accent-soft); border: 1px solid var(--accent); }
.vd-tl2__narr.is-muted { opacity: .45; filter: grayscale(1); }
.vd-tl2__narr.is-over { border-color: var(--danger); }
.vd-tl2__bgm { display: flex; align-items: center; background: var(--ok-soft); border: 1px solid var(--ok); cursor: pointer; }
.vd-tl2__bgm span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--ink); text-shadow: 0 0 3px var(--surface); pointer-events: none; }
.vd-tl2__narr canvas, .vd-tl2__bgm canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vd-tl2__fx { position: absolute; right: 4px; top: 1px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--accent-ink); pointer-events: none; }
.vd-tl2__empty { position: absolute; left: 4px; top: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 4px; font-size: 11.5px; color: var(--muted); }
.vd-tl2__empty .vd-ic { width: 12px; height: 12px; }
.vd-tl2__head { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; z-index: 3; will-change: transform; }
.vd-tl2__head::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #EF4444; }
.vd-tl2__head span { position: absolute; top: 0; left: -6px; width: 12px; height: 10px; background: #EF4444; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.vd-ed2__pop { position: fixed; z-index: 60; width: min(380px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--sh-2); }
.vd-ed2__pop[hidden] { display: none; }
.vd-ed2__pophead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vd-ed2__pophead strong { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.vd-ed2__pop input[type="range"] { width: 100%; accent-color: var(--accent); }
.vd-ed2__pop .vd-actions { flex-wrap: wrap; gap: 4px; }
.vd-ed2__pop p { margin: 0; }

.vd-ed2__screen { position: relative; width: auto; height: clamp(300px, calc(100vh - 560px), 640px); max-width: 100%; aspect-ratio: 9 / 16; margin: 0 auto; background: #000; border-radius: var(--r-2); overflow: hidden; cursor: pointer; }
.vd-ed2__frame { position: absolute; inset: 0; overflow: hidden; }
.vd-ed2__frame video, .vd-ed2__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vd-ed2__frame [hidden] { display: none; }
.vd-ed2__overlays { position: absolute; inset: 0; pointer-events: none; }
.vd-ed2__ov { position: absolute; transform-origin: center; pointer-events: auto; cursor: move; touch-action: none; }
.vd-ed2__ov img { display: block; width: 100%; height: auto; pointer-events: none; }
.vd-ed2__ov.is-selected { outline: 2px dashed #fff; outline-offset: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.vd-ed2__ovh { display: none; position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 3px; background: #fff; cursor: nwse-resize; }
.vd-ed2__ov.is-selected .vd-ed2__ovh { display: block; }
.vd-ed2__cue { position: absolute; left: 6%; right: 6%; margin: 0; text-align: center; line-height: 1.45; text-shadow: none; white-space: pre-line; pointer-events: none; }
.vd-ed2__cue.is-middle { top: 50%; transform: translateY(-50%); }
.vd-ed2__cue.is-box:not(:empty) { left: 50%; right: auto; transform: translateX(-50%); max-width: 88%; padding: 0.1em 0.4em; background: rgba(0, 0, 0, .38); }
.vd-ed2__cue.is-box.is-middle:not(:empty) { transform: translate(-50%, -50%); }
.vd-ed2__cue.is-selected:not(:empty) { outline: 2px dashed #F59E0B; outline-offset: 4px; }
.vd-ed2__title-band { position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 3% 6%; text-align: center; font-weight: 900; color: #fff; font-size: clamp(12px, 2.4vw, 26px); background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); pointer-events: none; }
.vd-ed2__title-band[hidden] { display: none; }
.vd-ed2__shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.vd-ed2__shade.is-fade { background: #000; }
.vd-ed2__shade.is-white-flash { background: #fff; }
.vd-ed2__shade.is-on { animation: vd-ed2-flash .45s ease-out; }
@keyframes vd-ed2-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.vd-ed2__bigplay { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity var(--tr); }
.vd-ed2__bigplay .vd-ic { width: 28px; height: 28px; }
.vd-ed2__screen:hover .vd-ed2__bigplay, .vd-ed2__bigplay:focus-visible { opacity: 1; }
.vd-ed2__bigplay[hidden] { display: none; }
.vd-ed2__scrub input { width: 100%; accent-color: var(--accent); }
.vd-ed2__iplay { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.vd-ed2__iplay .vd-ic { width: 14px; height: 14px; }
.vd-ed2__iplay:hover, .vd-ed2__iplay:focus-visible { background: var(--accent-fill); color: var(--on-fill); }
.vd-ed2 .vd-editor__item { display: flex; align-items: center; gap: 6px; }
.vd-ed2 .vd-editor__item .vd-editor__pick { flex: 1; min-width: 0; }
.vd-ed2__sec { border: 1px solid var(--line); border-radius: var(--r-2); padding: 8px 10px; display: grid; gap: 8px; }
.vd-ed2__sec > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 800; font-size: 14px; }
.vd-ed2__sec > summary small { font-weight: 500; }
.vd-ed2__sec input[type="range"], .vd-editor__side input[type="range"] { width: 100%; accent-color: var(--accent); }
.vd-ed2__ovlist, .vd-ed2__narrlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vd-ed2__ovlist li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--r-1); padding: 2px; }
.vd-ed2__ovlist li.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.vd-ed2__ovpick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px; text-align: left; font-size: 12.5px; }
.vd-ed2__ovpick img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; background: repeating-conic-gradient(#d9dde3 0% 25%, #fff 0% 50%) 50% / 10px 10px; }
.vd-ed2__ovpick span { display: grid; min-width: 0; }
.vd-ed2__ovpick small { color: var(--muted); }
.vd-ed2__ovform { display: grid; gap: 6px; padding: 8px; border-radius: var(--r-1); background: var(--surface-2); }
.vd-ed2__ovform p { margin: 0; }
.vd-ed2__grid9 { display: grid; grid-template-columns: repeat(3, 24px); gap: 3px; }
.vd-ed2__grid9 button { width: 24px; height: 16px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); }
.vd-ed2__grid9 button:hover, .vd-ed2__grid9 button:focus-visible { background: var(--accent); border-color: var(--accent); }
.vd-ed2__narrlist li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-1); }
.vd-ed2__narrlist li > span { flex: 1; min-width: 0; display: grid; font-size: 12.5px; }
.vd-ed2__narrlist small { color: var(--muted); }
.vd-editor__cues li.is-selected { border-color: #F59E0B; box-shadow: 0 0 0 1px #F59E0B; }
.vd-ed2__outplayer { display: grid; gap: 6px; }
.vd-ed2__outplayer[hidden] { display: none; }
.vd-ed2__outplayer video { width: 100%; max-height: 50vh; background: #000; border-radius: var(--r-1); }
.vd-ed2__keylist { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.vd-ed2__keylist dt { font-family: var(--mono); font-size: 12.5px; font-weight: 700; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface-2); justify-self: start; }
.vd-ed2__keylist dd { margin: 0; }
@media (max-width: 760px) {
	.vd-ed2__transport .vd-ed2__zoom input { width: 90px; }
	.vd-ed2__screen { height: 32vh; }
	.vd-ed2__tracks { grid-template-columns: 52px minmax(0, 1fr); }
	.vd-tl2__labels span { padding: 0 4px; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
	.vd-ed2__shade.is-on { animation: none; }
}

/* ---------- 소리 다듬기 창 ---------- */
.vd-aed { width: min(1080px, calc(100vw - 24px)); max-width: none; }
.vd-aed__body { display: grid; gap: 12px; }
.vd-aed__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vd-aed__head h2 { margin: 0; font-size: 18px; }
.vd-aed__body > p { margin: 0; }
.vd-aed__wave { min-width: 0; }
.vd-aed__selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-1); background: var(--surface-2); }
.vd-aed__selinfo { flex: 1 1 220px; font-variant-numeric: tabular-nums; }
.vd-aed__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vd-aed__card { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); }
.vd-aed__card--wide { grid-column: 1 / -1; }
.vd-aed__card h3, .vd-aed__proc h3 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.vd-aed__card h3 small, .vd-aed__proc h3 small { font-weight: 500; }
.vd-aed__card p { margin: 0; }
.vd-aed__card input[type="range"] { width: 100%; accent-color: var(--accent); }
.vd-aed__two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vd-aed__regions, .vd-aed__notches { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vd-aed__regions li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.vd-aed__notches li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.vd-aed__notches label { display: inline-flex; align-items: center; gap: 4px; }
.vd-aed__notches .vd-input { width: 84px; min-height: 30px; padding: 2px 6px; }
.vd-aed__spec { display: block; width: 100%; height: 150px; border-radius: var(--r-1); background: var(--surface-2); cursor: crosshair; }
.vd-aed__proc { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--r-2); background: var(--accent-soft); }
.vd-aed__proc[hidden] { display: none; }
.vd-aed__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vd-aed__spacer { flex: 1 1 auto; }
@media (max-width: 760px) {
	.vd-aed__grid { grid-template-columns: minmax(0, 1fr); }
	.vd-aed__foot .vd-btn { flex: 1 1 auto; }
}

/* ---------- 패키지 빌더: 예상 비용 요약줄·단계 입력/출력 JSON·출시(2026-09-29) ---------- */
/* 긴 JSON(<pre>)이 격자 열을 넓히지 않게 열 폭을 0 부터 잡는다. */
.vd-bld { grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.vd-insp, .vd-insp__sec, [data-i-io] { min-width: 0; }
.vd-bld__sum { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 13px; min-width: 0; }
.vd-bld__sum.is-busy .vd-bld__sum-main { opacity: .6; }
.vd-bld__sum-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; transition: opacity var(--tr); }
.vd-bld__sum-cost { color: var(--ink-2); overflow-wrap: anywhere; }
.vd-bld__sum-cost b, .vd-bld__sum-earn b { color: var(--ink); font-weight: 800; }
.vd-bld__sum-cost span { color: var(--muted); }
.vd-bld__sum-earn { color: var(--ok); overflow-wrap: anywhere; }
.vd-bld__sum-note { color: var(--muted); font-size: 12px; }
.vd-bld__sum-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.vd-bld__sum-relnote { font-size: 12px; }
/* 빌더의 다음 단계 안내(R9 UI-S-05): 접힌 한 줄 띠, 펼치면 작업 영역 위에 겹치는 서랍(높이를 빼앗거나 출시 준비 띠에 가리지 않게). */
.vd-release-steps--compact { position: relative; z-index: 6; margin: 0; padding: 5px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.vd-release-steps--compact > summary { font-size: 12.5px; color: var(--ink-2); }
.vd-release-steps--compact > .vd-release-steps__body { position: absolute; left: 12px; top: calc(100% + 4px); width: min(620px, calc(100% - 24px)); max-height: min(70vh, 560px); overflow: auto; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.vd-bld > .vd-release-check:not([hidden]) { padding: 6px 16px 0; }
.vd-bld > .vd-release-check .vd-alert { margin: 0 0 6px; }
@media (max-width: 960px) { .vd-release-steps--compact { padding: 5px 12px; } .vd-release-steps--compact > .vd-release-steps__body { left: 8px; width: calc(100% - 16px); } }
/* 단계 입력(시작 = 처음 입력 폼, 나머지 = 앞 단계 출력, 잠금) */
.vd-insp__in { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); font-size: 12.5px; line-height: 1.55; }
.vd-insp__in p { margin: 0; color: var(--ink-2); }
.vd-insp__in .vd-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; }
.vd-insp__in-k { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.vd-insp__in-k svg { width: 13px; height: 13px; }
.vd-insp__in.is-locked { border-style: dashed; }
.vd-insp__io-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; }
.vd-insp__keys { color: var(--muted); overflow-wrap: anywhere; }
.vd-insp__keys code, .vd-insp__files code { font: 11.5px var(--mono); padding: 0 4px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); overflow-wrap: anywhere; }
.vd-insp__io { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.vd-insp__io > summary { padding: 8px 12px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.vd-insp__io[open] > summary { border-bottom: 1px solid var(--line); }
.vd-insp__io .vd-insp__json { max-height: 320px; margin: 0; border: 0; border-radius: 0 0 var(--r-2) var(--r-2); font-size: 11.5px; white-space: pre; overflow: auto; word-break: normal; }
.vd-insp__io .vd-insp__none { margin: 8px; }
.vd-insp__files { display: grid; gap: 4px; font-size: 12px; }
.vd-insp__files > span { font-weight: 800; color: var(--ink-2); }
.vd-insp__files ul { display: grid; gap: 2px; margin: 0; padding-left: 16px; }
.vd-insp__files small { color: var(--muted); font-size: 11.5px; }
.vd-insp__next { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 8px 12px; border-radius: var(--r-2); background: var(--accent-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.vd-insp__next svg { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--accent); }
@media (max-width: 960px) {
	.vd-bld__work { grid-template-columns: minmax(0, 1fr); }
	.vd-bld__sum { top: var(--bld-top, 0px); padding: 6px 12px; }
}

/* ---------- 모듈 편집·상세: 출력 예시 JSON·출시(2026-09-29) ---------- */
.vd-outex__area { font: 12.5px/1.55 var(--mono); tab-size: 2; }
.vd-outex__help { display: grid; gap: 2px; margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.vd-outex__state { font-size: 12px; }
.vd-outex__state.is-bad { color: var(--danger); }
.vd-outex__state.is-good { color: var(--ok); }
.vd-release { display: grid; gap: 8px; }
.vd-release__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.vd-outex__pre { white-space: pre; overflow: auto; word-break: normal; }

/* 모듈 지시서 첨부 파일(module-files.js) */
.vd-mfiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vd-mfiles__item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); }
.vd-mfiles__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 560px) { .vd-mfiles__item { grid-template-columns: minmax(0, 1fr) auto; } .vd-mfiles__item .vd-small { grid-column: 1 / -1; } }
.vd-mfiles-dl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vd-mfiles-dl a { display: inline-flex; align-items: center; gap: 6px; }
.vd-mfiles-dl svg { width: 16px; height: 16px; }

/* 호출 계획(module-contract.js) */
.vd-contract__slots { display: grid; gap: 8px; }
.vd-contract-slot { border: 1px solid var(--line); border-radius: var(--r-2); padding: 10px 12px; background: var(--surface-2); display: grid; gap: 8px; }
.vd-contract-slot__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vd-contract-slot__head code { color: var(--ink-3, var(--muted)); font-size: 12px; }
.vd-contract-slot__head button { margin-left: auto; }
.vd-contract-slot .vd-field-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-contract-slot .vd-field { flex: 1 1 140px; min-width: 0; }
.vd-contract-slot__model { flex: 3 1 260px !important; }
.vd-field--num { flex: 0 1 110px !important; }

/* ---------- 편집 순서(번호 단계)와 지금 할 일 안내(2026-09-30) ---------- */
.vd-edsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; counter-reset: none; }
.vd-edsteps a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink-2); text-decoration: none; transition: border-color var(--tr, .15s), background var(--tr, .15s); }
.vd-edsteps a:hover { border-color: var(--accent); }
.vd-edsteps a b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.vd-edsteps a span { display: grid; min-width: 0; }
.vd-edsteps a strong { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-edsteps a small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-edsteps a.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.vd-edsteps a.is-active b { background: var(--accent-fill); color: var(--on-fill); }
.vd-edguide { display: grid; gap: 8px; margin: 0 0 12px; padding: 12px; border: 1px solid var(--accent-soft); border-radius: var(--r-2); background: var(--accent-soft); }
.vd-edguide__step { margin: 0; font-weight: 800; color: var(--ink); }
.vd-edguide__list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.vd-edguide__nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vd-ed2__tlhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
@media (max-width: 760px) {
	.vd-edsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vd-edsteps a small { display: none; }
}

/* 2026-09-30 한 화면 맞춤(1440×900 기준 스크롤 없음): 단계 탭 한 줄·여백 축소·타임라인 제목을 재생 줄에 합침 */
.vd-cmain.vd-main:has(.vd-ed2) { padding-top: 12px; padding-bottom: 6px; }
.vd-editor.vd-ed2 { gap: 8px; padding-bottom: 0; }
.vd-ed2 .vd-editor__bar { padding-top: 8px; padding-bottom: 8px; }
.vd-ed2 .vd-edsteps a { min-height: 40px; padding: 4px 12px; }
.vd-ed2 .vd-edsteps a b { width: 24px; height: 24px; font-size: 13px; }
.vd-ed2 .vd-edsteps a small { display: none; }
.vd-ed2 .vd-editor__stage { gap: 4px; }
.vd-ed2__transport .vd-ed2__tlhead { margin: 0 6px 0 0; display: inline-flex; align-items: center; gap: 4px; }
.vd-ed2__timeline { gap: 6px; padding-top: 8px; padding-bottom: 8px; }

/* 모듈 등록·편집: 예시 보기(예제 모듈) */
.vd-examples__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.vd-examples__body .vd-field { margin-top: 10px; }
.vd-examples__body .vd-actions { margin-top: 10px; }

/* 모듈 등록·편집: 왼쪽 키워드·API 목록(keyword_palette.ejs) */
.vd-modform { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.vd-modform > * { min-width: 0; }
.vd-kwpal { position: sticky; top: calc(var(--header-full, var(--header-h)) + var(--s-4)); max-height: calc(100vh - var(--header-full, var(--header-h)) - var(--s-6)); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 12px; }
.vd-kwpal__head { display: grid; gap: 6px; margin-bottom: 8px; }
.vd-kwpal__search { width: 100%; }
.vd-kwpal__group { margin-top: 12px; }
.vd-kwpal__gh { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.vd-kwpal__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vd-kwpal__item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; }
.vd-kwpal__item.is-off { opacity: .55; }
.vd-kwpal__kw { all: unset; cursor: pointer; display: block; }
.vd-kwpal__kw:disabled { cursor: not-allowed; }
.vd-kwpal__kw code { font: 600 12.5px/1.4 var(--mono); color: var(--accent); word-break: break-all; }
.vd-kwpal__kw:hover code, .vd-kwpal__kw:focus-visible code { text-decoration: underline; }
.vd-kwpal__desc { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.vd-kwpal__meta { margin: 2px 0 0; }
.vd-kwpal__rule { margin-top: 12px; }
@media (max-width: 1200px) { .vd-modform { grid-template-columns: 1fr; } .vd-kwpal { position: static; max-height: 360px; } }

/* 모듈 편집: AI 정밀 검사 결과 */
.vd-aireview { margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2, var(--surface)); }
.vd-aireview__item--high b { color: var(--danger, #c0392b); }
.vd-aireview__item--medium b { color: var(--warn, #b7791f); }
.vd-danger-text { color: var(--danger, #c0392b); }

/* 사용 모델과 중단 시 대체(2026-09-30 모델 중단 대응) */
.vd-modelplan .vd-alert { margin-bottom: 10px; }
.vd-mplan td { vertical-align: top; }
.vd-mplan .vd-select { max-width: 260px; }
.vd-mplan__auto { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); }
.vd-mplan__tip { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--warn); font-weight: 600; }
.vd-mplan__tip .vd-ic { width: 16px; height: 16px; flex: none; }
.vd-mplan code { white-space: nowrap; }
.vd-mplan td:first-child { min-width: 120px; }

/* 모듈 입출력 상세 테스트 보고서(2026-09-30, views/studio/module_test_report.ejs · js/studio/module-test-report.js) */
.vd-mtr .vd-stack { display: grid; gap: var(--s-5); }
.vd-mtr__sec { display: grid; gap: 12px; }
.vd-mtr__sec > .vd-alert + .vd-alert { margin-top: 0; }
.vd-mtr__stats dd { font-size: 16px; }
.vd-mtr__live { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.vd-mtr__live .vd-ic { width: 16px; height: 16px; }
.vd-mtr__hint { font-weight: 600; }
.vd-mtr__io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .vd-mtr__io { grid-template-columns: 1fr; } }
.vd-mtr__code { display: grid; gap: 4px; margin: 6px 0; min-width: 0; }
.vd-mtr__code-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.vd-mtr__code-head .vd-muted { font-weight: 500; }
.vd-mtr__code-head .vd-btn { margin-left: auto; }
.vd-mtr__code .vd-pre { max-height: 360px; }
.vd-mtr__fold { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.vd-mtr__fold + .vd-mtr__fold { margin-top: 6px; }
.vd-mtr__fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; list-style: none; }
.vd-mtr__fold > summary::-webkit-details-marker { display: none; }
.vd-mtr__fold > summary::before { content: '▸'; color: var(--muted); font-size: 11px; }
.vd-mtr__fold[open] > summary::before { content: '▾'; }
.vd-mtr__fold-body { padding: 4px 12px 12px; min-width: 0; }
.vd-mtr__fold .vd-mtr__fold { background: var(--surface-2); }
.vd-mtr__timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vd-mtr__ev.is-error > .vd-mtr__fold { border-color: var(--danger); }
.vd-mtr__ev.is-warn > .vd-mtr__fold { border-color: var(--warn); }
.vd-mtr__t { font: 12px/1 var(--mono); color: var(--muted); min-width: 64px; }
.vd-mtr__title { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.vd-mtr__ms { font: 12px/1 var(--mono); color: var(--muted); }
.vd-mtr__bulk { justify-content: flex-end; }
.vd-mtr__tasks code { white-space: nowrap; }
