/* =====================================================================
   DragDocs — 메인 v0.6 / Vanilla 퍼블리싱
   ===================================================================== */

/* ---------------------------------------------------------------- App shell */
.app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* ------------------------------------------------------------------- Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: var(--sp-24);
  padding: 0 var(--sp-40);
  color: var(--text-on-dark);
  transition: color 0.3s ease;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: var(--fs-p1);
  letter-spacing: -0.2px;
  flex-shrink: 0;
  color: inherit;
}
.brand-word { line-height: 1; }
.brand-mark { height: 0.92em; width: auto; margin: 0 1px; transform: translateY(1px); }

.marquee {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  opacity: 0.92;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 74px;
  padding-right: 74px;
}
.marquee__item {
  font-size: var(--fs-caption);
  line-height: 1.5;
  white-space: nowrap;
}
.marquee__star {
  flex: none;
  width: 12px;
  height: 12px;
  color: inherit;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

.site-header__actions { display: flex; align-items: center; gap: var(--sp-16); flex-shrink: 0; }
.site-header__nav-link { text-decoration: none; color: inherit; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  color: inherit;
  transition: background 0.2s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.icon-btn img { width: 22px; height: 22px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-p3);
}
.hamburger { display: none; }

/* 언어 선택 드롭다운 */
.lang { position: relative; }
.lang-btn { cursor: pointer; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 144px;
  padding: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: var(--z-modal);
}
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: var(--fs-p3);
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-menu__item:hover { background: var(--grey-96); }
.lang-menu__item.is-active { color: var(--accent-blue); font-weight: 700; }

/* 인라인 SVG UI 아이콘 — currentColor 상속 → 테마별 자동 색 반전 (file:// 호환) */
.ui-svg { display: inline-block; color: inherit; }
.ui-svg--lang { width: 18px; height: 18px; }
.ui-svg--set { width: 22px; height: 22px; }

/* 타이틀/메뉴/아이콘 버튼은 포커스 테두리 제거 (폼 입력 요소는 reset의 :focus-visible 유지) */
.site-header__brand:focus,
.site-header__brand:focus-visible,
.sidebar__item:focus,
.sidebar__item:focus-visible,
.icon-btn:focus,
.icon-btn:focus-visible,
.lang-btn:focus,
.lang-btn:focus-visible,
.fab__btn:focus,
.fab__btn:focus-visible,
.stage-setting:focus,
.stage-setting:focus-visible,
.dots button:focus,
.dots button:focus-visible { outline: none; }

/* 스크롤 시 라이트(솔리드) 헤더 — 흰 배경 위 가독성 확보 */
.site-header.is-solid {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}
.site-header.is-solid .icon-btn:hover { background: var(--grey-96); }
.site-header.is-solid .marquee { opacity: 0.85; }

/* -------------------------------------------------------------------- Stage */
.stage {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 220px 1fr;
  isolation: isolate;
  z-index: 0; /* 본문(z:1)이 위를 덮고, 헤더(z:100)는 항상 위 */
  transition: background 0.5s ease;
}
/* theme backgrounds */
.stage[data-theme="blue"] {
  background: radial-gradient(120% 120% at 80% 0%, var(--hero-blue-to), var(--hero-blue-from) 70%);
  color: var(--text-on-dark);
}
.stage[data-theme="mint"] {
  background: linear-gradient(160deg, var(--hero-mint-to), var(--hero-mint-from));
  color: var(--text);
}
.stage[data-theme="pink"] {
  background: linear-gradient(160deg, var(--hero-pink-to), var(--hero-pink-from));
  color: var(--text);
}
.stage[data-theme="coral"] {
  background: linear-gradient(160deg, var(--hero-coral-to), var(--hero-coral-from));
  color: var(--text);
}
.site-header[data-theme="mint"],
.site-header[data-theme="pink"],
.site-header[data-theme="coral"] { color: var(--text); }
.site-header[data-theme="mint"] .icon-btn:hover,
.site-header[data-theme="pink"] .icon-btn:hover,
.site-header[data-theme="coral"] .icon-btn:hover { background: rgba(0, 0, 0, 0.06); }

/* 배경 영상 (Filter 화면) — 상단 검정 → 하단 하늘색 세로 그라데이션 위에 영상 합성 */
.stage__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  isolation: isolate; /* 블렌드를 이 레이어 안으로 격리 */
  background: #000000;
  background: linear-gradient(
    180deg,
    #000000 0%,
    #010a1d 12%,
    #081c40 25%,
    #133665 40%,
    #25588b 55%,
    #3c81b1 70%,
    #58b2d7 85%,
    #bbf4fe 100%
  );
}
.stage.has-bg-video .stage__media { opacity: 1; }
.stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 검정 배경 영상이 그라데이션 위에서 글자만 떠 보이도록 */
  mix-blend-mode: screen;
}

