/* ============================================================
   Like Memo · Apple 风格 — S2 Liquid Glass 组件库
   导航层专用玻璃（Apple 金科玉律：玻璃不上内容层）
   Chromium: SVG 折射增强 / 其他：优雅降级为 blur
   ============================================================ */

/* —— 基础玻璃 —— */
.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-edge-hi), var(--shadow-float);
  /* Chromium 折射增强（JS 检测后加 .lg-refract） */
  isolation: isolate;
}


/* Chromium SVG 折射（由 JS 按需附加） */
.lg-refract {
  -webkit-backdrop-filter: url(#lg-refract) var(--glass-blur);
  backdrop-filter: url(#lg-refract) var(--glass-blur);
}

/* —— 菜单栏（macOS） —— */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 44px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 500;
  background: transparent; border: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  text-shadow: 0 1px 8px rgba(255,255,255,0.5);
}
[data-theme="dark"] .menubar { text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.menubar .mb-left { display: flex; align-items: center; gap: 18px; }
.menubar .mb-logo { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.menubar .mb-item { opacity: 0.85; cursor: default; }
.menubar .mb-right { display: flex; align-items: center; gap: 14px; opacity: 0.85; }

/* —— Dock（macOS） —— */
.dock {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 28px;
  background: rgba(253, 251, 247, 0.55);
  box-shadow: var(--shadow-clay-dock);
}
[data-theme="dark"] .dock { background: rgba(38, 34, 30, 0.55); }
.dock-app {
  position: relative;
  display: block;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--r-md);
  transition: transform var(--dur-fast) var(--ease-spring);
  text-decoration: none; color: inherit;
}
/* macOS 风格悬浮标签 */
.dock-app::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 12px; border-radius: 8px;
  background: rgba(60,60,67,0.85); color: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.dock-app:hover::after { opacity: 1; transform: translateX(-50%); }
.dock-app .dock-icon {
  width: 52px; height: 52px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(90, 70, 50, 0.22));
  transition: transform var(--dur-fast) var(--ease-spring);
}
.dock-app .dock-icon img { width: 100%; height: 100%; display: block; }
.dock-app:hover .dock-icon { transform: scale(1.18) translateY(-6px); }
.dock-app.is-active .dock-icon { transform: scale(1.05); }
/* —— TabBar（iOS） —— */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-around;
  border-radius: 0;
  border-left: none; border-right: none; border-bottom: none;
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--label-3); font-size: 10px; font-weight: 500;
  text-decoration: none; min-width: 56px; padding: 4px;
}
.tabbar-item .tb-icon { display: block; transition: transform var(--dur-fast) var(--ease-spring); }
.tabbar-item .tb-icon img { width: 26px; height: 26px; display: block; }
.tabbar-item.is-active { color: var(--sys-blue); }
.tabbar-item:active .tb-icon { transform: scale(0.88); }

/* Home Indicator */
.home-indicator {
  position: fixed; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px;
  background: var(--label); opacity: 0.35; z-index: 101;
  pointer-events: none;
}

/* —— 状态栏（iOS） —— */
.statusbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(44px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600;
  pointer-events: none;
}
.statusbar .sb-icons { display: flex; gap: 6px; align-items: center; font-size: 12px; }

/* —— 胶囊按钮 —— */

/* —— SVG 折射滤镜（隐藏定义） —— */
.lg-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* TabBar 悬停 */
.tabbar-item { transition: color 0.2s, transform 0.15s var(--ease-spring); }
.tabbar-item:hover { color: var(--label); }
.tabbar-item:hover .tb-icon { transform: translateY(-2px); }
.tabbar-item:active .tb-icon { transform: scale(0.88); }
/* Sheet 抓手悬停 */
.sheet-grabber { transition: background 0.2s, transform 0.2s; }
.sheet:hover .sheet-grabber { background: var(--label-2); transform: scaleX(1.2); }
/* 菜单栏主题按钮 */
.mb-theme { transition: transform 0.2s var(--ease-spring), opacity 0.2s; border-radius: 6px; }
.mb-theme:hover { transform: rotate(20deg) scale(1.15); opacity: 1; }
.mb-theme:active { transform: scale(0.9); }
