/* 日本語の自然な改行（禁則処理・文節単位） */
html {
  line-break: strict;
  overflow-wrap: break-word;
}

body {
  line-break: strict;
  overflow-wrap: break-word;
  word-break: keep-all;
  letter-spacing: 0.02em;
  text-wrap: pretty;
  -webkit-text-size-adjust: 100%;
}

@supports (word-break: auto-phrase) {
  body {
    word-break: auto-phrase;
  }
}

h1, h2, h3, h4,
.p-mainVisual__slideTitle,
.c-postTitle,
.p-postList__title,
.kumamoto-earthquake-message__title {
  line-break: strict;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}

@supports (word-break: auto-phrase) {
  h1, h2, h3, h4,
  .p-mainVisual__slideTitle,
  .c-postTitle,
  .p-postList__title,
  .kumamoto-earthquake-message__title {
    word-break: auto-phrase;
  }
}

p, li, dd, dt,
.post_content,
.post_content p,
.post_content li,
.address-info p,
.footer-section,
.nav-section li a,
.kumamoto-earthquake-message__text {
  line-break: strict;
  overflow-wrap: break-word;
  word-break: keep-all;
  text-wrap: pretty;
}

@supports (word-break: auto-phrase) {
  p, li, dd, dt,
  .post_content,
  .post_content p,
  .post_content li,
  .address-info p,
  .footer-section,
  .nav-section li a,
  .kumamoto-earthquake-message__text {
    word-break: auto-phrase;
  }
}

a[href^="mailto:"],
a[href^="tel:"] {
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

/* SWELL テーマの table { word-break: break-all } を上書き */
.post_content table td,
.post_content table th,
.wp-block-table td,
.wp-block-table th,
table td,
table th {
  line-break: strict;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: keep-all;
}

@supports (word-break: auto-phrase) {
  .post_content table td,
  .post_content table th,
  .wp-block-table td,
  .wp-block-table th,
  table td,
  table th {
    word-break: auto-phrase;
  }
}

/* 意図した改行のみ表示（トップの見出しなど） */
br.mobile-break {
  display: none;
}

@media (max-width: 600px) {
  br.mobile-break {
    display: inline;
  }

  a[href^="mailto:"],
  a[href^="tel:"] {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* フッター内テキストは狭い画面でも折り返す */
.jbf-name-main,
.jbf-name-sub,
.jbf-text-block,
.address-info,
.contact-item {
  white-space: normal !important;
}

/* フッターを既存サイト同様に画面全幅へ */
.l-footer,
.l-footer__inner,
.l-footer__widgetArea {
  width: 100%;
  max-width: none;
}

.l-footer__widgetArea > .l-container.w-footer {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.l-footer .w-footer__box,
.l-footer .c-widget,
.l-footer .custom-html-widget,
.l-footer .textwidget {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.l-footer .footer {
  width: 100%;
  box-sizing: border-box;
}

.l-footer__foot > .l-container {
  max-width: 1200px;
}

/* サイト内検索 */
.p-searchPage__form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 32px;
}

.p-searchPage__form .c-searchForm__s {
  flex: 1 1 auto;
  min-width: 0;
}

.p-searchPage__meta {
  margin: 0 0 20px;
  color: #666;
  text-align: center;
}

.p-searchPage__empty {
  margin: 24px 0;
  padding: 24px;
  text-align: center;
  background: #f7f7f7;
  border-radius: 4px;
}

.p-searchPage__results .p-postList__link {
  display: block;
}

.p-searchPage__url {
  color: #777;
  font-size: 0.85em;
}

.p-searchPage__results mark {
  background: #fcf69f;
  color: inherit;
  padding: 0 2px;
}