/* decorative floating images (Figma 배경 장식, blue 테마 전용) — blur/glow 는 PNG에 baked */
.stage__stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; transition: opacity 0.5s ease; }
.stage[data-theme="blue"] .stage__stars { opacity: 1; }
.stage:not([data-theme="blue"]) .stage__stars { opacity: 0; }
/* 영상 배경일 땐 장식 글린트 숨김 (영상이 배경 역할) */
.stage.has-bg-video .stage__stars { opacity: 0 !important; }
.deco {
  position: absolute;
  height: auto;
  will-change: transform;
  animation: float 9s ease-in-out infinite;
}
/* 위치/크기 — Figma hero_viewer 레이아웃 기준, 움직임 크게 */
.deco--1 { top: 42%; right: 7%;  width: clamp(120px, 11vw, 200px); animation: floatB 9s ease-in-out infinite; }       /* 분자 + 커서 (선명) */
.deco--7 { top: 13%; left: 10%;  width: clamp(70px, 7vw, 124px);  animation: float 7s ease-in-out -3s infinite, twinkle 4s ease-in-out infinite; } /* 반짝이 */
.deco--3 { top: 15%; right: 13%; width: clamp(90px, 9vw, 150px);  animation: float 10s ease-in-out -3s infinite; }   /* 돋보기 */
.deco--5 { top: 7%;  left: 35%;  width: clamp(90px, 9vw, 160px);  opacity: 0.85; animation: floatB 11s ease-in-out -2s infinite; } /* 빛망울 */
.deco--2 { top: 45%; left: 16%;  width: clamp(110px, 11vw, 190px); opacity: 0.8; animation: float 9s ease-in-out -5s infinite; }  /* 흐릿한 글린트 */
.deco--4 { bottom: 9%; left: 5%; width: clamp(180px, 18vw, 330px); opacity: 0.9; animation: floatB 12s ease-in-out -3s infinite; } /* 톱니바퀴 (대) — 좌하단 */
.deco--6 { bottom: 12%; right: 24%; width: clamp(80px, 8vw, 120px); opacity: 0.85; animation: float 8s ease-in-out -6s infinite; } /* 블롭 */
@keyframes float {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  25%  { transform: translate3d(18px, -30px, 0) rotate(7deg); }
  50%  { transform: translate3d(-10px, -54px, 0) rotate(-6deg); }
  75%  { transform: translate3d(-22px, -24px, 0) rotate(5deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes floatB {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  30%  { transform: translate3d(-24px, -28px, 0) rotate(-8deg); }
  60%  { transform: translate3d(18px, -48px, 0) rotate(7deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .deco { animation: none; } }
@media (max-width: 767px) { .stage__stars { display: none; } }

/* ----------------------------------------------------------- Sidebar (pagination) */
.sidebar {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + var(--sp-80)) var(--sp-24) var(--sp-40);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-32);
}
.sidebar__item {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: var(--fs-p2);
  color: inherit;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  text-align: left;
  white-space: nowrap;
}
.sidebar__item:hover { opacity: 0.85; }
.sidebar__item.is-active { opacity: 1; }
/* hover/활성 시 좌측에 제품 아이콘 슬라이드-인 */
.sidebar__icon {
  width: 0;
  height: 22px;
  opacity: 0;
  flex: none;
  object-fit: contain;
  transition: width 0.2s ease, opacity 0.2s ease, margin-right 0.2s ease;
}
.sidebar__item:hover .sidebar__icon,
.sidebar__item.is-active .sidebar__icon {
  width: 22px;
  opacity: 1;
  margin-right: var(--sp-8);
}

/* dots (tablet/mobile) */
.dots { display: none; gap: var(--sp-8); justify-content: center; padding: var(--sp-16); }
.dots button {
  width: 8px; height: 8px; border-radius: var(--radius-pill);
  background: currentColor; opacity: 0.4; transition: all 0.2s ease;
}
.dots button.is-active { width: 22px; opacity: 1; }

/* --------------------------------------------------------------------- Hero */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-32);
  /* 상단 기준 정렬 — 슬라이드 전환 시 타이틀 위치가 흔들리지 않도록(Viewer 타이틀 위치 기준) */
  padding: calc(var(--header-h) + var(--sp-64)) var(--sp-40) var(--sp-80);
  text-align: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-16);
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, var(--fs-t1));
}
.hero__eyebrow img { width: clamp(32px, 3.4vw, 48px); height: auto; }
.hero__title {
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -1px;
  max-width: none;
  white-space: nowrap;
}
.hero__sub { font-size: var(--fs-p1); opacity: 0.85; }

