/* Easy Light Menu — language switch (globe button + sheet) and script/RTL font fallbacks */
.gm-header { position: sticky; }
.elm-lang-btn { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 5; display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.45); background: rgba(0,0,0,0.35);
  color: #fff; font: 700 0.74rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0.04em; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.elm-lang-btn:active { transform: scale(0.96); }
.elm-lang-code { min-width: 1.4em; text-align: center; }
body[data-slug="thevault"] .elm-lang-btn { border-color: rgba(212,175,55,0.6); color: #f3e6c4; background: rgba(10,10,10,0.6); }
body[data-slug="thevault"] .elm-lang-btn svg { color: #d4af37; }
body[data-slug="river"] .elm-lang-btn { border-radius: 4px; border-color: rgba(255,255,255,0.55); background: rgba(48,48,48,0.6); }
body.gm-room-dark .elm-lang-btn { color: var(--g-ink, #f3e6c4); }

.elm-lang-sheet { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.45); display: none; align-items: flex-end; justify-content: center; }
.elm-lang-sheet.open { display: flex; }
.elm-lang-panel { width: min(30rem, 100%); max-height: 86vh; overflow: auto; background: #fff; color: #1d1d1f; border-radius: 18px 18px 0 0;
  padding: 0.6rem 0.9rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans CJK SC", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif; }
@media (min-width: 700px) { .elm-lang-sheet { align-items: center; } .elm-lang-panel { border-radius: 18px; } }
.elm-lang-head { display: flex; align-items: center; justify-content: space-between; padding: 0.35rem 0.2rem 0.55rem; border-bottom: 1px solid rgba(0,0,0,0.08); }
.elm-lang-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.05rem; }
.elm-lang-title small { font-weight: 500; color: #6e6e73; font-size: 0.82rem; }
.elm-lang-x { border: 0; background: #f2f2f4; width: 34px; height: 34px; border-radius: 50%; font-size: 0.95rem; cursor: pointer; color: inherit; }
.elm-lang-list { list-style: none; margin: 0; padding: 0.3rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.elm-lang-list button { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; text-align: start;
  padding: 0.6rem 0.7rem; min-height: 54px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.1); background: #fff; color: inherit; cursor: pointer; font: inherit; }
.elm-lang-list button.on { border-color: #1d1d1f; background: #1d1d1f; color: #fff; }
.elm-lang-native { font-weight: 700; font-size: 1rem; grid-column: 1; }
.elm-lang-en { grid-column: 1; font-size: 0.72rem; opacity: 0.65; }
.elm-lang-check { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; }
.elm-lang-note { margin: 0.7rem 0.2rem 0; font-size: 0.74rem; color: #6e6e73; line-height: 1.35; }
body[data-slug="thevault"] .elm-lang-list button.on { background: #0a0a0a; color: #f3e6c4; border-color: #d4af37; }
body[data-slug="river"] .elm-lang-list button.on { background: #303030; border-color: #303030; }

/* Script fallbacks: device fonts first, then Noto (web-safe on iOS, Android, Windows, Mac) */
html[lang="zh-Hans"] body, html[lang="zh-Hans"] body :is(h1,h2,h3,h4,p,span,button,a,li,div,input,summary,small,strong,em) {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif !important; letter-spacing: normal !important; }
html[lang="ja"] body, html[lang="ja"] body :is(h1,h2,h3,h4,p,span,button,a,li,div,input,summary,small,strong,em) {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif !important; letter-spacing: normal !important; }
html[lang="ko"] body, html[lang="ko"] body :is(h1,h2,h3,h4,p,span,button,a,li,div,input,summary,small,strong,em) {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif !important; letter-spacing: normal !important; }
html[lang="ar"] body, html[lang="ar"] body :is(h1,h2,h3,h4,p,span,button,a,li,div,input,summary,small,strong,em) {
  font-family: "Geeza Pro", "SF Arabic", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, "Arial", sans-serif !important; letter-spacing: normal !important; text-transform: none !important; }
html[lang="hi"] body, html[lang="hi"] body :is(h1,h2,h3,h4,p,span,button,a,li,div,input,summary,small,strong,em) {
  font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif !important; letter-spacing: normal !important; }
.elm-lang-native[lang="ar"] { font-family: "Geeza Pro", "SF Arabic", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, sans-serif; }

/* RTL (Arabic): mirror layout; prices, numbers and the brand line stay readable */
html[dir="rtl"] .gm-item, html[dir="rtl"] .gm-item-copy, html[dir="rtl"] .gm-panel-body, html[dir="rtl"] .atm, html[dir="rtl"] .gm-cat-title { text-align: right; }
html[dir="rtl"] .gm-item-price, html[dir="rtl"] .atm-where, html[dir="rtl"] .gm-header .sub { unicode-bidi: plaintext; }
html[dir="rtl"] .gm-tabs, html[dir="rtl"] .gm-subnav, html[dir="rtl"] .atm-scopes { direction: rtl; }
html[dir="rtl"] .atm-go { transform: none; }
html[dir="rtl"] .gm-powered, html[dir="rtl"] .gm-header .sub { direction: ltr; }
/* Print view (body.pm) in RTL */
html[dir="rtl"] .pm-paper { direction: rtl; text-align: right; }
/* RTL: off-screen honeypot fields must hang off the right edge, or the page scrolls sideways */
html[dir="rtl"] .gm-capture .sr-only, html[dir="rtl"] .sr-only { left: auto !important; right: -9999px !important; }
html[dir="rtl"], html[dir="rtl"] body { overflow-x: clip; }
