/* Click Broker Atlas — 77-province motor insurance configurator
   Brand-aligned theme. Body font: Noto Sans Thai. Display font: Mitr.
   Palette mirrors src/_data/site.json so atlas feels continuous with the
   Eleventy-built landing pages (index/truck/ev) and northeast.html. */

:root {
  --cb-deep: #004219;
  --cb-dark: #0F7134;
  --cb-accent: #1B5248;
  --cb-light: #8AC524;
  --cb-light-deep: #76B720;
  --cb-300: #bfe86e;
  --cb-200: #d8f0a8;
  --cb-100: #ECF9CE;
  --cb-50: #F9FFEE;
  --cb-bg: #ffffff;
  --cb-surface: #F9FFEE;
  --cb-surface-2: #ECF9CE;
  --cb-text: #0a1f12;
  --cb-text-muted: #766258;
  --cb-text-faint: #998676;
  --cb-border: #e3ece1;
  --cb-border-soft: #eef3eb;
  --cb-line: #00BB45;
  --cb-line-hover: #00A03B;
  --cb-orange: #FF470F;
  --cb-orange-cta: #EF762F;
  --cb-shadow-sm: 0 1px 3px rgba(15, 113, 52, 0.06);
  --cb-shadow: 0 4px 18px rgba(15, 113, 52, 0.08);
  --cb-shadow-lg: 0 12px 40px rgba(15, 113, 52, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--cb-bg);
  color: var(--cb-text);
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* Display surfaces — match Mitr-as-display convention from clicktemplate.md */
.rail-mark,
.rail-name,
.step-title,
.eyebrow-num,
.brand-name-th,
.cov-class-th,
.price-currency,
.price-num,
.price-period,
.price-anchor-num,
.pay-card-final,
.install-result-monthly-num,
.pkg-price,
.plate-number {
  font-family: 'Mitr', 'Noto Sans Thai', sans-serif;
}

#atlas-root {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(138, 197, 36, 0.08), transparent 45%),
    radial-gradient(circle at 90% 92%, rgba(15, 113, 52, 0.06), transparent 50%),
    var(--cb-bg);
}

/* ============ PROGRESS RAIL ============ */
.progress-rail {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--cb-border);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--cb-border);
}
.rail-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--cb-deep) 0%, var(--cb-dark) 60%, var(--cb-light) 100%);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 6px rgba(15, 113, 52, 0.25);
}
.rail-logo-link { display: inline-flex; flex-shrink: 0; }
.rail-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 120px;
}

.rail-track { display: none; }
.rail-markers { display: none; }
.rail-name {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 1.2px;
  color: var(--cb-text);
  font-weight: 600;
}
.rail-name i {
  color: var(--cb-dark);
  font-size: 13px;
  letter-spacing: 0;
  display: block;
  margin-top: 2px;
  font-weight: 500;
}
.rail-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-step {
  display: flex;
  gap: 14px;
  padding: 12px 10px;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: default;
  border-left: 2px solid transparent;
}
.rail-step.can-jump { cursor: pointer; }
.rail-step.can-jump:hover { background: var(--cb-50); }
.rail-step.cur {
  background: var(--cb-100);
  border-left-color: var(--cb-dark);
}
.rail-step.done { opacity: 0.85; }
.rs-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--cb-text-faint);
  letter-spacing: 1.5px;
  padding-top: 2px;
}
.rail-step.cur .rs-num { color: var(--cb-dark); }
.rail-step.done .rs-num { color: var(--cb-light); }
.rs-block { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.rs-label { font-size: 14px; font-weight: 500; color: var(--cb-text); }
.rs-en { font-size: 11px; color: var(--cb-text-muted); }
.rs-val {
  font-size: 12px;
  color: var(--cb-dark);
  margin-top: 4px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ MAIN ============ */
.atlas-main {
  padding: 48px 56px 140px;
  max-width: 1280px;
  width: 100%;
}
.step-shell { animation: stepFade 0.45s ease; }
@keyframes stepFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 16px;
}
.eyebrow-num {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--cb-dark);
  font-weight: 700;
  background: var(--cb-100);
  padding: 4px 10px;
  border-radius: 6px;
}
.eyebrow-en {
  font-size: 14px;
  color: var(--cb-text-muted);
}
.step-title {
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
  color: var(--cb-text);
  line-height: 1.15;
}
.step-sub {
  font-size: 15px;
  color: var(--cb-text-muted);
  margin: 0 0 28px;
}