/* dropzone (viewer / filter) — 반투명 프레임 + 흰 카드 (Figma) */
.dropzone {
  width: min(620px, 100%);
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  padding: var(--sp-16);
}
.dropzone__card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.dropzone__head {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: #6b6b6e;
  text-align: center;
}
.dropzone__area {
  width: 100%;
  max-width: 540px;
  min-height: 300px;
  border: 1px dashed rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-40);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone__area.is-dragover { border-color: var(--accent-blue); background: var(--grey-97); }
.dropzone__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-16);
}
.dropzone__icon { width: 102px; height: 100px; }
.dropzone__text {
  font-size: var(--fs-p2);
  line-height: 1.5;
  color: var(--text-paragraph);
  text-align: center;
}
.dropzone__pick {
  font: inherit;
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-position: from-font;
}
.dropzone__pick:hover { text-decoration: none; }

.formats { display: flex; flex-direction: column; gap: var(--sp-8); }
.formats__row { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; }
.chip {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.5;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid transparent;
  color: rgba(0, 0, 0, 0.4);
}
.chip--docs { background: rgba(0, 174, 255, 0.05); border-color: rgba(0, 174, 255, 0.2); }
.chip--img { background: rgba(238, 91, 61, 0.08); border-color: rgba(238, 91, 61, 0.2); }
.chip--archive { background: rgba(255, 170, 0, 0.05); border-color: rgba(255, 170, 0, 0.2); }

/* folder mock card */
.folder-mock {
  width: min(560px, 92%);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: left;
}
.folder-mock__bar {
  display: flex; align-items: center; gap: var(--sp-12);
  padding: var(--sp-16) var(--sp-24);
  background: var(--bg-blue);
  font-weight: 700;
}
.folder-mock__bar img { width: 24px; height: 24px; }
.folder-mock__lock { margin-left: auto; font-size: var(--fs-caption); color: var(--accent-mint); font-weight: 600; }
.folder-mock__list { display: flex; flex-direction: column; }
.folder-mock__list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-12);
  padding: var(--sp-16) var(--sp-24);
  border-top: 1px solid var(--grey-91);
  font-size: var(--fs-p3);
}
.folder-mock__tag {
  font-size: var(--fs-caption); font-weight: 600;
  padding: 2px 10px; border-radius: var(--radius-pill);
  background: var(--grey-96); color: var(--text-slate);
}
.folder-mock__meta { font-size: var(--fs-caption); color: var(--text-paragraph); }

/* product screenshot (editor) */
.hero__shot {
  width: min(720px, 92%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--white);
}
.hero__shot--folder {
  width: min(560px, 80%);
  border-radius: var(--radius-lg);
}

