:root {
  --accent: #ff4d6d;
  --accent-dark: #e63a5b;
  --accent-soft: #fff0f3;
  --ink: #1c1c1e;
  --ink-sub: #6b6b70;
  --ink-faint: #9a9aa0;
  --line: #ececef;
  --bg: #ffffff;
  --bg-soft: #f8f8fa;
  --radius: 16px;
  --good-bg: #e9f7ef;
  --good-ink: #1d7a4f;
  --good-deep: #11553a;
  --bad-bg: #fdecee;
  --bad-ink: #c0394f;
  --bad-deep: #8e2436;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 12px 24px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #ff4d6d, #ff7a8e);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 77, 109, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 26px rgba(255, 77, 109, 0.45); transform: translateY(-1px); }
.btn-lg { font-size: 17px; padding: 16px 36px; }
.btn-small { font-size: 14px; padding: 9px 18px; background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo::first-letter { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 20px 48px;
  text-align: center;
}
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #ffd6de;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(26px, 5.4vw, 42px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(15px, 2.6vw, 18px);
  color: var(--ink-sub);
  margin-bottom: 28px;
}
.hero-note { font-size: 13px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 16px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  width: 190px;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 20px 8px;
}
.section h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 10px;
}
.section-sub {
  font-size: clamp(14px, 2.4vw, 16px);
  color: var(--ink-sub);
  text-align: center;
  margin-bottom: 36px;
}

/* ---------- compare ---------- */
.compare-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}
.compare-card {
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  border: 1.5px solid;
}
.compare-card.bad { background: #fff; border-color: #f6cdd3; }
.compare-card.good {
  background: #fff;
  border-color: #bfe3cf;
  box-shadow: 0 10px 30px rgba(29, 122, 79, 0.1);
}
.compare-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.bad .compare-label { background: var(--bad-bg); color: var(--bad-deep); }
.good .compare-label { background: var(--good-bg); color: var(--good-deep); }
.compare-followers { font-size: 14px; color: var(--ink-sub); margin-bottom: 12px; }
.compare-followers strong { font-size: 24px; font-weight: 800; color: var(--ink); margin-left: 2px; }
.dot-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e9e9ee;
  opacity: 0.35;
  transform: scale(0.4);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.bad .dot.on { background: var(--bad-ink); }
.good .dot.on { background: var(--good-ink); }
.visible .dot { opacity: 1; transform: scale(1); }
.dot-caption {
  font-size: 12px;
  color: var(--ink-sub);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dot-sample {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-sample.off { background: #e9e9ee; margin-left: 10px; }
.bad .dot-sample.on { background: var(--bad-ink); }
.good .dot-sample.on { background: var(--good-ink); }
.compare-result { border-top: 1px dashed var(--line); padding-top: 12px; }
.compare-result-label { font-size: 12px; color: var(--ink-faint); }
.compare-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.bad .compare-num { color: var(--bad-ink); }
.good .compare-num { color: var(--good-ink); }
.vs-badge {
  align-self: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-faint);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.compare-callout {
  text-align: center;
  font-size: clamp(15px, 2.6vw, 18px);
  color: var(--ink-sub);
  margin-top: 28px;
}
.compare-callout strong {
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 1.25em;
}
@media (max-width: 680px) {
  .compare-wrap { grid-template-columns: 1fr; }
  .vs-badge { justify-self: center; margin: -4px 0; }
}

/* ---------- steps timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 14%;
  right: 14%;
  border-top: 2px dashed #ffd6de;
}
.timeline-step { text-align: center; position: relative; padding: 0 8px; }
.timeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #ff7a8e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px rgba(255, 77, 109, 0.3);
  position: relative;
  z-index: 1;
}
.timeline-icon svg { width: 24px; height: 24px; }
.timeline-body { min-width: 0; }
.step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid #ffd6de;
  padding: 2px 9px;
  border-radius: 999px;
}
.step-body { font-size: 14px; color: var(--ink-sub); max-width: 240px; margin: 0 auto; }
@media (max-width: 680px) {
  .timeline { grid-template-columns: 1fr; gap: 28px; }
  .timeline::before {
    top: 28px;
    bottom: 28px;
    left: 27px;
    right: auto;
    border-top: none;
    border-left: 2px dashed #ffd6de;
  }
  .timeline-step { display: flex; gap: 16px; text-align: left; align-items: flex-start; padding: 0; }
  .timeline-icon { margin: 0; flex-shrink: 0; }
  .step-title { justify-content: flex-start; }
  .step-body { margin: 0; max-width: none; }
}

/* ---------- match chips ---------- */
.match-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto 28px;
}
.chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sub);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}
.chip:hover { border-color: #ffb3c1; color: var(--accent-dark); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
}

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 720px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.inf-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.35s ease, filter 0.35s ease, border-color 0.25s ease;
}
.gallery-grid.matching .inf-card:not(.matched) {
  opacity: 0.35;
  filter: grayscale(0.7);
}
.inf-card.matched {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(255, 77, 109, 0.25);
  transform: translateY(-4px);
}
.inf-photo { position: relative; }
.match-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 77, 109, 0.4);
  animation: badge-pop 0.3s ease;
}
@keyframes badge-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.match-reason {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
  line-height: 1.5;
  animation: badge-pop 0.3s ease;
}
.inf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.inf-photo { aspect-ratio: 4 / 5; overflow: hidden; }
.inf-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.inf-card:hover .inf-photo img { transform: scale(1.05); }
.inf-info { padding: 12px 14px 14px; }
.inf-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.inf-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.inf-meta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.inf-persona {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.persona-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.persona-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}
.inf-photo-placeholder {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #e8eefc, #d7e3f8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.inf-photo-placeholder span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: #185fa5;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wish-banner {
  margin-top: 20px;
  border: 2px dashed #ffb3c1;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
}
.wish-title { font-size: 16px; font-weight: 800; color: var(--accent-dark); line-height: 1.45; }
.wish-body { font-size: 13px; color: var(--ink-sub); line-height: 1.6; margin-top: 4px; }
.wish-banner .btn { background: var(--accent); color: #fff; flex-shrink: 0; }
.gallery-note {
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 16px;
}
.label-optional { font-weight: 400; color: var(--ink-faint); font-size: 13px; }

/* ---------- form ---------- */
.apply-form { max-width: 480px; margin: 0 auto; }
.field { margin-bottom: 18px; flex: 1; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.field input.invalid,
.field textarea.invalid { border-color: var(--bad-ink); }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { min-width: 200px; }
.error-msg {
  font-size: 12px;
  color: var(--bad-ink);
  margin-top: 4px;
  min-height: 0;
}
.form-note {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 12px;
  text-align: center;
}

/* ---------- footer ---------- */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 28px 20px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer a { color: var(--ink-sub); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  animation: pop 0.25s ease;
}
@keyframes pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--good-bg);
  color: var(--good-ink);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.modal-body { font-size: 14px; color: var(--ink-sub); margin-bottom: 20px; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- misc ---------- */
.mobile-br { display: none; }
@media (max-width: 560px) {
  .mobile-br { display: inline; }
  .marquee-track img { width: 150px; height: 200px; }
  .hero { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .inf-card, .inf-photo img, .btn { transition: none; }
  .dot { transition: none; opacity: 1; transform: none; }
}
