/* ============================================================
   YN 스튜디오 — Design System
   ============================================================ */
:root {
  --bg: #07080f;
  --bg-soft: #0d0f1c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0ff;
  --text-sub: #9aa0b8;
  --primary: #7c5cff;
  --primary-2: #38bdf8;
  --accent: #f472b6;
  --grad: linear-gradient(120deg, #7c5cff, #38bdf8 55%, #34d399);
  --grad-warm: linear-gradient(120deg, #f472b6, #fb923c);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --header-h: 68px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(15, 20, 60, 0.04);
  --surface-hover: rgba(15, 20, 60, 0.08);
  --border: rgba(15, 20, 60, 0.1);
  --text: #14162b;
  --text-sub: #5b6178;
  --shadow: 0 20px 60px rgba(20, 30, 90, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.68; }
:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
}
::selection {
  background: rgba(56, 189, 248, 0.32);
  color: var(--text);
}
.container { width: min(1180px, 92%); margin-inline: auto; }
.narrow { width: min(820px, 92%); }
.pc-only { display: inline; }

/* ---------- 배경 오브 ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.35; animation: drift 22s ease-in-out infinite alternate; }
.orb-1 { width: 520px; height: 520px; background: #5b3df0; top: -140px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: #0e7490; top: 30%; right: -150px; animation-delay: -7s; }
.orb-3 { width: 380px; height: 380px; background: #9d174d; bottom: -120px; left: 30%; animation-delay: -14s; opacity: 0.22; }
[data-theme="light"] .orb { opacity: 0.16; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.15); }
}
/* 모바일: 오브 애니메이션 정지 + blur 완화(GPU/배터리 비용 절감) */
@media (max-width: 640px) {
  .orb { animation: none; filter: blur(80px); opacity: 0.28; }
  .orb-3 { display: none; }
}
/* 모션 최소화 선호: 오브 정지 */
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}

/* ---------- 상단 배너 ---------- */
.top-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 9px 16px; font-size: 0.86rem;
  background: var(--grad); color: #fff;
  text-align: center;
}
.top-banner strong { font-weight: 700; }
.banner-close { background: none; border: 0; color: #fff; font-size: 0.9rem; opacity: 0.8; }
.banner-close:hover { opacity: 1; }

/* ---------- 헤더 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}
.nav { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--grad); color: #fff; border-radius: 10px;
  font-size: 0.82rem; font-weight: 900; letter-spacing: -0.5px;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.45);
}
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin-right: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border: 0; background: none;
  color: var(--text-sub); font-size: 0.95rem; font-weight: 500;
  border-radius: 10px; transition: color 0.2s, background 0.2s;
}
.nav-item:hover > .nav-link, .nav-link:focus-visible { color: var(--text); background: var(--surface); }
.chev { font-size: 0.7rem; transition: transform 0.25s; }
.nav-item:hover .chev { transform: rotate(180deg); }

/* 드롭다운 */
.nav-item { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  padding: 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 12px; border-radius: 12px; transition: background 0.18s;
}
.dropdown-item:hover,
.dropdown-item:focus-visible { background: var(--surface-hover); }
.di-icon { font-size: 1.4rem; }
.dropdown-item strong { display: block; font-size: 0.93rem; }
.dropdown-item small { color: var(--text-sub); font-size: 0.8rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 1rem; transition: transform 0.3s, background 0.2s;
  color: var(--text);
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.08); background: var(--surface-hover); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}
.btn:focus-visible,
.chip:focus-visible,
.avatar-play:focus-visible,
.carousel-dots button:focus-visible,
.theme-toggle:focus-visible,
.hamburger:focus-visible,
.banner-close:focus-visible,
.to-top:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.38);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(124, 92, 255, 0.5); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--text-sub); }
.btn-glass {
  background: var(--surface); color: var(--text);
  border-color: var(--border); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: var(--surface-hover); transform: translateY(-2px); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 히어로 ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding: 90px 0 70px;
}
.hero-badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-sub); margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; }
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.cursor-blink { color: var(--primary); animation: blink 1s steps(1) infinite; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { margin: 22px 0 30px; color: var(--text-sub); font-size: 1.08rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 46px; flex-wrap: wrap; }
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 0.83rem; color: var(--text-sub); }

