:root {
  --bg: #faf5eb;
  --ink: #1b1f28;
  --muted: #5e6373;
  --card: rgba(255, 255, 255, 0.78);
  --line: rgba(27, 31, 40, 0.12);
  --accent: #ff6b3d;
  --accent-2: #1f8a70;
  --shadow: 0 18px 40px rgba(45, 35, 20, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "IBM Plex Sans KR", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #ffd9ba 0%, transparent 40%),
    radial-gradient(circle at 90% 18%, #b9efd7 0%, transparent 35%),
    linear-gradient(145deg, #fffaf1 0%, #f7efe2 35%, #f0f4ef 100%);
  line-height: 1.5;
  padding: 28px 18px 60px;
}

.bg-glow {
  position: fixed;
  width: 40vw;
  max-width: 480px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  animation: floaty 8s ease-in-out infinite;
}

.bg-glow-1 {
  background: #ffb58f;
  top: -12vh;
  left: -10vw;
}

.bg-glow-2 {
  background: #88d7bf;
  right: -8vw;
  bottom: 5vh;
  animation-delay: 1.8s;
}

.hero,
.panel,
footer {
  width: min(980px, 100%);
  margin: 0 auto;
}

.hero {
  padding: 24px 12px 12px;
  animation: fadeUp 0.7s ease-out both;
}

.chip {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent-2);
  border: 1px solid rgba(31, 138, 112, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.55);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 14px;
}

.hero-subtitle {
  margin: -6px 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-2);
}

.hero-copy {
  max-width: 640px;
  color: var(--muted);
}

.hero-cta {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff6b3d, #f2476d);
  box-shadow: 0 10px 25px rgba(242, 71, 109, 0.28);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

main {
  margin-top: 16px;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  border-radius: 22px;
  padding: 22px;
  margin-top: 16px;
  animation: fadeUp 0.7s ease-out both;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head p,
.tiny-note,
.metric-sub,
label,
.plan p {
  color: var(--muted);
}

.basic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.external-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.wizard-intro {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 14px;
}

.wizard-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 14px;
}

.wizard-head {
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(27, 31, 40, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff6b3d, #1f8a70);
  transition: width 0.2s ease;
}

.question.single {
  margin-top: 8px;
}

.option-wrap {
  display: grid;
  gap: 8px;
}

.option-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.option-btn.active {
  border-color: rgba(242, 71, 109, 0.5);
  background: linear-gradient(135deg, rgba(255, 120, 93, 0.12), rgba(242, 71, 109, 0.12));
}

label {
  font-size: 0.95rem;
  display: grid;
  gap: 6px;
}

input,
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  font: inherit;
}

.question-wrap {
  display: grid;
  gap: 10px;
}

.question {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.question p {
  margin: 0 0 8px;
  font-weight: 600;
}

.scale {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scale label {
  margin: 0;
  font-size: 0.83rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  min-width: 54px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
}

.scale input {
  width: auto;
  margin: 0;
}

.form-actions,
.result-footer {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.error {
  min-height: 1.25rem;
  color: #b4294d;
  margin: 10px 0 0;
}

.hidden {
  display: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
}

.metric-card.accent {
  border-color: rgba(242, 71, 109, 0.35);
  background: linear-gradient(135deg, rgba(255, 120, 93, 0.14), rgba(242, 71, 109, 0.14));
}

.tier-card .metric-value {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: 0.03em;
}

.metric-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.metric-value {
  margin: 8px 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.metric-value small {
  font-size: 1rem;
}

.split {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
}

.compat-box {
  margin-top: 14px;
  border: 1px dashed rgba(31, 138, 112, 0.35);
  border-radius: 16px;
  padding: 14px;
  background: rgba(242, 255, 250, 0.7);
}

#partnerRange {
  margin: 7px 0 12px;
}

.trait-bars {
  display: grid;
  gap: 8px;
}

.trait-item {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.bar-track {
  background: rgba(27, 31, 40, 0.12);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b3d, #1f8a70);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.premium-panel {
  margin-top: 14px;
  border: 1px solid rgba(31, 138, 112, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: rgba(246, 255, 251, 0.88);
}

.premium-panel h3 {
  margin-bottom: 8px;
}

.spectrum-box,
.tier-profile-card,
.type-match-card,
.science-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
  margin: 10px 0;
}

.simulator-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  margin: 10px 0;
}

.spectrum-track {
  margin-top: 8px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 65% 35%;
}

.zone-real,
.zone-challenge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.zone-real {
  background: linear-gradient(90deg, rgba(31, 138, 112, 0.45), rgba(31, 138, 112, 0.2));
}

.zone-challenge {
  background: linear-gradient(90deg, rgba(255, 107, 61, 0.2), rgba(242, 71, 109, 0.35));
}

.spectrum-marker {
  position: absolute;
  top: 4px;
  width: 16px;
  height: 28px;
  border-radius: 8px;
  background: #1b1f28;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  left: 50%;
}

.tier-profile-card h4,
.type-match-card h4,
.science-box h4 {
  margin: 0 0 6px;
}

.premium-chart {
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.premium-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
}

.premium-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(27, 31, 40, 0.12);
  overflow: hidden;
}

.premium-target,
.premium-user {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.premium-target {
  background: rgba(31, 138, 112, 0.32);
}

.premium-user {
  background: linear-gradient(90deg, #ff6b3d, #f2476d);
}

.premium-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.premium-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.plan {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.85);
}

.plan.featured {
  border-color: rgba(242, 71, 109, 0.35);
  box-shadow: 0 8px 20px rgba(242, 71, 109, 0.2);
}

footer {
  margin-top: 20px;
  text-align: center;
  color: #5a5f70;
  font-size: 0.88rem;
}

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

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

@media (max-width: 860px) {
  .basic-grid,
  .external-grid,
  .metrics-grid,
  .plans {
    grid-template-columns: 1fr;
  }

  .trait-item {
    grid-template-columns: 84px 1fr 44px;
  }

  .premium-grid,
  .premium-row {
    grid-template-columns: 1fr;
  }
}
