/* ==========================================================================
   CLASSWIDE — 정보 밀도 높은 비교 사이트 스타일 (모바일 우선)
   방향: 다나와식 스펙표 + 서류 같은 신뢰감. 카드 대신 행(row)과 표, 얇은 선, 고정폭 숫자.
   ========================================================================== */
:root {
  --blue: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f4f6f9;
  --paper: #ffffff;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --ok: #059669;
  --sale: #e11d48;
  --radius: 6px;
  --font: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Noto Sans KR', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.55; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
}
body.has-tray { padding-bottom: 76px; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
del { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.muted, .na { color: var(--muted); }
.na { font-size: 0.92em; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; background: #fff; }
[hidden] { display: none !important; }

/* ---------- 샘플 배너 ---------- */
.sample-banner {
  background: repeating-linear-gradient(-45deg, #fff7ed, #fff7ed 10px, #ffedd5 10px, #ffedd5 20px);
  color: #9a3412; font-size: 12.5px; padding: 7px 16px; text-align: center; border-bottom: 1px solid #fed7aa;
}

/* ---------- 헤더 ---------- */
.site-header { background: var(--paper); border-top: 3px solid var(--blue); border-bottom: 1px solid var(--line); }
.header-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 16px; align-items: center; padding-top: 12px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: baseline; font-weight: 800; font-size: 24px; letter-spacing: -0.04em; line-height: 1; }
.logo-word { color: var(--ink); }
.logo-dot { color: var(--blue); font-size: 1.2em; margin-left: 1px; }
.logo-sm { font-size: 20px; }
.header-search { grid-column: 1 / -1; grid-row: 2; display: flex; border: 2px solid var(--blue); border-radius: var(--radius); overflow: hidden; background: #fff; }
.header-search input { flex: 1; min-width: 0; border: 0; padding: 9px 12px; font-size: 15px; outline: none; background: transparent; }
.header-search button { border: 0; background: var(--blue); color: #fff; width: 48px; display: grid; place-items: center; cursor: pointer; }
.header-search button:hover { background: var(--blue-700); }
.header-compare { justify-self: end; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.header-compare b, .nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.main-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { flex: none; padding: 9px 10px 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; }
.main-nav a[aria-current] { color: var(--blue); border-bottom-color: var(--blue); }
.main-nav .nav-count { display: none; }
.cat-nav { background: #f8fafc; border-top: 1px solid var(--line); }
.cat-nav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 7px; padding-bottom: 7px; }
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.cat-nav a { flex: none; font-size: 13px; color: var(--muted); padding: 3px 9px; border-radius: 4px; }
.cat-nav a:hover, .cat-nav a[aria-current] { background: var(--blue-50); color: var(--blue-700); }
.cat-nav .cat-all { color: var(--blue); font-weight: 600; }

@media (min-width: 768px) {
  .header-top { grid-template-columns: auto minmax(0, 560px) 1fr; padding-top: 16px; padding-bottom: 14px; }
  .header-search { grid-column: 2; grid-row: 1; }
  .logo { font-size: 28px; }
}

main.wrap { padding-top: 18px; padding-bottom: 48px; min-height: 60vh; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-block { width: 100%; height: 46px; font-size: 15.5px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; color: var(--blue-800); }
.btn-light:hover { background: var(--blue-50); color: var(--blue-800); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-compare[aria-pressed="true"] { background: var(--blue-50); border-color: var(--blue); color: var(--blue-700); }
.ico-plus { width: 10px; height: 10px; position: relative; display: inline-block; }
.ico-plus::before, .ico-plus::after { content: ''; position: absolute; background: currentColor; left: 4px; top: 0; width: 2px; height: 10px; border-radius: 1px; }
.ico-plus::after { transform: rotate(90deg); }
.btn-compare[aria-pressed="true"] .ico-plus::before { height: 6px; left: 1px; top: 3px; transform: rotate(-45deg); }
.btn-compare[aria-pressed="true"] .ico-plus::after { height: 10px; left: 5px; top: -1px; transform: rotate(45deg); }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 0; }
.link-btn:hover { color: var(--sale); }

/* ---------- 배지 ---------- */
.badge { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; font-size: 11px; font-weight: 700; border-radius: 3px; letter-spacing: 0; }
.badge-sample { color: #9a3412; background: #fff7ed; border: 1px dashed #fb923c; }
.badge-kind { color: var(--ink-2); background: #f1f5f9; }
.kind-ebook { color: #6d28d9; background: #f5f3ff; }
.kind-webinar { color: #047857; background: #ecfdf5; }
.badge-fmt { color: var(--blue-700); background: var(--blue-50); }
.badge-aff { color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; }
.aff-label { display: inline-block; font-size: 11px; font-weight: 700; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 3px; padding: 0 5px; line-height: 17px; }
.req { font-size: 10.5px; font-weight: 700; color: var(--sale); margin-left: 4px; }

/* ---------- 가격 블록 ---------- */
.price { font-variant-numeric: tabular-nums; }
.price-main { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 0 6px; }
.price-ok { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 0 6px; }
.price-was { font-size: 12.5px; display: inline-flex; gap: 4px; align-items: baseline; }
.price-was em { font-style: normal; font-weight: 800; color: var(--sale); }
.price-now { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.price-now small { font-size: 13px; font-weight: 600; margin-left: 1px; }
.price-free { color: var(--ok); }
.price-unknown { font-size: 14px; font-weight: 700; color: var(--muted); }
.price-stale-label { font-size: 13.5px; font-weight: 800; color: var(--warn); background: var(--warn-bg); padding: 1px 7px; border-radius: 3px; }
.price[data-status="stale"] .price-ok { display: none; }
.price:not([data-status="stale"]) .price-stale-label { display: none; }
.price-meta { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 2px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--line-2); }
.dot-fresh { background: var(--ok); }
.price[data-status="stale"] .dot { background: var(--warn); }
.price-lg .price-main, .price-lg .price-ok, .price-lg .price-meta { justify-content: flex-start; text-align: left; }
.price-lg .price-now { font-size: 30px; }
.price-lg .price-now small { font-size: 17px; }
.price-lg .price-was { font-size: 14px; width: 100%; }
.price-lg .price-stale-label { font-size: 17px; padding: 3px 10px; }
.price-lg .price-unknown { font-size: 20px; }
.price-lg .price-meta { font-size: 12.5px; margin-top: 4px; }

/* ---------- 결과 행 (다나와식) ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; padding: 14px 12px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.glyph { grid-row: span 2; width: 52px; height: 52px; border-radius: 6px; display: grid; place-items: center; font: 800 11.5px/1 var(--mono); letter-spacing: 0.02em; color: #fff; position: relative; overflow: hidden; }
.glyph::after { content: ''; position: absolute; inset: auto -10px -18px auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.16); }
.glyph-vod { background: var(--blue); }
.glyph-live { background: #dc2626; }
.glyph-ebook { background: #7c3aed; }
.glyph-mentoring { background: #0f766e; }
.glyph-hybrid { background: #334155; }
.row-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 3px; }
.row-cat { font-size: 12px; color: var(--muted); margin-left: 2px; }
.row-title { font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; }
.row-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-by { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.row-fmt { color: var(--muted); }
.row-fmt::before { content: '· '; }
.specs { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 8px 0 0; font-size: 12.5px; }
.specs div { display: flex; gap: 6px; min-width: 0; }
.specs dt { flex: none; color: var(--muted); }
.specs dd { margin: 0; color: var(--ink-2); min-width: 0; }
.row-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.row-side .price-main, .row-side .price-meta { justify-content: flex-start; }
.row-actions { display: flex; gap: 6px; }
.row-side .aff-label { order: 3; }
@media (min-width: 900px) {
  .row { grid-template-columns: 60px minmax(0, 1fr) 220px; padding: 16px 18px; gap: 4px 18px; align-items: start; }
  .glyph { width: 60px; height: 60px; grid-row: span 1; }
  .row-side { grid-column: 3; grid-row: 1; flex-direction: column; align-items: flex-end; justify-content: flex-start; margin: 0; padding: 0 0 0 18px; border-top: 0; border-left: 1px solid var(--line); min-height: 100%; }
  .row-side .price-main, .row-side .price-meta { justify-content: flex-end; }
  .specs { display: flex; flex-wrap: wrap; gap: 3px 22px; }
  .specs div { white-space: nowrap; }
  .specs dt { width: auto; }
}
.empty { color: var(--muted); padding: 22px 16px; text-align: center; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 14px; }
.empty-box { text-align: center; padding: 48px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; justify-items: center; }
.empty-box h1 { font-size: 22px; }

/* ---------- 홈 ---------- */
.hero { display: grid; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid var(--blue-50); pointer-events: none; }
.hero-text { position: relative; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 0.04em; margin-bottom: 6px; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.04em; font-weight: 800; }
.hero-sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; max-width: 520px; }
.hero-search { display: flex; gap: 6px; margin-top: 16px; max-width: 560px; }
.hero-search input { flex: 1; min-width: 0; height: 46px; border: 2px solid var(--blue); border-radius: var(--radius); padding: 0 14px; font-size: 16px; outline: none; }
.hero-search .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero-quick a { font-size: 12.5px; color: var(--ink-2); background: #f1f5f9; padding: 3px 9px; border-radius: 999px; }
.hero-quick a::before { content: '#'; color: var(--blue); margin-right: 1px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); position: relative; background: #fff; }
.hero-stats div { padding: 10px 12px; border-top: 1px solid var(--line); }
.hero-stats div:nth-child(-n+2) { border-top: 0; }
.hero-stats div:nth-child(even) { border-left: 1px solid var(--line); }
.hero-stats dt { font-size: 11.5px; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hero-stats small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 300px; padding: 32px 32px; align-items: center; }
  .hero h1 { font-size: 40px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .hero-stats div:first-child { border-top: 0 !important; }
}
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat-tile { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 10px 10px; font-size: 12.5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.cat-tile:nth-child(3n) { border-right: 0; }
.cat-tile b { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.cat-tile.is-focus span { font-weight: 700; color: var(--ink); }
.cat-tile.is-focus b { color: var(--blue); }
.cat-tile:hover { background: var(--blue-50); }
@media (min-width: 768px) {
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .cat-tile:nth-child(3n) { border-right: 1px solid var(--line); }
  .cat-tile:nth-child(6n) { border-right: 0; }
  .cat-tile { font-size: 13.5px; padding: 12px 14px; }
}
.block { margin-top: 26px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.block-head h2, .sec-title { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.block-head a { font-size: 13px; color: var(--blue); font-weight: 600; }
.home-cols { display: grid; gap: 0 20px; }
@media (min-width: 1000px) { .home-cols { grid-template-columns: minmax(0, 1fr) 360px; } }
.principles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.principles div { background: var(--paper); padding: 16px 18px; }
.principles b { font-size: 15px; display: block; margin-bottom: 4px; }
.principles b::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--blue); margin-right: 8px; vertical-align: middle; }
.principles p { font-size: 13px; color: var(--ink-2); }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.seller-band { margin-top: 26px; background: var(--blue); color: #fff; border-radius: var(--radius); padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.seller-band h2 { font-size: 19px; }
.seller-band p { font-size: 13.5px; opacity: .9; margin-top: 2px; }

/* ---------- 광고 (일반 결과와 분리) ---------- */
.ad { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 18px 0; padding: 12px 14px; border: 1px solid #e7e5e4; background: #fafaf9; border-radius: var(--radius); font-size: 13px; }
.ad-tag { font-size: 11px; font-weight: 700; color: #57534e; border: 1px solid #a8a29e; border-radius: 3px; padding: 0 5px; line-height: 17px; }
.ad-link { color: var(--ink-2); font-weight: 600; flex: 1 1 200px; }
.ad-by { color: var(--muted); font-size: 12px; }

/* ---------- 페이지 머리 ---------- */
.page-head { margin-bottom: 14px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; }
.page-head p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.page-head .btn { margin-top: 10px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumb a:hover { color: var(--blue); }

/* ---------- 검색 레이아웃·필터 ---------- */
.search-layout { display: grid; gap: 12px; }
.filters-toggle { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--line-2); background: #fff; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
.filters-toggle::before { content: ''; width: 14px; height: 10px; background: linear-gradient(currentColor 0 0) 0 0/100% 2px no-repeat, linear-gradient(currentColor 0 0) 2px 4px/10px 2px no-repeat, linear-gradient(currentColor 0 0) 4px 8px/6px 2px no-repeat; }
.filters-toggle b:not(:empty) { background: var(--blue); color: #fff; border-radius: 9px; font-size: 11px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.filters-panel { display: none; }
.filters.is-open .filters-panel { display: block; position: fixed; inset: 0; z-index: 50; background: #fff; overflow-y: auto; padding: 16px 16px 90px; }
.f-group { border: 0; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.f-label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; padding: 0; }
.f-label small { font-weight: 500; color: var(--muted); }
.filters input[type="search"], .filters select, .calc select, .range input { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 10px; background: #fff; font-size: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-flex; align-items: center; cursor: pointer; font-size: 13.5px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opts .opt span { display: inline-block; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); }
.opts .opt input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--blue-700); font-weight: 700; }
.opts .opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.opt-block { display: flex; margin: 8px 0; }
.opt-block span::before { content: ''; display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 3px; margin-right: 7px; vertical-align: -3px; background: #fff; }
.opt-block input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--blue); }
.opt-block input:focus-visible + span::before { outline: 2px solid var(--blue); outline-offset: 1px; }
.range { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.range input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.f-actions { display: flex; gap: 8px; padding-top: 14px; }
.filters.is-open .f-actions { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 51; }
.f-actions .btn { flex: 1; height: 42px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 10px; }
.results-count { font-size: 14px; color: var(--ink-2); }
.results-count b { color: var(--blue); font-size: 16px; font-variant-numeric: tabular-nums; }
.sort select { height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 8px; background: #fff; font-size: 13.5px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.active-filters:empty { display: none; }
.chip { border: 1px solid var(--blue-100); background: var(--blue-50); color: var(--blue-700); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--blue); }
.search-ad .ad { margin: 0; }
@media (min-width: 900px) {
  .search-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
  .filters { grid-row: 1; grid-column: 1; position: sticky; top: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 14px; max-height: calc(100vh - 24px); overflow-y: auto; }
  .filters-toggle, .filters-done { display: none !important; }
  .filters-panel { display: block; }
  .search-ad { grid-column: 1; grid-row: 2; }
  .results { grid-column: 2; grid-row: 1 / span 2; }
  .results-bar { padding-top: 0; }
  .search-ad .ad { flex-direction: column; align-items: flex-start; }
}

/* ---------- 상세 ---------- */
.detail { display: grid; gap: 16px; }
.detail-head h1 { font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -0.035em; margin-top: 4px; }
.detail-by { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.detail-by a { color: var(--blue); }
.buybox { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; align-self: start; }
.buybox .aff-label { justify-self: start; }
.buybox-row { display: flex; gap: 6px; }
.buybox-row .btn { flex: 1; }
.detail-main { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; min-width: 0; }
.detail-main .sec-title { margin: 22px 0 10px; font-size: 16px; }
.detail-main .sec-title:first-child { margin-top: 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; border-top: 2px solid var(--ink); }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 10px 10px; text-align: left; vertical-align: top; }
.spec-table th { width: 110px; background: #f8fafc; font-weight: 700; color: var(--ink-2); font-size: 13px; }
.spec-table td a { color: var(--blue); }
.summary { font-size: 14.5px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags a { font-size: 12.5px; color: var(--blue-700); background: var(--blue-50); padding: 2px 8px; border-radius: 3px; }
.hist-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.hist-stats div { padding: 10px 12px; display: grid; gap: 1px; border-left: 1px solid var(--line); }
.hist-stats div:first-child { border-left: 0; }
.hist-stats span { font-size: 11.5px; color: var(--muted); }
.hist-stats b { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hist-stats small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: auto; margin-top: 12px; display: block; }
.spark path { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.spark circle { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.spark-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.spark-y, .spark-x { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.report { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 22px; }
.report a { color: var(--blue); text-decoration: underline; }
@media (min-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px 20px; }
  .detail-head { grid-column: 1 / -1; }
  .buybox { grid-column: 2; grid-row: 2; position: sticky; top: 12px; }
  .detail-main { grid-column: 1; grid-row: 2; padding: 22px 24px; }
  .detail-head h1 { font-size: 30px; }
  .spec-table th { width: 140px; }
}

/* ---------- 무료 특강 ---------- */
.month { margin-bottom: 20px; }
.month-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.month-title small { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.events { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.event { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; padding: 13px 12px; border-top: 1px solid var(--line); align-items: start; }
.event:first-child { border-top: 0; }
.event-date { display: grid; justify-items: center; align-content: center; height: 56px; border: 1.5px solid var(--ink); border-radius: 6px; font-variant-numeric: tabular-nums; }
.event-md { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.event-wd { font-size: 11.5px; color: var(--muted); }
.event-dday { font-size: 11px; font-weight: 800; color: var(--blue); margin-left: auto; font-variant-numeric: tabular-nums; }
.event-side { grid-column: 2; display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.event.is-past { opacity: .55; }
.event.is-past .event-date { border-color: var(--line-2); }
.event.is-past .event-dday { color: var(--muted); }
.events-compact .event { grid-template-columns: 48px minmax(0, 1fr); }
.events-compact .event-date { height: 48px; }
.events-compact .event-md { font-size: 15px; }
.events-compact .row-title { font-size: 14.5px; }
.events-compact .event-side .btn { height: 30px; font-size: 12.5px; }
@media (min-width: 768px) {
  .event { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 14px 18px; align-items: center; }
  .event-date { height: 64px; }
  .event-side { grid-column: 3; margin: 0; flex-direction: column; align-items: flex-end; }
  .events-compact .event { grid-template-columns: 48px minmax(0, 1fr); padding: 12px; }
  .events-compact .event-side { grid-column: 2; flex-direction: row; align-items: center; margin-top: 4px; }
}
.past { margin-top: 16px; }
.past summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 8px 0; }

/* ---------- 비교표 ---------- */
.cmp-scroll { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.cmp { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 13.5px; table-layout: fixed; }
.cmp th, .cmp td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: top; }
.cmp thead th { background: #f8fafc; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.cmp tbody th { background: #f8fafc; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.cmp th:first-child { border-left: 0; width: 104px; position: sticky; left: 0; z-index: 1; }
.cmp-corner { font-size: 12px; font-weight: 600; color: var(--muted); }
.cmp-corner span { display: block; }
.diff-toggle { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 500; cursor: pointer; }
.cmp-head { display: grid; gap: 3px; }
.cmp-title { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.cmp-title:hover { color: var(--blue); }
.cmp-head .muted { font-size: 12px; font-weight: 500; }
.cmp-head .link-btn { justify-self: start; }
.cmp .price-main, .cmp .price-ok, .cmp .price-meta { justify-content: flex-start; text-align: left; }
.cmp .price-lg .price-now { font-size: 22px; }
.cmp tr.is-diff th::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-left: 5px; vertical-align: middle; }
.cmp.diff-only tbody tr:not(.is-diff) { display: none; }
.cmp.diff-only tbody tr:first-child, .cmp.diff-only tbody tr:last-child { display: table-row; }
.tag-min { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 3px; padding: 1px 6px; }
.cmp .aff-label { margin-top: 6px; }
.cmp-share { margin-top: 10px; }

/* ---------- 계산기 ---------- */
.calc { display: grid; gap: 16px; }
.calc-form, .calc-result { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px 16px; }
.calc-form .f-group:last-child { border-bottom: 0; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tool-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.tool-list .opt { flex: 1; min-width: 0; }
.tool-list .opt span::before { content: ''; display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 3px; margin-right: 8px; vertical-align: -3px; }
.tool-list .opt input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--blue); }
.tool-list small { display: block; margin-left: 24px; font-size: 12px; }
.months { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.months input { width: 58px; height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius); text-align: right; padding: 0 8px; font-variant-numeric: tabular-nums; }
.calc-result { padding-top: 16px; align-self: start; }
.calc-title { font-size: 14px; color: var(--muted); font-weight: 700; }
.calc-total { font-size: 15px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.calc-total b { font-size: 34px; letter-spacing: -0.03em; }
.calc-plus { margin-left: 8px; font-size: 14px; font-weight: 800; color: var(--warn); }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; border-top: 2px solid var(--ink); }
.calc-table th, .calc-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.calc-table th { font-weight: 600; }
.calc-table th small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.calc-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.calc-table .is-excluded td { color: var(--warn); font-weight: 600; }
.warn { background: var(--warn-bg); color: #78350f; font-size: 13px; padding: 9px 12px; border-radius: var(--radius); margin-top: 12px; }
@media (min-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .calc-result { position: sticky; top: 12px; }
}

/* ---------- 판매자 ---------- */
.seller-hero { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 30px 20px; position: relative; overflow: hidden; }
.seller-hero::after { content: ''; position: absolute; right: -40px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; border: 30px solid rgba(255,255,255,.08); }
.seller-hero .eyebrow { color: #bfdbfe; }
.seller-hero h1 { font-size: 28px; line-height: 1.25; letter-spacing: -0.04em; }
.seller-hero p { margin-top: 8px; opacity: .92; }
.seller-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.seller-cta .btn { height: 44px; padding: 0 18px; }
.seller-todo { font-size: 12.5px; }
.seller-todo a { text-decoration: underline; }
.feature-list, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature-list li, .steps li { background: var(--paper); padding: 14px 16px; display: grid; gap: 2px; }
.feature-list span, .steps span { font-size: 13px; color: var(--ink-2); }
.steps { counter-reset: s; }
.steps li { counter-increment: s; padding-left: 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.principles-list ul { margin: 0; padding: 14px 16px 14px 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
.block .sec-title { margin-bottom: 10px; }
@media (min-width: 768px) {
  .seller-hero { padding: 44px 40px; }
  .seller-hero h1 { font-size: 38px; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 법률 문서 ---------- */
.legal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; max-width: 820px; }
.legal h1 { font-size: 24px; margin-bottom: 4px; }
.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.legal p { font-size: 14px; color: var(--ink-2); }
.legal .spec-table { margin-top: 6px; }
.draft-note { background: var(--warn-bg); color: #78350f; font-size: 13px; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 16px; }
.todo { background: #fde68a; color: #78350f; font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }

/* ---------- 비교함 트레이 ---------- */
.compare-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(15,23,42,.18); }
.tray-inner { display: flex; align-items: center; gap: 10px; height: 60px; }
.tray-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.tray-label b { color: #93c5fd; font-variant-numeric: tabular-nums; }
.tray-items { display: none; list-style: none; margin: 0; padding: 0; flex: 1; gap: 6px; min-width: 0; }
.tray-items li { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border-radius: 4px; padding: 0 8px; height: 36px; font-size: 12.5px; }
.tray-items li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tray-items li button { border: 0; background: none; color: #cbd5e1; cursor: pointer; padding: 4px; }
.tray-items li.is-empty { color: #64748b; border: 1px dashed #475569; background: none; }
.compare-tray .btn-ghost { background: transparent; color: #cbd5e1; border-color: #475569; margin-left: auto; }
.compare-tray .btn-ghost:hover { color: #fff; border-color: #94a3b8; }
@media (min-width: 768px) { .tray-items { display: flex; } .compare-tray .btn-ghost { margin-left: 0; } }

/* ---------- 토스트 ---------- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 푸터 ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: 13px; color: var(--muted); }
.footer-grid { display: grid; gap: 18px; }
.footer-slogan { color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.footer-note { margin-top: 10px; max-width: 560px; font-size: 12.5px; line-height: 1.65; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: start; }
.footer-links a:hover { color: var(--blue); }
.footer-links b { color: var(--ink-2); }
.footer-biz { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr auto; } .footer-links { max-width: 340px; justify-content: flex-end; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- 모바일 보정 ---------- */
.hero { grid-template-columns: minmax(0, 1fr); }
fieldset.f-group > legend { float: left; width: 100%; }
fieldset.f-group > legend + * { clear: both; }
.cmp-2 { min-width: 500px; }
.cmp-3 { min-width: 720px; }
.cmp .price-meta { flex-wrap: wrap; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 300px; } }

.calc-usd { margin-left: 8px; font-size: 22px; font-weight: 800; color: var(--ink-2); }

/* ---------- 신청 폼 ---------- */
.sub-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.form-grid { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 9px 10px; font-size: 14.5px; font-weight: 400; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue-100); border-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { margin: 14px 0 4px; font-size: 13px; color: var(--ink-2); align-items: flex-start; }
.consent a { color: var(--blue); text-decoration: underline; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.form-actions .btn { height: 42px; padding: 0 20px; }
.form-msg { font-size: 13.5px; }
.form-msg.is-ok { color: var(--ok); font-weight: 700; }
.form-msg.is-err { color: var(--sale); font-weight: 700; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } .sub-form { padding: 22px 24px; } }

.mini-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: grid; gap: 2px; padding: 11px 14px; }
.mini-list b { font-size: 14px; line-height: 1.4; }
.mini-list span { font-size: 12px; color: var(--muted); }
.mini-list a::after { content: '무료'; font-size: 11px; font-weight: 800; color: var(--ok); }
