/* ============================================================
   ГЛАВНАЯ v428: «Что изменилось» плитками. Каждое изменение — плитка в
   три строки (что · что случилось · центр, кто, когда); плиток в ряду
   столько, сколько влезает. Всё замкнуто на .hch-*.
   ============================================================ */

/* Окно «Весь обзор» живёт вне главной, где заданы цвета .home3. */
.hch-overview { --home3-wine: #8f163f; --home3-wine-soft: #f7e9ee; }
[data-theme=dark] .hch-overview { --home3-wine: #e88ca5; --home3-wine-soft: rgba(160, 28, 76, .2); }

/* ---- Шапка карточки ---- */
.hch-head { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.hch-head .home3-header-link { margin-left: 2px; padding: 4px 0; cursor: pointer; }
.hch-fresh {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border: 0; border-radius: 999px; background: var(--home3-wine-soft); color: var(--home3-wine);
  font: inherit; font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.hch-fresh:hover { background: var(--home3-wine); color: #fff; }
.hch-refresh {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 6px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-card);
  color: var(--muted); cursor: pointer;
}
.hch-refresh:hover:not(:disabled) { border-color: var(--home3-wine); color: var(--home3-wine); }
.hch-refresh:disabled { cursor: default; opacity: .6; }
.hch-refresh:disabled .home-ico { animation: hch-spin 1s linear infinite; }
@keyframes hch-spin { to { transform: rotate(360deg); } }

/* ---- Плитки ---- */
.hch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 8px; align-content: start;
}
.hch-tile {
  --c: var(--home3-wine);
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: stretch; gap: 10px;
  min-width: 0; min-height: 0; margin: 0; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-card);
  color: var(--text); font: inherit; text-align: left; white-space: normal; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.hch-tile[hidden] { display: none; }
.hch-tile:hover, .hch-tile:focus-visible {
  border-color: color-mix(in srgb, var(--c) 55%, var(--line));
  background: color-mix(in srgb, var(--c) 6%, var(--surface-card));
}
.hch-ico {
  display: grid; place-items: center; align-self: start; width: 30px; height: 30px; padding: 6px; border-radius: 9px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface-card)); color: var(--c);
}
/* Нижняя строка прижата книзу: в ряду плитки одной высоты, и время с
   центром стоят на одном уровне, даже если суть уместилась в строку. */
.hch-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hch-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hch-title b { overflow: hidden; font-size: 12.5px; font-weight: 750; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.hch-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--home3-wine); }
.hch-what {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 12px; line-height: 1.35; overflow-wrap: anywhere;
}
.hch-meta { margin-top: auto; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.hch-meta b { color: var(--c); font-weight: 750; }

/* Низкая карточка: одна строка плиток, без лишних отступов. */
.home4 .home-w[data-h="0.5"] .hch-tile { padding: 6px 10px; }
.home4 .home-w[data-h="0.5"] .hch-what { -webkit-line-clamp: 1; }

/* ---- «Весь обзор» ---- */
dialog:has(.hch-overview) { width: min(1000px, calc(100% - 32px)); }
.hch-overview > .hch-grid { margin-top: 14px; }
.hch-overview .hch-what { -webkit-line-clamp: 4; }

@media (max-width: 760px) {
  .hch-head { gap: 6px; }
  .hch-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hch-refresh:disabled .home-ico { animation: none; }
}
