/* Local placement candidate; verify against actual theme at every breakpoint. */
#site-header .header-inner { gap: 12px; }
.ecs-language-switch { position: relative; z-index: 10006; flex: 0 0 auto; color: #0b2545; font-family: var(--font-body), sans-serif; font-size: 12px; font-weight: 700; }
.ecs-language-switch summary { display: flex; align-items: center; justify-content: center; gap: 7px; list-style: none; min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid rgba(11,37,69,.28); border-radius: 8px; cursor: pointer; background: rgba(255,255,255,.42); }
.ecs-language-switch summary::-webkit-details-marker { display: none; }
.ecs-language-switch svg { stroke: currentColor; fill: none; stroke-width: 1.4; }
.ecs-language-switch summary:focus-visible, .ecs-language-options a:focus-visible, .ecs-language-options button:focus-visible { outline: 2px solid #715619; outline-offset: 3px; }
.ecs-language-options { position: absolute; right: 0; top: calc(100% + 9px); width: 164px; padding: 7px; margin: 0; list-style: none; background: #fff; border: 1px solid #d4dade; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.ecs-language-options li { margin: 0; padding: 0; }
.ecs-language-options a, .ecs-language-options button { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; padding: 10px 12px; border-radius: 6px; color: #0b2545; font-size: 14px; line-height: 1.5; white-space: nowrap; text-decoration: none; }
.ecs-language-options a[aria-current="page"], .ecs-language-options button[aria-pressed="true"] { background: #f1eee5; color: #72591a; }
.ecs-language-options a:hover, .ecs-language-options button:hover { background: #edf1f4; }
@media (min-width: 1024px) { #site-header .nav-links li a { padding-left: 9px; padding-right: 9px; } }
@media (max-width: 1023px) {
  #site-header .header-inner { padding: 0 14px; gap: 10px; }
  #site-header .logo { min-width: 0; flex: 1 1 auto; }
  #site-header .logo a { font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
  #site-header .logo-sub { font-size: 8px; letter-spacing: .02em; }
  #site-header .header-inner > nav { order: 3; }
  .ecs-language-switch { order: 2; }
  .ecs-language-globe { display: none; }
  .ecs-language-switch summary { padding: 0 8px; gap: 5px; }
  .ecs-language-options { right: -34px; }
  /* Preserve the theme's existing hamburger/nav behavior at this wider break. */
  #site-header .menu-toggle { display: flex; }
  #site-header .nav-links { position: fixed; top: 0; right: 0; width: 100%; height: 100vh; background: rgba(240,245,241,.98); display: flex!important; flex-direction: column; justify-content: center; align-items: center; transform: translateX(100%); visibility: hidden; z-index: 9999; padding: 84px 32px 32px; gap: 0; }
  #site-header .nav-links.active { transform: translateX(0)!important; visibility: visible!important; }
  #site-header .menu-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #site-header .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
  #site-header .menu-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.menu-open { overflow: hidden; }
  #site-header .nav-links li { width: 100%; text-align: center; }
  #site-header .nav-links li a { font-size: 1.05rem; padding: 14px 0; display: block; color: var(--color-primary-dark); border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .ecs-language-switch * { scroll-behavior: auto; transition: none; } }

.ecs-language-options button { width: 100%; text-align: left; font-family: inherit; border: 0; background: transparent; cursor: pointer; }
.ecs-language-options [data-ecs-language-status]:not([hidden]) { padding: 8px 10px; color: #596674; font-size: 12px; line-height: 1.5; font-weight: 400; }

/* Translation-scope labels do not modify the linked documents or image assets. */
.ecs-original-media-note { margin: 12px 0; font-size: 12px; line-height: 1.65; color: var(--color-text-sub, #5a6a7e); font-weight: 400; }
.ecs-original-media-note:empty { display: none; }
/* Existing system fonts only: no new font service, download or tracking endpoint. */
html[lang="zh-Hans"] { --font-main: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif; --font-heading: 'Songti SC', 'SimSun', serif; }

/* Foreign editor content: allow long links/tokens to wrap inside the existing column. */
html[lang="en"] .entry-content,
html[lang="zh-Hans"] .entry-content,
html[lang="en"] .slide-content,
html[lang="zh-Hans"] .slide-content { overflow-wrap: anywhere; }
