*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 50%, #e8f0fe 100%);
  min-height: 100vh;
  padding: 20px 16px 80px;
  color: #1a1a2e;
}

/* ── Layout ── */
.container {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.header .badge {
  display: inline-block;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.header h1 {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.3;
}

.header p {
  margin-top: 8px;
  font-size: 14px;
  color: #64748b;
}

/* ── 상단 나이 공지 배너 ── */
.age-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.5;
  text-align: center;
}

.age-sub {
  font-size: 11px;
  color: #60a5fa;
  display: inline-block;
  margin-top: 4px;
}

/* ── Progress bar ── */
.progress-wrap {
  margin-bottom: 24px;
}

.progress-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 12px;
  color: #64748b;
  text-align: right;
  margin-top: 4px;
}

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.10);
  padding: 28px 24px;
  margin-bottom: 16px;
}

/* ── Step header ── */
.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
}

.step-num.done {
  background: linear-gradient(135deg, #10b981, #059669);
}

.step-num.locked {
  background: #cbd5e1;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a8a;
}

.step-title.locked {
  color: #94a3b8;
}

/* ── Option buttons ── */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-grid.cols-1 {
  grid-template-columns: 1fr;
}

.option-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.opt-btn {
  padding: 12px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  line-height: 1.4;
}

.opt-btn:hover:not(:disabled) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.opt-btn.selected {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.20);
}

.opt-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Marital note ── */
.marital-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  line-height: 1.8;
}

/* ── Result card ── */
.result-card {
  border-radius: 20px;
  padding: 28px 24px;
  margin-top: 8px;
  display: none;
}

.result-card.show {
  display: block;
}

.result-card.type-우대형 {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 2px solid #10b981;
}

.result-card.type-일반형 {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border: 2px solid #3b82f6;
}

.result-card.type-비과세형 {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  border: 2px solid #f59e0b;
}

.result-card.type-불가 {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 2px solid #ef4444;
}

.result-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.7;
}

.result-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  margin-bottom: 20px;
}

.result-card.type-우대형 .result-title { color: #065f46; }
.result-card.type-일반형 .result-title { color: #1e40af; }
.result-card.type-비과세형 .result-title { color: #92400e; }
.result-card.type-불가 .result-title { color: #991b1b; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 14px 16px;
}

.result-item-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.result-item-value {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a2e;
}

.result-key-box {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  font-size: 11px;
  color: #64748b;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.7;
}

/* ── Reset button ── */
.reset-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  text-align: center;
}

.reset-btn:hover {
  opacity: 0.88;
}

/* ── Responsive ── */
@media (max-width: 420px) {
  .option-grid { grid-template-columns: 1fr; }
  .option-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}

/* ── 미니멀 하단 안내 카드 스타일 ── */
.info-card {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  font-size: 13px;
  color: #475569;
}

.info-section {
  margin-bottom: 0;
}

.info-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.info-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #94a3b8;
}

.info-list li strong {
  color: #334155;
}

.info-list li a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #2563eb;
}

.info-list li a:hover {
  color: #1d4ed8;
}

.info-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 16px 0;
}
