/* THESIS: Choose a readable language without losing the restaurant behind settings.
 * OWN-WORLD: Existing cream, timber controls and rounded Bistro typography.
 * STORY: Select a native language name, wait for a verified pack, keep playing.
 * FIRST VIEWPORT: Stable settings title/close above one compact language field.
 * FORM: Local adaptation of the incumbent settings dialog and text direction.
 * FINISH: unreviewed and undocumented is unfinished; this build ends with the finish review, the verdict, and DESIGN.md
 */
.settings-modal {
  width: min(92vw, 420px);
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.settings-modal h2 { flex: 0 0 auto; margin: 0; padding: 20px 58px 16px; }
.settings-modal .modal-close { inset-inline-end: 12px; inset-inline-start: auto; top: 12px; min-width: 44px; min-height: 44px; }
.settings-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 18px 18px; }
.settings-body > * { flex-shrink: 0; }
.settings-body .modal-button { min-height: 44px; height: auto; text-align: start; }
.settings-body .lang-chip { min-height: 44px; }
.settings-body .svg-icon { flex-shrink: 0; }
.settings-body .modal-button-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.settings-body .settings-section-label { font-size: 14px; text-transform: none; letter-spacing: normal; }
.settings-language {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--color-wood); border-radius: 10px;
  background: #fffdf8; color: var(--color-ink);
  font: 700 16px/1.4 var(--font-main); cursor: pointer;
}
.settings-language:disabled { opacity: .65; cursor: wait; }
.settings-language:focus-visible, .settings-modal button:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 2px; }
.settings-language-status { margin: 0; font-size: 14px; line-height: 1.45; color: var(--color-ink); }
.settings-language-status:empty { display: none; }
/* Direction changes text and natural flow; the 3D canvas and camera never mirror. */
html[dir="rtl"] { --font-main: "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif; --font-title: var(--font-main); }
html:lang(he) { --font-main: "Noto Sans Hebrew", Arial, sans-serif; }
html:lang(hi) { --font-main: "Noto Sans Devanagari", "Nirmala UI", sans-serif; --font-title: var(--font-main); }
html:lang(ja) { --font-main: "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; --font-title: var(--font-main); }
html:lang(ko) { --font-main: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --font-title: var(--font-main); }
html:lang(zh) { --font-main: "PingFang SC", "Microsoft YaHei", sans-serif; --font-title: var(--font-main); }
[dir="rtl"] .main-menu-loading-bar, [dir="rtl"] .xp-fill { transform-origin: right center; }
[dir="rtl"] .main-menu-save, [dir="rtl"] .shop-detail-info { text-align: start; }
[dir="rtl"] .settings-section-label { letter-spacing: normal; }
.resource-chip .chip-value, .xp-label { unicode-bidi: isolate; }
@media (max-height: 440px) { .settings-modal { max-height: 94dvh; } .settings-modal h2 { padding-top: 14px; padding-bottom: 12px; } }
