:root {
  --bar: #f1f2f4; --bg: #f6f5f1; --card: #ffffff; --ink: #1c1f24; --muted: #667080; --line: #e3e1da;
  --accent: #1d4ed8; --on-accent: #ffffff; --accent-soft: #e3ebfd; --warn: #92400e; --warn-soft: #fdf1dc;
  --listing: #1d4ed8; --listing-bg: #dfe8fc; --service: #14532d; --service-bg: #dcefe2;
  --review: #6b3fa0; --review-bg: #ece3f6; --other: #565e6b; --other-bg: #e9ebee;
  --new: #c2410c;
  color-scheme: light;
}
/* theme.js가 기기 설정 또는 방문자의 선택에 따라 data-theme을 정한다. */
:root[data-theme="dark"] {
  --bar: #1a1e23; --bg: #14171b; --card: #1e2227; --ink: #eceef1; --muted: #9aa3af; --line: #2f343b;
  --accent: #8ab4f8; --on-accent: #10233f; --accent-soft: #1e2f4d; --warn: #f5c27a; --warn-soft: #3a2c17;
  --listing: #93bbf9; --listing-bg: #1f3050; --service: #8fdcab; --service-bg: #20382a;
  --review: #cfb2ee; --review-bg: #33284a; --other: #b5bcc6; --other-bg: #2b3037;
  --new: #fb923c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Pretendard", "Malgun Gothic", system-ui, sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand { flex: none; }
.theme-toggle { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.models { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.models::-webkit-scrollbar { display: none; }
.models a { flex: none; white-space: nowrap; padding: 7px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); text-decoration: none; }
.models a.on { background: var(--accent-soft); color: var(--accent); }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.fav { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.fav.on { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.fav[hidden] { display: none; }
.rss { color: var(--muted); }
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.summary[hidden] { display: none; }
.sum-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.sum-card b, .sum-card span { display: block; }
.sum-card span { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
.filters label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.filters select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); }
.filters [hidden] { display: none; }
.filter-note { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.spec { margin-bottom: 2px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.more { display: block; margin: 22px auto 0; padding: 9px 26px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; }
.more[hidden], #sideCostBlock[hidden], #tabs[hidden], .tabs[hidden] { display: none; }
a.card { text-decoration: none; color: inherit; }
.gens { margin-bottom: 10px; }
.gens[hidden] { display: none; }
.models button.on { background: var(--accent-soft); color: var(--accent); }

.intro { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; padding-top: 20px; font-size: 43.5px; line-height: 1.25; letter-spacing: -.02em; }
.intro > span { color: var(--muted); font-size: 14.5px; line-height: 1.55; letter-spacing: normal; }
.tagline { display: inline-block; }
.tag-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tag-word { display: inline-block; white-space: nowrap; }
.tag-ch { display: inline-block; animation: tag-rise .42s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 55ms) both; }
.tag-bang { animation: tag-rise .42s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 55ms) both, tag-bounce .6s ease-out 1.5s; }
.tag-road { display: block; position: relative; height: 26px; overflow: hidden; }
.tag-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--accent); transform-origin: left; animation: tag-draw 1.3s cubic-bezier(.4, 0, .2, 1) .1s both; }
.tag-car { position: absolute; left: 0; bottom: 2px; width: 100%; line-height: 0; transform: translateX(100%); animation: tag-drive 1.3s cubic-bezier(.4, 0, .2, 1) .1s both; }
.tag-car svg { width: 48px; height: 22px; margin-left: -48px; fill: var(--accent); }
.tag-car circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
@keyframes tag-rise { from { opacity: 0; transform: translateY(.6em); } }
@keyframes tag-draw { from { transform: scaleX(0); } }
@keyframes tag-drive { from { transform: translateX(0); } }
@keyframes tag-bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-.32em); } 60% { transform: translateY(0); } 80% { transform: translateY(-.12em); } }
@media (prefers-reduced-motion: reduce) { .tag-ch, .tag-bang, .tag-line, .tag-car { animation: none; } }

