/**
 * Tablet 2-col only (768–1023.98): photo posts match video post height in a row.
 * Photos were 1:1 / 243px; video media is 3:4 — the row looked uneven.
 *
 * Phone ≤767.98 and PC/3-col ≥1024 untouched.
 * Scope: index feed tab «Лента». Does not edit custom.css / mobile-card-fixes / footer.php.
 */
@media (min-width: 768px) and (max-width: 1023.98px) {
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts {
    align-items: start !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part) {
    display: flex !important;
    flex-direction: column !important;
    align-self: start !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full):not(.index__post_be-part) > .card.user-slide:not(.cotinder-lucky-wheel) {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full) > .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > .card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full) > .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > a.card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full) > .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > .card__media-wrap.card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full) > .card.user-slide.card__video > .card__media-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_feed-banner):not(.index__post_curator-advice):not(.index__post_full) > .card.user-slide.card__video > .card-img-wrap {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) .card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) .card__gallery-swiper img.card-img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video) .card__media-wrap--gallery .card__gallery-swiper,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video) .card__media-wrap--gallery .swiper-wrapper,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video) .card__media-wrap--gallery .swiper-slide,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide:not(.card__video) .card__media-wrap--gallery .swiper-slide > a {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide.card__video video,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post .card.user-slide.card__video .bg-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post > .card.user-slide > .card-desc,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post > .card.user-slide > .card-stars__wrapper,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post > .card.user-slide > .card-likes {
    flex: 0 0 auto !important;
  }
}
