:root {
  color-scheme: light;
  --ink: #1c1b1f;
  --ink-soft: #3f3a37;
  --paper: #f8f2ea;
  --accent: #ff8c5a;
  --accent-deep: #f26b3a;
  --teal: #1f8a7b;
  --mint: #cfe9df;
  --sun: #ffd670;
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "DM Serif Display", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff3df 0%, #f7e9d6 40%, #efe4d3 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(0);
  opacity: 0.7;
  z-index: -2;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 214, 112, 0.9) 0%, rgba(255, 214, 112, 0.2) 70%, transparent 100%);
  top: -120px;
  left: -80px;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(31, 138, 123, 0.5) 0%, rgba(31, 138, 123, 0.1) 70%, transparent 100%);
  bottom: -220px;
  right: -120px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  z-index: -3;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 6vw 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

.brand-text {
  font-size: 18px;
}

.tagline {
  font-size: 14px;
  color: var(--ink-soft);
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 6vw 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  line-height: 1.05;
  margin: 14px 0 18px;
}

.accent {
  color: var(--accent-deep);
  display: inline-block;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
}

.lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 440px;
}

.gender-toggle {
  margin-top: 20px;
  display: inline-flex;
  background: var(--card);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}

.toggle-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

.upload-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.upload-card::after {
  content: "";
  position: absolute;
  inset: auto -40% -60% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 140, 90, 0.2) 0%, transparent 70%);
  z-index: 0;
}

.upload-head {
  position: relative;
  z-index: 1;
}

.upload-head h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.upload-head p {
  margin: 0;
  color: var(--ink-soft);
}

.dropzone {
  display: block;
  margin: 20px 0 14px;
  border: 2px dashed #e0d7cb;
  border-radius: var(--radius-md);
  padding: 22px;
  background: #fffaf2;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  z-index: 1;
}

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

.dropzone input {
  display: none;
}

.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.dropzone-text strong {
  display: block;
  font-size: 1rem;
}

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

.preview {
  margin-top: 16px;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  display: none;
}

.preview.is-visible {
  display: block;
}

.privacy {
  margin: 6px 0 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.status {
  margin: 10px 0 0;
  min-height: 1.1em;
  font-size: 0.9rem;
  color: var(--teal);
}

.cta {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-deep);
}

.loader {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--ink-soft);
}

.loader span {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  animation: bounce 0.8s infinite ease-in-out;
}

.loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.result {
  margin-top: 46px;
  animation: fadeUp 0.6s ease forwards;
}

.result-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint);
  color: var(--teal);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.result-card h2 {
  margin: 10px 0 6px;
  font-size: 2rem;
}

.result-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.result-actions {
  margin-top: 18px;
}

.ghost {
  border: 1px solid #ddd2c5;
  background: transparent;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.disclaimer {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #8b7f74;
}

.site-footer {
  padding: 40px 6vw 50px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }

  .upload-card {
    padding: 22px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
