/* Japanese UI only. Never replace icon fonts or modify stored user text. */
html:lang(ja) {
    --dc-font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
    --bs-font-sans-serif: var(--dc-font-family);
    --bs-body-font-family: var(--dc-font-family);
}

/* Explicit text/control components beat legacy KR declarations, including popups.
   Do not use a universal font override: icon ligatures must retain their fonts. */
html:lang(ja) :is(body, button, input, select, textarea, option,
    h1, h2, h3, h4, h5, h6, p, a, label, legend, summary, th, td, dt, dd,
    .h1, .h2, .h3, .h4, .h5, .h6, .nav-link, .dropdown-item, .card-title,
    .modal-content, .modal-title, .popover, .tooltip, .ui.menu, .ui.button,
    .ui.header, .ui.input, .ui.dropdown, .ui.message, .swal2-popup,
    .apexcharts-text, .apexcharts-title-text, .apexcharts-subtitle-text,
    .apexcharts-legend-text, .apexcharts-tooltip, .apexcharts-tooltip-title,
    .apexcharts-tooltip-text, .apexcharts-xaxistooltip-text, svg text, svg tspan):not(
    [class*="material-icons"], [class*="material-symbols"], .mi,
    .fa, .fas, .far, .fab, .fal, .fad, .icon, .glyphicon, .ni) {
    font-family: var(--dc-font-family) !important;
}

html:lang(ja) :is(.device-console-header, .device-console-footer,
    .version-copy, .version-option, .console-support-dialog, .console-cost-dialog) {
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: strict;
}
html:lang(ja) :is(.version-option, .console-support-dialog button, .console-cost-dialog button) {
    white-space: normal;
    height: auto;
}

/* Longer Japanese login copy must not sit behind a viewport-fixed copyright. */
html:lang(ja) .device-console-page {
    grid-template-rows: 1fr auto;
    gap: 24px;
    padding-bottom: 24px;
}
html:lang(ja) .device-console-copyright {
    position: static;
    transform: none;
    white-space: normal;
    text-align: center;
}
