/* Script-specific typography for the ten new languages.
   The theme's Latin stack is Arial/Georgia; these rules keep CJK, Devanagari, Thai,
   Arabic and Cyrillic readable without external font requests. */

:lang(ja) body,
:lang(ja) .gm-article-content { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif; }

:lang(ko) body,
:lang(ko) .gm-article-content { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }

:lang(hi) body,
:lang(hi) .gm-article-content { font-family: "Noto Sans Devanagari", "Kohinoor Devanagari", Mangal, sans-serif; line-height: 1.95; }

:lang(th) body,
:lang(th) .gm-article-content { font-family: "Noto Sans Thai", Sarabun, "Leelawadee UI", sans-serif; line-height: 1.95; }

:lang(ar) body,
:lang(ar) .gm-article-content { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 1.95; }

:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) h4,
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) h4,
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(hi) h4,
:lang(th) h1, :lang(th) h2, :lang(th) h3, :lang(th) h4,
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) h4 {
  letter-spacing: 0;
  line-height: 1.35;
}

:lang(ru) h1, :lang(ru) h2, :lang(ru) h3, :lang(ru) h4 { letter-spacing: -.02em; }

/* Code, commands and URLs stay LTR on every page, including Arabic. */
pre, code { direction: ltr; text-align: left; unicode-bidi: isolate; }

/* Keep a 15-language floater usable on small screens. */
#trp-floater-ls #trp-floater-ls-language-list { max-height: 70vh; overflow-y: auto; }
@media (max-width: 720px) { #trp-floater-ls { max-width: min(92vw, 320px); } }

/* Courtesy-translation notice on Privacy and Terms in the new languages. */
.gm-legal-notice { margin: 0 0 1.8em; padding: 16px 20px; border: 1px solid var(--line); background: var(--surface); font-size: .92em; line-height: 1.6; }