/* ---------- 스튜디오 목업 ---------- */
.studio-mock {
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border);
  box-shadow: var(--shadow); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.5s;
  will-change: transform;
}
.studio-mock:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.mock-titlebar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--text-sub);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.mock-title { margin-left: 8px; }
.mock-body { display: flex; height: 250px; }
.mock-sidebar { display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; border-right: 1px solid var(--border); }
.mock-tool {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; background: var(--surface); font-size: 1.1rem;
  transition: background 0.2s;
}
.mock-tool.active { background: var(--grad); box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4); }
.mock-canvas {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 30%, rgba(124, 92, 255, 0.18), transparent 65%);
}
.mock-avatar { position: relative; }
.avatar-face {
  width: 110px; height: 110px; display: grid; place-items: center;
  font-size: 3.4rem; border-radius: 50%;
  background: linear-gradient(145deg, rgba(124,92,255,0.35), rgba(56,189,248,0.25));
  border: 2px solid rgba(124, 92, 255, 0.5);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.speaking-waves { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.speaking-waves span { width: 3.5px; background: var(--grad); border-radius: 3px; animation: wave 0.9s ease-in-out infinite; }
.speaking-waves span:nth-child(1) { animation-delay: 0s; }
.speaking-waves span:nth-child(2) { animation-delay: 0.15s; }
.speaking-waves span:nth-child(3) { animation-delay: 0.3s; }
.speaking-waves span:nth-child(4) { animation-delay: 0.45s; }
.speaking-waves span:nth-child(5) { animation-delay: 0.6s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 17px; } }
.mock-caption { font-size: 0.85rem; padding: 6px 16px; border-radius: 999px; background: rgba(0,0,0,0.45); color: #fff; }
[data-theme="light"] .mock-caption { background: rgba(20,22,43,0.75); }
.mock-timeline { position: relative; padding: 12px 14px 16px; border-top: 1px solid var(--border); display: grid; gap: 7px; }
.track { display: flex; gap: 6px; }
.clip {
  display: inline-block; padding: 3px 10px; border-radius: 7px;
  font-size: 0.68rem; color: #fff; overflow: hidden; white-space: nowrap;
}
.clip-a { background: linear-gradient(90deg, #7c5cff, #6d4de0); }
.clip-b { background: linear-gradient(90deg, #38bdf8, #2ba3d8); }
.clip-c { background: linear-gradient(90deg, #34d399, #26b57e); }
.clip-d { background: linear-gradient(90deg, #f472b6, #db5a9d); }
.playhead {
  position: absolute; top: 6px; bottom: 8px; left: 30%;
  width: 2px; background: #ff5f57; border-radius: 2px;
  animation: scrub 7s linear infinite;
}
@keyframes scrub { from { left: 5%; } to { left: 92%; } }

/* ---------- 로고 캐러셀 ---------- */
.logos { padding: 34px 0 56px; overflow: hidden; }
.logos-label { text-align: center; color: var(--text-sub); font-size: 0.88rem; margin-bottom: 26px; }
.logos-track { mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.logos-row { display: flex; gap: 64px; width: max-content; animation: marquee 26s linear infinite; }
.logos-row span { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.06em; color: var(--text-sub); opacity: 0.65; }
.logos-track:hover .logos-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 공통 섹션 ---------- */
.section { padding: 88px 0; }
.section-head { text-align: center; margin-bottom: 52px; }
.eyebrow {
  display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--primary-2); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin-top: 14px; color: var(--text-sub); font-size: 1.02rem; }

/* 스크롤 리빌 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 기능 그리드 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
  position: relative; overflow: hidden;
}
.glow-hover::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 92, 255, 0.14), transparent 45%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.glow-hover:hover::before { opacity: 1; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, 0.45); }
.fc-icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem;
  border-radius: 14px; background: var(--surface-hover); margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.14rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-sub); font-size: 0.93rem; margin-bottom: 16px; }
.fc-link { font-size: 0.9rem; font-weight: 600; color: var(--primary-2); }
.fc-link:hover { text-decoration: underline; }

/* ---------- 아바타 갤러리 ---------- */
.avatar-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  padding: 8px 20px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-sub);
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--text-sub); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35); }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.avatar-card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, opacity 0.35s, scale 0.35s;
}
.avatar-play:disabled:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.avatar-card.hide { display: none; }
.avatar-card:hover { transform: translateY(-6px); border-color: rgba(56, 189, 248, 0.5); }
.avatar-thumb { height: 170px; display: grid; place-items: center; font-size: 4rem; }
.grad-1 { background: linear-gradient(145deg, #4c3a9e, #7c5cff44); }
.grad-2 { background: linear-gradient(145deg, #0e4f6e, #38bdf844); }
.grad-3 { background: linear-gradient(145deg, #14532d, #34d39944); }
.grad-4 { background: linear-gradient(145deg, #831843, #f472b644); }
.grad-5 { background: linear-gradient(145deg, #713f12, #fb923c44); }
.grad-6 { background: linear-gradient(145deg, #1e3a8a, #60a5fa44); }
.grad-7 { background: linear-gradient(145deg, #3f6212, #a3e63544); }
.grad-8 { background: linear-gradient(145deg, #581c87, #c084fc44); }
.avatar-meta { padding: 14px 16px 4px; }
.avatar-meta strong { display: block; font-size: 1rem; }
.avatar-meta span { font-size: 0.8rem; color: var(--text-sub); }
.avatar-play {
  margin: 10px 16px 16px; padding: 7px 14px; width: calc(100% - 32px);
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 0.82rem; transition: all 0.2s;
}
.avatar-play:hover { background: var(--grad); border-color: transparent; color: #fff; }

/* ---------- 라이브 스튜디오 데모 ---------- */
.studio-demo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  padding: 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--border);
}
.sd-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-sub); margin-bottom: 8px; }
.sd-label span { color: var(--primary-2); }
#scriptInput {
  width: 100%; resize: vertical; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 0.95rem; line-height: 1.6;
  transition: border-color 0.2s;
}
#scriptInput:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18); }
.sd-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin: 18px 0; }
#voiceSelect {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 0.88rem;
}
#voiceSelect:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
#rateRange { width: 100%; accent-color: var(--primary); margin-top: 12px; }
.sd-actions { display: flex; gap: 12px; }
.sd-hint { margin-top: 14px; font-size: 0.78rem; color: var(--text-sub); }
.sd-stage {
  height: 100%; min-height: 320px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 25%, rgba(56, 189, 248, 0.14), transparent 60%), var(--bg-soft);
  border: 1px solid var(--border);
}
.sd-avatar {
  width: 130px; height: 130px; display: grid; place-items: center; font-size: 4rem;
  border-radius: 50%; border: 3px solid rgba(124, 92, 255, 0.4);
  background: linear-gradient(145deg, rgba(124,92,255,0.3), rgba(56,189,248,0.2));
  transition: transform 0.3s, box-shadow 0.3s;
}
.sd-stage.speaking .sd-avatar {
  animation: pulse-ring 1.4s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.5);
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.45); }
  100% { box-shadow: 0 0 0 26px rgba(124, 92, 255, 0); }
}
.sd-waves { display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.sd-waves span { width: 4px; height: 5px; background: var(--grad); border-radius: 4px; transition: height 0.2s; }
.sd-stage.speaking .sd-waves span { animation: wave 0.8s ease-in-out infinite; }
.sd-stage.speaking .sd-waves span:nth-child(2n) { animation-delay: 0.2s; }
.sd-stage.speaking .sd-waves span:nth-child(3n) { animation-delay: 0.4s; }
.sd-subtitle {
  max-width: 85%; text-align: center; font-size: 0.92rem;
  padding: 8px 20px; border-radius: 999px;
  background: var(--surface-hover); color: var(--text-sub);
  transition: color 0.3s;
  overflow-wrap: anywhere;
}
.sd-stage.speaking .sd-subtitle { color: var(--text); }

/* ---------- 스플릿 섹션 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 58px; align-items: center; }
.split-rev .split-text { order: 2; }
.split-rev .split-visual { order: 1; }
.split-text h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: 10px 0 16px; letter-spacing: -0.02em; }
.split-text > p { color: var(--text-sub); margin-bottom: 22px; }
.check-list { list-style: none; display: grid; gap: 10px; margin-bottom: 28px; }
.check-list li { color: var(--text-sub); font-size: 0.96rem; }

/* 더빙 카드 */
.dub-card {
  display: grid; gap: 10px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.dub-lang {
  padding: 14px 18px; border-radius: 13px; font-size: 0.95rem; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--border);
  transition: all 0.4s; cursor: default;
}
.dub-lang em { display: block; font-style: normal; font-weight: 400; font-size: 0.84rem; color: var(--text-sub); margin-top: 3px; }
.dub-lang.active {
  border-color: rgba(124, 92, 255, 0.6);
  background: linear-gradient(120deg, rgba(124,92,255,0.16), rgba(56,189,248,0.1));
  transform: scale(1.03);
}

/* 챗 목업 */
.chat-mock {
  padding: 24px; border-radius: var(--radius); display: grid; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.chat-msg { display: flex; gap: 10px; align-items: flex-end; }
.chat-msg p {
  padding: 11px 16px; border-radius: 16px; font-size: 0.9rem; max-width: 80%;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user p { background: var(--grad); color: #fff; border: 0; border-bottom-right-radius: 4px; }
.chat-msg.bot p { border-bottom-left-radius: 4px; }
.chat-avatar { font-size: 1.5rem; }
.chat-typing { display: flex; gap: 4px; padding-left: 36px; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-sub);
  animation: typing 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- 템플릿 ---------- */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.template-card {
  border-radius: var(--radius); overflow: hidden; padding-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.template-card:hover { transform: translateY(-6px) scale(1.01); border-color: rgba(124, 92, 255, 0.4); }
.tpl-thumb { height: 150px; display: grid; place-items: center; margin-bottom: 14px; }
.tpl-thumb span { font-size: 3rem; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.3)); transition: transform 0.3s; }
.template-card:hover .tpl-thumb span { transform: scale(1.18) rotate(-4deg); }
.template-card strong { display: block; padding: 0 18px; font-size: 1rem; }
.template-card > span { display: block; padding: 2px 18px 0; font-size: 0.8rem; color: var(--text-sub); }

/* ---------- 요금제 ---------- */
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; font-size: 0.95rem; }
.save-badge {
  font-style: normal; font-size: 0.72rem; font-weight: 700; padding: 3px 8px;
  border-radius: 999px; background: rgba(52, 211, 153, 0.16); color: #34d399;
  margin-left: 4px;
}
.switch { position: relative; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch input:focus-visible + .slider {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
}
.slider {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface-hover); border: 1px solid var(--border); transition: 0.3s;
}
.slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.switch input:checked + .slider { background: var(--grad); border-color: transparent; }
.switch input:checked + .slider::before { transform: translateX(24px); }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.price-card:hover,
.price-card:focus-within { transform: translateY(-6px); border-color: rgba(56, 189, 248, 0.42); }
.price-card.featured {
  border-color: rgba(124, 92, 255, 0.65);
  background: linear-gradient(160deg, rgba(124,92,255,0.14), rgba(56,189,248,0.05));
  box-shadow: 0 20px 50px rgba(124, 92, 255, 0.22);
}
.best-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 5px 16px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: var(--grad); color: #fff; white-space: nowrap;
}
.price-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.price strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.price span { color: var(--text-sub); font-size: 0.85rem; }
.price-desc { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 20px; }
.price-card ul { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; flex: 1; }
.price-card li { font-size: 0.88rem; color: var(--text-sub); }

/* ---------- 비교표 ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.compare-wrap:focus-within { border-color: rgba(56, 189, 248, 0.42); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 620px; }
.compare-table th, .compare-table td { padding: 15px 20px; text-align: center; border-bottom: 1px solid var(--border); }
.compare-table td:first-child, .compare-table th:first-child { text-align: left; font-weight: 600; }
.compare-table thead th { background: var(--surface); font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td { color: var(--text-sub); }
.compare-table td:first-child { color: var(--text); }
.yn-col {
  background: linear-gradient(180deg, rgba(124,92,255,0.12), rgba(56,189,248,0.06)) !important;
  color: var(--text) !important; font-weight: 700;
}

/* ---------- 후기 캐러셀 ---------- */
.review-carousel { overflow: hidden; }
.review-track {
  display: flex; gap: 20px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.review-card {
  flex: 0 0 calc((100% - 40px) / 3);
  padding: 28px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  min-height: 228px;
}
.stars { color: #fbbf24; letter-spacing: 2px; margin-bottom: 14px; }
.review-card p { font-size: 0.95rem; margin-bottom: 18px; }
.review-card footer { font-size: 0.83rem; color: var(--text-sub); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 999px; border: 0;
  background: var(--surface-hover); transition: all 0.3s; padding: 0;
}
.carousel-dots button.active { width: 26px; background: var(--grad); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); overflow: hidden;
  transition: border-color 0.25s;
}
.faq-item[open] { border-color: rgba(124, 92, 255, 0.5); }
.faq-item:hover { border-color: rgba(56, 189, 248, 0.32); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 0.98rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { font-size: 1.2rem; color: var(--primary-2); transition: transform 0.3s; flex-shrink: 0; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--text-sub); font-size: 0.93rem; }

/* ---------- 최종 CTA ---------- */
.final-cta {
  margin: 40px 0 0; padding: 96px 0; text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 92, 255, 0.22), transparent),
    var(--bg-soft);
  border-top: 1px solid var(--border);
}
.final-cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.02em; }
.final-cta p { margin: 16px 0 30px; color: var(--text-sub); font-size: 1.05rem; }

/* ---------- 푸터 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; margin-bottom: 48px; }
.footer-brand p { margin: 16px 0 20px; color: var(--text-sub); font-size: 0.9rem; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  font-size: 0.85rem; font-weight: 700; transition: all 0.2s;
}
.socials a:hover { background: var(--grad); border-color: transparent; color: #fff; transform: translateY(-2px); }
.footer-col h4 { font-size: 0.86rem; margin-bottom: 16px; color: var(--text); }
.footer-col a { display: block; padding: 5px 0; font-size: 0.88rem; color: var(--text-sub); transition: color 0.2s; }
.footer-col a:hover,
.footer-col a:focus-visible { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-sub);
}
.footer-legal { display: flex; gap: 20px; align-items: center; }
.footer-legal a:hover { color: var(--text); }
.cert { opacity: 0.7; }

/* ---------- 맨 위로 ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.1rem;
  backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--grad); color: #fff; border-color: transparent; }

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-visual { max-width: 640px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .avatar-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .review-card { flex-basis: calc((100% - 20px) / 2); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .pc-only { display: none; }
  .nav-menu {
    position: fixed; inset: var(--mobile-menu-top, var(--header-h)) 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100dvh - var(--mobile-menu-top, var(--header-h)));
    overflow-y: auto;
    padding: 16px; margin: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all 0.3s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { width: 100%; justify-content: space-between; padding: 13px 14px; }
  .dropdown {
    position: static; min-width: 0; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; background: transparent; padding: 0 0 6px 12px;
    display: none;
  }
  .nav-item.expanded .dropdown { display: block; }
  .hamburger { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .split, .studio-demo { grid-template-columns: 1fr; }
  .split-rev .split-text { order: 1; }
  .split-rev .split-visual { order: 2; }
  .sd-row { grid-template-columns: 1fr; }
  .feature-grid, .template-grid { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .review-card { flex-basis: 100%; }
  .hero-stats { gap: 24px; }
  .hero-cta .btn { flex: 1 1 220px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .top-banner { font-size: 0.76rem; }
  .section { padding: 60px 0; }
}

@media (max-width: 520px) {
  .container,
  .narrow { width: min(100% - 32px, 1180px); }
  .top-banner { align-items: flex-start; justify-content: space-between; gap: 10px; }
  .nav { gap: 12px; }
  .logo-text { display: none; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-primary { display: none; }
  .hero { padding-top: 42px; gap: 34px; }
  .hero-title { font-size: clamp(2rem, 12vw, 2.7rem); }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .studio-mock { transform: none; }
  .mock-body { height: 220px; }
  .mock-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .avatar-grid { grid-template-columns: 1fr; }
  .studio-demo { padding: 20px; border-radius: 18px; }
  .sd-actions { flex-direction: column; }
  .sd-actions .btn { width: 100%; }
  .dub-card,
  .chat-mock { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-legal { align-items: flex-start; flex-direction: column; gap: 10px; }
  .to-top { right: 18px; bottom: 18px; }
}

/* ============================================================
   확장 기능 스타일 (AI 툴 · 편집 스위트 · 솔루션 · 모달 · 토스트)
   ============================================================ */

/* ---------- 아바타 확장 카드 ---------- */
.avatar-extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.extra-card {
  padding: 26px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.extra-card:hover { transform: translateY(-5px); border-color: rgba(124, 92, 255, 0.45); }
.extra-card h3 { font-size: 1.06rem; margin: 16px 0 8px; }
.extra-card p { font-size: 0.88rem; color: var(--text-sub); }
.multi-scene {
  position: relative; height: 110px; border-radius: 14px;
  background: radial-gradient(circle at 50% 20%, rgba(124,92,255,0.16), transparent 70%), var(--bg-soft);
  border: 1px solid var(--border); overflow: hidden;
}
.ms-avatar { position: absolute; bottom: 8px; font-size: 2.4rem; }
.ms-a { left: 22%; animation: ms-talk-a 5s ease-in-out infinite; }
.ms-b { right: 22%; animation: ms-talk-b 5s ease-in-out infinite; }
@keyframes ms-talk-a { 0%, 45%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.08); } }
@keyframes ms-talk-b { 0%, 50%, 100% { transform: scale(1); } 60%, 85% { transform: scale(1.08); } }
.ms-bubble {
  position: absolute; top: 12px; padding: 4px 10px; font-size: 0.66rem;
  border-radius: 999px; background: var(--surface-hover); border: 1px solid var(--border);
  opacity: 0; animation: bubble-pop 5s ease-in-out infinite;
}
.ms-bubble-a { left: 8%; }
.ms-bubble-b { right: 6%; animation-delay: 2.5s; }
@keyframes bubble-pop { 5%, 40% { opacity: 1; } 0%, 50%, 100% { opacity: 0; } }
.gesture-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 110px; }
.gesture-chip {
  padding: 8px 14px; border-radius: 999px; font-size: 0.82rem;
  background: var(--bg-soft); border: 1px solid var(--border);
  animation: chip-glow 3.5s ease-in-out infinite;
}
.gesture-chip:nth-child(2) { animation-delay: 0.7s; }
.gesture-chip:nth-child(3) { animation-delay: 1.4s; }
.gesture-chip:nth-child(4) { animation-delay: 2.1s; }
.gesture-chip:nth-child(5) { animation-delay: 2.8s; }
@keyframes chip-glow { 0%, 100% { border-color: var(--border); } 50% { border-color: rgba(124,92,255,0.7); box-shadow: 0 0 14px rgba(124,92,255,0.25); } }
.photo-flow { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 110px; flex-wrap: wrap; }
.pf-step { padding: 9px 13px; border-radius: 12px; font-size: 0.8rem; background: var(--bg-soft); border: 1px solid var(--border); }
.pf-arrow { color: var(--primary-2); font-weight: 700; }

/* ---------- AI 툴 체험존 ---------- */
.tools-wrap {
  border-radius: 22px; border: 1px solid var(--border);
  background: var(--surface); padding: 26px; overflow: hidden;
}
.tool-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tool-tab {
  padding: 10px 18px; border-radius: 12px; font-size: 0.92rem; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-sub);
  transition: all 0.2s;
}
.tool-tab:hover { color: var(--text); border-color: var(--text-sub); }
.tool-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(124,92,255,0.35); }
.tool-panel { display: none; grid-template-columns: 1fr 1.2fr; gap: 26px; }
.tool-panel.active { display: grid; }
.tp-left { display: flex; flex-direction: column; gap: 8px; }
.tp-left input[type="text"], .tp-left select, .tp-left textarea {
  width: 100%; padding: 11px 14px; margin-bottom: 10px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 0.92rem;
}
.tp-left input:focus, .tp-left select:focus, .tp-left textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,0.18);
}
.tp-left .btn { margin-top: 6px; align-self: flex-start; }
.tp-right { display: flex; flex-direction: column; gap: 12px; }
.gen-output {
  flex: 1; min-height: 220px; padding: 18px 20px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 0.93rem; line-height: 1.8; color: var(--text-sub);
  white-space: pre-wrap; overflow-y: auto; max-height: 320px;
}
.gen-output.done { color: var(--text); }
.srt-output { font-family: "Cascadia Code", Consolas, monospace; font-size: 0.8rem; margin: 0; }
.tp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 7px 14px; font-size: 0.84rem; border-radius: 10px; }

.canvas-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.canvas-frame canvas { display: block; width: 100%; height: auto; background: var(--bg-soft); }
.canvas-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.9rem; color: var(--text-sub); background: var(--bg-soft);
  transition: opacity 0.4s;
}
.canvas-overlay.hidden { opacity: 0; pointer-events: none; }

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 150px; padding: 24px; text-align: center; cursor: pointer;
  border-radius: 14px; border: 2px dashed var(--border); background: var(--bg-soft);
  font-size: 0.9rem; transition: border-color 0.25s, background 0.25s;
}
.file-drop:hover { border-color: var(--primary); background: var(--surface-hover); }
.fd-icon { font-size: 2rem; }
.file-drop small { color: var(--text-sub); }
.detect-stage {
  min-height: 260px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg-soft); display: grid; place-items: center; padding: 24px;
}
.detect-idle { color: var(--text-sub); font-size: 0.92rem; }
.detect-progress { width: 100%; max-width: 340px; text-align: center; }
.dp-bar, .qp-bar {
  height: 8px; border-radius: 999px; background: var(--surface-hover); overflow: hidden; margin-bottom: 12px;
}
.dp-bar span, .qp-bar span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width 0.3s; }
.detect-progress p { font-size: 0.88rem; color: var(--text-sub); }
.detect-result { text-align: center; }
.dr-badge { font-size: 2.6rem; margin-bottom: 8px; }
.detect-result h3 { font-size: 1.15rem; margin-bottom: 6px; }
.detect-result p { font-size: 0.86rem; color: var(--text-sub); margin-bottom: 14px; }
.dr-metrics { list-style: none; display: grid; gap: 6px; text-align: left; font-size: 0.82rem; color: var(--text-sub); }
.dr-metrics li { display: flex; justify-content: space-between; gap: 18px; padding: 6px 12px; border-radius: 8px; background: var(--surface); }
.dr-metrics strong { color: var(--text); }

