/* ════════════════════════════════════════════════════════
   imagemoa.com — Modern UI
   디자인 톤: Vercel / Linear / Toss 의 정제된 미니멀
   ════════════════════════════════════════════════════════ */

/* Pretendard — 현대 한국어 웹의 표준 폰트 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css');

:root {
  --bg:           #ffffff;
  --bg-soft:      #fafafa;
  --bg-card:      #ffffff;
  --bg-subtle:    #f4f4f5;
  --text:         #09090b;
  --text-muted:   #71717a;
  --text-dim:     #a1a1aa;
  --border:       #e4e4e7;
  --border-soft:  #f1f1f3;
  --accent:       #ff5a1f;
  --accent-dark:  #e44a14;
  --accent-soft:  #fff1ea;
  --success:      #10b981;
  --danger:       #ef4444;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  --transition:   all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ──────────────────────────────────────────
   네비게이션
   ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 100;
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.brand .dot { color: var(--accent); }

.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }

/* ──────────────────────────────────────────
   HERO
   ────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
}
/* eyebrow는 더 이상 사용 안 함 — 더 깔끔하게 */
.eyebrow { display: none; }

h1.headline {
  font-size: clamp(40px, 6.5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  color: var(--text);
}
/* 그라데이션 텍스트 제거 — 단색 검정 */
h1.headline .gradient {
  background: none;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}
.hero p.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ──────────────────────────────────────────
   URL 입력 카드 — Pixelcut 스타일 (검은 라운드)
   ────────────────────────────────────────── */
.url-card {
  max-width: 680px;
  margin: 0 auto 20px;
  background: #18181b;
  border: 1px solid #18181b;
  border-radius: 20px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}
.url-card:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); }
.url-card:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.18), 0 12px 40px rgba(0, 0, 0, 0.14);
}
.url-row { display: flex; gap: 8px; align-items: center; }
.url-row input[type="url"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  min-width: 0;
}
.url-row input[type="url"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.btn-primary {
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: calc(var(--radius-lg) - 6px);
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  background: #18181b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary svg { width: 16px; height: 16px; }

/* 메인 페이지 url-card 안에 들어가는 primary button — 흰색 라운드 (Pixelcut 스타일) */
.url-card .btn-primary {
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 14px 22px;
}
.url-card .btn-primary:hover {
  background: #f4f4f5;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-subtle);
}

.options-row {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 18px 0 0;
}
.opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.opt select, .opt input {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.opt select:focus, .opt input:focus { border-color: var(--text); }

.flash {
  max-width: 640px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.flash-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ──────────────────────────────────────────
   FEATURES / STEPS 섹션
   ────────────────────────────────────────── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 28px;
}
.section.compact { padding: 72px 28px; }
.section.bg-soft { background: var(--bg-soft); max-width: none; }
.section.bg-soft > .inner { max-width: 1100px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 820px) { .steps-grid { grid-template-columns: 1fr; } }
.step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.step h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ──────────────────────────────────────────
   CTA / 푸터
   ────────────────────────────────────────── */
.cta {
  text-align: center;
  padding: 96px 24px;
  border-top: 1px solid var(--border-soft);
}
.cta h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.cta p { color: var(--text-muted); margin-bottom: 24px; }

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* ════════════════════════════════════════════════════════
   결과 페이지
   ════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.topbar-logo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.topbar-logo .dot { color: var(--accent); }
.back {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.back:hover { color: var(--text); background: var(--bg-subtle); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ── 결과 페이지 메인 레이아웃 ──
   좌측: 미리보기 (sticky)  /  우측: 편집 패널
   양쪽에 넉넉한 여백, 가운데 정렬 */
.result-layout {
  display: grid;
  grid-template-columns: 720px minmax(0, 1fr); /* 미리보기 720, 편집 가변 */
  gap: 32px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 40px 80px;
  background: var(--bg-soft);
  min-height: calc(100vh - 60px);
}
.preview-pane { order: 1; }
.editor       { order: 2; }
@media (max-width: 1200px) {
  .result-layout {
    grid-template-columns: 1fr;
    padding: 24px 20px 60px;
    gap: 20px;
  }
  .preview-pane { order: 1; }
  .editor       { order: 2; }
}

.editor {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 200px;          /* sticky save bar가 마지막 카드 가리지 않도록 충분한 여백 */
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.editor > form > .save-bar {
  margin-top: 24px;
}
.editor-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.editor-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  transition: var(--transition);
}
.card:focus-within {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.card .card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.card .card-label .card-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-dim);
  text-transform: none;
}

/* ── 이미지 선택 그리드 ── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 1400px) { .image-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .image-grid { grid-template-columns: repeat(2, 1fr); } }

.image-pick {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: var(--transition);
}
.image-pick:hover { border-color: var(--text-muted); }
.image-pick input[type="checkbox"] {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
  accent-color: var(--accent);
}
.image-thumb {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--bg-subtle);
  transition: opacity 0.2s, filter 0.2s;
}
.image-num {
  position: absolute;
  bottom: 6px; left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 2;
}
/* 체크 해제 시 흐리게 + "제외됨" 라벨 */
.image-pick:has(input:not(:checked)) {
  border-color: var(--border);
  border-style: dashed;
}
.image-pick:has(input:not(:checked)) .image-thumb {
  opacity: 0.25;
  filter: grayscale(1);
}
.image-pick:has(input:not(:checked))::after {
  content: "제외됨";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  background: rgba(255,255,255,0.95);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 1;
}
.image-pick:has(input:checked) {
  border-color: var(--accent);
}

/* 드래그 핸들 */
.drag-handle {
  position: absolute;
  top: 6px; left: 8px;
  z-index: 3;
  cursor: grab;
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.55);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  font-weight: 800;
  letter-spacing: -2px;
}
.drag-handle:active { cursor: grabbing; }
.image-pick-ghost {
  opacity: 0.4;
}
.image-pick-dragging {
  opacity: 0.9;
  transform: rotate(2deg);
  box-shadow: var(--shadow-lg);
}

/* 내 사진 업로드 영역 */
.upload-area {
  margin-top: 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: var(--text);
}
.upload-label svg {
  flex-shrink: 0;
  color: var(--text-muted);
}
.upload-area:hover .upload-label svg { color: var(--accent); }
.upload-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.field { display: block; }
.field + .field { margin-top: 16px; }
.field .label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field .label-hint {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 11px;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}
.label-row .label { margin-bottom: 0; }

/* 섹션 표시 토글 스위치 */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
}
.toggle input { display: none; }
.toggle-track {
  width: 28px;
  height: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute;
  top: 1px; left: 1px;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: var(--transition);
}
.toggle input:checked ~ .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle input:checked ~ .toggle-track .toggle-thumb {
  left: 13px;
}
.toggle-text { font-weight: 500; }

/* 숨김 처리된 필드 — 흐릿하게 */
.field-hidden .label { color: var(--text-dim); text-decoration: line-through; }
.field-hidden textarea,
.field-hidden input[type="text"] {
  opacity: 0.45;
  background: var(--bg-subtle);
}
.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 14px;
  padding: 11px 14px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  line-height: 1.55;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--text);
}
.field textarea { resize: vertical; min-height: 80px; }

