/* 배달 수익 계산기 */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --orange: #ea580c;
  --orange2: #c2410c;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; font-size: 14px; }

.wrap { max-width: 100%; padding: 0 0 60px; }

.top { padding: 20px 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; flex-shrink: 0;
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
h1 { font-size: 22px; font-weight: 700; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* ── 플랫폼 선택 ── */
.platform-row { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.platform-btn {
  flex: 1; min-width: 80px; padding: 10px 8px; border-radius: 9px;
  border: 1.5px solid var(--line); background: var(--bg); cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--muted); transition: all .12s; text-align: center;
}
.platform-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── 폼 ── */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px;
  font-size: 14px; outline: none; transition: border-color .12s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--orange); }
.form-group .hint { font-size: 11px; color: var(--muted); margin-top: 3px; }

.btn-calc {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--orange), #f59e0b);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── 결과 ── */
.result-wrap { display: none; }
.result-wrap.show { display: block; }

.result-hero {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px; background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fed7aa; border-radius: 12px; margin-bottom: 14px;
}
.hero-val { font-size: 36px; font-weight: 800; color: var(--orange); }
.hero-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hero-badge {
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 800;
}
.hero-badge.good { background: #dcfce7; color: var(--green); }
.hero-badge.warn { background: #fef3c7; color: #92400e; }
.hero-badge.bad  { background: #fef2f2; color: var(--red); }

.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.breakdown-item {
  padding: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
}
.bi-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.bi-val { font-size: 18px; font-weight: 800; color: var(--ink); }
.bi-val.minus { color: var(--red); }
.bi-val.plus  { color: var(--green); }

/* ── 월 수익 추정 ── */
.monthly-section { margin-top: 14px; }
.monthly-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.monthly-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.monthly-table th {
  padding: 8px 10px; background: #f1f5f9; font-size: 11px; font-weight: 700;
  color: var(--muted); text-align: center; border-bottom: 1px solid var(--line);
}
.monthly-table td {
  padding: 8px 10px; text-align: center; border-bottom: 1px solid #f1f5f9;
}
.monthly-table tr:last-child td { border-bottom: none; }
.monthly-table td.highlight { font-weight: 800; color: var(--orange); }

/* ── 비교 섹션 ── */
.compare-row { display: flex; gap: 10px; margin-top: 14px; }
.compare-card {
  flex: 1; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); text-align: center;
}
.compare-card.best { border-color: var(--orange); background: #fff7ed; }
.cc-title { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cc-val { font-size: 20px; font-weight: 800; color: var(--orange); }
.cc-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── 사용 안내 섹션 공통 ── */
.guide-section {
  margin-top: 24px; background: rgba(246,248,255,.6);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.guide-section h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.guide-section h2:not(:first-child) { margin-top: 18px; }
.guide-steps, .guide-features, .guide-usecase {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.guide-steps li, .guide-features li, .guide-usecase li { margin-bottom: 4px; }
.guide-steps strong, .guide-features strong { color: var(--ink); }
.guide-privacy {
  margin-top: 16px; background: #eff6ff; border: 1px solid rgba(37,99,235,.22);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #1e40af; line-height: 1.55;
}

@media (max-width: 540px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .breakdown-grid { grid-template-columns: 1fr; }
  .compare-row { flex-direction: column; }
}