/* product screenshot watermark (Powered by BTONE) */
.hero__shotwrap {
  position: relative;
  display: inline-block;
  width: min(720px, 92%);
  line-height: 0;
}
.hero__shotwrap .hero__shot {
  width: 100%;
}
.hero__watermark {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------- HTML 에디터 (DragDocs WEB Office) 목업 — PDF p.15 */
.wo {
  width: min(680px, 94%);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: left;
  font-size: 11px;
}
.wo__browser { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #e9edf2; }
.wo__tl { width: 9px; height: 9px; border-radius: var(--radius-pill); }
.wo__tl--r { background: #ff5f57; } .wo__tl--y { background: #febc2e; } .wo__tl--g { background: #28c840; }
.wo__url { margin-left: 8px; flex: 1; background: var(--white); border-radius: var(--radius-pill); padding: 3px 10px; color: var(--text-paragraph); font-size: 10px; }
.wo__header { display: flex; align-items: center; gap: var(--sp-12); padding: 8px 12px; background: #2a2f3a; color: #e8ebf0; }
.wo__proj { font-size: 11px; font-weight: 600; white-space: nowrap; }
.wo__proj i { opacity: 0.7; font-style: normal; }
.wo__tools { display: flex; align-items: center; gap: 6px; margin-left: var(--sp-8); }
.wo__tools > span { width: 14px; height: 14px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); }
.wo__zoom { width: auto !important; background: transparent !important; font-size: 10px; color: #aab2c0; }
.wo__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wo__share { font-size: 10px; color: #d7dce4; }
.wo__publish { font-size: 10px; font-weight: 700; color: #fff; background: var(--accent-blue); padding: 5px 12px; border-radius: 6px; }
.wo__body { display: grid; grid-template-columns: 132px 1fr 150px; min-height: 280px; }
.wo__pages { background: var(--grey-98); border-right: 1px solid var(--grey-91); }
.wo__props { background: var(--grey-98); border-left: 1px solid var(--grey-91); padding-bottom: var(--sp-12); }
.wo__panelhead { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-weight: 700; font-size: 11px; border-bottom: 1px solid var(--grey-91); }
.wo__add { font-size: 9px; font-weight: 600; color: var(--accent-blue); }
.wo__pagelist { margin: 0; padding: 6px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.wo__pagelist li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-size: 10px; color: var(--text-paragraph); }
.wo__pagelist li.is-active { background: #dbeafe; color: var(--text); font-weight: 600; }
.wo__thumb { width: 22px; height: 30px; background: var(--white); border: 1px solid var(--grey-91); border-radius: 2px; flex: none; }
.wo__canvas { background: #b8bdc6; display: flex; flex-direction: column; align-items: center; padding: 14px; gap: 8px; overflow: hidden; }
.wo__ruler { width: 90%; height: 8px; border-radius: 2px; opacity: 0.7; background: repeating-linear-gradient(90deg, #fff 0 1px, #e2e8f0 1px 14px); }
.wo__page { width: 78%; background: var(--white); border-radius: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.wo__doc-h { font-size: 13px; font-weight: 800; }
.wo__doc-p { font-size: 10px; line-height: 1.7; color: var(--text-paragraph); }
.wo__doc-p mark { background: rgba(255, 138, 26, 0.22); color: inherit; padding: 0 2px; border-radius: 2px; }
.wo__caret { display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; background: #ff8a1a; vertical-align: text-bottom; animation: wo-caret 1s steps(1) infinite; }
@keyframes wo-caret { 50% { opacity: 0; } }
.wo__seg { display: inline-flex; border: 1px solid var(--grey-91); border-radius: 5px; overflow: hidden; font-size: 9px; }
.wo__seg b { background: var(--accent-mint); color: #fff; padding: 2px 7px; font-weight: 700; }
.wo__seg i { padding: 2px 7px; color: var(--text-slate); font-style: normal; }
.wo__check { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 10px; color: var(--text); }
.wo__box { position: relative; width: 13px; height: 13px; border-radius: 3px; background: var(--accent-mint); flex: none; }
.wo__box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.wo__field { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; font-size: 10px; color: var(--text-paragraph); }
.wo__field b { background: var(--white); border: 1px solid var(--grey-91); border-radius: 4px; padding: 2px 8px; color: var(--text); font-weight: 600; min-width: 42px; text-align: right; }
.wo__pos { padding: 8px 10px; }
.wo__label2 { font-size: 10px; color: var(--text-slate); }
.wo__dots { margin-top: 6px; display: grid; grid-template-columns: repeat(3, 10px); gap: 6px; }
.wo__dots span { width: 8px; height: 8px; border-radius: var(--radius-pill); background: #cbd5e1; }
.wo__dots span.is-on { background: var(--accent-blue); }
@media (max-width: 640px) {
  .wo__body { grid-template-columns: 100px 1fr; }
  .wo__props, .wo__ruler { display: none; }
}

/* ------------------------------------------------- 문서 변환 목업 (Convertor) */
.convert {
  width: min(560px, 92%);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: var(--sp-32) var(--sp-24);
  display: flex; flex-direction: column; gap: var(--sp-24);
}
.convert__flow { display: flex; align-items: center; gap: var(--sp-12); }
.convert__file {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-12);
  padding: var(--sp-16); border: 1px solid var(--grey-91); border-radius: var(--radius-md);
  background: var(--grey-98);
}
.convert__file--done { border-color: rgba(168, 18, 43, 0.35); background: rgba(245, 38, 63, 0.05); }
.convert__ext {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 800; color: var(--white); letter-spacing: 0.3px;
}
.convert__ext--docx { background: #2b6cb0; }
.convert__ext--pdf { background: #a8122b; }
.convert__ext--html { background: #e34f26; }
.convert__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.convert__info b { font-size: var(--fs-p3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convert__info em { font-size: var(--fs-caption); font-style: normal; color: var(--text-paragraph); }
.convert__arrow { flex: none; display: flex; align-items: center; gap: 4px; }
.convert__arrow span {
  width: 6px; height: 6px; border-radius: var(--radius-pill); background: #ff8a1a;
  animation: convert-dot 1.2s ease-in-out infinite;
}
.convert__arrow span:nth-child(2) { animation-delay: 0.2s; }
.convert__arrow span:nth-child(3) { animation-delay: 0.4s; }
@keyframes convert-dot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.convert__pick { display: flex; flex-direction: column; gap: var(--sp-8); }
.convert__label { font-size: var(--fs-caption); font-weight: 600; color: var(--text-slate); }
.convert__label em { font-style: normal; font-weight: 700; color: #e34f26; }
.convert__chips { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.convert__chip {
  font-size: var(--fs-caption); font-weight: 600; color: var(--text-slate);
  padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--grey-91); background: var(--white);
}
.convert__chip.is-active { color: var(--white); background: var(--accent-blue); border-color: var(--accent-blue); }
.convert__cta {
  align-self: flex-start;
  padding: 12px 28px; border-radius: var(--radius-pill);
  font-size: var(--fs-p3); font-weight: 700; color: var(--white);
  background: var(--accent-blue);
  transition: filter 0.15s ease;
}
.convert__cta:hover { filter: brightness(1.08); }
@media (max-width: 600px) {
  .convert__flow { flex-direction: column; align-items: stretch; }
  .convert__arrow { justify-content: center; transform: rotate(90deg); padding: var(--sp-4) 0; }
}

/* ---------------------------------------------------------------------- FAB */
.fab {
  position: fixed;
  right: var(--sp-40);
  bottom: var(--sp-40);
  z-index: var(--z-fab);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-12);
  /* 메뉴 테마에 따라 반전되는 색 (글씨 반전과 동일 규칙) */
  --fab-bg: #ffffff;
  --fab-fg: #292929;
}
.fab[data-theme="mint"],
.fab[data-theme="pink"],
.fab[data-theme="coral"] { --fab-bg: #292929; --fab-fg: #ffffff; }
.fab__item { position: relative; display: flex; justify-content: flex-end; }
.fab__btn {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.22));
  transition: transform 0.15s ease;
}
.fab__btn:hover { transform: translateY(-2px) scale(1.04); }
.fab__icon { width: 56px; height: 56px; display: block; }
.fab__label {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: var(--fab-dark); color: var(--white);
  font-size: var(--fs-p3); padding: 6px 12px; border-radius: var(--radius-sm);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.fab__item:hover .fab__label { opacity: 1; }

/* ---------------------------------------------------------- Hero credit */
.hero-credit {
  position: absolute;
  left: var(--sp-40);
  bottom: var(--sp-24);
  z-index: 2;
  font-size: var(--fs-caption);
  opacity: 0.7;
  color: inherit;
}

/* 좌측 하단 설정(시스템 요구사항) 버튼 — stage 색 상속 → 테마별 반전 */
.stage-setting {
  position: absolute;
  left: var(--sp-40);
  bottom: var(--sp-56);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: inherit;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
}
.stage-setting:hover { background: rgba(255, 255, 255, 0.16); }
.stage:not([data-theme="blue"]) .stage-setting:hover { background: rgba(0, 0, 0, 0.06); }
@media (max-width: 767px) { .stage-setting { display: none; } }

/* -------------------------------------------------------------------- Modal */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--sp-24);
}
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }
.modal__panel {
  position: relative;
  width: min(820px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-32);
  animation: modal-in 0.22s ease;
}
.modal__panel--wide { width: min(960px, 100%); }
.modal__panel--contact { width: min(820px, 100%); padding: var(--sp-24); }
.modal__panel--contact .form { gap: 8px var(--sp-12); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.modal__panel--contact .form__half { grid-column: span 3; }
.modal__panel--contact .form__third { grid-column: span 2; }
.modal__panel--contact .modal__head { margin-bottom: var(--sp-16); }
.modal__panel--video { padding: 0; background: #000; overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-16); margin-bottom: var(--sp-24); }
.modal__title { font-size: var(--fs-h3); font-weight: 800; letter-spacing: -0.5px; }
.modal__close { width: 36px; height: 36px; border-radius: var(--radius-pill); display: grid; place-items: center; font-size: 22px; color: var(--text-slate); }
.modal__close:hover { background: var(--grey-96); }
.modal__panel--video .modal__close { position: absolute; top: 12px; right: 12px; color: #fff; background: rgba(0,0,0,0.4); z-index: 2; }
.modal video { width: 100%; height: auto; display: block; }

/* 도구/외부앱 모달 (iframe 전체화면) */
.modal__panel--tool {
  width: min(1600px, 96vw);
  height: 92vh; max-height: 92vh;
  padding: 0; overflow: hidden; background: var(--white);
  display: flex; flex-direction: column;
}
.modal__titlebar { display: none; } /* 기본: 플로팅 X 모드 (viewer 만 타이틀바 사용) */
.modal__panel--tool.is-titlebar .modal__titlebar {
  flex: 0 0 auto; height: 44px; display: flex; align-items: center;
  gap: 12px; padding: 0 52px 0 16px;
  border-bottom: 1px solid var(--border); background: var(--white);
}
.modal__titlebar-name {
  font-size: var(--fs-body); font-weight: 600; color: var(--text-slate);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal__toolframe { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; display: block; }
.modal__close--tool {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  color: var(--text-slate); background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}
.modal__close--tool:hover { background: #fff; }
.modal__panel--tool.is-titlebar .modal__close--tool {
  background: transparent; box-shadow: none;
  width: 28px; height: 28px; font-size: 20px;
  top: 8px; transform: none;   /* 타이틀바(44px) 세로 중앙: (44-28)/2 */
}
.modal__panel--tool.is-titlebar .modal__close--tool:hover { background: var(--grey-96); }
/* 추출기/변환기: 자체 다크 타이틀바(windowbar 40px) 안에 닫기 X 를 녹여 넣는다 */
.modal__panel--tool.is-dark-titlebar .modal__close--tool {
  top: 4px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 8px; font-size: 20px;
  color: #fff; background: transparent; box-shadow: none;
}
.modal__panel--tool.is-dark-titlebar .modal__close--tool:hover { background: rgba(255, 255, 255, 0.14); }

/* AI Editor 임베드 */
.hero__embed { width: 100%; display: flex; justify-content: center; }
.hero__embed-frame {
  width: min(960px, 100%); height: min(62vh, 720px);
  border: 0; border-radius: var(--radius-lg);
  background: var(--white); box-shadow: var(--shadow-card);
}

/* Html Editor "사용해보기" 버튼 */
.hero__try { margin-top: var(--sp-16); display: flex; justify-content: center; }
.hero__try-btn {
  padding: 11px 26px; border: 0; border-radius: 10px;
  font-size: var(--fs-body); font-weight: 600; color: #fff; cursor: pointer;
  background: #3d00cc;
  transition: transform 0.12s ease, background 0.12s ease;
}
.hero__try-btn:hover { background: #2e009a; transform: translateY(-1px); }

/* 개인정보 처리방침 모달 — 헤더 고정 + 본문 스크롤 */
.modal__panel--privacy { width: min(900px, 100%); padding: 0; }
.modal__panel--privacy .modal__head {
  position: sticky; top: 0; z-index: 1;
  margin: 0; padding: 22px 32px;
  background: var(--white); border-bottom: 1px solid #e5e7eb;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.privacy-doc { padding: 18px 32px 32px; font-size: 14px; line-height: 1.75; color: #374151; }
.pp-lead { color: #4b5563; margin-bottom: 4px; }
.pp-art { margin-top: 26px; }
.pp-art__title { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 10px; }
.pp-text { margin: 6px 0; }
.pp-list { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.pp-list > li { padding-left: 4px; }
.pp-sub { list-style: disc; padding-left: 20px; margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.pp-sub--dash { list-style-type: "– "; }
.pp-table-wrap { overflow-x: auto; margin: 11px 0 2px; }
.pp-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.pp-table th, .pp-table td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; vertical-align: top; }
.pp-table th { background: #f9fafb; font-weight: 700; color: #111827; }
.pp-card { margin-top: 9px; padding: 14px 16px; background: #f9fafb; border: 1px solid #eef0f3; border-radius: 10px; }
.pp-card__title { font-weight: 700; color: #111827; margin-bottom: 4px; }
.pp-card p { margin: 2px 0; }
.pp-card a { color: #006eff; }
.pp-effective { margin-top: 28px; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 13px; }

/* spec rows (system requirements) */
.spec { display: grid; grid-template-columns: 120px 1fr; gap: var(--sp-16) var(--sp-24); }
.spec dt { font-weight: 700; color: var(--text); }
.spec dd { color: var(--text-paragraph); font-size: var(--fs-p3); line-height: 1.7; }

/* contact form */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px var(--sp-16);
}
.form__full,
.consent--privacy,
.btn-primary { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-p3); font-weight: 600; }
.field label .req { color: var(--danger); }
.field input,
.field select,
.field textarea {
  border: 1px solid var(--grey-91);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: var(--fs-p3);
  background: var(--grey-98);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field select { height: 48px; cursor: pointer; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent-blue); background: var(--white); }
.field textarea { resize: vertical; min-height: 112px; }
.field input[type="file"] {
  color: var(--text-paragraph);
  cursor: pointer;
  height: 48px;
  padding: 7px 14px;
}
.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: #eef4ff;
  color: var(--accent-blue);
  font-weight: 700;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { background: #e0ebff; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.file-list[hidden] { display: none; }
.file-list__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--grey-91);
  border-radius: var(--radius-md);
  background: var(--grey-98);
  font-size: var(--fs-caption);
}
.file-list__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list__size { flex-shrink: 0; color: var(--text-paragraph); }
.file-list__remove { flex-shrink: 0; border: 0; background: transparent; color: var(--danger); font-weight: 700; font-size: 16px; line-height: 1; cursor: pointer; }
.field__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-paragraph);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-12);
  font-size: var(--fs-caption);
  color: var(--text-paragraph);
}
.consent input { margin-top: 2px; }
.consent--privacy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--grey-91);
  border-radius: var(--radius-md);
  background: var(--grey-98);
}
.consent__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.consent__check .req { color: var(--danger); }
.privacy-summary {
  color: var(--text-paragraph);
}
.privacy-summary dl {
  display: grid;
  gap: 5px;
  margin: 0;
}
.privacy-summary dl > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.privacy-summary dt {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
}
.privacy-summary dd,
.privacy-summary p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  word-break: keep-all;
}
.privacy-summary p {
  margin-top: 7px;
  color: #7a8798;
}
.btn-primary {
  margin-top: var(--sp-8);
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--grad-cta);
  color: var(--white);
  font-weight: 700;
  font-size: var(--fs-p2);
}
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { cursor: progress; opacity: 0.9; filter: none; }
.btn-spinner {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.form-progress { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--grey-91); overflow: hidden; }
.form-progress[hidden] { display: none; }
.form-progress > span {
  display: block; width: 40%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #9d1bff, #1378ff, #10e3d5);
  animation: progress-indeterminate 1.1s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* ==================================================================== Tablet */
@media (max-width: 1024px) {
  .stage { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .dots { display: flex; position: absolute; bottom: var(--sp-24); left: 0; right: 0; z-index: 3; }
  .hero { padding-top: calc(var(--header-h) + var(--sp-56)); }
  .hero__title { font-size: clamp(28px, 6vw, 44px); }
}

/* ==================================================================== Mobile */
@media (max-width: 767px) {
  .site-header { padding: 0 var(--sp-16); gap: var(--sp-12); }
  .marquee { display: none; }
  .site-header__actions .lang { display: none; }
  .hamburger { display: grid; place-items: center; width: 40px; height: 40px; }
  .hero { padding: calc(var(--header-h) + var(--sp-32)) var(--sp-16) var(--sp-64); gap: var(--sp-24); }
  .hero__title { font-size: clamp(24px, 8vw, 34px); white-space: normal; }
  .dropzone { padding: var(--sp-24); border-radius: var(--radius-lg); }
  .dropzone__area { padding: var(--sp-24) var(--sp-16); }
  .fab { right: var(--sp-16); bottom: var(--sp-16); }
  .fab button { width: 52px; height: 52px; }
  .site-footer { left: var(--sp-16); }
  .modal__panel { padding: var(--sp-24); }
  .modal__panel--privacy { padding: 0; }
  .modal__panel--privacy .modal__head { padding: 18px 18px; }
  .privacy-doc { padding: 14px 18px 24px; }
  .form { grid-template-columns: 1fr; }
  .file-list { grid-template-columns: 1fr; }
  .consent--privacy { grid-template-columns: 1fr; }
  .privacy-summary { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; gap: var(--sp-4) 0; }
  .spec dt { margin-top: var(--sp-12); }
}

/* ----------------------------------------------------- Mobile slide-in menu */
.menu {
  position: fixed; inset: 0; z-index: var(--z-modal);
}
.menu[hidden] { display: none; }
.menu__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 84%);
  background: var(--white); color: var(--text);
  padding: var(--sp-24);
  display: flex; flex-direction: column; gap: var(--sp-8);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  animation: slide-in 0.24s ease;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.menu__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-16); }
.menu__head strong { font-family: var(--font-brand); }
.menu__item { display: flex; align-items: center; gap: var(--sp-12); padding: var(--sp-12); border-radius: var(--radius-md); font-weight: 600; }
.menu__item img { width: 20px; height: 20px; }
.menu__item:hover, .menu__item.is-active { background: var(--grey-96); }
.menu__divider { height: 1px; background: var(--grey-91); margin: var(--sp-8) 0; }
