/* CJK typography for the full Japanese corpus and isolated Japanese/Korean previews. */
html[lang="ja"],
html[lang="ko"] {
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
}

html[lang="ja"] body {
  font-family: "Yu Gothic", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
}

html[lang="ko"] body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

html[lang="ja"] :is(.hero-title, .section-title, .album-title, .merch-panel__title, .audit2-gateway-card h3, .home-route-card h4),
html[lang="ko"] :is(.hero-title, .section-title, .album-title, .merch-panel__title, .audit2-gateway-card h3, .home-route-card h4) {
  line-height: 1.2;
  letter-spacing: 0.035em;
  text-transform: none;
}

html[lang="ja"] :is(.nav-center, .mobile-menu, .btn, .label, .card-label, .card-title, .platform-group__heading, .rf-language-switcher),
html[lang="ko"] :is(.nav-center, .mobile-menu, .btn, .label, .card-label, .card-title, .platform-group__heading, .rf-language-switcher) {
  letter-spacing: 0.045em;
  text-transform: none;
}

html[lang="ja"] :is(p, .card-desc, .album-card__desc, .bp-excerpt, .about-body),
html[lang="ko"] :is(p, .card-desc, .album-card__desc, .bp-excerpt, .about-body) {
  line-height: 1.85;
}

html[lang="ja"] .audit2-project-nav :is(a, span),
html[lang="ko"] .audit2-project-nav :is(a, span) {
  word-break: keep-all;
  overflow-wrap: normal;
}

html[lang="ja"] .prog-ranking-hero h1,
html[lang="ko"] .prog-ranking-hero h1 {
  max-width: 760px;
  font-family: inherit;
  font-size: clamp(3.25rem, 5vw, 5rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: none;
}

html[lang="ja"] .bands-atlas-copy h1,
html[lang="ko"] .bands-atlas-copy h1 {
  max-width: 760px;
  font-family: inherit;
  font-size: clamp(3.25rem, 5vw, 5rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: none;
}

html[lang="ja"] .sr-hero h1,
html[lang="ko"] .sr-hero h1 {
  max-width: 720px;
  font-family: inherit;
  font-size: clamp(3rem, 4.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

html[lang="ja"] .sr-section h2,
html[lang="ko"] .sr-section h2 {
  font-family: inherit;
  font-size: clamp(2.7rem, 4.5vw, 4.25rem);
  line-height: 1.15;
}

/* Album-guide titles are usually preserved in Latin script. Keep long names
   intact instead of inheriting CJK emergency wrapping in the middle of a word. */
html[lang="ja"] .prototype-title {
  font-size: clamp(3.6rem, 6.6vw, 6.2rem);
  word-break: keep-all;
  overflow-wrap: normal;
}

.rf-language-picker__preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 14px;
  color: #f2e4c0;
  background: rgba(180, 140, 40, 0.12);
}

.rf-language-picker__preview small {
  color: #a87820;
  font-size: 0.72em;
}

/* The shared shell keeps a 300px desktop utility column after hiding its
   contents. Collapse that empty track so the mobile menu remains reachable. */
@media (max-width: 1280px) {
  html[lang="ja"] #site-header,
  html[lang="ko"] #site-header {
    grid-template-columns: minmax(0, 1fr) 44px !important;
  }

  html[lang="ja"] #site-header .nav-hamburger,
  html[lang="ko"] #site-header .nav-hamburger {
    grid-column: 2 !important;
  }
}

@media (max-width: 720px) {
  html[lang="ja"] .prototype-title {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  html[lang="ja"] .band-body .album-info .album-title-heading {
    min-width: 0;
  }

  html[lang="ja"] .band-body .album-info .album-year {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  html[lang="ja"] .hero-title,
  html[lang="ko"] .hero-title {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
    white-space: nowrap;
  }

  html[lang="ja"] .prog-ranking-hero h1,
  html[lang="ko"] .prog-ranking-hero h1 {
    font-size: clamp(2.35rem, 11vw, 2.8rem);
    line-height: 1.15;
  }


  html[lang="ja"] .bands-atlas-copy h1,
  html[lang="ko"] .bands-atlas-copy h1 {
    font-size: clamp(2.1rem, 9vw, 2.4rem);
    line-height: 1.15;
  }

  html[lang="ja"] .sr-hero h1,
  html[lang="ko"] .sr-hero h1 {
    font-size: clamp(2rem, 8.5vw, 2.3rem);
    line-height: 1.15;
  }

  html[lang="ja"] .sr-section h2,
  html[lang="ko"] .sr-section h2 {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
    line-height: 1.2;
  }

  html[lang="ja"] .lyrics-toggle-tag,
  html[lang="ko"] .lyrics-toggle-tag {
    display: block;
    width: max-content;
    margin: 4px 0 0;
    white-space: nowrap;
  }
}
