html:lang(ru) {
  --display: "Passion One", "Rubik", "Arial Black", system-ui, sans-serif;
}
html:lang(zh-Hant) { --cjk: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei"; }
html:lang(zh-Hans) { --cjk: "PingFang SC", "Noto Sans SC", "Microsoft YaHei"; }
html:lang(ja) { --cjk: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo; }
html:lang(ko) { --cjk: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic"; }
html:is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)) {
  --display: "Passion One", var(--cjk), "Arial Black", system-ui, sans-serif;
  --body: "Rubik", var(--cjk), "Segoe UI", system-ui, sans-serif;
}
html:is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)) body { word-break: normal; line-break: strict; }
html:not([lang="en"]) :is(h1, h2, h3, h4, p, li, summary, button) { overflow-wrap: break-word; }
html:is(:lang(de), :lang(fr), :lang(it), :lang(es), :lang(pt), :lang(ru), :lang(tr), :lang(id), :lang(vi)) :is(h1, h2, h3, p, li) { hyphens: auto; }

.langbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 2147483000; max-width: 560px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 48px 12px 16px; background: rgba(20, 15, 10, .97); border: 1px solid rgba(255, 184, 60, .55); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); color: #f6ead6; font: 500 15px/1.4 "Rubik", "Segoe UI", system-ui, sans-serif; opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease; }
.langbar.is-on { opacity: 1; transform: none; }
.langbar__msg { flex: 1 1 auto; min-width: 0; }
.langbar__go { background: #ffb83c; color: #1a1006; font-weight: 700; padding: 7px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.langbar__go:hover { filter: brightness(1.08); }
.langbar__x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #f6ead6; opacity: .6; font-size: 17px; line-height: 1; cursor: pointer; padding: 6px 8px; }
.langbar__x:hover { opacity: 1; }

.langfoot { display: flex; justify-content: center; padding: 18px 16px 28px; }
.langpick { position: relative; display: inline-block; vertical-align: middle; text-align: left; font-family: var(--body, "Rubik", system-ui, sans-serif); }
footer .langpick, .footer-note .langpick { margin-left: 10px; }
.footer-note .langpick__list { left: auto; right: 0; transform: none; }
.langpick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid rgba(255, 184, 60, .35); border-radius: 999px; color: inherit; font-size: 13px; line-height: 1.2; white-space: nowrap; }
.langpick > summary::-webkit-details-marker { display: none; }
.langpick > summary::after { content: "▾"; opacity: .7; }
.langpick > summary:hover, .langpick[open] > summary { border-color: rgba(255, 184, 60, .8); }
.langpick > summary b { font-weight: 600; }
.langpick__list { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); z-index: 2147483000; display: grid; grid-template-columns: repeat(2, max-content); column-gap: 4px; max-width: calc(100vw - 32px); padding: 6px; background: #17110b; border: 1px solid rgba(255, 184, 60, .5); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .6); }
footer .langpick__list { left: auto; right: 0; transform: none; }
.langpick__list a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; letter-spacing: 0; text-transform: none; color: #f6ead6; text-decoration: none; white-space: nowrap; }
.langpick__list a:hover { background: rgba(255, 184, 60, .14); }
.langpick__list a[aria-current] { color: #ffb83c; }
@media (max-width: 640px) {
  .langpick__list, footer .langpick__list, .footer-note .langpick__list { position: fixed; left: 16px; right: 16px; bottom: 72px; top: auto; transform: none; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .langpick__list a { white-space: normal; }
}