/* ---------- 편집 스위트 ---------- */
.editor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.editor-card {
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.25s;
}
.editor-card:hover { border-color: rgba(56,189,248,0.5); }
.editor-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.editor-card > p { font-size: 0.89rem; color: var(--text-sub); margin-bottom: 18px; }
.cut-track { display: flex; gap: 4px; margin-bottom: 12px; }
.cut-clip {
  padding: 8px 4px; border-radius: 8px; font-size: 0.68rem; text-align: center;
  color: #fff; overflow: hidden; white-space: nowrap;
  transition: flex 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.6s, padding 0.6s;
}
.cut-clip.speech { background: linear-gradient(90deg, #34d399, #26b57e); }
.cut-clip.silence { background: rgba(150,150,160,0.4); }
.cut-clip.filler { background: linear-gradient(90deg, #fb923c, #f97316); }
.cut-clip.removed { flex: 0 0 0 !important; opacity: 0; padding: 8px 0; }
.cut-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.84rem; color: var(--text-sub); }
.rec-demo { display: grid; gap: 12px; }
.rec-status { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-sub); }
.rec-dot.live { background: #ef4444; animation: rec-blink 1s steps(1) infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.brand-demo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; }
.brand-controls { display: grid; gap: 10px; font-size: 0.84rem; }
.brand-controls label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-sub); }
.brand-controls input[type="color"] {
  width: 46px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft); cursor: pointer; padding: 2px;
}
.brand-controls input[type="text"] {
  width: 120px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.84rem;
}
.brand-preview {
  --bk1: #7c5cff; --bk2: #38bdf8;
  border-radius: 14px; border: 1px solid var(--border); overflow: hidden;
  background: var(--bg-soft); padding-bottom: 16px; text-align: center;
}
.bp-bar { height: 8px; background: linear-gradient(90deg, var(--bk1), var(--bk2)); }
.bp-logo {
  display: inline-block; margin: 20px auto 10px; padding: 10px 22px; border-radius: 12px;
  font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--bk1), var(--bk2));
}
.bp-caption {
  margin: 6px 14px 0; padding: 7px 12px; border-radius: 999px; font-size: 0.78rem;
  color: #fff; background: var(--bk1);
}
.quiz-progress { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-sub); margin-bottom: 14px; }
.quiz-progress .qp-bar { flex: 1; margin: 0; }
.quiz-q { font-weight: 600; font-size: 0.95rem; margin-bottom: 12px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-opt {
  padding: 11px 16px; border-radius: 11px; text-align: left; font-size: 0.88rem;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  transition: all 0.2s;
}
.quiz-opt:hover { border-color: var(--primary); }
.quiz-opt.correct { border-color: #34d399; background: rgba(52,211,153,0.12); }
.quiz-opt.wrong { border-color: #ef4444; background: rgba(239,68,68,0.1); }
.quiz-result { text-align: center; padding: 18px 0 6px; }
.quiz-result h4 { font-size: 1.05rem; margin-bottom: 12px; }

/* ---------- 솔루션 ---------- */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution-card {
  padding: 28px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.solution-card:hover { transform: translateY(-5px); border-color: rgba(124,92,255,0.45); }
.sol-icon { font-size: 1.9rem; margin-bottom: 14px; }
.solution-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.solution-card p { font-size: 0.88rem; color: var(--text-sub); margin-bottom: 16px; }
.sol-tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: rgba(52,211,153,0.14); color: #34d399;
}

/* ---------- 고객 사례 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-card {
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.25s, border-color 0.25s;
}
.case-card:hover { transform: translateY(-5px); border-color: rgba(56,189,248,0.5); }
.case-head { display: flex; align-items: center; gap: 12px; }
.case-logo {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; font-weight: 900; font-size: 1.1rem; color: #fff;
}
.case-head strong { display: block; font-size: 0.98rem; }
.case-head span { font-size: 0.78rem; color: var(--text-sub); }
.case-card > p { font-size: 0.9rem; color: var(--text-sub); flex: 1; }
.case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case-metrics div { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); }
.case-metrics strong {
  display: block; font-size: 1.05rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.case-metrics span { font-size: 0.68rem; color: var(--text-sub); }

/* ---------- 통합 ---------- */
.integration-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 40px; }
.int-chip {
  padding: 11px 20px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.int-chip:hover { transform: translateY(-3px); border-color: rgba(124,92,255,0.55); }
.api-block { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--bg-soft); }
.api-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 600;
}
.api-head > div { display: flex; gap: 8px; }
.api-code {
  margin: 0; padding: 20px 22px; overflow-x: auto;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 0.82rem; line-height: 1.7;
  color: #a5f3fc;
}
[data-theme="light"] .api-code { color: #0e7490; }

/* ---------- 블로그 ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  border-radius: var(--radius); overflow: hidden; padding-bottom: 18px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.blog-card:hover { transform: translateY(-5px); border-color: rgba(124,92,255,0.45); }
.blog-thumb { height: 130px; display: grid; place-items: center; font-size: 2.6rem; margin-bottom: 14px; }
.blog-cat {
  display: inline-block; margin: 0 18px 8px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; background: rgba(124,92,255,0.16); color: var(--primary-2);
}
.blog-card h3 { padding: 0 18px; font-size: 0.98rem; line-height: 1.5; margin-bottom: 10px; }
.blog-meta { display: block; padding: 0 18px; font-size: 0.76rem; color: var(--text-sub); }

/* ---------- 캐러셀 화살표 ---------- */
.review-carousel { position: relative; }
.carousel-arrow {
  position: absolute; top: 42%; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-size: 1rem; box-shadow: var(--shadow);
  transition: background 0.2s, transform 0.2s;
}
.carousel-arrow:hover { background: var(--surface-hover); transform: scale(1.08); }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }

/* ---------- 모달 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(4, 5, 12, 0.72); backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease;
}
/* hidden 속성이 붙으면 반드시 숨긴다 (display:grid 가 [hidden] 기본값을 덮는 문제 방지) */
.modal-backdrop[hidden] { display: none !important; }
@keyframes fade-in { from { opacity: 0; } }
.modal {
  position: relative; width: min(460px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 34px 30px 26px; border-radius: 22px;
  background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: modal-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-wide { width: min(640px, 100%); }
.modal-scroll { width: min(560px, 100%); }
@keyframes modal-pop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 0.85rem; transition: background 0.2s;
}
.modal-close:hover { background: var(--surface-hover); }
.modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.modal-sub { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 22px; }
.modal-note { margin-top: 18px; font-size: 0.75rem; color: var(--text-sub); text-align: center; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; padding: 5px; border-radius: 12px; background: var(--surface); }
.auth-tab {
  flex: 1; padding: 9px; border-radius: 9px; border: 0; background: none;
  font-size: 0.9rem; font-weight: 600; color: var(--text-sub); transition: all 0.2s;
}
.auth-tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(124,92,255,0.35); }
.form-field { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 0.93rem; transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,0.18);
}
.form-field.invalid input, .form-field.invalid textarea { border-color: #ef4444; }
.field-error { display: block; min-height: 16px; font-size: 0.74rem; color: #f87171; margin-top: 4px; }
.auth-success { text-align: center; padding: 26px 0 10px; }
.as-icon { font-size: 3rem; margin-bottom: 12px; }
.auth-success h3 { font-size: 1.2rem; margin-bottom: 8px; }
.auth-success p { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 22px; }

.demo-player { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.dp-screen {
  position: relative; height: 260px;
  background: radial-gradient(circle at 50% 30%, rgba(124,92,255,0.2), transparent 65%), var(--bg);
}
.dp-scene {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 20px; opacity: 0; transform: translateX(30px); transition: all 0.55s ease;
  pointer-events: none;
}
.dp-scene.active { opacity: 1; transform: none; }
.dp-emoji { font-size: 3.2rem; margin-bottom: 6px; }
.dp-scene h4 { font-size: 1.15rem; }
.dp-scene p { font-size: 0.88rem; color: var(--text-sub); }
.dp-controls {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-soft);
}
.dp-progress { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-hover); overflow: hidden; }
.dp-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.2s linear; }
.dp-time { font-size: 0.76rem; color: var(--text-sub); font-variant-numeric: tabular-nums; }

