/* Shared language navigation and locale-specific typography. */
.site-language { position: relative; flex-shrink: 0; font-family: system-ui, sans-serif; }
.site-language > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 187, 79, .25);
    border-radius: 14px;
    color: #ffcf84;
    background: #0d111b;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    list-style: none;
}
.site-language > summary::-webkit-details-marker { display: none; }
.site-language > summary::after { content: '▾'; font-size: 11px; }
.site-language[open] > summary::after { content: '▴'; }
.site-language nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    display: grid;
    gap: 3px;
    min-width: 165px;
    padding: 7px;
    border: 1px solid rgba(255, 187, 79, .25);
    border-radius: 16px;
    background: #0d111b;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .45);
}
.site-language a { display: block; border-radius: 10px; padding: 10px 12px; color: #d7dbe5; text-decoration: none; font-size: 14px; }
.site-language a:hover, .site-language a[aria-current="page"] { color: #ffcf84; background: rgba(255, 181, 71, .1); }
.site-language :focus-visible { outline: 2px solid #ffb547; outline-offset: 3px; }
#mobileMenu .site-language { width: fit-content; }
#mobileMenu .site-language nav { left: 0; right: auto; }
html:lang(en) body { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
html:lang(ja) body { font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif; }
html:lang(ko) body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
html:lang(zh-Hant) body { font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
html:lang(en) .prose-custom h2, html:lang(ja) .prose-custom h2, html:lang(ko) .prose-custom h2 { font-family: inherit; }
h1, h2, h3 { overflow-wrap: anywhere; }
/* Translations can occupy more than one line in the narrow feature cards. */
.system-card, .journey-card, .hero-grid > *, .topbar > * { min-width: 0; }
.release-title, .release-notes, .intro { overflow-wrap: anywhere; }
.topbar { flex-wrap: wrap; }
@media (max-width: 520px) {
    .topbar .top-actions { margin-left: auto; gap: 10px; }
    .topbar .brand strong { max-width: 160px; }
    .topbar .home-link { max-width: 80px; }
}
@media (max-width: 640px) {
    html:lang(ja) .hero-grid h1 { font-size: clamp(2rem, 10.5vw, 2.625rem); line-height: 1.25; }
    html:lang(ja) .hero-grid h1 > span { display: block; }
}
