/* ============================================================
 * 页面专属样式：首页（Bing 风）/ 书签管理页 / 登录页 / 设置页
 * ============================================================ */

/* ==================== 首页 ==================== */
/* 一屏布局：整页 100vh 不滚动，内容纵向自适应排布 */
.home-hero {
  height: 100vh; position: relative;
  display: flex; flex-direction: column; align-items: center;
  /* 加载期底色：与背景图上的遮罩渐变一致，避免设置到达前的白屏闪烁 */
  background-color: #1e3a5f;
  background-image: linear-gradient(rgba(15,23,42,.22), rgba(15,23,42,.42));
  background-size: cover; background-position: center;
  transition: background-image .6s ease;
  padding: 56px 20px 14px;
  overflow: hidden;
}
.home-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px;
}
.home-top a {
  color: #fff; font-size: 14px; padding: 7px 14px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.22); backdrop-filter: blur(10px);
  transition: all 0.2s ease; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.home-top a:hover { background: rgba(0, 0, 0, 0.36); text-decoration: none; }

/* 轮换诗句：第一行完整诗句，第二行出处（一屏内紧凑） */
.home-verse {
  text-align: center; margin-bottom: 14px; min-height: 58px;
  animation: verseIn 1.1s ease both;
  max-width: 720px; padding: 0 12px;
}
.verse-main {
  color: #fff; font-size: 21px; font-weight: 600; letter-spacing: 2px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  line-height: 1.4;
}
.verse-sub {
  color: rgba(255, 255, 255, 0.72); font-size: 12.5px; margin-top: 7px;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
@keyframes verseIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: none; }
}

/* 中央搜索区（一屏：适中上边距，剩余空间留给分组） */
.home-center {
  width: 100%; max-width: 620px; margin-top: 3vh;
  display: flex; flex-direction: column; align-items: center;
  animation: fadeUp 0.6s ease both;
  position: relative; z-index: 5;
}

