/**
 * AI Link Product Compare CSS v3.1
 * 인텔리전스 데이터 스타일 — detail.html 비교 테이블과 통일
 */

/* ============================================
   레이아웃 — 2026-05-04 풀사이즈 전환
   다른 페이지(solutions/index, detail)와 동일하게 fluid 폭 사용
   ============================================ */
.main-content {
  max-width: none;
  margin: 0;
  padding: 8px 16px 32px;
  width: 100%;
}
/* 초대형 모니터에서만 가독성을 위해 약간의 max — 그 외엔 풀사이즈 */
@media (min-width: 2200px) {
  .main-content { max-width: 2000px; margin: 0 auto; }
}

/* ============================================
   페이지 헤더
   ============================================ */
.page-header {
  text-align: left;
  margin-bottom: 6px;
  padding: 0 4px;
}

.page-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--al2-g800);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.page-title i { display: none; }

.page-subtitle { display: none; }

.page-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--al2-brand-dim);
  border-radius: 16px;
  margin-bottom: 8px;
}

.page-category-icon { font-size: 1rem; }
.page-category-label { font-size: .78rem; font-weight: 600; color: var(--al2-brand); }

.page-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.page-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--al2-g100);
  border: 1px solid var(--al2-g200);
  border-radius: var(--al2-radius-sm);
  color: var(--al2-g600);
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.page-action-btn:hover { background: var(--al2-g200); }
.page-action-btn.primary { background: var(--al2-brand); color: white; border-color: var(--al2-brand); }
.page-action-btn.primary:hover { background: var(--al2-brand-dark); }
.page-action-btn .count { opacity: .8; font-weight: 400; }

.page-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--al2-radius-sm);
  font-size: .78rem;
  font-weight: 600;
  background: var(--al2-green-light);
  color: var(--al2-green);
  border: 1px solid rgba(5,150,105,.15);
}

/* ============================================
   제품 헤더 — 컴팩트 카드
   ============================================ */