.api-doc h4 { font-size: 0.92rem; margin: 18px 0 8px; }
.api-doc pre {
  margin: 0; padding: 12px 16px; border-radius: 10px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border);
  font-family: "Cascadia Code", Consolas, monospace; font-size: 0.78rem; line-height: 1.6;
}
.api-list { list-style: none; display: grid; gap: 8px; font-size: 0.85rem; color: var(--text-sub); }
.api-list code {
  padding: 2px 8px; border-radius: 6px; background: var(--surface);
  font-size: 0.78rem; color: var(--primary-2); margin-right: 6px;
}
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.about-stats div { text-align: center; padding: 14px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.about-stats strong { display: block; font-size: 0.98rem; font-weight: 800; }
.about-stats span { font-size: 0.7rem; color: var(--text-sub); }
.about-desc { font-size: 0.9rem; color: var(--text-sub); line-height: 1.8; }
.legal-body h4 { font-size: 0.95rem; margin: 18px 0 6px; }
.legal-body p { font-size: 0.87rem; color: var(--text-sub); line-height: 1.8; }

/* ---------- 토스트 ---------- */
.toast-wrap {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: grid; gap: 10px; width: min(420px, 90vw);
  pointer-events: none;
}
.toast {
  padding: 13px 20px; border-radius: 14px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 0.9rem; animation: toast-in 0.35s cubic-bezier(0.22,1,0.36,1);
}
.toast.out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- 푸터 버튼 링크화 ---------- */
.footer-col button, .footer-legal button {
  display: block; padding: 5px 0; border: 0; background: none; text-align: left;
  font-family: inherit; font-size: 0.88rem; color: var(--text-sub); transition: color 0.2s;
}
.footer-col button:hover, .footer-legal button:hover { color: var(--text); }
.footer-legal button { display: inline; padding: 0; }
.socials a, .socials button {
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 0.85rem; font-weight: 700; transition: all 0.2s;
}
.socials a:hover, .socials button:hover { background: var(--grad); border-color: transparent; color: #fff; transform: translateY(-2px); }

/* ---------- TTS 미지원 안내 ---------- */
.tts-unsupported {
  padding: 10px 14px; border-radius: 10px; font-size: 0.82rem;
  background: rgba(251, 146, 60, 0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.3);
}

/* ---------- 확장 반응형 ---------- */
@media (max-width: 1024px) {
  .avatar-extras, .solution-grid, .case-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .avatar-extras, .solution-grid, .case-grid, .blog-grid { grid-template-columns: 1fr; }
  .tool-panel.active { grid-template-columns: 1fr; }
  .brand-demo { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .carousel-prev { left: 2px; }
  .carousel-next { right: 2px; }
  .modal { padding: 28px 20px 22px; }
}

/* ---------- 언어 선택 ---------- */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 0.84rem; font-weight: 600; transition: background 0.2s;
}
.lang-btn:hover { background: var(--surface-hover); }
/* 헤더 매거진(블로그) pill */
.blog-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-size: 0.84rem; font-weight: 700; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.blog-pill:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); transform: translateY(-1px); }
.blog-pill .icon { width: 15px; height: 15px; }
@media (max-width: 640px) { .blog-pill span { display: none; } .blog-pill { padding: 8px 10px; } }
.lang-btn .chev { font-size: 0.62rem; transition: transform 0.25s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 120;
  min-width: 200px; max-height: 340px; overflow-y: auto;
  margin: 0; padding: 8px; list-style: none;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg-soft); box-shadow: var(--shadow);
}
.lang-menu li { margin: 0; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; border-radius: 9px; background: none;
  color: var(--text); font-family: inherit; font-size: 0.88rem; text-align: left;
  transition: background 0.15s;
}
.lang-menu button:hover { background: var(--surface-hover); }
.lang-menu button.active { background: var(--grad); color: #fff; }
.lang-menu .lm-flag { font-size: 1.05rem; }
.lang-menu .lm-en { margin-left: auto; font-size: 0.72rem; opacity: 0.65; }

/* ---------- 플랜 추천 마법사 ---------- */
.reco-btn { margin-top: 18px; }
.reco-result { text-align: center; padding: 14px 0 4px; }
.reco-result h3 {
  font-size: 1.5rem; font-weight: 800; margin: 6px 0 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.reco-result p { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 20px; }
.reco-actions { justify-content: center; }

/* ---------- RTL (아랍어) ---------- */
[dir="rtl"] body, [dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-menu { margin-right: 0; margin-left: auto; }
[dir="rtl"] .dropdown { left: auto; right: 0; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }
[dir="rtl"] .quiz-opt, [dir="rtl"] .lang-menu button, [dir="rtl"] .footer-col button { text-align: right; }
[dir="rtl"] .to-top { right: auto; left: 26px; }
[dir="rtl"] .check-list li, [dir="rtl"] .price-card li { direction: rtl; }

@media (max-width: 768px) {
  .lang-btn { padding: 7px 9px; }
  .lang-btn #langCur { display: none; }
}

/* ============================================================
   프로덕션 보강 (스크롤 진행바 · 스튜디오 비율 · 아바타 모달 · 쿠키)
   ============================================================ */

/* 앵커 스크롤 오프셋 — 스티키 헤더가 섹션 상단을 가리지 않게 */
:root { --anchor-offset: 88px; }
section[id], main [id] { scroll-margin-top: var(--anchor-offset); }

/* 스크롤 진행바 */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  z-index: 150; background: var(--grad); border-radius: 0 3px 3px 0;
  transition: width 0.1s linear; pointer-events: none;
}

/* 라이브 스튜디오: 화면 비율 */
.ratio-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.ratio-tab {
  flex: 1; padding: 9px 6px; border-radius: 10px; font-size: 0.88rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-sub);
  transition: all 0.2s; line-height: 1.2;
}
.ratio-tab small { display: block; font-size: 0.66rem; font-weight: 500; opacity: 0.8; margin-top: 2px; }
.ratio-tab:hover { color: var(--text); border-color: var(--text-sub); }
.ratio-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.sd-stage { transition: max-width 0.35s ease, aspect-ratio 0.35s ease; margin-inline: auto; width: 100%; }
.sd-stage.ratio-16x9 { aspect-ratio: 16 / 9; max-width: 100%; min-height: 0; }
.sd-stage.ratio-9x16 { aspect-ratio: 9 / 16; max-width: 300px; min-height: 0; }
.sd-stage.ratio-1x1  { aspect-ratio: 1 / 1; max-width: 420px; min-height: 0; }

/* 아바타 상세 모달 */
.avatar-card { cursor: pointer; }
.av-modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.av-modal-thumb {
  width: 76px; height: 76px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 2.6rem; border-radius: 18px;
  background: linear-gradient(145deg, rgba(124,92,255,0.35), rgba(56,189,248,0.25));
  border: 1px solid var(--border);
}
.av-modal-role { color: var(--text-sub); font-size: 0.9rem; margin-top: 2px; }
.av-modal-bio { font-size: 0.92rem; color: var(--text-sub); line-height: 1.7; margin-bottom: 16px; }
.av-modal-specs { list-style: none; display: grid; gap: 8px; margin-bottom: 22px; }
.av-modal-specs li {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 14px;
  border-radius: 10px; background: var(--surface); font-size: 0.85rem; color: var(--text-sub);
}
.av-modal-specs strong { color: var(--text); font-weight: 600; }

/* 쿠키 동의 배너 */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 180;
  width: min(420px, calc(100vw - 40px));
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px; border-radius: 16px;
  background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: cookie-in 0.4s cubic-bezier(0.22,1,0.36,1);
}
.cookie-banner p { font-size: 0.85rem; color: var(--text-sub); line-height: 1.6; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } }
[dir="rtl"] .cookie-banner { left: auto; right: 20px; }

