:root {
  --bg: #0b0d10;
  --bg-elev: #14181e;
  --bg-row: #10141a;
  --bg-row-alt: #161b22;
  --line: #242b35;
  --text: #eef2f6;
  --muted: #8b96a5;
  --dim: #5c6775;
  --accent: #e31937;
  --accent-soft: rgba(227, 25, 55, 0.14);
  --chip: #1c232c;
  --chip-on: #f4f6f8;
  --chip-on-text: #111418;
  --sample: #d4a017;
  --sample-bg: rgba(212, 160, 23, 0.12);
  --ok: #3dd68c;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(227, 25, 55, 0.16), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(80, 120, 180, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }

.wrap {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.brand { display: flex; flex-direction: column; gap: 6px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 720;
  letter-spacing: -0.04em;
}
.meta {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}
.meta strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 2px; }
.meta a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.meta a:hover { color: var(--text); }

.panel {
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  transition: 0.15s ease;
}
.chip:hover { border-color: #3a4452; }
.chip.on {
  background: var(--chip-on);
  color: var(--chip-on-text);
  border-color: var(--chip-on);
  font-weight: 650;
}
.search {
  position: relative;
  min-width: min(280px, 100%);
  flex: 1 1 220px;
}
.search input {
  width: 100%;
  background: #0d1116;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px 9px 36px;
  outline: none;
}
.search input:focus { border-color: #4a5563; }
.search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--dim);
}

.count {
  color: var(--dim);
  font-size: 12px;
  padding: 0 16px 10px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}
th, td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  white-space: nowrap;
}
td.model, td.price, td.year, td.odo, td.date, td.link {
  white-space: nowrap;
}
th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 650;
  background: #12171d;
  position: sticky;
  top: 0;
}
tbody tr:nth-child(even) { background: var(--bg-row-alt); }
tbody tr:hover { background: #1b222b; }
.model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.badge {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--sample-bg);
  color: var(--sample);
}
.badge-sold {
  background: rgba(139, 150, 165, 0.16);
  color: #9aa5b3;
}
.badge-reserved {
  background: rgba(212, 160, 23, 0.12);
  color: #d4a017;
}
.badge-trade {
  background: rgba(80, 140, 220, 0.14);
  color: #7eb0ff;
}
.trim, .color, .accident {
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.trim { min-width: 168px; max-width: 280px; }
.color { min-width: 88px; max-width: 160px; }
.accident { min-width: 110px; max-width: 200px; }
.opts {
  white-space: normal;
  min-width: 92px;
  line-height: 1.35;
  font-size: 12px;
  color: var(--muted);
}
.opts .opt-row { white-space: nowrap; }
.opts .opt-row b { font-weight: 650; margin-right: 4px; color: var(--dim); }
.opts .yes { color: var(--ok); }
.opts .no { color: var(--dim); }
.opts .maybe { color: #d4a017; }
.opts .unk { color: var(--dim); }

.price { font-family: var(--mono); font-weight: 650; }
.year, .odo, .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.link a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid #3a4452;
}
.link a:hover { color: #fff; border-bottom-color: #fff; }

.empty {
  display: none;
  padding: 56px 20px 64px;
  text-align: center;
}
.empty.show { display: block; }
.empty h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.03em; }
.empty p { margin: 0; color: var(--muted); }

.foot {
  margin-top: 16px;
  color: var(--dim);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cards { display: none; }

@media (max-width: 760px) {
  .wrap { width: min(100% - 20px, 1440px); padding-top: 18px; }
  .top { flex-direction: column; align-items: flex-start; }
  .meta { text-align: left; }
  .table-wrap { display: none; }
  .cards { display: grid; gap: 8px; padding: 10px; }
  .card {
    background: var(--bg-row);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 13px;
  }
  .card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
  .card-price { font-family: var(--mono); font-size: 18px; font-weight: 700; }
  .card-specs { color: var(--muted); margin: 6px 0 8px; display: grid; gap: 4px; }
  .card-line { white-space: normal; overflow-wrap: anywhere; word-break: keep-all; line-height: 1.4; }
  .card-line .k {
    display: inline-block;
    min-width: 36px;
    margin-right: 8px;
    color: var(--dim);
    font-size: 11px;
    font-weight: 650;
  }
  .card-meta {
    display: flex; flex-wrap: wrap; gap: 8px 12px;
    color: var(--dim); font-size: 12px;
  }
  .card a { color: var(--text); }
}
