/* System CJK fonts keep the portal readable without an external font download. */
:root {
    --i18n-font-family: "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", "PingFang SC", "Microsoft YaHei", "Malgun Gothic",
        "Apple SD Gothic Neo", "Hiragino Kaku Gothic ProN", "Yu Gothic",
        "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
html body, button, input, select, textarea, html .leaderboard-card {
    font-family: var(--i18n-font-family);
}
html body { line-height: 1.5; }
html:lang(zh-CN) { --i18n-font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
html:lang(ko) { --i18n-font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans CJK KR", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
html:lang(ja) { --i18n-font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
body .topbar, body .topnav, body .nav-hub, body .legal-links,
body .wizard-header-actions, body .wizard-nav { flex-wrap: wrap; }
body .nav-link, body .header-action-btn, body .discord-btn, body .btn,
body .secondary-btn, body .primary-btn, body .ghost-btn, body .tz-toggle,
body .console-row span:last-child {
    white-space: normal;
    overflow-wrap: anywhere;
    height: auto;
    min-height: 30px;
    line-height: 1.4;
    max-width: 100%;
}
body .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
body .hero > *, body .card, body .tier { min-width: 0; overflow-wrap: anywhere; }
body .toggle { white-space: normal; }
body .stepper li { min-width: 0; overflow-wrap: anywhere; }
.language-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    color: #f8f9fa;
    font-size: 13px;
}
.language-picker select {
    background: #2b2b3c;
    color: #f8f9fa;
    border: 1px solid #adb5bd;
    border-radius: 6px;
    padding: 7px;
    max-width: 100%;
    cursor: pointer;
}
.language-picker select:focus-visible { outline: 2px solid #4ecca3; outline-offset: 2px; }
.i18n-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 860px) {
    body .hero { grid-template-columns: minmax(0, 1fr); }
    .language-picker { flex-shrink: 0; }
}
