/* MEMBERSHIPS_ULTRACOMPACT_V99 — Cuotas must feel like a compact mobile app, not stacked giant cards */
body[data-screen="memberships"] #screen-memberships {
  padding-bottom: calc(4.9rem + env(safe-area-inset-bottom)) !important;
}

body[data-screen="memberships"] #screen-memberships .module-screen-head {
  margin-bottom: .38rem !important;
}

body[data-screen="memberships"] #screen-memberships .module-screen-head h3 {
  font-size: 1.05rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] #screen-memberships .module-screen-head p {
  font-size: .72rem !important;
  line-height: 1.2 !important;
}

body[data-screen="memberships"] .membership-experience {
  gap: .34rem !important;
  margin-bottom: .35rem !important;
}

/* Active plan: short summary card */
body[data-screen="memberships"] .membership-active-card {
  min-height: 0 !important;
  gap: .14rem !important;
  padding: .52rem .68rem !important;
  border-radius: .78rem !important;
  box-shadow: 0 .18rem .65rem rgba(64,45,15,.045) !important;
}

body[data-screen="memberships"] .membership-active-kicker {
  font-size: .59rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-active-card > strong {
  max-width: calc(100% - 4rem) !important;
  font-size: .94rem !important;
  line-height: 1.05 !important;
  margin-top: .05rem !important;
}

body[data-screen="memberships"] .membership-price {
  margin: .03rem 0 .08rem !important;
  font-size: 1.12rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-price small {
  font-size: .62rem !important;
}

body[data-screen="memberships"] .membership-state-pill {
  min-height: 1.35rem !important;
  padding: .16rem .38rem !important;
  font-size: .56rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-card-watermark {
  right: -.25rem !important;
  top: .35rem !important;
  width: 4rem !important;
  height: 4rem !important;
  opacity: .085 !important;
}

body[data-screen="memberships"] .membership-card-divider {
  display: none !important;
}

body[data-screen="memberships"] .membership-active-meta {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .28rem !important;
  margin-top: .16rem !important;
}

body[data-screen="memberships"] .membership-active-meta > span {
  min-height: 1.8rem !important;
  padding: .24rem .34rem !important;
  border-radius: .5rem !important;
}

body[data-screen="memberships"] .membership-active-meta small {
  font-size: .53rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-active-meta em {
  margin-top: .05rem !important;
  font-size: .64rem !important;
  line-height: 1.05 !important;
}

/* Plans: compact rows/cards, not giant panels */
body[data-screen="memberships"] #membershipPlans {
  gap: .34rem !important;
}

body[data-screen="memberships"] .membership-plan-card {
  position: relative !important;
  min-height: 0 !important;
  gap: .22rem !important;
  padding: .5rem .62rem !important;
  border-radius: .76rem !important;
  box-shadow: 0 .16rem .6rem rgba(64,45,15,.035) !important;
}

body[data-screen="memberships"] .membership-plan-card.is-popular {
  border-width: 1px !important;
}

body[data-screen="memberships"] .membership-plan-head {
  display: grid !important;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: .42rem !important;
  min-height: 2.1rem !important;
}

body[data-screen="memberships"] .membership-plan-icon {
  width: 2.1rem !important;
  height: 2.1rem !important;
  min-width: 2.1rem !important;
  border-radius: 999px !important;
}

body[data-screen="memberships"] .membership-plan-head h3 {
  margin: 0 !important;
  font-size: .87rem !important;
  line-height: 1.03 !important;
}

body[data-screen="memberships"] .membership-plan-head p {
  margin: .07rem 0 0 !important;
  font-size: .66rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-plan-head p strong {
  font-size: .82rem !important;
}

body[data-screen="memberships"] .membership-plan-description {
  margin: 0 0 .02rem 2.52rem !important;
  max-width: calc(100% - 2.52rem) !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
  font-size: .65rem !important;
  line-height: 1.2 !important;
  min-height: 0 !important;
}

body[data-screen="memberships"] .membership-plan-description.is-expanded {
  -webkit-line-clamp: 2 !important;
}

body[data-screen="memberships"] .membership-feature-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: .22rem !important;
  margin: .08rem 0 0 2.52rem !important;
  max-width: calc(100% - 2.52rem) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch;
}

body[data-screen="memberships"] .membership-feature-chips::-webkit-scrollbar {
  display: none !important;
}

body[data-screen="memberships"] .membership-feature-chips > span {
  flex: 0 0 auto !important;
  min-height: 1.42rem !important;
  padding: .18rem .35rem !important;
  border-radius: 999px !important;
  font-size: .57rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-feature-chips i,
body[data-screen="memberships"] .membership-chip-icon {
  transform: scale(.78) !important;
  transform-origin: center !important;
}

body[data-screen="memberships"] .membership-plan-action {
  min-height: 2rem !important;
  height: 2rem !important;
  margin-top: .12rem !important;
  padding: 0 .65rem !important;
  border-radius: .58rem !important;
  font-size: .65rem !important;
  line-height: 1 !important;
}

body[data-screen="memberships"] .membership-plan-card > button:not(.membership-plan-action) {
  min-height: 0 !important;
}

/* Keep secondary links compact too */
body[data-screen="memberships"] #paymentList {
  gap: .34rem !important;
  margin-top: .38rem !important;
}

body[data-screen="memberships"] #paymentList .membership-link-card {
  min-height: 3.25rem !important;
  padding: .42rem .5rem !important;
  border-radius: .72rem !important;
}

body[data-screen="memberships"] .membership-link-icon {
  width: 1.72rem !important;
  height: 1.72rem !important;
  min-width: 1.72rem !important;
}

body[data-screen="memberships"] .membership-link-card strong {
  font-size: .7rem !important;
}

body[data-screen="memberships"] .membership-link-card small {
  font-size: .57rem !important;
}

@media (max-width: 390px) {
  body[data-screen="memberships"] .membership-plan-card {
    padding-inline: .52rem !important;
  }
  body[data-screen="memberships"] .membership-plan-head h3 {
    font-size: .82rem !important;
  }
  body[data-screen="memberships"] .membership-plan-description,
  body[data-screen="memberships"] .membership-feature-chips {
    margin-left: 2.42rem !important;
    max-width: calc(100% - 2.42rem) !important;
  }
}
