/* ① 시작·분석 설정·템플릿 미니. (studio.css 에서 옮김) */
/* ── ① 시작 ────────────────────────────────────────────── */
.home-head { margin: 26px auto 0; text-align: center; }
.home-head h1 { margin: 0; font-size: var(--fs-2xl); font-weight: var(--fw-black); line-height: var(--lh-tight); letter-spacing: -.04em; }
.home-head p { margin: 10px 0 0; color: var(--c-muted); font-size: var(--fs-md); }
.source-panel { max-width: 640px; margin: 26px auto 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); max-width: 440px; margin: 0 auto; }
.tab { height: 42px; border: 1px solid var(--c-line); border-radius: var(--r-btn); background: var(--c-surface); color: var(--c-text-soft); font-size: var(--fs-sm); font-weight: var(--fw-heavy); }
.tab.on { border-color: transparent; background: var(--c-brand-grad); color: #fff; }
.url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); margin-top: 10px; padding: 6px; border: 1px solid var(--c-line-strong); border-radius: var(--r-lg); background: rgba(255, 255, 255, .03); }
.url-input { min-width: 0; height: 48px; padding: 0 var(--sp-3); border: 0; background: transparent; color: var(--c-text); font-size: var(--fs-md); outline: none; }
.url-input::placeholder { color: var(--c-dim); }
.url-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--c-brand-1); border-radius: var(--r-btn); }
.upload-progress { width: 100%; height: 6px; margin-top: var(--sp-2); accent-color: var(--c-brand-2); }
.library { margin-top: 52px; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.project-library-empty { grid-column: 1 / -1; padding: 46px 20px; border: 1px dashed var(--c-line-strong); border-radius: var(--r-md); color: var(--c-dim); text-align: center; font-size: var(--fs-sm); }
.project-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-bg-raised); transition: border-color var(--m-fast), transform var(--m-fast); }
.project-card:hover { transform: translateY(-2px); border-color: var(--c-line-strong); }
.project-card--sample { border-color: rgba(255, 122, 61, .5); }
.project-card-visual { position: relative; aspect-ratio: 16 / 9; background: #000 var(--project-thumb, none) center / cover no-repeat; }
.project-card-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .7)); pointer-events: none; }
.project-card-duration { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 3px 6px; border-radius: 5px; background: rgba(0, 0, 0, .7); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.project-card-badge { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 4px 7px; border-radius: 5px; background: var(--c-brand-1); color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-black); }
.project-card-progress { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); background: rgba(9, 10, 12, .6); }
.project-card-spinner { width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, .28); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.project-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.project-card-state { color: var(--c-success); font-size: var(--fs-xs); font-weight: var(--fw-heavy); }
.project-card-state[data-state="analyzing"], .project-card-state[data-state="draft"] { color: var(--c-brand-3); }
.project-card-state[data-state="failed"], .project-card-state[data-state="stalled"] { color: var(--c-warning); }
.project-card h3 { overflow: hidden; margin: 0; font-size: var(--fs-md); font-weight: var(--fw-heavy); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.project-card-meta, .project-card-failure { margin: 0; color: var(--c-muted); font-size: var(--fs-xs); line-height: 1.5; }
.project-card-failure { color: var(--c-warning); }
.project-card .btn { width: 100%; margin-top: 4px; }

/* ── ① 분석 설정 ───────────────────────────────────────── */
.setup { max-width: 920px; margin: 0 auto; }
.source-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-5); align-items: center; margin-bottom: 30px; }
.source-thumb { aspect-ratio: 16 / 9; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: #111 center / cover no-repeat; }
.source-copy strong { display: block; font-size: 18px; font-weight: var(--fw-black); line-height: 1.35; }
.source-copy p { margin: 6px 0 0; color: var(--c-muted); font-size: var(--fs-sm); }
.source-license { font-size: var(--fs-xs) !important; }
.cc { color: var(--c-success); }
.license-unverified { color: var(--c-warning); }
.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.template { display: grid; gap: 6px; padding: var(--sp-2); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-bg-raised); text-align: left; }
.template:hover { border-color: var(--c-line-strong); }
.template.selected { border-color: var(--c-brand-line); box-shadow: inset 0 0 0 1px var(--c-brand-line); background: var(--c-brand-wash); }
.template-name { font-size: var(--fs-sm); font-weight: var(--fw-heavy); }
.template-note { color: var(--c-dim); font-size: var(--fs-xs); line-height: 1.4; }
.settings { display: grid; gap: var(--sp-4); margin-top: 28px; padding: var(--sp-5); border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-surface); }
.settings h2 { margin: 0; font-size: 17px; font-weight: var(--fw-black); }
.range-picker { display: grid; gap: var(--sp-2); padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.range-picker .help { margin: 0; }
.range-heading { display: flex; align-items: baseline; gap: 7px; font-size: var(--fs-sm); }
.range-heading span { color: var(--c-brand-2); font-size: var(--fs-xs); }
.range-values { display: flex; justify-content: space-between; color: var(--c-dim); font-size: var(--fs-xs); }
.range-values output { min-width: 55px; padding: 6px 10px; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); color: var(--c-text); text-align: center; font-variant-numeric: tabular-nums; }
.range-heat { position: relative; height: 56px; border-radius: var(--r-sm); background: var(--c-track-source); overflow: hidden; }
.range-heat i { position: absolute; bottom: 0; background: rgba(255, 122, 61, .55); border-radius: 2px 2px 0 0; }
.range-heat-label { position: absolute; top: 4px; left: 8px; z-index: 1; color: var(--c-muted); font-size: var(--fs-xs); }
.range-heat.range-heat-none { height: auto; background: none; }
.range-heat-none .range-heat-label { position: static; }
.analysis-range-bar { height: 44px; }
.analysis-range-bar .range-segment { cursor: grab; touch-action: none; }
.analysis-range-bar .range-handle { width: 14px; }
.analysis-range-bar .range-handle:focus-visible { outline: 2px solid var(--c-text); outline-offset: 1px; }
.usage-note { margin: var(--sp-3) 0 0; padding: 10px 14px; border: 1px dashed rgba(255, 181, 71, .45); border-radius: var(--r-btn); background: rgba(255, 181, 71, .06); color: var(--c-brand-3); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.rights-check { margin-top: var(--sp-4); padding: 12px 14px; border: 1px solid var(--c-line-strong); border-radius: var(--r-btn); background: var(--c-surface); }
.rights-check label { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-md); font-weight: var(--fw-bold); cursor: pointer; }
.rights-check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--c-brand-2); cursor: pointer; }
.rights-check p { margin: 6px 0 0 28px; color: var(--c-muted); font-size: var(--fs-xs); }
.rights-check.error-state { border-color: var(--c-warning); }
.action-row { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: 22px; }

/* ── 템플릿 미니(렌더러와 같은 그림) ───────────────────── */
.mini { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px; background: #111; container-type: inline-size; }
.mini-media { position: absolute; background: #6b7280 center / cover no-repeat; }
.mini-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
