/* Koko 导航 — Glance 自定义样式（经 document.head 全局注入，对所有主题生效） */

/* ---------- 壁纸：仅亮色主题生效，暗色 preset 自动回退纯色 ---------- */
/* 壁纸放固定伪元素（合成层），替代 background-attachment: fixed 的滚动整页重绘 */
html[data-scheme="light"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(hsl(220 23% 95% / 0.70), hsl(220 23% 96% / 0.78)),
    url("/assets/wallpaper.jpg") center 30% / cover no-repeat;
}

/* 亮色下卡片半透保证可读性；不用 backdrop-filter（滚动时每帧重采样背景，是卡顿主因） */
html[data-scheme="light"] .widget {
  background-color: hsl(var(--color-widget-background-hsl-values) / 0.93);
}

/* ---------- 字号自适应：Glance rem 基准固定（桌面 10px → 正文 13px 偏小），按视口宽度上调 ---------- */
/* 桌面（>1190px 为 Glance 的桌面/移动断点）：+10% */
@media (min-width: 1191px) {
  :root { font-size: 11px; }
}
/* 超宽屏（≥2560 CSS px，如 34 寸带鱼屏）：字号再放大一档 + 侧栏加宽。
   内容带保持固定 1920px：中栏 ~1210px 恰好落在书签网格 3 列/行档（850–1249px），
   6 组书签排成 2×3、3 组排成 1×3，两台显示器布局完全一致，只放大字号 */
@media (min-width: 2560px) {
  :root { font-size: 12.5px; }
  .page-column-small { width: 340px; }
}

/* ---------- 书签：名称与描述拉开层级 ---------- */
.bookmarks-link {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

/* 描述行（li 内第二个、非 flex 的 div） */
.widget-type-bookmarks li > div:not(.flex) {
  color: var(--color-text-subdue);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* ---------- 克制动效 ---------- */
/* 卡片进场：轻微上浮淡入，按序错落 */
.widget {
  animation: glance-fade-up 0.35s ease backwards;
}
.widget:nth-of-type(2) { animation-delay: 0.04s; }
.widget:nth-of-type(3) { animation-delay: 0.08s; }
.widget:nth-of-type(4) { animation-delay: 0.12s; }
.widget:nth-of-type(5) { animation-delay: 0.16s; }
.widget:nth-of-type(6) { animation-delay: 0.20s; }

@keyframes glance-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 书签行 hover：轻位移提示可点击 */
.widget-type-bookmarks li {
  transition: transform 0.15s ease;
  border-radius: var(--border-radius);
}
.widget-type-bookmarks li:hover {
  transform: translateX(3px);
}
.bookmarks-link:hover {
  color: var(--color-primary);
}

/* 尊重系统减弱动效设置 */
@media (prefers-reduced-motion: reduce) {
  .widget { animation: none; }
  .widget-type-bookmarks li { transition: none; }
}
