/* =========================================================
   생활계산기 전용 스타일 (styles.css 위에 덧붙임)
   월급 실수령액 · 대출이자 · 퇴직금
   ========================================================= */

/* ---------- 탭 ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin: 0 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--muted);
  padding: 12px 8px;
  border-radius: 13px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  min-height: 58px;
}
.tab-btn small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: -.01em;
}
.tab-btn:hover { background: var(--blue-50); color: var(--blue-dark); }
.tab-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%);
  box-shadow: 0 10px 22px -14px rgba(29, 78, 216, .95);
}
.tab-btn.is-active small { color: rgba(255, 255, 255, .82); }
.tab-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 560px) {
  .tabbar { gap: 4px; padding: 5px; border-radius: 16px; }
  .tab-btn { font-size: 13.5px; padding: 10px 4px; min-height: 50px; }
  .tab-btn small { display: none; }
}

.tab-panel[hidden] { display: none; }

/* 탭별 계산기 상단 설명 */
.panel-intro {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.panel-intro strong { color: var(--ink-2); }

/* ---------- 입력 보조 요소 ---------- */
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  height: 52px;
  padding: 0 40px 0 15px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.7px solid #64748b;
  border-bottom: 1.7px solid #64748b;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 560px) { .field-row-3 { grid-template-columns: 1fr; gap: 0; } }

/* 날짜 입력 */
.input-wrap input[type="date"] {
  padding: 0 14px;
  font-variant-numeric: normal;
}
.input-wrap input[type="date"]:disabled {
  background: #f8fafc;
  color: var(--muted);
}

.calc-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  height: 54px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #059669 130%);
  box-shadow: 0 14px 26px -16px rgba(29, 78, 216, .95);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.calc-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -16px rgba(29, 78, 216, .95); }
.calc-btn:active { transform: translateY(0); }
.calc-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- 결과 보조 ---------- */
.notice-warn {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--amber-50);
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 12.5px;
  line-height: 1.55;
}
.notice-warn[hidden] { display: none; }

.tax-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.schedule-wrap {
  margin-top: 16px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
}
.schedule-wrap[hidden] { display: none; }
.schedule-wrap > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
  padding: 4px 0;
}
.schedule-wrap > summary::-webkit-details-marker { display: none; }

.schedule-scroll {
  overflow-x: auto;
  margin-top: 6px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.schedule-table th,
.schedule-table td {
  padding: 8px 4px;
  text-align: right;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.schedule-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #f8fafc;
}
.schedule-table th:first-child,
.schedule-table td:first-child { text-align: left; }
.schedule-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted-2);
  text-align: right;
}

/* ---------- 안내 카드 · 요율표 ---------- */
.rate-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rate-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.rate-card th,
.rate-card td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  line-height: 1.5;
}
.rate-card thead th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.rate-card tbody tr:last-child td { border-bottom: 0; }
.rate-card tbody td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.rate-card tbody td.num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--blue-dark);
  white-space: nowrap;
}
.rate-card tbody td small { display: block; font-size: 11.5px; color: var(--muted-2); font-weight: 400; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.method-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}
.method-card h3 { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.method-card .method-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--blue-dark);
  background: var(--blue-50);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 10px;
}
.method-card p { margin: 0 0 8px; font-size: 13px; line-height: 1.62; color: #475569; }
.method-card .method-who {
  margin: 0;
  font-size: 12px;
  color: var(--emerald);
  font-weight: 600;
}

/* 이 페이지 결과 카드는 숫자가 길어 조금 작게 */
.quick-stats dd {
  font-size: 13px;
  letter-spacing: -.035em;
}
@media (max-width: 380px) {
  .quick-stats dd { font-size: 12px; }
}

/* ---------- 키워드 칩 ---------- */
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keyword-cloud a,
.keyword-cloud span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.keyword-cloud a:hover {
  text-decoration: none;
  border-color: var(--blue);
  color: var(--blue-dark);
  background: var(--blue-50);
}

/* ---------- 연봉 실수령액 표 ---------- */
.paytable-note {
  margin: 10px 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}