.save-bar {
  position: sticky; bottom: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  margin: 32px -28px 0;          /* bottom negative margin 제거 — 마지막 카드 가리지 않게 */
  padding: 16px 28px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: flex-end;
  z-index: 5;
}

/* 상단 sticky 저장 액션 바 */
.save-bar-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  margin: -32px -28px 20px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.bulk-toggles {
  display: flex;
  gap: 8px;
}
.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.chip-btn:hover {
  border-color: var(--text);
  background: var(--bg-subtle);
}

/* 카드 안 힌트 텍스트 */
.card-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -8px 0 14px;
  line-height: 1.5;
}

/* 스펙 테이블 동적 행 */
.spec-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-row {
  display: grid;
  grid-template-columns: 20px 90px 1fr 28px;
  gap: 8px;
  align-items: center;
}
.spec-handle {
  cursor: grab;
  color: var(--text-dim);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -2px;
  text-align: center;
  user-select: none;
}
.spec-handle:active { cursor: grabbing; }
.spec-row input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.spec-row input:focus { border-color: var(--text); }
.spec-key { font-weight: 500; }
.spec-del {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.spec-del:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fef2f2;
}
.spec-row-ghost { opacity: 0.4; }

.add-row-btn {
  margin-top: 12px;
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.add-row-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* 마크업 툴바 */
.markup-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  padding: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.markup-toolbar button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  min-width: 32px;
}
.markup-toolbar button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.markup-toolbar button b { font-weight: 700; }
.markup-toolbar button i { font-style: italic; }

