/* Japanese-only text flow; original arches, colors, imagery and Korean edition remain intact. */
.ja-only { display: none; }
html:lang(ja) .ja-only { display: block; }
html:lang(ja) :is(body,button,input) { font-family: "DM Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; }
/* Override treatment templates' Korean keep-all rules: Japanese wraps between CJK characters. */
html:lang(ja) :is(h1,h2,h3,h4,p,li,strong,span,a,button,figcaption,dt,dd) { word-break: normal !important; overflow-wrap: break-word; line-break: strict; }
html:lang(ja) p { text-wrap: pretty; }
html:lang(ja) :is(h1,h2,h3,h4) { letter-spacing: -.015em; }
html:lang(ja) .global-nav-list { gap: clamp(12px,1.4vw,26px); }
html:lang(ja) .nav-dropdown { min-width: 280px; }
html:lang(ja) .nav-dropdown a { line-height: 1.65; }
html:lang(ja) .subhero-title { font-size: clamp(36px,4.2vw,68px); line-height: 1.3; }
html:lang(ja) .subhero-title br { display: none; }
html:lang(ja) :is(.bw-recommendation h3,.lw-recommendation h3,.brand-recommendation-card>strong,.skin-word-recommend-card h3) { text-wrap: pretty; line-height: 1.7; }
html:lang(ja) .bw-recommendation h3 strong { display: inline; }
/* A Korean keep-all heading must not impose an unbreakable Japanese flex width. */
html:lang(ja) .bw-section-head > div { min-width: 0; }
html:lang(ja) .booster-word-page .bw-section-head h2 { word-break: normal; overflow-wrap: anywhere; }
html:lang(ja) :is(.lw-phrase,.refine-phrase,.skin-word-keep,.page-lead h2,.detail-intro-copy h2,.detail-heading h2,.allshine-editorial-copy h3,.team-standard-heading h3,.space-flow-heading h3,.space-story-item h3,.detail-cta h2) { white-space: normal; }
html:lang(ja) .mobile-quick-action { min-width: 0; }
html:lang(ja) .mobile-quick-action .quick-label { font-size: 11px; letter-spacing: -.025em; }
html:lang(ja) #eventViewerTitle { text-wrap: balance; line-height: 1.5; }
html:lang(ja) .mobile-language-list { padding-inline: 0; gap: 6px; }
html:lang(ja) .mobile-language-list button { white-space: nowrap; min-height: 40px; padding-inline: 3px; font-size: 11px; }
html:lang(ja) .notice-row.is-pinned .notice-row-summary > strong { display: block; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.65; padding-block: 12px; }
html:lang(ja) .notice-row.is-pinned .notice-row-summary > strong i { display: inline-block; margin-right: 8px; vertical-align: middle; }
html:lang(ja) .notice-popup-card { width: min(100%,600px); grid-template-rows: minmax(0,1fr) auto auto; }
html:lang(ja) .notice-popup-media { background: #fbfaf8; }
html:lang(ja) .notice-popup-media img { max-height: calc(100dvh - 236px); }
.ja-popup-reading { padding: 14px 20px; color: var(--brand-deep); font-size: 14px; line-height: 1.55; border-top: 1px solid var(--line); }
.ja-popup-reading p { margin: 0 0 6px; }
.ja-popup-reading dl { margin: 0 0 8px; }
.ja-popup-reading dl>div { display: flex; justify-content: space-between; gap: 12px; }
.ja-popup-reading dt,.ja-popup-reading dd { margin: 0; }
.ja-popup-reading dd { white-space: nowrap; font-weight: 600; }
.ja-popup-reading a { text-decoration: underline; text-underline-offset: 3px; }
.ja-layer-legend { padding: 16px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.ja-layer-legend p { margin: 0 0 8px; font-weight: 500; }
.ja-layer-legend ol { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding-left: 22px; }
.ja-press-reading { width: 100%; margin: 20px 0; }
.ja-press-reading p { font-size: 15px; line-height: 1.85; }
@media (max-width: 760px) {
    html:lang(ja) .notice-popup-card { width: min(100%,430px); }
    html:lang(ja) .notice-popup-media img { max-height: calc(100dvh - 232px); }
    .ja-popup-reading { padding: 12px 14px; font-size: 13px; }
    html:lang(ja) .booster-word-page .bw-features.bw-features-centered { grid-template-columns: minmax(0,1fr); }
    html:lang(ja) .bw-features > * { min-width: 0; max-width: 100%; }
    html:lang(ja) :is(.hero-copy h1,.subhero-title) { font-size: clamp(28px,7.3vw,40px); line-height: 1.35; }
    html:lang(ja) .detail-anchor-list a { padding-inline: 12px; font-size: 12px; }
    html:lang(ja) .mobile-group-toggle { font-size: 16px; }
    html:lang(ja) .mobile-quick-sheet-head h2 { font-size: clamp(17px,4.6vw,20px); line-height: 1.45; text-wrap: balance; }
    html:lang(ja) :is(.bw-section-title,.lw-section-title) { overflow-wrap: break-word; }
}
@media (max-height: 480px) and (orientation: landscape) {
    html:lang(ja) .notice-popup-card { width: min(100%,680px); grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); grid-template-rows: minmax(0,1fr) auto; }
    html:lang(ja) .notice-popup-media img { max-height: calc(100dvh - 100px); }
    html:lang(ja) .ja-popup-reading { align-self: center; border: 0; padding: 34px 14px 8px; overflow-y: auto; max-height: calc(100dvh - 90px); }
    html:lang(ja) .ja-popup-reading dl>div { display: block; margin-bottom: 8px; }
    html:lang(ja) .notice-popup-actions { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
    /* Give the Latin brand label room without reducing the readable 11px type. */
    html:lang(ja) .mobile-quick-dock { grid-template-columns: .95fr .85fr 1.2fr 1fr 1fr; }
    html:lang(ja) .mobile-language-list button { font-size: 10px; }
    html:lang(ja) #eventViewerTitle { font-size: 12px; }
}
