/* The introductory membership notes are separate items on desktop as well as
   mobile. Preserve the imported responsive breaks everywhere else. */
/* English paragraphs need a readable measure at every viewport, not the
   full-width centred lines designed for short Japanese phrases. */
html:lang(en) #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size {
  max-width: 760px;
  margin-inline: auto;
  white-space: normal !important;
  font-size: clamp(20px, 1.8vw, 28px) !important;
  line-height: 1.65;
  hyphens: none;
  text-wrap: pretty;
}
html:lang(en) #member > .has-beige-background-color > .wp-block-group > p.sp-text-left.has-small-font-size {
  max-width: 840px;
  margin-inline: auto;
  text-align: left;
  font-size: 14px !important;
  line-height: 1.9;
  hyphens: none;
}
@media (max-width: 768px) {
  html:lang(en) #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size {
    text-align: left;
  }
}
html[lang="ja"] #member > .has-beige-background-color > .wp-block-group > p.sp-text-left.has-small-font-size br.sp-br {
  display: inline;
}

/* Share the heading/body/button rows between each pair of cards. Authored
   copy can grow without shifting the neighbouring description or CTA. */
#member .wp-block-group[class*="is-style-membership-plan-"] > p.has-small-font-size {
  margin-top: var(--wp--preset--spacing--70, 34px) !important;
  margin-bottom: var(--wp--preset--spacing--70, 34px) !important;
}
/* Longer translated button labels need room for two lines. */
#member .wp-block-group[class*="is-style-membership-plan-"] .wp-block-button__link {
  line-height: 1.4;
  padding-inline: 14px;
  max-width: 100%;
}
@media (min-width: 769px) {
  @supports (grid-template-rows: subgrid) {
    #member .wp-block-group.is-layout-grid:has(> [class*="is-style-membership-plan-"]) {
      row-gap: 0;
    }
    #member .wp-block-group.is-layout-grid > [class*="is-style-membership-plan-"] {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
      row-gap: 0;
      margin-bottom: 40px;
    }
    #member .wp-block-group[class*="is-style-membership-plan-"] > .wp-block-buttons {
      align-self: end;
    }
  }
}

/* Intro: three quoted lines, a blank line, one membership statement, another
   blank line, then the two-line plan introduction. The imported paragraph has
   nine BRs; suppress only its optional breaks after 会員制 and 会員タイプを. */
html[lang="ja"] #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size {
  white-space: normal !important;
  word-break: normal;
}
html[lang="ja"] #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size br.sp-br {
  display: inline;
}
/* Limit the legacy BR positions to the original nine-break structure. New
   paragraph structures entered through the CMS retain all authored breaks. */
html[lang="ja"] #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size:has(> br:nth-of-type(9)):not(:has(> br:nth-of-type(10))) > br:is(:nth-of-type(5), :nth-of-type(9)) {
  display: none;
}

@media (max-width: 768px) {
  html[lang="ja"] #member > .has-beige-background-color > .wp-block-group > p.sp-nowrap.has-x-large-font-size {
    font-size: clamp(14px, 4.5vw, 21px) !important;
  }
}
