/* 顶栏语言入口独立于业务导航；小图标保留足够的点击面积。 */
.header-actions { display: flex; align-items: center; justify-self: end; gap: 16px; }
.header-language { position: relative; flex: none; }
.header-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #92969e;
  background: transparent;
  cursor: pointer;
}
.header-language-globe { width: 16px; height: 16px; flex: none; }
.header-language-caret { width: 0; height: 0; border-inline: 3px solid transparent; border-top: 4px solid currentColor; }
.header-language-toggle:focus-visible,
.header-language-option:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* 浮层与图标右边对齐；实底遮挡背景，不使用额外的模糊层。 */
.header-language-popover {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  z-index: 1;
  width: 156px;
  padding: 8px;
  border: 1px solid rgba(13, 16, 20, .06);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(18, 24, 36, .12);
}
.header-language-popover[hidden] { display: none; }
.header-language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.header-language-option[aria-current="true"] { background: #f3f3f3; }
/* 英文站尚未开放：保持正常文字外观，点击不跳转也不收起浮层。 */
.header-language-option[aria-disabled="true"] { cursor: default; }
.header-language-check { width: 16px; height: 16px; }
@media (max-width: 680px) {
  .header-actions { gap: 4px; }
  .header-language-toggle { width: 32px; }
  .site-header { padding-left: 16px; padding-right: 10px; }
  /* 手机浮层在整个操作组右侧对齐，避免语言按钮靠左时溢出屏幕。 */
  .header-language-popover { right: -120px; top: calc(100% + 12px); }
}
@media (max-width: 380px) {
  .site-header { width: calc(100vw - 20px); padding-left: 12px; padding-right: 8px; }
  .site-header .brand b, .site-header .brand small { font-size: 18px; }
  .header-actions .nav-cta { min-width: 108px; padding-inline: 10px; }
  .header-language-popover { right: -112px; }
}
