/* Нижнее меню блога под большой палец (2026-09-28).
   Мобилка (≤860px): полоса внизу экрана — слева лента тем (листается пальцем вбок), справа кнопка чата.
   Десктоп: ленты нет, чат — плавающая кнопка справа внизу, как на главной.
   Разметку строит blog-bar.js; сам чат (кнопка+панель) — общий assets/chat-widget.js/.css, подключённый
   отдельно на каждой странице. Подключено на всех страницах блога. */

/* ---------- Нижнее меню (только мобилка) ---------- */
.blog-bar__topics { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .blog-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 0;
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-line);
  }
  /* открыт бургер — полоса остаётся, а само меню заканчивается над ней, чтобы низ меню не прятался */
  .site-nav .blog-menu { max-height: calc(100dvh - 100% - 69px - env(safe-area-inset-bottom)); }
  .blog-bar__topics {
    display: block; flex: 1; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* лента уходит под кнопку чата с мягким краем — видно, что её можно листать */
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .blog-bar__topics::-webkit-scrollbar { display: none; }
  .blog-bar__row { display: flex; gap: 8px; width: max-content; padding: 0 28px 0 16px; }
  .bb-chip {
    display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px;
    background: var(--color-ground); border: 1px solid var(--color-line); border-radius: var(--radius-pill);
    font-size: 14px; font-weight: var(--fw-medium, 500); color: var(--color-ink); white-space: nowrap; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .bb-chip:active { background: var(--color-surface); }
  .bb-chip__icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .bb-chip__icon svg { width: 15px; height: 15px; }
  .bb-chip[aria-current="page"] { border: 1.5px solid var(--color-ink); background: var(--color-surface); font-weight: var(--fw-semibold, 600); }
  .bb-chip--all { padding: 0 14px; font-weight: var(--fw-semibold, 600); gap: 6px; }
  .bb-chip--all svg { width: 13px; height: 13px; }
  /* кнопка чата встаёт в полосу справа; открытая панель — полноэкранная поверх всего (chat-widget.css) */
  .blog-bar .chat-widget { position: relative; right: auto; bottom: auto; flex-shrink: 0; }
}
