  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1800px;
    margin: 0 auto;
    padding: 14px 18px 40px;
    background: #0d1117;
    color: #e6edf3;
    line-height: 1.5;
    font-size: 13.5px;
  }

  h1, h2 { margin: 0; }

  /* === ВЕРХНЯЯ СТРОКА: ссылка на галерею + заметки === */
  .top-row {
    display: flex; align-items: flex-start; gap: 12px;
    margin: 0 0 10px;
  }
  .top-row .gallery-link {
    color: #79c0ff; text-decoration: none; font-size: 12px;
    white-space: nowrap; padding-top: 11px; flex-shrink: 0;
  }
  .top-row .gallery-link:hover { text-decoration: underline; }
  .top-row .notes-panel { flex: 1; margin: 0; }

  /* === NOTES PANEL === */
  .notes-panel {
    margin: 0 0 10px;
    padding: 0;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 3px;
    overflow: hidden;
  }
  .notes-panel summary {
    padding: 10px 14px; cursor: pointer; user-select: none;
    font-size: 13px; font-weight: 600; color: #a5d6ff;
    background: #0d1117;
    list-style: none;
  }
  .notes-panel summary::-webkit-details-marker { display: none; }
  .notes-panel summary::before {
    content: '▸'; display: inline-block; margin-right: 8px;
    transition: transform 0.15s; font-size: 0.9em; color: #6e7681;
  }
  .notes-panel[open] summary::before { transform: rotate(90deg); }
  .notes-panel summary:hover { background: #21262d; }

  .notes-body {
    padding: 8px 20px 16px 24px;
    columns: 2;
    column-gap: 28px;
    column-rule: 1px solid #30363d;
    line-height: 1.55;
    color: #c9d1d9;
    font-size: 12.5px;
  }
  .notes-body h3 {
    color: #79c0ff; margin: 12px 0 4px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid #30363d; padding-bottom: 3px;
    break-after: avoid;
  }
  .notes-body h3:first-of-type { margin-top: 0; }
  .notes-body ul, .notes-body ol { margin: 2px 0; padding-left: 18px; }
  .notes-body li { margin: 2px 0; break-inside: avoid; font-size: 12px; }
  .notes-body b { color: #e6edf3; }
  .notes-body code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px; background: #0d1117;
    padding: 0 3px; border-radius: 2px;
  }
  .legend-ok { color: #86efac; font-weight: 700; }
  .legend-fail { color: #fca5a5; font-weight: 700; }

  /* === PAGE LAYOUT — sidebar + main === */
  .page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
  }

  /* === STICKY FILTERS === */
  .controls {
    position: sticky;
    top: 10px;
    box-sizing: border-box;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 3px;
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: #484f58 #161b22;
  }
  .controls::-webkit-scrollbar { width: 8px; }
  .controls::-webkit-scrollbar-track { background: #161b22; }
  .controls::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }
  .controls::-webkit-scrollbar-thumb:hover { background: #484f58; }

  .controls-group {
    display: flex; flex-wrap: wrap; gap: 3px;
    padding: 7px 0 8px;
    border-bottom: 1px dashed #30363d;
    align-items: center;
  }
  .controls-group:last-child { border-bottom: none; padding-bottom: 2px; }

  .controls-group .group-label,
  .controls-group label.group-label {
    flex: 0 0 100%;
    color: #79c0ff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin: 0 0 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
  }

  .reset-link, button.reset-link {
    color: #6e7681; font-size: 10px; text-decoration: underline;
    cursor: pointer;
    font-weight: normal;
    letter-spacing: 0;
    text-transform: none;
    margin-left: 0;
    white-space: nowrap;
    background: transparent;
    border: 0;
    font-family: inherit;
    padding: 4px 2px;
    margin: -4px -2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(96, 165, 250, 0.3);
  }
  .reset-link:hover { color: #a5d6ff; }

  .filter-chip {
    display: inline-flex; align-items: center; gap: 0;
    padding: 2px 8px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 2px;
    font-size: 11.5px;
    color: #c9d1d9;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
    position: relative;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
  }
  .filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
    margin: 0;
  }
  .filter-chip:hover { border-color: #484f58; color: #e6edf3; }
  .filter-chip:has(input:checked) {
    background: #21262d; border-color: #58a6ff; color: #a5d6ff;
    font-weight: 500;
  }
  .feat-filter:has(input:checked) {
    background: #14532d; border-color: #22c55e; color: #86efac;
  }

  .st-ok, .st-warn, .st-fail { padding-left: 17px; }
  .st-ok::before, .st-warn::before, .st-fail::before {
    content: ''; position: absolute; left: 6px; top: 50%;
    width: 6px; height: 6px; border-radius: 50%;
    transform: translateY(-50%);
  }
  .st-ok::before { background: #22c55e; }
  .st-warn::before { background: #eab308; }
  .st-fail::before { background: #ef4444; }

  /* === Makes / models === */
  .models-group { flex-direction: column; align-items: stretch; gap: 8px; }
  .country-block { display: flex; flex-direction: column; gap: 6px; }
  .country-chip { font-size: 12px; align-self: flex-start; }
  .country-chip b { font-weight: 700; letter-spacing: 0.01em; }
  .country-makes {
    display: flex; flex-direction: column; gap: 6px;
    margin-left: 9px; padding-left: 8px;
    border-left: 1px solid #21262d;
  }
  .make-block {
    display: flex; flex-direction: column; gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
  }
  .make-chip {
    font-size: 11.5px;
    align-self: flex-start;
  }
  .make-chip b { font-weight: 600; letter-spacing: 0.01em; }
  .model-chips {
    display: flex; gap: 3px; flex-wrap: wrap;
    margin-left: 9px;
    padding-left: 8px;
    border-left: 1px solid #30363d;
  }
  .model-chips:empty { display: none; }
  .model-chip { font-size: 10.5px; padding: 2px 7px; }
  .count {
    color: #6e7681; font-size: 10px; margin-left: 2px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
  }
  .filter-chip:has(input:checked) .count { color: #a5d6ff; }

  .feats-group .filter-chip { font-size: 11px; padding: 2px 7px; }

  #sort-select {
    font-size: 11.5px; padding: 3px 8px;
    background: #0d1117; border: 1px solid #30363d;
    color: #e6edf3; border-radius: 2px;
    width: 100%; cursor: pointer;
  }

  /* === GRID === */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 12px;
  }

  /* === CARD === */
  .card {
    background: #161b22; border: 1px solid #30363d; border-radius: 3px;
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 7px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  }
  .card.status-fail { opacity: 0.62; }
  .card.status-fail:hover { opacity: 1; }
  .card { position: relative; }

  /* === ИЗБРАННОЕ === */
  .fav-btn {
    position: absolute;
    top: 6px; right: 8px;
    background: transparent;
    border: 0;
    color: #484f58;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.15s, transform 0.12s;
    z-index: 10;
  }
  .fav-btn:hover { color: #fbbf24; transform: scale(1.15); }
  .card.is-fav .fav-btn { color: #fbbf24; }
  .card.is-fav .fav-btn::before { content: '★'; }
  .card.is-fav .fav-btn { font-size: 0; }
  .card.is-fav .fav-btn::before { font-size: 22px; }

  /* Режим «только избранные» */
  body.fav-only .card:not(.is-fav) { display: none !important; }
  body.removed-only .card:not([data-removed="1"]) { display: none !important; }

  /* Снятые лоты — приглушённые */
  .card[data-removed="1"] {
    opacity: 0.55;
    filter: grayscale(0.6);
    border-color: #484f58;
  }
  .card[data-removed="1"]:hover { opacity: 0.85; }
  .removed-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #7f1d1d;
    color: #fee2e2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 2px;
    border: 1px solid #b91c1c;
  }
  .filter-chip.st-removed:has(input:checked) {
    background: #7f1d1d;
    border-color: #b91c1c;
    color: #fee2e2;
  }
  .filter-chip.st-unclassified:has(input:checked) {
    background: #1f2937;
    border-color: #3b82f6;
    color: #93c5fd;
  }
  .card.card-unclassified {
    border-left: 3px solid #3b82f6;
    background: #0f1726;
  }
  .card.card-unclassified .status-badge {
    background: #1e3a8a;
    color: #bfdbfe;
  }

  .card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding-right: 34px;
  }
  .title-area { min-width: 0; }
  .card-meta {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 20px;
  }
  .car-title {
    display: flex;
    gap: 7px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-top: 4px;
    line-height: 1.2;
  }
  .lot-num {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 10px; color: #6e7681;
    letter-spacing: 0.04em;
  }
  .status-badge { font-size: 14px; line-height: 1; }
  .pc-badge {
    font-size: 10px; padding: 1px 5px; border-radius: 2px;
    cursor: help; font-weight: 600;
  }
  .pc-yes { background: #064e3b; color: #6ee7b7; border: 1px solid #059669; }
  .pc-unclear { background: #78350f; color: #fde68a; border: 1px solid #d97706; }
  .pc-no { background: #1f2937; color: #9ca3af; border: 1px solid #4b5563; }

  .brand {
    font-weight: 600; color: #f0f6fc;
    font-size: 16px;
    letter-spacing: -0.005em;
  }
  .version { color: #8b949e; font-size: 12.5px; font-weight: 400; }
  .price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
    text-align: right;
    white-space: nowrap;
  }
  .price {
    color: #fbbf24;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 750;
  }
  .price-box .link {
    margin-top: 0;
    font-size: 11.5px;
    color: #79c0ff;
  }

  .fact-grid {
    display: grid;
    grid-template-columns: 0.72fr 1.2fr 1fr 1fr;
    border-top: 1px solid #30363d;
    border-bottom: 1px solid #30363d;
    margin-top: 1px;
  }
  .fact {
    min-width: 0;
    padding: 5px 9px;
    border-right: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .fact:first-child { padding-left: 0; }
  .fact:last-child { border-right: 0; padding-right: 0; }
  .fact-label {
    color: #6e7681;
    font-size: 9.5px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .fact-value {
    color: #c9d1d9;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .wear-inline {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    cursor: help;
    white-space: nowrap;
  }
  .empty-value { color: #6e7681; }

  .seller-private {
    background: #7f1d1d; color: #fca5a5; padding: 1px 6px;
    border-radius: 2px; font-size: 10px; font-weight: 600;
  }
  .seller-dealer {
    background: #21262d; color: #a5d6ff; padding: 1px 6px;
    border-radius: 2px; font-size: 10px; font-weight: 600;
  }
  .src-curator {
    background: #172554; color: #c7d2fe; padding: 1px 6px;
    border-radius: 2px; font-size: 10px; font-weight: 600;
    border: 1px solid #3730a3; cursor: help;
  }
  .src-cur-model {
    background: #1e1b4b; color: #a5b4fc; padding: 1px 6px;
    border-radius: 2px; font-size: 10px; font-weight: 500;
    border: 1px solid #4338ca; cursor: help;
  }
  .src-market {
    background: #161b22; color: #8b949e; padding: 1px 6px;
    border-radius: 2px; font-size: 10px;
    border: 1px solid #484f58; cursor: help;
  }
  .src-caveat {
    background: #422006; color: #fcd34d; padding: 1px 6px;
    border-radius: 2px; font-size: 10px; font-weight: 600;
    border: 1px solid #b45309; cursor: help;
  }

  .photos { display: flex; gap: 2px; overflow: hidden; border-radius: 2px; }
  .photos[data-photos] img { cursor: zoom-in; }
  .photos img {
    flex: 1; min-width: 0; height: 130px; object-fit: cover;
    background: #0d1117;
  }

  .card-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: start;
    padding-top: 6px;
    border-top: 1px solid #30363d;
  }
  .photos + .card-section {
    border-top: 0;
    padding-top: 2px;
  }
  /* Inline-строка спецификаций без лейбла слева — все бейджи в одну линию с переносом */
  .spec-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    width: 100%;
    font-size: 12px;
    color: #c9d1d9;
  }
  /* Компактный body карточки: спецификации идут друг за другом, разделители тонкие, без жирных section-label */
  .card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
  }
  .card-body > * + * {
    border-top: 1px solid #21262d;
    padding-top: 5px;
  }
  .card-body .features {
    margin: 0;
  }
  .section-label {
    color: #6e7681;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .section-label::after {
    content: '';
    flex: 1;
    border-top: 1px dashed #30363d;
  }
  .spec-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: flex-start;
    width: 100%;
  }
  .spec-label {
    flex: 0 0 auto;
    color: #6e7681;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.35;
    padding-top: 3px;
    text-transform: uppercase;
  }
  .spec-items {
    display: flex;
    flex: 1 1 260px;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    font-size: 12px;
    color: #c9d1d9;
    min-width: 0;
  }
  .hw-item {
    background: #0d1117; padding: 1px 7px; border-radius: 2px;
    border: 1px solid #30363d; color: #e6edf3;
  }

  .int-item { white-space: nowrap; }

  .tag {
    display: inline-block; padding: 1px 7px; border-radius: 3px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  }
  .tag-ev   { background: #134e4a; color: #5eead4; }
  .tag-hev  { background: #14532d; color: #86efac; }
  .tag-phev { background: #164e63; color: #67e8f9; }
  .tag-mhev { background: #21262d; color: #a5d6ff; }
  .tag-ice  { background: #30363d; color: #c9d1d9; }
  .tag-ok   { background: #14532d; color: #86efac; }
  .tag-warn { background: #713f12; color: #fcd34d; }
  .tag-neutral { background: #30363d; color: #c9d1d9; }

  .features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    width: 100%;
  }
  .feat {
    padding: 1px 7px; border-radius: 3px; font-size: 10.5px;
    background: #0d1117; color: #8b949e; border: 1px solid #30363d;
  }
  .feat-key {
    background: #14532d; color: #86efac; border-color: #166534;
    font-weight: 600;
  }
  .feat-plus { background: #21262d; color: #a5d6ff; border-color: #1e40af; }
  .feat-from-desc {
    font-style: italic; opacity: 0.85;
    border-style: dashed !important;
  }
  .feat-from-desc::before { content: '❝ '; opacity: 0.6; }
  .feat-from-fetch {
    font-style: italic; opacity: 0.82;
    border-style: dotted !important;
    color: #fcd34d !important;
    background: #1e1b07 !important;
    border-color: #92400e !important;
  }
  .feat-from-fetch::before { content: '🔎 '; opacity: 0.8; }
  .feat-from-trim {
    font-style: italic; opacity: 0.78;
    border-style: dashed !important;
    color: #c4b5fd !important;
    background: #1e1b4b !important;
    border-color: #6366f1 !important;
  }
  .feat-from-trim::before { content: '≈ '; opacity: 0.7; }

  .dist-badge {
    display: inline-block; padding: 1px 6px; border-radius: 3px;
    font-size: 10.5px; margin-left: 0; cursor: help; font-weight: 500;
  }
  .dist-near { background: #0a2e1a; color: #86efac; border: 1px solid #166534; }
  .dist-far { background: #3b1a00; color: #fdba74; border: 1px solid #9a3412; }

  .lease-badge {
    display: inline-block; padding: 1px 6px; border-radius: 2px;
    background: #422006; color: #fbbf24; border: 1px solid #b45309;
    font-size: 10px; font-weight: 600; cursor: help;
  }
  .conf-badge {
    display: inline-block; padding: 1px 6px; border-radius: 2px;
    font-size: 10px; font-weight: 600; cursor: help;
  }
  .conf-low {
    background: #422006; color: #fbbf24; border: 1px solid #b45309;
  }
  .safety-badge {
    display: inline-block; padding: 1px 7px; border-radius: 2px;
    font-size: 11px; font-weight: 600;
    text-decoration: none;
    cursor: help;
    letter-spacing: 0.01em;
  }
  .safety-badge:hover { filter: brightness(1.15); }
  .ncap-5 { background: #052e1c; color: #6ee7b7; border: 1px solid #047857; }
  .ncap-4 { background: #422006; color: #fcd34d; border: 1px solid #b45309; }
  .ncap-low { background: #450a0a; color: #fca5a5; border: 1px solid #b91c1c; }
  .adj-badge {
    display: inline-block; padding: 1px 7px; border-radius: 2px;
    font-size: 11px; font-weight: 700;
    cursor: help;
    letter-spacing: 0.01em;
  }
  .adj-top { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }
  .adj-mid { background: #21262d; color: #a5d6ff; border: 1px solid #58a6ff; }
  .adj-low { background: #422006; color: #fcd34d; border: 1px solid #b45309; }
  .rear-badge {
    display: inline-block; padding: 1px 7px; border-radius: 2px;
    font-size: 11px; font-weight: 600;
    cursor: help;
    letter-spacing: 0.01em;
  }
  .rear-high { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }
  .rear-mid { background: #21262d; color: #a5d6ff; border: 1px solid #58a6ff; }
  .rear-low { background: #422006; color: #fcd34d; border: 1px solid #b45309; }
  .rear-dim {
    font-size: 11px; color: #8b949e;
    padding: 1px 6px; border: 1px dashed #30363d; border-radius: 2px;
    white-space: nowrap;
  }
  .dim-badge {
    display: inline-block; padding: 1px 7px; border-radius: 2px;
    font-size: 11px; font-weight: 600;
    cursor: help;
    letter-spacing: 0.01em;
    background: #161b22; color: #c9d1d9; border: 1px solid #484f58;
  }
  .dim-trunk { color: #fde68a; border-color: #78716c; }
  .hvac-badge {
    display: inline-block; padding: 1px 7px; border-radius: 2px;
    font-size: 11px; font-weight: 600;
    cursor: help;
    letter-spacing: 0.01em;
  }
  .hvac-physical { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }
  .hvac-mixed { background: #21262d; color: #a5d6ff; border: 1px solid #58a6ff; }
  .hvac-touch { background: #422006; color: #fcd34d; border: 1px solid #b45309; }

  /* === MOBILE TAP-TOOLTIP === */
  #mobile-tip {
    position: fixed;
    background: #0d1117; color: #e6edf3;
    padding: 8px 12px; border-radius: 3px;
    font-size: 12px; line-height: 1.4;
    border: 1px solid #30363d;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    max-width: min(320px, 90vw);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s, transform 0.12s;
    font-style: normal;
    font-weight: 400;
    white-space: normal;
  }
  #mobile-tip.show { opacity: 1; transform: translateY(0); }

  /* === LIGHTBOX (галерея фото лота) === */
  #lb {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(2, 6, 23, 0.95);
    display: none; align-items: center; justify-content: center;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
  }
  #lb.show { display: flex; }
  #lb-img {
    max-width: 96vw; max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    background: #0d1117;
  }
  .lb-btn {
    position: absolute;
    background: rgba(15, 23, 42, 0.85);
    color: #e6edf3; border: 1px solid #484f58;
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
    cursor: pointer; touch-action: manipulation;
    transition: background 0.15s;
  }
  .lb-btn:hover { background: rgba(30, 41, 59, 1); }
  #lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
  #lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
  #lb-close { right: 16px; top: 16px; }
  #lb-counter {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    color: #8b949e; font-size: 13px; font-weight: 500;
    background: rgba(15, 23, 42, 0.7); padding: 4px 10px; border-radius: 6px;
    border: 1px solid #30363d;
  }
  @media (max-width: 600px) {
    #lb-prev { left: 8px; width: 42px; height: 42px; font-size: 20px; }
    #lb-next { right: 8px; width: 42px; height: 42px; font-size: 20px; }
    #lb-close { right: 8px; top: 8px; width: 42px; height: 42px; font-size: 20px; }
  }

  .feat[data-tip]:not([data-tip=""]) { cursor: help; position: relative; }
  .feat[data-tip]:not([data-tip=""])::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 5px); left: 50%;
    transform: translateX(-50%) translateY(3px);
    background: #0d1117; color: #e6edf3;
    padding: 6px 9px; border-radius: 2px;
    font-size: 11px; font-weight: 400; line-height: 1.35;
    white-space: normal; width: max-content; max-width: 260px;
    border: 1px solid #30363d;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none;
    transition: opacity 0.12s, transform 0.12s;
    z-index: 1000;
    font-style: normal;
  }
  .feat[data-tip]:not([data-tip=""])::before {
    content: ''; position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(1px);
    border: 5px solid transparent;
    border-top-color: #0d1117;
    opacity: 0; pointer-events: none;
    transition: opacity 0.12s, transform 0.12s;
    z-index: 1001;
  }
  .feat[data-tip]:not([data-tip=""]):hover::after,
  .feat[data-tip]:not([data-tip=""]):hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .wear-low   { background: #14532d; color: #86efac; }
  .wear-norm  { background: #21262d; color: #a5d6ff; }
  .wear-high  { background: #713f12; color: #fcd34d; }
  .wear-vhigh { background: #7f1d1d; color: #fca5a5; }

  .history { font-size: 11.5px; color: #8b949e; line-height: 1.4; }

  .note {
    font-size: 12px; color: #e6edf3;
    padding: 6px 10px; background: #0d1117;
    border-left: 3px solid #58a6ff;
    border-radius: 0 4px 4px 0; line-height: 1.4;
  }
  .reason-fail {
    font-size: 12px; color: #fca5a5;
    padding: 5px 9px; background: #450a0a;
    border-radius: 2px;
  }
  .link {
    display: inline-block; margin-top: 0;
    font-size: 12px; color: #79c0ff;
    text-decoration: none;
  }
  .link:hover { text-decoration: underline; }

  @media (max-width: 1100px) {
    .page-layout { grid-template-columns: 1fr; }
    .controls { position: static; max-height: none; }
  }

  @media (max-width: 600px) {
    .top-row { flex-direction: column; gap: 6px; }
    .top-row .gallery-link { padding-top: 0; }
  }

  /* === MOBILE: collapsible controls panel === */
  /* На мобилке `.controls` работает как <details> через скрытый чекбокс. */
  .controls-toggle { display: none; }
  .controls-toggle-label { display: none; }

  @media (max-width: 900px) {
    body {
      padding: 8px 10px 28px;
      font-size: 13px;
    }
    .grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
    .notes-body {
      columns: 1;
      padding: 6px 14px 12px 18px;
      font-size: 12px;
    }
    .notes-panel summary { padding: 9px 12px; font-size: 12.5px; }

    /* Фильтр-панель — сворачиваемая по клику на label-кнопку */
    .controls {
      padding: 0;
      gap: 0;
    }
    .controls-toggle-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 9px 12px;
      cursor: pointer;
      user-select: none;
      font-size: 12.5px;
      font-weight: 600;
      color: #a5d6ff;
      background: #0d1117;
    }
    .controls-toggle-label::after {
      content: '▾';
      color: #6e7681;
      transition: transform 0.15s;
    }
    .controls-toggle:checked ~ .controls-toggle-label::after {
      transform: rotate(-180deg);
    }
    .controls-toggle-label .filter-summary {
      color: #6e7681;
      font-weight: 400;
      font-size: 11px;
      margin-left: 8px;
    }
    .controls-toggle:not(:checked) ~ .controls-groups {
      display: none;
    }
    .controls-groups {
      padding: 4px 10px 10px;
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .controls-group { padding: 6px 0 7px; }
    .filter-chip { font-size: 11px; padding: 3px 8px; }
    .feats-group .filter-chip { font-size: 10.5px; padding: 3px 7px; }
    .model-chip { font-size: 10px; padding: 3px 7px; }

    .card { padding: 9px 11px; }
    .photos img { height: 110px; }
  }

  @media (max-width: 700px) {
    .grid { grid-template-columns: 1fr; gap: 9px; }
    .photos img { height: 150px; }
    .card-top { grid-template-columns: 1fr; gap: 6px; }
    .price-box {
      align-items: flex-start;
      text-align: left;
      flex-direction: row;
      gap: 10px;
    }
    .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fact:nth-child(2) { border-right: 0; padding-right: 0; }
    .fact:nth-child(3) { padding-left: 0; }
  }

  @media (max-width: 480px) {
    body {
      padding: 6px 8px 24px;
      font-size: 12.5px;
    }
    .photos img { height: 130px; }
    .card { padding: 8px 10px; gap: 6px; }
    .brand { font-size: 14px; }
    .version { font-size: 11.5px; }
    .price { font-size: 14.5px; }
    .fact-value { font-size: 11.5px; }
    .card-section { gap: 4px; }
    .spec-items { flex-basis: 200px; font-size: 11.5px; }
    .option-row { padding-left: 6px; }
    .feat { font-size: 10px; padding: 1px 6px; }
    /* На очень узких экранах подсказки-tooltips уезжают за край — отключаем,
       пользователь и так не может ховером пользоваться */
    .feat[data-tip]:not([data-tip=""])::after,
    .feat[data-tip]:not([data-tip=""])::before {
      display: none;
    }
    .notes-body { padding: 6px 10px 10px 14px; }
  }