:root {
  --ink: #0f2744;
  --ink-soft: #3a516e;
  --paper: #e8f1f6;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 39, 68, 0.12);
  --accent: #2ec4b6;
  --accent-deep: #1a9e92;
  --warn: #ff6b4a;
  --ok: #2ec4b6;
  --shadow: 0 20px 44px rgba(15, 39, 68, 0.12);
  --radius: 20px;
  --font-brand: "Do Hyeon", sans-serif;
  --font-body: "Noto Sans KR", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 75% 55% at 0% -5%, rgba(46, 196, 182, 0.38), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 5%, rgba(15, 39, 68, 0.18), transparent 50%),
    radial-gradient(ellipse 45% 35% at 70% 100%, rgba(255, 107, 74, 0.12), transparent 55%),
    linear-gradient(160deg, #d9eaf3 0%, #e8f1f6 48%, #d4e4ee 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 1rem;
  animation: rise 0.65s ease both;
}

.brand {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2.8rem, 9vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}

.tagline {
  margin: 0.6rem 0 0;
  max-width: 26rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.layout {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem 1.75rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  animation: rise 0.75s ease 0.08s both;
}

@media (min-width: 840px) {
  .layout {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
  }
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem 1.35rem;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.segment {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.segment-opt {
  cursor: pointer;
}

.segment-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-opt span {
  display: block;
  text-align: center;
  padding: 0.7rem 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.segment-opt input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.segment-opt input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-full {
  grid-column: 1 / -1;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  appearance: none;
}

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

.optional {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.optional summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-deep);
  list-style: none;
}

.optional summary::-webkit-details-marker {
  display: none;
}

.optional summary::before {
  content: "+ ";
}

.optional[open] summary::before {
  content: "− ";
}

.optional-fields {
  margin-top: 0.85rem;
}

.bmi-hero {
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}

.bmi-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.bmi-value {
  margin: 0.15rem 0 0;
  font-family: var(--font-brand);
  font-size: clamp(3.2rem, 12vw, 4.6rem);
  line-height: 1;
  color: var(--ink);
  transition: color 0.35s ease;
}

.bmi-category {
  margin: 0.45rem 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.bmi-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #5b8def 0%,
    #2ec4b6 28%,
    #2ec4b6 48%,
    #f0b429 62%,
    #ff6b4a 82%,
    #d64545 100%
  );
  overflow: visible;
}

.bmi-fill {
  display: none;
}

.bmi-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.25);
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bmi-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.metrics {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.metrics li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
  animation: fade-up 0.5s ease both;
}

.metrics li:nth-child(2) {
  animation-delay: 0.06s;
}

.metrics li:nth-child(3) {
  animation-delay: 0.12s;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.metric-label small {
  font-size: 0.75rem;
  opacity: 0.75;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hint {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.ad-slot {
  max-width: 920px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.ad-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 39, 68, 0.4);
}

.ad-placeholder {
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(15, 39, 68, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  color: rgba(15, 39, 68, 0.35);
  font-size: 0.85rem;
}

.seo {
  max-width: 920px;
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
  animation: rise 0.7s ease 0.15s both;
}

.seo h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.seo p,
.seo li {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.seo ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.seo li + li {
  margin-top: 0.35rem;
}

.foot {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

.foot p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(15, 39, 68, 0.45);
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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