/* 斗图工坊 · 多语言切换组件与字体适配 */

.lang-switch { position: relative; flex: none; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 9px;
  border: 1px solid var(--line, #e3e8f1);
  background: #fff; color: var(--ink, #1d2330);
  font-size: 12.5px; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(23, 39, 74, .05);
  transition: .15s;
}
.lang-toggle:hover { border-color: #c7d6f8; background: #f7faff; }
.lang-globe { font-size: 13px; line-height: 1; }
.lang-caret { font-size: 10px; color: var(--muted, #6d7688); }

.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 132px; padding: 6px;
  background: #fff; border: 1px solid var(--line, #e3e8f1); border-radius: 11px;
  box-shadow: 0 12px 32px rgba(23, 39, 74, .14);
  display: none;
}
.lang-switch.open .lang-menu { display: block; }
.lang-item {
  display: block; padding: 7px 10px; border-radius: 7px;
  font-size: 13px; color: var(--ink, #1d2330); text-decoration: none; white-space: nowrap;
}
.lang-item:hover { background: #f1f5fd; }
.lang-item.active { background: var(--accent-soft, #eaf0ff); color: #2b4d9c; font-weight: 600; }

/* 语言字体适配 */
html[lang="ja"] body { font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", "Microsoft YaHei", system-ui, sans-serif; }
html[lang="ko"] body { font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Microsoft YaHei", system-ui, sans-serif; }

@media (max-width: 820px) {
  .header-inner { position: relative; }
  .lang-switch { position: absolute; top: 12px; right: 12px; }
}
