/* Одна карточка машины (js/lot-card/) в трёх видах — по макету project-memory/design/2026-10-19-redesign/.
   Всё под html[data-skin] (атрибут ставит js/skin.js всегда, по умолчанию А; старых карточек нет).
   Раскладка: .lc--tile (полка, похожие, история продаж, «Продано») и .lc--row (выдача, кабинет, калькулятор).
   Порядок: общее → А «Тихий» → Б «Витрина» → В «Табло» → места на страницах. */

/* ---------- общее ---------- */
html[data-skin] .lc {
  --lc-ink: #1b2430; --lc-muted: #6b7685; --lc-line: #e6eaef; --lc-soft: #f5f7f9;
  --lc-accent: var(--accent, #1c3d78); --lc-ok: #1a8f5c; --lc-copart: #1d5bbf; --lc-iaai: #c8102e;
  position: relative; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  grid-template-areas: none; grid-template-rows: none; min-height: 0; overflow: visible;
  color: var(--lc-ink); text-decoration: none; text-align: left;
  font: 400 15px/1.45 "Outfit", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
html[data-skin] .lc *, html[data-skin] .lc *::before, html[data-skin] .lc *::after { box-sizing: border-box; }
html[data-skin] .lc button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
html[data-skin] .lc .lc-ic { width: 14px; height: 14px; flex: none; }
html[data-skin] .lc-ph { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--lc-soft); }
html[data-skin] .lc-ph-btn { display: block; width: 100%; height: 100%; }
html[data-skin] .lc-img { display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-skin] .lc-img--empty { background: var(--lc-soft); }
html[data-skin] .lc-img--soon { display: block; }  /* NPA «Фото скоро»: внутри .noph, на всю рамку фото */
/* «Нет фото» (объявление без фото: js/obv/obv-api.js noPhotoHtml, js/home-obv.js) — карточки, кабинет, галерея */
.noph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%;
  min-width: 0; box-sizing: border-box; padding: 6px; overflow: hidden; background: var(--lc-soft, var(--sk-soft, #f2f4f7));
  color: var(--sk-muted, #8a94a3); text-align: center; font: 500 13px/1.2 "Outfit", "Segoe UI", system-ui, sans-serif; }
.noph__ic { display: block; width: 40%; max-width: 72px; min-width: 24px; height: auto; flex: none; opacity: .75; }
.noph__t { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-skin] .lc-auc, html[data-skin] .lc-timer, html[data-skin] .lc-soldtag, html[data-skin] .lc-star { display: none; }
html[data-skin] .lc-tag { position: absolute; right: 8px; top: 8px; z-index: 2; background: #fff; color: var(--lc-ink); font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 8px; }
html[data-skin] .lc-tag--await { background: var(--lc-accent); color: #fff; }
html[data-skin] .lc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-skin] .lc-title { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
html[data-skin] .lc-trim { font-weight: 400; color: var(--lc-muted); font-size: .87em; }
html[data-skin] .lc-facts { display: block; font-size: 13px; color: var(--lc-ink); }
html[data-skin] .lc-f { font-style: normal; }
html[data-skin] .lc-f + .lc-f::before { content: " · "; color: var(--lc-muted); }
html[data-skin] .lc-f.is-ok { color: var(--lc-ok); }
html[data-skin] .lc-f.is-bad { color: var(--lc-accent); }
html[data-skin] .lc-where { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--lc-muted); min-width: 0; }
html[data-skin] .lc-where > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-skin] .lc-badge { align-self: flex-start; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; margin-bottom: 4px; background: var(--lc-soft); color: var(--lc-ink); }
html[data-skin] .lc-badge--track, html[data-skin] .lc-badge--track-done { color: #8a5a00; background: #fdf3dc; }
html[data-skin] .lc-badge--bid, html[data-skin] .lc-badge--buy { color: var(--lc-copart); background: #e8effa; }
html[data-skin] .lc-extra { margin-top: 6px; position: relative; z-index: 2; }
html[data-skin] .lc-price { display: flex; flex-direction: column; gap: 1px; font-variant-numeric: tabular-nums; }
html[data-skin] .lc-bid, html[data-skin] .lc-bn { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
html[data-skin] .lc-bid b { font-size: 19px; font-weight: 600; }
html[data-skin] .lc-bid small, html[data-skin] .lc-bn small { font-size: 12px; color: var(--lc-muted); }
/* скидка у цены (classifieds/discount.py): старая зачёркнута, «−N%» плашкой */
html[data-skin] .lc-old { font-size: 13px; color: var(--lc-muted); text-decoration: line-through; }
html[data-skin] .lc-disc { font-style: normal; padding: 1px 6px; border-radius: 999px; background: #c62828; color: #fff; font-size: 12px; font-weight: 700; }
html[data-skin] .lc-bn { color: var(--lc-ok); font-size: 13px; }
/* курс НБРБ рядом с ценой (js/shared/fx-rates.js): «≈ $3 850*» у BYN, «≈ 16 240 BYN» у $ — мелко и серым */
.fx-alt { font-size: 12px; font-weight: 400; color: #6b7280; white-space: nowrap; }
.fx-alt:empty { display: none; }
html[data-skin] .lc-bn b { font-weight: 500; }
/* Резерв продавца (20.10): пометка всем, цена — вошедшему; гостю — «Войдите, чтобы узнать» */
html[data-skin] .lc-rsv { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13px; }
html[data-skin] .lc-rsv small { font-size: 12px; color: var(--lc-muted); }
html[data-skin] .lc-rsv b { font-weight: 600; }
html[data-skin] .lc-timed { align-self: flex-start; padding: 1px 6px; border: 1px solid var(--lc-line, #d6dbe1); border-radius: 4px;
  font-size: 12px; line-height: 18px; color: var(--lc-muted); white-space: nowrap; }
html[data-skin] .lc-rsv-login { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
html[data-skin] .lc-when { font-size: 13px; color: var(--lc-muted); }
html[data-skin] .lc-when b { font-weight: 500; color: var(--lc-ink); }
html[data-skin] .lc-when.is-hot b { color: var(--lc-accent); }
html[data-skin] .lc-status { margin-top: 6px; font-size: 13px; font-weight: 500; }
/* Кабинет и выдача: вся карточка нажимается (заголовок растянут), кнопки поверх. */
html[data-skin] article.lc .lc-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
html[data-skin] article.lc .lc-ph-btn, html[data-skin] .lc .lc-star { position: relative; z-index: 2; }
/* «Войдите» у резерва — кнопка, а не переход: над растянутой ссылкой (ревью Opus 09.11) */
html[data-skin] article.lc .lc-rsv-login { position: relative; z-index: 2; }
html[data-skin] a.lc:focus-visible, html[data-skin] .lc .lc-title:focus-visible { outline: 2px solid var(--lc-copart); outline-offset: 2px; }

/* row: фото | описание | цена */
html[data-skin] .lc.lc--row { display: grid; grid-template-columns: 208px minmax(0, 1fr) auto; gap: 20px; align-items: start; }
html[data-skin] .lc--row .lc-title { white-space: normal; font-size: 17px; }
html[data-skin] .lc--row .lc-price { text-align: right; align-items: flex-end; padding-top: 2px; }
html[data-skin] .lc--row .lc-bid b { font-size: 21px; }
html[data-skin] .lc--row .lc-when { margin-top: 8px; }
html[data-skin] .lc--tile .lc-ph { margin-bottom: 10px; }
html[data-skin] .lc--tile .lc-where, html[data-skin] .lc--tile .lc-facts { display: none; }
html[data-skin] .lc--tile .lc-price { margin-top: 6px; }

@media (max-width: 640px) {
  html[data-skin] .lc.lc--row { grid-template-columns: 128px minmax(0, 1fr); gap: 4px 12px; }
  html[data-skin] .lc--row .lc-ph { grid-row: span 2; }
  html[data-skin] .lc--row .lc-title { font-size: 15px; }
  html[data-skin] .lc--row .lc-trim { display: block; }
  html[data-skin] .lc--row .lc-where { display: none; }
  html[data-skin] .lc--row .lc-price { grid-column: 2; text-align: left; align-items: flex-start; padding: 0; }
  html[data-skin] .lc--row .lc-bid b { font-size: 18px; }
  html[data-skin] .lc--row .lc-when { margin-top: 2px; }
}

/* ---------- А «Тихий»: белый лист, линии 1px, без теней ---------- */
html[data-skin="a"] .lc-ph { border-radius: 6px; }
html[data-skin="a"] a.lc:hover .lc-img, html[data-skin="a"] article.lc:hover .lc-img { opacity: .92; }
html[data-skin="a"] .lc.lc--row { padding: 18px 0; border-bottom: 1px solid var(--lc-line); }
html[data-skin="a"] .lc--row .lc-facts { font-size: 14px; }
@media (max-width: 640px) {
  html[data-skin="a"] .lc.lc--row { padding: 14px 0; }
  html[data-skin="a"] .lc--row .lc-facts { font-size: 13px; }
}

/* ---------- Б «Витрина»: фото первым, белая карточка с тенью, таймер и площадка на фото ---------- */

@media (max-width: 640px) {
  /* Б на телефоне: выдача и кабинет — те же карточки-плитки на всю ширину. */

}

/* ---------- В «Табло»: плотно, строка как в таблице торгов, цифры колонками ---------- */

/* ---------- места на страницах: только сетка вокруг карточек ---------- */
/* Полки главной: 5 в ряд на мониторе, по 2 на странице полки на телефоне (как сейчас). */
html[data-skin] .home-shelf-page > .lc { min-width: 0; }
/* Выдача и кабинет: список строк. */
html[data-skin] #digestList > .lc.lc--row, html[data-skin] #appsList .lc.lc--row { margin: 0; }
html[data-skin="a"] #digestList > .lc:first-child { padding-top: 4px; }
/* История продаж, «Продано»: плитки сеткой. */
html[data-skin] #soldHistoryGrid:has(> .lc), html[data-skin] #cards:has(> .lc) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
@media (max-width: 640px) {
  html[data-skin] #soldHistoryGrid:has(> .lc), html[data-skin] #cards:has(> .lc) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  html[data-skin] #soldHistoryGrid > .lc .lc-bid b, html[data-skin] #cards > .lc .lc-bid b { font-size: 16px; }
}
