/* Natural Japanese wrapping. No copy is changed at runtime. */
:where(
  .page-shell h1,
  .page-shell h2,
  .page-shell h3,
  .page-shell h4,
  .insights-item h2,
  .insights-item h4,
  .service-entry > h2,
  .term-section h2
) {
  white-space: normal;
  overflow-wrap: normal;
  line-break: strict;
  text-wrap: balance;
  word-break: normal;
}

@supports (word-break: auto-phrase) {
  :where(
    .page-shell h1,
    .page-shell h2,
    .page-shell h3,
    .page-shell h4,
    .insights-item h2,
    .insights-item h4,
    .service-entry > h2,
    .term-section h2,
    .page-shell .hero-lead p,
    .page-shell .body-copy p,
    .article-summary,
    .article-body p,
    .insights-item p:not(.insights-item__meta),
    .page-shell--contact .faq-list dd,
    .page-shell--terms .term-row[href="/terms/cash-conversion-cycle/"] strong,
    .page-shell--terms .term-row small,
    .page-shell--results .results-section__intro > p,
    .page-shell--results .results-domain p,
    .page-shell--results .results-metric dd,
    .page-shell--results .results-review__copy p,
    .page-shell--results .results-connection p,
    .page-shell--results .results-case p,
    .page-shell--services .service-practice dd,
    .page-shell--services .service-checkpoints li,
    .page-shell--services .service-note p,
    .page-shell--services .service-support-copy p
  ) {
    word-break: auto-phrase;
  }

  .page-shell--decision .sub-hero .hero-lead p,
  html:has(> head > link[rel="canonical"][href="https://manapartners.co.jp/terms/cash-conversion-cycle/"]) .term-side dd {
    word-break: auto-phrase;
    overflow-wrap: normal;
  }
}

html:has(> head > link[rel="canonical"][href="https://manapartners.co.jp/insights/website-renewal/"]) .article-hero h1 {
  word-break: keep-all;
  overflow-wrap: normal;
}

.page-shell--company .facts .company-address {
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}

:where(
  .page-shell .hero-lead p,
  .page-shell .body-copy p,
  .article-body p,
  .insights-item p:not(.insights-item__meta)
) {
  text-wrap: pretty;
  line-break: strict;
}

:where(
  .faq-list dt,
  .article-body li,
  .article-related li,
  .page-shell--terms .terms-hero h1
) {
  text-wrap: pretty;
  line-break: strict;
}

.term-side dd {
  text-wrap: balance;
  line-break: strict;
}

@supports (word-break: auto-phrase) {
  :where(
    .faq-list dt,
    .article-body li,
    .article-related li,
    .page-shell--terms .terms-hero h1
  ) {
    word-break: auto-phrase;
  }
}

/* Functional pages: remove promotional first-view prose before first paint. */
.page-shell--contact .sub-hero .hero-lead,
.page-shell--terms:not(.term-page) .terms-hero .hero-lead,
.page-shell--terms .terms-intro,
.page-shell--terms .terms-search-panel > div:first-child,
.page-shell--terms > section.section.narrow:last-of-type {
  display: none;
}

.page-shell--contact .sub-hero #hero-title,
.page-shell--terms:not(.term-page) .terms-hero #hero-title {
  font-size: 0;
  line-height: 1.08;
}

.page-shell--contact .sub-hero #hero-title::after,
.page-shell--terms:not(.term-page) .terms-hero #hero-title::after {
  display: block;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 1.08;
}

.page-shell--contact .sub-hero #hero-title::after {
  content: "お問い合わせ";
}

.page-shell--terms:not(.term-page) .terms-hero #hero-title::after {
  content: "用語集";
}

.page-shell--terms .terms-search-panel {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .hero-inner,
  .section-inner,
  .hero-copy,
  .hero-lead,
  .hero-visual,
  .home-news-visual,
  .section-header,
  .home-news-grid,
  .home-news-intro,
  .insights-index-grid {
    min-width: 0;
    max-width: 100%;
  }

  .hero-visual {
    width: 100%;
  }

  .sub-hero h1,
  .sub-hero .hero-lead,
  .sub-hero .hero-lead p {
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .page-shell--services .hero-lead p,
  .page-shell--services .service-index__name,
  .page-shell--services .service-entry > h2 {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .page-shell--services .service-index__name {
    text-wrap: balance;
  }

  .page-shell--services .service-index .service-theme--cost .service-index__name {
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .page-shell--services .services-intro .section-inner,
  .page-shell--services .service-index,
  .page-shell--services .services-detail .section-inner,
  .page-shell--services .service-entry,
  .page-shell--services .service-entry__content,
  .page-shell--services .service-body {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .sub-hero .hero-visual img,
  .home-news-visual img,
  .insights-visual img {
    width: 100%;
    height: clamp(170px, 56vw, 220px);
    min-height: 0;
    object-fit: cover;
  }
}

.page-shell--services .service-wrap-unit {
  white-space: nowrap;
}

.page-shell .natural-wrap-unit {
  display: inline;
  white-space: nowrap;
}

html:has(> head > link[rel="canonical"][href="https://manapartners.co.jp/terms/due-diligence/"]) #content-section-2 p {
  text-wrap: balance;
}

@supports (word-break: auto-phrase) {
  .page-shell--terms .term-category-list small,
  .page-shell--contact #contact-message::placeholder {
    word-break: auto-phrase;
    overflow-wrap: normal;
    line-break: strict;
  }

  .term-page .terms-hero h1,
  .term-page .terms-hero .hero-lead p,
  .page-shell--contact .faq-list dd,
  .page-shell--contact .consent-field > span,
  .page-shell--contact #contact-message-note {
    word-break: auto-phrase;
    overflow-wrap: normal;
    line-break: strict;
    text-wrap: pretty;
  }

  .page-shell--philosophy .sub-hero .hero-lead p,
  .page-shell--representative .sub-hero .hero-lead p,
  .page-shell--results .sub-hero .hero-lead p,
  .home-news-intro .section-note,
  .page-shell--terms .term-row[href="/terms/net-asset-approach/"] strong {
    word-break: auto-phrase;
    overflow-wrap: normal;
  }

  .page-shell--services .service-entry.service-theme--cost > h2 {
    word-break: keep-all;
    overflow-wrap: normal;
  }
}

@media (max-width: 900px) {
  @supports (word-break: auto-phrase) {
    .page-shell--philosophy .sub-hero h1 {
      word-break: auto-phrase;
      overflow-wrap: normal;
    }
  }
}

@media (min-width: 901px) {
  .page-shell--philosophy .sub-hero--ambient .hero-visual {
    position: relative;
    inset: auto;
    align-self: center;
  }

  .page-shell--philosophy .sub-hero--ambient .hero-visual img {
    height: auto;
  }

  .page-shell--results .sub-hero--city .hero-visual {
    position: relative;
    inset: auto;
    align-self: center;
  }

  .page-shell--results .sub-hero--city .hero-visual img {
    height: auto;
  }
}
