/**
 * Мобильная полировка Кейпоп — читаемая статья, нормальный hero, лента без «гигантских» карточек.
 */

/* ── Header ── */
@media (max-width: 640px) {
  .brand-tagline {
    display: none;
  }

  .brand-link strong {
    font-size: 1.05rem;
  }

  .site-header .inner {
    min-height: 52px;
    gap: 0.4rem;
  }

  .nav-tools {
    gap: 0.1rem;
  }
}

/* ── Home promo: на узком экране только открытая панель на всю ширину ── */
@media (max-width: 720px) {
  .home-promo.wrap {
    padding-top: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
  }

  .home-promo__acc {
    --promo-closed: 0px;
    --promo-gap: 0px;
    height: 210px;
  }

  .home-promo__panel {
    border-radius: 16px;
  }

  .home-promo__panel:not(.is-open) {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  .home-promo__panel.is-open {
    display: block !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .home-promo__vlabel,
  .home-promo__peek {
    display: none !important;
  }

  .home-promo__copy {
    max-width: 92% !important;
    padding: 14px 14px 48px !important;
  }

  .home-promo__title {
    font-size: 1.05rem !important;
    -webkit-line-clamp: 3;
  }

  .home-promo__sum {
    font-size: 0.78rem !important;
    -webkit-line-clamp: 2;
  }
}

/* ── Лента: компактные карточки ── */
@media (max-width: 640px) {
  .feed-section {
    padding-top: 0.75rem;
    padding-bottom: 1.75rem;
  }

  .feed-header {
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
  }

  .feed-title {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .feed-settings {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .feed-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .news-card,
  .news-card--wide,
  .news-card--overlay,
  .news-card--wide-overlay {
    grid-column: span 1 !important;
    min-height: 0 !important;
  }

  .news-card--overlay,
  .news-card--wide-overlay {
    min-height: 168px !important;
    max-height: 200px;
  }

  .news-card__thumb {
    aspect-ratio: 16 / 9;
  }

  .news-card__body,
  .news-card__text-body {
    padding: 0.7rem 0.85rem 0.85rem;
  }

  .news-card__title {
    font-size: 0.9rem;
  }

  .news-card--wide .news-card__title {
    font-size: 0.95rem;
  }

  .feed-pagination {
    gap: 0.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
  }

  .liquid-btn--page {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
}

/* ── Статья ── */
@media (max-width: 640px) {
  .article-page {
    padding: 0.65rem 0 2rem;
  }

  .article-layout.wrap {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .article-main {
    padding: 1rem 0.95rem 1.35rem !important;
    border-radius: 14px;
  }

  .article-main h1 {
    font-size: 1.35rem !important;
    line-height: 1.28 !important;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem !important;
  }

  .article-cat-badge {
    margin-bottom: 0.55rem;
  }

  .article-meta-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
  }

  .article-meta-row__left {
    width: 100%;
    gap: 0.45rem 0.85rem !important;
  }

  .article-views {
    margin-left: 0 !important;
  }

  .article-subscribe {
    margin: 0;
  }

  h2.article-lead {
    font-size: 0.98rem !important;
    line-height: 1.45 !important;
    margin: 0.85rem 0 1rem !important;
  }

  .article-cover-wrap {
    margin: 0 0 1rem;
    border-radius: 10px;
    overflow: hidden;
  }

  .article-cover-wrap .tilted-card-figure--cover,
  .article-cover-wrap .tilted-card-img,
  .article-cover {
    max-height: 240px !important;
    border-radius: 10px;
    object-fit: cover !important;
  }

  .prose p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .article-related {
    margin-top: 0.35rem;
    padding-top: 1.15rem;
  }

  .article-related__title,
  .article-sidebar__title {
    font-size: 1rem;
  }

  .article-related__card {
    padding: 0.85rem 0.95rem;
  }

  .article-sidebar {
    position: static !important;
    padding: 1rem 0.95rem;
  }

  .article-more {
    margin-top: 1.15rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .article-more__title {
    font-size: 1.1rem;
  }

  .article-more__grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  .breadcrumbs {
    font-size: 0.78rem;
    margin-bottom: 0.85rem;
  }
}

/* ── Мелкий экран: ещё плотнее ── */
@media (max-width: 380px) {
  .article-main h1 {
    font-size: 1.22rem !important;
  }

  .home-promo__acc {
    height: 190px;
  }
}

/* Горизонтальный скролл страницы — нет */
html,
body {
  overflow-x: clip;
  max-width: 100%;
}

img,
video,
iframe {
  max-width: 100%;
}