.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 28px 0 18px; flex-wrap: wrap; }
.hero h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.hero p { margin: 2px 0 0; }
.stats { display: flex; gap: 28px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.tab { min-height: 48px; padding: 0 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--ink); font-size: 17px; font-weight: 700; white-space: nowrap; transition: background-color .15s, color .15s; }
.tab:hover { background: var(--accent-soft); color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab.on, .tab.on:hover { background: var(--accent); color: var(--on-accent); }

.disclosure { background: var(--bar); color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: center; font-size: 13.5px; }
.disclosure[hidden] { display: none; }
.acc-visual a { display: block; width: 100%; height: 100%; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; align-items: start; }
.layout[hidden], .panel[hidden] { display: none; }

.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 13px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#search { flex: 1 1 200px; max-width: 280px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 20px 16px; }
.card { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: block; width: 100%; }
.thumb { position: relative; aspect-ratio: 16/9; background: var(--line); border-radius: 10px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.card:hover .thumb img { transform: scale(1.03); }
.sold .thumb img { filter: grayscale(1) opacity(.65); }
.tags { position: absolute; left: 7px; top: 7px; display: flex; gap: 4px; }
.tag { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.t-매물 { color: var(--listing); background: var(--listing-bg); }
.t-정비 { color: var(--service); background: var(--service-bg); }
.t-리뷰 { color: var(--review); background: var(--review-bg); }
.t-기타 { color: var(--other); background: var(--other-bg); }
.t-new { color: #fff; background: var(--new); }
.t-sold { color: #fff; background: #4b5563; }
.title { margin: 8px 0 3px; font-weight: 600; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

.side-col { position: sticky; top: 76px; display: grid; gap: 14px; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.rent-banner { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 230px; justify-content: flex-end; padding: 18px; border-radius: 12px; background: var(--accent); color: var(--card); text-decoration: none; }
.rent-banner svg { position: absolute; top: 44px; left: 18px; width: 150px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.rent-banner-ad { position: absolute; top: 14px; left: 18px; font-size: 12px; font-weight: 700; opacity: .85; }
.rent-banner strong { font-size: 20px; letter-spacing: -.02em; }
.rent-banner em { font-style: normal; font-weight: 700; margin-top: 8px; }
.rent { padding-top: 22px; padding-bottom: 40px; }
.rent h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.rent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 18px; }
.rent-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; }
.rent-card:hover { border-color: var(--accent); }
.rent-card h2 { font-size: 17px; margin: 12px 16px 2px; }
.rent-card p { font-size: 14px; color: var(--muted); margin: 0 16px 16px; }
.rent-art { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 20px; font-weight: 800; text-align: center; padding: 12px; }
.rent-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rent-back { display: inline-block; margin-bottom: 14px; font-weight: 600; }
.rent-detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.rent-detail .rent-art { border-radius: 10px; overflow: hidden; }
.rent-detail h1 { margin-top: 8px; }
.rent-detail h2 { font-size: 15.5px; margin: 18px 0 6px; }
.rent-detail ul, .rent-check ul { margin: 0; padding-left: 18px; }
.rent-detail li, .rent-check li { margin-bottom: 4px; }
.rent-apply { display: block; margin-top: 22px; padding: 14px; border-radius: 10px; background: var(--accent); color: var(--card); font-size: 17px; font-weight: 800; text-align: center; text-decoration: none; }
.rent-check { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.rent-check h2 { font-size: 16px; margin: 0 0 8px; }
#map { height: 480px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; isolation: isolate; background: var(--accent-soft); }
.leaflet-popup-content a { color: #1d4ed8; font-weight: 700; }
.region-head { font-size: 17px; margin: 22px 0 8px; }
.region-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.region-list li { display: flex; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.region-list a { font-weight: 600; }
.region-list span { flex: none; color: var(--muted); }
.news-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.news-cols section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.news-cols h2 { font-size: 17px; margin: 0 0 6px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 11px 0; border-top: 1px solid var(--line); }
.news-list li:first-child { border-top: 0; }
.news-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.news-list a:hover { color: var(--accent); text-decoration: underline; }
.news-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.side h2 { font-size: 15px; margin: 0 0 8px; }
.side-gap { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); }
.warn { background: var(--warn-soft); color: var(--warn); padding: 8px 10px; border-radius: 7px; font-size: 13.5px; margin: 0 0 10px; }
.side ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.side li { margin-bottom: 6px; }
.side-link { font-size: 14px; font-weight: 600; }
.side-cost { font-size: 14px; margin: 0 0 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 14px; }

.notice { background: var(--warn-soft); color: var(--warn); padding: 11px 14px; border-radius: 8px; margin: 0 0 14px; font-size: 14px; }
.table { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { display: grid; grid-template-columns: 1.1fr 1.1fr 1.6fr .8fr auto; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: center; font-size: 14.5px; }
.row:first-child { border-top: 0; }
.row.head { font-size: 13px; color: var(--muted); font-weight: 600; }
.row b { font-weight: 700; }
.nav-guide { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 24px; }
.nav-guide h2, .acc-head { font-size: 18px; margin: 0 0 6px; }
.nav-guide p { margin: 0 0 12px; }
.acc-head { margin-bottom: 12px; }
.nav-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-result h3 { margin: 0 0 4px; font-size: 16px; }
.nav-result p { margin-bottom: 8px; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.acc-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.acc-card h3 { margin: 0; font-size: 15.5px; }
.acc-card p { margin: 0; flex: 1; font-size: 14px; color: var(--muted); }
.acc-visual { height: 110px; margin: -16px -16px 6px; border-radius: 12px 12px 0 0; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.acc-visual svg { width: 64px; height: 64px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.products { list-style: none; margin: 4px 0 2px; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.products li { margin-bottom: 6px; }
.products a { font-weight: 600; }
.products small { display: block; color: var(--muted); font-size: 12.5px; }
.acc-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 5px; color: var(--accent); background: var(--accent-soft); }
.tire-guide { margin-bottom: 28px; }
.tire-gen { font-size: 15.5px; margin: 16px 0 8px; }
.tire-card h3 { line-height: 1.45; }
.tire-verify { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tire-buy { padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.tire-buy b { display: block; margin-bottom: 2px; }
.tire-brands { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.severe.none { color: var(--muted); }
.parts-fine { margin-top: 10px; }
.buy { white-space: nowrap; font-weight: 600; font-size: 14px; }

.cost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.cost-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 12px; }
.cost-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.cost-form input, .cost-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-weight: 400; width: 100%; }
.cost-form .check { display: flex; align-items: center; gap: 8px; }
.cost-form .check input { width: auto; }
.hint, #costRows small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.cost-out p { margin: 0; }
.cost-total { font-size: 38px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
#costRows { margin: 18px 0; display: grid; grid-template-columns: 1fr auto; row-gap: 9px; }
#costRows dt { color: var(--muted); }
#costRows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fine { font-size: 13px; color: var(--muted); }

.foot { color: var(--muted); font-size: 13px; padding-top: 40px; padding-bottom: 30px; }
#sync { display: block; margin-top: 3px; }

dialog { border: 0; padding: 0; background: #000; border-radius: 12px; width: min(960px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0,0,0,.72); }
.player-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; }
.player-head a { color: #fff; font-size: 14px; }
.player-head button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.ratio { aspect-ratio: 16/9; }
.ratio iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 880px) {
  .layout, .cost { grid-template-columns: minmax(0, 1fr); }
  .side-col { position: static; }
  .news-cols { grid-template-columns: minmax(0, 1fr); }
  .rent-detail { grid-template-columns: minmax(0, 1fr); }
  .row.head { display: none; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .severe::before { content: "가혹 조건: "; color: var(--muted); }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .top-inner { gap: 10px; }
  .models button { padding: 6px 9px; font-size: 14px; }
  .hero h1 { font-size: 26px; }
  #search { max-width: none; }
  .tabs { gap: 2px; padding: 4px; }
  .tab { padding: 0 2px; font-size: 14px; }
}
