/* 顶部工具：黑白主题图标、语言切换菜单（桌面 + 移动通用） */

/* 主题图标：浅色显示太阳，深色显示月亮；原站涂鸦图片不再显示 */
.xy-sun-icon,
.xy-moon-icon {
  display: none;
  width: 14px;
  height: 14px;
  flex: none;
}
.home-nav-theme .home-nav-scribble { display: none; }
html:not(.dark) .home-nav-theme .xy-sun-icon { display: block; }
html.dark .home-nav-theme .xy-moon-icon { display: block; }

/* 语言切换：外层定位容器 + 下拉面板 */
.xy-lang { position: relative; display: inline-flex; align-items: center; }

.xy-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 152px;
  padding: 6px;
  display: none;
  background: var(--site-paper, #fcfaf8);
  border: 1px solid var(--site-line, #e5e1d8);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(20, 20, 19, 0.16);
}
.xy-lang-menu[data-open='true'] { display: block; }

.xy-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--site-ink, #141413);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.xy-lang-item:hover { background: var(--site-tint, #e8e8e8); }
.xy-lang-item[aria-current='true'] { font-weight: 600; }

.xy-lang-check {
  width: 14px;
  height: 14px;
  opacity: 0;
  flex: none;
}
.xy-lang-item[aria-current='true'] .xy-lang-check { opacity: 1; }

html.dark .xy-lang-menu { box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55); }