/* ============ NAV ROW ============ */
.nav-row {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cb-border-soft);
}
.nav-back, .nav-next {
  border: 0;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
}
.nav-back {
  background: var(--cb-surface);
  color: var(--cb-text);
  border: 1px solid var(--cb-border);
}
.nav-back:hover { background: var(--cb-surface-2); }
.nav-next {
  background: var(--cb-dark);
  color: #fff;
  margin-left: auto;
}
.nav-next:hover:not(:disabled) {
  background: #0a5828;
  box-shadow: var(--cb-shadow);
}
.nav-next:disabled {
  background: var(--cb-border);
  color: var(--cb-text-faint);
  cursor: not-allowed;
}

/* ============ MAP STEP (01) ============ */
.region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.region-tab {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  padding: 9px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  color: var(--cb-text);
  font-size: 13px;
}
.region-tab:hover { background: var(--cb-surface-2); }
.region-tab.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
}
.rt-th { font-weight: 500; font-size: 14px; }
.rt-en { font-size: 11px; opacity: 0.75; }

/* Mobile-only province pill grid — appears under region tabs after region pick.
   Wraps so every province in the region is visible at once instead of hiding
   behind a horizontal scroll affordance users tend to miss. */
.region-pill-strip:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 2px 12px;
  margin: -4px 0 14px;
}
.region-pill {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  padding: 9px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--cb-text);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.region-pill:hover { background: var(--cb-surface-2); border-color: var(--cb-light); }
.region-pill.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
  font-weight: 600;
}
.rp-th { display: inline-block; }
@media (min-width: 981px) {
  .region-pill-strip { display: none !important; }
}