/* 큰 텍스트 영역 (rich edit) */
.rich-edit {
  font-size: 14px !important;
  line-height: 1.75 !important;
  padding: 14px !important;
  min-height: 100px;
}

/* WYSIWYG 에디터 */
.wysiwyg {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}
.wysiwyg:focus-within { border-color: var(--text); }
.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
}
.wysiwyg-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  min-width: 30px;
  line-height: 1;
}
.wysiwyg-toolbar button:hover {
  background: var(--bg-card);
  border-color: var(--border);
}
.wysiwyg-toolbar button:active,
.wysiwyg-toolbar button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.wysiwyg-toolbar button.active:hover {
  background: var(--accent-dark);
}
.wysiwyg-toolbar button.del:hover {
  color: var(--danger);
}
.wysiwyg-toolbar .sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}
.wysiwyg-area {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  outline: none;
  word-break: break-word;
}
.wysiwyg-area:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dim);
}
.wysiwyg-area h3 { font-size: 18px; font-weight: 700; margin: 8px 0; }
.wysiwyg-area h4 { font-size: 15px; font-weight: 700; margin: 6px 0; }
.wysiwyg-area p { margin: 4px 0; }
.wysiwyg-area mark { background: #fff4ee; padding: 1px 4px; }
.wysiwyg-area font[size="5"] { font-size: 1.25em; font-weight: 600; }
.card-hint code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text);
}

/* ── 서버 저장(Cloudinary) 결과 모달 ── */
.cloud-result-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;     /* 상단 정렬 + 자체 스크롤 — 콘텐츠가 viewport보다 커도 짤리지 않음 */
  justify-content: center;
  z-index: 1000;
  padding: 40px 20px;
  overflow-y: auto;             /* 모달 컨테이너에서 스크롤 */
  -webkit-overflow-scrolling: touch;
}
/* HTML hidden 속성을 CSS display:flex가 덮어쓰는 문제 방지 */
.cloud-result-modal[hidden] { display: none !important; }
.cloud-result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;            /* 듀얼 카드 들어가도록 살짝 크게 */
  width: 100%;
  margin: auto 0;
  box-shadow: var(--shadow-lg);
}
.cloud-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cloud-result-head strong {
  font-size: 18px;
  font-weight: 700;
}
.close-x {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 50%;
}
.close-x:hover { background: var(--bg-subtle); color: var(--text); }
.cloud-result-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.cloud-url-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.cloud-url-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text);
  background: var(--bg-subtle);
}
.cloud-url-row button {
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cloud-url-row button:hover { background: #18181b; }
.cloud-thumb {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 320px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.cloud-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.raw {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 16px;
}
.raw h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.raw dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 16px; }
.raw dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
.raw dd {
  color: var(--text);
  font-size: 13px;
  word-break: break-all;
}
.raw dd a { color: var(--accent-dark); }

.preview-pane {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 24px;                 /* topbar에 거의 붙임 */
  align-self: start;
  height: calc(100vh - 48px); /* 거의 화면 전체 */
}
@media (max-width: 1200px) {
  .preview-pane {
    position: relative;
    top: 0;
    height: 1000px;
  }
}
.preview-frame-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
}
.preview-frame-label::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}
.preview-frame {
  flex: 1;
  border: none;
  width: 100%;
  min-height: 600px;
  background: var(--bg-soft);
}

/* ──────────────────────────────────────────
   결과 모달 — 듀얼 URL (상세 + 대표이미지)
   ────────────────────────────────────────── */
