/* Zero Next One BASE NIIKAPPU - Multilingual foundation Phase 1 */

.l-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui, "Inter", sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.l-language-switch__label {
  margin: 0;
  opacity: 0.58;
}

.l-language-switch__list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.l-language-switch__item {
  display: inline-flex;
  align-items: center;
}

.l-language-switch__item + .l-language-switch__item::before {
  content: "/";
  margin-right: 4px;
  opacity: 0.34;
}

.l-language-switch__link,
.l-language-switch__current {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 4px;
  color: inherit;
  text-decoration: none;
}

.l-language-switch__link {
  opacity: 0.56;
  transition: opacity 0.2s ease;
}

.l-language-switch__link:hover,
.l-language-switch__link:focus-visible {
  opacity: 1;
}

.l-language-switch__current {
  opacity: 1;
}

.l-language-switch--header {
  width: min(320px, 100%);
  justify-content: space-between;
  margin: 22px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 240, 0.16);
  color: rgba(255, 250, 240, 0.88);
}

.l-language-switch--footer {
  color: rgba(255, 250, 240, 0.72);
}


@media (max-width: 767px) {
  .l-language-switch--footer {
    width: 100%;
    justify-content: space-between;
    order: 3;
  }
}


@media (min-width: 1024px) {
  .l-site-header__nav {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.9vw, 12px);
  }

  .l-language-switch--header {
    flex: 0 0 auto;
    width: auto;
    margin: 0 0 0 2px;
    padding: 0 0 0 clamp(7px, 0.7vw, 10px);
    border-top: 0;
    border-left: 1px solid currentColor;
    color: inherit;
  }

  .l-language-switch--header .l-language-switch__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .l-language-switch--header .l-language-switch__link,
  .l-language-switch--header .l-language-switch__current {
    min-height: 36px;
    padding-inline: 2px;
    font-size: clamp(0.62rem, 0.64vw, 0.68rem);
  }
}

@media (max-width: 1023px) {
  .l-site-header__nav:not(.is-open) .l-language-switch--header {
    opacity: 0;
    transform: translate3d(0, 4px, 0);
  }

  .l-site-header__nav.is-open .l-language-switch--header {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
      opacity 0.18s ease 0.14s,
      transform 0.18s ease 0.14s;
  }
}


