:root {
  --bg: #f7f7f5; --card: #ffffff; --ink: #1d232b; --muted: #66707c; --line: #e3e5e8;
  --accent: #b5470b; --accent-ink: #ffffff; --best: #eef7ee; --best-line: #8cc28c;
  --tag: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b; --card: #1c2026; --ink: #e8eaed; --muted: #9aa3ad; --line: #2c323a;
    --accent: #f08a4b; --accent-ink: #14171b; --best: #1d2b1f; --best-line: #3f7a45;
    --tag: #262c34;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo { font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.mini { flex: 1; display: flex; justify-content: flex-end; }
.mini input { width: 100%; max-width: 280px; }
input[type=search] { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); }
main.wrap { padding-top: 20px; padding-bottom: 40px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 8px 0; }
h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.num { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 600; }
.muted { color: var(--muted); font-size: .9rem; }
.crumbs { font-size: .9rem; color: var(--muted); }
.meta { color: var(--muted); }
.tag { display: inline-block; background: var(--tag); border-radius: 999px; padding: 1px 10px; font-size: .8rem; margin-right: 4px; color: var(--ink); }
.summary { margin: 16px 0 8px; }
.offers, .plist, .refs, .facets { list-style: none; padding: 0; margin: 0; }
.offer { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.offer.noimage { grid-template-columns: 1fr auto; }
.offer.best { background: var(--best); border-color: var(--best-line); }
.offer img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #fff; display: block; }
.who { font-weight: 600; }
.ltitle { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.oprice { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.oprice strong { font-size: 1.15rem; }
.btn { background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.reg { font-size: .72rem; font-weight: 600; border-radius: 4px; padding: 0 6px; margin-left: 4px; background: var(--tag); color: var(--muted); }
.refs li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.plist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plist a { text-decoration: none; color: var(--ink); }
.plist a:hover .num { color: var(--accent); }
.hero { text-align: center; padding: 24px 0 8px; }
.hero h1 { font-size: 2rem; }
.hero input { width: 100%; max-width: 560px; font-size: 1.1rem; padding: 12px 16px; margin: 8px 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.facets li { padding: 3px 0; }
.foot { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; color: var(--muted); font-size: .85rem; }
@media (max-width: 640px) {
  .offer { grid-template-columns: 48px 1fr; }
  .offer.noimage { grid-template-columns: 1fr; }
  .offer img { width: 48px; height: 48px; }
  .oprice { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .cols { grid-template-columns: 1fr; }
  .mini input { max-width: 160px; }
  .plist li { flex-direction: column; gap: 2px; }
}
