/* Language selector + script fallbacks */
.lang-sel { display: inline-flex; align-items: center; margin-left: 10px; }
.lang-sel select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: inherit; font-family: "Anton", "Oswald", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", sans-serif;
  font-size: 13px; letter-spacing: .04em; line-height: 1;
  color: #111; background: #FFDD00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23111'/%3E%3C/svg%3E") no-repeat right 8px center / 8px 5px;
  border: 2px solid #111; border-radius: 0; padding: 5px 22px 5px 8px; min-height: 30px;
}
.lang-sel select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html.i18n-pending body { visibility: hidden; }
html[lang="ja"] body, html[lang="ko"] body { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
html[lang="ko"] body { word-break: keep-all; }
html[lang="zh-Hans"] body { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2 { letter-spacing: 0; }
html[lang="ru"] body { overflow-wrap: break-word; hyphens: auto; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ru"] h1, html[lang="ru"] h2 { letter-spacing: 0; }
@media (min-width: 761px) { .site-header > .nav { margin-left: auto; } }
.site-header > .lang-sel { margin-left: -12px; flex: none; }
@media (max-width: 760px) {
  .site-header > .lang-sel { position: absolute; margin: 0; top: calc(5px + env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
  .lang-sel select { font-size: 12px; min-height: 26px; padding: 3px 20px 3px 6px; }
}

/* Anton has no CJK/Cyrillic glyphs: keep Anton for Latin, fall back per glyph */
html[lang="ja"] body *:not(code):not(.wallet-addr) { font-family: "Anton", "Noto Sans JP", sans-serif !important; }
html[lang="ko"] body *:not(code):not(.wallet-addr) { font-family: "Anton", "Noto Sans KR", sans-serif !important; }
html[lang="zh-Hans"] body *:not(code):not(.wallet-addr) { font-family: "Anton", "Noto Sans SC", sans-serif !important; }
html[lang="ru"] body *:not(code):not(.wallet-addr) { font-family: "Anton", "Oswald", sans-serif !important; }

.legal-updated { font-size: 13px; opacity: .65; margin-top: -6px; }
.legal-list { margin: 0 0 1em 1.2em; padding: 0; }
.legal-list li { margin: .4em 0; }
