:root {
  --bg: #f6f0e8;
  --bg-dark: #1f1a17;
  --card: #fff8ef;
  --ink: #1f1a17;
  --muted: #6f6359;
  --accent: #ff7b4f;
  --accent-dark: #c34922;
  --line: #eadfd4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #ffe8d7, var(--bg));
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient span {
  position: absolute;
  width: 280px;
  height: 280px;
  background: rgba(255, 123, 79, 0.18);
  filter: blur(50px);
  border-radius: 50%;
  animation: float 12s ease-in-out infinite;
}

.ambient span:nth-child(1) {
  top: -80px;
  left: -60px;
}

.ambient span:nth-child(2) {
  bottom: 10%;
  right: -80px;
  animation-delay: -4s;
  background: rgba(40, 25, 20, 0.15);
}

.ambient span:nth-child(3) {
  top: 35%;
  left: 65%;
  animation-delay: -7s;
  background: rgba(255, 194, 133, 0.2);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(30px) translateX(-20px);
  }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: grid;
  gap: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--muted);
}

.hero h1 {
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  margin: 0;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(31, 26, 23, 0.08);
  display: grid;
  gap: 24px;
  animation: rise 0.8s ease both;
}

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

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 600;
  font-size: 14px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
}

.input-wrap input {
  border: none;
  outline: none;
  font-size: 16px;
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.unit {
  color: var(--muted);
  font-size: 14px;
}

.cta {
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 123, 79, 0.35);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.result-card {
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.result-card.highlight {
  background: var(--bg-dark);
  color: #fff5ed;
  border-color: rgba(255, 255, 255, 0.2);
}

.result-card h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.value {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-card.highlight .desc {
  color: rgba(255, 245, 237, 0.7);
}

.table-panel {
  overflow: hidden;
}

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

.table-header h2 {
  margin: 0 0 6px;
}

.formula {
  font-size: 14px;
  color: var(--accent-dark);
  background: rgba(255, 123, 79, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
 td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

@media (max-width: 720px) {
  .page {
    padding: 40px 18px 64px;
  }

  .panel {
    padding: 22px;
  }

  .cta {
    width: 100%;
  }
}
