﻿/* Native language controls work with keyboard, touch, and file:// previews. */
.language-picker { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink); }
.language-picker select { font: inherit; font-family: Arial, sans-serif; font-size: 13px; color: var(--ink); background: var(--skin-surface, #fff); border: 1px solid var(--line); border-radius: var(--shape-8, 8px); padding: 8px 5px; min-height: 36px; max-width: 180px; cursor: pointer; }
.language-picker select:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.language-caption { font-size: 12px; }
.language-picker-compact { flex: 0 0 auto; }
.language-picker-compact select { width: 67px; text-overflow: clip; }
.footer-bottom { flex-wrap: wrap; row-gap: 16px; }
.policy-header .language-picker { order: 2; }
.policy-header .policy-back { margin-inline-start: auto; }
.policy-footer .language-picker { display: flex; margin-block-end: 16px; }
html:not([lang="ru"]) .hero h1 { font-size: clamp(34px, calc(4.5vw / var(--site-scale)), 58px); }
html:not([lang="ru"]) :is(.hero h1, .story-copy h2, .section-heading h2, .style-card, .button, .format-detail h3) { overflow-wrap: anywhere; }
html:not([lang="ru"]) .desktop-nav { gap: 15px; }
html:not([lang="ru"]) .desktop-nav a { max-width: 125px; text-align: center; }
html:not([lang="ru"]) .header-inner { gap: 20px; }
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] :is(.body-scene, .chart-art, .rhythm-scene, .format-theatre, .hero-art, .badge-art, .dialog-badge, .set-table, .timer-card) { direction: ltr; }
html[dir="rtl"] :is(.body-panel, .format-detail, .story-copy, .style-card, .policy-content, .faq-answer) { text-align: start; }
html[dir="rtl"] :is(.chart-axis, .week-grid, .screen-tabs) { direction: ltr; }
html[dir="rtl"] .policy-content ul { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .header-actions { margin-left: 0; margin-inline-start: auto; }
/* Use system fonts for scripts absent from the site's Latin/Cyrillic fonts. */
html:is([lang="ar"],[lang="ur"],[lang="hi"],[lang="bn"],[lang="ja"]) { --site-font: Arial, sans-serif; }
html:is([lang="ar"],[lang="ur"],[lang="hi"],[lang="bn"],[lang="ja"]) :is(svg text, .style-preview) { font-family: Arial, sans-serif; }
@media (max-width: 1265px) {
  html:not([lang="ru"]) .desktop-nav { display: none; }
  html:not([lang="ru"]) .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
  html:not([lang="ru"]) .header-actions { margin-inline-start: auto; }
}
@media (max-width: 805px) {
  .header-actions { gap: 8px; }
  .header-actions .play-link { display: none; }
  .language-picker-compact select { width: 67px; }
  html:not([lang="ru"]) .header-inner { gap: 10px; }
  .policy-header .wrap { flex-wrap: wrap; gap: 12px; }
  .policy-back { max-width: 45%; overflow-wrap: anywhere; }
  .footer-bottom .language-picker { width: 100%; }
}

/* Keep geometric demos in their original coordinates while reading their copy RTL. */
.format-caption { left: 0; }
html[dir="rtl"] .plan-backplate { left: 8px; }
html[dir="rtl"] :is(.body-detail, .format-detail, .rhythm-calendar) { direction: rtl; text-align: right; }
html[dir="rtl"] .rhythm-days { direction: ltr; }
html:not([lang="ru"]) .hero h1 { white-space: normal; }
.hero-copy { min-width: 0; }
html[dir="rtl"] :is(.body-date-tabs, .rhythm-weekdays) { direction: ltr; }
