:root {
  --ink: #2b211d;
  --muted: #7c6c62;
  --line: #e8ddd0;
  --paper: #faf6ef;
  --card: #fffdfa;
  --accent: #b23a2f;
  --accent-dark: #86261d;
  --accent-soft: #fbeeea;
  --gold: #b8862f;
  --gold-soft: #fbf1dd;
  --amber: #946000;
  --amber-soft: #fff6de;
  --shadow: 0 18px 45px rgba(92, 48, 35, 0.10);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% -10%, rgba(178, 58, 47, 0.10), transparent 34%),
    radial-gradient(circle at 96% 4%, rgba(184, 134, 47, 0.15), transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

button, input { font: inherit; }

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #c44736, #8a281f);
  color: #fff8ee;
  font-weight: 800;
  font-size: 21px;
  box-shadow: 0 8px 18px rgba(178, 58, 47, 0.30);
}

.brandtext { display: flex; flex-direction: column; line-height: 1.25; }
.brandtext strong { font-size: 16px; letter-spacing: 0.02em; }
.brandtext small { color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; }

.date-pill {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.78);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 46px 22px 30px;
}

.hero { max-width: 820px; }

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.sub {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 15px;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 17px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.searchbox:focus-within {
  border-color: rgba(178, 58, 47, 0.48);
  box-shadow: 0 20px 50px rgba(178, 58, 47, 0.14);
}

.searchicon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: #9b8b80;
  stroke-width: 2;
  stroke-linecap: round;
}

#q {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 0;
  font-size: 17px;
  color: var(--ink);
}

#q::placeholder { color: #ada096; }

.searchbox button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff9f2;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.searchbox button:hover { background: var(--accent-dark); }
.searchbox button:active { transform: translateY(1px); }

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.examples button {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.72);
  color: #5a4a41;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s ease;
}

.examples button:hover {
  border-color: rgba(178, 58, 47, 0.40);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.status {
  min-height: 24px;
  margin: 26px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.status .parsed {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
}

.tag.muted { background: #f0eae3; color: #78685e; font-weight: 500; }

.results { display: grid; gap: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.24s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
}

.identity { min-width: 0; }

.brandline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.brand {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 750;
}

.variant {
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.config {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.hero-price {
  text-align: right;
  flex: 0 0 auto;
  padding-left: 10px;
}

.hero-price .label {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.hero-price .num {
  color: var(--accent-dark);
  font-size: clamp(34px, 6vw, 46px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-price .num small { font-size: 17px; font-weight: 650; margin-right: 2px; }
.hero-price .cond { color: var(--muted); font-size: 12px; }

.table-wrap { padding: 0 24px; overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

th:last-child, td:last-child { text-align: right; }

td {
  padding: 11px 8px;
  border-bottom: 1px solid #f1e9e0;
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }

td.cond { color: #504039; }
td.price { font-weight: 750; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.price .warn { color: var(--amber); margin-left: 4px; }

tr.is-a td { background: #fdf6f2; }
tr.is-a td.cond { font-weight: 700; color: var(--accent-dark); }

.note, .warnbox {
  margin: 14px 24px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12.8px;
  line-height: 1.6;
}

.note { background: #f8f2ea; color: #66544a; }
.warnbox { background: var(--amber-soft); color: var(--amber); }

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 24px 20px;
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11.8px;
}

.copybtn {
  border: 1px solid var(--line);
  background: #fffdfa;
  color: #5a4a41;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}

.copybtn:hover { border-color: rgba(178, 58, 47, 0.42); color: var(--accent-dark); }

.related { margin-top: 22px; }
.related h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 650; }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }

.related-list button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.82);
  border-radius: 10px;
  padding: 8px 11px;
  color: #4d3d35;
  cursor: pointer;
  font-size: 12.8px;
}

.related-list button:hover { border-color: rgba(178, 58, 47, 0.42); background: var(--accent-soft); }
.related-list .rp { color: var(--accent-dark); font-weight: 750; }

.empty {
  background: var(--card);
  border: 1px dashed #d9cab9;
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
}

.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

.guide { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.guide h3 { margin: 0 0 14px; font-size: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guide-grid div { background: rgba(255, 253, 250, 0.62); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; }
.guide-grid b { display: block; font-size: 12.5px; color: var(--accent-dark); margin-bottom: 4px; }
.guide-grid span { font-size: 12px; color: var(--muted); line-height: 1.55; }

.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 22px 40px;
  color: #917f72;
  font-size: 11.5px;
}
.footer p { margin: 4px 0; }

.skeleton {
  height: 180px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #f2ebe3 25%, #fbf6ef 50%, #f2ebe3 75%);
  background-size: 200% 100%;
  animation: shimmer 1s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 720px) {
  .topbar { padding-top: 16px; }
  .brandtext small { display: none; }
  .wrap { padding-top: 30px; }
  .searchbox { padding-left: 13px; border-radius: 15px; }
  .searchbox button { padding: 11px 16px; }
  .card-head { flex-direction: column; padding: 18px 18px 12px; }
  .hero-price { text-align: left; padding-left: 0; }
  .table-wrap { padding: 0 18px; }
  .note, .warnbox { margin-left: 18px; margin-right: 18px; }
  .card-foot { padding: 14px 18px 18px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

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