/**
 * Tablet air — 768–1199.98px only.
 * Layers 1–4: feed tabs, chrome, home/happytails cards, texts/cabinet.
 * Phone ≤479 (phone-air) and PC ≥1200 unchanged.
 * Does not edit custom.css / mobile-card-fixes / footer.php.
 * Marker: tabletair20260919a
 */

@media (min-width: 768px) and (max-width: 1199.98px) {
  /* ---- 1. Feed tabs: titles only, no slogans ---- */
  html body.page-index .index__tabs,
  html body.page-index .main__index .index__tabs,
  html body .pet .index__tabs--site-feed {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 12px;
  }

  html body.page-index .index__tabs_wrapper,
  html body .pet .index__tabs--site-feed .index__tabs_wrapper {
    overflow: hidden;
    max-width: 100%;
  }

  html body.page-index .index__tabs_tabs,
  html body.page-index .main__index .index__tabs_tabs,
  html body .pet .index__tabs--site-feed .index__tabs_tabs {
    display: flex;
    width: 100%;
    max-width: 100%;
  }

  html body.page-index .index__tabs .index__tabs_btn,
  html body.page-index .main__index .index__tabs_btn,
  html body .pet .index__tabs--site-feed .index__tabs_btn {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0;
    padding: 8px 6px 8px !important;
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
  }

  html body.page-index .index__tabs .index__tabs_title,
  html body.page-index .main__index .index__tabs_title,
  html body .pet .index__tabs--site-feed .index__tabs_title {
    display: block;
    width: 100%;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    text-align: center;
    overflow-wrap: anywhere;
  }

  html body.page-index .index__tabs_text,
  html body.page-index .main__index .index__tabs_text,
  html body .pet .index__tabs--site-feed .index__tabs_text,
  html body .index__tabs .index__tabs_text {
    display: none !important;
  }

  /* ---- 2. Chrome: duplicate title, banners, onboarding, FABs ---- */
  .pet:has(.seo-articles__hero--detail) > .pet__title {
    display: none;
  }

  html body.page-index .main__banner .main__slide--energy .main__slide_left,
  html body.page-index .main__banner .main__slide--sprint .main__slide_left {
    max-width: min(20rem, calc(100% - 48px));
    padding: 12px 14px;
    margin-top: 8px;
  }

  html body.page-index .main__banner .main__slide--energy .main__slide_title,
  html body.page-index .main__banner .main__slide--sprint .main__slide_title {
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  html body.page-index .cotinder-onboarding__card {
    padding: 10px 12px 10px;
  }

  html body.page-index .cotinder-onboarding__head {
    margin-bottom: 8px;
  }

  html body.page-index .cotinder-onboarding__title {
    font-size: 16px;
    margin-bottom: 4px;
  }

  html body.page-index .cotinder-onboarding__steps {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  html body.page-index .cotinder-onboarding__step {
    padding: 6px 8px;
    gap: 6px;
  }

  html body.page-index .cotinder-onboarding__step-text {
    display: none;
  }

  html body.page-index .cotinder-onboarding__step-link {
    margin-top: 4px;
  }

  .cotinder-bug-report__fab-label {
    display: none;
  }

  .cotinder-bug-report__fab {
    left: 10px;
    padding: 6px;
    max-width: 48px;
  }

  body:not(.cotinder-app-promo-dismissed):not(.cotinder-pwa-standalone) .cotinder-app-promo:not([hidden]) {
    padding: 6px 10px;
    gap: 8px;
  }

  .cotinder-energy-page .seo-articles__cover-banner,
  .cotinder-sprint-page .seo-articles__cover-banner {
    margin-bottom: 16px;
  }

  .cotinder-energy-page .seo-articles__cover-banner img,
  .cotinder-sprint-page .seo-articles__cover-banner img {
    aspect-ratio: 16 / 9;
    max-height: 240px;
    object-fit: cover;
    object-position: center 28%;
  }

  .seo-articles__hero--detail {
    padding: 8px 4px 6px;
  }

  .cotinder-energy-page .seo-articles__title,
  .cotinder-sprint-page .seo-articles__title {
    font-size: 1.7rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .cotinder-energy-page .seo-articles__lead,
  .cotinder-sprint-page .seo-articles__lead,
  .seo-articles__lead {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0 18px;
  }

  .cotinder-energy-page .seo-articles__section,
  .cotinder-sprint-page .seo-articles__section,
  .seo-articles__section {
    margin-bottom: 26px;
  }

  /* ---- 3. Pair / together / sprint order ---- */
  html body.page-index .cotinder-paw-home,
  html body.page-index #cotinder-paw-home,
  html body.page-index .cotinder-paw-home--embed {
    padding: 10px 8px 12px;
  }

  html body.page-index .cotinder-paw-home__deck,
  html body.page-index #cotinder-paw-home .cotinder-paw-home__deck {
    padding-right: 0 !important;
  }

  html body.page-index .cotinder-paw-home__more,
  html body.page-index #cotinder-paw-home .cotinder-paw-home__more {
    position: absolute;
    right: 6px;
    top: 42%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    margin: 0;
    display: flex;
    z-index: 4;
  }

  html body.page-index .cotinder-paw-home__more svg {
    width: 48px;
    height: 48px;
  }

  html body.page-index .cotinder-paw-home__col {
    padding: 0;
    border: 0;
    background: transparent;
  }

  html body.page-index .cotinder-paw-home__match-photo {
    aspect-ratio: 1 / 1;
  }

  html body.page-index .cotinder-paw-home__card {
    border-radius: 16px;
  }

  body.cotinder-page-happytails .cotinder-ht-together--main .cotinder-ht-together__card img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="canals"] .index__posts,
  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="comunity"] .index__posts {
    display: flex;
    flex-direction: column;
  }

  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="canals"] .index__posts > .index__post_feed-banner:first-child,
  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="comunity"] .index__posts > .index__post_feed-banner:first-child {
    order: 2;
  }

  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="canals"] .index__posts > .index__post:nth-child(2),
  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="comunity"] .index__posts > .index__post:nth-child(2) {
    order: 1;
  }

  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="canals"] .index__posts > .index__post:nth-child(n+3),
  html body.page-index .cotinder-index-feed[data-cotinder-feed-tab="comunity"] .index__posts > .index__post:nth-child(n+3) {
    order: 3;
  }

  /* ---- 4. Cabinet: keep VIP text, give forms room ---- */
  html body.cotinder-mnav-personal .form-container {
    padding: 16px 14px;
  }

  html body.cotinder-mnav-personal .cabinet-home-tiles {
    gap: 14px;
  }
}

