/* ==========================================================================
   모션카 셀렉트 — 인증 중고차·렌터카 플랫폼 (DREXLY 템플릿)
   색·활자·컴포넌트는 00-디자인보드.png 을 정본으로 옮겼다.
   Neutral 300 은 보드의 라벨(#F2F4F7)이 Neutral 200 과 같은 오기라
   실제 스와치 화소를 찍어 #5B6472 로 정의한다.
   ========================================================================== */

:root {
  /* 브랜드 — 디자인보드 「컬러」 */
  --brand: #0066ff;
  --brand-press: #0050d0;
  --brand-soft: #ecf3ff;
  --brand-line: #c6dcff;
  --ink: #101820;          /* Secondary */
  --ink-2: #33404e;
  --muted: #5b6472;        /* Neutral 300 */
  --faint: #8d96a3;
  --surface: #ffffff;      /* Neutral 100 */
  --bg: #f2f4f7;           /* Neutral 200 */
  --bg-soft: #f8fafc;
  --line: #e3e7ed;
  --line-strong: #cdd4de;

  /* 의미 색 — 디자인보드 「상태 색상」. 색만으로 뜻을 전하지 않고 항상 글자·아이콘을 병기한다 */
  --ok: #22c55e;
  --ok-soft: #e9faef;
  --err: #ef4444;
  --err-soft: #fdecec;
  --warn: #f59e0b;
  --warn-soft: #fff5e4;
  --info: #3b82f6;
  --info-soft: #eaf2fe;
  --off: #d1d5db;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --wrap: 1280px;
  --gutter: 32px;
  --section: 92px;
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --pill: 999px;
  --sh-1: 0 1px 2px rgba(16, 24, 32, 0.05);
  --sh-2: 0 4px 18px rgba(16, 24, 32, 0.07);
  --sh-3: 0 14px 40px rgba(16, 24, 32, 0.12);
  --ease: cubic-bezier(0.22, 0.68, 0.3, 1);
}

/* 시그니처 연출 §05 — 목록 차량 이미지가 상세 Hero 로 이어진다.
   미지원 브라우저는 평범한 링크 이동이 된다(핵심 정보 손실 0). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;           /* 디자인보드 Body 16/24 */
  letter-spacing: -0.012em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -0.024em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--brand); color: #fff; padding: 12px 22px; font-size: 14px; font-weight: 600;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 980px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ico-sm { width: 16px; height: 16px; stroke-width: 1.8; }
.ico-lg { width: 26px; height: 26px; stroke-width: 1.5; }

/* ------------------------------------------------------------- 활자 계층 */
.h-page {                       /* H1 32/44 Bold */
  font-size: clamp(27px, 3.1vw, 34px);
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.032em;
}
.h-sec {                        /* H2 24/32 Bold */
  font-size: clamp(21px, 2.1vw, 25px);
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: -0.03em;
}
.h-card {                       /* H3 20/28 SemiBold */
  font-size: 19px; font-weight: 650; line-height: 1.4; letter-spacing: -0.028em;
}
.cap { font-size: 12.5px; line-height: 1.34; color: var(--muted); }
.lede { font-size: 16.5px; line-height: 1.68; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--brand);
}
.eyebrow::before { content: ""; width: 16px; height: 2px; background: var(--brand); border-radius: 2px; }

.section { padding: var(--section) 0; }
.section-tight { padding: 60px 0; }
.sec-head { display: grid; gap: 12px; margin-bottom: 34px; }
.sec-head p { color: var(--muted); font-size: 15.5px; line-height: 1.66; }
.sec-head.row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }

/* ------------------------------------------------------------------ 버튼 */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--b-bd); border-radius: var(--r-sm);
  background: var(--b-bg); color: var(--b-fg);
  font-size: 15px; font-weight: 650; letter-spacing: -0.02em; cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.12s var(--ease);
}
.btn:hover { box-shadow: var(--sh-1); }
.btn:active { transform: translateY(1px); }
.btn-primary { --b-bg: var(--brand); --b-fg: #fff; --b-bd: var(--brand); }
.btn-primary:hover { --b-bg: var(--brand-press); --b-bd: var(--brand-press); }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: #1f2c39; --b-bd: #1f2c39; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--ink-2); --b-bd: var(--line-strong); }
.btn-ghost:hover { --b-fg: var(--brand); --b-bd: var(--brand-line); }
.btn-onDark { --b-bg: rgba(255, 255, 255, 0.08); --b-fg: #fff; --b-bd: rgba(255, 255, 255, 0.34); }
.btn-onDark:hover { --b-bg: rgba(255, 255, 255, 0.18); --b-bd: #fff; }
.btn-sm { min-height: 40px; padding: 0 15px; font-size: 13.5px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  --b-bg: var(--bg); --b-fg: #9aa3af; --b-bd: var(--off);
  cursor: not-allowed; box-shadow: none;
}
.btn[aria-disabled="true"] { pointer-events: none; }

.btn-text {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  color: var(--brand); font-size: 14.5px; font-weight: 650; cursor: pointer;
}
.btn-text:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------- 배지 · 칩 · 태그 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px; border-radius: var(--r-xs);
  border: 1px solid currentColor; font-size: 11.5px; font-weight: 700; letter-spacing: -0.01em;
}
.badge-cert { color: var(--brand); background: var(--brand-soft); }
.badge-hot { color: var(--err); background: var(--err-soft); }
.badge-down { color: var(--muted); background: var(--bg); }
.badge-warranty { color: #a9720d; background: var(--warn-soft); }
.badge-rent { color: #0d7a5f; background: #e7f7f1; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: var(--r-xs);
  background: var(--bg); color: var(--ink-2); font-size: 12.5px; font-weight: 550;
}

/* 상태 표시 — 색 + 점 + 글자를 항상 함께 쓴다(§09) */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.state-ok { color: #16a34a; }
.state-warn { color: #b26800; }
.state-err { color: #d92d2d; }
.state-off { color: var(--faint); }

/* ------------------------------------------------------------ 카드 표면 */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-1);
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: 28px; }

/* ============================================================== 헤더 §06 */
.site-header {
  position: sticky; top: 0; z-index: 70;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 18.5px; font-weight: 600; letter-spacing: -0.038em; color: var(--ink); }
.brand-name b { font-weight: 800; }

.navlinks { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.navlinks a {
  position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 14px;
  border-radius: var(--r-sm); font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.navlinks a:hover { color: var(--brand); background: var(--brand-soft); }
.navlinks a[aria-current="page"] { color: var(--brand); }
.navlinks a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

.hdr-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.hdr-tel {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px;
  font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em;
}
.hdr-tel .ico { color: var(--brand); }
.hdr-tel:hover { color: var(--brand); }

.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer;
}

/* 모바일 서랍 */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); z-index: 95;
  background: var(--surface); border-left: 1px solid var(--line);
  padding: 18px 20px 36px; transform: translateX(101%);
  transition: transform 0.36s var(--ease); overflow-y: auto;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-close {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer;
}
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 54px; font-size: 17px; font-weight: 650; border-bottom: 1px solid var(--line);
}
.drawer nav a[aria-current="page"] { color: var(--brand); }
.drawer-cta { margin-top: 22px; display: grid; gap: 9px; }
.drawer-note { margin-top: 20px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(16, 24, 32, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.36s var(--ease), visibility 0.36s;
}
.scrim.open { opacity: 1; visibility: visible; }

/* =============================================================== 홈 히어로 */
.home-hero {
  background: linear-gradient(168deg, #eaf2fd 0%, #f4f8fd 46%, var(--bg) 100%);
  padding: 56px 0 0;
  overflow: hidden;
}
.home-hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 30px; align-items: center;
}
.home-hero h1 { font-size: clamp(30px, 3.7vw, 44px); font-weight: 800; line-height: 1.3; letter-spacing: -0.04em; }
.home-hero h1 em { font-style: normal; color: var(--brand); }
.home-hero .lede { margin-top: 16px; max-width: 27em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; }
.hero-proof li { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hero-proof .ico { color: var(--brand); }
.hero-shot { position: relative; align-self: end; }
.hero-shot img { width: 100%; height: auto; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.hero-plate {
  position: absolute; right: 16px; top: 16px;
  display: flex; align-items: center; gap: 9px;
  background: rgba(16, 24, 32, 0.82); color: #fff;
  padding: 9px 14px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-plate .ico { color: #7fb2ff; }

/* 통합 검색 패널 — 홈의 단일 핵심 과업 */
.finder {
  position: relative; z-index: 2; margin-top: -44px;
  background: var(--ink); color: #fff; border-radius: var(--r-lg);
  padding: 22px 24px 24px; box-shadow: var(--sh-3);
}
.finder-tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.finder-tabs button {
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.62); font-size: 14.5px; font-weight: 650; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.finder-tabs button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.finder-tabs button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.13); color: #fff; }
.finder-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; }
.finder-field { display: grid; gap: 6px; }
.finder-field > span { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.01em; }
.finder-field select {
  width: 100%; min-height: 48px; padding: 0 38px 0 14px;
  background: rgba(255, 255, 255, 0.07); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-sm);
  font: inherit; font-size: 14.5px; font-weight: 600; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9b6c6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.finder-field select:hover { border-color: rgba(255, 255, 255, 0.4); }
.finder-field select option { color: var(--ink); }
.finder-go { align-self: end; }
.finder-go .btn { min-height: 48px; }
.finder-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.finder-quick .lbl { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); font-weight: 600; }
.finder-quick a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--pill);
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.finder-quick a:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }

/* 검증 지표 */
.proof-band { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.proof-item { display: grid; gap: 4px; padding: 0 22px; border-left: 1px solid var(--line); }
.proof-item:first-child { border-left: 0; padding-left: 0; }
.proof-item dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.proof-item dd { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.04em; color: var(--brand); }
.proof-item .sub { font-size: 13px; color: var(--muted); font-weight: 500; }

/* 인증 절차 — 가로 타임라인 */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: st; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 24px 22px 22px;
}
.step::before {
  counter-increment: st; content: "0" counter(st);
  display: block; font-size: 12.5px; font-weight: 800; color: var(--brand); letter-spacing: 0.04em; margin-bottom: 12px;
}
.step-ico {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 14px;
  border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand);
}
.step h3 { font-size: 16.5px; font-weight: 700; }
.step p { margin-top: 7px; font-size: 13.5px; line-height: 1.62; color: var(--muted); }
.step-line { position: absolute; top: 46px; right: -8px; width: 16px; height: 1px; background: var(--line-strong); }

/* MD 추천 차량 — Container Query 카드 §06 */
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.car-card {
  container-type: inline-size; container-name: carcard;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.car-card:hover { border-color: var(--brand-line); box-shadow: var(--sh-2); transform: translateY(-2px); }
.car-card > a { display: grid; gap: 0; }
.car-shot { display: block; position: relative; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.car-shot img { width: 100%; height: auto; }
.car-flags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.car-body { padding: 16px 17px 17px; display: grid; gap: 9px; align-content: start; }
.car-name { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -0.028em; }
.car-trim { display: block; font-size: 13px; color: var(--muted); }
.car-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; font-size: 13px; color: var(--ink-2); }
.car-meta li { display: flex; align-items: center; gap: 5px; }
.car-meta li + li::before { content: ""; width: 1px; height: 11px; background: var(--line-strong); margin-right: 4px; }
.car-diag {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 11px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-xs);
}
.car-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.car-price b { font-size: 21px; font-weight: 800; letter-spacing: -0.035em; }
.car-price .mo { font-size: 13px; color: var(--muted); font-weight: 600; }
.car-price .mo b { font-size: 13.5px; color: var(--brand); font-weight: 700; }

/* 카드가 넉넉해지면 가로 조판으로 바뀐다 — 화면 폭이 아니라 카드 폭이 기준 */
@container carcard (min-width: 430px) {
  .car-card > a { grid-template-columns: 232px minmax(0, 1fr); }
  .car-shot { border-bottom: 0; border-right: 1px solid var(--line); display: grid; align-items: center; }
  .car-body { padding: 18px 20px; }
  .car-name { font-size: 18px; }
}

/* 렌터카 배너 */
.rent-band {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 24px; align-items: center;
  background: linear-gradient(120deg, #0b1f3d 0%, #123a72 62%, #0f2f5e 100%);
  color: #fff; border-radius: var(--r-lg); padding: 34px 36px; overflow: hidden;
}
.rent-band h2 { font-size: clamp(21px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.035em; }
.rent-band p { margin-top: 12px; color: rgba(255, 255, 255, 0.76); font-size: 15px; line-height: 1.68; }
.rent-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rent-list li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1); border-radius: var(--pill); font-size: 13px; font-weight: 600;
}
.rent-shot img { width: 100%; height: auto; border-radius: var(--r); }

/* 후기 */
.review-top {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: stretch;
}
.review-score {
  background: var(--ink); color: #fff; border-radius: var(--r); padding: 24px;
  display: grid; align-content: center; gap: 6px;
}
.review-score .val { font-size: 42px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.review-score .val small { font-size: 18px; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.review-score .cnt { font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.review-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; display: grid; gap: 11px; align-content: start;
}
.stars { display: flex; align-items: center; gap: 3px; color: var(--warn); font-size: 13px; font-weight: 700; }
.stars .ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.review p { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.review .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.who-ini {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
}

/* 혜택 띠 */
.perk-band { background: var(--surface); border-top: 1px solid var(--line); padding: 26px 0; }
.perk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.perk { display: flex; gap: 11px; align-items: flex-start; }
.perk .ico { color: var(--brand); margin-top: 2px; }
.perk b { display: block; font-size: 14.5px; font-weight: 700; }
.perk span { font-size: 13px; color: var(--muted); }

/* ============================================ 내부 페이지 공통 머리 밴드 */
.page-band { background: var(--ink); color: #fff; padding: 34px 0 30px; }
.page-band.band-photo {
  background: linear-gradient(100deg, rgba(11, 21, 33, 0.96) 34%, rgba(11, 21, 33, 0.45) 100%), #0b1521;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: rgba(255, 255, 255, 0.6); margin-bottom: 12px; }
.crumb a:hover { color: #fff; text-decoration: underline; }
.crumb .ico { width: 13px; height: 13px; }
.page-band h1 { font-size: clamp(25px, 2.9vw, 33px); font-weight: 800; letter-spacing: -0.036em; }
.page-band .lede { color: rgba(255, 255, 255, 0.72); margin-top: 10px; font-size: 15.5px; }
.band-flex { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; }

/* 진행 단계 표시 */
.stepbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.stepbar li { display: flex; align-items: center; gap: 8px; }
.stepbar .dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.7);
}
.stepbar li[aria-current="step"] .dot { background: var(--brand); color: #fff; }
.stepbar li[aria-current="step"] .txt { color: #fff; font-weight: 700; }
.stepbar .txt { font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.stepbar .bar { width: 34px; height: 1px; background: rgba(255, 255, 255, 0.22); }
.stepbar li.done .dot { background: rgba(0, 102, 255, 0.28); color: #cfe1ff; }

/* ========================================== PAGE 02 — 차량검색 (마스터·디테일) */
.search-layout {
  display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 26px;
  align-items: start; padding: 34px 0 var(--section);
}
.filters { position: sticky; top: 88px; display: grid; gap: 12px; }
.filter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.filter-head h2 { font-size: 16px; font-weight: 700; }
.fgroup { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.fgroup > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 0 14px; cursor: pointer; font-size: 14.5px; font-weight: 650;
  list-style: none;
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary .ico { color: var(--faint); transition: transform 0.2s var(--ease); }
.fgroup[open] > summary .ico { transform: rotate(180deg); }
.fgroup-body { padding: 4px 14px 14px; display: grid; gap: 2px; }

.check {
  display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer;
  font-size: 14px; color: var(--ink-2);
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 20px; height: 20px; flex: none; border: 1.5px solid var(--line-strong);
  border-radius: 5px; background: var(--surface); display: grid; place-items: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.check .box svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; }
.check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 3px solid var(--brand); outline-offset: 2px; }
.check .cnt { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.check:hover { color: var(--ink); }

.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type="number"] {
  width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); font: inherit; font-size: 14px; text-align: right;
}
.range-row span { font-size: 13px; color: var(--muted); flex: none; }

.results { min-width: 0; }
.result-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.result-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.result-count { font-size: 15px; font-weight: 650; }
.result-count b { color: var(--brand); font-size: 17px; }
.sorts { position: relative; display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.sorts button {
  min-height: 40px; padding: 0 13px; border-radius: var(--pill); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.sorts button:hover { background: var(--bg); color: var(--ink); }
.sorts button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.chipbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; min-height: 34px; }
.chipbar .none { font-size: 13px; color: var(--faint); }
.chip-active {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px 0 11px;
  background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--pill);
  font-size: 13px; font-weight: 600; color: var(--brand);
}
.chip-active button { display: grid; place-items: center; width: 20px; height: 20px; cursor: pointer; border-radius: 50%; }
.chip-active button:hover { background: rgba(0, 102, 255, 0.14); }

.result-list { display: grid; gap: 12px; }

.cmp-slot { display: flex; align-items: center; gap: 8px; padding: 11px 17px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.cmp-slot .check { min-height: 36px; font-size: 13.5px; font-weight: 600; }

.result-note {
  display: flex; align-items: flex-start; gap: 10px; padding: 15px 17px; margin-top: 16px;
  background: var(--info-soft); border: 1px solid #cfe0fb; border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.66; color: #1b4f9c;
}
.result-note .ico { color: var(--info); flex: none; margin-top: 1px; }

/* 상태 화면 — 로딩 / 결과없음 / 오류 */
.state-box {
  display: none; text-align: center; padding: 46px 24px; border-radius: var(--r);
  background: var(--surface); border: 1px dashed var(--line-strong);
}
.state-box.show { display: block; }
.state-box .ico-lg { margin: 0 auto 12px; color: var(--faint); }
.state-box h3 { font-size: 17px; font-weight: 700; }
.state-box p { margin-top: 7px; font-size: 14px; color: var(--muted); }
.state-box .btn { margin-top: 16px; }
#s-error { border-color: #f6c9c9; background: var(--err-soft); }
#s-error .ico-lg { color: var(--err); }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 12px; border-radius: 50%;
  border: 2.5px solid var(--brand-line); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { display: grid; gap: 12px; }
.sk-row { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.sk { background: linear-gradient(90deg, #eef1f5 25%, #e2e7ee 37%, #eef1f5 63%); background-size: 400% 100%; border-radius: 6px; animation: sk 1.3s ease infinite; }
.sk-img { height: 128px; border-radius: var(--r-xs); }
.sk-lines { display: grid; gap: 9px; align-content: center; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.pager { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager button, .pager span {
  min-width: 40px; height: 40px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.pager a:hover, .pager button:hover { border-color: var(--brand-line); color: var(--brand); }
.pager [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .gap { border: 0; background: none; color: var(--faint); }
.pager [aria-disabled="true"] { color: var(--off); pointer-events: none; }

/* 비교 트레이 — FLIP 전환 §06 */
.cmp-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink); color: #fff; border-top: 1px solid rgba(255, 255, 255, 0.14);
  transform: translateY(104%); transition: transform 0.32s var(--ease);
  box-shadow: 0 -10px 34px rgba(16, 24, 32, 0.24);
}
.cmp-tray.open { transform: none; }
.cmp-inner { display: flex; align-items: center; gap: 16px; padding: 13px 0; }
.cmp-title { font-size: 13.5px; font-weight: 700; flex: none; }
.cmp-title b { color: #7fb2ff; }
.cmp-items { position: relative; display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; padding: 2px 0; }
.cmp-item {
  display: flex; align-items: center; gap: 8px; flex: none;
  background: rgba(255, 255, 255, 0.09); border-radius: var(--r-xs); padding: 6px 8px 6px 6px;
  font-size: 12.5px; font-weight: 600; max-width: 240px;
}
.cmp-item img { width: 46px; height: 27px; object-fit: cover; border-radius: 4px; flex: none; }
.cmp-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-item button { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; flex: none; cursor: pointer; }
.cmp-item button:hover { background: rgba(255, 255, 255, 0.18); }
.cmp-actions { display: flex; gap: 8px; flex: none; }

/* ============================================= PAGE 03 — 차량상세 */
.detail-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px;
  align-items: start; padding: 26px 0 var(--section);
}
.detail-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }

/* 360 회전 뷰어 — 자동재생 없음, 끌어야 돈다 */
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.viewer-stage {
  position: relative; aspect-ratio: 16 / 9;
  background: radial-gradient(120% 88% at 50% 92%, #e9edf2 0%, #f5f7fa 62%, #fbfcfd 100%);
  display: grid; place-items: center; cursor: grab; touch-action: pan-y;
  overflow: hidden;
}
.viewer-stage:active { cursor: grabbing; }
/* 사진을 끌면 브라우저의 이미지 드래그가 먼저 잡아채 회전이 끊긴다 — 원천 차단 */
.viewer-stage { -webkit-user-select: none; user-select: none; }
.viewer-frame {
  position: absolute; inset: 0; margin: auto; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity 0.12s linear;
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
.viewer-frame.on { opacity: 1; }
.viewer-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 24, 32, 0.78); color: #fff; padding: 8px 15px;
  border-radius: var(--pill); font-size: 12.5px; font-weight: 600; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.viewer-hint.hide { opacity: 0; }
.viewer-cut {
  position: absolute; left: 14px; top: 14px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: var(--pill); font-size: 12.5px; font-weight: 700;
}
.viewer-cut .n { color: var(--brand); }
.viewer-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.viewer-nav { display: flex; gap: 6px; }
.viewer-nav button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-xs); cursor: pointer;
}
.viewer-nav button:hover { border-color: var(--brand); color: var(--brand); }
.viewer-thumbs { position: relative; display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.viewer-thumbs button {
  width: 66px; height: 44px; padding: 2px; border: 1.5px solid var(--line); border-radius: var(--r-xs);
  overflow: hidden; cursor: pointer; background: var(--bg-soft);
}
.viewer-thumbs button[aria-pressed="true"] { border-color: var(--brand); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.viewer-note { padding: 0 16px 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.detail-title { display: grid; gap: 12px; }
.detail-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-title h1 { font-size: clamp(23px, 2.7vw, 30px); font-weight: 800; letter-spacing: -0.038em; }
.detail-title .trim { font-size: 15.5px; color: var(--muted); }
.detail-spec { display: flex; flex-wrap: wrap; gap: 8px; }

/* 진단표 — 접지 않는다. 처음부터 펼쳐 보인다 */
.diag { display: grid; gap: 0; }
.diag-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.diag-head h2 { font-size: 18px; font-weight: 700; }
.diag-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.diag-tally { display: flex; gap: 8px; flex-wrap: wrap; }
.diag-tally span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: var(--r-xs); font-size: 13px; font-weight: 700; border: 1px solid;
}
.tally-ok { background: var(--ok-soft); border-color: #bfeccd; color: #147a37; }
.tally-warn { background: var(--warn-soft); border-color: #f5ddb0; color: #96590a; }
.tally-none { background: var(--bg); border-color: var(--line); color: var(--muted); }

.diag-body { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 0; }
.diag-figure {
  padding: 22px; border-right: 1px solid var(--line); background: var(--bg-soft);
  display: grid; gap: 12px; justify-items: center; align-content: start;
}
.diag-fig-box { position: relative; width: 100%; max-width: 180px; }
.diag-figure img { width: 100%; height: auto; }
/* 판금 위치 표식 — 점만 사진 위에 얹고 뜻은 아래 글로 적는다(색만으로 전하지 않는다) */
.diag-mark {
  position: absolute; right: 23%; top: 19%;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28), 0 0 0 1px #fff inset;
}
.diag-fig-cap {
  display: flex; align-items: center; gap: 6px; width: 100%;
  font-size: 12px; font-weight: 650; color: #96590a; line-height: 1.5;
}
.diag-fig-cap::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex: none;
}
.diag-legend { display: grid; gap: 6px; width: 100%; }
.diag-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }

.diag-table { width: 100%; font-size: 14px; }
.diag-table caption { text-align: left; padding: 16px 22px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.diag-table th, .diag-table td { padding: 11px 22px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.diag-table thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg-soft); }
.diag-table tbody th { font-weight: 600; width: 40%; }
.diag-table td.st { width: 108px; }
.diag-table td.memo { color: var(--muted); font-size: 13px; }
.diag-table tr:last-child th, .diag-table tr:last-child td { border-bottom: 0; }

.hist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hist {
  padding: 18px 22px; border-right: 1px solid var(--line); display: grid; gap: 5px; align-content: start;
}
.hist:nth-child(3n) { border-right: 0; }
.hist dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hist dd { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.hist .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.info-table { font-size: 14px; }
.info-table th, .info-table td { padding: 12px 20px; border-bottom: 1px solid var(--line); text-align: left; }
.info-table th { width: 132px; font-weight: 600; color: var(--muted); background: var(--bg-soft); font-size: 13px; }
.info-split { display: grid; grid-template-columns: 1fr 1fr; }
.info-split > table:first-child { border-right: 1px solid var(--line); }

.opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; padding: 4px 0 0; }
.opt-grid li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); min-height: 32px; }
.opt-grid .ico { color: var(--ok); }

.acc { border-top: 1px solid var(--line); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 56px; padding: 0 24px; cursor: pointer; font-size: 15px; font-weight: 650; text-align: left;
}
.acc-trigger .ico { color: var(--faint); transition: transform 0.24s var(--ease); }
.acc-trigger[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acc-panel { display: none; padding: 0 24px 22px; }
.acc-panel.open { display: block; }

/* 상세 우측 요약 패널 */
.buy-rail { position: sticky; top: 88px; display: grid; gap: 14px; }
.buy-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.buy-price { padding: 20px 22px; border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.buy-price .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.buy-price .val { font-size: 30px; font-weight: 800; letter-spacing: -0.042em; }
.buy-price .sub { font-size: 13px; color: var(--muted); }
.buy-calc { padding: 18px 22px; display: grid; gap: 11px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.buy-calc .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.buy-calc .row b { font-weight: 700; }
.buy-calc .big { font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: -0.035em; }
.buy-cta { padding: 18px 22px; display: grid; gap: 9px; }
.buy-meta { padding: 0 22px 20px; display: grid; gap: 7px; font-size: 12.5px; color: var(--muted); }
.buy-meta li { display: flex; gap: 7px; align-items: flex-start; }
.buy-meta .ico { color: var(--brand); flex: none; margin-top: 1px; }

.sticky-buy { display: none; }

/* ============================================ PAGE 04 — 금융비교 */
.fin-layout { display: grid; grid-template-columns: 352px minmax(0, 1fr); gap: 26px; align-items: start; padding: 30px 0 var(--section); }
.calc { position: sticky; top: 88px; display: grid; gap: 14px; }
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.calc-veh { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.calc-veh img { width: 92px; height: 54px; object-fit: cover; border-radius: var(--r-xs); flex: none; background: var(--bg-soft); }
.calc-veh .nm { font-size: 14.5px; font-weight: 700; }
.calc-veh .tr { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.calc-veh .pr { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 4px; }
.calc-body { padding: 18px; display: grid; gap: 18px; }
.calc-field { display: grid; gap: 9px; }
.calc-field .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.calc-field label { font-size: 13.5px; font-weight: 650; }
.calc-field .out { font-size: 15px; font-weight: 700; color: var(--brand); }
.calc-field input[type="range"] {
  width: 100%; height: 30px; appearance: none; background: none; cursor: pointer; margin: 0;
}
.calc-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--brand) var(--fill, 30%), var(--line) var(--fill, 30%));
}
.calc-field input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--sh-1);
}
.calc-field input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.calc-field input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
.calc-field input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.calc-field .scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.seg { display: flex; gap: 5px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 62px; min-height: 44px; border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); font-size: 13.5px; font-weight: 650; color: var(--ink-2); cursor: pointer;
}
.seg button:hover { border-color: var(--brand-line); color: var(--brand); }
.seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.calc-out { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 12px; }
.calc-out .lbl { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.calc-out .big { font-size: 34px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.calc-out .big small { font-size: 17px; font-weight: 600; }
.calc-out dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; font-size: 13.5px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.calc-out dt { color: rgba(255, 255, 255, 0.66); }
.calc-out dd { margin: 0; text-align: right; font-weight: 700; }

.fin-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
/* 가로 스크롤 상자는 position 을 잡아 준다 — static 이면 넘친 표가 문서 스크롤 폭까지
   밀어 올려 320·390px 에서 페이지 전체가 가로로 밀렸다(실측). */
.tbl-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; max-width: 100%; }
.fin-table { min-width: 660px; font-size: 14px; }
.fin-table caption { text-align: left; padding: 18px 22px 12px; font-size: 15px; font-weight: 700; }
.fin-table caption .sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.fin-table th, .fin-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: right; }
.fin-table thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg-soft); text-align: right; }
.fin-table thead th:first-child, .fin-table tbody th { text-align: left; }
.fin-table tbody th { font-weight: 650; }
.fin-table .co { display: flex; align-items: center; gap: 10px; }
.fin-table .co .mk { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.fin-table .co .nm { display: grid; gap: 2px; }
.fin-table .co .nm b { font-size: 14.5px; font-weight: 700; }
.fin-table .co .nm span { font-size: 12px; color: var(--muted); font-weight: 500; }
.fin-table td.mo b { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.fin-table tr.best { background: var(--brand-soft); }
.fin-table tr.best td, .fin-table tr.best th { border-bottom-color: var(--brand-line); }
.fin-table .pick { min-height: 40px; padding: 0 14px; border-radius: var(--r-xs); border: 1px solid var(--brand); color: var(--brand); font-size: 13px; font-weight: 700; cursor: pointer; }
.fin-table .pick:hover { background: var(--brand); color: #fff; }
.fin-table .pick[aria-pressed="true"] { background: var(--brand); color: #fff; }

.fin-legal {
  display: grid; gap: 8px; padding: 18px 22px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r); font-size: 12.5px; color: var(--muted); line-height: 1.7;
}
.fin-legal b { color: var(--ink-2); }

.compare-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; align-content: start; }
.ccard.reco { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ccard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ccard h3 { font-size: 15.5px; font-weight: 700; }
.ccard .rate { font-size: 13.5px; color: var(--muted); }
.ccard .rate b { color: var(--brand); font-size: 15px; }
.ccard ul { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.ccard ul li { display: flex; gap: 7px; align-items: flex-start; }
.ccard ul .ico { color: var(--ok); flex: none; margin-top: 2px; }

/* ============================================ PAGE 05 — 방문예약 */
.visit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 26px; align-items: start; padding: 30px 0 var(--section); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
fieldset { margin: 0; padding: 24px; border: 0; border-bottom: 1px solid var(--line); }
fieldset:last-of-type { border-bottom: 0; }
legend {
  display: flex; align-items: center; gap: 9px; padding: 0; margin-bottom: 18px;
  font-size: 16.5px; font-weight: 700;
}
legend .no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.field .req { color: var(--err); }
.control {
  width: 100%; min-height: 50px; padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.control::placeholder { color: #a3abb7; }
.control:hover { border-color: #b6bfcb; }
.control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.16); }
.control:disabled { background: var(--bg); color: #9aa3af; cursor: not-allowed; }
textarea.control { min-height: 108px; resize: vertical; line-height: 1.65; }
select.control {
  appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.field.ok .control { border-color: var(--ok); }
.field.invalid .control { border-color: var(--err); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14); }
.err { display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--err); font-weight: 600; }
.field.invalid .err { display: flex; }
.hint { font-size: 12.5px; color: var(--muted); }
.counter { text-align: right; font-size: 12px; color: var(--faint); }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-chip span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 650; color: var(--ink-2); cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.radio-chip span:hover { border-color: var(--brand-line); color: var(--brand); }
.radio-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.radio-chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.radio-chip input:disabled + span { background: var(--bg); color: #a3abb7; border-color: var(--off); cursor: not-allowed; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot-grid .radio-chip span { width: 100%; padding: 0 10px; }

.agree-box { padding: 16px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); display: grid; gap: 10px; }
.agree-box .check { min-height: 44px; font-size: 14px; color: var(--ink); font-weight: 600; }
.agree-box p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.form-foot { padding: 22px 24px; display: grid; gap: 12px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.form-status {
  display: flex; align-items: flex-start; gap: 9px; min-height: 22px;
  font-size: 13.5px; font-weight: 600; line-height: 1.6;
}
.form-status:empty { display: none; }
.form-status .ico { flex: none; margin-top: 1px; }
.form-status.is-err { color: var(--err); }
.form-status.is-ok { color: #147a37; }
.form-status.is-load { color: var(--muted); }

.visit-rail { position: sticky; top: 88px; display: grid; gap: 14px; }
.branch-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.branch-card img { width: 100%; height: auto; }
.branch-body { padding: 18px 20px; display: grid; gap: 10px; }
.branch-body h2 { font-size: 16.5px; font-weight: 700; }
.branch-body dl { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 7px 10px; font-size: 13.5px; }
.branch-body dt { color: var(--muted); font-weight: 600; }
.branch-body dd { margin: 0; color: var(--ink-2); }
.branch-live {
  display: flex; align-items: center; gap: 9px; padding: 12px 14px;
  background: var(--ok-soft); border: 1px solid #bfeccd; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 650; color: #147a37;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

/* ============================================================== 푸터 */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.72); padding: 52px 0 26px; font-size: 13.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.1fr); gap: 30px; }
.foot-brand .brand-name { color: #fff; }
.foot-brand p { margin-top: 14px; line-height: 1.75; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.biz { margin-top: 16px; display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 5px 10px; font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.biz dt { font-weight: 600; }
.biz dd { margin: 0; }
.foot-col h2 { font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.foot-col li a { display: inline-flex; align-items: center; min-height: 34px; color: rgba(255, 255, 255, 0.66); }
.foot-col li a:hover { color: #fff; text-decoration: underline; }
.foot-cs .tel { display: block; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.foot-cs .hours { margin-top: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
.foot-cs .kakao { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--r-sm); color: #fff; font-weight: 650; font-size: 13.5px; }
.foot-cs .kakao:hover { background: rgba(255, 255, 255, 0.1); }
.foot-social { display: flex; gap: 8px; margin-top: 16px; }
.foot-social a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-xs); color: rgba(255, 255, 255, 0.7); }
.foot-social a:hover { color: #fff; border-color: #fff; }
.foot-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255, 255, 255, 0.5);
}
.foot-bottom nav { display: flex; gap: 6px; flex-wrap: wrap; }
.foot-bottom nav a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 8px; }
.foot-bottom nav a:hover { color: #fff; }
.foot-demo { margin-top: 12px; font-size: 12px; color: rgba(255, 255, 255, 0.42); }

/* ---------------------------------------------------------- 토스트 · 맨 위로 */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 130; transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 10px; min-width: 268px; max-width: calc(100vw - 32px);
  padding: 14px 20px; background: var(--ink); color: #fff; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; pointer-events: none;   /* 아래 버튼 클릭을 삼키지 않는다 */
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .ico { color: #7fb2ff; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 55; width: 46px; height: 46px;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 50%; box-shadow: var(--sh-2); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); border-color: var(--brand-line); }

/* --------------------------------------------------------------- 등장 */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* View Transition 이름 — 목록 사진 → 상세 Hero */
.viewer-stage .vt-hero { view-transition-name: car-hero; }

/* =========================================================== 반응형 §08 */
@media (max-width: 1180px) {
  :root { --wrap: 1024px; --gutter: 24px; --section: 76px; }
  .navlinks a { padding: 0 10px; font-size: 14.5px; }
  .hdr { gap: 16px; }
  .hdr-tel { display: none; }
  .search-layout { grid-template-columns: 248px minmax(0, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 312px; }
  .fin-layout { grid-template-columns: 312px minmax(0, 1fr); }
  .visit-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .diag-body { grid-template-columns: 216px minmax(0, 1fr); }
}

/* 태블릿 — 보조 패널을 Drawer 로 내리고 2열을 지킨다 */
@media (max-width: 960px) {
  .navlinks { display: none; }
  .menu-btn { display: inline-flex; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-shot { margin: 22px calc(var(--gutter) * -1) 0; }
  .hero-shot img { border-radius: 0; }
  .finder { margin-top: -28px; padding: 18px; }
  .finder-row { grid-template-columns: 1fr 1fr; }
  .finder-go { grid-column: 1 / -1; }
  .finder-go .btn { width: 100%; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-item { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .proof-item:first-child { border-top: 0; padding-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step-line { display: none; }
  .pick-grid { grid-template-columns: 1fr; }
  .rent-band { grid-template-columns: 1fr; padding: 26px; }
  .review-top { grid-template-columns: 1fr; }
  .review-list { grid-template-columns: 1fr; }
  .perk-grid { grid-template-columns: 1fr 1fr; }

  .search-layout, .detail-layout, .fin-layout, .visit-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { display: none; }
  .buy-rail, .calc, .visit-rail { position: static; }
  .diag-body { grid-template-columns: 1fr; }
  .diag-figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .diag-figure img { max-width: 128px; }
  .hist-grid { grid-template-columns: 1fr; }
  .hist { border-right: 0; border-bottom: 1px solid var(--line); }
  .hist:last-child { border-bottom: 0; }
  .info-split { grid-template-columns: 1fr; }
  .info-split > table:first-child { border-right: 0; }
  .opt-grid { grid-template-columns: 1fr 1fr; }
  .compare-cards { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

/* 모바일 — PC 축소가 아니라 우선순위를 다시 짠다 */
@media (max-width: 720px) {
  :root { --gutter: 18px; --section: 56px; }
  body { font-size: 15.5px; }
  .hdr { height: 62px; }
  .brand-name { font-size: 17px; }
  .home-hero { padding-top: 30px; }
  .hero-cta .btn { flex: 1 1 46%; }
  .finder-row { grid-template-columns: 1fr; }
  .finder-tabs button { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
  .steps { grid-template-columns: 1fr; }
  .perk-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .biz { grid-template-columns: 78px minmax(0, 1fr); }

  .sk-row { grid-template-columns: 1fr; }
  .sk-img { height: 168px; }
  .result-head { gap: 10px; }
  .sorts { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .sorts button { flex: none; }

  .viewer-bar { gap: 8px; }
  .viewer-thumbs { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .viewer-thumbs button { flex: none; }
  .diag-head { padding: 16px 18px; }
  .diag-table th, .diag-table td { padding: 10px 16px; }
  .diag-table td.memo, .diag-table thead th:nth-child(3) { display: none; }   /* 모바일은 상태·부위만 남긴다 */
  .info-table th, .info-table td { padding: 11px 16px; }
  .opt-grid { grid-template-columns: 1fr; }
  .acc-trigger { padding: 0 18px; }
  .acc-panel { padding: 0 18px 18px; }

  /* 상세 하단 고정 구매 바 */
  .sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .sticky-buy .pr { display: grid; gap: 1px; flex: none; }
  .sticky-buy .pr b { font-size: 18px; font-weight: 800; letter-spacing: -0.035em; }
  .sticky-buy .pr span { font-size: 11.5px; color: var(--muted); }
  .sticky-buy .btn { flex: 1; }
  body.has-stickybuy { padding-bottom: 82px; }

  .form-grid { grid-template-columns: 1fr; }
  .fin-table caption { padding: 16px 18px 10px; }
  .cmp-inner { flex-wrap: wrap; gap: 10px; }
  .cmp-title { width: 100%; }
  .cmp-actions { width: 100%; }
  .cmp-actions .btn { flex: 1; }
  .toast { bottom: 92px; }
  .to-top { display: none; }
}

/* 모바일 터치 표적 44px 이상 §09 */
@media (max-width: 960px) {
  button, .btn, a[role="button"] { min-height: 44px; }
  .finder-quick a, .chip-active, .tag { min-height: 36px; }
  .sorts button, .fin-table .pick, .btn-text, .btn-sm, .pager a { min-height: 44px; }
  .chip-active button { width: 26px; height: 26px; }
  .pager a, .pager span { min-width: 44px; height: 44px; }
}

/* 모바일 필터 Bottom Sheet §08 */
.filter-open { display: none; }
.sheet {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  max-height: 86vh; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -14px 44px rgba(16, 24, 32, 0.24);
  transform: translateY(101%); transition: transform 0.34s var(--ease);
  display: flex; flex-direction: column;
}
.sheet.open { transform: none; }
.sheet-grip { width: 42px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 10px auto 4px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-size: 17px; font-weight: 700; }
.sheet-body { overflow-y: auto; padding: 14px 18px; display: grid; gap: 12px; }
.sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 9px; flex: none; }
.sheet-foot .btn { flex: 1; }

@media (max-width: 960px) {
  .filter-open { display: inline-flex; }
  .sheet { display: flex; }
}

/* 가로 방향(낮은 높이)에서 sticky 가 화면을 잡아먹지 않게 */
@media (max-height: 560px) and (orientation: landscape) {
  .site-header { position: static; }
  .filters, .buy-rail, .calc, .visit-rail { position: static; }
  .sheet { max-height: 94vh; }
}

/* -------------------------------------------------- 모션 최소화 §05 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .sk { animation: none; background: #eef1f5; }
  .spinner { animation: none; border-top-color: var(--brand-line); }
}

@media print {
  .site-header, .drawer, .scrim, .to-top, .toast, .cmp-tray, .sticky-buy, .sheet, .filters { display: none !important; }
  body { background: #fff; }
  .detail-layout, .fin-layout, .visit-layout, .search-layout { grid-template-columns: 1fr; }
}