.map-stage {
  position: relative;
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  min-height: 480px;
}
.map-canvas {
  width: 360px;
  height: 660px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  /* pan-y lets a single-finger drag scroll the page; two-finger gestures
     are intercepted by our customEventsHandler for pinch-zoom + map pan. */
  touch-action: pan-y;
  overflow: hidden;
}
.map-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}
.map-canvas svg:active { cursor: grabbing; }
.map-canvas .all-province {
  fill: #e8efe5;
  stroke: #c5d2c1;
  stroke-width: 0.6;
  cursor: pointer;
  transition: fill 0.18s;
}
.map-canvas .all-province:hover, .map-canvas .all-province.map-hover {
  fill: var(--cb-300);
}
.map-canvas .all-province.map-active {
  fill: var(--cb-light) !important;
  stroke: var(--cb-dark);
  stroke-width: 1.4;
}
.map-canvas .all-province.region-dim {
  fill: #f1f4ee !important;
  opacity: 0.55;
  cursor: default;
}
.map-canvas .all-province.region-dim:hover { fill: #f1f4ee !important; }

.province-label {
  font-family: 'Noto Sans Thai', 'Mitr', sans-serif;
  font-weight: 600;
  fill: #1f2a26;
  letter-spacing: -0.2px;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: opacity 0.2s;
}
.province-label.region-dim { opacity: 0.25; }

/* Region tinting (overrides default fill when not selected/dimmed) */
.map-canvas .all-province[data-region="central"] { fill: #f4e8c8; }
.map-canvas .all-province[data-region="east"]    { fill: #d6ecf2; }
.map-canvas .all-province[data-region="west"]    { fill: #e3dcef; }
.map-canvas .all-province[data-region="north"]   { fill: #f4d8cf; }
.map-canvas .all-province[data-region="isan"]    { fill: #e2eecb; }
.map-canvas .all-province[data-region="south"]   { fill: #cfe7dc; }
.map-canvas .all-province.map-hover { fill: var(--cb-300) !important; }
.map-canvas .all-province.map-active { fill: var(--cb-light) !important; }
.map-canvas .all-province.region-dim { fill: #f1f4ee !important; }

.map-tooltip {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(15, 113, 52, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
  pointer-events: none;
  transition: opacity 0.15s;
  font-size: 13px;
}
.tt-code {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--cb-300);
  font-weight: 700;
}
.tt-th { font-weight: 600; font-size: 15px; }
.tt-en { font-size: 12px; color: rgba(255,255,255,0.85); }
.tt-region { font-size: 11px; color: var(--cb-300); }

.map-zoom-controls {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(15, 113, 52, 0.08);
  z-index: 5;
}
.map-zoom-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--cb-text);
  cursor: pointer;
  transition: background 0.15s;
}
.map-zoom-btn:hover { background: var(--cb-50); }
.map-zoom-btn:active { background: var(--cb-100); }
.map-zoom-reset { font-size: 16px; }

.map-legend {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cb-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  font-size: 11px;
  color: var(--cb-text-muted);
}
.legend-row { display: flex; align-items: center; gap: 6px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-central { background: #e0c97e; }
.lg-east    { background: #7fc3d6; }
.lg-west    { background: #b6a4d3; }
.lg-north   { background: #e3a290; }
.lg-isan    { background: var(--cb-light); }
.lg-south   { background: #79b7a0; }

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.province-search {
  flex: 1;
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  padding: 11px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--cb-text);
  outline: none;
  transition: border-color 0.2s;
}
.province-search:focus { border-color: var(--cb-light); background: #fff; }
.search-count {
  font-size: 12px;
  color: var(--cb-text-muted);
  white-space: nowrap;
}

.map-province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.prov-pill {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: all 0.15s;
  font-family: inherit;
}
.prov-pill:hover { border-color: var(--cb-light); background: var(--cb-50); }
.prov-pill.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
}
.pill-code {
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--cb-dark);
  font-weight: 700;
}
.prov-pill.active .pill-code { color: var(--cb-300); }
.pill-name { font-weight: 500; font-size: 14px; }
.pill-en { font-size: 11px; color: var(--cb-text-muted); }
.prov-pill.active .pill-en { color: rgba(255,255,255,0.75); }

.no-results {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--cb-text-muted);
  font-size: 14px;
}

/* ============ BRAND STEP (02) ============ */
.brand-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.brand-tile {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 14px;
  padding: 22px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.18s;
  font-family: inherit;
}
.brand-tile:hover {
  border-color: var(--cb-light);
  background: #fff;
  box-shadow: var(--cb-shadow);
  transform: translateY(-2px);
}
.brand-tile.active {
  border-color: var(--cb-dark);
  background: #fff;
  box-shadow: var(--cb-shadow);
}
.brand-tile.active::after {
  content: '';
  position: absolute;
}
.brand-mark-wrap {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
}
.brand-mark {
  display: block;
  width: 56px;
  height: 56px;
}
.brand-mark-wordmark { border-radius: 14px; overflow: hidden; }
.brand-name-th {
  font-weight: 600;
  font-size: 14px;
  color: var(--cb-text);
}
.brand-name-en {
  font-size: 11px;
  color: var(--cb-text-muted);
}

.brand-expand-row {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}
.brand-expand-btn {
  background: transparent;
  border: 1px dashed var(--cb-border);
  color: var(--cb-dark);
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
}
.brand-expand-btn:hover {
  border-color: var(--cb-light);
  background: var(--cb-50);
}

/* ============ MODEL STEP (03) ============ */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.model-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.18s;
  font-family: inherit;
}
.model-card:hover {
  border-color: var(--cb-light);
  background: #fff;
  box-shadow: var(--cb-shadow-sm);
}
.model-card.active {
  border-color: var(--cb-dark);
  background: #fff;
  box-shadow: var(--cb-shadow);
}
.model-silhouette {
  height: 50px;
  display: flex;
  align-items: center;
}
.car-silh { width: 100%; max-height: 50px; }
.model-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--cb-text);
}
.model-body {
  font-size: 11px;
  color: var(--cb-text-muted);
  letter-spacing: 1.5px;
  font-weight: 500;
}

.api-loading {
  padding: 40px;
  text-align: center;
  color: var(--cb-text-muted);
  font-size: 14px;
}
.api-loading::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cb-border);
  border-top-color: var(--cb-dark);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  animation: spin 0.8s linear infinite;
}
.api-guidance::before {
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.api-error {
  padding: 28px;
  text-align: center;
  color: #b9491f;
  background: #fff5f0;
  border: 1px solid #f3d2c0;
  border-radius: 10px;
}

/* ============ SPEC STEP (04) ============ */
.spec-block { margin-bottom: 28px; }
.spec-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cb-text);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.spec-en { color: var(--cb-text-muted); font-weight: 400; margin-left: 6px; }

.year-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
}
.year-chip {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 76px;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: inherit;
}
.year-chip:hover { border-color: var(--cb-light); background: var(--cb-50); }
.year-chip.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
}
.year-ad { font-weight: 600; font-size: 16px; }
.year-be { font-size: 11px; opacity: 0.7; }

.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.engine-tile {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
  font-family: inherit;
}
.engine-tile:hover { border-color: var(--cb-light); background: var(--cb-50); }
.engine-tile.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
}
.eng-l { font-size: 18px; font-weight: 600; }
.eng-cc { font-size: 12px; opacity: 0.85; }
.eng-note { font-size: 11px; opacity: 0.7; }

/* ============ COVERAGE STEP (05) ============ */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.cov-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
  position: relative;
  font-family: inherit;
  min-height: 200px;
}
.cov-card:hover {
  border-color: var(--cb-light);
  background: #fff;
  box-shadow: var(--cb-shadow);
  transform: translateY(-2px);
}
.cov-card.active {
  border-color: var(--cb-dark);
  background: #fff;
  box-shadow: var(--cb-shadow);
  border-width: 2px;
}
.cov-class-en {
  font-size: 13px;
  color: var(--cb-text-muted);
  letter-spacing: 0.5px;
}
.cov-class-th {
  font-size: 24px;
  font-weight: 600;
  color: var(--cb-dark);
  letter-spacing: -0.3px;
}
.cov-desc {
  font-size: 13px;
  color: var(--cb-text-muted);
  line-height: 1.5;
  flex: 1;
}
.cov-price {
  font-size: 22px;
  font-weight: 600;
  color: var(--cb-text);
  margin-top: 8px;
  letter-spacing: -0.5px;
}
.cov-price small {
  font-size: 12px;
  font-weight: 400;
  color: var(--cb-text-muted);
}
.cov-price-loading {
  font-size: 13px;
  color: var(--cb-text-faint);
  font-style: italic;
  margin-top: 8px;
}
.cov-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--cb-light);
  color: var(--cb-dark);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 700;
}

