/* ============================================================
   模式切换 Tab 并入顶栏（2026-11-11）
   index.html 已把 .mode-switcher 移进 <header>，本文件负责覆盖：
   - skin.css：.mode-switcher 独立吸顶行（top:52px、居中、下边框）
   - skin.css：.mode-tab min-width:124px（顶栏放不下）
   - desktop-layout.css：dl-on 下把 switcher 当独立行 flex:0 0 46px
   加载顺序必须排在 skin.css / desktop-layout.css / bead-mix.css 之后。
   ============================================================ */

.mode-switcher {
  position: static;
  top: auto;
  z-index: auto;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 顶栏行高有限：胶囊 Tab 收窄 */
.mode-tab {
  min-width: 84px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* skin.css 用 font-size:0 + ::after 去掉「图片生成 / 出库助手」的 emoji，
   ::after 的 13px 字号在顶栏里略大，压到与其余 Tab 一致 */
.mode-tab[data-mode="free"]::after,
.mode-tab[data-mode="outbound"]::after {
  font-size: 13px;
}

/* 标题不再撑满剩余空间：三块（标题 / Tab / 徽章）均分排布 */
.header-left { flex: 0 1 auto; }
.header-right { margin-left: 8px; }

/* 覆盖 desktop-layout.css 的「switcher 是独立一行」假设 */
body.dl-on:not(.ob-mode) .mode-switcher {
  position: relative;
  top: auto;
  flex: 0 1 auto;
}

/* 窄屏：进一步压缩，保证标题 + 3 Tab + 徽章一行放得下 */
@media (max-width: 430px) {
  .mode-tab { min-width: 0; padding: 5px 8px; font-size: 12px; }
  .mode-tab[data-mode="free"]::after,
  .mode-tab[data-mode="outbound"]::after { font-size: 12px; }
  .header h1 { font-size: 14px; }
  .mode-switcher { gap: 4px; }
}