.products-header {
  display: grid;
  grid-template-columns: 140px repeat(var(--header-count, var(--product-count, 2)), minmax(160px, 1fr));
  gap: 0;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--al2-white);
  padding: 0;
  border: none;
  border-bottom: 2px solid var(--al2-g300);
  border-radius: 0;
}
/* 첫 셀 (비교 항목 라벨) = freeze */
.products-header .header-label {
  background: var(--al2-g50);
  border-right: 1px solid var(--al2-g200);
  padding: 4px 8px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--al2-g600);
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 2;
}
.products-header.is-stuck { box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.products-header.is-stuck .product-company { display: none; }
.products-header.is-stuck .product-thumb { width: 18px; height: 18px; font-size: .72rem; }

/* 차이만 보기 토글 바 */
.compare-controls {
  position: sticky;
  /* .al2-main padding-top(20px)을 상쇄해 GNB 하단에 정확히 맞닿음 */
  top: -20px;
  z-index: 25;
  display: flex; gap: 10px; align-items: center;
  padding: 8px 12px; background: #fff;
  border: 1px solid var(--al2-g200, #e5e7eb);
  border-top: none;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: none;
  flex-wrap: wrap;
}
.compare-controls-label { font-size: .72rem; color: var(--al2-g500, #64748b); }
.compare-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 16px; background: #fff;
  font-size: .72rem; color: var(--al2-g700, #374151);
  cursor: pointer; user-select: none; transition: all .12s;
}
.compare-toggle:hover { border-color: var(--al2-blue, #6366f1); color: var(--al2-blue, #6366f1); }
.compare-toggle.on { background: var(--al2-blue, #6366f1); color: #fff; border-color: var(--al2-blue, #6366f1); }
.compare-toggle input { display: none; }
.compare-toggle i { font-size: .68rem; }
.compare-row.row-hidden-same { display: none !important; }
.compare-row.row-hidden-excluded { display: none !important; }

/* 내게 중요한 항목만 — 행 선택 UI */
.compare-toggle-rows { cursor: pointer; }
.row-picker {
  flex: 1 1 100%;
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  padding: 8px 0 2px;
  border-top: 1px dashed var(--al2-g200, #e5e7eb);
  margin-top: 2px;
  align-items: center;
}
.row-picker-group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.row-picker-group-title {
  font-size: .66rem; font-weight: 700; color: var(--al2-g500, #64748b);
  letter-spacing: .02em; text-transform: uppercase;
  margin-right: 2px;
}
.row-picker[hidden] { display: none; }
.row-picker-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border: 1px solid var(--al2-g300, #d1d5db);
  border-radius: 14px; background: #fff;
  font-size: .7rem; color: var(--al2-g700, #374151);
  cursor: pointer; user-select: none; transition: all .1s;
}
.row-picker-chip:hover { border-color: var(--al2-brand, #6366f1); }
.row-picker-chip.on {
  background: var(--al2-brand-dim, #eef2ff);
  border-color: var(--al2-brand, #6366f1);
  color: var(--al2-brand-dark, #4f46e5); font-weight: 600;
}
.row-picker-chip.on::before { content: '✓'; font-weight: 700; }
.row-picker-chip.off { opacity: .55; text-decoration: line-through; }
.row-picker-reset {
  margin-left: auto;
  padding: 3px 10px; border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 14px; background: var(--al2-g50, #f8fafc);
  font-size: .68rem; color: var(--al2-g600, #4b5563);
  cursor: pointer;
}
.row-picker-reset:hover { background: var(--al2-g100, #f3f4f6); }
.row-picker-banner {
  flex: 1 1 100%;
  padding: 6px 10px;
  background: var(--al2-blue-light, #dbeafe);
  color: var(--al2-blue-dark, #1e40af);
  font-size: .7rem;
  border-radius: 6px;
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
}
.row-picker-banner[hidden] { display: none; }
.row-picker-banner-undo {
  margin-left: auto; background: transparent; border: none;
  color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline;
  font-size: .7rem;
}

/* 소개 셀 — 긴 텍스트 더보기/접기 */
.desc-cell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; width: 100%; }
.desc-cell .desc-text {
  font-size: .72rem;
  color: var(--al2-g600, #4b5563);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.desc-cell.is-long.is-collapsed .desc-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc-cell .desc-toggle {
  background: none;
  border: none;
  padding: 0;
  color: var(--al2-brand, #6366f1);
  font-size: .66rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.desc-cell .desc-toggle:hover { color: var(--al2-brand-dark, #4f46e5); }

/* 카테고리 셀 — 메인 카테고리 + 세부카테고리 칩 */
.cat-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.cat-cell .cat-main {
  font-weight: 600;
  color: var(--al2-g900, #111827);
  font-size: .82rem;
  line-height: 1.3;
}
.cat-cell .cat-subs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.cat-cell .cat-sub-chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--al2-g50, #f3f4f6);
  border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 999px;
  font-size: .68rem;
  color: var(--al2-g600, #4b5563);
  line-height: 1.4;
  white-space: nowrap;
}

/* 가격 정보 셀 — pricingTiers 목록 + 요약 칩 + 펼침 */
.price-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
}
.price-cell .price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.price-cell .price-chip {
  display: inline-block;
  padding: 2px 7px;
  background: var(--al2-g50, #f3f4f6);
  border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 999px;
  font-size: .65rem;
  color: var(--al2-g600, #4b5563);
  white-space: nowrap;
}
.price-cell .price-headline {
  font-family: var(--al2-font-mono, ui-monospace, monospace);
  font-size: .82rem;
  font-weight: 700;
  color: var(--al2-g900, #111827);
  text-align: center;
  line-height: 1.3;
}
.price-cell .price-headline-note {
  font-family: inherit;
  font-size: .65rem;
  font-weight: 500;
  color: var(--al2-g400, #9ca3af);
  margin-left: 4px;
}
.price-cell .price-tiers {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  border-top: 1px dashed var(--al2-g200, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.price-cell .price-tiers.is-collapsed .price-tier-overflow {
  display: none;
}
.price-cell .price-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  row-gap: 1px;
  column-gap: 6px;
  font-size: .68rem;
  line-height: 1.35;
  padding: 3px 0;
  border-bottom: 1px solid var(--al2-g100, #f3f4f6);
}
.price-cell .price-tier:last-child { border-bottom: none; }
.price-cell .price-tier-label {
  grid-column: 1;
  grid-row: 1;
  color: var(--al2-g700, #374151);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.price-cell .price-tier-pid {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--al2-font-mono, ui-monospace, monospace);
  font-size: .6rem;
  color: var(--al2-g400, #9ca3af);
}
.price-cell .price-tier-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--al2-font-mono, ui-monospace, monospace);
  font-weight: 600;
  color: var(--al2-g900, #111827);
  white-space: nowrap;
}
.price-cell .price-toggle {
  background: none;
  border: none;
  padding: 2px 0;
  margin: 2px 0 0;
  color: var(--al2-brand, #6366f1);
  font-size: .68rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  align-self: center;
}
.price-cell .price-toggle:hover { color: var(--al2-brand-dark, #4f46e5); }

.header-label {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: .68rem;
  font-weight: 600;
  color: var(--al2-g400);
  padding-bottom: 8px;
}

/* ─── 제품 식별 셀 — 테이블 컬럼 헤더 ─── */
.product-header-card {
  background: var(--al2-white);
  border-radius: 0;
  padding: 4px 8px;
  border: none;
  border-right: 1px solid var(--al2-g200);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  min-height: 40px;
}
.product-header-card:last-child { border-right: none; }
.product-header-card.recommended {
  background: var(--al2-brand-dim);
  box-shadow: inset 3px 0 0 var(--al2-brand);
}
.product-header-card.recommended::before { content: none; }

.ph-main { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.ph-info { flex: 0 1 auto; min-width: 0; text-align: center; }

.product-thumb {
  width: 22px;
  height: 22px;
  background: var(--al2-g100);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  margin: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--al2-g900);
  line-height: 1.2;
  margin: 0;
  min-height: 0;
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-company {
  font-size: .66rem;
  color: var(--al2-g500);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .7rem;
}
.ph-action {
  background: none;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--al2-g500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  transition: all .1s;
}
.ph-action:hover { background: var(--al2-g100); color: var(--al2-g800); }
.ph-action.ph-action-pri { background: var(--al2-brand); color: #fff; }
.ph-action.ph-action-pri:hover { background: var(--al2-brand-dark); }

.ph-fit-score {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 10px;
  background: var(--al2-g100, #f3f4f6); color: var(--al2-g700, #374151);
  font-size: .6rem; font-weight: 600; font-family: var(--al2-font-mono, monospace);
  line-height: 1.4;
}
.ph-fit-score[hidden], .ph-fit-score:empty { display: none !important; }
.ph-fit-score .ph-fit-label { font-family: inherit; font-size: .56rem; font-weight: 500; color: var(--al2-g500, #6b7280); letter-spacing: -.02em; }
.ph-fit-score .ph-fit-num { font-family: inherit; font-size: .62rem; font-weight: 700; color: inherit; letter-spacing: -.01em; }
.ph-fit-score.is-top { background: var(--al2-brand-light, #c7d2fe); color: var(--al2-brand-dark, #4f46e5); }
.ph-fit-score.is-top .ph-fit-label { color: var(--al2-brand, #6366f1); }
html[data-theme="dark"] .ph-fit-score { background: rgba(99,102,241,.12); color: var(--al2-g700, #d1d5db); }
html[data-theme="dark"] .ph-fit-score.is-top { background: rgba(99,102,241,.3); color: #e0e7ff; }

.product-badges { display: none; }

.badge {
  padding: 1px 6px;
  border-radius: 8px;
  font-size: .6rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-proc { background: var(--al2-green-light); color: var(--al2-green); }
.badge-pending { background: var(--al2-amber-light); color: var(--al2-amber); }
.badge-innovation { background: #fef3c7; color: #b45309; }
.badge-excellent { background: #dbeafe; color: #1d4ed8; }
.badge-venture { background: #ede9fe; color: #6d28d9; }
.badge-low-data { background: var(--al2-red-light); color: var(--al2-red); font-size: .58rem; }

/* 점수 + 등급 */
.al2-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 4px 0 2px;
}

/* ─── 장식 요소 전체 제거 (data-first) ─── */
.product-radar,
.completeness-mini,
.product-actions,
.voice-sentiment,
.exec-summary,
.exec-head,
.exec-oneliner,
.exec-bullets,
.exec-warn { display: none !important; }

/* ─── 참고 블록 (현장의 소리·AI 추천) — 기본 접힘 ─── */
.aux-section {
  margin-top: 8px;
  border: 1px solid var(--al2-g200);
  border-radius: var(--al2-radius-sm);
  background: var(--al2-white);
  overflow: hidden;
}
.aux-summary {
  padding: 6px 12px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--al2-g600);
  cursor: pointer;
  background: var(--al2-g50);
  list-style: none;
  user-select: none;
}
.aux-summary::-webkit-details-marker { display: none; }
.aux-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform .15s;
  color: var(--al2-g400);
}
.aux-section[open] .aux-summary::before { transform: rotate(90deg); }
.aux-section[open] .aux-summary { border-bottom: 1px solid var(--al2-g200); }

/* ─── 카테고리 호환성 배너 (Gate) ─── */
.compat-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 8px 0;
  border-radius: var(--al2-radius-sm);
  font-size: .72rem;
  line-height: 1.45;
  border: 1px solid transparent;
}
.compat-banner.soft {
  background: #fffbe6;
  border-color: #facc15;
  color: #713f12;
}
.compat-banner.block {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}
.compat-banner .cb-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(0,0,0,.06);
}
.compat-banner.soft .cb-icon { background: #fde68a; color: #713f12; }
.compat-banner.block .cb-icon { background: #fecaca; color: #7f1d1d; }
.compat-banner .cb-msg { flex: 1 1 auto; }
.compat-banner .cb-msg strong { font-weight: 700; margin-right: 4px; }
.compat-banner .cb-link {
  color: var(--al2-brand);
  font-weight: 600;
  text-decoration: underline;
  margin-left: 6px;
}
.compat-banner.block .cb-link { color: #7f1d1d; }
html[data-theme="dark"] .compat-banner.soft { background: #3b2f0c; border-color: #a16207; color: #fde68a; }
html[data-theme="dark"] .compat-banner.block { background: #3b1212; border-color: #b91c1c; color: #fecaca; }

.al2-score-num {
  font-family: var(--al2-font-mono);
  font-size: .95rem;
  font-weight: 700;
  color: var(--al2-g900);
  line-height: 1;
}

.al2-score-max {
  font-size: .6rem;
  color: var(--al2-g400);
  font-weight: 500;
}

.al2-grade {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: .6rem;
  font-weight: 700;
}
.al2-grade.excellent { background: #dbeafe; color: #1d4ed8; }
.al2-grade.good { background: var(--al2-green-light); color: var(--al2-green); }
.al2-grade.growing { background: var(--al2-amber-light); color: var(--al2-amber); }
.al2-grade.starter { background: var(--al2-g100); color: var(--al2-g500); }

/* 완성도 바 */
.completeness-mini { margin-top: 4px; }
.completeness-bar { height: 2px; background: var(--al2-g200); border-radius: 1px; overflow: hidden; margin-bottom: 2px; }
.completeness-fill { height: 100%; border-radius: 1px; transition: width .5s; }
.completeness-fill.low { background: var(--al2-g400); }
.completeness-fill.medium { background: var(--al2-amber); }
.completeness-fill.high { background: var(--al2-green); }
.completeness-fill.perfect { background: linear-gradient(90deg, var(--al2-green), var(--al2-blue)); }
.completeness-text { font-size: .6rem; color: var(--al2-g400); }

/* 제품 액션 */
.product-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
}

.product-action-btn {
  padding: 4px 8px;
  border-radius: var(--al2-radius-sm);
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.product-action-btn.primary { background: var(--al2-brand); color: white; }
.product-action-btn.primary:hover { background: var(--al2-brand-dark); }
.product-action-btn.secondary { background: var(--al2-g100); color: var(--al2-g700); }
.product-action-btn.secondary:hover { background: var(--al2-g200); }

.product-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: var(--al2-g100);
  border: none;
  border-radius: 50%;
  color: var(--al2-g400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  transition: all .15s;
  z-index: 10;
}
.product-remove-btn:hover { background: var(--al2-red); color: white; }

/* ============================================
   비교 테이블 — detail.html 인텔리전스 스타일 통일
   ============================================ */
/* 섹션 래퍼 — products-header를 첫 row로 포함하는 통합 테이블 */
/* overflow: clip (NOT hidden) — hidden creates a scroll container, which breaks
   the sticky products-header inside (sticky then measures `top: 98px` from section-top,
   shoving the header DOWN 98px onto the first compare row). clip masks overflow
   for border-radius without making this a scroll container. */
.key-compare-section {
  background: var(--al2-white);
  border-radius: var(--al2-radius-sm) var(--al2-radius-sm) 0 0;
  border: 1px solid var(--al2-g200);
  overflow: clip;
  margin: 0;
}

/* 섹션 구분 행 — 얇은 밴드 */
.section-header {
  padding: 3px 10px;
  background: var(--al2-g50);
  color: var(--al2-g700);
  border-bottom: 1px solid var(--al2-g200);
}
.section-title {
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--al2-g800);
}
.section-sub { display: none; }

.compare-grid {
  display: grid;
  grid-template-columns: 140px repeat(var(--product-count, 2), minmax(160px, 1fr));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.compare-row { display: contents; }
.compare-row:hover .compare-cell { background: var(--al2-g50); }

.compare-cell {
  padding: 4px 8px;
  border-bottom: 1px solid var(--al2-g100);
  border-right: 1px solid var(--al2-g100);
  display: flex;
  align-items: center;
  transition: background .1s;
  font-size: .72rem;
  line-height: 1.3;
  min-height: 28px;
}
.compare-cell:last-child { border-right: none; }

/* 라벨 freeze */
.compare-cell.label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--al2-g600);
  background: var(--al2-g50);
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--al2-g200);
}

.compare-cell.value {
  color: var(--al2-g800);
  justify-content: center;
  text-align: center;
}

/* ─── Winner 표시 단순화 — col tint 유지하고 bullet+bold만 추가 ─── */
.compare-cell.tier-best {
  position: relative;
  font-weight: 700;
  color: var(--al2-brand);
}
.compare-cell.tier-best::before {
  content: '•';
  color: var(--al2-brand);
  font-weight: 700;
  margin-right: 4px;
  font-size: 1rem;
  line-height: 1;
}
.compare-cell.tier-good { background: transparent; }
.compare-cell.tier-normal { background: transparent; }
.compare-cell.tier-empty { background: transparent; color: var(--al2-g400); }

/* ─── 제품별 컬럼 일관 배경 (header→모든 row 세로 줄무늬) ─── */
.product-header-card.col-1,
.compare-cell.col-1 { background-color: #eff6ff; }   /* blue-50 */
.product-header-card.col-2,
.compare-cell.col-2 { background-color: #ecfdf5; }   /* emerald-50 */
.product-header-card.col-3,
.compare-cell.col-3 { background-color: #fff7ed; }   /* amber-50 */

/* 컬럼 좌측 스트라이프 — 제품 식별 강화 */
.product-header-card.col-1 { box-shadow: inset 3px 0 0 #3b82f6; }
.product-header-card.col-2 { box-shadow: inset 3px 0 0 #10b981; }
.product-header-card.col-3 { box-shadow: inset 3px 0 0 #f59e0b; }

/* recommended도 col tint 유지 — 브랜드 링은 border-left로만 표시 */
.product-header-card.recommended {
  background-color: inherit;
  box-shadow: inset 3px 0 0 var(--al2-brand);
}

/* hover 시 진하게 (컬럼 tint 유지) */
.compare-row:hover .compare-cell.col-1 { background-color: #dbeafe; }
.compare-row:hover .compare-cell.col-2 { background-color: #d1fae5; }
.compare-row:hover .compare-cell.col-3 { background-color: #fed7aa; }

/* 다크모드 — 낮은 채도 색조 */
html[data-theme="dark"] .product-header-card.col-1,
html[data-theme="dark"] .compare-cell.col-1 { background-color: rgba(59,130,246,.12); }
html[data-theme="dark"] .product-header-card.col-2,
html[data-theme="dark"] .compare-cell.col-2 { background-color: rgba(16,185,129,.12); }
html[data-theme="dark"] .product-header-card.col-3,
html[data-theme="dark"] .compare-cell.col-3 { background-color: rgba(245,158,11,.12); }
html[data-theme="dark"] .compare-row:hover .compare-cell.col-1 { background-color: rgba(59,130,246,.20); }
html[data-theme="dark"] .compare-row:hover .compare-cell.col-2 { background-color: rgba(16,185,129,.20); }
html[data-theme="dark"] .compare-row:hover .compare-cell.col-3 { background-color: rgba(245,158,11,.20); }

.winner-pill { display: none; }

.value-good { color: var(--al2-green); font-weight: 600; }
.value-warning { color: var(--al2-amber); }
.value-empty { color: var(--al2-g400); font-size: .68rem; }

/* ─── Section win badges (P0) ─── */
.section-win-badges {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .65rem;
}
.section-win-badges .swb-label {
  color: var(--al2-g400);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .58rem;
  margin-right: 2px;
}
.section-win-badges .swb-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--al2-g50);
  border: 1px solid var(--al2-g200);
  font-family: var(--al2-font-mono);
  font-weight: 700;
  color: var(--al2-g700);
}
.section-win-badges .swb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.section-win-badges .swb-p1 .swb-dot { background: var(--al2-brand); }
.section-win-badges .swb-p2 .swb-dot { background: #0ea5e9; }
.section-win-badges .swb-p3 .swb-dot { background: #f59e0b; }
.section-win-badges .swb-p4 .swb-dot { background: #10b981; }

/* ─── Top-right action cluster (P3) ─── */
.top-action-cluster {
  position: fixed;
  top: 70px;
  right: 20px;
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--al2-g200);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
  z-index: 30;
}
.tac-btn {
  background: none;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--al2-g500);
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  position: relative;
}
.tac-btn:hover { background: var(--al2-g100); color: var(--al2-g800); }
.tac-btn.tac-pri { background: var(--al2-brand); color: #fff; }
.tac-btn.tac-pri:hover { background: var(--al2-brand-dark, #5a2fb8); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,58,224,.3); }
@media (max-width: 900px) {
  .top-action-cluster { top: 60px; right: 10px; padding: 4px; }
  .tac-btn { width: 30px; height: 30px; font-size: .72rem; }
}
@media print { .top-action-cluster { display: none !important; } }

/* ─── Micro-typography refinements (P3) ─── */
.page-title, .section-title, .detail-section-title, .page-subtitle {
  letter-spacing: -.02em;
}
.exec-bullet-name, .product-name, .voice-card-name {
  letter-spacing: -.015em;
}
/* 숫자는 전체 monospace + tabular */
.al2-score-num, .al2-cmp-score-num, .vs-count, .sidebar-count,
.section-win-badges .swb-item, .exec-sub, .empty-recent-card {
  font-variant-numeric: tabular-nums;
}
/* 라벨 smallcaps — 섹션 헤더 사이드 라벨용 */
.compare-cell.label, .sidebar-section-title, .swb-label,
.exec-head .exec-badge, .vs-label {
  font-feature-settings: "tnum" on;
}

/* ─── Section Jump Pills (P2) ─── */
/* 섹션 이동 — 얇은 한 줄 */
.section-jump {
  display: flex;
  gap: 2px;
  padding: 2px 4px;
  background: var(--al2-white);
  border: 1px solid var(--al2-g200);
  border-radius: 0;
  margin-bottom: 0;
  position: sticky;
  /* top은 JS(initStickyHeader)에서 controls 높이 기반 동적 계산 */
  top: -20px;
  z-index: 22;
}
.sj-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--al2-g500);
  background: transparent;
  text-decoration: none;
  transition: background .1s;
  letter-spacing: -.01em;
}
.sj-pill:hover { background: var(--al2-g100); color: var(--al2-g800); }
.sj-pill.on {
  background: var(--al2-brand);
  color: #fff;
}
@media print { .section-jump { display: none !important; } }

/* ─── Executive Summary (P0) ─── */
.exec-summary {
  background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
  border: 1px solid var(--al2-g200);
  border-left: 3px solid var(--al2-brand);
  border-radius: var(--al2-radius-md);
  padding: 18px 22px;
  margin-bottom: 16px;
  position: relative;
}
.exec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.exec-badge {
  font-family: var(--al2-font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--al2-brand);
  background: rgba(108,58,224,.08);
  padding: 3px 8px;
  border-radius: 3px;
}
.exec-sub { font-size: .68rem; color: var(--al2-g400); font-weight: 500; }
.exec-oneliner {
  font-size: .88rem;
  color: var(--al2-g800);
  line-height: 1.6;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.exec-oneliner i { color: var(--al2-brand); margin-right: 6px; }
.exec-oneliner strong { color: var(--al2-g900); font-weight: 700; }
.exec-warn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 6px 10px;
  border-radius: var(--al2-radius-sm);
  margin-bottom: 10px;
}
.exec-bullets {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.exec-bullet {
  background: var(--al2-white);
  border: 1px solid var(--al2-g200);
  border-radius: var(--al2-radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.exec-bullet-name {
  font-size: .74rem;
  font-weight: 700;
  color: var(--al2-g900);
  letter-spacing: -.01em;
}
.exec-bullet-body {
  font-size: .7rem;
  color: var(--al2-g600);
  line-height: 1.5;
}

/* 점수 비교 행 */
.compare-cell .al2-cmp-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.compare-cell .al2-cmp-score-num {
  font-family: var(--al2-font-mono);
  font-size: .9rem;
  font-weight: 700;
  color: var(--al2-g900);
}

/* 증거 배지 칩 */
.al2-ev-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
}

.al2-ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .6rem;
  font-weight: 600;
}
.al2-ev-chip.cert { background: #dbeafe; color: #1d4ed8; }
.al2-ev-chip.ref { background: var(--al2-green-light); color: var(--al2-green); }
.al2-ev-chip.rep { background: var(--al2-brand-dim); color: var(--al2-brand); }

/* ============================================
   상세 비교 섹션
   ============================================ */
.detail-section {
  background: var(--al2-white);
  border-radius: 0;
  border: 1px solid var(--al2-g200);
  border-top: none;
  overflow: hidden;
  margin: 0;
}
/* 마지막 섹션은 하단 라운드 */
.detail-section:last-of-type { border-radius: 0 0 var(--al2-radius-sm) var(--al2-radius-sm); }

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 10px;
  background: var(--al2-g50);
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--al2-g200);
}
.detail-section-header:hover { background: var(--al2-g100); }

.detail-section-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--al2-g800);
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-section-toggle {
  color: var(--al2-g400);
  transition: transform .25s;
  font-size: .65rem;
}
.detail-section.open .detail-section-toggle { transform: rotate(180deg); }
.detail-section-body { display: none; }
.detail-section.open .detail-section-body { display: block; }

/* ============================================
   데이터 부족 배너
   ============================================ */
.data-request-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--al2-amber-light);
  border-radius: var(--al2-radius-sm);
  margin: 10px;
  gap: 8px;
  flex-wrap: wrap;
}
.data-request-content { display: flex; align-items: center; gap: 6px; }
.data-request-icon { font-size: 1rem; }
.data-request-text { font-size: .75rem; color: var(--al2-g800); }
.data-request-text strong { color: #b45309; }
.data-request-btn {
  padding: 4px 10px;
  background: white;
  border: 1px solid var(--al2-amber);
  color: #b45309;
  border-radius: var(--al2-radius-sm);
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.data-request-btn:hover { background: #fffbeb; }

/* ============================================
   AI 추천 섹션
   ============================================ */
.ai-recommendation {
  background: var(--al2-white);
  border-radius: var(--al2-radius-md);
  border: 1px solid var(--al2-g200);
  overflow: hidden;
  margin-bottom: 16px;
}

.ai-rec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--al2-g50);
  border-bottom: 1px solid var(--al2-g200);
}
.ai-rec-icon { font-size: 1.2rem; }
.ai-rec-title { font-size: .82rem; font-weight: 700; color: var(--al2-g800); }

.ai-rec-body { padding: 14px; }

/* ─── AI 추천 상단 축약 요약 (aiRecSummary) ─── */
.ai-rec-summary {
  margin: 14px 0 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--al2-brand-dim, #eef2ff) 0%, var(--al2-white, #fff) 100%);
  border: 1px solid var(--al2-brand-light, #c7d2fe);
  border-radius: var(--al2-radius-lg, 10px);
  box-shadow: 0 2px 6px rgba(99,102,241,.06);
}
.ai-rec-summary[hidden] { display: none; }
.ai-sum-head {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; color: var(--al2-brand, #6366f1);
  margin-bottom: 10px; letter-spacing: -.01em;
}
.ai-sum-head i { font-size: .8rem; }
.ai-sum-head-hint { color: var(--al2-g500, #6b7280); font-weight: 500; font-size: .66rem; }
.ai-sum-body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ai-sum-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; background: var(--al2-white, #fff);
  border: 1px solid var(--al2-brand-light, #c7d2fe); border-radius: 10px;
  min-width: 240px; flex: 1 1 240px;
}
.ai-sum-trophy { font-size: 1.1rem; }
.ai-sum-icon { font-size: 1.1rem; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: var(--al2-g50, #f9fafb); border-radius: 6px; }
.ai-sum-pick-info { flex: 1; min-width: 0; }
.ai-sum-pick-name { font-size: .88rem; font-weight: 700; color: var(--al2-g900, #111827); letter-spacing: -.02em; }
.ai-sum-pick-meta { font-size: .68rem; color: var(--al2-g500, #6b7280); margin-top: 1px; display: flex; align-items: center; }
.ai-sum-reasons { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 260px; }
.ai-sum-reason-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; background: var(--al2-white, #fff);
  border: 1px solid var(--al2-g200, #e5e7eb); border-radius: 999px;
  font-size: .68rem; color: var(--al2-g700, #374151); font-weight: 500;
}
.ai-sum-reason-chip i { color: var(--al2-green, #10b981); font-size: .58rem; }
.ai-sum-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-sum-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 8px;
  background: var(--al2-white, #fff); border: 1px solid var(--al2-g200, #e5e7eb);
  color: var(--al2-g700, #374151); font-size: .72rem; font-weight: 600;
  cursor: pointer; transition: all .12s;
}
.ai-sum-btn:hover { border-color: var(--al2-brand, #6366f1); color: var(--al2-brand, #6366f1); }
.ai-sum-btn.primary { background: var(--al2-brand, #6366f1); color: #fff; border-color: var(--al2-brand, #6366f1); }
.ai-sum-btn.primary:hover { background: var(--al2-brand-dark, #4f46e5); color: #fff; }
@media (max-width: 700px) {
  .ai-sum-body { gap: 8px; }
  .ai-sum-pick, .ai-sum-reasons, .ai-sum-actions { flex: 1 1 100%; }
}
html[data-theme="dark"] .ai-rec-summary {
  background: linear-gradient(135deg, rgba(99,102,241,.12) 0%, var(--al2-white, #1f2937) 100%);
  border-color: rgba(99,102,241,.35);
}
html[data-theme="dark"] .ai-sum-pick { background: var(--al2-g50, #111827); border-color: rgba(99,102,241,.35); }
html[data-theme="dark"] .ai-sum-reason-chip { background: var(--al2-g50, #111827); border-color: var(--al2-g200, #374151); }
html[data-theme="dark"] .ai-sum-btn { background: var(--al2-g50, #111827); border-color: var(--al2-g200, #374151); color: var(--al2-g700, #d1d5db); }
@media print { .ai-rec-summary { background: #fff !important; } }

/* ─── 비교표 정렬형 AI 추천 grid ─── */
.ai-rec-grid {
  display: grid;
  grid-template-columns: 140px repeat(var(--product-count, 2), minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--al2-g200);
}
.ai-rec-label {
  padding: 8px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--al2-g600);
  background: var(--al2-g50);
  border-right: 1px solid var(--al2-g200);
  border-bottom: 1px solid var(--al2-g100);
  position: sticky; left: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 2px; justify-content: center;
}
.ai-rec-label-sub { font-size: .6rem; font-weight: 500; color: var(--al2-g400); }
.ai-rec-cell {
  padding: 8px;
  border-right: 1px solid var(--al2-g100);
  border-bottom: 1px solid var(--al2-g100);
  font-size: .72rem;
  color: var(--al2-g800);
  display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center; text-align: center;
}
.ai-rec-cell:last-child { border-right: none; }
.ai-rec-cell-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.ai-rec-cell.col-1 { background-color: #eff6ff; }
.ai-rec-cell.col-2 { background-color: #ecfdf5; }
.ai-rec-cell.col-3 { background-color: #fff7ed; }
.ai-rec-cell.is-winner { font-weight: 700; color: var(--al2-brand); }
.ai-rec-trophy { font-size: .9rem; margin-right: 3px; }
.ai-rec-na { color: var(--al2-g400); }
.ai-rec-reasons-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.ai-rec-reasons-list li {
  font-size: .66rem; padding: 2px 6px;
  background: rgba(255,255,255,.55);
  border-radius: 3px;
  line-height: 1.3;
}
.ai-rec-reasons-list li::before { content: '✓ '; color: var(--al2-green); font-weight: 700; }
.ai-rec-span {
  padding: 10px 12px;
  border-right: none;
  border-bottom: 1px solid var(--al2-g100);
  font-size: .72rem;
  color: var(--al2-g700);
  background: #fafbff;
}
.ai-rec-btn-mini {
  padding: 3px 8px;
  font-size: .65rem;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid var(--al2-g300);
  background: #fff;
  color: var(--al2-g700);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
}
.ai-rec-btn-mini.primary { background: var(--al2-brand); color: #fff; border-color: var(--al2-brand); }
.ai-rec-btn-mini.primary:hover { background: var(--al2-brand-dark); }
.ai-rec-btn-mini:hover:not(.primary) { background: var(--al2-g50); }

/* 다크모드 tint */
html[data-theme="dark"] .ai-rec-cell.col-1 { background-color: rgba(59,130,246,.12); }
html[data-theme="dark"] .ai-rec-cell.col-2 { background-color: rgba(16,185,129,.12); }
html[data-theme="dark"] .ai-rec-cell.col-3 { background-color: rgba(245,158,11,.12); }

/* 함께 비교 섹션 — 라벨 정렬 */
.freq-aligned-row {
  display: grid;
  grid-template-columns: 140px repeat(var(--product-count, 2), minmax(160px, 1fr));
  gap: 0;
  background: var(--al2-white);
  border: 1px solid var(--al2-g200);
  border-radius: var(--al2-radius-sm);
  margin-top: 16px;
  overflow: hidden;
}
.freq-aligned-row .ai-rec-label { border-bottom: none; }
.freq-aligned-row .freq-grid {
  padding: 10px;
  border: none;
  background: transparent;
  gap: 8px;
}

.ai-rec-winner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--al2-brand-dim);
  border-radius: var(--al2-radius-md);
  margin-bottom: 12px;
}
.ai-rec-winner-icon { font-size: 1.4rem; }
.ai-rec-winner-info h4 { font-size: .85rem; font-weight: 700; color: var(--al2-brand-dark); margin-bottom: 1px; }
.ai-rec-winner-info p { font-size: .72rem; color: var(--al2-g600); }

.ai-rec-reasons { margin-bottom: 10px; }
.ai-rec-reasons h5, .ai-rec-cautions h5 { font-size: .75rem; font-weight: 600; color: var(--al2-g700); margin-bottom: 6px; }

.reason-list { display: flex; flex-direction: column; gap: 4px; }
.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 10px;
  background: var(--al2-green-light);
  border-radius: var(--al2-radius-sm);
  font-size: .75rem;
  color: #065f46;
}
.reason-item i { color: var(--al2-green); margin-top: 2px; font-size: .65rem; }

.ai-rec-cautions { margin-bottom: 10px; }
.caution-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 10px;
  background: var(--al2-amber-light);
  border-radius: var(--al2-radius-sm);
  font-size: .75rem;
  color: #92400e;
  margin-bottom: 4px;
}
.caution-item i { color: var(--al2-amber); margin-top: 2px; font-size: .65rem; }

.ai-rec-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-rec-btn {
  padding: 6px 14px;
  border-radius: var(--al2-radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  border: none;
}
.ai-rec-btn.primary { background: var(--al2-brand); color: white; }
.ai-rec-btn.primary:hover { background: var(--al2-brand-dark); }
.ai-rec-btn.secondary { background: white; color: var(--al2-g700); border: 1px solid var(--al2-g300); }
.ai-rec-btn.secondary:hover { background: var(--al2-g50); }

/* ============================================
   하단 액션
   ============================================ */
.bottom-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--al2-radius-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
}
.action-btn.primary { background: var(--al2-brand); color: white; }
.action-btn.primary:hover { background: var(--al2-brand-dark); }
.action-btn.secondary { background: white; color: var(--al2-g700); border: 1px solid var(--al2-g300); }
.action-btn.secondary:hover { background: var(--al2-g50); }
.action-btn.disabled, .action-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ============================================
   빈 상태
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--al2-white);
  border-radius: var(--al2-radius-md);
  border: 1px solid var(--al2-g200);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--al2-g800); margin-bottom: 4px; }
.empty-desc { font-size: .78rem; color: var(--al2-g500); margin-bottom: 14px; line-height: 1.6; }
.empty-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--al2-blue-light);
  color: #0369a1;
  border-radius: var(--al2-radius-sm);
  font-size: .75rem;
  margin: 10px 0 16px;
}
.empty-tip i { color: var(--al2-amber); }

.empty-recent { margin: 20px auto 8px; max-width: 820px; text-align: left; }
.empty-recent-title { font-size: .78rem; font-weight: 700; color: var(--al2-g700); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.empty-recent-title i { color: var(--al2-brand); }
.empty-recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.empty-recent-card {
  background: var(--al2-g50);
  border: 1px solid var(--al2-g200);
  border-radius: var(--al2-radius-md);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.empty-recent-card:hover {
  background: var(--al2-brand-dim);
  border-color: var(--al2-brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108,58,224,.12);
}
.empty-recent-name { font-size: .82rem; font-weight: 700; color: var(--al2-g900); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-recent-cat { font-size: .68rem; color: var(--al2-g500); margin-bottom: 8px; }
.empty-recent-plus { font-size: .7rem; color: var(--al2-brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ============================================
   레퍼런스 / 주의사항 / 한줄평
   ============================================ */
.ref-tags { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.ref-tag { padding: 2px 7px; background: var(--al2-blue-light); color: #0369a1; border-radius: 12px; font-size: .68rem; }

.caution-text {
  padding: 6px 8px;
  background: var(--al2-red-light);
  border-left: 2px solid var(--al2-red);
  border-radius: 0 4px 4px 0;
  font-size: .75rem;
  color: #991b1b;
  text-align: left;
}

.summary-text {
  font-style: italic;
  color: var(--al2-g700);
  padding: 6px 8px;
  background: var(--al2-g50);
  border-radius: 4px;
  text-align: left;
  font-size: .75rem;
}

/* ============================================
   모바일 카드
   ============================================ */
.mobile-compare { display: none; }

.mobile-product-card {
  background: var(--al2-white);
  border-radius: var(--al2-radius-md);
  border: 1px solid var(--al2-g200);
  margin-bottom: 10px;
  overflow: hidden;
}
.mobile-product-card.recommended { border-color: var(--al2-brand); }

.mobile-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--al2-g50);
}
.mobile-card-thumb {
  width: 36px; height: 36px;
  background: white;
  border-radius: var(--al2-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.mobile-card-info { flex: 1; }
.mobile-card-name { font-size: .82rem; font-weight: 700; color: var(--al2-g900); }
.mobile-card-company { font-size: .68rem; color: var(--al2-g500); }
.mobile-card-badge { padding: 1px 6px; background: var(--al2-brand); color: white; border-radius: 8px; font-size: .55rem; font-weight: 600; }

.mobile-card-body { padding: 8px 12px; }
.mobile-card-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--al2-g100); }
.mobile-card-row:last-child { border-bottom: none; }
.mobile-card-label { font-size: .72rem; color: var(--al2-g600); }
.mobile-card-value { font-size: .75rem; font-weight: 600; color: var(--al2-g800); }
.mobile-card-value.good { color: var(--al2-green); }
.mobile-card-value.empty { color: var(--al2-g400); font-weight: 400; }

.mobile-card-footer { display: flex; gap: 5px; padding: 8px 12px; background: var(--al2-g50); }
.mobile-card-btn {
  flex: 1; padding: 6px;
  border-radius: var(--al2-radius-sm);
  font-size: .75rem; font-weight: 600;
  text-align: center; cursor: pointer; border: none;
}
.mobile-card-btn.primary { background: var(--al2-brand); color: white; }
.mobile-card-btn.primary:hover { background: var(--al2-brand-dark); }
.mobile-card-btn.secondary { background: white; color: var(--al2-g700); border: 1px solid var(--al2-g300); }

/* ============================================
   반응형
   ============================================ */
@media (max-width: 768px) {
  .main-content { padding: 12px; }
  .page-title { font-size: 1rem; }
  .products-header, .key-compare-section, .detail-section { display: none; }
  .mobile-compare { display: block; }
  .ai-rec-winner { flex-direction: column; text-align: center; }
  .ai-rec-actions, .bottom-actions { flex-direction: column; }
  .ai-rec-btn, .action-btn { justify-content: center; }
  .page-actions { flex-direction: column; align-items: stretch; }
  .page-action-btn { justify-content: center; }
}

/* ============================================
   애니메이션
   ============================================ */
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes pulse {
  0%, 100% { transform: scale(1); background: var(--al2-g100); }
  50% { transform: scale(1.2); background: var(--al2-red); color: white; }
}

/* ============================================
   v3.2: 인라인 검색 + 빈 슬롯 + 교체 + 자주 비교
   ============================================ */

/* ── 교체 버튼 ── */
.product-swap-btn {
  position: absolute; top: 6px; left: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--al2-border, #e5e7eb);
  background: #fff; color: var(--al2-brand, #6366f1);
  font-size: .65rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s, background .15s;
  z-index: 2;
}
.product-header-card:hover .product-swap-btn { opacity: 1; }
.product-swap-btn:hover { background: var(--al2-brand, #6366f1); color: #fff; }

/* ── 빈 슬롯 ── */
.product-header-card.empty-slot {
  border: 2px dashed var(--al2-border, #d1d5db);
  background: #fafafa;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; min-height: 200px;
  transition: border-color .2s, background .2s;
}
.product-header-card.empty-slot:hover {
  border-color: var(--al2-brand, #6366f1);
  background: #f5f3ff;
}
.empty-slot-icon { font-size: 2rem; color: var(--al2-brand, #6366f1); opacity: .5; transition: opacity .2s; }
.product-header-card.empty-slot:hover .empty-slot-icon { opacity: 1; }
.empty-slot-text { font-size: .85rem; font-weight: 600; color: var(--al2-text, #374151); }
.empty-slot-hint { font-size: .7rem; color: var(--al2-text-secondary, #9ca3af); }

/* ── 인라인 검색 ── */
.inline-search-container {
  position: absolute; top: 0; left: 0; right: 0;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  border: 1px solid var(--al2-border, #e5e7eb);
  z-index: 20; padding: 10px;
  min-height: 120px;
}
.inline-search-container.swap-panel { top: 40px; }
.inline-search-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .75rem; font-weight: 600; color: var(--al2-brand, #6366f1);
  margin-bottom: 8px;
}
.inline-search-close {
  border: none; background: none; cursor: pointer;
  color: var(--al2-text-secondary, #9ca3af); font-size: .8rem;
  padding: 2px 4px; border-radius: 4px;
}
.inline-search-close:hover { background: #f3f4f6; }
.inline-search-input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--al2-border, #e5e7eb);
  border-radius: 8px; font-size: .78rem;
  outline: none; transition: border-color .15s;
  box-sizing: border-box;
}
.inline-search-input:focus { border-color: var(--al2-brand, #6366f1); }
.inline-search-results {
  max-height: 240px; overflow-y: auto;
  margin-top: 6px;
}
.search-hint {
  text-align: center; padding: 16px 8px;
  font-size: .72rem; color: var(--al2-text-secondary, #9ca3af);
}
.search-result-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
}
.search-result-item:hover { background: #f5f3ff; }
.search-result-icon { font-size: 1.2rem; flex-shrink: 0; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: .78rem; font-weight: 600; color: var(--al2-text, #111827); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-company { font-size: .65rem; color: var(--al2-text-secondary, #9ca3af); }
.search-result-score { flex-shrink: 0; }

/* ── 자주 비교되는 제품 ── */
.freq-compared-section {
  margin-top: 24px; padding: 20px;
  background: #fff; border-radius: 14px;
  border: 1px solid var(--al2-border, #e5e7eb);
}
.freq-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.freq-icon { font-size: 1.2rem; }
.freq-title { font-size: .9rem; font-weight: 700; color: var(--al2-text, #111827); margin: 0; }
.freq-category {
  font-size: .65rem; font-weight: 500;
  padding: 2px 8px; border-radius: 6px;
  background: #f5f3ff; color: var(--al2-brand, #6366f1);
}
.freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.freq-card {
  padding: 14px; border-radius: 10px;
  border: 1px solid var(--al2-border, #e5e7eb);
  background: #fafafa;
  text-align: center; transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.freq-card.co-occur { background: linear-gradient(135deg, #eef2ff 0%, #fafafa 100%); border-color: var(--al2-blue, #6366f1); }
.freq-co-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--al2-blue, #6366f1); color: #fff;
  font-size: .56rem; padding: 2px 6px; border-radius: 10px;
  font-weight: 600;
}
.freq-card:hover {
  border-color: var(--al2-brand, #6366f1);
  box-shadow: 0 2px 12px rgba(99,102,241,.1);
}
.freq-card-icon { font-size: 1.6rem; margin-bottom: 6px; }
.freq-card-name { font-size: .78rem; font-weight: 600; color: var(--al2-text, #111827); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.freq-card-company { font-size: .65rem; color: var(--al2-text-secondary, #9ca3af); margin-bottom: 6px; }
.freq-card-meta { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.freq-card-actions { display: flex; gap: 4px; justify-content: center; }
.freq-btn {
  padding: 4px 10px; border-radius: 6px;
  font-size: .68rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--al2-border, #e5e7eb);
  transition: all .15s;
}
.freq-btn.view { background: #fff; color: var(--al2-text, #374151); }
.freq-btn.view:hover { background: #f3f4f6; }
.freq-btn.add { background: var(--al2-brand, #6366f1); color: #fff; border-color: var(--al2-brand, #6366f1); }
.freq-btn.add:hover { background: #4f46e5; }
.freq-btn.swap { background: #fff; color: var(--al2-brand, #6366f1); border-color: var(--al2-brand, #6366f1); }
.freq-btn.swap:hover { background: #f5f3ff; }

/* ── 교체 대상 선택 모달 ── */
.swap-picker-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.swap-picker-modal {
  background: #fff; border-radius: 14px;
  padding: 24px; width: 340px; max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.swap-picker-title {
  font-size: .9rem; font-weight: 700;
  text-align: center; margin-bottom: 16px;
  color: var(--al2-text, #111827);
}
.swap-picker-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 10px;
  cursor: pointer; transition: background .15s;
  margin-bottom: 6px;
  border: 1px solid var(--al2-border, #e5e7eb);
}
.swap-picker-item:hover { background: #f5f3ff; border-color: var(--al2-brand, #6366f1); }
.swap-picker-icon { font-size: 1.2rem; }
.swap-picker-name { flex: 1; font-size: .8rem; font-weight: 500; }
.swap-picker-arrow { font-size: .7rem; color: var(--al2-brand, #6366f1); font-weight: 600; }
.swap-picker-cancel {
  width: 100%; margin-top: 8px; padding: 10px;
  border: 1px solid var(--al2-border, #e5e7eb); border-radius: 8px;
  background: #fff; font-size: .8rem; font-weight: 500;
  cursor: pointer; color: var(--al2-text-secondary, #6b7280);
}
.swap-picker-cancel:hover { background: #f9fafb; }

@media (max-width: 768px) {
  .freq-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-search-container { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-radius: 14px 14px 0 0; max-height: 60vh; }
  .inline-search-results { max-height: 40vh; }
}

/* ============================================
   v3.2: 비교 전용 사이드바
   ============================================ */

/* ── 레이아웃 ── */
.al2-main { display: flex; }
.compare-sidebar {
  width: 220px; min-width: 220px; max-height: calc(100vh - 52px);
  position: sticky; top: 52px; overflow-y: auto;
  background: var(--al2-white, #fff); border-right: 1px solid var(--al2-g200, #e5e7eb);
  padding: 16px 14px; transition: width .25s, min-width .25s, padding .25s, opacity .25s;
  z-index: 10;
}
.compare-sidebar.collapsed { width: 0; min-width: 0; padding: 0; overflow: hidden; opacity: 0; }
.compare-main-area { flex: 1; min-width: 0; transition: margin-left .25s; }
.compare-main-area.sidebar-collapsed { margin-left: 0; }

.sidebar-collapse-btn {
  position: absolute; top: 12px; right: 10px;
  width: 22px; height: 22px; border-radius: 4px;
  border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: var(--al2-g400, #9ca3af);
  z-index: 2;
}
.sidebar-collapse-btn:hover { background: var(--al2-g100, #f3f4f6); color: var(--al2-g600, #4b5563); }

.sidebar-open-btn {
  position: fixed; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 44px;
  border-radius: 0 6px 6px 0;
  border: 1px solid var(--al2-g200, #e5e7eb); border-left: none;
  background: var(--al2-white, #fff); color: var(--al2-g500, #6b7280);
  cursor: pointer; font-size: .75rem;
  box-shadow: 2px 0 6px rgba(0,0,0,.05);
  display: none; align-items: center; justify-content: center;
  z-index: 15;
}
.sidebar-open-btn.visible { display: flex; }
.sidebar-open-btn:hover { color: var(--al2-brand, #6366f1); }

/* ── 사이드바 2-tab (P2) ── */
.sidebar-tabs {
  display: flex;
  gap: 4px;
  margin: -6px -4px 14px;
  padding: 4px;
  background: var(--al2-g50, #f9fafb);
  border-radius: 8px;
  position: sticky; top: 0; z-index: 3;
}
.sb-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 7px 8px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--al2-g500, #6b7280);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .15s;
  font-family: inherit;
}
.sb-tab i { font-size: .62rem; }
.sb-tab:hover { color: var(--al2-g700, #374151); background: rgba(255,255,255,.6); }
.sb-tab.on {
  background: var(--al2-white, #fff);
  color: var(--al2-brand, #6c3ae0);
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.sidebar-tabpanel { display: none; }
.sidebar-tabpanel.on { display: block; animation: sbTabIn .2s ease; }
@keyframes sbTabIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── 섹션 ── */
.sidebar-section {
  margin-bottom: 16px; padding-bottom: 16px; position: relative;
  border-bottom: 1px solid var(--al2-g100, #f3f4f6);
}
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-section-title {
  font-size: .68rem; font-weight: 600; color: var(--al2-g500, #6b7280);
  margin-bottom: 8px; display: flex; align-items: center; gap: 5px;
  text-transform: uppercase; letter-spacing: .02em;
}
.sidebar-section-title i { font-size: .6rem; color: var(--al2-g400, #9ca3af); }
.sidebar-count {
  font-size: .6rem; font-weight: 500; color: var(--al2-g400, #9ca3af);
  margin-left: auto;
}

/* ── 비교함 목록 ── */
.sidebar-basket-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-basket-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px;
  background: transparent; transition: background .12s;
}
.sidebar-basket-item:hover { background: var(--al2-g50, #f9fafb); }
.sidebar-basket-item.empty { cursor: pointer; opacity: .5; }
.sidebar-basket-item.empty:hover { opacity: .8; background: var(--al2-g50, #f9fafb); }
.sidebar-basket-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-basket-info { flex: 1; min-width: 0; }
.sidebar-basket-name { font-size: .72rem; font-weight: 500; color: var(--al2-g800, #1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-basket-meta { font-size: .6rem; color: var(--al2-g400, #9ca3af); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-basket-remove {
  width: 18px; height: 18px; border-radius: 3px;
  border: none; background: none; cursor: pointer;
  color: var(--al2-g400, #9ca3af);
  font-size: .6rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.sidebar-basket-item:hover .sidebar-basket-remove { opacity: 1; }
.sidebar-basket-remove:hover { background: var(--al2-red-dim, #fee2e2); color: var(--al2-red, #ef4444); }

/* ── 검색 ── */
.sidebar-search {
  width: 100%; padding: 6px 10px; box-sizing: border-box;
  border: 1px solid var(--al2-g200, #e5e7eb); border-radius: 6px;
  font-size: .72rem; outline: none; transition: border-color .15s;
  margin-bottom: 8px; background: var(--al2-g50, #f9fafb);
}
.sidebar-search:focus { border-color: var(--al2-brand, #6366f1); background: #fff; }

/* ── 제품 목록 ── */
.sidebar-product-list { max-height: 320px; overflow-y: auto; }
.sidebar-product-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 5px;
  transition: background .12s; cursor: default;
}
.sidebar-product-item:hover { background: var(--al2-g50, #f9fafb); }
.sidebar-product-icon { font-size: .85rem; flex-shrink: 0; width: 18px; text-align: center; }
.sidebar-product-info { flex: 1; min-width: 0; }
.sidebar-product-name { font-size: .7rem; font-weight: 500; color: var(--al2-g800, #1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-product-meta { font-size: .58rem; color: var(--al2-g400, #9ca3af); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-product-actions { flex-shrink: 0; }
.sidebar-prod-btn {
  width: 24px; height: 24px; border-radius: 4px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: var(--al2-g400, #9ca3af);
  opacity: 0; transition: all .15s;
}
.sidebar-product-item:hover .sidebar-prod-btn { opacity: 1; }
.sidebar-prod-btn.add:hover { background: var(--al2-brand-dim, #eef2ff); color: var(--al2-brand, #6366f1); }
.sidebar-prod-btn.swap:hover { background: #fef3c7; color: var(--al2-amber, #f59e0b); }

.sidebar-empty {
  text-align: center; padding: 16px 8px;
  font-size: .66rem; color: var(--al2-g400, #9ca3af);
  line-height: 1.6;
}

/* ── 비교 항목 필터 ── */
.sidebar-filter-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-filter-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 5px;
  font-size: .72rem; cursor: pointer;
  transition: background .12s;
}
.sidebar-filter-item:hover { background: var(--al2-g50, #f9fafb); }
.sidebar-filter-item input[type="checkbox"] { width: 13px; height: 13px; accent-color: var(--al2-brand, #6366f1); cursor: pointer; flex-shrink: 0; }
.sidebar-filter-icon { font-size: .7rem; width: 16px; text-align: center; color: var(--al2-g400, #9ca3af); }
.sidebar-filter-label { font-size: .72rem; color: var(--al2-g700, #374151); }

/* ── 모바일 사이드바 ── */
@media (max-width: 768px) {
  .compare-sidebar {
    position: fixed; left: 0; top: 52px; bottom: 0;
    z-index: 100; box-shadow: 4px 0 20px rgba(0,0,0,.1);
    transform: translateX(0); transition: transform .25s;
  }
  .compare-sidebar.collapsed { transform: translateX(-100%); width: 220px; min-width: 220px; padding: 16px 14px; opacity: 1; }
  .compare-main-area { margin-left: 0 !important; }
  .sidebar-open-btn { top: auto; bottom: 80px; }
}

@media print { .compare-sidebar, .sidebar-open-btn { display: none !important; } }

/* ══════════════════════════════════════
   ★ 내 조건 가중치 슬라이더
   ══════════════════════════════════════ */
.weight-reset-btn {
  margin-left: auto; background: none; border: 0;
  color: var(--al2-g400, #9ca3af); cursor: pointer;
  font-size: .65rem; padding: 2px 4px; border-radius: 4px;
}
.weight-reset-btn:hover { color: var(--al2-g700, #374151); background: var(--al2-g50, #f9fafb); }
.weight-hint { font-size: .62rem; color: var(--al2-g400, #9ca3af); padding: 0 2px 8px; line-height: 1.4; }
.weight-sliders { display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.weight-row { display: flex; flex-direction: column; gap: 3px; }
.weight-head { display: flex; align-items: center; gap: 5px; font-size: .7rem; }
.weight-icon { font-size: .82rem; }
.weight-label { flex: 1; color: var(--al2-g700, #374151); }
.weight-val {
  font-family: var(--al2-font-mono, 'JetBrains Mono', monospace);
  font-size: .68rem; font-weight: 700; color: var(--al2-blue, #6366f1);
  min-width: 18px; text-align: right;
}
.weight-slider {
  width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
  background: var(--al2-g200, #e5e7eb); border-radius: 2px; outline: none;
}
.weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--al2-blue, #6366f1); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.weight-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--al2-blue, #6366f1); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.weight-ranking { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--al2-g200, #e5e7eb); }
.weight-rank-title { font-size: .65rem; font-weight: 600; color: var(--al2-g500, #64748b); margin-bottom: 6px; }
.weight-rank-item {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 6px; border-radius: 5px;
  font-size: .68rem;
}
.weight-rank-item.top { background: linear-gradient(90deg, rgba(99,102,241,.08), transparent); }
.weight-rank-num {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--al2-g100, #f1f5f9); color: var(--al2-g600, #64748b);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700; flex-shrink: 0;
}
.weight-rank-item.top .weight-rank-num { background: var(--al2-blue, #6366f1); color: #fff; }
.weight-rank-icon { font-size: .8rem; flex-shrink: 0; }
.weight-rank-name { flex: 1; color: var(--al2-g700, #374151); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; }

/* ══════════════════════════════════════
   ★ 저장된 비교 (compareSnapshots)
   ══════════════════════════════════════ */
.saved-cmp-save-row { display: flex; gap: 6px; align-items: stretch; }
.saved-cmp-save-row .bulk-inq-input { flex: 1; }
.saved-cmp-save-row .bulk-inq-btn { flex-shrink: 0; white-space: nowrap; }
.saved-cmp-divider { height: 1px; background: var(--al2-g100, #f1f5f9); margin: 16px 0 12px; }
.saved-cmp-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.saved-cmp-item {
  display: flex; align-items: stretch; gap: 4px;
  background: var(--al2-g50, #f9fafb); border-radius: 6px;
  border: 1px solid var(--al2-g200, #e5e7eb);
  transition: border-color .12s;
}
.saved-cmp-item:hover { border-color: var(--al2-blue, #6366f1); }
.saved-cmp-item-main {
  flex: 1; padding: 8px 10px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.saved-cmp-item-title { font-size: .78rem; font-weight: 600; color: var(--al2-g900, #0f172a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-cmp-item-meta { display: flex; gap: 6px; font-size: .66rem; color: var(--al2-g500, #64748b); align-items: baseline; }
.saved-cmp-cat { background: var(--al2-blue-light, #eef2ff); color: var(--al2-blue, #6366f1); padding: 1px 5px; border-radius: 8px; font-weight: 500; flex-shrink: 0; }
.saved-cmp-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.saved-cmp-item-date { font-size: .6rem; color: var(--al2-g400, #9ca3af); }
.saved-cmp-del {
  background: none; border: 0; padding: 0 10px; color: var(--al2-g400, #9ca3af);
  cursor: pointer; font-size: .72rem; border-left: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 0 6px 6px 0; transition: all .12s;
}
.saved-cmp-del:hover { background: #fef2f2; color: #dc2626; }
.saved-cmp-login { text-align: center; padding: 30px 20px; color: var(--al2-g500, #64748b); font-size: .8rem; line-height: 1.5; }

/* ══════════════════════════════════════
   ★ AI 비교 내러티브 (heuristic)
   ══════════════════════════════════════ */
.ai-narrative {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 12px;
  border-left: 3px solid var(--al2-blue, #6366f1);
}
.ai-narrative-title { font-size: .75rem; font-weight: 700; color: var(--al2-g900, #0f172a); margin-bottom: 6px; }
.ai-narrative-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.ai-narrative-list li { font-size: .74rem; color: var(--al2-g700, #374151); line-height: 1.5; padding-left: 14px; position: relative; }
.ai-narrative-list li::before { content: '•'; position: absolute; left: 4px; color: var(--al2-blue, #6366f1); font-weight: 700; }
.ai-narrative-list li strong { color: var(--al2-blue, #6366f1); font-weight: 700; }

/* ══════════════════════════════════════
   ★ 현장의 소리 (highlight review + ref distribution + rep links)
   ══════════════════════════════════════ */
.voice-section { margin: 0; }
.voice-section .section-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.voice-section .section-sub { font-size: .68rem; color: var(--al2-g400, #9ca3af); }

/* 비교표와 동일한 컬럼 정렬 — 140px 라벨 + 제품 컬럼 */
.voice-grid {
  display: grid;
  grid-template-columns: 140px repeat(var(--product-count, 2), minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--al2-g200);
}
.voice-label {
  padding: 10px 8px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--al2-g600);
  background: var(--al2-g50);
  border-right: 1px solid var(--al2-g200);
  border-bottom: 1px solid var(--al2-g100);
  position: sticky; left: 0; z-index: 1;
  line-height: 1.35;
}
.voice-label-sub { font-size: .6rem; font-weight: 500; color: var(--al2-g400); }

.voice-card {
  background: #fff;
  border: none;
  border-right: 1px solid var(--al2-g100);
  border-bottom: 1px solid var(--al2-g100);
  border-radius: 0;
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.voice-card:last-child { border-right: none; }

.voice-refs { background: var(--al2-g50, #f9fafb); border-radius: 6px; padding: 8px 10px; }
.voice-ref-title { font-size: .68rem; font-weight: 600; color: var(--al2-g700, #374151); display: flex; justify-content: space-between; }
.voice-ref-total { font-size: .62rem; color: var(--al2-blue, #6366f1); font-weight: 500; }
.voice-ref-chart { display: flex; gap: 4px; height: 42px; align-items: flex-end; margin-top: 6px; }
.voice-ref-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.voice-ref-fill { width: 100%; max-width: 18px; background: linear-gradient(180deg, var(--al2-blue, #6366f1), var(--al2-blue-l, #8b8efa)); border-radius: 2px 2px 0 0; min-height: 4px; transition: height .4s; }
.voice-ref-year { font-size: .58rem; color: var(--al2-g400, #9ca3af); font-family: var(--al2-font-mono, monospace); }

.voice-reviews { min-height: 68px; }
.voice-skel, .voice-empty { font-size: .7rem; color: var(--al2-g400, #9ca3af); padding: 10px; text-align: center; background: var(--al2-g50, #f9fafb); border-radius: 6px; }
.voice-empty-inline { font-size: .68rem; color: var(--al2-g400, #9ca3af); padding: 4px 0; font-style: italic; }
.voice-review { background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%); border-left: 3px solid #f59e0b; border-radius: 6px; padding: 8px 10px; }
.voice-review-stars { color: #f59e0b; font-size: .78rem; letter-spacing: 1px; display: flex; align-items: center; gap: 4px; }
.voice-review-rating { font-family: var(--al2-font-mono, monospace); font-size: .7rem; color: var(--al2-g700, #374151); }
.voice-review-body { font-size: .75rem; color: var(--al2-g700, #374151); line-height: 1.5; margin: 4px 0; }
.voice-review-meta { font-size: .62rem; color: var(--al2-g500, #64748b); }
.voice-review-more { color: var(--al2-blue, #6366f1); text-decoration: none; }
.voice-review-more:hover { text-decoration: underline; }

/* ─── Sentiment bar (P1) ─── */
.voice-sentiment { background: var(--al2-g50, #f9fafb); border-radius: 6px; padding: 7px 10px; margin-top: 2px; }
.vs-label { font-size: .65rem; font-weight: 600; color: var(--al2-g600, #4b5563); margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; }
.vs-count { font-family: var(--al2-font-mono, monospace); color: var(--al2-g400, #9ca3af); font-weight: 500; font-size: .6rem; }
.vs-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--al2-g100, #f1f5f9); }
.vs-bar > span {
  color: #fff; font-size: .58rem; font-weight: 700; font-family: var(--al2-font-mono, monospace);
  display: flex; align-items: center; justify-content: center; letter-spacing: .02em;
  min-width: 18px;
}
.vs-bar .vs-pos { background: #10b981; }
.vs-bar .vs-neu { background: #9ca3af; }
.vs-bar .vs-neg { background: #ef4444; }

.voice-reps-title { font-size: .68rem; font-weight: 600; color: var(--al2-g700, #374151); margin-bottom: 4px; }
.voice-reps-list { display: flex; flex-wrap: wrap; gap: 4px; }
.voice-rep-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; background: var(--al2-blue-light, #eef2ff);
  color: var(--al2-blue, #6366f1); border-radius: 12px;
  font-size: .64rem; font-weight: 500;
  cursor: default;
}
.voice-rep-tag { background: #fff3; padding: 0 4px; border-radius: 6px; font-size: .56rem; }
.voice-rep-more { font-size: .62rem; color: var(--al2-g400, #9ca3af); padding: 3px 4px; }

@media (max-width: 900px) { .voice-grid { grid-template-columns: 120px repeat(var(--product-count, 2), 1fr); } .voice-card { padding: 8px 6px; } }
@media print { .voice-reps, .voice-review-more { display: none !important; } }

/* voice-card에도 col tint 적용 (비교표와 일관) */
.voice-card.col-1 { background-color: #eff6ff; }
.voice-card.col-2 { background-color: #ecfdf5; }
.voice-card.col-3 { background-color: #fff7ed; }
html[data-theme="dark"] .voice-card.col-1 { background-color: rgba(59,130,246,.12); }
html[data-theme="dark"] .voice-card.col-2 { background-color: rgba(16,185,129,.12); }
html[data-theme="dark"] .voice-card.col-3 { background-color: rgba(245,158,11,.12); }

/* ══════════════════════════════════════
   ★ 필수 조건 (must-have)
   ══════════════════════════════════════ */
.musthave-list { display: flex; flex-direction: column; gap: 2px; padding: 2px; }
.musthave-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 7px; border-radius: 5px; cursor: pointer;
  font-size: .7rem; transition: background .12s;
}
.musthave-item:hover { background: var(--al2-g50, #f9fafb); }
.musthave-item.alert { background: #fef2f2; }
.musthave-item input { width: 13px; height: 13px; accent-color: var(--al2-blue, #6366f1); cursor: pointer; flex-shrink: 0; }
.musthave-label { flex: 1; color: var(--al2-g700, #374151); }
.musthave-fail { font-size: .6rem; color: #dc2626; background: #fee2e2; padding: 1px 5px; border-radius: 8px; font-weight: 600; }
.musthave-check {
  margin-top: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: .62rem; line-height: 1.5; text-align: left;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.musthave-check-title { width: 100%; font-size: .64rem; font-weight: 600; margin-bottom: 2px; }
.musthave-check span { background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; }
.musthave-check.pass { background: #dcfce7; color: #166534; }
.musthave-check.fail { background: #fef2f2; color: #b91c1c; }
.product-header-card.musthave-fail { border-color: #fecaca; }
.product-header-card.musthave-pass { border-color: #86efac; }

.musthave-failed-list {
  margin-top: 8px; padding: 8px; border-radius: 6px;
  background: #fef2f2; border: 1px solid #fecaca;
  display: flex; flex-direction: column; gap: 4px;
}
.musthave-failed-list[hidden] { display: none; }
.musthave-failed-title { font-size: .68rem; font-weight: 700; color: #b91c1c; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.musthave-failed-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 7px; background: #fff;
  border-radius: 5px; border: 1px solid #fecaca;
}
.musthave-failed-info { flex: 1; min-width: 0; }
.musthave-failed-name { font-size: .7rem; font-weight: 600; color: var(--al2-g800, #1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.musthave-failed-reason { font-size: .58rem; color: #b91c1c; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.musthave-failed-remove {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 5px;
  border: 1px solid #fca5a5; background: #fff; color: #dc2626;
  cursor: pointer; font-size: .62rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.musthave-failed-remove:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.musthave-failed-locked { flex-shrink: 0; color: #9ca3af; font-size: .62rem; padding: 0 4px; }
.musthave-failed-hint { font-size: .58rem; color: var(--al2-g500, #6b7280); padding: 2px 2px 0; }
html[data-theme="dark"] .musthave-failed-list { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .musthave-failed-item { background: var(--al2-g50, #1f2937); border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .musthave-failed-name { color: var(--al2-g800, #e5e7eb); }

/* ══════════════════════════════════════
   ★ 일괄 문의 모달 (inquireAll)
   ══════════════════════════════════════ */
.bulk-inq-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
  animation: bulkFade .15s ease;
}
@keyframes bulkFade { from { opacity: 0 } to { opacity: 1 } }
.bulk-inq-modal {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: bulkSlide .2s cubic-bezier(.2,.9,.3,1);
}
@keyframes bulkSlide { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.bulk-inq-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--al2-g100, #f1f5f9);
}
.bulk-inq-title { font-size: 1.05rem; font-weight: 700; color: var(--al2-g900, #0f172a); margin: 0; }
.bulk-inq-subtitle { font-size: .78rem; color: var(--al2-g500, #64748b); margin: 4px 0 0; line-height: 1.4; }
.bulk-inq-close {
  background: none; border: 0; padding: 6px 8px;
  color: var(--al2-g400, #9ca3af); cursor: pointer;
  font-size: 1rem; border-radius: 6px;
}
.bulk-inq-close:hover { background: var(--al2-g50, #f9fafb); color: var(--al2-g700, #374151); }
.bulk-inq-body { padding: 16px 20px; overflow-y: auto; }
.bulk-inq-products { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bulk-inq-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; background: var(--al2-blue-light, #eef2ff);
  border: 1px solid var(--al2-blue, #6366f1); border-radius: 16px;
  font-size: .72rem; color: var(--al2-blue, #6366f1); font-weight: 500;
}
.bulk-inq-chip.blocked { background: var(--al2-g50, #f9fafb); border-color: var(--al2-g200, #e5e7eb); color: var(--al2-g400, #9ca3af); }
.bulk-inq-chip-icon { font-size: .85rem; }
.bulk-inq-chip-tag { font-size: .62rem; opacity: .7; padding-left: 4px; border-left: 1px dashed currentColor; }
.bulk-inq-warn {
  padding: 8px 10px; background: #fff7ed; border-left: 3px solid #f59e0b;
  color: #92400e; font-size: .72rem; border-radius: 4px; margin-bottom: 12px;
}
.bulk-inq-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--al2-g700, #374151); margin: 12px 0 6px;
}
.bulk-inq-req { color: var(--al2-red, #ef4444); }
.bulk-inq-opt { color: var(--al2-g400, #9ca3af); font-weight: 400; font-size: .68rem; }
.bulk-inq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-inq-timechip {
  padding: 5px 12px; border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 16px; font-size: .72rem; color: var(--al2-g600, #64748b);
  cursor: pointer; transition: all .12s; user-select: none;
}
.bulk-inq-timechip:hover { border-color: var(--al2-blue, #6366f1); color: var(--al2-blue, #6366f1); }
.bulk-inq-timechip.on { background: var(--al2-blue, #6366f1); color: #fff; border-color: var(--al2-blue, #6366f1); }
.bulk-inq-input, .bulk-inq-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--al2-g200, #e5e7eb);
  border-radius: 6px; font-size: .82rem; font-family: inherit;
  transition: border-color .12s, box-shadow .12s;
}
.bulk-inq-input:focus, .bulk-inq-textarea:focus {
  outline: none; border-color: var(--al2-blue, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.bulk-inq-textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.bulk-inq-check {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 12px; font-size: .72rem; color: var(--al2-g700, #374151);
  cursor: pointer; line-height: 1.4;
}
.bulk-inq-check input { width: 14px; height: 14px; margin-top: 2px; accent-color: var(--al2-brand, #6366f1); cursor: pointer; }
.bulk-inq-hint { display: block; color: var(--al2-g400, #9ca3af); font-size: .65rem; margin-top: 2px; }
.bulk-inq-handoff {
  margin-top: 10px; padding: 8px 11px; border-radius: 7px;
  background: var(--al2-brand-dim, #eef2ff); border: 1px solid var(--al2-brand-light, #c7d2fe);
  color: var(--al2-g700, #374151); font-size: .72rem; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 6px;
}
.bulk-inq-handoff i { color: var(--al2-brand, #6366f1); margin-top: 2px; flex-shrink: 0; }
.bulk-inq-handoff strong { color: var(--al2-brand-dark, #4f46e5); font-weight: 700; }
html[data-theme="dark"] .bulk-inq-handoff { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.3); color: var(--al2-g700, #d1d5db); }
.bulk-inq-footer {
  display: flex; gap: 8px; padding: 12px 20px 16px;
  border-top: 1px solid var(--al2-g100, #f1f5f9);
  justify-content: flex-end;
}
.bulk-inq-btn {
  padding: 9px 16px; border-radius: 6px; font-size: .82rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; transition: all .12s;
}
.bulk-inq-btn.secondary { background: #fff; border-color: var(--al2-g200, #e5e7eb); color: var(--al2-g700, #374151); }
.bulk-inq-btn.secondary:hover { background: var(--al2-g50, #f9fafb); }
.bulk-inq-btn.primary { background: var(--al2-blue, #6366f1); color: #fff; }
.bulk-inq-btn.primary:hover:not(:disabled) { background: var(--al2-blue-d, #4f46e5); }
.bulk-inq-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 정보 요청 체크박스 목록 */
.info-req-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--al2-g200, #e5e7eb); border-radius: 6px; padding: 4px; }
.info-req-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 5px; cursor: pointer;
  transition: background .12s;
}
.info-req-item:hover { background: var(--al2-g50, #f9fafb); }
.info-req-item input { width: 14px; height: 14px; accent-color: var(--al2-brand, #6366f1); cursor: pointer; flex-shrink: 0; }
.info-req-label { flex: 1; font-size: .78rem; color: var(--al2-g700, #374151); }
.info-req-missing { font-size: .64rem; color: var(--al2-amber, #f59e0b); background: #fff7ed; padding: 1px 6px; border-radius: 10px; font-weight: 500; }

/* 성공 상태 */
.bulk-inq-success { padding: 28px 24px 20px; text-align: center; max-width: 440px; }
.bulk-inq-success-icon { font-size: 2.4rem; margin-bottom: 8px; }
.bulk-inq-success-title { font-size: 1.05rem; font-weight: 700; color: var(--al2-g900, #0f172a); margin: 0 0 8px; }
.bulk-inq-success-desc { font-size: .82rem; color: var(--al2-g500, #64748b); line-height: 1.5; margin: 0 0 14px; }
.bulk-inq-success-flow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; margin: 0 0 10px;
  background: var(--al2-g50, #f9fafb); border-radius: 8px;
  flex-wrap: wrap;
}
.bif-step { display: flex; align-items: center; gap: 6px; }
.bif-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--al2-brand, #6366f1); color: #fff;
  font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.bif-label { font-size: .74rem; color: var(--al2-g700, #374151); }
.bif-label i { color: var(--al2-brand, #6366f1); margin-right: 3px; }
.bif-label strong { color: var(--al2-g900, #111827); font-weight: 700; }
.bif-arrow { color: var(--al2-g300, #d1d5db); font-weight: 700; }
.bulk-inq-success-note { font-size: .7rem; color: var(--al2-g500, #6b7280); margin: 0 0 18px; line-height: 1.5; }
html[data-theme="dark"] .bulk-inq-success-flow { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .bif-label strong { color: var(--al2-g800, #e5e7eb); }
.bulk-inq-success-actions { display: flex; gap: 8px; justify-content: center; }

@media (max-width: 600px) {
  .bulk-inq-modal { max-height: 95vh; }
  .bulk-inq-footer { flex-direction: column-reverse; }
  .bulk-inq-btn { width: 100%; justify-content: center; }
}

/* ============================================
   Dark Mode (P4) — scoped via [data-theme="dark"]
   ============================================ */
html[data-theme="dark"] {
  --al2-white: #0b1220;
  --al2-g50:  #111a2c;
  --al2-g100: #162238;
  --al2-g200: #25334d;
  --al2-g300: #3a4b6b;
  --al2-g400: #6a7a96;
  --al2-g500: #8fa0bd;
  --al2-g600: #b4c1d9;
  --al2-g700: #d3dcee;
  --al2-g800: #e7ecf7;
  --al2-g900: #f1f5ff;
  --al2-bg:   #0b1220;
  --al2-brand-dim: rgba(139,99,250,0.18);
  --al2-brand-light: rgba(139,99,250,0.25);
  --al2-shadow: 0 4px 12px rgba(0,0,0,0.5);
  --al2-shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
  color-scheme: dark;
}
html[data-theme="dark"] body { background: #070c17; color: var(--al2-g800); }

/* 반투명 배경 블록 — blur + tinted dark */
html[data-theme="dark"] .top-action-cluster,
html[data-theme="dark"] .section-jump {
  background: rgba(17,26,44,.88);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .sj-pill {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: var(--al2-g500);
}
html[data-theme="dark"] .sj-pill.on {
  background: var(--al2-brand);
  color: #fff;
  border-color: var(--al2-brand);
}

/* 카드/패널 경계 */
html[data-theme="dark"] .product-header,
html[data-theme="dark"] .compare-section,
html[data-theme="dark"] .exec-summary,
html[data-theme="dark"] .voice-card,
html[data-theme="dark"] .detail-section,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .ai-rec-card,
html[data-theme="dark"] .sidebar-section,
html[data-theme="dark"] .sidebar-tabpanel,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .bulk-inq-modal {
  background: #111a2c;
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .compare-row:hover .compare-cell,
html[data-theme="dark"] .compare-cell.label {
  background: rgba(255,255,255,.03);
}

/* Winner tiers — 다크 배경에서도 대비 유지 */
html[data-theme="dark"] .compare-cell.tier-best {
  background: linear-gradient(180deg, rgba(139,99,250,.22) 0%, rgba(139,99,250,.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(139,99,250,.55);
}
html[data-theme="dark"] .compare-cell.tier-good { background: rgba(16,185,129,.12); }
html[data-theme="dark"] .compare-cell.tier-empty { background: rgba(255,255,255,.02); color: var(--al2-g500); }
html[data-theme="dark"] .winner-pill { background: var(--al2-brand); color: #fff; }

/* Sentiment bar — 다크에서 채도 살짝 하향 */
html[data-theme="dark"] .vs-bar .vs-pos { background: #0d8f6a; }
html[data-theme="dark"] .vs-bar .vs-neu { background: #5b6b85; }
html[data-theme="dark"] .vs-bar .vs-neg { background: #c0392b; }

/* Radar chart — SVG stroke/fill 반전 */
html[data-theme="dark"] .product-radar svg polygon { stroke: var(--al2-brand); fill: rgba(139,99,250,.18); }
html[data-theme="dark"] .product-radar svg line,
html[data-theme="dark"] .product-radar svg circle { stroke: rgba(255,255,255,.12); }
html[data-theme="dark"] .product-radar svg text { fill: var(--al2-g500); }

/* 입력/폼 */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0b1220;
  border-color: rgba(255,255,255,.1);
  color: var(--al2-g800);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--al2-g500); }

/* Toasts & popovers */
html[data-theme="dark"] .al2-toast,
html[data-theme="dark"] .cmp-cart-drawer {
  background: #111a2c;
  border-color: rgba(255,255,255,.08);
  color: var(--al2-g800);
}

/* 테마 전환은 즉각 — 깜빡임 방지 */
html[data-theme="dark"] * { transition: background-color .12s, border-color .12s, color .12s; }

/* ============================================
   PRINT / PDF 저장
   al2-main overflow:auto + body overflow:hidden 때문에
   window.print() 시 viewport(~900px)만 캡처돼 빈 PDF가 나옴.
   print 매체에서 이 제약을 모두 풀어 전체 문서를 흐르게 만든다.
   ============================================ */
@media print {
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
  /* 레이아웃 shell — 스크롤 컨테이너 해제 */
  .al2-shell, .compare-main-area {
    display: block !important;
    margin: 0 !important;
  }
  .al2-main {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .main-content {
    padding: 0 !important;
    max-width: none !important;
  }

  /* UI chrome 숨김 */
  .al2-topbar, .al2-gnb, .al2-sidebar, .sidebar-open-btn,
  .top-action-cluster, .bottom-actions, .section-jump,
  .compare-controls, .compare-sidebar, .mobile-compare,
  .cmp-cart-drawer, .al2-toast, .page-actions,
  .row-picker, .row-picker-banner, .compat-banner,
  .ai-sum-actions, .ai-rec-cell-actions, .ai-rec-actions,
  .al2-bottom-nav, .voice-review-more, .voice-reps {
    display: none !important;
  }

  /* sticky 해제 — 프린트는 정적 흐름 */
  .products-header, .compare-controls, .section-jump,
  .compare-cell.label, .ai-rec-label {
    position: static !important;
    top: auto !important;
  }

  /* 제품 헤더를 프린트에서도 한 번은 보이게 */
  .products-header {
    display: grid !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* 섹션 내부는 나눠지지 않게 */
  .key-compare-section, .detail-section,
  .ai-rec-grid, .voice-grid, .exec-summary, .ai-rec-summary {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .detail-section { display: block !important; }
  .detail-section .detail-section-body { display: block !important; }

  /* 배경·그림자·다크모드 제거 — 토너 아끼고 가독성 확보 */
  .compare-cell, .ai-rec-cell, .voice-card, .product-card {
    box-shadow: none !important;
  }
  html, body, .al2-main, .main-content,
  .compare-cell, .ai-rec-cell, .detail-section {
    color: #111 !important;
  }

  /* 링크는 색만 유지, 밑줄 기본 */
  a { color: inherit !important; text-decoration: none !important; }

  /* 전 제품이 같은 값인 행은 제외 — exportPDF()가 print-hide-same 부착 */
  .compare-row.print-hide-same { display: none !important; }

  /* 페이지 여백 */
  @page { margin: 12mm; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * Feature Matrix (2026-05-04) — G2 표준 ✓/✗ 매트릭스
 * ═══════════════════════════════════════════════════════════════════════ */
.al2-fmx-meta-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 8px 0 12px; font-size: .72rem; color: var(--al2-g500);
}
.al2-fmx-meta { font-weight: 600; }
.al2-fmx-stat {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; background: var(--al2-g50); border-radius: 99px;
  font-size: .68rem; color: var(--al2-g600);
}
.al2-fmx-stat strong { color: var(--al2-blue); font-weight: 700; }
.al2-fmx-table {
  width: 100%; border-collapse: collapse; font-size: .76rem;
  background: var(--al2-card-bg, #fff); border-radius: 8px; overflow: hidden;
}
.al2-fmx-table thead th {
  padding: 9px 10px; background: var(--al2-g50); color: var(--al2-g600);
  font-weight: 700; font-size: .7rem; text-align: center;
  border-bottom: 1px solid var(--al2-g200);
}
.al2-fmx-table thead th:first-child { text-align: left; width: 36%; }
.al2-fmx-table tbody td {
  padding: 7px 10px; border-bottom: 1px solid var(--al2-g100);
  text-align: center; color: var(--al2-g700);
}
.al2-fmx-table tbody td:first-child {
  text-align: left; font-weight: 500; color: var(--al2-g700);
}
.al2-fmx-table td.has { color: #10b981; font-weight: 700; font-size: 1rem; }
.al2-fmx-table td.miss { color: #d1d5db; font-size: .95rem; }
.al2-fmx-row.unique { background: #fffbeb; }
.al2-fmx-row.unique td:first-child::after { content: '⭐'; margin-left: 6px; font-size: .75rem; }
.al2-fmx-row.common { background: #ecfdf5; }
.al2-fmx-row.common td:first-child::after { content: '🔗'; margin-left: 6px; font-size: .75rem; }
.al2-fmx-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 10px 4px 4px; font-size: .68rem; color: var(--al2-g500);
}
.al2-fmx-legend span { display: inline-flex; align-items: center; gap: 4px; }
.al2-fmx-legend .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
[data-theme="dark"] .al2-fmx-table { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .al2-fmx-table thead th { background: rgba(255,255,255,0.05); color: var(--al2-g300); }
[data-theme="dark"] .al2-fmx-row.unique { background: rgba(251,191,36,0.08); }
[data-theme="dark"] .al2-fmx-row.common { background: rgba(16,185,129,0.08); }
@media (max-width: 640px) {
  .al2-fmx-table { font-size: .68rem; }
  .al2-fmx-table thead th, .al2-fmx-table tbody td { padding: 5px 6px; }
}
