/**
 * Index feed tab «Лента» (?cotinder_tab=last) — 768×1024 and 820–912.
 *
 * Culprit: cotinder-mobile-card-fixes (BODY_END) locks .index__post cards at
 * height/min-height 446px + photo height 243px → squat 2-col cards; advice/banner
 * stay 446 while video rows stretch to ~566 / ~601.
 *
 * Fix: 3:4 photo media + row floor min-height (matches video-card row); advice +
 * mini-banner stretch to same height. Loaded at BODY_END after mobile-card-fixes.
 * Does not edit custom.css / custom.min.css / mobile-card-fixes / footer.php.
 */

@media (min-width: 768px) and (max-width: 768.98px) {
  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts {
    align-items: start !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part),
  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;
    min-height: 0 !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card:not(.card__advice):not(.card__video):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card.user-slide:not(.card__advice):not(.card__video):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part) > .card.user-slide,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    align-self: start !important;
    width: 100% !important;
    box-sizing: border-box !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),
  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 {
    display: flex !important;
    flex-direction: column !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.card__video {
    flex: 0 0 auto !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > .card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .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__post .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__post .card.user-slide.card__video > .card__media-wrap {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card__media-wrap.card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > a.card-img-wrap img.card-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !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(.index__community-card) > .card-desc,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post > .card.user-slide:has(> .card-stars__wrapper .entity-star-rating[data-entity-type="pet"]) > .card-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    line-height: 17px !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice.card__advice_has-link {
    --advice-card-min-h: 0 !important;
    height: 100% !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) {
    position: relative !important;
    min-height: 566px !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) > img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

@media (min-width: 820px) and (max-width: 912.98px) {
  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts {
    align-items: start !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part),
  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;
    min-height: 0 !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card:not(.card__advice):not(.card__video):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card.user-slide:not(.card__advice):not(.card__video):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part) > .card.user-slide,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    align-self: start !important;
    width: 100% !important;
    box-sizing: border-box !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),
  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 {
    display: flex !important;
    flex-direction: column !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.card__video {
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > .card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .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__post .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__post .card.user-slide.card__video > .card__media-wrap {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card__media-wrap.card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > a.card-img-wrap img.card-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !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(.index__community-card) > .card-desc,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post > .card.user-slide:has(> .card-stars__wrapper .entity-star-rating[data-entity-type="pet"]) > .card-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 51px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    line-height: 17px !important;
  }

  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;
    overflow: visible !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice.card__advice_has-link {
    --advice-card-min-h: 0 !important;
    height: 100% !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) {
    position: relative !important;
    min-height: 0 !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) > img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

@media (min-width: 913px) and (max-width: 1024.98px) {
  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts {
    align-items: start !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part),
  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;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card:not(.card__advice):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post > .card.user-slide:not(.card__advice):not(.index__events_event):not(.index__events_article):not(.index__collaborations_card):not(.index__community-card),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part) > .card.user-slide,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post:not(.index__post_full):not(.index__post_be-part) > .card.user-slide.card__video,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_curator-advice > .card.card__advice,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    align-self: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video):not(.cotinder-lucky-wheel) > .card-img-wrap,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .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__post .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__post .card.user-slide.card__video > .card__media-wrap {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card__media-wrap.card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > .card-img-wrap img.card-img,
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__post .card.user-slide:not(.card__video) > a.card-img-wrap img.card-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !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(.index__community-card) > .card-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
  }

  html body .tabs__content.tabs__content_active .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full),
  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) {
    position: relative !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: start !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html body .cotinder-index-feed[data-cotinder-feed-tab="last"] .index__posts > .index__post.index__post_feed-banner:not(.index__post_full) > a.card.card__cotinder:not(.card__cotinder_full) > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}