.cloud-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .cloud-result-grid { grid-template-columns: 1fr; }
}
.cloud-result-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--bg-soft);
}
.cloud-result-item h4 {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.cloud-result-item .badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--text);
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cloud-result-item .badge.detail { background: var(--accent); }
.cloud-result-item .thumb-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-soft);
}
.cloud-result-item .thumb-preview img {
  width: 100%; height: 100%; object-fit: contain;
}
.cloud-result-item.detail-item .thumb-preview {
  aspect-ratio: auto;
  max-height: 320px;
  align-items: flex-start;
}
.cloud-result-item.detail-item .thumb-preview img {
  object-fit: cover; object-position: top;
}
.cloud-result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.cloud-result-footer a {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
}

/* ──────────────────────────────────────────
   갤러리 페이지
   ────────────────────────────────────────── */
.gallery-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.gallery-head {
  margin-bottom: 32px;
}
.gallery-head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.gallery-sub {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 720px;
}
.gallery-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid #fee2e2;
  margin-bottom: 24px;
}
.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.gallery-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.gallery-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gallery-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery-info {
  padding: 14px 16px 10px;
}
.gallery-sku {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-all;
}
.gallery-title {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-meta {
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", monospace;
}
.gallery-urls {
  padding: 8px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border-soft);
}
.gallery-url-row {
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 6px 8px;
}
.gallery-url-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text);
  min-width: 0;
}
.gallery-url-row input:focus { outline: none; }
.gallery-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--text);
  color: #fff;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.gallery-badge.gallery-badge-detail { background: var(--accent); }
.copy-btn, .dl-btn {
  border: none;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px;
}
.copy-btn.copied { background: var(--success); }
.dl-btn { padding: 5px 8px; font-size: 14px; }
.gallery-actions {
  padding: 0 16px 14px;
  display: flex; justify-content: flex-end;
}
.gallery-del {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}
.gallery-del:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ──────────────────────────────────────────
   Google 로그인 버튼 + 사용자 칩
   ────────────────────────────────────────── */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-google:hover {
  background: #f6f8fb;
  border-color: #c8cbcf;
  box-shadow: var(--shadow-sm);
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip img {
  width: 24px; height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ──────────────────────────────────────────
   Admin 페이지
   ────────────────────────────────────────── */
.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.admin-header { margin-bottom: 32px; }
.admin-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.admin-sub { color: var(--text-muted); font-size: 14px; }
.admin-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 4px;
  vertical-align: middle;
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.admin-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.count-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.admin-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, "SF Mono", monospace;
  line-height: 1.7;
}
.admin-empty { color: var(--text-muted); font-size: 14px; padding: 12px 0; }
.admin-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.status-pill.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.status-pill.off { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-pill.info { background: var(--bg-subtle); color: var(--text); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.stat-block {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--text-muted); }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .mono { font-family: ui-monospace, "SF Mono", monospace; }
.admin-table .small { font-size: 11px; color: var(--text-muted); }
.user-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.badge-admin {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.message-list { display: flex; flex-direction: column; gap: 12px; }
.message-item {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
}
.message-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}
.topic-tag {
  background: var(--text);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.message-time { margin-left: auto; }
.message-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}
.message-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: ui-monospace, "SF Mono", monospace;
}

/* ──────────────────────────────────────────
   법적 문서 페이지 (이용약관/개인정보처리방침/환불정책)
   ────────────────────────────────────────── */
.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 32px;
}
.legal-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal-meta {
  color: var(--text-muted);
  font-size: 13px;
}
.legal-content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}
.legal-content h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 10px 0; }
.legal-content ol, .legal-content ul {
  padding-left: 22px;
  margin: 10px 0;
}
.legal-content li { margin: 6px 0; }
.legal-content a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover { color: var(--accent); }
.legal-content .legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}
.legal-content .legal-table th,
.legal-content .legal-table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.legal-content .legal-table th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.legal-footer {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}
.legal-footer strong { color: var(--text); }

/* 푸터 링크 통일 */
.footer a {
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.footer a:hover { opacity: 1; text-decoration: underline; }

/* pricing 페이지 약관 동의 안내 */
.pricing-legal-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: -32px auto 48px;
  max-width: 720px;
  line-height: 1.6;
}
.pricing-legal-note a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricing-legal-note a:hover { color: var(--text); }