/* Portrait tablet: left icon rail is still on */
@media (min-width: 768px) and (max-width: 1023.98px) {
  html body.cotinder-mnav-personal .pet > .pet__title,
  html body.cotinder-mnav-personal .pet > .breadcrumbs,
  html body:not(.cotinder-mnav-personal) .pet > .pet__title,
  html body:not(.cotinder-mnav-personal) .pet > .breadcrumbs {
    padding-left: calc(var(--cotinder-mnav-rail, 56px) + 12px);
    padding-right: 14px;
    box-sizing: border-box;
  }

  html body.page-index .main__banner .main__swiper,
  html body.page-index .main__banner .main__slide--energy,
  html body.page-index .main__banner .main__slide--sprint {
    min-height: 280px;
  }

  html body #cotinder-mobmenu-fab.cotinder-mobmenu__fab,
  html body .cotinder-mobmenu__fab#cotinder-mobmenu-fab {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.cotinder-page-happytails .cotinder-happytails__card-photos {
    display: block !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  body.cotinder-page-happytails .cotinder-happytails__card-photo-wrap.is-extra,
  body.cotinder-page-happytails .cotinder-happytails__photo-label {
    display: none !important;
  }

  body.cotinder-page-happytails .cotinder-happytails__card-photo-wrap.is-main,
  body.cotinder-page-happytails .cotinder-happytails__card-photo-wrap[data-slot="0"] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
  }
}

@media (min-width: 768px) and (max-width: 819.98px) {
  html body.page-index .cotinder-onboarding__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
