:root {
  --bg: #e9edf0;
  --surface: #ffffff;
  --ink: #14202a;
  --muted: #5c6b78;
  --line: #d3dae0;
  --sign: #f2b600;          /* дорожный знак: бренд, акцент на внешних ссылках и фокус */
  --sign-ink: #1a1400;
  --good: #1c7a45;
  --vk: #2578dc;
  --tg: #1b8bbf;
  --max: #7138d8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 42, .06);
  --shadow-hover: 0 10px 24px -10px rgba(20, 32, 42, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  --chevron-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235c6b78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11171c;
    --surface: #1a222a;
    --ink: #e8edf1;
    --muted: #93a2ae;
    --line: #2b3640;
    --good: #55c585;
    --vk: #6aa8f5;
    --tg: #5cbbe6;
    --max: #a98af0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 10px 24px -10px rgba(0, 0, 0, .6);
    --chevron-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2393a2ae' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- шапка ---------- */
.top {
  background: var(--ink); color: var(--bg); position: sticky; top: 0; z-index: 10;
  border-bottom: 3px dashed color-mix(in srgb, var(--sign) 70%, transparent);
}
@media (prefers-color-scheme: dark) { .top { background: #0b0f13; color: #e8edf1; } }
.top-in { display: flex; gap: 12px; align-items: center; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { text-decoration: none; flex: none; }
.plate {
  display: inline-block; background: var(--sign); color: var(--sign-ink);
  font-weight: 800; font-size: 18px; letter-spacing: .02em; padding: 3px 12px; border-radius: 6px;
  border: 2px solid var(--sign-ink); box-shadow: 0 0 0 2px var(--sign);
}
.search { flex: 1 1 280px; display: flex; gap: 8px; min-width: 0; }
.search input {
  flex: 1; min-width: 0; font: inherit; padding: 9px 14px; border-radius: 8px; border: 0;
  background: #fff; color: #14202a;
}
.search button, .actions button {
  font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 9px 18px; cursor: pointer;
  background: var(--sign); color: var(--sign-ink);
}
.search button:hover, .actions button:hover { filter: brightness(1.06); }
.fav-nav {
  flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  color: inherit; font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 8px;
  border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.fav-nav:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.fav-nav.on { background: var(--sign); color: var(--sign-ink); }

/* ---------- каркас ---------- */
.layout { display: block; padding-top: 16px; padding-bottom: 32px; }
.side { margin-bottom: 14px; }
.feed { min-width: 0; }

/* ---------- фильтры ---------- */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.fold > summary {
  padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: ""; width: 18px; height: 18px; flex: none;
  background-color: var(--muted);
  -webkit-mask: var(--chevron) center / 18px no-repeat;
  mask: var(--chevron) center / 18px no-repeat;
}
@media (prefers-reduced-motion: no-preference) { .fold > summary::after { transition: transform .18s; } }
.fold[open] > summary::after { transform: rotate(180deg); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 12px; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid .wide { grid-column: 1 / -1; }
.grid input[type=number], .grid select, .quickbar select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
.grid input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.grid input[type=number]::-webkit-inner-spin-button,
.grid input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.grid select, .quickbar select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
  background-image: var(--chevron-img); background-repeat: no-repeat;
  background-position: right 10px center; background-size: 16px;
}
.grid select:disabled, .quickbar select:disabled { cursor: not-allowed; opacity: .6; }
.grid input[type=number]:hover, .grid select:hover, .quickbar select:hover { border-color: var(--muted); }
.grid .check { flex-direction: row; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }

/* ---------- значки марок (без логотипов — цветной инициал) ---------- */
.mk {
  display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px;
  color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.mk.big { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
/* цвета заданы классами (не инлайн-style — его режет style-src в CSP) */
.mk-0 { background: #8a4b2e; } .mk-1 { background: #2e6f8a; } .mk-2 { background: #6a4b8a; }
.mk-3 { background: #2e8a5c; } .mk-4 { background: #8a2e4b; } .mk-5 { background: #5c6b78; }
.mk-6 { background: #8a6a2e; } .mk-7 { background: #2e4b8a; } .mk-8 { background: #8a2e2e; }
.mk-9 { background: #3e8a7a; }
/* ---------- значки марок (настоящие логотипы) ---------- */
.mk-wrap {
  display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line); padding: 2px; box-sizing: border-box;
}
.mk-wrap.big { width: 30px; height: 30px; border-radius: 8px; padding: 3px; }
.mk-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
h2 { display: flex; align-items: center; gap: 7px; }
.d-title { display: flex; align-items: center; gap: 10px; }

/* ---------- свой выпадающий список (вместо нативного — не разъезжается со стилем сайта) ---------- */
.dd { position: relative; width: 100%; }
.dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.dd-btn:hover { border-color: var(--muted); }
.dd[data-open="true"] > .dd-btn { border-color: var(--ink); }
.dd-btn:disabled { cursor: not-allowed; opacity: .6; }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.dd-btn::after {
  content: ""; width: 16px; height: 16px; flex: none; background-color: var(--muted);
  -webkit-mask: var(--chevron) center / 16px no-repeat; mask: var(--chevron) center / 16px no-repeat;
}
@media (prefers-reduced-motion: no-preference) { .dd-btn::after { transition: transform .15s; } }
.dd[data-open="true"] > .dd-btn::after { transform: rotate(180deg); }
.dd-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-hover);
  max-height: 260px; overflow-y: auto; padding: 5px;
}
.dd[data-open="true"] > .dd-panel { display: block; }
.dd-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 14.5px;
  color: var(--ink); background: none; border: 0; border-radius: 7px; padding: 8px 9px; cursor: pointer;
}
.dd-opt:hover, .dd-opt:focus-visible { background: var(--bg); }
.dd-opt.sel { font-weight: 700; }
.dd-opt.sel::after {
  content: "✓"; margin-left: auto; flex: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--sign); color: var(--sign-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center;
}
.actions { display: flex; align-items: center; gap: 16px; padding: 0 14px 14px; flex-wrap: wrap; }
.actions button { background: var(--ink); color: var(--bg); }
.save-search { background: transparent !important; color: var(--muted) !important; border: 1.5px solid var(--line); font-weight: 600; }
.save-search:hover { color: var(--ink) !important; border-color: var(--ink); }
.save-search.on { color: var(--sign-ink) !important; border-color: var(--sign); background: var(--sign) !important; }

/* ---------- сохранённые поиски ---------- */
.saved-searches { display: grid; gap: 8px; margin: 0 0 16px; }
.saved-searches h2 { font-size: 15px; margin: 0; order: 0; }
.saved-searches .saved-list { order: 1; }
.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.saved-item {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 14px;
}
.saved-item a { text-decoration: none; color: var(--ink); font-weight: 600; }
.saved-item a:hover { color: var(--sign); }
.saved-item button {
  border: 0; background: var(--bg); color: var(--muted); width: 20px; height: 20px; border-radius: 50%;
  font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.saved-item button:hover { background: #e2434a; color: #fff; }
#saved-searches:empty { display: none; }
.reset { color: var(--muted); font-size: 14px; }

/* ---------- чипы марок ---------- */
.chips-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; flex: 1 1 auto; min-width: 0;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips-nav {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px;
  line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  margin-bottom: 8px;
}
.chips-nav:hover, .chips-nav:focus-visible { background: var(--ink); border-color: var(--sign); color: var(--sign); }
.chips-nav:disabled { opacity: .3; cursor: default; }
.chips-nav:disabled:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.chip {
  flex: none; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on b { color: inherit; opacity: .7; }

/* ---------- вкладки ---------- */
/* ---------- быстрые фильтры (поверх ленты, без похода в боковую панель) ---------- */
.quickbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: flex-end; margin: 0 0 10px; }
.qf { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); width: 190px; }
.qf .dd-btn, .qf select { font-size: 13.5px; padding: 7px 9px; }
.qf-go {
  font: inherit; font-weight: 700; font-size: 13.5px; border: 0; border-radius: 8px; padding: 8px 16px;
  background: var(--ink); color: var(--bg); cursor: pointer; align-self: flex-end;
}
@media (min-width: 900px) { .qf-go { display: none; } }  /* на широком экране форма уходит сама при выборе */
.quickbar .dd-panel { left: auto; right: 0; min-width: 240px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tabs a {
  text-decoration: none; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted);
}
.tabs a b { font-weight: 500; margin-left: 4px; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 -3px 0 var(--sign); }
.found { margin: 0; color: var(--muted); font-size: 14px; }
.hint { background: var(--surface); border-left: 4px solid var(--sign); padding: 10px 14px; border-radius: 6px; font-size: 14px; color: var(--muted); }

/* ---------- карточки ---------- */
.cards { display: grid; gap: 12px; }
.card {
  position: relative; display: grid; grid-template-columns: 1fr; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card-hit { position: absolute; inset: 0; z-index: 0; }
.card-hit:focus-visible { outline-offset: -3px; }
.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font-size: 17px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; pointer-events: auto;
  transition: background .15s, color .15s, border-color .15s, transform .1s; box-shadow: var(--shadow);
}
.fav-btn:hover, .fav-btn:focus-visible { border-color: #e2434a; color: #e2434a; }
.fav-btn.on { color: #e2434a; border-color: #e2434a; }
.fav-btn:active { transform: scale(.9); }
.pic { background: var(--bg); aspect-ratio: 4 / 3; max-height: 260px; width: 100%; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.body { position: relative; z-index: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; pointer-events: none; }
.head { display: flex; flex-direction: column; gap: 2px; }
h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--muted); order: 2; }
.price { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; order: 1; letter-spacing: -.01em; }
.price.none { font-size: 15px; font-weight: 600; color: var(--muted); order: 1; }
.spec { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.spec li { background: var(--bg); border-radius: 6px; padding: 2px 10px; font-size: 14px; }
.spec li.good { color: var(--good); font-weight: 600; }
.miss { margin: 0; font-size: 13px; color: #b3541e; }
@media (prefers-color-scheme: dark) { .miss { color: #f09a68; } }
.snippet { margin: 0; color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: relative; z-index: 1; pointer-events: auto; }
.when { color: var(--muted); font-size: 13px; margin-left: 4px; }
.src {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 5px;
  border: 1.5px solid currentColor; text-decoration: none; line-height: 1.5;
}
.src-vk { color: var(--vk); } .src-tg { color: var(--tg); } .src-max { color: var(--max); }
.src.alt { font-weight: 600; opacity: .85; }
.src.alt:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; pointer-events: auto; }
.open {
  background: transparent; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px;
  padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--line); flex: 1 1 auto; text-align: center;
}
.open:hover { border-color: var(--ink); background: var(--bg); }
.report { font-size: 12.5px; color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 0; }
.pager a { padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.note { color: var(--muted); font-size: 13px; padding-bottom: 32px; }
.note p { margin: 6px 0; max-width: 70ch; }

/* ---------- широкий экран: фильтры слева, карточки горизонтальные ---------- */
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }
  .side { position: sticky; top: 68px; margin: 0; }
  .fold > summary { cursor: default; pointer-events: none; }
  .fold > summary::after { content: none; }
  .card { grid-template-columns: 250px 1fr; }
  .card.nophoto { grid-template-columns: 1fr; }
  .pic { aspect-ratio: auto; max-height: none; min-height: 190px; }
  .foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .acts { flex: none; }
  .open { flex: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: box-shadow .15s, transform .15s, border-color .15s; }
  .card:hover, .card:focus-within { border-color: var(--ink); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
}

/* ========== страница объявления ========== */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; margin: 14px 0; }
.back:hover { color: var(--ink); }
.fav-title { margin: 0; font-size: 20px; }
.detail { display: grid; gap: 18px; padding-bottom: 36px; }
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero img { width: 100%; max-height: 480px; object-fit: cover; display: block; background: var(--bg); }
.hero .noimg { aspect-ratio: 16/9; font-size: 15px; }

.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.g-frame { position: relative; background: var(--bg); touch-action: pan-y; aspect-ratio: 4 / 3; max-height: 70vh; }
.g-img {
  width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none;
  cursor: zoom-in;
}
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid transparent; background: rgba(20, 32, 42, .6); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(2px); z-index: 1;
  transition: background .15s, border-color .15s;
}
.g-nav:hover, .g-nav:focus-visible { background: var(--ink); border-color: var(--sign); }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(20, 32, 42, .65); color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs img {
  width: 76px; height: 58px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; flex: none;
  cursor: pointer; opacity: .65;
}
.thumbs img:hover { opacity: .9; }
.thumbs img.on { border-color: var(--sign); opacity: 1; }

/* ---- полноэкранный просмотр фото ---- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 14, 18, .95); z-index: 1000; display: none;
  align-items: center; justify-content: center; touch-action: pan-y;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 80vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid transparent; background: rgba(255, 255, 255, .1); color: #fff; font-size: 20px; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, border-color .15s; z-index: 2;
}
.lb-close:hover, .lb-close:focus-visible { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid transparent; background: rgba(255, 255, 255, .1); color: #fff; font-size: 32px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; z-index: 2;
}
.lb-nav:hover, .lb-nav:focus-visible { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.lb-thumbs {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 14px 16px;
  overflow-x: auto; justify-content: center; background: linear-gradient(transparent, rgba(0, 0, 0, .5) 40%);
}
.lb-thumbs img {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; flex: none;
  cursor: pointer; opacity: .55;
}
.lb-thumbs img:hover { opacity: .85; }
.lb-thumbs img.on { border-color: var(--sign); opacity: 1; }
@media (max-width: 600px) {
  .lb-nav { width: 46px; height: 46px; font-size: 24px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lb-close { top: 10px; right: 10px; }
  .lb-count { bottom: 78px; }
  .lb-img { max-height: 72vh; }
  .lb-thumbs img { width: 50px; height: 38px; }
}
.d-top { display: grid; gap: 18px; }
.d-media { display: grid; gap: 18px; }
.d-info {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: grid; gap: 16px; align-content: start;
}
.d-info .fav-btn { top: 14px; right: 14px; }
.d-specs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.d-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.d-specs span { color: var(--muted); }
.d-specs b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.d-specs a { color: var(--ink); font-weight: 600; text-align: right; text-decoration: none; overflow-wrap: anywhere; }
.d-specs a:hover { color: var(--sign); text-decoration: underline; }
.d-contacts { margin-top: -4px; }
.d-contacts-title { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: none; margin: 0 0 2px; }
@media (min-width: 900px) {
  .d-top { grid-template-columns: 1.5fr 1fr; align-items: start; }
}
.d-head { display: grid; gap: 6px; }
.d-price { font-size: 34px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.d-price.none { font-size: 18px; font-weight: 600; color: var(--muted); }
.d-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--muted); }
.d-text {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; max-width: 72ch;
}
.sources { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; display: grid; }
.s-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); border-radius: 8px; }
.s-row:hover { background: var(--bg); }
.s-row .meta { color: var(--muted); font-size: 13.5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.s-row .go { color: var(--muted); font-size: 13px; flex: none; }
.cta-original {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--sign); color: var(--sign-ink); font-weight: 800; font-size: 16px;
  padding: 14px 26px; border-radius: 10px; box-shadow: var(--shadow);
}
.cta-original:hover { filter: brightness(1.06); }
.cta-wrap { display: grid; gap: 8px; justify-items: start; }
.cta-note { color: var(--muted); font-size: 13px; margin: 0; }
.cta-note-top { margin-bottom: 8px; }
@media (min-width: 700px) {
  .hero img { max-height: 420px; }
}