@media (max-width: 480px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .ratio-tab small { display: none; }
}

/* ============================================================
   SVG 아이콘 시스템 (이모지 대체)
   ============================================================ */
.icon {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.icon-grad { stroke: url(#iconGrad); }

/* 기능 카드 아이콘 — 그라디언트 스트로크 */
.fc-icon .icon { width: 26px; height: 26px; }
.di-icon .icon { width: 22px; height: 22px; }
.sol-icon .icon { width: 30px; height: 30px; }
.tpl-thumb .icon { width: 46px; height: 46px; }
.blog-thumb .icon { width: 40px; height: 40px; }
.fc-link .icon, .btn .icon { width: 17px; height: 17px; }
.tool-tab .icon, .ratio-tab .icon { width: 16px; height: 16px; vertical-align: -0.18em; margin-right: 2px; }
.socials .icon { width: 17px; height: 17px; }
.int-chip .icon { width: 16px; height: 16px; vertical-align: -0.16em; margin-right: 5px; }
.gesture-chip .icon, .pf-step .icon, .check-list .icon { width: 15px; height: 15px; vertical-align: -0.15em; margin-right: 4px; }
.check-list .icon { stroke: #34d399; }

/* 아바타 포트레이트 (이모지 얼굴 대체) — 고정 정사각 크기 */
.av-portrait { width: 88px; height: 88px; display: block; }
.av-portrait .p-head { fill: rgba(255,255,255,0.92); }
.av-portrait .p-body { fill: rgba(255,255,255,0.72); }
.avatar-thumb, .sd-avatar, .avatar-face, .chat-avatar, .av-modal-thumb, .ms-avatar {
  display: grid; place-items: center;
}
.avatar-thumb .av-portrait { width: 92px; height: 92px; }
.sd-avatar .av-portrait { width: 72px; height: 72px; }
.avatar-face .av-portrait { width: 66px; height: 66px; }
.av-modal-thumb .av-portrait { width: 46px; height: 46px; }
.chat-avatar .av-portrait { width: 24px; height: 24px; }

/* 아바타 일러스트(플랫 캐릭터) — 컨테이너를 꽉 채워 원형으로 크롭 */
.av-illus { display: block; width: 100%; height: 100%; }
.avatar-thumb { overflow: hidden; }
.avatar-thumb .av-illus { border-radius: 0; }
.sd-avatar, .avatar-face, .chat-avatar, .av-modal-thumb, .ms-avatar { overflow: hidden; }
.sd-avatar .av-illus, .avatar-face .av-illus, .chat-avatar .av-illus,
.av-modal-thumb .av-illus, .ms-avatar .av-illus { border-radius: 50%; }
.mock-tool .icon { width: 18px; height: 18px; color: var(--text-sub); }
.mock-tool.active .icon { color: #fff; }
.clip .icon { width: 12px; height: 12px; vertical-align: -0.1em; margin-right: 3px; }

/* 컨테이너별 아이콘 크기 */
.dp-emoji .icon { width: 3rem; height: 3rem; }
.fd-icon .icon { width: 2rem; height: 2rem; }
.dr-badge .icon { width: 2.6rem; height: 2.6rem; stroke: #34d399; }
.as-icon .icon { width: 3rem; height: 3rem; }
.theme-toggle .icon { width: 18px; height: 18px; }
.to-top .icon { width: 18px; height: 18px; }
.modal-close .icon { width: 16px; height: 16px; }
.banner-close .icon { width: 13px; height: 13px; }
.lang-btn .icon { width: 15px; height: 15px; vertical-align: -0.18em; }
.hero-badge .icon { width: 14px; height: 14px; vertical-align: -0.12em; margin-right: 3px; }
.top-banner .icon { width: 15px; height: 15px; vertical-align: -0.16em; }
.avatar-play .icon { width: 13px; height: 13px; vertical-align: -0.12em; margin-right: 3px; }

/* 채팅 아바타 — 원형 그라디언트 */
.chat-avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(145deg, rgba(124,92,255,0.9), rgba(56,189,248,0.85));
}
/* 멀티 아바타 씬 — 원형 그라디언트 */
.ms-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(145deg, rgba(124,92,255,0.85), rgba(56,189,248,0.8));
}
.ms-avatar .av-portrait { width: 34px; height: 34px; }

/* 녹화 버튼 글리프 */
.rec-glyph {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: #ef4444; vertical-align: -0.05em; margin-right: 2px;
}
/* 비교표 마크 */
.cmp-yes .icon { width: 18px; height: 18px; stroke: #34d399; vertical-align: -0.22em; }
.cmp-no .icon { width: 16px; height: 16px; stroke: #ef4444; vertical-align: -0.2em; }
/* 리스트 체크 */
.check-list li .icon.ic-check, .price-card li .icon.ic-check { stroke: #34d399; vertical-align: -0.16em; margin-right: 4px; }

/* ============================================================
   추천 보강 (접근성 · ROI 계산기 · 뉴스레터)
   ============================================================ */

/* 건너뛰기 링크 (키보드 접근성) */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 400;
  padding: 10px 16px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 0.9rem;
  transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid #fff; outline-offset: 2px; }

/* 아바타 카드 키보드 포커스 */
.avatar-card:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }

/* ROI 절감 계산기 */
.roi-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  padding: 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--border);
}
.roi-inputs { display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.roi-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.roi-slider-row { display: flex; align-items: center; gap: 14px; }
.roi-slider-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.roi-slider-row output {
  min-width: 116px; text-align: right; font-weight: 700; font-size: 0.98rem;
  font-variant-numeric: tabular-nums; color: var(--primary-2);
}
.roi-result {
  display: flex; flex-direction: column; gap: 18px;
  padding: 26px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(124,92,255,0.14), rgba(56,189,248,0.05));
  border: 1px solid rgba(124,92,255,0.35);
}
.roi-card { text-align: center; }
.roi-label { font-size: 0.85rem; color: var(--text-sub); }
.roi-big {
  display: block; font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; line-height: 1.1; margin: 6px 0 4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.roi-sub { font-size: 0.82rem; color: var(--text-sub); }
.roi-bars { display: flex; justify-content: center; gap: 40px; align-items: flex-end; height: 130px; }
.roi-bar-group { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.roi-bar { width: 56px; height: 100px; display: flex; align-items: flex-end; border-radius: 10px 10px 0 0; overflow: hidden; background: var(--bg-soft); }
.roi-bar span { display: block; width: 100%; border-radius: 10px 10px 0 0; transition: height 0.6s cubic-bezier(0.22,1,0.36,1); }
.roi-bar-old span { background: linear-gradient(180deg, #f472b6, #db5a9d); }
.roi-bar-new span { background: var(--grad); }
.roi-bar-group small { font-size: 0.76rem; color: var(--text-sub); }
.roi-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roi-stats div { text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.roi-stats strong { display: block; font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.roi-stats span { font-size: 0.72rem; color: var(--text-sub); }
.roi-note { text-align: center; margin-top: 18px; font-size: 0.76rem; color: var(--text-sub); }

/* 뉴스레터 */
.newsletter { margin: 18px 0 4px; }
.newsletter label { display: block; font-size: 0.82rem; color: var(--text-sub); margin-bottom: 8px; }
.nl-row { display: flex; gap: 8px; }
.nl-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 0.88rem;
}
.nl-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,0.18); }
.newsletter.invalid .nl-row input { border-color: #ef4444; }
.newsletter.done .nl-row { opacity: 0.6; }

@media (max-width: 768px) {
  .roi-wrap { grid-template-columns: 1fr; }
}

/* ============================================================
   광고(AdSense) · 제휴 파트너
   ============================================================ */
.ad-band { padding: 20px 0; }
.ad-slot {
  position: relative; width: 100%; min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); overflow: hidden;
  border: 1px dashed var(--border); background: var(--surface);
}
.ad-slot.ad-live { border-style: solid; min-height: 110px; background: transparent; }
/* 위치별 현실적 예약 높이 — 광고 로드 전후 레이아웃 이동(CLS) 최소화 */
.ad-band[data-ad-pos="top"] .ad-slot.ad-live { min-height: 100px; }
.ad-band[data-ad-pos="mid"] .ad-slot.ad-live { min-height: 250px; }
.ad-band[data-ad-pos="bottom"] .ad-slot.ad-live { min-height: 280px; }
@media (min-width: 768px) {
  .ad-band[data-ad-pos="top"] .ad-slot.ad-live { min-height: 250px; }
}
.ad-label {
  position: absolute; top: 8px; left: 12px; z-index: 1;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-sub); opacity: 0.7;
}
[dir="rtl"] .ad-label { left: auto; right: 12px; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-ph { font-size: 0.82rem; color: var(--text-sub); text-align: center; padding: 26px 16px; }
.ad-slot.ad-live .ad-ph { display: none; }

/* 오늘의 추천 딜 (상단 순환) */
.top-deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.top-deal {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  text-decoration: none; color: inherit;
  background: linear-gradient(135deg, rgba(251,146,60,0.12), rgba(124,92,255,0.08));
  border: 1px solid rgba(251,146,60,0.28); transition: transform 0.2s, border-color 0.2s;
}
.top-deal:hover { transform: translateY(-3px); border-color: rgba(251,146,60,0.6); }
.td-ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #fb923c, #f97316); color: #fff; }
.td-ico .icon { width: 17px; height: 17px; }
.td-txt { flex: 1; min-width: 0; }
.td-txt strong { display: block; font-size: 0.9rem; }
.td-txt span { font-size: 0.76rem; color: var(--text-sub); }
.td-go .icon { width: 15px; height: 15px; transform: rotate(45deg); color: #fb923c; }
@media (max-width: 720px) { .top-deals { grid-template-columns: 1fr; } }

/* 추천 콘텐츠 (뉴스픽) */
.newspic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.newspic-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 130px;
  padding: 20px; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.22s, border-color 0.22s;
}
.newspic-card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,0.5); }
.np-badge { align-self: flex-start; font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(56,189,248,0.16); color: var(--primary-2); }
.np-title { flex: 1; font-size: 0.98rem; font-weight: 600; line-height: 1.45; }
.np-go { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--primary-2); }
.np-go .icon { width: 13px; height: 13px; transform: rotate(45deg); }
@media (max-width: 900px) { .newspic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .newspic-grid { grid-template-columns: 1fr; } }

/* 제휴 파트너 필터 */
.partner-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 32px; }

/* 제휴 파트너 카드 (브랜드 배너) */
.partner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.partner-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
/* 브랜드 색 상단 라인 + hover 글로우 */
.partner-card.has-brand::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--pc, var(--primary)); opacity: 0.9;
}
.partner-card:hover { transform: translateY(-5px); border-color: rgba(124,92,255,0.45); }
.partner-card.has-brand:hover {
  border-color: var(--pc); box-shadow: 0 14px 34px -12px var(--pc);
}
.partner-head { display: flex; align-items: center; gap: 12px; }
.partner-logo {
  width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 13px; font-weight: 800; font-size: 0.98rem; color: #fff; letter-spacing: -0.5px;
  background: linear-gradient(145deg, #7c5cff, #38bdf8);
}
.partner-card.has-brand .partner-logo {
  background: linear-gradient(145deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #000));
}
.partner-card.has-brand .partner-cta { color: var(--pc); }
.partner-name { font-size: 0.98rem; font-weight: 700; }
.partner-badge {
  font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(52,211,153,0.14); color: #34d399; align-self: flex-start;
}
.partner-desc { font-size: 0.86rem; color: var(--text-sub); flex: 1; }
.partner-cta { font-size: 0.84rem; font-weight: 600; color: var(--primary-2); display: inline-flex; align-items: center; gap: 5px; }
.partner-cta .icon { width: 14px; height: 14px; }
.affiliate-disclosure { margin-top: 22px; font-size: 0.74rem; color: var(--text-sub); text-align: center; line-height: 1.6; }

@media (max-width: 1024px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .partner-grid { grid-template-columns: 1fr; } }

/* ============================================================
   블로그 아티클 리더
   ============================================================ */
.blog-card[data-article] { cursor: pointer; }
.blog-card[data-article]:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }
.modal-article { width: min(680px, 100%); }
.art-cat {
  display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(124,92,255,0.16); color: var(--primary-2);
}
.art-title { font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.35; margin-bottom: 8px; }
.art-meta { font-size: 0.82rem; color: var(--text-sub); margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.art-body { font-size: 0.98rem; line-height: 1.85; color: var(--text); }
.art-body > p { margin-bottom: 18px; color: var(--text-sub); }
.art-body h4 { font-size: 1.08rem; font-weight: 700; margin: 26px 0 8px; color: var(--text); }
.art-body h4 + p, .art-body p:has(+ h4) { margin-bottom: 8px; }

/* ============================================================
   제작 과정 · 신뢰 배지 · 도움말 위젯
   ============================================================ */

/* How it works */
.how-steps {
  list-style: none; counter-reset: how; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative;
}
.how-step {
  position: relative; padding: 30px 24px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}
.how-step:hover { transform: translateY(-5px); border-color: rgba(124,92,255,0.4); }
.how-num {
  position: absolute; top: 16px; right: 18px; font-size: 2.6rem; font-weight: 900; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.22;
}
.how-icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: var(--surface-hover); margin-bottom: 18px;
}
.how-icon .icon { width: 26px; height: 26px; }
.how-step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.how-step p { font-size: 0.9rem; color: var(--text-sub); }
/* 단계 연결선 (데스크톱) */
.how-step:not(:last-child)::after {
  content: ""; position: absolute; top: 42px; right: -14px; width: 22px; height: 2px;
  background: linear-gradient(90deg, rgba(124,92,255,0.5), transparent); z-index: 1;
}

/* 신뢰 배지 스트립 */
.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 34px;
  padding: 26px 24px; margin-top: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.trust-badge { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.trust-badge > strong { font-size: 1.3rem; font-weight: 800; }
.trust-badge > strong span { font-size: 0.8rem; color: var(--text-sub); font-weight: 600; }
.trust-lbl { font-size: 0.74rem; color: var(--text-sub); }
.trust-cert { flex-direction: row; gap: 8px; font-size: 0.9rem; font-weight: 700; color: var(--text-sub); }
.trust-cert .icon { width: 18px; height: 18px; stroke: var(--primary-2); }

/* 도움말 위젯 */
.help-widget { position: fixed; right: 26px; bottom: 84px; z-index: 95; }
[dir="rtl"] .help-widget { right: auto; left: 26px; }
.help-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(124,92,255,0.45);
  display: grid; place-items: center; position: relative; transition: transform 0.2s;
  margin-left: auto;
}
.help-fab:hover { transform: scale(1.06); }
.help-fab .icon { width: 22px; height: 22px; position: absolute; transition: opacity 0.2s, transform 0.2s; }
.help-fab .help-fab-close { opacity: 0; transform: rotate(-45deg); }
.help-widget.open .help-fab-open { opacity: 0; transform: rotate(45deg); }
.help-widget.open .help-fab-close { opacity: 1; transform: rotate(0); }
.help-panel {
  position: absolute; right: 0; bottom: 64px; width: 300px;
  padding: 18px; border-radius: 18px;
  background: var(--bg-soft); border: 1px solid var(--border); box-shadow: var(--shadow);
  transform-origin: bottom right; animation: help-in 0.24s cubic-bezier(0.22,1,0.36,1);
}
[dir="rtl"] .help-panel { right: auto; left: 0; }
@keyframes help-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.help-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.help-head strong { font-size: 1rem; }
.help-close { width: 28px; height: 28px; border-radius: 8px; border: 0; background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.help-close .icon { width: 13px; height: 13px; }
.help-sub { font-size: 0.82rem; color: var(--text-sub); margin: 6px 0 14px; }
.help-links { display: grid; gap: 8px; }
.help-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 0.9rem; cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.help-link:hover { background: var(--surface-hover); border-color: var(--primary); }
.help-link .icon { width: 16px; height: 16px; stroke: var(--primary-2); flex-shrink: 0; }

@media (max-width: 900px) { .how-steps { grid-template-columns: repeat(2, 1fr); } .how-step:not(:last-child)::after { display: none; } }
@media (max-width: 560px) {
  .how-steps { grid-template-columns: 1fr; }
  .help-widget { right: 16px; bottom: 78px; }
  .help-panel { width: min(280px, calc(100vw - 32px)); }
}

/* ============================================================
   SNS 팔로우 · 계열사 슬라이더
   ============================================================ */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.social-card {
  --sc: #7c5cff;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 26px 18px; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.social-card:hover { transform: translateY(-5px); border-color: var(--sc); box-shadow: 0 14px 32px -14px var(--sc); }
.social-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--sc); color: #fff; }
.social-ico .icon { width: 24px; height: 24px; }
.social-name { font-weight: 700; font-size: 1rem; }
.social-cta {
  font-size: 0.82rem; font-weight: 700; color: #fff; background: var(--sc);
  padding: 6px 16px; border-radius: 999px;
}

/* 계열사 슬라이더 */
.promo-slider { position: relative; padding: 0 4px; }
.promo-viewport { overflow: hidden; }
.promo-track { display: flex; gap: 16px; transition: transform 0.5s cubic-bezier(0.22,1,0.36,1); }
.promo-slide {
  --p1: #7c5cff; --p2: #38bdf8;
  flex: 0 0 calc((100% - 32px) / 3); box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; padding: 20px;
  border-radius: var(--radius); text-decoration: none; color: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 16%, var(--bg-soft)), var(--bg-soft));
  border: 1px solid var(--border); transition: transform 0.22s, border-color 0.22s;
}
.promo-slide:hover { transform: translateY(-4px); border-color: var(--p1); }
.promo-logo {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px;
  font-size: 0.78rem; font-weight: 800; color: #fff; text-align: center; line-height: 1.05; padding: 4px;
  background: linear-gradient(145deg, var(--p1), var(--p2));
}
.promo-info { flex: 1; min-width: 0; }
.promo-info strong { display: block; font-size: 0.98rem; }
.promo-info span { font-size: 0.8rem; color: var(--text-sub); }
.promo-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--p1); white-space: nowrap; }
.promo-cta .icon { width: 13px; height: 13px; transform: rotate(45deg); }
.promo-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center;
}
.promo-arrow:hover { background: var(--surface-hover); }
.promo-arrow .icon { width: 16px; height: 16px; }
.promo-prev { left: -10px; }
.promo-prev .icon { transform: rotate(90deg); }
.promo-next { right: -10px; }
.promo-next .icon { transform: rotate(-90deg); }
.promo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.promo-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; background: var(--surface-hover); cursor: pointer; padding: 0; transition: all 0.3s; }
.promo-dots button.active { width: 26px; background: var(--grad); }
[dir="rtl"] .promo-prev { left: auto; right: -10px; }
[dir="rtl"] .promo-next { right: auto; left: -10px; }

