/* 배터리규격 (CarBattery) — 라이트 테마 전용 */
:root {
  --accent: #0f766e;
  --accent-dark: #0b5c55;
  --accent-light: #d5f0ec;
  --bg: #f5f8f8;
  --card: #ffffff;
  --text: #1f2933;
  --text-sub: #52606d;
  --line: #e2e8e8;
  --ok: #059669;
  --ok-light: #d1fae5;
  --warn: #d97706;
  --warn-light: #fef3c7;
  --bad: #dc2626;
  --bad-light: #fee2e2;
  --radius: 13px;
  --shadow: 0 1px 3px rgba(20, 40, 40, 0.06), 0 4px 14px rgba(20, 40, 40, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.num { font-variant-numeric: tabular-nums; }
a { color: var(--accent-dark); }

/* ---- 헤더 ---- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
}
.brand {
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--accent-light); color: var(--accent-dark); }

/* ---- 레이아웃 ---- */
.container { max-width: 900px; margin: 0 auto; padding: 24px 16px 40px; }
.page-title { font-size: 1.65rem; margin: 8px 0 4px; letter-spacing: -0.01em; }
.page-desc { color: var(--text-sub); margin: 0 0 20px; font-size: 0.98rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card > h2 { font-size: 1.22rem; margin: 0 0 6px; }
.card > h2 + .sub { color: var(--text-sub); font-size: 0.9rem; margin: 0 0 14px; }
.card h3 { font-size: 1.02rem; margin: 18px 0 8px; }
.section-anchor { scroll-margin-top: 72px; }

/* ---- 입력 폼 ---- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 5px;
}
.field input[type='date'], .field input[type='number'], .field select {
  width: 100%;
  max-width: 340px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.98rem;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

/* ---- 버튼 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.btn-buy {
  background: #ff5a5f; color: #fff; font-size: 0.94rem; padding: 11px 20px; border-radius: 10px;
}
.btn-buy:hover { background: #e04a50; }

/* ---- 고지 / 경고 박스 ---- */
.ad-notice {
  margin: .6rem 0 1rem; padding: .6rem .9rem; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 8px; font-size: .9rem; color: #9a3412; line-height: 1.5;
}
.spec-warn {
  margin: .6rem 0; padding: .7rem .9rem; background: var(--bad-light); border: 1px solid #fecaca;
  border-radius: 8px; font-size: .9rem; color: #991b1b; line-height: 1.55;
}

/* ---- 규격 조회 결과 ---- */
.lk-result { display: none; margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.lk-result.show { display: block; }
.spec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.spec-title { font-size: 1.2rem; font-weight: 800; }
.spec-variant { font-size: 0.9rem; color: var(--text-sub); }
.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 10px;
}
.spec-row { background: var(--bg); border-radius: 10px; padding: 10px 13px; }
.spec-k { font-size: 0.76rem; color: var(--text-sub); margin-bottom: 3px; }
.spec-v { font-size: 1.02rem; font-weight: 600; }
.spec-v.strong { color: var(--accent-dark); font-weight: 800; }
.spec-note { font-size: 0.88rem; color: var(--text-sub); margin: 4px 0 0; line-height: 1.55; }

/* ---- 배지 ---- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap;
}
.badge.ok { background: var(--ok-light); color: var(--ok); }
.badge.soon { background: var(--warn-light); color: var(--warn); }
.badge.overdue { background: var(--bad-light); color: var(--bad); }

/* ---- D-day 결과 ---- */
.dd-result { display: none; margin-top: 16px; }
.dd-result.show { display: block; }
.dday-hero { text-align: center; padding: 6px 0 6px; }
.dday-hero .label { font-size: 0.9rem; color: var(--text-sub); }
.dday-big { font-size: 2.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dday-big.ok { color: var(--ok); }
.dday-big.soon { color: var(--warn); }
.dday-big.overdue { color: var(--bad); }
.dday-sub { font-size: 0.92rem; color: var(--text-sub); margin-top: 6px; }
.dd-note { font-size: 0.82rem; color: var(--text-sub); margin-top: 12px; line-height: 1.55; }
.dd-err { color: var(--bad); font-size: 0.9rem; }

/* ---- 표 ---- */
.table-wrap { overflow-x: auto; margin-top: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th, table.data td {
  padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap;
}
table.data th { background: var(--bg); color: var(--text-sub); font-weight: 600; }
table.data td.code { font-weight: 700; color: var(--accent-dark); }
table.data tr:hover { background: #f7fbfa; }

/* ---- 용어 카드 ---- */
.terms-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 6px; }
.term-card { background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 14px 15px; }
.term-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.term-icon { font-size: 1.15rem; }
.term-name { font-weight: 700; font-size: 0.98rem; }
.term-desc { margin: 0; font-size: 0.87rem; color: var(--text-sub); line-height: 1.55; }

/* ---- 허브 카드 ---- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0; }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; text-decoration: none; color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-card .icon { font-size: 1.7rem; }
.tool-card h2, .tool-card h3 { margin: 8px 0 5px; font-size: 1.05rem; }
.tool-card p { margin: 0; font-size: 0.85rem; color: var(--text-sub); }

/* ---- SEO 콘텐츠 / FAQ ---- */
.seo-content h2 { font-size: 1.2rem; }
.seo-content p, .seo-content li { font-size: 0.93rem; color: var(--text-sub); }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
details.faq p { margin: 8px 0 0; font-size: 0.9rem; color: var(--text-sub); }

/* ---- 쿠팡 배너 ---- */
.promo { margin: 16px 0; text-align: center; }
.coupang-wrap { display: flex; justify-content: center; margin: 8px 0; min-height: 90px; overflow-x: hidden; }
.promo-disclosure { font-size: 0.72rem; color: #888; margin-top: 6px; }

/* ---- 양옆 레일 ---- */
.side-rail { display: none; position: fixed; top: 90px; width: 160px; z-index: 5; }
@media (min-width: 1300px) {
  .side-rail { display: block; }
  .side-l { left: calc(50% - 634px); }
  .side-r { left: calc(50% + 474px); }
}

/* ---- 푸터 ---- */
.site-footer {
  border-top: 1px solid var(--line); background: #fff; padding: 26px 16px 34px;
  text-align: center; font-size: 0.82rem; color: var(--text-sub);
}
.site-footer .disclaimer { max-width: 900px; margin: 0 auto 12px; color: var(--warn); font-weight: 600; }
.site-footer .links { margin-bottom: 10px; }
.site-footer .links a { margin: 0 8px; }

/* ---- 진입 애니메이션 ---- */
@media (prefers-reduced-motion: no-preference) {
  .card, .tool-card { animation: fadeUp 0.35s ease both; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 640px) {
  .dday-big { font-size: 2rem; }
  .container { padding: 16px 12px 32px; }
  .card { padding: 16px; }
}
