/* One compact language control for every authenticated and public header. */
.language-flag {
  display: none;
}
.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
  align-items: center;
}

.language-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.language-switcher select {
  width: 76px;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid #d9bea0;
  border-radius: 10px;
  background: #fffaf2;
  color: #573a25;
  font:
    600 14px/1.5 "Noto Sans Thai",
    "DeeDog Korean UI",
    Tahoma,
    sans-serif;
  cursor: pointer;
}
.language-switcher select:focus-visible {
  outline: 3px solid #267b78;
  outline-offset: 3px;
}
.header-actions > .language-switcher,
.topbar-actions > .language-switcher {
  order: -1;
}
html:lang(en) {
  font-family: Tahoma, Arial, sans-serif;
}
html:lang(zh-Hans) body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
html:lang(ja) body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif;
}
.ep-header-inner {
  flex-wrap: wrap;
}
.ep-header-label {
  flex: 1;
  min-width: 0;
}
.ep-balances > .ep-balance {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ep-header-inner > .language-switcher {
  margin-left: auto;
  order: 2;
}
.ep-header-inner #epLogout {
  order: 3;
  font-size: 14px;
  padding: 8px 10px;
}
.saas-body .topbar-actions {
  flex-shrink: 0;
}
.saas-body .page-header-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 1060px) {
  .language-switcher select {
    width: 78px;
    font-size: 16px;
  }
  body[data-page] .header-actions {
    gap: 6px;
  }
  body[data-page] .header-inner {
    gap: 10px;
  }
  .saas-body .topbar {
    height: auto;
  }
}
@media (max-width: 350px) {
  body[data-page] .header-inner .brand-logo {
    width: 90px;
    height: 60px;
  }
  body[data-page] .login-link {
    width: 44px;
    min-width: 44px;
    justify-content: center;
    padding-inline: 0;
  }
  body[data-page] .login-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .ep-header-label {
    order: 4;
    flex-basis: 100%;
    border: 0;
    padding-left: 0;
  }
}
@media (max-width: 720px) {
  .ep-header .ep-header-inner {
    gap: 10px;
  }
  .ep-header .ep-logo {
    width: 90px;
    height: 66px;
  }
  .ep-header .ep-header-label {
    order: 4;
    flex-basis: 100%;
    border: 0;
    padding-left: 0;
    font-size: 14px;
  }
  .ep-header .ep-header-inner #epLogout {
    font-size: 14px;
  }
  .ep-account .ep-balances {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1061px) {
  .language-switcher {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--theme-line, #d9bea0);
    border-radius: 50%;
    background: var(--theme-surface, #fffaf2);
  }
  .language-switcher .language-flag {
    position: absolute;
    inset: 6px;
    display: block;
    overflow: hidden;
    border-radius: 50%;
  }
  .language-flag svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.5);
  }
  .language-switcher select[data-language-select] {
    position: absolute;
    inset: -1px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    padding: 0;
    opacity: 0;
    cursor: pointer;
  }
  .language-switcher:focus-within {
    outline: 3px solid var(--theme-accent, #267b78);
    outline-offset: 3px;
  }
}
