/* 语言切换器独立样式（供没有外链 CSS 的页面使用） */
.lang-switcher{ position:relative; display:inline-flex; align-items:center; margin-left:6px; }
.lang-btn{
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.22);
  color:#fff; font-weight:700; font-size:.82rem; line-height:1;
  padding:8px 10px; border-radius:8px; cursor:pointer;
  -webkit-appearance:none; appearance:none;
}
.lang-btn:hover,.lang-btn:focus-visible{ background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.38); color:#fff; outline:none; }
.lang-globe{
  display:inline-block; width:16px; height:16px; flex:0 0 16px;
  font-size:0; line-height:0; color:transparent;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 2.5 15.4 0 18M12 3c-2.5 2.6-2.5 15.4 0 18'/%3E%3C/svg%3E") center/16px 16px no-repeat;
}
.lang-cur{ font-size:.78rem; }
.lang-caret{ font-size:.62rem; opacity:.8; }
.lang-menu{
  position:absolute; top:calc(100% + 10px); right:0; left:auto;
  min-width:184px; margin:0; padding:8px; list-style:none;
  background:#fff; color:#0f1b2d; border:1px solid #e4e9f0; border-radius:12px;
  box-shadow:0 16px 40px rgba(15,27,45,.18);
  opacity:0; visibility:hidden; pointer-events:none; transform:translateY(-6px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s; z-index:1200;
}
.lang-switcher.open .lang-menu{ opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }
.lang-menu li{ list-style:none; }
.lang-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border-radius:8px; color:#0f1b2d; font-size:.9rem; text-decoration:none; white-space:nowrap;
}
.lang-item:hover{ background:rgba(37,99,235,.08); color:#1d4ed8; }
.lang-item.active{ background:rgba(245,158,11,.14); color:#b45309; font-weight:700; }
.lang-item.active::after{ content:"\2713"; font-weight:800; color:#b45309; }
.lang-code{ font-size:.7rem; font-weight:700; color:#64748b; background:#f1f5f9; padding:2px 7px; border-radius:6px; }
html[dir="rtl"] .lang-menu{ right:auto; left:0; }
html[dir="rtl"] .lang-item{ flex-direction:row-reverse; }
