:root {
  --primary: #1a5f7a;
  --primary-dark: #134a5f;
  --primary-light: #e8f4f8;
  --accent: #f4a261;
  --accent-dark: #e76f51;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #2d3748;
  --text-muted: #718096;
  --border: #e2e8f0;
  --success: #38a169;
  --warning: #d69e2e;
  --danger: #e53e3e;
  --shadow: 0 4px 20px rgba(26, 95, 122, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.header-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Card & Steps */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.step.hidden {
  display: none;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.15);
}

/* Progress */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 20%;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Questions */
.question-block {
  margin-bottom: 8px;
}

.question-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.question-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.option-item label {
  cursor: pointer;
  font-size: 0.95rem;
  flex: 1;
}

.option-item .option-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.text-answer {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.text-answer:focus {
  outline: none;
  border-color: var(--primary);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}

.nav-buttons .btn {
  flex: 1;
}

/* Results */
.customer-summary {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.customer-summary h3 {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.customer-summary p {
  font-size: 0.95rem;
}

.answer-summary {
  margin-bottom: 28px;
}

.answer-summary h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.answer-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.answer-item:last-child {
  border-bottom: none;
}

.answer-item .q {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.answer-item .a {
  font-size: 0.95rem;
  font-weight: 500;
}

.analysis-section {
  margin-bottom: 24px;
}

.analysis-section h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-section h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.risk-tag {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.risk-tag.high {
  background: #fed7d7;
  color: var(--danger);
}

.risk-tag.medium {
  background: #fefcbf;
  color: #975a16;
}

.risk-tag.low {
  background: #c6f6d5;
  color: var(--success);
}

.recommendation-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.recommendation-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.recommendation-card.priority-high::before {
  background: var(--accent-dark);
}

.recommendation-card .rec-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.recommendation-card .rec-priority {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.recommendation-card .rec-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.recommendation-card .rec-reason {
  font-size: 0.85rem;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 6px;
}

.budget-estimate {
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}

.budget-estimate .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.budget-estimate .note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.planner-notes {
  background: #fffaf0;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 16px;
  margin-top: 24px;
}

.planner-notes h3 {
  font-size: 0.9rem;
  color: #975a16;
  margin-bottom: 8px;
}

.planner-notes ul {
  margin-left: 18px;
  font-size: 0.875rem;
  color: var(--text);
}

.planner-notes li {
  margin-bottom: 4px;
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.result-actions .btn {
  flex: 1;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Print */
@media print {
  body {
    background: white;
  }

  .header-badge,
  .step-indicator,
  .result-actions,
  .footer {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

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

  .header h1 {
    font-size: 1.4rem;
  }

  .card {
    padding: 20px;
  }
}