/* 搜索框（毛玻璃） */
.search-box {
  width: 100%; min-width: 0; position: relative;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px; backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  display: flex; align-items: center;
  transition: all 0.25s ease;
}
.search-box:focus-within {
  box-shadow: 0 10px 48px rgba(37, 99, 235, 0.35);
  background: rgba(255, 255, 255, 0.9);
}
.search-box .icon { margin: 0 0 0 18px; color: var(--text-light); width: 20px; height: 20px; }
.search-box input {
  flex: 1 1 0; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 16px; padding: 16px 12px 16px 12px; color: var(--text); font-family: inherit;
}
.search-box input::placeholder { color: #94a3b8; }
.search-clear {
  border: none; background: rgba(0, 0, 0, 0.05); cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%; margin-right: 8px;
  color: var(--text-light); font-size: 14px; line-height: 1;
  display: none;
}
.search-box.has-value .search-clear { display: block; }
.search-go {
  border: none; cursor: pointer; background: var(--primary); color: #fff;
  padding: 9px 22px; border-radius: 999px; margin-right: 7px; font-size: 14px;
  transition: background 0.2s ease;
}
.search-go:hover { background: var(--primary-dark); }
.search-go.bing { background: #0f766e; color: #fff; font-weight: 600; }
.search-go.bing:hover { background: #115e59; }

/* 搜索建议浮层（毛玻璃） */
.sug-panel {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 20; animation: popIn 0.18s ease;
}
.sug-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer; transition: background 0.12s ease;
}
.sug-item:hover, .sug-item.active { background: rgba(37, 99, 235, 0.12); }
.sug-item .sug-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-item .sug-url { font-size: 12px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-item .sug-main { flex: 1; min-width: 0; }
.sug-empty { padding: 18px; text-align: center; color: var(--text-light); font-size: 13px; }
/* 必应搜索行 */
.sug-bing {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; font-size: 13.5px; color: #00796b; cursor: pointer;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}
.sug-bing:hover { background: rgba(0, 121, 107, 0.08); }

/* 常用书签：横向分组 Tab（一屏内弹性填充剩余高度） */
.hot-zone {
  width: 100%; max-width: var(--hot-max, 960px); margin-top: 3vh;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  animation: fadeUp 0.8s ease 0.15s both;
}
/* Tab 条 */
.hot-tabs {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; min-width: 0;
}
.hot-tabs-scroll {
  display: flex; gap: 8px; overflow-x: auto; min-width: 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.hot-tabs-scroll::-webkit-scrollbar { display: none; }
.hot-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.18); color: #fff; font-size: 13px;
  font-family: inherit; white-space: nowrap;
  backdrop-filter: blur(8px); transition: all .18s ease;
}
.hot-tab:hover { background: rgba(0,0,0,.34); }
.hot-tab.active {
  background: #fff; color: #2563eb; border-color: #fff; font-weight: 600;
}
.hot-tab-n {
  font-size: 10.5px; opacity: .8;
  background: rgba(255,255,255,.22); border-radius: 999px;
  padding: 0 6px; line-height: 16px;
}
.hot-tab.active .hot-tab-n { background: rgba(37,99,235,.15); }
.hot-tab-del {
  font-style: normal; font-size: 10px; margin-left: 2px;
  width: 15px; height: 15px; display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(220,38,38,.85); color: #fff;
}
.hot-tab-del:hover { background: #dc2626; }
.hot-tab-add { padding: 6px 12px; }
/* 「新增」按钮：紧挨在「管理」左侧，白底蓝字更醒目 */
.hot-add-btn {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.94);
  color: #1d4ed8; font-size: 12px; font-weight: 600;
  padding: 3px 12px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease; font-family: inherit;
  backdrop-filter: blur(6px); box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.hot-add-btn:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.hot-add-btn:active { transform: translateY(0); }
.hot-add-btn + .hot-manage-btn { margin-left: 8px; }
.hot-manage-btn {
  margin-left: auto; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.18);
  color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 999px;
  cursor: pointer; transition: all .18s ease; font-family: inherit;
  backdrop-filter: blur(6px); flex: none;
}
.hot-manage-btn:hover { background: rgba(0,0,0,.32); }
.hot-manage-btn.active { background: #fff; color: #2563eb; border-color: #fff; font-weight: 600; }
/* 固定 5 列（4 行 × 5 个 = 20/组）；一屏内自动缩放行高 */
.hot-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  grid-auto-rows: minmax(78px, 1fr); align-content: start;
}
/* 卡片统一尺寸：min-height + 弹性（一屏内不溢出），图标固定、文字单行省略 */
.hot-cell {
  min-height: 78px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 8px 6px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.hot-cell:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
/* 管理模式：格子禁用跳转、显示操作按钮 */
.hot-cell.managing { cursor: default; }
.hot-cell.managing:hover { transform: none; }
.hot-cell.managing .hot-ops { opacity: 1; pointer-events: auto; }
/* 操作条固定在格子顶部一条，不盖图标 */
.hot-ops {
  position: absolute; top: 0; left: 0; right: 0; height: 28px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 14px 14px 0 0;
  backdrop-filter: blur(2px);
}
.hot-op {
  width: 24px; height: 24px; border-radius: 6px; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: #1f2937;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.hot-op:hover { background: #fff; transform: scale(1.08); }
.hot-op.danger { color: #dc2626; }
.hot-op .icon { width: 13px; height: 13px; }
/* 图标区：统一 40px（bookmark-icon :size=40），容器同样固定 */
.hot-cell-icon { display: flex; justify-content: center; flex: none; }
.hot-cell.managing { padding-top: 32px; }
/* 添加常用格子 */
.hot-cell.add-cell { border-style: dashed; background: rgba(255,255,255,.08); }
.hot-cell.add-cell:hover { background: rgba(255,255,255,.2); }
/* 拖拽排序（管理模式）：抓取光标 + 拖起半透明 + 落点高亮 */
.hot-cell.managing { cursor: grab; }
.hot-cell.dragging { opacity: .35; }
.hot-cell.dragover {
  outline: 2px dashed rgba(255,255,255,.85);
  outline-offset: -3px;
  background: rgba(255,255,255,.28);
}
.hot-drag-tip {
  margin-top: 10px; text-align: center;
  color: rgba(255,255,255,.62); font-size: 11.5px; letter-spacing: 1px;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
/* 文字：固定单行省略，所有卡片文字宽度一致 */
.hot-name {
  font-size: 12px; color: #fff; width: 100%;
  text-align: center; padding: 0 4px;
  line-height: 1.4; min-height: 17px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.hot-empty { color: rgba(255, 255, 255, 0.85); font-size: 13px; padding: 18px 0; text-align: center; }
@media (max-width: 720px) { .hot-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .hot-grid { grid-template-columns: repeat(3, 1fr); } }

/* ==================== 首页 2026-11 增强 ==================== */
/* 背景拆成“图 + 遮罩”两层，才能单独模糊/调透明度 */
.home-hero {
  height: 100vh; height: 100dvh;
  padding: 40px var(--home-edge, 20px) 96px;
  overflow-x: hidden; overflow-y: auto;
  background-image: none;
  background-color: #16304d;
}
.hero-bg {
  position: absolute; inset: -24px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(var(--bg-blur, 0px));
  transform: scale(1.04);
  transition: filter 0.2s ease;
  pointer-events: none;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  transition: background 0.2s ease;
}
.home-center, .hot-zone { position: relative; }
.home-center { z-index: 5; margin-top: 1.6vh; }
.hot-zone { z-index: 1; }

/* 时间 / 农历：诗句上方的小字信息 */
.home-time {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 10px; margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78); font-size: 12.5px;
  letter-spacing: 0.6px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.home-clock {
  font-size: 17px; font-weight: 600; letter-spacing: 1.5px;
  color: #fff; font-variant-numeric: tabular-nums;
}
.home-date { opacity: 0.86; }
.home-lunar, .home-jieqi { opacity: 0.72; }
.home-jieqi::before { content: "·"; margin-right: 8px; opacity: 0.5; }

/* 搜索引擎选择器 */
.engine-picker { position: relative; flex: none; margin-right: 6px; }
.engine-btn {
  display: flex; align-items: center; gap: 3px;
  border: 0; background: rgba(15, 23, 42, 0.06);
  color: #475569; font: inherit; font-size: 12px;
  padding: 6px 9px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s ease;
  max-width: 92px;
}
.engine-btn:hover { background: rgba(15, 23, 42, 0.12); }
.engine-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engine-caret { font-size: 9px; opacity: 0.6; }
.engine-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  width: 156px; padding: 5px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 11px; box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  animation: popIn 0.14s ease both;
}
.engine-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  border: 0; background: transparent; color: #334155;
  font: inherit; font-size: 13px; text-align: left;
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
}
.engine-item:hover { background: rgba(37, 99, 235, 0.09); color: #1d4ed8; }
.engine-item.active { color: #1d4ed8; font-weight: 600; }
.engine-check { color: #2563eb; font-size: 12px; }
.engine-config {
  width: 100%; border: 0; border-top: 1px solid #f1f5f9;
  background: transparent; color: #64748b; font: inherit; font-size: 11.5px;
  padding: 8px 10px; margin-top: 3px; text-align: left; cursor: pointer;
}
.engine-config:hover { color: #2563eb; }
.search-box { padding-right: 5px; }
.search-box input { padding: 14px 10px; }
.search-go { padding: 9px 18px; margin: 0 2px 0 2px; font-size: 13px; }
.search-go.bing { background: var(--primary); }
.sug-bing.sug-site { color: #2563eb; border-top-color: rgba(37, 99, 235, 0.1); }
.sug-bing.sug-site:hover { background: rgba(37, 99, 235, 0.07); }

/* 分组 Tab / 翻页器 / 小按钮 */
.hot-tabs { flex-wrap: wrap; row-gap: 8px; }
.hot-tabs-scroll { flex: 1 1 520px; }
.hot-icon-btn {
  flex: none; width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.18);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s ease;
}
.hot-icon-btn:hover { background: rgba(0, 0, 0, 0.34); }
.hot-add-btn { margin-left: auto; }
.hot-manage-btn { margin-left: 0; }
.group-pager {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: -2px 0 10px; color: rgba(255, 255, 255, 0.72);
  font-size: 11.5px; letter-spacing: 0.5px;
}
.gp-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.18);
  color: #fff; font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.gp-btn:hover { background: rgba(0, 0, 0, 0.34); }
.gp-dots { display: flex; align-items: center; gap: 5px; }
.gp-dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.36); cursor: pointer;
  transition: all 0.18s ease;
}
.gp-dot.active { width: 16px; border-radius: 999px; background: #fff; }
.gp-label { min-width: 92px; text-align: center; }

/* 可变尺寸网格 + 组件卡 */
.hot-grid {
  grid-template-columns: repeat(var(--hot-cols, 5), minmax(0, 1fr));
  grid-auto-rows: var(--hot-cell-h, 78px);
  grid-auto-flow: dense;
}
.hot-cell { min-height: var(--hot-cell-h, 78px); }
.hot-cell.widget {
  align-items: stretch; text-decoration: none; justify-content: flex-start;
  gap: 8px; padding: 12px 13px; text-align: left;
  cursor: pointer; color: #fff; text-decoration: none;
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
}
.hot-cell.widget:hover {
  text-decoration: none;
  background: rgba(15, 23, 42, 0.44);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.widget-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.9);
}
.widget-head .icon { width: 14px; height: 14px; opacity: 0.8; }
.widget-more { margin-left: auto; font-size: 10.5px; font-weight: 400; opacity: 0.55; }
.widget-list { display: flex; flex-direction: column; gap: 7px; min-height: 0; flex: 1; overflow: hidden; }
.widget-row {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; font-size: 12px; color: rgba(255, 255, 255, 0.9);
}
.widget-time {
  flex: none; font-size: 11px; color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums; min-width: 38px;
}
.widget-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-empty { color: rgba(255, 255, 255, 0.5); font-size: 11.5px; padding-top: 4px; }
.mail-widget .mail-unread-count {
  margin-left: auto; flex: none; font-size: 9.5px; font-weight: 700;
  color: #1e3a8a; background: #bfdbfe; border-radius: 999px; padding: 1px 6px;
}
.mail-widget .widget-more { margin-left: 2px; }
.mail-row { gap: 6px; }
.mail-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; background: rgba(255,255,255,.28); }
.mail-dot.unread { background: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.18); }
.mail-row .widget-title { color: rgba(255,255,255,.92); }
.hot-cell.widget.widget-managing {
  cursor: grab; border-style: dashed; border-color: rgba(147, 197, 253, 0.7);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.35);
}
.hot-cell.widget.widget-managing:hover { transform: none; }
.hot-cell.widget.widget-managing:active { cursor: grabbing; }
.widget-grip {
  position: absolute; top: 6px; right: 8px;
  font-size: 11px; letter-spacing: -2px; color: rgba(255, 255, 255, 0.55);
  pointer-events: none; user-select: none;
}
.widget-managing .widget-more { visibility: hidden; }
.widget-resize {
  position: absolute; right: 2px; bottom: 2px;
  width: 18px; height: 18px; cursor: nwse-resize;
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.5) 47% 53%, transparent 54% 64%, rgba(255,255,255,.5) 65% 71%, transparent 72%);
  opacity: 0.8;
}
.widget-resize:hover { opacity: 1; background-color: rgba(255, 255, 255, 0.12); }
body.widget-dragging, body.widget-dragging * { user-select: none !important; cursor: grabbing !important; }
body.widget-resizing, body.widget-resizing * { user-select: none !important; cursor: nwse-resize !important; }

.hot-empty-inline { padding-top: 12px; }

/* 底部 Dock */
.home-dock {
  position: fixed; left: 50%; bottom: 16px; z-index: 30;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.dock-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 54px; height: 50px;
  border: 0; border-radius: 12px; background: transparent;
  color: rgba(255, 255, 255, 0.72); font: inherit; font-size: 9.5px;
  text-decoration: none; cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.dock-item:hover { background: rgba(255, 255, 255, 0.13); color: #fff; text-decoration: none; }
.dock-item.active { background: rgba(255, 255, 255, 0.17); color: #fff; }
.dock-item .icon { width: 19px; height: 19px; }

/* 专注模式：只留时间/诗句/搜索 */
.focus-mode .hot-zone,
.focus-mode .home-dock { display: none; }
.focus-mode .home-hero { padding-bottom: 40px; }
.focus-exit {
  position: fixed; top: 16px; right: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.26);
  color: #fff; font: inherit; font-size: 12px; padding: 6px 12px;
  border-radius: 999px; cursor: pointer; backdrop-filter: blur(10px);
}
.focus-exit:hover { background: rgba(0, 0, 0, 0.42); }
.focus-exit .icon { width: 13px; height: 13px; }

/* 外观抽屉 */
.appr-mask { position: fixed; inset: 0; z-index: 160; background: rgba(2, 6, 23, 0.38); }
.appr-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 161;
  width: 324px; max-width: 92vw;
  background: #ffffff;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.28);
  display: flex; flex-direction: column;
  animation: apprIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes apprIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.appr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #eef2f7;
  font-size: 15px; font-weight: 600; color: #1f2937;
}
.appr-body { padding: 16px 18px 22px; overflow-y: auto; }
.appr-field { margin-bottom: 16px; }
.appr-field label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: #475569; margin-bottom: 7px;
}
.appr-field label b { color: #2563eb; font-weight: 600; }
.seg { display: flex; gap: 5px; padding: 4px; border-radius: 10px; background: #eef2f7; }
.seg button {
  flex: 1; border: 0; background: transparent; color: #64748b;
  font: inherit; font-size: 12.5px; padding: 7px 4px; border-radius: 7px; cursor: pointer;
}
.seg button.active { background: #fff; color: #1d4ed8; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
.appr-toggle {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #f1f5f9; padding: 11px 2px;
  font-size: 13.5px; color: #334155; cursor: pointer;
}
.appr-toggle > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appr-toggle input { width: 18px; height: 18px; accent-color: #2563eb; }
.appr-range { width: 100%; accent-color: #2563eb; }
.appr-actions { display: flex; gap: 8px; margin-top: 18px; }
.appr-hint { margin-top: 12px; font-size: 11.5px; line-height: 1.6; color: #94a3b8; }
.seg-quick { margin-top: 7px; }
.seg-quick button { font-size: 11.5px; padding: 5px 2px; }
.appr-sub {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 0 8px 12px; margin: -2px 0 4px;
  border-left: 2px solid #e2e8f0;
}
.appr-sub label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: #475569; padding: 6px 2px; cursor: pointer;
}
.appr-sub input { width: 17px; height: 17px; accent-color: #2563eb; }
.appr-widget-tools { margin-top: 2px; }
.appr-widget-tools .hint { font-size: 11.5px; line-height: 1.6; color: #94a3b8; margin-top: 7px; }

/* 移动端：导航收进 Dock，网格降列，组件卡整行 */
@media (max-width: 720px) {
  .home-hero { padding: 24px max(10px, var(--home-edge, 20px)) 92px; }
  .home-time { gap: 7px; font-size: 11px; margin-bottom: 10px; }
  .home-clock { font-size: 15px; }
  .home-verse { min-height: 52px; }
  .verse-main { font-size: 18px; letter-spacing: 1px; }
  .verse-sub { font-size: 11px; }
  .home-center { margin-top: 2vh; }
  .search-box .icon { margin-left: 12px; width: 18px; height: 18px; }
  .search-box input { padding: 12px 8px; font-size: 14px; }
  .search-go { padding: 8px 12px; font-size: 12.5px; }
  .engine-btn { max-width: 72px; font-size: 11px; padding: 5px 7px; }
  .hot-tabs-scroll { flex: 1 1 100%; order: 1; }
  .hot-add-btn, .hot-manage-btn, .hot-icon-btn { order: 2; }
  .hot-add-btn { margin-left: 0; }
  .group-pager { margin-top: 0; }
  .hot-grid { grid-template-columns: repeat(4, 1fr); gap: 9px; }
  .hot-cell.widget {
    grid-column: 1 / -1 !important; grid-row: auto !important;
    min-height: auto; padding: 11px 12px;
  }
  .widget-grip, .widget-resize { display: none !important; }
  .home-dock {
    left: 10px; right: 10px; bottom: 10px; transform: none;
    justify-content: space-around; padding: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }
  .dock-item { width: auto; flex: 1; height: 46px; font-size: 9px; }
  .dock-item .icon { width: 18px; height: 18px; }
  .appr-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none;
    max-height: 84vh; border-radius: 18px 18px 0 0;
    animation: apprUp 0.24s ease both;
  }
  @keyframes apprUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 480px) {
  .hot-grid { grid-template-columns: repeat(3, 1fr); }
  .engine-btn { padding: 5px 8px; max-width: 62px; font-size: 10.5px; }
}
@media (max-width: 380px) {
  .dock-item span { display: none; }
  .dock-item { height: 40px; }
}

/* ==================== 首页书签右键 / 长按菜单 ==================== */
.ctx-mask { position: fixed; inset: 0; z-index: 140; background: transparent; }
.ctx-menu {
  position: fixed; z-index: 141;
  width: 214px; max-height: min(72vh, 430px); overflow: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  font-size: 13.5px; color: #1f2937;
  animation: ctxIn 0.12s ease both;
}
@keyframes ctxIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.ctx-head {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px 9px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 4px;
}
.ctx-head-main { min-width: 0; flex: 1; }
.ctx-title {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ctx-url {
  font-size: 11px; color: #6b7280; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ctx-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 0; background: transparent;
  border-radius: 8px; color: inherit; font: inherit; text-align: left;
  cursor: pointer; line-height: 1.35;
  transition: background 0.13s ease, color 0.13s ease;
}
.ctx-item:hover, .ctx-item:focus-visible {
  background: rgba(37, 99, 235, 0.1); color: #1d4ed8; outline: none;
}
.ctx-item .icon { width: 15px; height: 15px; color: #64748b; flex: none; }
.ctx-item:hover .icon { color: #1d4ed8; }
.ctx-item.danger { color: #dc2626; }
.ctx-item.danger .icon { color: #dc2626; }
.ctx-item.danger:hover { background: #fee2e2; color: #b91c1c; }
.ctx-item.is-muted { opacity: 0.5; }
.ctx-item.is-muted:hover { background: transparent; color: inherit; }
.ctx-item.is-muted:hover .icon { color: #64748b; }
.ctx-arrow { margin-left: auto; color: #94a3b8; font-size: 15px; line-height: 1; }
.ctx-sep { height: 1px; background: rgba(15, 23, 42, 0.08); margin: 4px 6px; }
.ctx-sub-head {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 7px 7px; margin-bottom: 3px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px; color: #6b7280; font-weight: 500;
}
.ctx-back {
  border: 0; background: transparent; cursor: pointer;
  color: #2563eb; font: inherit; font-size: 18px; line-height: 1;
  padding: 0 4px 1px; border-radius: 5px;
}
.ctx-back:hover { background: rgba(37, 99, 235, 0.1); }
.ctx-empty { padding: 12px 10px 14px; color: #94a3b8; font-size: 12.5px; text-align: center; }
.ctx-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-count {
  font-size: 11px; color: #64748b; background: rgba(15, 23, 42, 0.06);
  border-radius: 999px; padding: 0 7px; line-height: 18px; flex: none;
}
@media (max-width: 720px) {
  .ctx-menu { width: 224px; font-size: 14px; }
  .ctx-item { padding: 10px 10px; }
  .ctx-head { padding: 8px 10px 10px; }
}

/* ==================== 添加常用选择器（首页弹窗内） ==================== */
.picker-list { margin-top: 12px; max-height: 340px; overflow: auto; }
.picker-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 6px; border-bottom: 1px solid #f1f5f9;
}
.picker-row:last-child { border-bottom: none; }
.picker-main { flex: 1; min-width: 0; }
.picker-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-url { font-size: 12px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分类平铺标签条（替代下拉框） */
.cat-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 14px; margin-bottom: 16px;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(30, 41, 59, 0.14); background: rgba(255, 255, 255, 0.7);
  font-size: 13.5px; color: var(--fg-soft, #475569);
  transition: all 0.18s ease; font-family: inherit;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.cat-chip.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}
.cat-chip .cat-n {
  font-size: 11.5px; opacity: 0.75; background: rgba(0, 0, 0, 0.07);
  padding: 0 7px; border-radius: 999px; line-height: 18px;
}
.cat-chip.active .cat-n { background: rgba(255, 255, 255, 0.25); }

/* ==================== 系统管理（管理员） ==================== */
.cfg-row {
  display: flex; align-items: center; gap: 20px;
  padding: 13px 0; border-bottom: 1px solid #f1f5f9;
}
.cfg-row:last-of-type { border-bottom: none; }
.cfg-main { flex: 1; min-width: 0; }
.cfg-title { font-size: 14.5px; font-weight: 600; }
.cfg-desc { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #cbd5e1; border-radius: 26px; transition: .25s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 用户表 */
.user-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ut-head, .ut-row {
  display: grid; grid-template-columns: 2.2fr 1fr .5fr .5fr 1fr 1.7fr;
  gap: 10px; align-items: center; padding: 10px 14px;
}
.ut-head {
  background: #f8fafc; font-size: 12.5px; color: var(--text-light);
  font-weight: 500; border-bottom: 1px solid var(--border);
}
.ut-row { border-bottom: 1px solid #f5f7fa; transition: background .15s ease; }
.ut-row:last-child { border-bottom: none; }
.ut-row:hover { background: #fbfdff; }
.ut-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ut-avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: #e2e8f0; color: #475569;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.ut-avatar.admin { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.ut-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ut-self {
  font-size: 10.5px; background: #dbeafe; color: #1d4ed8;
  padding: 0 6px; border-radius: 999px; font-weight: 500;
}
.ut-sub { font-size: 12px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-noemail { color: #b45309; }
.ut-role {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: #f1f5f9; color: #475569; width: fit-content;
}
.ut-role.admin { background: #fef3c7; color: #b45309; }
.ut-num { font-size: 13.5px; color: var(--text); }
.ut-time { font-size: 12.5px; color: var(--text-light); }
.ut-ops { display: flex; gap: 4px; justify-content: flex-end; }
.ut-ops .btn-sm { padding: 3px 9px; }
@media (max-width: 860px) {
  .ut-head { display: none; }
  .ut-row { grid-template-columns: 1fr; gap: 6px; }
  .ut-ops { justify-content: flex-start; }
}

/* 图形验证码 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-input { flex: 1; letter-spacing: 4px; font-weight: 600; font-size: 15px; }
.captcha-img {
  width: 170px; height: 48px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); flex: none; background: #f1f5f9;
}
.captcha-refresh { width: 40px; font-size: 18px; padding: 0; }
.captcha-hint {
  font-size: 12px; color: #b45309; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px;
  padding: 7px 10px; margin: -6px 0 14px;
}

/* ==================== 设置页 TAB ==================== */
.settings-nav { margin-bottom: 20px; }
.settings-sections {
  display: inline-flex; gap: 4px; margin-bottom: 10px; padding: 4px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
}
.settings-sections button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; color: #64748b;
  font: inherit; font-size: 13.5px; padding: 8px 18px;
  border-radius: 9px; cursor: pointer; transition: all .18s ease;
}
.settings-sections button:hover { color: var(--primary); }
.settings-sections button.active {
  background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.settings-sections .icon { width: 15px; height: 15px; }
.settings-nav .tabs { margin-bottom: 0; }

@media (max-width: 720px) {
  .settings-nav .tab { font-size: 12px; gap: 3px; padding: 9px 1px; white-space: nowrap; }
  .settings-nav .tab .icon { width: 14px; height: 14px; }
}

.tabs {
  display: flex; gap: 8px; padding: 8px; margin-bottom: 20px;
}
.tabs .tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 0; border: none; background: rgba(255, 255, 255, 0.55);
  border-radius: 12px; font-size: 15px; font-family: inherit;
  color: var(--fg-soft, #475569); cursor: pointer;
  transition: all 0.2s ease;
}
.tabs .tab:hover { color: var(--primary); background: rgba(255, 255, 255, 0.85); }
.tabs .tab.active {
  background: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ---- 账号安全 TAB：左右两栏（每栏内部纵向堆叠） ---- */
.acc-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start;
}
.acc-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acc-col .card { margin-bottom: 0; }
@media (max-width: 820px) {
  .acc-layout { grid-template-columns: 1fr; }
}

/* 账号名片 */
.acc-profile { display: flex; align-items: center; gap: 16px; }
.acc-avatar {
  width: 62px; height: 62px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.acc-ident { min-width: 0; }
.acc-name {
  font-size: 19px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-sub { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.acc-role {
  display: inline-block; margin-top: 6px; font-size: 11px;
  background: #fef3c7; color: #b45309; border: 1px solid #fde68a;
  padding: 1px 9px; border-radius: 999px;
}

/* 账号信息 2×2 网格 */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .kv-grid { grid-template-columns: 1fr; } }
.kv-cell {
  background: #f8fafc; border: 1px solid #eef2f7;
  border-radius: 10px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.kv-k { font-size: 12px; color: var(--text-light); }
.kv-v {
  font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 密码卡提示 */
.acc-note {
  margin-top: 12px; font-size: 12px; color: var(--text-light); text-align: center;
}

/* ==================== 操作日志（设置页） ==================== */
/* 日志筛选区：两行布局，呼吸感 */
.log-filter { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.lf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lf-row2 { padding-top: 10px; border-top: 1px dashed rgba(30,41,59,.12); }
.lf-refresh { margin-left: auto; }
.lf-select { min-width: 150px; flex: 0 0 auto; }
.lf-input { flex: 1; min-width: 200px; }
.lf-user { flex: 0 0 180px; }
@media (max-width: 720px) {
  .lf-user { flex: 1 1 100%; }
}
.log-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
/* 普通用户 6 列：时间 | 来源 | IP | 操作 | 对象 | 详情 */
.lt-head, .lt-row {
  display: grid;
  grid-template-columns: 150px 58px 110px 1.2fr 1.4fr 1.6fr;
  gap: 10px; align-items: center; padding: 9px 14px; font-size: 13px;
}
/* 管理员 7 列：多一个用户列 */
.log-table.admin .lt-head,
.log-table.admin .lt-row {
  grid-template-columns: 150px 88px 58px 105px 1.1fr 1.3fr 1.5fr;
}
.lt-head {
  background: #f8fafc; color: var(--text-light); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.lt-row { border-bottom: 1px solid #f5f7fa; transition: background .12s ease; }
.lt-row:last-child { border-bottom: none; }
.lt-row:hover { background: #fbfdff; }
.lt-time { color: var(--text-light); font-family: Consolas, Menlo, monospace; font-size: 12px; }
.lt-user { font-weight: 600; }
.lt-ip {
  color: #0e7490; font-family: Consolas, Menlo, monospace; font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lt-src {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; width: fit-content;
  background: #e0e7ff; color: #4338ca;
}
.lt-src.mcp { background: #fce7f3; color: #be185d; }
.lt-action { font-weight: 500; }
.lt-target, .lt-detail {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-light); font-size: 12.5px;
}
.log-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
@media (max-width: 820px) {
  .lt-head { display: none; }
  .lt-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ==================== 管理页 ==================== */
/* 宽布局：两侧留边距 */
.page-wrap-wide { max-width: none; padding-left: 24px; padding-right: 24px; }
.bm-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px; align-items: start;
  padding: 16px 24px 56px;
}
@media (max-width: 860px) {
  .bm-layout { grid-template-columns: 1fr; }
  .bm-side { order: 2; }
}

/* 左侧目录树 */
.bm-side { position: sticky; top: 74px; padding: 14px 10px; }
.side-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  padding: 2px 10px 10px; border-bottom: 1px solid rgba(30,41,59,.08);
  margin-bottom: 6px; letter-spacing: 1px;
}
.side-head .spacer { flex: 1; }
.side-newcat { padding: 2px 8px; }
.tree-row { position: relative; }
.tree-ops { display: none; gap: 2px; position: absolute; right: 8px; }
.tree-row:hover .tree-ops { display: inline-flex; }
.tree-op {
  font-style: normal; font-size: 11px; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; color: var(--text-light); cursor: pointer;
  background: rgba(255,255,255,.75);
}
.tree-op:hover { background: #fff; color: var(--text); }
.tree-op-danger:hover { background: #fee2e2; color: #dc2626; }
/* 目录删除策略选项 */
.cat-del-option { margin: 0 8px 10px 0; }
.side-tree { max-height: calc(100vh - 190px); overflow: auto; padding: 2px 4px; }
.tree-level { display: flex; flex-direction: column; }
.tree-node { margin: 1px 0; }
.tree-row {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text);
  transition: background .15s ease; user-select: none;
}
.tree-row:hover { background: rgba(37,99,235,.08); }
.tree-row.active { background: rgba(37,99,235,.13); color: var(--primary); font-weight: 600; }
.tree-arrow {
  width: 16px; flex: none; text-align: center; color: var(--text-light);
  font-size: 11px; cursor: pointer; line-height: 1;
}
.tree-arrow.tree-leaf { cursor: default; }
.tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
  font-size: 11px; color: var(--text-light);
  background: rgba(30,41,59,.07); padding: 0 7px; border-radius: 999px; line-height: 18px;
}
.tree-row.active .tree-count { background: rgba(37,99,235,.18); color: var(--primary); }

/* 右侧大卡片网格 */
.bm-main { min-width: 0; }
.bm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.bm-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; position: relative;
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.2s ease; animation: fadeUp 0.3s ease both;
  cursor: pointer; user-select: none;
}
.bm-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c7d2fe; }
.bm-card.checked { background: #eff6ff; border-color: #93c5fd; }
.bm-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bm-title {
  font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1;
}
.bm-url { font-size: 13px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-desc {
  font-size: 13px; color: var(--text-light);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.bm-foot { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 20px; }
.bm-ops {
  display: flex; gap: 4px; border-top: 1px solid #f1f5f9; padding-top: 10px; margin-top: 2px;
}

/* ComboBox（分类/标签：可下拉可输入） */
.combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 240px; overflow: auto;
}
.combo-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; font-size: 13.5px; cursor: pointer;
}
.combo-item:hover, .combo-item.sel { background: rgba(37,99,235,.08); color: var(--primary); }
.combo-item.isnew { color: #047857; font-weight: 600; }
.tag-editor { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; min-height: 4px; }
.tag-chip { cursor: default; }
.tag-x { font-style: normal; margin-left: 4px; cursor: pointer; opacity: .6; }
.tag-x:hover { opacity: 1; }

/* 单选框组（日志来源） */
.radio-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; font-size: 13.5px; color: var(--text-light);
  transition: all .15s ease;
}
.radio-chip:hover { border-color: var(--primary); color: var(--primary); }
.radio-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.radio-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ==================== 文件站：左侧目录树 + 右侧列表 ==================== */
.file-station {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px; align-items: start;
}
@media (max-width: 860px) { .file-station { grid-template-columns: 1fr; } }

.fs-side { position: sticky; top: 74px; padding: 12px 10px; }
.fs-side-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  padding: 2px 10px 10px; border-bottom: 1px solid rgba(30,41,59,.08);
  margin-bottom: 6px; letter-spacing: 1px;
}
.fs-side-head .spacer { flex: 1; }
.fs-newroot { padding: 2px 8px; }
.fs-tree { max-height: calc(100vh - 200px); overflow: auto; padding: 2px 2px; }
.fs-tree-level { display: flex; flex-direction: column; }
.fs-node { margin: 1px 0; }
.fs-node-row {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text);
  transition: background .15s ease; user-select: none;
}
.fs-node-row:hover { background: rgba(37,99,235,.08); }
.fs-node-row.active { background: rgba(37,99,235,.13); color: var(--primary); font-weight: 600; }
.fs-arrow {
  width: 16px; flex: none; text-align: center; color: var(--text-light);
  font-size: 11px; cursor: pointer; line-height: 1;
}
.fs-folder-ico { width: 14px; height: 14px; flex: none; color: #d97706; }
.fs-node-row.active .fs-folder-ico { color: #2563eb; }
.fs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-count { font-size: 11px; color: var(--text-light); }
.fs-node-ops { display: none; gap: 2px; }
.fs-node-row:hover .fs-node-ops { display: inline-flex; }
.fs-op {
  font-style: normal; font-size: 11px; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; color: var(--text-light); cursor: pointer;
}
.fs-op:hover { background: rgba(30,41,59,.1); color: var(--text); }
.fs-op-danger:hover { background: #fee2e2; color: #dc2626; }
.fs-main { min-width: 0; }

/* 目录删除策略选项 */
.fd-option { margin: 0 8px 10px 0; }

/* 文件 TAB：我的公开访问地址栏 */
.site-base-bar {
  margin-bottom: 12px; padding: 12px 14px;
  background: linear-gradient(180deg, #f0fdfa, #ecfeff);
  border: 1px solid #99f6e4; border-radius: 10px;
}
.site-base-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #0f766e; margin-bottom: 8px;
}
.site-base-row { display: flex; gap: 8px; align-items: center; }
.site-base-input {
  font-family: Consolas, Menlo, monospace; font-size: 13px;
  background: #fff; color: #0f766e;
}
.site-base-bar .hint { margin-top: 7px; }
.site-base-bar .hint code {
  font-family: Consolas, Menlo, monospace; font-size: 12px;
  background: #fff; padding: 1px 6px; border-radius: 5px; color: #0f766e;
}
/* 背景：当前外链背景展示 */
.bg-url-current {
  margin-top: 8px; font-size: 12.5px; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bg-url-current code {
  font-family: Consolas, Menlo, monospace; font-size: 11.5px;
  background: #f8fafc; padding: 2px 7px; border-radius: 6px; color: #0e7490;
}

/* 静态文件表 */
.file-upload-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 14px;
  background: #f8fafc; border: 1px dashed var(--border); border-radius: 10px;
}
.file-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ft-head, .ft-row {
  /* 文件名 | 大小 | 公开URL(窄,超长省略) | 时间 | 操作 */
  display: grid; grid-template-columns: minmax(140px, 2.4fr) 70px minmax(120px, 1.5fr) 120px minmax(180px, 2fr);
  gap: 10px; align-items: center; padding: 10px 14px;
}
.ft-head {
  background: #f8fafc; font-size: 12.5px; color: var(--text-light); font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.ft-row { border-bottom: 1px solid #f5f7fa; transition: background .15s ease; }
.ft-row:last-child { border-bottom: none; }
.ft-row:hover { background: #fbfdff; }
.ft-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ft-size { font-size: 12.5px; color: var(--text-light); }
.ft-url { min-width: 0; overflow: hidden; }
.ft-url code {
  font-family: Consolas, Menlo, monospace; font-size: 11.5px;
  background: #f8fafc; padding: 3px 7px; border-radius: 6px;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #0e7490; max-width: 100%;
}
.ft-time { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.ft-ops { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
@media (max-width: 860px) {
  .ft-head { display: none; }
  .ft-row { grid-template-columns: 1fr; gap: 6px; }
  .ft-ops { justify-content: flex-start; }
}
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 20px 60px; }

/* 工具栏 */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 16px; margin-bottom: 16px;
}
.toolbar .input, .toolbar .select { width: auto; }
/* 搜索框加宽（响应式，占满工具栏剩余空间） */
.toolbar .kw {
  flex: 1 1 420px; min-width: 280px; max-width: 620px;
  height: 38px; font-size: 14.5px; padding: 8px 14px;
}
@media (max-width: 720px) {
  .toolbar .kw { flex: 1 1 100%; min-width: 0; max-width: none; }
}
.toolbar .spacer { flex: 1; }
.toolbar .btn-sm { padding: 7px 12px; }
.toolbar .select-all { margin-left: 12px; white-space: nowrap; color: var(--text-light); }
.toolbar .select-all input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* 批量操作条 */
.batchbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 16px; margin-bottom: 14px;
  background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius); font-size: 13.5px;
}

/* 书签网格卡片 —— 新版定义见上方「右侧大卡片网格」，此处仅保留共享小件 */
.bm-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.bm-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: #eef2ff; color: #4f46e5; cursor: pointer;
}
.bm-cat {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; width: fit-content; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.pin-flag {
  position: absolute; top: 10px; right: 10px; color: #f59e0b; font-size: 13px;
}
.sel-badge {
  position: absolute; top: 10px; left: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}
.bm-ops .btn-ghost { font-size: 12.5px; padding: 3px 8px; }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.pager .pg-btn {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  font-size: 13.5px; color: var(--text); transition: all 0.15s ease;
}
.pager .pg-btn:hover:not(:disabled):not(.cur) { border-color: var(--primary); color: var(--primary); }
.pager .pg-btn.cur { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 图标选择行（编辑弹窗内） */
.icon-row { display: flex; gap: 10px; align-items: center; }
.icon-row .input { flex: 1; }

/* 导入弹窗 */
.import-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 30px 20px; text-align: center; color: var(--text-light);
  cursor: pointer; transition: all 0.2s ease; font-size: 14px;
}
.import-drop:hover { border-color: var(--primary); background: rgba(37, 99, 235, 0.04); color: var(--primary); }
.import-preview { margin-top: 14px; max-height: 300px; overflow: auto; }
.import-preview table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.import-preview th, .import-preview td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.import-preview th { color: var(--text-light); font-weight: 500; }
.import-preview td { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== 回收站（最近删除） ==================== */
.trash-list { max-height: 58vh; overflow: auto; margin: 0 -4px; }
.trash-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid #f1f5f9;
}
.trash-row:last-child { border-bottom: none; }
.trash-main { flex: 1; min-width: 0; }
.trash-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trash-url {
  font-size: 11.5px; color: var(--text-light); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trash-time {
  font-size: 11.5px; color: #94a3b8; white-space: nowrap;
  font-family: Consolas, Menlo, monospace;
}
@media (max-width: 640px) {
  .trash-row { flex-wrap: wrap; }
  .trash-main { flex: 1 1 calc(100% - 50px); }
  .trash-time { margin-left: 44px; }
}

/* ==================== 登录页 ==================== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 100%);
  background-size: cover;
}
.login-card {
  width: 100%; max-width: 440px; padding: 34px 32px 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  animation: popIn 0.35s ease both;
}
.login-logo { text-align: center; font-size: 26px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-sub { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 22px; }
.login-tabs {
  display: flex; background: #eef2f7; border-radius: 10px; padding: 4px; margin-bottom: 20px;
}
.login-tabs button {
  flex: 1; border: none; background: transparent; padding: 8px; border-radius: 8px;
  font-size: 14px; cursor: pointer; color: var(--text-light); transition: all 0.2s ease;
}
.login-tabs button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.login-error {
  background: #fef2f2; color: var(--danger); border: 1px solid #fecaca;
  padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
}
.login-main-btn { width: 100%; padding: 11px; font-size: 15px; }
.login-step-hint { margin: 10px 0 2px; text-align: center; font-size: 12px; color: var(--text-light); }
.login-sent {
  background: #f0f7ff; border: 1px solid #dbeafe; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 16px; text-align: center;
}
.login-sent-title { font-size: 13px; color: #1e40af; font-weight: 600; }
.login-sent-mail { margin-top: 3px; font-size: 14px; color: #0f172a; font-weight: 600; word-break: break-all; }
.login-sent-sub { margin-top: 4px; font-size: 11.5px; color: #64748b; }
.email-code-input { letter-spacing: 6px; font-size: 18px; font-weight: 700; text-align: center; }
.login-back {
  display: block; margin: 12px auto 0; border: 0; background: transparent;
  color: var(--text-light); font: inherit; font-size: 12.5px; cursor: pointer;
}
.login-back:hover { color: var(--primary); text-decoration: underline; }

/* ==================== 设置页 ==================== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .settings-grid { grid-template-columns: 1fr; } }

.bg-choices { display: flex; gap: 12px; flex-wrap: wrap; }
.bg-choice {
  width: 110px; height: 70px; border-radius: 10px; cursor: pointer;
  background-size: cover; background-position: center;
  border: 3px solid transparent; transition: all 0.2s ease; position: relative;
}
.bg-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bg-choice.active { border-color: var(--primary); }
.bg-choice .tag {
  position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #fff;
  background: rgba(0, 0, 0, 0.45); padding: 1px 7px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.bg-preview {
  height: 150px; border-radius: var(--radius); margin: 14px 0;
  background-size: cover; background-position: center;
  border: 1px solid var(--border);
}
.key-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 4px; border-bottom: 1px solid #f1f5f9; gap: 10px;
}
.key-row:last-child { border-bottom: none; }
.key-name { font-size: 14px; font-weight: 500; }
.key-meta { font-size: 12px; color: var(--text-light); }
.new-key-box {
  background: #ecfdf5; border: 1px solid #a7f3d0; padding: 14px; border-radius: 10px;
  margin-top: 12px;
}
.new-key-box code {
  display: block; word-break: break-all; font-size: 13px;
  background: #fff; padding: 10px; border-radius: 8px; margin: 8px 0;
  border: 1px dashed #6ee7b7; user-select: all;
}

/* ============================================================
 * 设置页 · 提醒管理（TAB）
 * ============================================================ */
.rem-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.rem-filter .select { width: 132px; }
.rem-kw { flex: 1; min-width: 180px; max-width: 320px; }
.rem-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rem-head, .rem-row {
  display: grid;
  grid-template-columns: 52px 1.6fr 78px 1.25fr 96px 62px 122px 150px 108px;
  gap: 10px; align-items: center; padding: 9px 14px; font-size: 13px;
}
.rem-head {
  background: #f8fafc; color: var(--text-light); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.rem-row { border-bottom: 1px solid #f5f7fa; transition: background .12s ease; }
.rem-row:last-child { border-bottom: none; }
.rem-row:hover { background: #fbfdff; }
.rem-row.off { opacity: .6; }
.rem-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rem-subject { font-style: normal; color: var(--text-light); font-size: 12px; margin-left: 6px; }
.rem-tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #eef2f7; color: #475569; white-space: nowrap; }
.rem-tag.cat-birthday { background: #fef3c7; color: #b45309; }
.rem-tag.cat-todo { background: #fee2e2; color: #b91c1c; }
.rem-tag.cat-daily { background: #dcfce7; color: #15803d; }
.rem-tag.cat-custom { background: #e0e7ff; color: #4338ca; }
.rem-rule, .rem-adv, .rem-ch, .rem-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.rem-next { color: #0e7490; font-family: Consolas, Menlo, monospace; font-size: 12px; }
.rem-ops { display: flex; gap: 6px; justify-content: flex-end; }
.rem-ops .btn { padding: 2px 8px; line-height: 18px; }
.rem-del { color: #dc2626; }
.rem-tip { margin-top: 14px; font-size: 12px; line-height: 1.7; }
.modal.rem-modal { max-width: 560px; }
.rem-modal .modal-body { max-height: 66vh; overflow-y: auto; }
.rem-form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.rem-chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .rem-head { display: none; }
  .rem-row { grid-template-columns: 1fr; gap: 4px; }
  .rem-ops { justify-content: flex-start; }
}

/* ==================== 2026-11 左侧竖向导航 / 固定搜索 / 文件夹 / 月历 ==================== */
#app { --rail-w: 176px; --rail-left: 12px; }

/* 浮起式磨砂侧栏：轻玻璃质感，和浅色页面统一 */
.side-rail {
  position: fixed; left: var(--rail-left); top: 12px; bottom: 12px; z-index: 45;
  width: var(--rail-w);
  display: flex; flex-direction: column;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(255,255,255,.9), rgba(248,250,252,.76));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 24px 60px rgba(15,23,42,.22), 0 2px 8px rgba(15,23,42,.08),
              inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  color: #334155;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}
.side-rail.is-hidden {
  transform: translateX(calc(-100% - var(--rail-left) - 16px));
  opacity: 0; pointer-events: none;
}

/* 顶部品牌 */
.rail-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 12px 10px;
}
.rail-logo {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
}
.rail-logo .icon { width: 16px; height: 16px; }
.rail-title {
  flex: 1; min-width: 0;
  font-size: 13.5px; font-weight: 700; letter-spacing: .5px; color: #0f172a;
}
.rail-collapse {
  flex: none; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.rail-collapse:hover { background: #eef4ff; color: #2563eb; }
.rail-collapse .icon { width: 14px; height: 14px; }

/* 收起后的展开把手：左上角小页签 */
.rail-show {
  position: fixed; left: 0; top: 80px; z-index: 44;
  width: 28px; height: 56px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.7); border-left: 0;
  border-radius: 0 14px 14px 0;
  background: rgba(255,255,255,.82); color: #334155;
  box-shadow: 0 8px 24px rgba(15,23,42,.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: width .18s ease, background .18s ease, color .18s ease;
}
.rail-show:hover { width: 32px; background: #fff; color: #2563eb; }
.rail-show .icon { width: 15px; height: 15px; }

/* 列表区 */
.rail-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 0 8px 8px;
  scrollbar-width: thin;
}
.rail-body::-webkit-scrollbar { width: 4px; }
.rail-body::-webkit-scrollbar-thumb { background: rgba(100,116,139,.22); border-radius: 2px; }
.rail-caption {
  padding: 5px 10px 7px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; color: #94a3b8;
}
.rail-list { display: flex; flex-direction: column; gap: 3px; }

.rail-item {
  position: relative; width: 100%; min-height: 38px;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 0; border-radius: 10px;
  background: transparent; color: #475569;
  font: inherit; font-size: 12.5px; font-weight: 500;
  text-align: left; text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rail-item:hover {
  background: rgba(37,99,235,.07); color: #1d4ed8; text-decoration: none;
}
.rail-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-weight: 600;
  box-shadow: 0 7px 16px rgba(37,99,235,.28);
}
.rail-item .icon {
  width: 16px; height: 16px; flex: none;
  opacity: .8; transition: opacity .15s ease;
}
.rail-item:hover .icon, .rail-item.active .icon { opacity: 1; }
.rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-count {
  flex: none; font-size: 10px; font-weight: 600; color: #64748b;
  background: #eef2f7; border-radius: 999px; padding: 0 6px; line-height: 16px;
  transition: background .15s ease, color .15s ease;
}
.rail-item.active .rail-count { background: rgba(255,255,255,.24); color: #fff; }
.rail-del {
  flex: none; font-style: normal; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(220,38,38,.12); color: #dc2626; font-size: 9px;
}
.rail-item.active .rail-del { background: rgba(255,255,255,.25); color: #fff; }
.rail-sep { height: 1px; margin: 7px 8px; background: rgba(15,23,42,.07); }

/* 分组操作 */
.rail-actions {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid rgba(15,23,42,.07);
}
.rail-action {
  min-height: 32px; display: flex; align-items: center; gap: 8px;
  padding: 5px 9px; border: 0; border-radius: 9px;
  background: transparent; color: #64748b;
  font: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.rail-action:hover { background: rgba(37,99,235,.07); color: #1d4ed8; }
.rail-action.active { background: #e8f0ff; color: #1d4ed8; font-weight: 600; }
.rail-action .icon { width: 14px; height: 14px; flex: none; }
.rail-action-add { color: #2563eb; }

/* 底部模式切换：分段控件 */
.rail-mode {
  flex: none; margin: 8px; padding: 3px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: rgba(15,23,42,.055); border-radius: 12px;
}
.rail-mode button {
  min-height: 32px; padding: 0; border: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: transparent; color: #64748b;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rail-mode button:hover { color: #1d4ed8; }
.rail-mode button.active {
  background: #fff; color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(15,23,42,.12);
}
.rail-mode .icon { width: 14px; height: 14px; }

/* 内容区：搜索/时间固定，书签区单独滚动 */
.home-hero {
  padding: 28px var(--home-edge, 20px) 20px
           calc(var(--rail-left) + var(--rail-w) + var(--home-edge, 20px));
  overflow: hidden;
  transition: padding-left .28s cubic-bezier(.2,.8,.2,1), background-image .6s ease;
}
.home-hero.focus-mode, .home-hero.rail-hidden { padding-left: var(--home-edge, 20px); }
.home-center { flex: none; margin-top: 0.6vh; }
.hot-zone {
  flex: 1; min-height: 0; margin-top: 26px;
  overflow-y: auto; overflow-x: hidden;
  padding: 4px 4px 24px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.hot-zone::-webkit-scrollbar { width: 5px; }
.hot-zone::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 3px; }

/* 时间优先，诗句其次 */
.home-time {
  flex-direction: column; gap: 1px; margin-bottom: 16px; text-align: center;
}
.home-clock {
  font-size: 54px; font-weight: 700; letter-spacing: 2px;
  line-height: 1.02; color: #fff; text-shadow: 0 2px 22px rgba(0,0,0,.35);
  font-variant-numeric: tabular-nums;
}
.home-time-sub {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 9px; font-size: 12px; color: rgba(255,255,255,.82);
  letter-spacing: .6px; text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.home-lunar { color: #fff; opacity: 1; }
.home-jieqi { color: #fff; opacity: .9; }
.home-jieqi::before { content: "·"; margin-right: 7px; opacity: .5; }
.home-verse { min-height: auto; margin-bottom: 22px; max-width: 820px; }
.home-verse.verse-inline {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  gap: 10px; max-width: 900px;
}
.home-verse.verse-inline .verse-sub { display: inline; margin-top: 0; }
.verse-main {
  font-size: 16px; font-weight: 500; letter-spacing: 1px;
  color: rgba(255,255,255,.86); line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0,0,0,.4);
  display: inline;
}
.verse-sub { display: block; font-size: 10.5px; margin-top: 3px; color: rgba(255,255,255,.62); letter-spacing: 1px; }

/* 文件夹卡片 / 弹层 */
.folder-cell {
  justify-content: center; gap: 0; cursor: pointer;
  background: rgba(255,255,255,.14);
  border-radius: 16px;
}
.folder-cell:hover { background: rgba(255,255,255,.26); }
.folder-mini {
  display: grid; grid-template-columns: repeat(2, 24px);
  grid-auto-rows: 24px; gap: 4px; flex: none;
}
.folder-mini.f1 { grid-template-columns: 24px; }
.folder-mini .bm-icon { border-radius: 6px; }
.folder-count {
  position: absolute; top: 5px; right: 7px;
  font-size: 9.5px; color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.35); border-radius: 999px; padding: 0 5px; line-height: 15px;
}
.folder-modal {
  max-width: 820px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px) saturate(1.2);
  animation: folderIn .18s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes folderIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.folder-modal .modal-head { color: #fff; border-bottom-color: rgba(255,255,255,.12); }
.folder-modal .x-btn { color: rgba(255,255,255,.7); }
.folder-modal .x-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.folder-sheet-body { padding: 18px; }
.folder-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; max-height: 60vh; overflow: auto;
}
.folder-app {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 0; padding: 10px 6px; border: 0; border-radius: 14px;
  background: transparent; color: #fff; font: inherit; cursor: pointer;
  transition: background .15s ease;
}
.folder-app:hover { background: rgba(255,255,255,.12); }
.folder-app-title {
  width: 100%; text-align: center; font-size: 12px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(255,255,255,.88);
}
.folder-sheet-body::-webkit-scrollbar, .folder-grid::-webkit-scrollbar { width: 4px; }
.folder-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

/* 月历组件 */
.widget-cal { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3px; }
.widget-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: rgba(255,255,255,.72); line-height: 1;
}
.widget-cal-head button {
  border: 0; background: transparent; color: rgba(255,255,255,.7);
  font: inherit; font-size: 14px; line-height: 1; padding: 1px 5px;
  border-radius: 5px; cursor: pointer;
}
.widget-cal-head button:hover { background: rgba(255,255,255,.14); color: #fff; }
.widget-cal-week, .widget-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.widget-cal-week span { text-align: center; font-size: 9.5px; color: rgba(255,255,255,.42); line-height: 1; }
.widget-cal-grid { flex: 1; grid-auto-rows: 1fr; gap: 1px; min-height: 0; }
.widget-cal-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  gap: 0; line-height: 1; border-radius: 4px; font-size: 10.5px;
  color: rgba(255,255,255,.82); min-height: 0; overflow: hidden;
}
.widget-cal-num { line-height: 1.15; }
.widget-cal-lunar {
  font-style: normal; font-size: 9px; line-height: 1.15;
  color: rgba(255,255,255,.68); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.widget-cal-day.today .widget-cal-lunar { color: #1d4ed8; opacity: .78; }
.widget-cal:not(.lunar-on) .widget-cal-lunar { display: none; }
.widget-cal-day.has {
  background: rgba(96, 165, 250, .10);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .28);
}
.widget-cal-day.has-reminder {
  background: rgba(245, 158, 11, .15);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .38);
}
.widget-cal-day.today { background: rgba(255,255,255,.92); }
.widget-cal-count {
  position: absolute; top: 1px; right: 1px; z-index: 1;
  min-width: 13px; height: 13px; padding: 0 3px;
  border-radius: 7px; background: #3b82f6; color: #fff;
  font-size: 8.5px; font-weight: 800; line-height: 13px; text-align: center;
  box-shadow: 0 1px 4px rgba(37,99,235,.35);
}
.widget-cal-count.reminder {
  background: #f59e0b; color: #3f2a00;
  box-shadow: 0 1px 4px rgba(245,158,11,.45);
}
.widget-cal-day.today .widget-cal-count { background: #1d4ed8; color: #fff; }
.widget-cal-day.today .widget-cal-count.reminder { background: #f59e0b; color: #3f2a00; }
.widget-cal-day.out { opacity: .24; }
.widget-cal-day:hover { background: rgba(255,255,255,.14); }
.widget-cal-day.today:hover { background: #fff; }
.widget-cal-day.today { background: rgba(255,255,255,.92); color: #1d4ed8; font-weight: 700; }
.widget-cal-day.has i {
  position: absolute; bottom: 2px; right: 3px;
  width: 3px; height: 3px; border-radius: 50%; background: #93c5fd;
}
.widget-cal-day.today i { background: #2563eb; }
.widget-cal.cal-compact .widget-cal-week,
.widget-cal.cal-compact .widget-cal-grid { display: none; }

@media (max-width: 1100px) {
  #app { --rail-w: 158px; --rail-left: 10px; }
}
@media (max-width: 720px) {
  #app { --rail-w: 96px; --rail-left: 8px; }
  .side-rail { top: 8px; bottom: 8px; border-radius: 16px; }
  .rail-head { padding: 10px 7px 7px; gap: 6px; justify-content: space-between; }
  .rail-logo { width: 24px; height: 24px; border-radius: 7px; }
  .rail-logo .icon { width: 13px; height: 13px; }
  .rail-title { display: none; }
  .rail-collapse { width: 20px; height: 20px; }
  .rail-body { padding: 0 5px 5px; }
  .rail-caption { display: none; }
  .rail-item { min-height: 38px; padding: 5px 6px; gap: 5px; font-size: 10.5px; border-radius: 8px; }
  .rail-item .icon { width: 14px; height: 14px; }
  .rail-count { display: none; }
  .rail-del { width: 14px; height: 14px; font-size: 8px; }
  .rail-actions { margin-top: 6px; padding-top: 6px; gap: 1px; }
  .rail-action { min-height: 30px; padding: 4px 6px; font-size: 10.5px; gap: 5px; border-radius: 7px; }
  .rail-action .icon { width: 12px; height: 12px; }
  .rail-mode { margin: 5px; padding: 2px; border-radius: 9px; }
  .rail-mode button { min-height: 29px; font-size: 10.5px; gap: 0; border-radius: 7px; }
  .rail-mode .icon { display: none; }
  .home-hero {
    padding: 18px max(8px, var(--home-edge, 20px)) 16px
             calc(var(--rail-left) + var(--rail-w) + max(8px, var(--home-edge, 20px)));
  }
  .home-clock { font-size: 38px; letter-spacing: 1px; font-weight: 700; }
  .home-time-sub { font-size: 10.5px; gap: 6px; }
  .verse-main { font-size: 13.5px; }
  .verse-sub { font-size: 9.5px; }
  .home-verse { margin-bottom: 14px; }
  .home-verse.verse-inline { gap: 6px; }
  .home-verse.verse-inline .verse-sub { font-size: 9.5px; }
  .hot-zone { margin-top: 16px; padding: 2px 2px 18px; }
  .hot-grid { grid-auto-rows: auto; }
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .folder-sheet-body { padding: 14px; }
  .folder-app-title { font-size: 11px; }
}
@media (max-width: 420px) {
  #app { --rail-w: 92px; --rail-left: 6px; }
  .rail-label { font-size: 10px; }
}

/* 主机监控 */
.monitor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:6px; }
.monitor-card { padding:13px 14px; border:1px solid #e5edf8; border-radius:10px; background:#fbfdff; }
.monitor-card-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; color:#526d86; font-size:12px; }
.monitor-card-head b { color:#16324f; font-size:20px; letter-spacing:-.3px; }
.monitor-bar { height:7px; border-radius:999px; background:#e8f1fb; overflow:hidden; margin:9px 0 7px; }
.monitor-bar i { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#3b82f6,#60a5fa); transition:width .4s ease; }
.monitor-bar.mem i { background:linear-gradient(90deg,#8b5cf6,#a78bfa); }
.monitor-bar.disk i { background:linear-gradient(90deg,#f59e0b,#fbbf24); }
.monitor-bar.jvm i { background:linear-gradient(90deg,#10b981,#34d399); }
.monitor-sub { color:#8aa0b7; font-size:10.5px; line-height:1.65; }
.monitor-foot { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:12px; padding-top:9px; border-top:1px solid #eef4fb; color:#9aafc2; font-size:10.5px; }
@media (max-width:760px) { .monitor-grid { grid-template-columns:1fr; } }

/* 完整备份 */
.backup-list { display:flex; flex-direction:column; gap:6px; }
.backup-row { display:flex; align-items:center; gap:12px; padding:9px 11px; border:1px solid #e5edf8; border-radius:9px; background:#fbfdff; }
.backup-main { flex:1; min-width:0; }
.backup-name { font-size:12px; font-weight:650; color:#24415e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.backup-meta { margin-top:3px; font-size:10.5px; color:#8aa0b7; }
.backup-ops { display:flex; gap:4px; flex:none; }
.backup-empty { display:flex; flex-direction:column; align-items:center; gap:4px; padding:34px 10px; color:#9aafc2; font-size:11px; text-align:center; }
.backup-empty .icon { width:30px; height:30px; color:#b8d3ee; margin-bottom:2px; }
.backup-empty b { font-size:12.5px; color:#65809a; }
.backup-note { margin-top:12px; padding:9px 11px; border-radius:8px; background:#f8fbff; border:1px dashed #dbe7f7; color:#7f96ad; font-size:10.5px; line-height:1.7; }
.backup-note code { color:#2563eb; }
@media (max-width:640px) { .backup-row { align-items:flex-start; } .backup-ops { flex-direction:column; } }
