/* PdfMonster 공통 스타일: 디자인 토큰, 머리글·바닥글, 홈, 편집 화면.
   안내 페이지(소개·가이드 등)는 이 파일 + site.css(글 본문 스타일)를 함께 쓴다. */

/* 화면과 PDF 합치기가 같은 글꼴을 쓰도록 같은 가변 폰트에서 빌드 때 만든 웹 폰트(한글 2350자)를 사용한다 */
@font-face { font-family: 'AnnotSans'; src: url('/fonts/sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'AnnotSans'; src: url('/fonts/sans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'AnnotSerif'; src: url('/fonts/serif-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'AnnotSerif'; src: url('/fonts/serif-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  /* 브랜드: 마스코트의 보라 + 연필의 코랄 */
  --brand-50: #f4f1ff; --brand-100: #e9e3ff; --brand-200: #d4c8ff; --brand-400: #9a7bff;
  --brand-500: #7b55f6; --brand-600: #6a3fe8; --brand-700: #5630c4;
  --coral-500: #ff5d5d; --coral-50: #fff1f0; --mint-500: #14b8a6; --amber-500: #f5a524;
  --ink-900: #17151f; --ink-700: #3b3849; --ink-500: #6b6880; --ink-400: #8e8ba3;
  --line: #e7e5ef; --line-strong: #d6d3e2; --canvas: #f3f2f8; --surface: #ffffff;
  --radius-s: 8px; --radius-m: 12px; --radius-l: 20px; --radius-xl: 28px;
  --shadow-s: 0 1px 2px rgba(23, 21, 31, .06), 0 1px 3px rgba(23, 21, 31, .06);
  --shadow-m: 0 4px 12px rgba(23, 21, 31, .08), 0 1px 3px rgba(23, 21, 31, .06);
  --shadow-l: 0 18px 48px rgba(86, 48, 196, .18), 0 4px 12px rgba(23, 21, 31, .06);
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", "AnnotSans", sans-serif;

  /* 예전 화면 코드(주석·줄 편집 레이어)가 쓰는 이름 */
  --bg: var(--canvas); --text: var(--ink-900); --muted: var(--ink-500); --border: var(--line-strong);
  --accent: var(--brand-600); --accent-text: #fff; --accent-soft: rgba(106, 63, 232, .12);
  --danger: #c62828; --warn: #a35a00; --shadow: var(--shadow-m);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink-900); background: var(--surface); font-size: 16px; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 6px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── 버튼 ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; border-radius: var(--radius-m); padding: 10px 18px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; background: none; color: var(--ink-900); transition: background .15s, box-shadow .15s, border-color .15s, transform .05s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 2px 0 var(--brand-700); }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand-400); }
.btn-lg { padding: 14px 26px; font-size: 17px; border-radius: 14px; }
.btn-white { background: #fff; color: var(--brand-700); box-shadow: 0 6px 18px rgba(30, 10, 90, .25); }
.btn-white:hover { background: var(--brand-50); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; background: none; border: 0; color: var(--ink-700); cursor: pointer; padding: 0; }
.icon-btn:hover:not(:disabled) { background: var(--canvas); color: var(--ink-900); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ── 사이트 머리글·바닥글 (홈과 안내 페이지 공통) ───── */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1248px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; text-decoration: none; color: var(--ink-900); }
.logo img { width: 36px; height: 36px; }
.logo b { color: var(--brand-600); font-weight: 800; }
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--ink-700); padding: 8px 12px; border-radius: var(--radius-s); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--canvas); color: var(--ink-900); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { white-space: nowrap; font-size: 14px; color: var(--ink-500); text-decoration: none; padding: 8px 10px; border-radius: var(--radius-s); display: inline-flex; gap: 6px; align-items: center; }
.lang:hover { background: var(--canvas); color: var(--ink-900); }
.lang .icon { width: 16px; height: 16px; }

.site-footer { background: #fbfaff; border-top: 1px solid var(--line); padding: 56px 24px 32px; color: var(--ink-500); font-size: 15px; }
.site-footer .cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { margin: 0 0 12px; color: var(--ink-900); font-size: 15px; }
.site-footer a { display: block; text-decoration: none; padding: 4px 0; color: var(--ink-500); }
.site-footer a:hover { color: var(--ink-900); text-decoration: underline; }
.site-footer .logo { padding: 0; margin-bottom: 10px; color: var(--ink-900); }
.site-footer .bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.site-footer .bottom a { display: inline; }

/* ── 홈 ───────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 50% -10%, var(--brand-50), transparent 70%); padding: 56px 24px 40px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--brand-200); color: var(--brand-700); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-s); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-500); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; letter-spacing: -.035em; margin: 18px auto 14px; max-width: 880px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand-600); background: linear-gradient(transparent 68%, var(--brand-200) 68% 94%, transparent 94%); white-space: nowrap; padding: 0 .06em; }
.hero .sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-500); max-width: 640px; margin: 0 auto 32px; }

.dropzone { position: relative; max-width: 920px; margin: 0 auto; border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); padding: 10px; box-shadow: var(--shadow-l); }
.dropzone-inner { border: 2px dashed rgba(255, 255, 255, .45); border-radius: 22px; min-height: 300px; display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 12px; padding: 32px 40px; color: #fff; text-align: left; transition: background .15s, border-color .15s; }
.dropzone h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.dropzone p { margin: 0 0 22px; color: rgba(255, 255, 255, .88); }
.dropzone .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dropzone .hint { font-size: 14px; color: rgba(255, 255, 255, .78); }
.dropzone .mascot { width: 300px; height: auto; margin: -40px -20px -50px 0; filter: drop-shadow(0 18px 24px rgba(20, 0, 80, .35)); }
.dropzone.over .dropzone-inner { border-color: #fff; background: rgba(255, 255, 255, .12); }

.trust { display: flex; justify-content: center; gap: 12px 28px; flex-wrap: wrap; margin: 26px auto 0; color: var(--ink-700); font-size: 15px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { color: var(--mint-500); }

.section { padding: 80px 24px; }
.section.alt { background: var(--canvas); }
.section .inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head.left { text-align: left; margin: 0; }
.eyebrow { color: var(--brand-600); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.2; margin: 8px 0 12px; }
.section-head p { color: var(--ink-500); margin: 0; font-size: 17px; }

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-card { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); text-decoration: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-m); transform: translateY(-2px); }
.tool-card .tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.tool-card .tile .icon { width: 26px; height: 26px; stroke-width: 2; }
.tool-card h3 { margin: 2px 0 4px; font-size: 18px; letter-spacing: -.01em; }
.tool-card p { margin: 0; color: var(--ink-500); font-size: 15px; line-height: 1.5; }
.tool-card .tag { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; color: var(--coral-500); background: var(--coral-50); padding: 3px 8px; border-radius: 999px; }
.t-purple { background: var(--brand-100); color: var(--brand-700); }
.t-coral { background: #ffe3e1; color: #d63b3b; }
.t-mint { background: #d5f5f0; color: #0f8a7d; }
.t-amber { background: #fdefd3; color: #b26b00; }
.t-sky { background: #dceafe; color: #1d5fd1; }
.t-ink { background: #ebe9f3; color: var(--ink-700); }

.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.reverse .feature-art { order: 2; }
.feature h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.25; margin: 10px 0 14px; }
.feature p { color: var(--ink-500); font-size: 17px; margin: 0 0 18px; }
.feature ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.feature li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-700); }
.feature li .icon { color: var(--brand-600); margin-top: 3px; }
.feature-art { background: linear-gradient(160deg, var(--brand-50), #fff); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px; min-height: 340px; display: grid; place-items: center; }

.paper { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-m); padding: 26px 28px; font-size: 15px; color: #222; }
.paper .ttl { font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.paper .ln { height: 9px; border-radius: 5px; background: #e9e7f1; margin: 10px 0; }
.paper .edit-line { position: relative; margin: 14px -8px; padding: 6px 8px; border-radius: 8px; outline: 2px solid var(--brand-500); background: var(--brand-50); }
.paper .edit-line del { color: var(--ink-400); }
.paper .edit-line ins { text-decoration: none; background: #fff3a8; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--brand-600); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.paper .chip { position: absolute; right: 8px; top: -14px; font-size: 12px; font-weight: 700; background: var(--brand-600); color: #fff; padding: 2px 8px; border-radius: 999px; }

.local-art { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; width: 100%; max-width: 460px; }
.device { background: #fff; border-radius: 16px; box-shadow: var(--shadow-m); padding: 18px; text-align: center; font-size: 14px; color: var(--ink-500); }
.device .scr { height: 90px; border-radius: 10px; background: var(--brand-50); display: grid; place-items: center; margin-bottom: 10px; color: var(--brand-600); }
.device .scr .icon { width: 40px; height: 40px; }
.device b { color: var(--ink-900); }
.device.cloud { opacity: .5; }
.device.cloud .scr { background: #f1f0f5; color: var(--ink-400); }
.device.cloud b { color: var(--ink-500); }
.blocked { display: grid; justify-items: center; gap: 6px; color: var(--coral-500); font-weight: 700; font-size: 13px; }
.blocked .bar { width: 64px; height: 3px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.blocked .x { width: 30px; height: 30px; border-radius: 50%; background: var(--coral-50); display: grid; place-items: center; }
.blocked .x .icon { width: 16px; height: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--radius-l); padding: 28px; border: 1px solid var(--line); }
.step .num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-600); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--ink-500); }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; font-size: 16px; }
.compare th, .compare td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--ink-700); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--canvas); font-size: 15px; }
.compare .us { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.yes { color: var(--brand-700); font-weight: 800; }
.no { color: var(--ink-500); }

.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 4px 20px; }
.faq-list summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 24px; color: var(--brand-600); font-weight: 400; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { margin: 0 0 18px; color: var(--ink-500); }
.faq-list p a { color: var(--brand-700); }

.cta-band { max-width: 1152px; margin: 0 auto 80px; border-radius: var(--radius-xl); background: linear-gradient(120deg, var(--brand-600), var(--brand-500) 60%, #a07bff); color: #fff; padding: 48px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.cta-band h2 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.03em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); }

/* ── 편집 화면 ─────────────────────────────────────── */
body.in-app { background: var(--canvas); height: 100vh; height: 100dvh; overflow: hidden; }
#appView { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 60px minmax(0, 1fr); }
.app-top { background: #fff; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; gap: 12px; }
.app-top .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-top .logo img { width: 32px; height: 32px; }
.file-chip { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 12px; border-radius: 10px; }
.file-chip .pdf { font-size: 11px; font-weight: 800; color: #fff; background: var(--coral-500); border-radius: 5px; padding: 2px 6px; }
.file-chip .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; margin: 0; }
.file-chip .meta { color: var(--ink-400); font-size: 13px; white-space: nowrap; }
.local-note { color: var(--ink-400); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.local-note .icon { width: 16px; height: 16px; color: var(--mint-500); }
.app-top .center { display: flex; gap: 4px; }
.app-top .right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.workspace { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.workspace.no-rail { grid-template-columns: minmax(0, 1fr); }
.pages-rail { background: #fff; border-right: 1px solid var(--line); overflow: auto; padding: 16px 14px 24px; }
.rail-head { font-size: 13px; color: var(--ink-500); font-weight: 600; margin: 0 2px 12px; }
.thumb-list { display: block; }
.thumb { position: relative; margin: 0 auto; width: 140px; padding: 4px; border-radius: 10px; cursor: pointer; text-align: center; }
.thumb img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: var(--shadow-s); min-height: 60px; }
.thumb:hover { background: var(--canvas); }
.thumb.current { background: var(--brand-50); outline: 3px solid var(--brand-500); outline-offset: -1px; }
.thumb.dragging { opacity: .4; }
.thumb.drop-target { outline: 3px dashed var(--brand-500); outline-offset: 2px; }
.thumb-num { margin-top: 4px; font-size: 12px; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.thumb.current .thumb-num { color: var(--brand-700); font-weight: 700; }
.thumb-actions { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: none; gap: 2px; padding: 2px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-m); }
.thumb:hover .thumb-actions, .thumb:focus-within .thumb-actions { display: flex; }
.thumb-btn { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-700); cursor: pointer; }
.thumb-btn:hover { background: var(--canvas); color: var(--brand-700); }
.thumb-add { display: grid; place-items: center; margin: 6px auto; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px dashed var(--line-strong); color: var(--ink-400); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; opacity: .8; }
.thumb-add:hover, .thumb-add:focus-visible { border-color: var(--brand-400); color: var(--brand-600); opacity: 1; }

.stage-area { position: relative; overflow: auto; min-height: 0; min-width: 0; }
/* 위쪽 도구 모음과 스타일 바: 스크롤해도 따라온다 */
.chrome { position: sticky; top: 0; z-index: 30; padding: 14px 12px 0; pointer-events: none; display: grid; justify-items: center; gap: 8px; }
.chrome > * { pointer-events: auto; }
.tools { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-m); padding: 6px; max-width: 100%; }
.tool, .tb { position: relative; display: inline-grid; justify-items: center; gap: 2px; min-width: 62px; padding: 7px 8px 5px; border: 0; background: none; border-radius: 11px; color: var(--ink-700); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.3; }
.tool svg, .tb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool:hover, .tb:hover:not(:disabled) { background: var(--canvas); color: var(--ink-900); }
.tool.active, .tb.active { background: var(--brand-100); color: var(--brand-700); font-weight: 700; }
.tb:disabled { opacity: .4; cursor: default; }
.tool.star::before { content: ""; position: absolute; top: 5px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral-500); }
.sep { width: 1px; align-self: stretch; margin: 6px 6px; background: var(--line); flex: none; }
.shapes-wrap { position: relative; }
.shapes-wrap .tb > .caret-down { position: absolute; right: 6px; top: 12px; width: 10px; height: 10px; }
.shapes-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; display: flex; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-m); padding: 6px; }
.shapes-menu[hidden] { display: none; }
.tool-spacer { flex: 1; min-width: 6px; }

.stylebar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; max-width: min(100%, 900px); padding: 7px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-s); font-size: 13px; }
.field { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); }
.field input[type=number] { width: 64px; padding: 4px 6px; font: inherit; color: var(--ink-900); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; }
.field select { padding: 4px 6px; font: inherit; color: var(--ink-900); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; }
.field input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
.field input[type=range] { width: 96px; accent-color: var(--brand-600); }
.color-wrap { display: inline-flex; align-items: center; gap: 6px; }
.color-wrap .none { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; }
.swatches { display: inline-flex; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--brand-500); }
.btn.toggle { padding: 4px 10px; font-size: 14px; font-weight: 700; background: #fff; border-color: var(--line-strong); }
.btn.toggle.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.note { font-size: 12.5px; color: var(--ink-500); max-width: 640px; }

#viewer { min-width: 0; }
.stage-wrap { overflow: visible; padding: 22px 32px 24px; }
.stage { position: relative; width: max-content; margin: 0 auto; background: #fff; box-shadow: 0 2px 6px rgba(23, 21, 31, .08), 0 12px 32px rgba(23, 21, 31, .1); }
.stage img { display: block; max-width: none; user-select: none; }
.annot-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.annot-text { position: absolute; inset: 0; pointer-events: none; }
.overlay { position: absolute; inset: 0; }
.draw-layer { position: absolute; inset: 0; z-index: 6; touch-action: none; }
.stage:not([data-tool=edit]) .overlay { display: none; }

.stage:not([data-tool=select]) .annot-svg * { pointer-events: none !important; }
.stage[data-tool=select] .annot-svg .hit { cursor: move; }
.sel-box { stroke: var(--brand-500); stroke-width: 1.5; stroke-dasharray: 5 3; pointer-events: none; }
.handle { fill: #fff; stroke: var(--brand-500); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: all; }
.handle[data-h=nw], .handle[data-h=se] { cursor: nwse-resize; }
.handle[data-h=ne], .handle[data-h=sw] { cursor: nesw-resize; }
.handle[data-h=n], .handle[data-h=s] { cursor: ns-resize; }
.handle[data-h=e], .handle[data-h=w] { cursor: ew-resize; }
.handle[data-h=p1], .handle[data-h=p2] { cursor: crosshair; }

.t-annot { position: absolute; white-space: pre; line-height: 1.3; min-width: 14px; min-height: 1.3em; margin: 0; padding: 0; pointer-events: none; outline: none; }
.stage[data-tool=select] .t-annot { pointer-events: auto; cursor: move; }
.t-annot.selected { outline: 1.5px dashed var(--brand-500); outline-offset: 3px; }
.t-annot.editing { outline: 2px solid var(--brand-500); outline-offset: 3px; cursor: text; user-select: text; }

.line { position: absolute; padding: 0; margin: 0; border: 1.5px dashed transparent; border-radius: 3px; background: transparent; cursor: text; }
.line:hover, .line:focus-visible { background: rgba(123, 85, 246, .06); border-color: var(--brand-400); }
.line.active { border-color: transparent; background: transparent; }
.inline-wrap { position: absolute; z-index: 12; }
.inline-editor { display: block; white-space: pre; padding: 0 3px; border-radius: 3px; outline: 2px solid var(--brand-500); outline-offset: 0; box-shadow: 0 0 0 4px rgba(123, 85, 246, .18); caret-color: var(--brand-600); user-select: text; overflow: visible; }

.loading { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, .72); color: var(--ink-900); font-weight: 600; }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(0, 0, 0, .15); border-top-color: var(--brand-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pager { position: sticky; bottom: 18px; z-index: 25; width: max-content; margin: 0 auto 18px; display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--ink-900); color: #fff; border-radius: 14px; box-shadow: var(--shadow-l); font-size: 14px; }
.pager .icon-btn { width: 36px; height: 36px; color: #fff; font-size: 20px; line-height: 1; }
.pager .icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .14); color: #fff; }
.page-label, .zoom-label { min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.vsep { width: 1px; height: 22px; background: rgba(255, 255, 255, .22); margin: 0 4px; }

.log { max-width: 760px; margin: 8px auto 0; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); }
.log h2 { margin: 0 0 8px; font-size: 15px; }
.log ol { margin: 0; padding-left: 20px; }
.log li { margin: 6px 0; font-size: 14px; }
.log .detail { color: var(--ink-500); font-size: 12.5px; }
.log .warn { color: var(--warn); }

.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(380px, calc(100vw - 32px)); padding: 14px 18px; background: #fff; color: var(--ink-900); border: 1px solid var(--line); border-left: 4px solid var(--mint-500); border-radius: 12px; box-shadow: var(--shadow-l); z-index: 60; font-size: 14px; line-height: 1.5; }
.toast.error { border-left-color: var(--coral-500); }
.toast.warn { border-left-color: var(--amber-500); }

/* ── 반응형 ────────────────────────────────────────── */
@media (max-width: 960px) {
  .tools-grid, .steps { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-art { order: 0; }
  .dropzone-inner { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; }
  .dropzone .actions { justify-content: center; }
  .dropzone .mascot { width: 220px; margin: 0 auto -30px; order: -1; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .cta-band { grid-template-columns: 1fr; padding: 32px; margin-inline: 16px; }
}
@media (max-width: 900px) {
  .tools { overflow-x: auto; }
  .shapes-wrap { display: flex; align-items: center; }
  .shapes-menu { position: static; border: 0; box-shadow: none; padding: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .pages-rail { position: fixed; left: 0; top: 60px; bottom: 0; width: 180px; z-index: 40; box-shadow: var(--shadow-l); }
  .tool, .tb { min-width: 50px; font-size: 11px; padding-inline: 5px; }
  .file-chip .meta, .local-note { display: none; }
  .stage-wrap { padding: 16px 10px 16px; }
  .toast { left: 12px; right: 12px; bottom: 84px; max-width: none; }
}
@media (max-width: 600px) {
  .tools-grid, .steps { grid-template-columns: 1fr; }
  .site-header .inner { padding: 0 16px; gap: 12px; }
  .hero { padding: 36px 16px 32px; }
  .section { padding: 56px 16px; }
  .trust { font-size: 14px; }
  .compare th, .compare td { padding: 12px 10px; font-size: 14px; }
  .app-top { grid-template-columns: 1fr auto; padding: 0 10px; }
  .app-top .center { display: none; }
  .file-chip .name { max-width: 120px; }
  .app-top .right .btn span { display: none; }
}
