/* 누끼랩 — 라이트 테마 전용, 민트/틸 액센트, 사진 스튜디오 느낌 */

:root {
  --accent: #14b8a6;
  --accent-dark: #0d9488;
  --accent-soft: #ccfbf1;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --radius: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ── 헤더 ─────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 9px;
}

.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ── 프라이버시 뱃지 ──────────────────────────── */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 12px;
  margin: 0 0 14px;
}

/* ── 타이포 ───────────────────────────────────── */
h1 {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 8px 0 6px;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 28px 0 10px;
}

h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
}

.lead {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.82rem;
}

/* ── 카드 ─────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px 0;
}

/* ── 버튼 ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.12s ease;
}

.btn:hover {
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.18);
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 드롭존 ───────────────────────────────────── */
.dropzone {
  border: 2px dashed #99e5db;
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #ecfdf9;
}

.dropzone .dz-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 6px;
}

.dropzone p {
  margin: 4px 0;
}

.dropzone .dz-hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.dropzone input[type="file"] {
  display: none;
}

/* ── AI 상태/진행률 ───────────────────────────── */
.ai-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0fdfa;
  border: 1px solid #99e5db;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.progress {
  height: 8px;
  background: #d5f5ef;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* ── 에러 배너 ────────────────────────────────── */
.error-banner {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ── 체커보드(투명 표현) ──────────────────────── */
.checkerboard {
  background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #fff;
}

/* ── 전후 비교 슬라이더 ───────────────────────── */
.compare {
  position: relative;
  width: 100%;
  max-height: 560px;
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  border: 1px solid var(--line);
  background: #f3f4f6;
}

.compare img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.compare-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.compare-after-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.compare-label {
  position: absolute;
  top: 10px;
  background: rgba(31, 41, 55, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
}

.compare-label-l {
  left: 10px;
}

.compare-label-r {
  right: 10px;
}

/* ── 처리중 스피너 ────────────────────────────── */
.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--ink-soft);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 증명사진 스튜디오 ────────────────────────── */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 760px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.editor-stage {
  display: grid;
  place-items: center;
  padding: 18px;
}

#editor-canvas {
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  max-width: 100%;
  cursor: grab;
}

#editor-canvas:active {
  cursor: grabbing;
}

.control-row {
  margin: 12px 0;
}

.control-row label,
.control-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 5px;
}

select.input,
input.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

select.input:focus,
input.input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.bg-buttons {
  display: flex;
  gap: 8px;
}

.bg-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg, #fff);
  background-color: var(--bg);
  cursor: pointer;
}

.bg-btn.active {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.result-preview {
  max-width: 100%;
  max-height: 420px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto 10px;
}

.result-card {
  text-align: center;
}

/* ── 폼 그리드(resize) ────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── SEO/콘텐츠 섹션 ──────────────────────────── */
.seo-section {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.seo-section h2 {
  font-size: 1.15rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 16px;
  margin: 8px 0;
  background: var(--card);
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.guide-body p,
.guide-body li {
  font-size: 0.96rem;
}

.guide-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 12px 0;
}

.guide-body th,
.guide-body td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.guide-body th {
  background: #f0fdfa;
}

.source-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent-soft);
  padding-left: 10px;
  margin: 14px 0;
}

/* ── 툴 링크 카드 ─────────────────────────────── */
.tool-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.tool-link {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.tool-link:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 12px rgba(20, 184, 166, 0.16);
}

.tool-link strong {
  display: block;
  margin-bottom: 4px;
}

.tool-link span {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* ── 쿠팡 배너/공지 ───────────────────────────── */
.promo {
  margin: 16px 0;
  text-align: center;
}

.coupang-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0;
  min-height: 90px;
  overflow-x: hidden;
}

.promo-disclosure {
  font-size: 0.72rem;
  color: #888;
  margin-top: 6px;
}

/* ── 사이드 레일 ──────────────────────────────── */
.side-rail {
  position: fixed;
  top: 90px;
  width: 160px;
  display: none;
  z-index: 5;
}

@media (min-width: 1120px) {
  .side-rail {
    display: block;
  }
}

.side-l {
  left: calc(50% - 544px);
}

.side-r {
  left: calc(50% + 384px);
}

/* ── 푸터 ─────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding: 18px 0 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.footer a {
  color: var(--ink-soft);
}
