/*
AiST TECH Japanese typography normalization
===========================================
Scope: html[lang="ja"] only

The legacy Korean-oriented styles contain:
- body { letter-spacing:-1px; }
- text-align:justify
- word-break:keep-all

Those rules create unnatural Japanese spacing, especially when a line is
forced to fill its full width. This stylesheet keeps the original layout
but normalizes Japanese prose and wrapping site-wide.
*/

/* Base Japanese text metrics */
html[lang="ja"] body {
    letter-spacing: 0;
    word-spacing: normal;
}

/* Main content area: normal Japanese glyph spacing */
html[lang="ja"] .contsBox,
html[lang="ja"] .contsBox p,
html[lang="ja"] .contsBox li,
html[lang="ja"] .contsBox dt,
html[lang="ja"] .contsBox dd,
html[lang="ja"] .contsBox td,
html[lang="ja"] .contsBox th,
html[lang="ja"] .contsBox span {
    word-spacing: normal !important;
}

/* ---------------------------------------------------------
   Remove full justification from every known legacy content
   selector that uses text-align:justify.
   --------------------------------------------------------- */
html[lang="ja"] .txtA ul li p,
html[lang="ja"] .txtB ul li p,
html[lang="ja"] .txtB2 p,
html[lang="ja"] .txtA3000 ul li p,
html[lang="ja"] .txtB1000 ul li,
html[lang="ja"] .txtB2000 ul li,
html[lang="ja"] .txtC3000 ul li,
html[lang="ja"] .stipul_con,
html[lang="ja"] .gallery_page_list ul li div p a,
html[lang="ja"] .gallery_list ul li div p a {
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
}

/* Catch inline legacy justification used inside individual product pages. */
html[lang="ja"] [style*="text-align: justify"],
html[lang="ja"] [style*="text-align:justify"] {
    text-align: left !important;
    text-justify: auto !important;
}

/* ---------------------------------------------------------
   Japanese wrapping
   Remove Korean-oriented keep-all from prose/table content.
   --------------------------------------------------------- */
html[lang="ja"] .txtA ul li p,
html[lang="ja"] .txtB ul li p,
html[lang="ja"] .txtB2 p,
html[lang="ja"] .txtB2 .txtC1img dl dd span,
html[lang="ja"] .imgdiv span,
html[lang="ja"] .txtA3000 ul li p,
html[lang="ja"] .txtB1000 ul li,
html[lang="ja"] .txtB2000 ul li,
html[lang="ja"] .txtC3000 ul li,
html[lang="ja"] .basic-table td,
html[lang="ja"] .basic-table td.tleft_h1,
html[lang="ja"] .stipul_con ul li,
html[lang="ja"] .mius-section dd,
html[lang="ja"] .mius-section dd p,
html[lang="ja"] .mius-sample-tabs span,
html[lang="ja"] .product-showcase-heading h2,
html[lang="ja"] .product-showcase-heading p,
html[lang="ja"] .product-showcase-description {
    word-break: normal !important;
    line-break: strict;
    overflow-wrap: break-word;
    word-spacing: normal !important;
}

/* Catch inline keep-all rules as well. */
html[lang="ja"] [style*="word-break: keep-all"],
html[lang="ja"] [style*="word-break:keep-all"] {
    word-break: normal !important;
    line-break: strict;
    overflow-wrap: break-word;
}

/* ---------------------------------------------------------
   Product-detail prose
   --------------------------------------------------------- */
html[lang="ja"] .txtA p,
html[lang="ja"] .txtB p,
html[lang="ja"] .txtB2 p,
html[lang="ja"] .txtA3000 p,
html[lang="ja"] .txtB1000 p,
html[lang="ja"] .txtB2000 p,
html[lang="ja"] .txtC3000 p,
html[lang="ja"] .txtA dd,
html[lang="ja"] .txtB dd,
html[lang="ja"] .txtB2 dd,
html[lang="ja"] .txtA3000 dd,
html[lang="ja"] .txtB1000 dd,
html[lang="ja"] .txtB2000 dd,
html[lang="ja"] .txtC3000 dd {
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    line-break: strict;
}

/* Legacy section headings use -2px, which is too compressed for Japanese. */
html[lang="ja"] .contsBox .txtA strong,
html[lang="ja"] .contsBox .txtB strong,
html[lang="ja"] .contsBox .txtB2 strong,
html[lang="ja"] .contsBox .txtA3000 strong,
html[lang="ja"] .contsBox .txtB1000 strong,
html[lang="ja"] .contsBox .txtB2000 strong,
html[lang="ja"] .contsBox .txtC3000 strong {
    letter-spacing: 0 !important;
}

/* History / location descriptive Japanese */
html[lang="ja"] .contsBox .history,
html[lang="ja"] .contsBox .mapsec .maptxt {
    word-spacing: normal !important;
}

/* ---------------------------------------------------------
   Main page prose
   Preserve intentionally spaced English labels such as PRODUCT,
   but normalize Japanese descriptions.
   --------------------------------------------------------- */
html[lang="ja"] #section2 .product-showcase-heading h2,
html[lang="ja"] #section2 .product-showcase-heading p,
html[lang="ja"] #section2 .product-showcase-description {
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    word-break: normal !important;
    line-break: strict;
}

/* Keep intentional English/category typography unchanged. */
html[lang="ja"] #section2 .product-showcase-kicker,
html[lang="ja"] #section2 .product-showcase-category,
html[lang="ja"] #section2 .product-showcase-link,
html[lang="ja"] #section2 .product-showcase-name {
    word-spacing: normal;
}

/* ---------------------------------------------------------
   Board / FAQ / legal text
   --------------------------------------------------------- */
html[lang="ja"] .page_view,
html[lang="ja"] .page_view p,
html[lang="ja"] .onfaq,
html[lang="ja"] .onfaq .a,
html[lang="ja"] .onfaq .a div,
html[lang="ja"] .stipul_con,
html[lang="ja"] .stipul_con p,
html[lang="ja"] .stipul_con li {
    letter-spacing: 0;
    word-spacing: normal !important;
    line-break: strict;
}

/* Explicitly preserve intended center alignment for visual/UI elements. */
html[lang="ja"] .product-detail-visual-box,
html[lang="ja"] .product-detail-visual-title,
html[lang="ja"] .product-detail-visual-imgbox,
html[lang="ja"] .product-detail-visual-caption,
html[lang="ja"] .mius-feature-imgline,
html[lang="ja"] .mius-sample-main,
html[lang="ja"] .mius-sample-tabs span,
html[lang="ja"] .subreporttitle,
html[lang="ja"] .product-showcase-heading {
    text-justify: auto;
}
