/* theme-bridge.css —— 把 launchpad 五调色板(zhanhai-theme-tokens.css 的 --theme-*)
   桥接到 biz-explore 自有的核心变量(layout.css 的 --bg-canvas / --accent 等)。
   这样 <html data-palette="sage"> 就能真正改变全站配色。
   载入顺序必须在 layout.css 之后(靠后者相同特异性时胜出)。 */

[data-palette] {
  /* 背景灰阶 → 调色板画布色 */
  --bg-canvas:    var(--theme-canvas);
  --bg-canvas-2:  var(--theme-canvas-soft);
  --bg-secondary: var(--theme-canvas);
  --bg-sidebar:   var(--theme-canvas-soft);

  /* 主色 → 调色板主色 */
  --accent:       var(--theme-primary);
  --accent-hover: var(--theme-primary-hover);
  --accent-bg:    var(--theme-soft);

  /* 功能图标里的蓝色跟随主色，保持整体调性统一 */
  --color-blue:   var(--theme-primary);
  --color-indigo: var(--theme-primary-hover);
}

/* 右上角主题切换控件 */
.theme-switch {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-elevated, rgba(255,255,255,0.92));
  border: 1px solid var(--border-light, rgba(0,0,0,0.08));
  border-radius: 999px;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(0,0,0,0.08));
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.theme-switch .ts-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, border-color .12s ease;
}
.theme-switch .ts-dot:hover { transform: scale(1.15); }
.theme-switch .ts-dot.active {
  border-color: var(--text-primary, #1d1d1f);
  transform: scale(1.1);
}
.theme-switch .ts-dot[data-p="mist"]     { background: #547ea0; }
.theme-switch .ts-dot[data-p="sage"]     { background: #527a68; }
.theme-switch .ts-dot[data-p="coral"]    { background: #b85e61; }
.theme-switch .ts-dot[data-p="lavender"] { background: #74629a; }
.theme-switch .ts-dot[data-p="wheat"]    { background: #8d7040; }

@media (max-width: 640px) {
  .theme-switch { top: 8px; right: 8px; padding: 5px 7px; gap: 5px; }
  .theme-switch .ts-dot { width: 16px; height: 16px; }
}
