/**
 * Phone only (≤767.98): 1 card/row — stack rating ABOVE activity icons.
 * Horizontal one-line layout abandoned (caused overlap / regressions).
 *
 * Does NOT touch tablet ≥768 or PC ≥1200.
 * Does NOT change card height / equal-height rules.
 * Does not edit custom.css / mobile-card-fixes / footer.php.
 */

@media (max-width: 767.98px) {
  /* Wrapper: column stack only */
  html body .index__posts .index__post .card.user-slide:not(.index__events_event):not(.index__events_article):not(.index__collaborations_card) > .card-stars__wrapper,
  html body .index__posts .index__post .user-slide.index__community-card > .card-stars__wrapper,
  html body .profiles-flex__item .card-stars__wrapper,
  html body .another-pet .user-slide > .card-stars__wrapper,
  html.cotinder-in-pwa body .index__posts .index__post .card.user-slide:not(.index__events_event):not(.index__events_article):not(.index__collaborations_card) > .card-stars__wrapper,
  html.cotinder-in-pwa body .index__posts .index__post .user-slide.index__community-card > .card-stars__wrapper,
  html.cotinder-in-pwa body .profiles-flex__item .card-stars__wrapper,
  html.cotinder-in-pwa body .another-pet .user-slide > .card-stars__wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    row-gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* no height / min-height / overflow — protect card equal-height */
  }

  /* Rating — first row */
  html body .index__posts .index__post .card.user-slide .card-stars__wrapper > .entity-star-rating,
  html body .index__posts .index__post .card.user-slide .card-stars__wrapper > .card-stars,
  html body .index__posts .index__post .user-slide.index__community-card .card-stars__wrapper > .entity-star-rating,
  html body .index__posts .index__post .user-slide.index__community-card .card-stars__wrapper > .card-stars,
  html body .profiles-flex__item .card-stars__wrapper > .entity-star-rating,
  html body .profiles-flex__item .card-stars__wrapper > .card-stars,
  html body .another-pet .user-slide > .card-stars__wrapper > .entity-star-rating,
  html body .another-pet .user-slide > .card-stars__wrapper > .card-stars,
  html.cotinder-in-pwa body .index__posts .index__post .card.user-slide .card-stars__wrapper > .entity-star-rating,
  html.cotinder-in-pwa body .index__posts .index__post .card.user-slide .card-stars__wrapper > .card-stars,
  html.cotinder-in-pwa body .profiles-flex__item .card-stars__wrapper > .entity-star-rating,
  html.cotinder-in-pwa body .another-pet .user-slide > .card-stars__wrapper > .entity-star-rating {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    order: 1 !important;
    margin: 0 !important;
  }

  /* Like / comment / share — second row */
  html body .index__posts .index__post .card.user-slide .card-stars__wrapper > .card__buttons,
  html body .index__posts .index__post .user-slide.index__community-card .card-stars__wrapper > .card__buttons,
  html body .profiles-flex__item .card-stars__wrapper > .card__buttons,
  html body .another-pet .user-slide > .card-stars__wrapper > .card__buttons,
  html.cotinder-in-pwa body .index__posts .index__post .card.user-slide .card-stars__wrapper > .card__buttons,
  html.cotinder-in-pwa body .index__posts .index__post .user-slide.index__community-card .card-stars__wrapper > .card__buttons,
  html.cotinder-in-pwa body .profiles-flex__item .card-stars__wrapper > .card__buttons,
  html.cotinder-in-pwa body .another-pet .user-slide > .card-stars__wrapper > .card__buttons {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    order: 2 !important;
    transform: none !important;
  }
}
