.lesh-i18n-switcher {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  color: #fff;
  font-family: Inter, "PingFang SC", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  line-height: 1;
}

.lesh-i18n-switcher button { font: inherit; }

.lesh-i18n-toggle {
  min-width: 86px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(205, 187, 149, .48);
  border-radius: 999px;
  background: rgba(13, 13, 14, .94);
  box-shadow: 0 8px 24px rgba(17, 17, 19, .16);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.lesh-i18n-toggle:hover,
.lesh-i18n-switcher.open .lesh-i18n-toggle { border-color: rgba(205, 187, 149, .9); background: #202021; }
.lesh-i18n-toggle:focus-visible,
.lesh-i18n-option:focus-visible { outline: 2px solid #cdbb95; outline-offset: 2px; }
.lesh-i18n-globe { color: #cdbb95; font-size: 10px; font-weight: 800; }
.lesh-i18n-chevron { margin-top: -3px; color: rgba(255,255,255,.66); font-size: 14px; transition: transform .16s ease; }
.lesh-i18n-switcher.open .lesh-i18n-chevron { transform: rotate(180deg); }

.lesh-i18n-menu {
  position: absolute;
  z-index: 10060;
  top: calc(100% + 8px);
  right: 0;
  width: 132px;
  padding: 6px;
  border: 1px solid rgba(205, 187, 149, .48);
  border-radius: 11px;
  background: #171719;
  box-shadow: 0 14px 36px rgba(10, 10, 12, .28);
}
.lesh-i18n-menu[hidden] { display: none; }
.lesh-i18n-option {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 8px 30px 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}
.lesh-i18n-option:hover { color: #fff; background: rgba(255,255,255,.08); }
.lesh-i18n-option.active { color: #171719; background: #cdbb95; }
.lesh-i18n-option.active:after { content: "✓"; position: absolute; top: 9px; right: 10px; font-weight: 800; }

.lesh-i18n-switcher--floating {
  position: fixed;
  right: 18px;
  top: 14px;
  z-index: 10050;
}

/* React portal pages keep this control outside the managed root; reserve a real
   header slot so the dropdown never sits on top of tasks, notices or the user menu. */
body[data-suite="portal"] .up-header-tools { margin-right: 98px; }

.portal-topbar nav .lesh-i18n-switcher { margin-left: 4px; }
.ai-top-actions .lesh-i18n-switcher { margin-right: 8px; }

.phone-status .lesh-i18n-switcher {
  height: 14px;
}

.phone-status .lesh-i18n-toggle {
  min-width: 62px;
  height: 16px;
  padding: 0 6px;
  gap: 4px;
  border-color: rgba(205, 187, 149, .42);
  box-shadow: none;
  font-size: 7px;
}
.phone-status .lesh-i18n-globe { font-size: 7px; }
.phone-status .lesh-i18n-chevron { font-size: 9px; }
.phone-status .lesh-i18n-menu { top: calc(100% + 6px); width: 112px; }

.mobile-top > .lesh-i18n-switcher {
  position: absolute;
  top: 27px;
  right: 82px;
  width: max-content;
  margin: 0;
}

html[lang="ja"] body {
  font-family: Inter, "Hiragino Sans", "Yu Gothic", "PingFang SC", system-ui, sans-serif;
}

@media (max-width: 700px) {
  .lesh-i18n-toggle { min-width: 76px; height: 30px; padding: 0 8px; gap: 5px; font-size: 10px; }
  .lesh-i18n-menu { width: 122px; }
  .lesh-i18n-switcher--floating { right: 10px; top: 10px; }
  .portal-topbar nav .lesh-i18n-switcher { margin-left: 0; }
  .ai-top-actions .lesh-i18n-switcher { margin-right: 4px; }
  body[data-suite="portal"] .up-header-tools { margin-right: 80px; }
}

@media (max-width: 520px) {
  .portal-topbar nav > a:nth-of-type(2) { display: none; }
  .mobile-top > .lesh-i18n-switcher { right: 74px; }
  .mobile-top > .lesh-i18n-switcher .lesh-i18n-toggle { min-width: 68px; }
  .mobile-top > .lesh-i18n-switcher .lesh-i18n-globe { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lesh-i18n-switcher *, .lesh-i18n-switcher { transition: none !important; }
}
