/* 顶栏语言入口独立于业务导航；小图标保留足够的点击面积。 */
.header-actions { display: flex; align-items: center; justify-self: end; gap: 32px; }
.header-language { position: relative; flex: none; }
.header-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 48px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #92969e;
  background: transparent;
  cursor: pointer;
}
/* A larger circular flag badge uses crisp local SVG geometry at every pixel density. */
.header-language-flag { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(13, 16, 20, .09); }
.header-language-flag svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.header-language-label { display: inline-flex; align-items: center; gap: 12px; }
.header-language-option .header-language-flag { width: 24px; height: 24px; }
.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: 188px;
  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 { position: relative; gap: 8px; }
  .header-language { position: static; }
  .header-language-toggle { width: 40px; }
  .site-header { padding-left: 16px; padding-right: 10px; }
  /* 手机浮层在整个操作组右侧对齐，避免语言按钮靠左时溢出屏幕。 */
  .site-header .header-actions .header-language-popover { right: 0; top: calc(100% + 12px); }
  .english-site .site-header .header-actions .header-language-popover { top: calc(100% + 52px); }
}
@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; }
  /* Fit the larger flag at 320px without shrinking the brand or the country badge. */
  .header-language-toggle { width: 36px; gap: 4px; }
  .header-actions .nav-cta { padding-inline: 8px; gap: 6px; }
}