@media (max-width: 1024px) { .promo-slide { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 640px) {
  .social-grid { grid-template-columns: 1fr; }
  .promo-slide { flex-basis: 100%; }
  .promo-prev { left: 0; } .promo-next { right: 0; }
}

/* 모션 최소화 존중 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- AI Studio parity modules ---------- */
.studio-chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.studio-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-sub); font: inherit; font-size: 0.84rem; font-weight: 700; }
.studio-chip.active, .studio-chip[aria-pressed="true"] { color: var(--text); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, var(--surface)); }
.template-card { position: relative; overflow: hidden; }
.tpl-badge { position: absolute; top: 12px; right: 12px; z-index: 1; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-size: 0.72rem; font-weight: 800; }
.tpl-cta { position: absolute; left: 14px; right: 14px; bottom: 14px; opacity: 0; transform: translateY(8px); display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--grad); color: var(--text); font-size: 0.82rem; font-weight: 800; transition: opacity 0.2s, transform 0.2s; }
.template-card:hover .tpl-cta, .template-card:focus-within .tpl-cta { opacity: 1; transform: none; }
.template-card button.tpl-open { position: absolute; inset: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.template-card button.tpl-open:focus-visible { outline: 3px solid var(--primary-2); outline-offset: -3px; }
.flow-shell, .mini-editor, .team-shell, .api-doc-grid, .tpl-preview { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.flow-grid, .team-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 20px; align-items: start; }
.flow-panel, .preview-panel, .team-panel, .api-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); padding: 18px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row input, .flow-panel input, .flow-panel textarea, .mini-editor textarea, .mini-editor select, .team-panel input { width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 12px 13px; font: inherit; font-size: 0.9rem; }
.flow-panel input:focus, .flow-panel textarea:focus, .mini-editor textarea:focus, .mini-editor select:focus, .team-panel input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.mock-note { color: var(--text-sub); font-size: 0.78rem; line-height: 1.5; margin-top: 10px; }
.step-list { display: grid; gap: 10px; margin: 14px 0; }
.step-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-sub); font-size: 0.84rem; }
.step-item.active, .step-item.done { color: var(--text); border-color: var(--primary-2); }
.scene-list, .version-list, .approval-list, .api-listing { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.scene-card, .version-item, .approval-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 13px; }
.scene-card strong, .version-item strong { display: block; margin-bottom: 5px; }
.scene-card p, .version-item span, .approval-item span { color: var(--text-sub); font-size: 0.82rem; line-height: 1.5; }
.dropzone { display: grid; place-items: center; gap: 8px; min-height: 130px; text-align: center; cursor: pointer; border: 2px dashed var(--border); border-radius: 14px; background: var(--surface); color: var(--text-sub); padding: 18px; }
.dropzone:hover { border-color: var(--primary); }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; color: var(--text-sub); font-size: 0.84rem; }
.progress-line { height: 9px; border-radius: 999px; background: var(--surface-hover); overflow: hidden; }
.progress-line span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 0.35s; }
.mini-editor { display: grid; gap: 16px; }
.dub-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.timeline { display: grid; gap: 8px; }
.timeline-row { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; color: var(--text-sub); font-size: 0.78rem; }
.timeline-row input { width: 100%; accent-color: var(--primary); }
.dub-preview { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); padding: 16px; }
.member-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.member-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.8rem; }
.role-badge { color: var(--primary-2); font-weight: 800; }
.api-doc-grid { display: grid; gap: 16px; }
.api-panel h4 { margin-bottom: 10px; }
.api-code-wrap { position: relative; }
.api-copy { position: absolute; top: 8px; right: 8px; }
.api-doc table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.api-doc th, .api-doc td { border-bottom: 1px solid var(--border); padding: 9px; text-align: left; }
.tpl-preview { display: grid; gap: 16px; }
.tpl-preview-hero { min-height: 180px; display: grid; place-items: center; border-radius: 14px; background: var(--grad); }
.tpl-preview dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; font-size: 0.9rem; }
.tpl-preview dt { color: var(--text-sub); }
@media (max-width: 768px) {
  .flow-grid, .team-grid, .dub-editor-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; align-items: stretch; }
  .flow-shell, .mini-editor, .team-shell, .api-doc-grid { padding: 18px; }
}