/* ──────────────────────────────────────────
   요금제 페이지
   ────────────────────────────────────────── */
.pricing-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}
.pricing-header { text-align: center; margin-bottom: 48px; }
.pricing-header h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.pricing-sub { color: var(--text-muted); font-size: 16px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto 60px;
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; }
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}
.pricing-card.highlight {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.pricing-badge {
  position: absolute;
  top: -10px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.pricing-plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.pricing-card.highlight .pricing-plan-name { color: #fff; }

.pricing-price {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 8px;
}
.price-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price-period {
  font-size: 14px;
  color: var(--text-muted);
}
.pricing-card.highlight .price-period { color: rgba(255,255,255,0.6); }

.pricing-quota {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.pricing-card.highlight .pricing-quota {
  color: rgba(255,255,255,0.85);
  border-bottom-color: rgba(255,255,255,0.15);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}
.pricing-features li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 14px;
  color: var(--text);
}
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.pricing-card.highlight .pricing-features li { color: #fff; }
.pricing-card.highlight .pricing-features li::before { color: #4ade80; }

.pricing-cta-wrap { margin-top: auto; }
.pricing-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--bg-subtle);
  color: var(--text);
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}
.pricing-cta:hover { background: var(--text); color: #fff; }
.pricing-cta.primary { background: var(--accent); color: #fff; }
.pricing-cta.primary:hover { background: var(--accent-dark); }
.pricing-card.highlight .pricing-cta {
  background: #fff;
  color: var(--text);
}
.pricing-card.highlight .pricing-cta:hover { background: #f4f4f5; }
.pricing-cta.disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}
.pricing-cta.disabled:hover { background: var(--bg-subtle); color: var(--text-muted); }

.pricing-faq {
  max-width: 720px;
  margin: 0 auto;
}
.pricing-faq h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}
.pricing-faq-item {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.pricing-faq-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}
.pricing-faq-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ──────────────────────────────────────────
   연락처 페이지
   ────────────────────────────────────────── */
.contact-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}
.contact-card h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.contact-lead {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 36px;
}
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}
.contact-channel:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.contact-channel-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-channel-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.contact-channel-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", monospace;
}
.contact-form {
  border-top: 1px solid var(--border-soft);
  padding-top: 36px;
}
.contact-form h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}
.contact-form .field {
  margin-bottom: 18px;
}
.contact-form .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.nav-link.active { color: var(--accent); font-weight: 600; }

/* ──────────────────────────────────────────
   로딩 오버레이 (URL 처리 중 풀스크린)
   ────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.loading-overlay[hidden] { display: none !important; }
.loading-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.loading-spinner {
  margin: 0 auto 28px;
  width: 64px; height: 64px;
}
.loading-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.loading-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}
.loading-sub strong { color: var(--accent); font-weight: 700; }
.loading-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  display: inline-block;
}
.loading-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  font-size: 14px;
  color: var(--text-dim);
  transition: var(--transition);
}
.loading-steps li .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.loading-steps li.active {
  color: var(--accent);
  font-weight: 600;
}
.loading-steps li.active .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15);
  animation: loadingPulse 1.2s ease-in-out infinite;
}
.loading-steps li.done {
  color: var(--text-muted);
}
.loading-steps li.done .dot {
  background: var(--success);
}
@keyframes loadingPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 90, 31, 0.05); }
}
.loading-progress {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 320px;
}
.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

/* ──────────────────────────────────────────
   사용량 배너 (베타)
   ────────────────────────────────────────── */
.quota-banner {
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.quota-banner-info {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid #ffd9c2;
}
.quota-banner-warning {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.quota-banner strong { font-weight: 700; }

/* ──────────────────────────────────────────
   "직접 만들기" 진입 (메인 페이지)
   ────────────────────────────────────────── */
.manual-entry {
  margin-top: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.manual-divider {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 0 4px;
}
.btn-text {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-text:hover {
  border-color: var(--accent);
  color: var(--accent);
  border-style: solid;
}
