@media (max-width: 760px) {
    .site-header__inner, .page-layout, .site-footer__inner { width: min(100% - 24px, 700px); }
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-footer__links { grid-template-columns: 1fr; gap: 22px; }
    .page-layout { display: block; padding-top: 22px; }
    .sidebar { position: static; margin-bottom: 26px; }
    .category-navigation { position: static; width: auto; height: auto; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
    .category-navigation__header { margin: 0; }
    .category-navigation__header h2 { display: none; }
    .category-navigation__panel[hidden] { display: none; }
    .category-navigation__panel { position: fixed; right: 12px; bottom: 72px; z-index: 901; width: min(340px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; margin: 0; padding: 18px; background: rgba(255, 255, 255, .98); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
    .floating-category-button { position: fixed; right: 12px; bottom: 12px; z-index: 902; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
    .to-top { right: 12px; bottom: 72px; }
    .category-menu a { padding: 11px 10px; }
    .category-menu li { margin: 0; }
}

@media (max-width: 760px) {
    .site-header__inner { min-height: 56px; }
    .user-nav { display: flex; gap: 10px; font-size: var(--text-base); }
    .user-nav > span { display: none; }
    .hero { padding: 26px 22px; }
    .hero-actions { gap: 13px 18px; }
    .hero-actions__right { gap: 13px 18px; }
    .site-footer__bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
    .category-heading { display: block; }
    .category-counts { margin-top: 3px; }
    .cab-sortbar .category-templates-form { margin-left: 0; }
    /* Компактные кнопки подрубрик (рубрика с картинками): по несколько в ряд, над текстом рубрики. */
    .subcat-block--compact { display: block; margin: 14px 0 4px; }
    .subcat-block--compact .subcat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
    .subcat-block--compact .subcat-card { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 0; padding: 9px 12px; border-radius: var(--radius-md); box-shadow: none; }
    .subcat-block--compact .subcat-card__name { font-size: var(--text-base); font-weight: 600; }
    .subcat-block--compact .subcat-card__count { font-size: var(--text-sm); }
    .feed-tabs { overflow-x: auto; }
    .feed-tab { white-space: nowrap; }
    .floating-category-menu { display: block; right: 12px; bottom: 12px; }
    .floating-category-button { width: 48px; height: 48px; border-radius: var(--radius-md); }
    .floating-category-panel { right: -2px; bottom: 60px; width: min(340px, calc(100vw - 24px)); max-height: 70vh; padding: 18px; border-radius: var(--radius-lg); }
    .floating-category-panel a { padding: 11px 10px; }
    .modal-dialog { width: calc(100% - 16px); max-height: calc(100vh - 8px); margin: 4px auto; }
    .modal-body { padding: 15px; }
    .image-card__meta { display: block; }
    .image-card__stats { margin-top: 9px; }
    /* «Спасибо» и «скачать» — в один столбец строго по центру. */
    .greet-view__acts { grid-template-columns: 1fr; justify-items: center; }
    .greet-view__acts-side { display: none; }
    .greet-thanks-col { width: 100%; }
    .greet-download { justify-self: center; }
}