/* ============ REVEAL STEP (06) ============ */
.reveal-pane { padding-top: 12px; }
.reveal-rule {
  height: 1px;
  background: var(--cb-border);
  margin: 0 0 22px;
  position: relative;
}
.reveal-rule::before, .reveal-rule::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cb-light);
  position: absolute;
  top: -2.5px;
}
.reveal-rule::before { left: 0; }
.reveal-rule::after { right: 0; }
.reveal-eyebrow {
  font-size: 13px;
  color: var(--cb-text-muted);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.reveal-eyebrow i {
  color: var(--cb-dark);
  font-size: 16px;
  margin-right: 6px;
}

.reveal-spec {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.thai-plate {
  background: #fff;
  border: 2px solid var(--cb-text);
  border-radius: 6px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 140px;
  font-family: 'Mitr', sans-serif;
}
.plate-prov-th { font-size: 11px; color: var(--cb-text); font-weight: 500; }
.plate-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--cb-text);
  letter-spacing: 2px;
  line-height: 1;
}
.plate-prov-en { font-size: 10px; color: var(--cb-text-muted); }
.reveal-spec-text { flex: 1; min-width: 200px; }
.rs-line {
  font-size: 22px;
  font-weight: 600;
  color: var(--cb-text);
  margin-bottom: 4px;
}
.rs-line i { color: var(--cb-dark); margin: 0 4px; }
.rs-meta {
  font-size: 14px;
  color: var(--cb-text-muted);
}

.reveal-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 28px 0 28px;
  color: var(--cb-text);
}
.price-currency {
  font-size: 60px;
  font-weight: 300;
  color: var(--cb-dark);
  line-height: 1;
}
.price-num {
  font-size: 132px;
  font-weight: 600;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--cb-dark);
  font-variant-numeric: tabular-nums;
}
.price-period {
  font-size: 22px;
  color: var(--cb-text-muted);
  margin-left: 8px;
}
.price-from {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--cb-text-muted);
  margin-bottom: -10px;
  letter-spacing: 0.4px;
}
.price-from i { color: var(--cb-dark); font-style: normal; font-weight: 600; }
.price-from-logo {
  height: 28px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 6px;
  padding: 3px 6px;
}
.price-from-text { display: inline-flex; align-items: center; gap: 6px; }