/* Phase 2B.1: English mobile overflow guard (Japanese layout is untouched). */
@media (max-width: 767px) {
  html[lang^="en"] .l-site-footer__nav-list--primary .l-site-footer__nav-link {
    font-size: clamp(0.9rem, 3.75vw, 1.04rem);
    line-height: 1.28;
    letter-spacing: 0.045em;
  }

  html[lang^="en"] .l-site-footer__nav-list--primary .l-site-footer__nav-link > span {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  html[lang^="en"] .l-site-footer__nav-list--primary .l-site-footer__nav-item {
    min-height: 4.8rem;
  }
}

@media (min-width: 390px) and (max-width: 430px) {
  html[lang^="en"] .l-site-footer__nav-list--primary {
    column-gap: 0.8rem;
  }

  html[lang^="en"] .l-site-footer__nav-list--primary .l-site-footer__nav-link {
    font-size: 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   Phase 2D: English responsive typography guard
   Goal: keep Japanese layout intact, but prevent English overflow and
   horizontal scroll on mobile / narrow tablets.
   -------------------------------------------------------------------------- */
html[lang^="en"] {
  overflow-x: hidden;
}

html[lang^="en"] body,
html[lang^="en"] .page-top,
html[lang^="en"] .page-lower {
  overflow-x: hidden;
}

html[lang^="en"] :is(
  .p-top-page,
  .p-lower-page,
  .p-lower-hero__inner,
  .p-lower-section__inner,
  .p-lower-related__list,
  .p-lower-card,
  .p-lower-card__body,
  .p-lower-card__content,
  .p-lower-mini-card,
  .p-lower-mini-card__body,
  [class*="__layout"],
  [class*="__grid"],
  [class*="__content"],
  [class*="__body"],
  [class*="__text"],
  [class*="__copy"]
) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html[lang^="en"] :is(
  .p-home-hero__title,
  .p-brand-message__title,
  .p-features__title,
  .p-camp__title,
  .p-stay__title,
  .p-activities__title,
  .p-scenes__title,
  .p-news__title,
  .p-instagram__title,
  .p-ending__title,
  .p-lower-hero__title,
  .p-lower-section__title,
  .p-lower-related__title,
  .p-lower-related__card-title,
  [class*="hero__title"],
  [class*="section__title"],
  [class*="final__title"],
  [class*="message__title"],
  [class*="concept__title"],
  [class*="place__title"]
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

html[lang^="en"] :is(
  .p-home-hero__title span,
  .p-brand-message__title span,
  .p-features__title span,
  .p-camp__title span,
  .p-stay__title span,
  .p-activities__title span,
  .p-scenes__title span,
  .p-news__title span,
  .p-instagram__title span,
  .p-ending__title span,
  .p-lower-hero__title span,
  .p-lower-section__title span,
  .p-lower-related__card-title span,
  [class*="hero__title"] span,
  [class*="section__title"] span,
  [class*="final__title"] span,
  [class*="message__title"] span,
  [class*="concept__title"] span,
  [class*="place__title"] span
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

html[lang^="en"] :is(
  .p-home-hero__lead,
  .p-brand-message__lead,
  .p-features__lead,
  .p-camp__lead,
  .p-stay__lead,
  .p-activities__lead,
  .p-scenes__lead,
  .p-news__lead,
  .p-instagram__lead,
  .p-ending__lead,
  .p-lower-hero__lead,
  .p-lower-section__lead,
  [class*="hero__lead"],
  [class*="section__lead"],
  [class*="final__lead"],
  [class*="message__lead"]
) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

html[lang^="en"] :is(
  .p-features-card__title,
  .p-camp-feature__title,
  .p-stay-card__title,
  .p-activities-card__title,
  .p-scenes-card__title,
  .p-news-card__title,
  .p-instagram-card__title,
  .p-lower-card__title,
  .p-lower-mini-card__title,
  [class*="card__title"]
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}

@media (max-width: 767px) {
  html[lang^="en"] .page-top :is(
    .p-home-hero__title,
    .p-brand-message__title,
    .p-features__title,
    .p-camp__title,
    .p-stay__title,
    .p-activities__title,
    .p-scenes__title,
    .p-news__title,
    .p-instagram__title,
    .p-ending__title
  ) {
    font-size: clamp(1.84rem, 7.4vw, 2.48rem) !important;
    line-height: 1.22 !important;
    letter-spacing: 0.035em !important;
  }

  html[lang^="en"] .page-top .p-features__title {
    font-size: clamp(1.76rem, 7.1vw, 2.28rem) !important;
  }

  html[lang^="en"] .page-top .p-home-hero__title {
    font-size: clamp(1.92rem, 7.8vw, 2.7rem) !important;
    letter-spacing: 0.03em !important;
  }

  html[lang^="en"] .page-top :is(
    .p-features__lead,
    .p-camp__lead,
    .p-stay__lead,
    .p-activities__lead,
    .p-scenes__lead,
    .p-news__lead,
    .p-instagram__lead,
    .p-ending__lead
  ) {
    font-size: clamp(0.82rem, 3.05vw, 0.94rem) !important;
    line-height: 1.72 !important;
    letter-spacing: 0.02em !important;
  }

  html[lang^="en"] .page-top :is(
    .p-features-card__title,
    .p-camp-feature__title,
    .p-stay-card__title,
    .p-activities-card__title,
    .p-scenes-card__title,
    .p-news-card__title,
    .p-instagram-card__title
  ) {
    font-size: clamp(0.86rem, 3.35vw, 0.98rem) !important;
    line-height: 1.34 !important;
    letter-spacing: 0.02em !important;
  }

  html[lang^="en"] .page-lower :is(
    .p-lower-hero__title,
    [class*="hero__title"],
    [class*="message__title"]
  ) {
    font-size: clamp(1.74rem, 7.3vw, 2.42rem) !important;
    line-height: 1.24 !important;
    letter-spacing: 0.03em !important;
  }

  html[lang^="en"] .page-lower :is(
    .p-lower-section__title,
    .p-about-v14-concept__title,
    .p-about-v14-place__title,
    [class*="section__title"],
    [class*="final__title"],
    [class*="concept__title"],
    [class*="place__title"]
  ) {
    font-size: clamp(1.72rem, 6.9vw, 2.18rem) !important;
    line-height: 1.26 !important;
    letter-spacing: 0.028em !important;
  }

  html[lang^="en"] .page-lower :is(
    .p-lower-card__title,
    .p-lower-mini-card__title,
    [class*="card__title"]
  ) {
    font-size: clamp(0.98rem, 3.7vw, 1.1rem) !important;
    line-height: 1.36 !important;
    letter-spacing: 0.016em !important;
  }

  html[lang^="en"] .page-lower :is(
    .p-lower-hero__lead,
    .p-lower-section__lead,
    [class*="hero__lead"],
    [class*="section__lead"],
    [class*="message__lead"],
    [class*="final__lead"]
  ) {
    font-size: clamp(0.84rem, 3.1vw, 0.94rem) !important;
    line-height: 1.74 !important;
    letter-spacing: 0.02em !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  html[lang^="en"] .page-top :is(
    .p-home-hero__title,
    .p-brand-message__title,
    .p-features__title,
    .p-camp__title,
    .p-stay__title,
    .p-activities__title,
    .p-scenes__title,
    .p-news__title,
    .p-instagram__title,
    .p-ending__title
  ) {
    font-size: clamp(2.22rem, 5.4vw, 3.1rem) !important;
    line-height: 1.24 !important;
    letter-spacing: 0.032em !important;
  }

  html[lang^="en"] .page-lower :is(
    .p-lower-hero__title,
    .p-lower-section__title,
    [class*="hero__title"],
    [class*="section__title"],
    [class*="final__title"],
    [class*="message__title"]
  ) {
    font-size: clamp(2.08rem, 4.8vw, 2.9rem) !important;
    line-height: 1.26 !important;
    letter-spacing: 0.028em !important;
  }
}

/* --------------------------------------------------------------------------
   Phase 3B: Traditional Chinese (Taiwan) typography guard
   - Keeps Japanese and English rendering untouched.
   - Uses Taiwan-friendly system fonts and allows CJK line wrapping where
     Japanese composition rules previously forced one-line spans.
   -------------------------------------------------------------------------- */
html[lang^="zh-Hant"] {
  overflow-x: hidden;
  line-break: strict;
}

html[lang^="zh-Hant"] body,
html[lang^="zh-Hant"] .page-top,
html[lang^="zh-Hant"] .page-lower {
  overflow-x: hidden;
  font-family:
    "PingFang TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    "Noto Sans CJK TC",
    sans-serif;
}

html[lang^="zh-Hant"] :is(
  .p-top-page,
  .p-lower-page,
  .p-lower-hero__inner,
  .p-lower-section__inner,
  .p-lower-related__list,
  .p-lower-card,
  .p-lower-card__body,
  .p-lower-card__content,
  .p-lower-mini-card,
  .p-lower-mini-card__body,
  [class*="__layout"],
  [class*="__grid"],
  [class*="__content"],
  [class*="__body"],
  [class*="__text"],
  [class*="__copy"]
) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html[lang^="zh-Hant"] :is(
  .p-home-hero__title,
  .p-brand-message__title,
  .p-features__title,
  .p-camp__title,
  .p-stay__title,
  .p-activities__title,
  .p-scenes__title,
  .p-news__title,
  .p-instagram__title,
  .p-ending__title,
  .p-lower-hero__title,
  .p-lower-section__title,
  .p-lower-related__title,
  .p-lower-related__card-title,
  [class*="hero__title"],
  [class*="section__title"],
  [class*="final__title"],
  [class*="message__title"],
  [class*="concept__title"],
  [class*="place__title"]
) {
  max-width: 100%;
  font-family:
    "Songti TC",
    "Noto Serif TC",
    "PMingLiU",
    "Noto Serif CJK TC",
    serif;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
  letter-spacing: 0.045em !important;
}

html[lang^="zh-Hant"] :is(
  .p-home-hero__title span,
  .p-brand-message__title span,
  .p-features__title span,
  .p-camp__title span,
  .p-stay__title span,
  .p-activities__title span,
  .p-scenes__title span,
  .p-news__title span,
  .p-instagram__title span,
  .p-ending__title span,
  .p-lower-hero__title span,
  .p-lower-section__title span,
  .p-lower-related__card-title span,
  [class*="hero__title"] span,
  [class*="section__title"] span,
  [class*="final__title"] span,
  [class*="message__title"] span,
  [class*="concept__title"] span,
  [class*="place__title"] span
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
}

html[lang^="zh-Hant"] :is(
  .p-home-hero__lead,
  .p-brand-message__lead,
  .p-features__lead,
  .p-camp__lead,
  .p-stay__lead,
  .p-activities__lead,
  .p-scenes__lead,
  .p-news__lead,
  .p-instagram__lead,
  .p-ending__lead,
  .p-lower-hero__lead,
  .p-lower-section__lead,
  [class*="hero__lead"],
  [class*="section__lead"],
  [class*="final__lead"],
  [class*="message__lead"]
) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  letter-spacing: 0.025em !important;
}

html[lang^="zh-Hant"] :is(
  .p-features-card__title,
  .p-camp-feature__title,
  .p-stay-card__title,
  .p-activities-card__title,
  .p-scenes-card__title,
  .p-news-card__title,
  .p-instagram-card__title,
  .p-lower-card__title,
  .p-lower-mini-card__title,
  [class*="card__title"]
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: pretty;
  letter-spacing: 0.025em !important;
}

html[lang^="zh-Hant"] :is(
  button,
  .c-button,
  .p-lower-button,
  [class*="__button"],
  [class*="__link"]
) {
  word-break: keep-all;
  line-break: strict;
}

@media (max-width: 767px) {
  html[lang^="zh-Hant"] .page-top :is(
    .p-home-hero__title,
    .p-brand-message__title,
    .p-features__title,
    .p-camp__title,
    .p-stay__title,
    .p-activities__title,
    .p-scenes__title,
    .p-news__title,
    .p-instagram__title,
    .p-ending__title
  ) {
    font-size: clamp(1.96rem, 8.1vw, 2.62rem) !important;
    line-height: 1.36 !important;
  }

  html[lang^="zh-Hant"] .page-lower :is(
    .p-lower-hero__title,
    [class*="hero__title"],
    [class*="message__title"]
  ) {
    font-size: clamp(1.86rem, 7.7vw, 2.48rem) !important;
    line-height: 1.38 !important;
  }

  html[lang^="zh-Hant"] .page-lower :is(
    .p-lower-section__title,
    [class*="section__title"],
    [class*="final__title"],
    [class*="concept__title"],
    [class*="place__title"]
  ) {
    font-size: clamp(1.74rem, 7.1vw, 2.24rem) !important;
    line-height: 1.42 !important;
  }

  html[lang^="zh-Hant"] :is(
    .p-home-hero__lead,
    .p-brand-message__lead,
    .p-features__lead,
    .p-camp__lead,
    .p-stay__lead,
    .p-activities__lead,
    .p-scenes__lead,
    .p-news__lead,
    .p-ending__lead,
    .p-lower-hero__lead,
    .p-lower-section__lead,
    [class*="hero__lead"],
    [class*="section__lead"]
  ) {
    font-size: clamp(0.86rem, 3.28vw, 0.98rem) !important;
    line-height: 1.86 !important;
  }
}

/* --------------------------------------------------------------------------
   Phase 3C: Simplified Chinese (Mainland China) typography guard
   - Keeps Japanese and English rendering untouched.
   - Uses Mainland-friendly system fonts and allows CJK line wrapping where
     Japanese composition rules previously forced one-line spans.
   -------------------------------------------------------------------------- */
html[lang^="zh-Hans"] {
  overflow-x: hidden;
  line-break: strict;
}

html[lang^="zh-Hans"] body,
html[lang^="zh-Hans"] .page-top,
html[lang^="zh-Hans"] .page-lower {
  overflow-x: hidden;
  font-family:
    "PingFang SC",
    "Noto Sans SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
}

html[lang^="zh-Hans"] :is(
  .p-top-page,
  .p-lower-page,
  .p-lower-hero__inner,
  .p-lower-section__inner,
  .p-lower-related__list,
  .p-lower-card,
  .p-lower-card__body,
  .p-lower-card__content,
  .p-lower-mini-card,
  .p-lower-mini-card__body,
  [class*="__layout"],
  [class*="__grid"],
  [class*="__content"],
  [class*="__body"],
  [class*="__text"],
  [class*="__copy"]
) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html[lang^="zh-Hans"] :is(
  .p-home-hero__title,
  .p-brand-message__title,
  .p-features__title,
  .p-camp__title,
  .p-stay__title,
  .p-activities__title,
  .p-scenes__title,
  .p-news__title,
  .p-instagram__title,
  .p-ending__title,
  .p-lower-hero__title,
  .p-lower-section__title,
  .p-lower-related__title,
  .p-lower-related__card-title,
  [class*="hero__title"],
  [class*="section__title"],
  [class*="final__title"],
  [class*="message__title"],
  [class*="concept__title"],
  [class*="place__title"]
) {
  max-width: 100%;
  font-family:
    "Songti SC",
    "Noto Serif SC",
    "SimSun",
    "Noto Serif CJK SC",
    serif;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
  letter-spacing: 0.045em !important;
}

html[lang^="zh-Hans"] :is(
  .p-home-hero__title span,
  .p-brand-message__title span,
  .p-features__title span,
  .p-camp__title span,
  .p-stay__title span,
  .p-activities__title span,
  .p-scenes__title span,
  .p-news__title span,
  .p-instagram__title span,
  .p-ending__title span,
  .p-lower-hero__title span,
  .p-lower-section__title span,
  .p-lower-related__card-title span,
  [class*="hero__title"] span,
  [class*="section__title"] span,
  [class*="final__title"] span,
  [class*="message__title"] span,
  [class*="concept__title"] span,
  [class*="place__title"] span
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
}

html[lang^="zh-Hans"] :is(
  .p-home-hero__lead,
  .p-brand-message__lead,
  .p-features__lead,
  .p-camp__lead,
  .p-stay__lead,
  .p-activities__lead,
  .p-scenes__lead,
  .p-news__lead,
  .p-instagram__lead,
  .p-ending__lead,
  .p-lower-hero__lead,
  .p-lower-section__lead,
  [class*="hero__lead"],
  [class*="section__lead"],
  [class*="final__lead"],
  [class*="message__lead"]
) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  letter-spacing: 0.025em !important;
}

html[lang^="zh-Hans"] :is(
  .p-features-card__title,
  .p-camp-feature__title,
  .p-stay-card__title,
  .p-activities-card__title,
  .p-scenes-card__title,
  .p-news-card__title,
  .p-instagram-card__title,
  .p-lower-card__title,
  .p-lower-mini-card__title,
  [class*="card__title"]
) {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  text-wrap: pretty;
  letter-spacing: 0.025em !important;
}

html[lang^="zh-Hans"] :is(
  button,
  .c-button,
  .p-lower-button,
  [class*="__button"],
  [class*="__link"]
) {
  word-break: keep-all;
  line-break: strict;
}

@media (max-width: 767px) {
  html[lang^="zh-Hans"] .page-top :is(
    .p-home-hero__title,
    .p-brand-message__title,
    .p-features__title,
    .p-camp__title,
    .p-stay__title,
    .p-activities__title,
    .p-scenes__title,
    .p-news__title,
    .p-instagram__title,
    .p-ending__title
  ) {
    font-size: clamp(1.96rem, 8.1vw, 2.62rem) !important;
    line-height: 1.36 !important;
  }

  html[lang^="zh-Hans"] .page-lower :is(
    .p-lower-hero__title,
    [class*="hero__title"],
    [class*="message__title"]
  ) {
    font-size: clamp(1.86rem, 7.7vw, 2.48rem) !important;
    line-height: 1.38 !important;
  }

  html[lang^="zh-Hans"] .page-lower :is(
    .p-lower-section__title,
    [class*="section__title"],
    [class*="final__title"],
    [class*="concept__title"],
    [class*="place__title"]
  ) {
    font-size: clamp(1.74rem, 7.1vw, 2.24rem) !important;
    line-height: 1.42 !important;
  }

  html[lang^="zh-Hans"] :is(
    .p-home-hero__lead,
    .p-brand-message__lead,
    .p-features__lead,
    .p-camp__lead,
    .p-stay__lead,
    .p-activities__lead,
    .p-scenes__lead,
    .p-news__lead,
    .p-ending__lead,
    .p-lower-hero__lead,
    .p-lower-section__lead,
    [class*="hero__lead"],
    [class*="section__lead"]
  ) {
    font-size: clamp(0.86rem, 3.28vw, 0.98rem) !important;
    line-height: 1.86 !important;
  }
}

/* --------------------------------------------------------------------------
   Phase 3D: Korean typography and line-break guard
   -------------------------------------------------------------------------- */
html[lang="ko"] {
  overflow-x: hidden;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
}

html[lang="ko"] body,
html[lang="ko"] .page-top,
html[lang="ko"] .page-lower {
  overflow-x: hidden;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

html[lang="ko"] :is(
  h1,
  h2,
  h3,
  .p-home-hero__title,
  .p-brand-message__title,
  .p-features__title,
  .p-camp__title,
  .p-stay__title,
  .p-activities__title,
  .p-scenes__title,
  .p-news__title,
  .p-instagram__title,
  .p-ending__title,
  .p-lower-hero__title,
  .p-lower-section__title,
  .p-lower-related__title,
  [class*="hero__title"],
  [class*="section__title"],
  [class*="final__title"],
  [class*="message__title"],
  [class*="concept__title"],
  [class*="place__title"]
) {
  max-width: 100%;
  white-space: normal !important;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

html[lang="ko"] :is(
  p,
  li,
  dt,
  dd,
  label,
  button,
  a,
  .p-lower-card,
  .p-lower-card__body,
  .p-lower-card__content,
  [class*="__lead"],
  [class*="__copy"],
  [class*="__text"],
  [class*="card__title"]
) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

html[lang="ko"] :is(
  .p-home-hero__title,
  .p-lower-hero__title,
  .p-lower-section__title
) {
  font-family: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", serif;
}

@media (max-width: 767px) {
  html[lang="ko"] :is(
    .p-home-hero__title,
    .p-lower-hero__title,
    .p-lower-section__title,
    [class*="hero__title"],
    [class*="section__title"]
  ) {
    line-height: 1.4;
    letter-spacing: 0.01em;
  }

  html[lang="ko"] .l-site-footer__nav-list--primary .l-site-footer__nav-link {
    font-size: clamp(0.9rem, 3.7vw, 1rem);
    line-height: 1.35;
    letter-spacing: 0.01em;
  }
}


/* --------------------------------------------------------------------------
   Phase 3D.1: Korean heading and English footer clipping hotfix
   - Korean: release child-span nowrap and reduce mobile heading density.
   - English: allow footer copy to wrap instead of being clipped by overflow-x.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  html[lang="ko"] .p-brand-message__title,
  html[lang="ko"] .p-activities__title {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  html[lang="ko"] .p-brand-message__title span,
  html[lang="ko"] .p-activities__title span {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  html[lang="ko"] .p-brand-message__title {
    font-size: clamp(1.72rem, 7vw, 2.05rem) !important;
    line-height: 1.42 !important;
    letter-spacing: 0.005em !important;
  }

  html[lang="ko"] .p-activities__heading {
    width: 100% !important;
    max-width: 100% !important;
  }

  html[lang="ko"] .p-activities__title {
    font-size: clamp(1.9rem, 7.6vw, 2.3rem) !important;
    line-height: 1.38 !important;
    letter-spacing: 0.01em !important;
  }

  html[lang^="en"] .l-site-footer__sub {
    width: min(100%, 34ch) !important;
    max-width: 34ch !important;
    margin-right: auto !important;
    margin-left: auto !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-wrap: balance;
    letter-spacing: 0.025em !important;
  }

  html[lang^="en"] .l-site-footer__description {
    width: min(100%, 36ch) !important;
    max-width: 36ch !important;
  }

  html[lang^="en"] .l-site-footer__description-line {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}

/* --------------------------------------------------------------------------
   Phase 3D.2: English footer single-line copy refinement
   - Each English footer statement is a complete semantic unit.
   - Keep every line intact on 320–767px without clipping.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  html[lang^="en"] .l-site-footer__sub {
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-wrap: nowrap !important;
    font-size: clamp(0.62rem, 2.6vw, 0.72rem) !important;
    line-height: 1.55 !important;
    letter-spacing: 0.01em !important;
  }

  html[lang^="en"] .l-site-footer__description {
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    font-size: clamp(0.66rem, 2.8vw, 0.76rem) !important;
    line-height: 1.75 !important;
    letter-spacing: 0.01em !important;
  }

  html[lang^="en"] .l-site-footer__description-line {
    display: block !important;
    width: max-content !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
}
