*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a2e;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
}

.header-inner nav a {
  font-size: 0.85rem;
  color: #6b7280;
  text-decoration: none;
}

.header-inner nav a:hover { color: #1a1a2e; }

/* ── Page layout ── */
.page-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 56px 0 32px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: #1a1a2e;
}

.hero-desc {
  margin-top: 16px;
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.7;
}

/* ── Tool section ── */
.tool-section {
  max-width: 420px;
  margin: 0 auto 56px;
}

/* Unsupported banner */
.banner {
  width: 100%;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #7d5200;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 12px;
}

.banner.hidden { display: none; }

/* Card */
.card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* Swatch */
.swatch {
  width: 100%;
  height: 180px;
  transition: background-color 0.25s ease;
}

.swatch.empty {
  background: #f9fafb;
  border-bottom: 1px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swatch.empty::after {
  content: "색상을 추출하면 여기에 표시됩니다";
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Format rows */
.formats {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.format-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.format-row:last-child { border-bottom: none; }

.format-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  width: 32px;
  flex-shrink: 0;
}

.format-value {
  flex: 1;
  font-size: 0.9rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Menlo', monospace;
  color: #374151;
  user-select: all;
}

/* Copy button */
.copy-btn {
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.copy-btn:hover:not(:disabled) { background: #e5e7eb; }
.copy-btn:disabled { opacity: 0.4; cursor: default; }

.copy-btn.copied {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

/* Pick button */
.pick-btn {
  margin: 16px 20px 20px;
  padding: 13px 20px;
  width: calc(100% - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: #1a1a2e;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.pick-btn:hover:not(:disabled) { background: #2d2d4e; }
.pick-btn:active:not(:disabled) { transform: scale(0.98); }
.pick-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Content sections ── */
.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

/* Steps */
.steps {
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 48px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.steps li strong {
  font-size: 1rem;
  color: #1a1a2e;
  line-height: 32px;
}

.steps li p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
}

/* Format cards */
.format-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.format-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.format-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.format-card p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 8px;
}

.format-card p.example {
  margin-bottom: 0;
  color: #374151;
}

code {
  font-family: 'SFMono-Regular', 'Consolas', 'Menlo', monospace;
  font-size: 0.85em;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  color: #1a1a2e;
}

/* Use cases */
.usecase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.usecase-list li {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.usecase-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #1a1a2e;
  font-weight: 700;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid #e5e7eb;
}

.faq-item:last-child { border-bottom: none; }

.faq-item dt {
  font-size: 0.975rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.faq-item dd {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}

/* ── Footer ── */
.site-footer {
  background: #1a1a2e;
  color: #9ca3af;
  padding: 40px 24px;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-nav {
  margin-bottom: 16px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: #9ca3af;
  text-decoration: none;
}

.footer-nav a:hover { color: #fff; }

.footer-copy {
  font-size: 0.8rem;
  color: #6b7280;
}
