/* LP i18n · language switcher + RTL/typography adjustments */
#lp-lang.lp-lang {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2147483000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  direction: ltr;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

#lp-lang .lp-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(74, 18, 48, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #4a1230;
  font: inherit;
  font-weight: 800;
  letter-spacing: .3px;
  box-shadow: 0 6px 18px rgba(74, 18, 48, .14);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lp-lang .lp-lang__btn:hover { border-color: #ff2b88; color: #ff2b88; }
#lp-lang .lp-lang__btn:focus-visible { outline: 2px solid #ff2b88; outline-offset: 2px; }
#lp-lang .lp-lang__globe { font-size: 15px; line-height: 1; }
#lp-lang .lp-lang__code { font-size: 12px; }

#lp-lang .lp-lang__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 216px;
  max-height: min(64vh, 420px);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(74, 18, 48, .12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(74, 18, 48, .22);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#lp-lang.is-open .lp-lang__menu { display: block; }

#lp-lang .lp-lang__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #3b1027;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

#lp-lang .lp-lang__item:hover { background: #fff0f6; }
#lp-lang .lp-lang__item.is-active { background: #ffe3ef; color: #d1145f; font-weight: 800; }
#lp-lang .lp-lang__tag {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  color: #a55a79;
  text-transform: uppercase;
}
#lp-lang .lp-lang__item.is-active .lp-lang__tag { color: #d1145f; }

/* RTL */
html[dir="rtl"] #lp-lang.lp-lang { right: auto; left: 10px; }
html[dir="rtl"] #lp-lang .lp-lang__menu { right: auto; left: 0; }
html[dir="rtl"] [data-lp-text-layout] > div[style*="text-align:left"] { text-align: right !important; }
html[dir="rtl"] [data-lp-text-layout] > div[style*="text-align:right"] { text-align: left !important; }
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .lp-lang__item { text-align: right; }

/* Script-specific typography */
html[lang="ar"] body { font-family: system-ui, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif; }
html[lang="hi"] body { font-family: system-ui, "Segoe UI", "Noto Sans Devanagari", Mangal, sans-serif; }
html[lang="ja"] body { font-family: system-ui, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif; }
html[lang="ko"] body { font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html[lang="zh-CN"] body { font-family: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

html[lang="de"] h1, html[lang="de"] h2, html[lang="ru"] h1, html[lang="ru"] h2 { hyphens: auto; }

@media (max-width: 420px) {
  #lp-lang .lp-lang__menu { width: 196px; }
  #lp-lang.lp-lang { top: 8px; right: 8px; }
  html[dir="rtl"] #lp-lang.lp-lang { left: 8px; }
}