/* ===== 테마 토큰 ===== */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-soft: #F3F8FD;
  --surface: #FFFFFF;
  --surface-2: #F6F9FC;
  --text: #13233A;
  --text-strong: #072B4A;
  --muted: #66768A;
  --border: #E2EAF2;
  --brand: #0D8CEE;
  --brand-2: #11C7AA;
  --brand-ink: #FFFFFF;
  --grad: linear-gradient(100deg, #0D8CEE 0%, #11C7AA 100%);
  --glow-1: rgba(13, 140, 238, .16);
  --glow-2: rgba(17, 199, 170, .14);
  --band: linear-gradient(120deg, #072B4A 0%, #0A4C7C 60%, #0C7B8F 100%);
  --danger: #D9364C;
  --danger-soft: #FDECEF;
  --success: #0FA88F;
  --shadow-sm: 0 1px 2px rgba(7, 43, 74, .06), 0 2px 8px rgba(7, 43, 74, .05);
  --shadow: 0 10px 30px -10px rgba(7, 43, 74, .18), 0 4px 10px -6px rgba(7, 43, 74, .10);
  --shadow-lg: 0 30px 60px -20px rgba(7, 43, 74, .28);
  --scene-sky: linear-gradient(180deg, #8FD3FF 0%, #CDEBFF 55%, #FFE3C2 100%);
  --scene-hill-back: #6CB8A8;
  --scene-hill-front: #3E8E7E;
  --radius: 0;
  --radius-sm: 0;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08131F;
  --bg-soft: #0C1B2B;
  --surface: #102236;
  --surface-2: #0D1D2F;
  --text: #DCE6F1;
  --text-strong: #F2F7FC;
  --muted: #8FA2B8;
  --border: #1D3550;
  --brand: #3AA6F7;
  --brand-2: #2ED8BC;
  --brand-ink: #04121F;
  --grad: linear-gradient(100deg, #3AA6F7 0%, #2ED8BC 100%);
  --glow-1: rgba(58, 166, 247, .18);
  --glow-2: rgba(46, 216, 188, .12);
  --band: linear-gradient(120deg, #0E3256 0%, #0C4A6E 55%, #0B6B73 100%);
  --danger: #FF6B81;
  --danger-soft: rgba(255, 107, 129, .12);
  --success: #2ED8BC;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  --scene-sky: linear-gradient(180deg, #1B2C55 0%, #3A3F78 55%, #B5677A 100%);
  --scene-hill-back: #23506A;
  --scene-hill-front: #163A4E;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08131F;
    --bg-soft: #0C1B2B;
    --surface: #102236;
    --surface-2: #0D1D2F;
    --text: #DCE6F1;
    --text-strong: #F2F7FC;
    --muted: #8FA2B8;
    --border: #1D3550;
    --brand: #3AA6F7;
    --brand-2: #2ED8BC;
    --brand-ink: #04121F;
    --grad: linear-gradient(100deg, #3AA6F7 0%, #2ED8BC 100%);
    --glow-1: rgba(58, 166, 247, .18);
    --glow-2: rgba(46, 216, 188, .12);
    --band: linear-gradient(120deg, #0E3256 0%, #0C4A6E 55%, #0B6B73 100%);
    --danger: #FF6B81;
    --danger-soft: rgba(255, 107, 129, .12);
    --success: #2ED8BC;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    --scene-sky: linear-gradient(180deg, #1B2C55 0%, #3A3F78 55%, #B5677A 100%);
    --scene-hill-back: #23506A;
    --scene-hill-front: #163A4E;
  }
}

/* ===== 기본 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--text-strong); margin: 0; line-height: 1.3; letter-spacing: -0.025em; font-weight: 600; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 0; }
[hidden] { display: none !important; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em;
  border-radius: 0;
  border: 1px solid transparent;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
:root[data-theme="dark"] .btn--primary { color: var(--brand-ink); }
.btn--ghost { background: var(--surface); color: var(--text-strong); border-color: var(--border); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--text-strong) 35%, var(--border)); }
.btn--light { background: #fff; color: #072B4A; }
.btn--light:hover { background: #EAF4FD; }
.btn--sm { padding: .55em 1.1em; font-size: .92rem; }
.btn--lg { padding: .95em 1.7em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.link-btn { margin-left: auto; background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; }

/* ===== 네비게이션 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); letter-spacing: -0.03em; }
.brand__mark { width: 30px; height: 30px; border-radius: 0; background: var(--grad); display: grid; place-items: center; }
.brand__mark svg { width: 24px; height: 24px; fill: #fff; }
.nav__links { display: flex; gap: 32px; margin-left: 32px; }
.nav__links a { color: var(--text); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav__links a:hover { color: var(--brand); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 0;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--brand); transform: rotate(-12deg); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--text-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ===== 히어로 ===== */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero__glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(40% 50% at 20% 20%, var(--glow-1), transparent 70%),
    radial-gradient(35% 45% at 85% 30%, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 85%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 600; margin: 0 0 22px; letter-spacing: -0.04em; line-height: 1.22; }
.hero__lead { font-size: 1.1rem; color: var(--muted); max-width: 30em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__visual { position: relative; padding: 28px 12px 36px; }
.player { position: relative; border-radius: 0; overflow: hidden; background: #0B1320; box-shadow: var(--shadow-lg); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); transform: rotate(-1.2deg); }
.player__scene, .preview__stage--demo { position: relative; aspect-ratio: 16 / 9; background: var(--scene-sky); overflow: hidden; }
.scene__sun { position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%; right: 16%; top: 16%; background: radial-gradient(circle, #FFF6D8 0 45%, #FFD27A 70%, transparent 72%); filter: blur(.3px); }
.scene__hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.scene__hill--back { bottom: -32%; height: 70%; background: var(--scene-hill-back); transform: translateX(18%); }
.scene__hill--front { bottom: -48%; height: 78%; background: var(--scene-hill-front); transform: translateX(-14%); }
.player__sub {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  width: 88%; margin: 0; text-align: center;
  font-size: clamp(1rem, 2.3vw, 1.45rem); line-height: 1.35; color: #fff;
  -webkit-text-stroke: 4px #000; paint-order: stroke fill;
  text-wrap: balance;
  transition: opacity .35s;
}
.player__sub.is-fading { opacity: 0; }
.player__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #0B1320; color: #9FB0C4; font-size: .8rem; font-variant-numeric: tabular-nums; }
.player__play svg { width: 16px; height: 16px; fill: #fff; }
.player__track { flex: 1; height: 4px; border-radius: 0; background: #24344A; overflow: hidden; }
.player__progress { display: block; height: 100%; width: 35%; background: var(--grad); animation: progress 12s linear infinite; }

.float-chip {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 0;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.3;
  animation: float 6s ease-in-out infinite;
}
.float-chip strong { display: block; color: var(--text-strong); }
.float-chip small { color: var(--muted); }
.float-chip--top { top: 0; left: -8px; }
.float-chip--bottom { bottom: 0; right: 0; animation-delay: -3s; }
.float-chip__icon { width: 38px; height: 38px; border-radius: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.float-chip__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.float-chip__icon--mic { background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2); }

.wave { position: absolute; left: 18%; bottom: 6px; display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.wave span { width: 4px; border-radius: 0; background: var(--grad); height: 30%; animation: wave 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s); opacity: .85; }

/* ===== 큰 숫자 (그라데이션은 여기에만) ===== */
.display { text-align: center; margin-bottom: 64px; }
.display__number {
  font-size: clamp(3.4rem, 10vw, 7.5rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.05em;
  background: linear-gradient(95deg, #476ADB 0%, #0D8CEE 35%, #11C7AA 75%, #6BD08A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.display__text { margin-top: 20px; color: var(--text); font-size: 1.1rem; line-height: 1.7; }

/* ===== 섹션 ===== */
.section { padding: 104px 0; }
.section--tight { padding: 40px 0 104px; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__head h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); font-weight: 600; letter-spacing: -0.035em; }
.section__head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature--reverse .feature__copy { order: 2; }
.feature h3 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 600; letter-spacing: -0.035em; margin: 0 0 18px; }
.feature p { color: var(--muted); font-size: 1.05rem; line-height: 1.8; max-width: 30em; }

.feature__visual { position: relative; }
.mock { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); padding: 28px; }

.mock--transcript .mock__wave { display: flex; gap: 4px; align-items: center; height: 56px; padding: 0 4px 20px; border-bottom: 1px dashed var(--border); margin-bottom: 18px; }
.mock--transcript .mock__wave span { flex: 1; border-radius: 0; background: var(--grad); opacity: .8; }
.mock--transcript ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mock--transcript li { display: flex; gap: 14px; align-items: baseline; padding: 12px 14px; border-radius: 0; background: var(--surface-2); }
.mock--transcript li.is-active { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.mock--transcript time { font-size: .8rem; color: var(--brand); font-variant-numeric: tabular-nums; font-weight: 500; }

.mock--style { display: grid; gap: 16px; }
.mock__preview { aspect-ratio: 16 / 7; border-radius: 0; background: var(--scene-sky); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; overflow: hidden; }
.mock__preview span { font-family: "Do Hyeon", sans-serif; font-size: 1.6rem; color: #FFF; -webkit-text-stroke: 3px #072B4A; paint-order: stroke fill; }
.mock__row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
.mock__row label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.mock__select { padding: 8px 14px; border-radius: 0; border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-family: "Do Hyeon", sans-serif; }
.mock__range { height: 6px; border-radius: 0; background: var(--border); position: relative; }
.mock__range i { position: absolute; inset: 0 auto 0 0; border-radius: 0; background: var(--grad); }
.mock__range i::after { content: ""; position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translateY(-50%); background: #fff; border: 3px solid var(--brand); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 0; background: var(--surface-2); border: 1px solid var(--border); width: max-content; }
.seg i { font-style: normal; padding: 4px 12px; border-radius: 0; font-size: .88rem; font-weight: 600; color: var(--muted); }
.seg i.is-on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.swatches { display: inline-flex; gap: 8px; align-items: center; }
.swatches i, .swatches button { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid var(--border); padding: 0; cursor: pointer; }
.swatches i.is-on, .swatches button.is-on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand); }

.mock--files { display: grid; gap: 14px; }
.file-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 0; border: 1px solid var(--border); background: var(--surface-2); }
.file-card strong { display: block; color: var(--text-strong); }
.file-card small { color: var(--muted); }
.file-card__icon { width: 48px; height: 48px; border-radius: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: #fff; flex: none; }
.file-card__icon--video { background: var(--grad); }
.file-card__icon--srt { background: linear-gradient(135deg, #7A5CFA, #C26BF0); }
.file-card__dl { margin-left: auto; width: 38px; height: 38px; border-radius: 0; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.file-card__dl svg { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* 사용 방법 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; }
.step__num { display: block; font-size: .95rem; font-weight: 500; color: var(--brand); margin-bottom: 40px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step p { color: var(--muted); }

/* 글꼴 */
.font-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.font-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 150px; padding: 22px 20px 18px; border-radius: 0;
  background: var(--surface); border: 1px solid var(--border);
}
.font-card__sample { font-size: 1.45rem; line-height: 1.3; color: var(--text-strong); }
.font-card__meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: .85rem; color: var(--text); }
.font-card__meta em { font-style: normal; color: var(--muted); white-space: nowrap; }

/* CTA */
.cta-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 56px 56px; border-radius: 0; background: var(--band); color: #C9DCEB;
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -0.035em; }
.cta-band p { margin-top: 10px; }
.cta-band .btn { position: relative; z-index: 1; }

/* 푸터 */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 28px; font-size: .93rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__brand p { color: var(--muted); margin-top: 12px; }
.footer__cols { display: flex; gap: 72px; }
.footer__cols div { display: grid; gap: 8px; align-content: start; }
.footer__cols h4 { font-size: .95rem; margin-bottom: 6px; }
.footer__cols a, .footer__cols span { color: var(--muted); }
.footer__cols a:hover { color: var(--brand); }
.footer__bottom { display: flex; justify-content: space-between; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); }

/* ===== 자막 만들기 화면 ===== */
.studio-head { padding: 48px 0 28px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.studio-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.035em; }
.studio-head p { color: var(--muted); margin-top: 10px; }

.studio { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; padding-bottom: 96px; }
.studio__progress { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card__head h2 { font-size: 1.1rem; }
.card__step { width: 26px; height: 26px; border-radius: 0; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); display: grid; place-items: center; font-weight: 600; font-size: .85rem; flex: none; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 36px 20px; border-radius: 0; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--border));
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  transition: border-color .2s, background-color .2s, transform .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone__icon { width: 52px; height: 52px; border-radius: 0; background: var(--grad); display: grid; place-items: center; margin-bottom: 8px; }
.dropzone__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dropzone strong { color: var(--text-strong); }
.dropzone small { color: var(--muted); }

.preview { margin-top: 18px; }
.preview__stage { position: relative; border-radius: 0; overflow: hidden; background: #000; margin-inline: auto; max-height: 62vh; aspect-ratio: 16 / 9; container-type: size; }
.preview__stage video { width: 100%; height: 100%; object-fit: contain; }
.preview__stage--demo { background: var(--scene-sky); }
.preview__sub {
  --size: 22; --ph: 100cqh;
  /* 글자 크기는 영상의 짧은 쪽 기준 (shared/styles.py font_scale과 같은 규칙) */
  --ref: min(100cqh, 100cqw);
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 92%; margin: 0; text-align: center; white-space: pre-line;
  font-size: calc(var(--ref) * var(--size) / 288);
  line-height: 1.25;
  -webkit-text-stroke: calc(var(--ref) * 4 / 288) var(--outline, #000);
  paint-order: stroke fill;
  color: var(--color, #fff);
  bottom: calc(var(--ph) * 30 / 288);
  transition: color .15s;
  pointer-events: none;
}
.preview__sub[data-pos="top"] { top: calc(var(--ph) * 30 / 288); bottom: auto; }
.preview__sub[data-pos="middle"] { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.preview--placeholder .hint { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.file-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.file-meta strong { color: var(--text-strong); }

.field { display: grid; gap: 8px; margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 500; color: var(--text-strong); font-size: .95rem; padding: 0; display: flex; justify-content: space-between; align-items: center; }
.field legend { margin-bottom: 8px; }
.field output { color: var(--brand); font-variant-numeric: tabular-nums; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

select, input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s;
}
select:focus, input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366768A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)) 0 / var(--fill, 25%) 100% no-repeat, var(--border); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: var(--shadow-sm); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }

.color-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
input[type="color"] { width: 44px; height: 44px; padding: 3px; border-radius: 0; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; flex: none; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 0; }
.color-field .swatches button { width: 24px; height: 24px; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; border-radius: 0; background: var(--surface-2); border: 1px solid var(--border); }
.field .segmented label { position: relative; display: block; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 9px 0; border-radius: 0; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.segmented input:checked + span { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

.form-note { color: var(--muted); font-size: .85rem; margin-top: 12px; text-align: center; }
.form-error { margin-top: 14px; padding: 12px 14px; border-radius: 0; background: var(--danger-soft); color: var(--danger); font-weight: 500; }

.elapsed { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.tracker { list-style: none; padding: 0; margin: 4px 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); }
.tracker li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: .92rem; text-align: center; }
.tracker li + li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.tracker__dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border); transition: all .3s; }
.tracker li.is-done .tracker__dot { background: var(--brand-2); border-color: var(--brand-2); }
.tracker li.is-done .tracker__dot::after { content: ""; position: absolute; left: 5px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tracker li.is-done + li::before, .tracker li.is-active + li::before { background: var(--brand-2); }
.tracker li.is-done + li.is-active::before { background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.tracker li.is-active { color: var(--text-strong); }
.tracker li.is-active .tracker__dot { border-color: var(--brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent); animation: pulse 1.6s infinite; }
.tracker li.is-failed .tracker__dot { border-color: var(--danger); background: var(--danger); }
.tracker li.is-failed { color: var(--danger); }

.upload-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--brand); }
.upload-bar__track { flex: 1; height: 10px; border-radius: 0; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.upload-bar__fill { height: 100%; width: 0; background: var(--grad); border-radius: 0; transition: width .2s; }
.status-msg { text-align: center; color: var(--text); font-weight: 500; min-height: 1.6em; }
.status-msg .spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; }

.result { margin-top: 22px; display: grid; gap: 16px; justify-items: center; }
.result video { width: 100%; max-height: 60vh; border-radius: 0; background: #000; }
.result__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.result--error p { width: 100%; padding: 16px; border-radius: 0; background: var(--danger-soft); color: var(--danger); font-weight: 600; text-align: center; }
#restart { margin-top: 18px; }

.field__hint { color: var(--muted); font-weight: 400; font-size: .82rem; }
.field__help { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.notice { width: 100%; padding: 12px 14px; background: var(--danger-soft); color: var(--danger); text-align: center; }

/* ===== 자막 수정 ===== */
.studio__editor { grid-column: 1 / -1; }
.studio__editor.is-locked .editor { opacity: .55; pointer-events: none; }
.editor__intro { color: var(--muted); margin: -8px 0 20px; }
.editor__status { margin-left: auto; color: var(--muted); font-size: .88rem; }
.editor { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.editor__preview .preview__stage { width: 100%; }
.editor__preview .hint { color: var(--muted); font-size: .85rem; margin-top: 10px; text-align: center; }
.editor__side { display: grid; gap: 10px; min-width: 0; }
.replace { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.replace input { padding: 9px 12px; }
.replace__result { min-height: 1.4em; color: var(--muted); font-size: .85rem; }
.cue-list { list-style: none; margin: 0; padding: 0; max-height: 56vh; overflow-y: auto; border: 1px solid var(--border); background: var(--surface-2); }
.cue { display: grid; grid-template-columns: 70px 1fr; align-items: center; border-bottom: 1px solid var(--border); }
.cue:last-child { border-bottom: 0; }
.cue.is-active { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.cue__time { height: 100%; border: 0; background: none; color: var(--brand); font: inherit; font-size: .8rem; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 0 0 12px; text-align: left; }
.cue__time:hover { text-decoration: underline; }
.cue__text { display: block; width: 100%; border: 0; background: transparent; padding: 11px 12px 11px 0; resize: none; overflow: hidden; line-height: 1.5; font: inherit; color: var(--text); }
.cue__text:focus { outline: none; }
.cue:focus-within { background: var(--surface); box-shadow: inset 3px 0 0 var(--brand-2); }
.editor__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 20px; }

@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .replace { grid-template-columns: 1fr 1fr; }
  .replace .btn { grid-column: 1 / -1; }
  .editor__actions .btn { flex: 1 1 100%; }
}

/* ===== 애니메이션 ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand-2) 0%, transparent); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes wave { 50% { height: 100%; } }
@keyframes progress { from { width: 0; } to { width: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== 반응형 ===== */
@media (max-width: 1000px) {
  .font-grid { grid-template-columns: repeat(3, 1fr); }
  .studio { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .hero { padding: 48px 0 72px; }
  .hero__inner, .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature--reverse .feature__copy { order: 0; }
  .feature + .feature { margin-top: 72px; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 40px 28px; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .font-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .float-chip { font-size: .8rem; padding: 8px 12px 8px 8px; }
  .float-chip__icon { width: 30px; height: 30px; }
  .footer__cols { gap: 40px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .tracker li { font-size: .78rem; }
}