.price-block { margin: 22px 0 18px; }
.price-anchor {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--cb-text-muted);
}
.price-anchor-num {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--cb-text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 18px;
  color: var(--cb-text);
}
.price-savings {
  display: inline-block;
  margin-top: 12px;
  background: var(--cb-100);
  color: var(--cb-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

/* ============ PAYMENT OPTIONS ============ */
.payment-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0 28px;
}
.payment-options-eyebrow {
  font-size: 13px;
  color: var(--cb-text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.payment-options-eyebrow i { color: var(--cb-dark); font-style: italic; margin-left: 4px; }
.pay-card {
  background: var(--cb-surface);
  border: 1.5px solid var(--cb-border);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.18s, background 0.18s, opacity 0.18s, box-shadow 0.18s;
}
.pay-card-lump { cursor: pointer; }
.pay-card-lump:hover { border-color: var(--cb-light); background: #fff; }
.pay-card.selected {
  border-color: var(--cb-dark);
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 113, 52, 0.10);
}
.pay-card.dim { opacity: 0.55; }
.pay-card-head {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.pay-card-titles { min-width: 0; }
.pay-icon {
  width: 28px;
  height: 28px;
  color: var(--cb-dark);
  flex-shrink: 0;
}
.pay-title { font-weight: 700; font-size: 15px; color: var(--cb-text); line-height: 1.3; }
.pay-sub { font-size: 12px; color: var(--cb-text-muted); margin-top: 2px; line-height: 1.4; }
.pay-card-tag {
  font-size: 11px;
  color: var(--cb-text-muted);
  background: var(--cb-100);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.pay-card.selected .pay-card-tag {
  background: var(--cb-dark);
  color: #fff;
}

.pay-card-result {
  background: linear-gradient(135deg, var(--cb-100), #fff);
  border: 1px dashed var(--cb-light);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pay-card-final {
  font-size: 22px;
  font-weight: 700;
  color: var(--cb-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.pay-card-final-unit { font-size: 12px; color: var(--cb-text-muted); font-weight: 500; margin-left: 4px; }
.pay-card-saved {
  font-size: 12px;
  color: var(--cb-dark);
  font-weight: 600;
}

.install-vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0 12px;
  border: 1px solid var(--cb-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.ivs-col {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ivs-us {
  background: var(--cb-50);
  border-right: 1px solid var(--cb-border);
}
.ivs-them { background: #fafafa; }
.ivs-label {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cb-text-muted);
}
.ivs-us .ivs-label { color: var(--cb-dark); }
.ivs-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--cb-text);
}
.ivs-them .ivs-line { color: var(--cb-text-muted); }
.ivs-line strong { color: var(--cb-dark); font-weight: 700; white-space: nowrap; }
.ivs-icon { width: 18px; height: 18px; flex-shrink: 0; }
.ivs-check { color: var(--cb-dark); }
.ivs-x { color: #b9beb4; }
@media (max-width: 380px) {
  .ivs-line { font-size: 12px; }
  .ivs-col { padding: 10px 11px; }
}

.install-empty {
  font-size: 13px;
  color: var(--cb-text-muted);
  background: #fff;
  border: 1px dashed var(--cb-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  line-height: 1.5;
}
.install-foot-note {
  font-size: 11px;
  color: var(--cb-text-faint);
  margin-top: 8px;
  text-align: center;
  line-height: 1.4;
}

.price-monthly-info {
  margin-top: 10px;
  font-size: 13px;
  color: var(--cb-text);
  background: var(--cb-50);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.5;
}
.price-monthly-info strong { color: var(--cb-dark); font-weight: 700; }

.install-banks {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cb-border-soft);
  border-radius: 10px;
  overflow: hidden;
}
.install-bank-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cb-border-soft);
  align-items: center;
}
.install-bank-row:last-child { border-bottom: 0; }
.install-bank-logo {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.install-bank-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--cb-text);
  align-self: end;
}
.install-bank-name-en { color: var(--cb-text-muted); font-weight: 500; font-size: 11px; margin-left: 4px; }

.install-terms {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: start;
}
.install-term {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--cb-border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 50px;
}
.install-term-months { font-size: 12px; font-weight: 700; color: var(--cb-text); line-height: 1.2; }
.install-term-discount {
  font-size: 10px;
  font-weight: 600;
  color: var(--cb-dark);
  margin-top: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.install-term-discount-zero { color: var(--cb-text-faint); font-weight: 500; }
.install-term:hover { border-color: var(--cb-light); background: var(--cb-50); }
.install-term.active {
  background: var(--cb-dark);
  border-color: var(--cb-dark);
}
.install-term.active .install-term-months,
.install-term.active .install-term-discount { color: #fff; }
.install-term.row-dim { opacity: 0.55; }

.install-result {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--cb-light);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.install-result-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.install-result-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cb-text);
}
.install-result-savings {
  font-size: 12px;
  color: var(--cb-text-muted);
  margin-top: 4px;
}
.install-result-monthly {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.install-result-monthly-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--cb-dark);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.install-result-monthly-unit {
  font-size: 11px;
  color: var(--cb-text-muted);
  margin-top: 4px;
}
.install-result-total {
  border-top: 1px dashed var(--cb-border);
  padding-top: 8px;
  font-size: 12px;
  color: var(--cb-text-muted);
  text-align: right;
}
.install-result-total::before {
  content: '';
}

.reveal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 24px;
  padding: 22px 24px;
  background: var(--cb-surface);
  border: 1px solid var(--cb-border-soft);
  border-radius: 12px;
  margin-bottom: 28px;
}
.reveal-meta-grid > div { display: flex; flex-direction: column; gap: 3px; }
.rmg-k {
  font-size: 11px;
  color: var(--cb-text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.rmg-k i { text-transform: none; letter-spacing: 0; color: var(--cb-text-muted); }
.rmg-v { font-size: 14px; color: var(--cb-text); font-weight: 500; }

.reveal-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cta-primary, .cta-secondary {
  border: 0;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.cta-primary {
  background: var(--cb-line);
  color: #fff;
}
.cta-primary:hover {
  background: var(--cb-line-hover);
  box-shadow: 0 6px 18px rgba(0, 187, 69, 0.3);
}
.cta-primary svg { width: 20px; height: 20px; }
.cta-secondary {
  background: var(--cb-surface);
  color: var(--cb-text);
  border: 1px solid var(--cb-border);
}
.cta-secondary:hover { background: var(--cb-surface-2); }

.reveal-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 18px;
  border-top: 1px solid var(--cb-border-soft);
  font-size: 12px;
  color: var(--cb-text-muted);
}
.reveal-trust strong { color: var(--cb-dark); font-weight: 600; }

/* ============ COMPARE CARD (between hero and payment) ============ */
.compare-card {
  margin-top: 24px;
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: 16px;
  padding: 18px 18px 14px;
}
.compare-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.compare-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--cb-text);
  letter-spacing: -0.2px;
}
.compare-card-title i {
  color: var(--cb-dark);
  font-style: italic;
  font-weight: 500;
  margin-right: 4px;
}
.compare-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--cb-text-muted);
}
.compare-card-count { font-variant-numeric: tabular-nums; }
.compare-clear,
.compare-clear-inline {
  background: transparent;
  border: 0;
  color: var(--cb-dark);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}
.compare-clear:hover,
.compare-clear-inline:hover { background: var(--cb-100); }

.compare-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cb-border-soft);
}
.compare-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.compare-filter-insurer { flex: 1 1 220px; }
.compare-filter-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--cb-text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.compare-filter-label i {
  color: var(--cb-text-faint);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 2px;
}
.compare-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.compare-chip {
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cb-text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.compare-chip:hover {
  border-color: var(--cb-light);
  background: var(--cb-50);
}
.compare-chip.active {
  background: var(--cb-dark);
  color: #fff;
  border-color: var(--cb-dark);
}
.compare-chip-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--cb-text-muted);
  background: var(--cb-50);
  padding: 2px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.compare-chip.active .compare-chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.compare-select {
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  color: var(--cb-text);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  width: 100%;
  max-width: 320px;
}
.compare-select:focus {
  outline: none;
  border-color: var(--cb-dark);
  box-shadow: 0 0 0 3px var(--cb-100);
}

.compare-rows {
  margin-top: 14px;
  border: 1px solid var(--cb-border-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.pkg-row {
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr 1fr 1fr;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--cb-border-soft);
  font-size: 13px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.pkg-row:last-child { border-bottom: 0; }
.pkg-row-btn {
  width: 100%;
  text-align: left;
  font-family: inherit;
  border: 0;
  border-bottom: 1px solid var(--cb-border-soft);
  cursor: pointer;
  color: inherit;
}
.pkg-row-btn:last-child { border-bottom: 0; }
.pkg-row-btn:hover { background: var(--cb-50); }
.pkg-row-btn:focus-visible {
  outline: 2px solid var(--cb-dark);
  outline-offset: -2px;
}
.pkg-logo {
  width: 48px; height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}
.pkg-info { min-width: 0; }
.pkg-insurer {
  font-weight: 600;
  color: var(--cb-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pkg-plan {
  font-size: 12px;
  color: var(--cb-text-muted);
  margin-top: 2px;
}
.pkg-repair { color: var(--cb-text-muted); font-size: 12px; }
.pkg-deduct { color: var(--cb-text-muted); font-size: 12px; }
.pkg-pricecol { text-align: right; }
.pkg-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--cb-dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pkg-price::after {
  content: ' บาท';
  font-size: 11px;
  color: var(--cb-text-muted);
  font-weight: 500;
  margin-left: 2px;
}
.pkg-price-old {
  font-size: 12px;
  color: var(--cb-text-faint);
  text-decoration: line-through;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pkg-price-old::after {
  content: ' บาท';
  font-size: 10px;
  margin-left: 2px;
}
.pkg-badge-cheapest,
.pkg-badge-selected {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.pkg-badge-cheapest {
  background: var(--cb-100);
  color: var(--cb-dark);
}
.pkg-badge-selected {
  background: var(--cb-dark);
  color: #fff;
}
.pkg-row-btn.selected {
  background: var(--cb-50);
  box-shadow: inset 3px 0 0 0 var(--cb-dark);
}
.pkg-row-btn.selected:hover { background: var(--cb-100); }

.compare-empty {
  padding: 28px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--cb-border-soft);
  border-radius: 12px;
  margin-top: 14px;
}
.compare-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--cb-text);
  margin-bottom: 8px;
}

.compare-expander {
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--cb-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cb-dark);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}
.compare-expander:hover {
  background: var(--cb-50);
  border-color: var(--cb-light);
  border-style: solid;
}
.compare-expander-arrow {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}
.compare-expander-arrow.is-open { transform: rotate(180deg); }

.reveal-foot {
  margin-top: 18px;
  padding-top: 14px;
  font-size: 11px;
  color: var(--cb-text-faint);
  letter-spacing: 0.4px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */
.atlas-foot {
  position: fixed;
  bottom: 0; left: 240px; right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--cb-border);
  padding: 12px 56px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--cb-text-muted);
  letter-spacing: 1px;
  z-index: 5;
}

/* ============ FLOATING LINE BUBBLE ============ */
.line-bubble {
  position: fixed;
  bottom: 60px;
  right: 22px;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--cb-shadow-lg);
  z-index: 50;
  animation: bubbleIn 0.45s ease;
  max-width: 380px;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.line-bubble[hidden] { display: none; }
.line-bubble-close {
  position: absolute;
  top: 6px; right: 8px;
  background: transparent;
  border: 0;
  color: var(--cb-text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}
.line-bubble-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.line-bubble-icon { flex-shrink: 0; }
.line-bubble-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.line-bubble-text strong { font-size: 14px; color: var(--cb-text); font-weight: 600; }
.line-bubble-text span { font-size: 12px; color: var(--cb-text-muted); }
.line-bubble-cta {
  background: var(--cb-line);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.line-bubble-cta:hover { background: var(--cb-line-hover); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  #atlas-root { grid-template-columns: 1fr; }
  .progress-rail {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 12px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--cb-border);
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    background: var(--cb-bg);
    box-shadow: 0 4px 14px rgba(15, 113, 52, 0.06);
  }
  .rail-brand {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .rail-track {
    display: block;
    position: relative;
    width: 100%;
    height: 34px;
    margin: 2px 0 0;
  }
  .rail-track-bar {
    position: absolute;
    left: 18px; right: 28px;
    top: 50%;
    height: 4px;
    background: var(--cb-border);
    border-radius: 2px;
    transform: translateY(-50%);
  }
  .rail-track-fill {
    position: absolute;
    left: 18px;
    top: 50%;
    height: 4px;
    background: var(--cb-light);
    border-radius: 2px;
    width: calc((100% - 46px) * var(--progress, 0));
    transform: translateY(-50%);
    transition: width 0.45s ease;
  }
  .rail-track-car {
    position: absolute;
    top: 50%;
    left: calc(18px + (100% - 46px) * var(--progress, 0));
    width: 34px;
    height: 18px;
    color: var(--cb-dark);
    transform: translate(-50%, -50%);
    transition: left 0.45s ease;
    filter: drop-shadow(0 1px 1px rgba(15, 113, 52, 0.18));
  }
  .rail-track-flag {
    position: absolute;
    right: 0;
    top: 50%;
    width: 22px;
    height: 28px;
    color: var(--cb-dark);
    transform: translateY(-50%);
  }
  .rail-steps {
    flex-direction: row;
    flex: 0 0 auto;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    width: 100%;
  }
  .rail-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    padding: 6px 4px;
    min-width: 62px;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-left: 0;
    border-top: 2px solid transparent;
  }
  .rail-step.cur { border-left: 0; border-top-color: var(--cb-dark); }
  .rs-num { font-size: 12px; padding-top: 0; letter-spacing: 0.5px; }
  .rs-block { gap: 0; align-items: center; }
  .rs-label { font-size: 13px; line-height: 1.2; font-weight: 600; }
  .rs-en { font-size: 10px; line-height: 1.2; }
  .rs-val {
    font-size: 10px;
    margin-top: 2px;
    max-width: 70px;
  }
  .atlas-main { padding: 28px 20px 120px; }
  .atlas-foot { left: 0; padding: 10px 20px; font-size: 10px; }
  .step-title { font-size: 28px; }
  .price-num { font-size: 84px; letter-spacing: -2px; }
  .price-currency { font-size: 40px; }
  .map-stage { min-height: auto; padding: 12px; max-width: 100%; overflow: hidden; scroll-margin-top: 180px; }
  .map-canvas {
    width: min(100%, 340px);
    height: auto;
    aspect-ratio: 560 / 1025;
  }
  .spec-block { scroll-margin-top: 180px; }
  .map-legend { display: none; }
  .map-tooltip {
    top: auto;
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  .reveal-cta-row { flex-direction: column; }
  .cta-primary, .cta-secondary { width: 100%; justify-content: center; }
  .line-bubble {
    left: 12px;
    right: 12px;
    bottom: 70px;
    max-width: none;
  }
  .pkg-row {
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    font-size: 12px;
  }
  .pkg-row .pkg-repair, .pkg-row .pkg-deduct { display: none; }
  .year-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    overflow-x: visible;
    padding: 4px 0 8px;
    scroll-snap-type: none;
  }
  .year-chip {
    min-width: 0;
    padding: 8px 4px;
    flex-shrink: 1;
    scroll-snap-align: none;
  }
  .year-ad { font-size: 14px; }
  .year-be { font-size: 10px; }
}

@media (max-width: 480px) {
  .step-title { font-size: 22px; }
  .step-sub { font-size: 13px; }
  .price-num { font-size: 60px; }
  .price-currency { font-size: 30px; }
  .brand-wall { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .brand-tile { padding: 14px 6px; }
  .brand-name-th { font-size: 12px; }
  .brand-name-en { font-size: 10px; }
  .year-rail { grid-template-columns: repeat(3, 1fr); }
}

/* ============ DESKTOP RAIL — vertical car-to-flag ============ */
@media (min-width: 981px) {
  .rail-track {
    display: block;
    position: relative;
    flex: 0 0 auto;
    height: 380px;
    width: 100%;
    margin: 8px 0 0;
  }
  .rail-track-bar {
    position: absolute;
    left: 22px;
    top: 18px;
    bottom: 36px;
    width: 4px;
    background: var(--cb-border);
    border-radius: 2px;
  }
  .rail-track-fill {
    position: absolute;
    left: 22px;
    top: 18px;
    width: 4px;
    height: calc((100% - 54px) * var(--progress, 0));
    background: var(--cb-light);
    border-radius: 2px;
    transition: height 0.45s ease;
  }
  .rail-track-car {
    position: absolute;
    left: 24px;
    top: calc(18px + (100% - 54px) * var(--progress, 0));
    width: 38px;
    height: 22px;
    color: var(--cb-dark);
    transform: translate(-50%, -50%);
    transition: top 0.45s ease;
    z-index: 3;
    filter: drop-shadow(0 2px 3px rgba(15, 113, 52, 0.25));
  }
  .rail-track-flag {
    position: absolute;
    left: 24px;
    bottom: 0;
    width: 26px;
    height: 32px;
    color: var(--cb-dark);
    transform: translateX(-50%);
  }
  .rail-markers {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
  }
  .rail-marker {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(18px + (100% - 54px) * var(--at, 0));
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 0;
    border-radius: 8px;
    cursor: default;
    transition: background 0.2s;
  }
  .rail-marker.can-jump { cursor: pointer; }
  .rail-marker.can-jump:hover { background: var(--cb-50); }
  .rm-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cb-bg);
    border: 2px solid var(--cb-border);
    flex-shrink: 0;
    margin-left: 16px;
    transition: all 0.3s;
    z-index: 2;
  }
  .rail-marker.done .rm-dot {
    background: var(--cb-light);
    border-color: var(--cb-light);
  }
  .rail-marker.cur .rm-dot {
    background: var(--cb-dark);
    border-color: var(--cb-dark);
    box-shadow: 0 0 0 4px var(--cb-100);
  }
  .rm-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--cb-text-faint);
    letter-spacing: 1.2px;
    margin-left: 24px;
  }
  .rail-marker.done .rm-num { color: var(--cb-light); }
  .rail-marker.cur .rm-num { color: var(--cb-dark); }
  .rm-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
  }
  .rm-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--cb-text);
  }
  .rail-marker.done .rm-label { color: var(--cb-text-muted); }
  .rail-marker.cur .rm-label { color: var(--cb-dark); font-weight: 600; }
  .rm-val {
    font-size: 11px;
    color: var(--cb-dark);
    font-weight: 600;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rail-steps { display: none; }
}
