/* ============================================================
   「Pay3Cents 的博客」 — 台式风格样式
   面板统一为「青绿色调毛玻璃半透明」
   ============================================================ */

:root {
  /* 毛玻璃面板（青绿色调） */
  --bg:            #dfe3dc;   /* 桌面底色 浅灰绿 */
  --bg-deep:       #cfd6cd;
  --panel:         rgba(213, 240, 231, .58);   /* 窗口玻璃底 */
  --panel-2:       rgba(255, 255, 255, .42);   /* 内部浅玻璃 */
  --ink:           #2f4f47;   /* 主文字 深青绿 */
  --ink-soft:      #5f7f75;
  --ink-faint:     #8fa8a0;
  --line:          rgba(120, 180, 165, .32);

  --accent:        #2f6b5c;   /* 主色 青绿 */
  --accent-2:      #4f9f88;
  --accent-soft:   rgba(120, 180, 165, .45);
  --accent-ghost:  rgba(63, 143, 122, .12);

  --purple:        #3f8f7a;   /* 沿用变量名，改为青绿 */
  --purple-soft:   rgba(63, 143, 122, .16);
  --yellow:        #cbb96a;
  --yellow-soft:   rgba(203, 185, 106, .2);
  --teal:          #6fbfa9;
  --teal-soft:     rgba(111, 191, 169, .22);
  --pink:          #c98ba0;
  --pink-soft:     rgba(201, 139, 160, .18);
  --cream:         #e6f3ee;
  --cream-soft:    rgba(255, 255, 255, .42);

  --danger:        #c9536b;

  --shadow:        0 10px 30px rgba(30, 60, 52, .30);
  --shadow-sm:     0 4px 14px rgba(30, 60, 52, .22);
  --glass-blur:    blur(18px) saturate(1.35);
  --glass-edge:    rgba(255, 255, 255, .5);

  --radius:        10px;
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC",
          "Hiragino Sans GB", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- 桌面整体 ---------- */
.desktop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

/* 壁纸层（浅色/深色两张叠在一起，切换时交叉淡入淡出） */
.wallpaper {
  position: absolute;
  inset: -24px;   /* 稍微超出，跟随鼠标微动时不会露边 */
  background-image: url("../assets/wallpaper.jpg");   /* 浅色壁纸 */
  background-size: cover;
  background-position: center;
  z-index: 0;
  filter: saturate(1.05) brightness(1.03);
  will-change: transform;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}
/* 深色壁纸叠在上层，靠透明度过渡实现渐变 */
.wallpaper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/wallpaper-dark.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .6s ease;
}
.dark .wallpaper::before { opacity: 1; }
/* 薄纱：颜色可过渡（浅色提亮 / 深色压暗） */
.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(226, 246, 239, .16);
  transition: background-color .6s ease;
}
.dark .wallpaper::after { background-color: rgba(8, 14, 14, .42); }

/* 切换主题时，给所有元素挂上颜色过渡（切换结束就移除，避免影响平时的交互动画） */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color .55s ease, color .55s ease, border-color .55s ease,
              box-shadow .55s ease, opacity .55s ease !important;
}

/* ---------- 桌面小组件（毛玻璃圆角矩形） ---------- */
/* 纵向容器：从顶部 78px 撑到任务栏上方，两个组件之间只留 18px 缝 */
.widgets-col {
  position: absolute;
  left: 100px;
  top: 78px;
  bottom: 68px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
/* 侧边栏展开时，组件跟着往右让位（76px → 300px，位移 224px） */
.left-rail:hover ~ .widgets-col { transform: translateX(224px); }
.widget {
  container-type: inline-size;   /* 让字号能跟着组件宽度缩放 */
  border-radius: 22px;
  background: rgba(213, 240, 231, .5);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 28px rgba(30, 60, 52, .22), inset 0 1px 0 rgba(255, 255, 255, .6);
  color: var(--ink);
}

/* 鼠标移上去：抖动一下作为反馈 */
@keyframes widget-shake {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  20%  { transform: translate3d(-2px, .5px, 0) rotate(-.35deg); }
  40%  { transform: translate3d(2px, -.5px, 0) rotate(.35deg); }
  60%  { transform: translate3d(-1.2px, 0, 0) rotate(-.2deg); }
  80%  { transform: translate3d(1.2px, 0, 0) rotate(.2deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
.widget:hover {
  animation: widget-shake .38s cubic-bezier(.36, .07, .19, .97) both;
}
@media (prefers-reduced-motion: reduce) {
  .widget:hover { animation: none; }
}
/* 上：更宽、更扁（长=水平方向） */
.widget-welcome {
  flex: 1.1 1 0;
  width: min(620px, calc(100vw - 360px));
  min-height: 0;
  padding: 30px 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* 从上往下排，按钮吃掉剩余空间 */
  gap: 14px;
}
.widget-welcome .w-title {
  font-size: 44px;                        /* 不支持容器查询时的兜底 */
  font-size: clamp(20px, 10cqw, 62px);    /* 随组件宽度缩放，始终单行 */
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}
.widget-welcome .w-sub {
  font-size: 17px;
  font-size: clamp(13px, 3.2cqw, 20px);
  color: var(--ink-soft);
}

/* 组件内的「深色/浅色模式」切换按钮：用图片填充的圆角矩形 */
.mode-toggle {
  position: relative;
  flex: 1 1 auto;        /* 自动撑满组件里剩下的高度 */
  min-height: 100px;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background-image: url("../assets/mode-light.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mode-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 26, 24, .62), rgba(16, 26, 24, .18));
}
.mode-toggle .mt-label {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: var(--font);
  font-size: clamp(17px, 4.5cqw, 30px);   /* 随按钮宽度放大 */
  font-weight: 700;
  letter-spacing: .1em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.mode-toggle:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 40, 36, .35); }
.mode-toggle:active { transform: translateY(0); }
.dark .mode-toggle { background-image: url("../assets/mode-dark.jpg"); }

/* 下：按同比例变化（宽度约为上方的 0.64 倍） */
.widget-clock {
  flex: 1 1 0;
  width: min(400px, calc(100vw - 360px));
  min-height: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.widget-clock .w-time {
  font-size: 66px;
  font-size: clamp(34px, 19cqw, 78px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.widget-clock .w-week {
  font-size: 22px;
  font-size: clamp(14px, 6.4cqw, 26px);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}
.widget-clock .w-date {
  font-size: 15px;
  font-size: clamp(11px, 4.4cqw, 17px);
  font-weight: 600;
  color: var(--ink);       /* 原来太浅，改成主文字色 */
  opacity: .72;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 桌面图标（右半边网格） ---------- */
.desktop-icons {
  position: absolute;
  top: 78px;
  right: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 14px 18px;
  z-index: 3;
}
.icon {
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-align: center;
}
.icon:hover { background: rgba(255, 255, 255, .5); }
.icon:active { transform: scale(.96); }
.icon.selected { background: rgba(63, 143, 122, .20); outline: 1px solid rgba(63, 143, 122, .45); }
/* 归档固定放在第二列 */
.icon-right { grid-column: 2; }
.icon .ic {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .32);
  box-shadow: var(--shadow-sm);
}
.icon .ic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.icon .lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  max-width: 108px;
  line-height: 1.3;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .5);   /* 淡色底，压在花哨壁纸上也看得清 */
  text-shadow: 0 1px 2px rgba(255, 255, 255, .85);
}

/* ---------- 左侧悬浮侧边栏（鼠标移过去弹出） ---------- */
.left-rail {
  position: absolute;
  top: 0;
  bottom: 48px;   /* 让开底部任务栏 */
  left: 0;
  width: 76px;
  background: rgba(213, 240, 231, .66);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 2px solid rgba(47, 107, 92, .42);
  box-shadow: 6px 0 20px rgba(30, 60, 52, .16);
  z-index: 4;
  transition: width .3s cubic-bezier(.22, .61, .36, 1);
  overflow: hidden;
}
.left-rail:hover { width: 300px; background: rgba(213, 240, 231, .72); }
.rail-grip {
  position: absolute;
  top: 0;
  left: 0;
  width: 76px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}
.rail-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  padding: 58px 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 收起时隐藏的文字/图标：只在鼠标移入展开后显示 */
.collapse-hide,
.rail-item .ri-label {
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease;
}
.left-rail:hover .collapse-hide,
.left-rail:hover .rail-item .ri-label {
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease .1s;
}

/* 个人资料区 */
.rail-profile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
  background: var(--teal-soft);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.22, .61, .36, 1), box-shadow .18s ease;
}
.rail-avatar:hover {
  transform: scale(1.14);
  box-shadow: 0 8px 20px rgba(30, 60, 52, .34);
}
.rail-avatar:active { transform: scale(1.04); }
.rail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rail-name { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.rail-handle { font-size: 13px; color: var(--ink-faint); }

.rail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.rail-tags span {
  font-size: 12.5px;
  padding: 3px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}

.rail-social { display: flex; gap: 10px; }
.rail-social a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  transition: transform .12s, background .15s, border-color .15s;
}
.rail-social a:hover { transform: translateY(-2px); background: #fff; border-color: var(--accent); }
.rail-social img { width: 24px; height: 24px; object-fit: contain; }

.rail-title {
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin: 8px 0 0 8px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background .12s;
}
.rail-item:hover { background: rgba(63, 143, 122, .16); }
.rail-item .ri-ic {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.rail-item .ri-ic img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ---------- 任务栏：钉住的快捷图标 ---------- */
.tb-pinned { display: flex; align-items: center; gap: 4px; }
.tb-pinned:empty { display: none; }

/* ---------- 窗口 ---------- */
.windows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
.window {
  position: absolute;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow);
  overflow: hidden;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--glass-edge);
  animation: pop .18s ease;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.window.minimized { display: none; }
.window.focused { box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 44px rgba(30, 60, 52, .40); }

.win-titlebar {
  height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 14px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  cursor: grab;
  user-select: none;
}
.win-titlebar:active { cursor: grabbing; }
.window:not(.focused) .win-titlebar { background: linear-gradient(180deg, #9cc9bd, #7fb3a4); }
.win-icon { font-size: 17px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.win-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  /* 标题栏是青绿渐变，图标统一转白 */
  filter: brightness(0) invert(1);
  opacity: .95;
}
.win-title {
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(60, 42, 55, .3);
}
.win-controls { display: flex; gap: 4px; }
.win-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .12s;
}
.win-btn:hover { background: rgba(255, 255, 255, .35); }
.win-btn.close:hover { background: var(--danger); }

.win-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 6px;
  font-size: 14px;
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
  line-height: 1.7;
  background: transparent;   /* 让窗口的毛玻璃透出来 */
}
.win-body::-webkit-scrollbar { width: 10px; }
.win-body::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 8px; }
.win-body::-webkit-scrollbar-track { background: transparent; }

/* 八方向缩放柄：拖拽任意边缘 / 角 */
.rs { position: absolute; z-index: 6; }
.rs-n  { top: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.rs-s  { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.rs-e  { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.rs-w  { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.rs-ne { top: 0; right: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.rs-nw { top: 0; left: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.rs-sw { bottom: 0; left: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.rs-se {
  bottom: 0; right: 0; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 55%, rgba(47, 107, 92, .5) 55%) bottom right / 12px 12px no-repeat;
}

/* ---------- 窗口内容通用 ---------- */
.post-article { padding: 10px 18px 24px; }
.post-article h1 { font-size: 22px; line-height: 1.4; margin-bottom: 6px; color: var(--accent); }

/* ---------- 文章目录：点主标题下拉 ---------- */
.post-article .toc-wrap { position: relative; }
.post-article h1.toc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color .12s;
}
.post-article h1.toc-trigger:hover { color: var(--teal); }
.post-article h1.toc-trigger::after {          /* 小三角 */
  content: "";
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 5.5px solid currentColor;
  opacity: .55;
  transition: transform .18s ease;
}
.post-article h1.toc-trigger.open::after { transform: rotate(-180deg); }

.toc-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 210px;
  max-width: min(440px, 74vw);
  max-height: 54vh;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.toc-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toc-panel::-webkit-scrollbar { width: 8px; }
.toc-panel::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 8px; }
.toc-panel::-webkit-scrollbar-track { background: transparent; }

.toc-panel .toc-item {
  display: block;
  padding: 5px 10px 5px calc(10px + var(--lvl, 0) * 15px);   /* 按层级缩进 */
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s, color .12s;
}
.toc-panel .toc-item:hover { background: var(--accent-ghost); color: var(--accent); }
.toc-panel .toc-item.toc-lv0 { font-weight: 600; color: var(--accent); }
.toc-panel .toc-item.toc-lv1 { color: var(--ink-soft); }
.toc-panel .toc-item.toc-lv2,
.toc-panel .toc-item.toc-lv3 { color: var(--ink-faint); font-size: 12.5px; }

/* 跳转后目标标题闪一下 */
@keyframes toc-flash {
  from { background: var(--accent-soft); }
  to   { background: transparent; }
}
.post-article .toc-flash {
  border-radius: 6px;
  animation: toc-flash 1.3s ease-out;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: var(--ink-soft);
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.post-meta .chip {
  background: var(--accent-ghost);
  color: var(--accent);
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.post-article h2 { font-size: 17px; margin: 20px 0 8px; color: var(--purple); }
.post-article p { margin: 10px 0; }
.post-article ul, .post-article ol { margin: 10px 0 10px 22px; }
.post-article a { color: var(--accent); }
.post-article code {
  background: var(--cream-soft);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
}
.post-article blockquote {
  margin: 14px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 6px;
  color: #5b7268;
}
.post-article img { max-width: 100%; border-radius: 8px; }

/* Markdown 渲染出来的额外元素 */
.post-article h3 { font-size: 15.5px; margin: 18px 0 6px; color: var(--purple); }
.post-article hr {
  margin: 22px 0;
  border: none;
  border-top: 1px dashed var(--line);
}
.post-article pre {
  margin: 14px 0;
  padding: 14px 16px;
  background: rgba(0, 0, 0, .06);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}
.post-article pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

/* 带语言标注的代码块：标签行 + 代码区共用一圈圆角 */
.post-article .code-block {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  overflow: hidden;
}
.post-article .code-block .code-lang {
  padding: 5px 14px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--ink-faint);
  background: rgba(0, 0, 0, .05);
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.post-article .code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
/* 列表层级：给子级一点额外缩进，视觉上更清楚 */
.post-article li > ul,
.post-article li > ol { margin: 6px 0 6px 20px; }
.post-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13.5px;
}
.post-article th, .post-article td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.post-article th { background: var(--accent-ghost); }
.post-article img { display: block; margin: 12px 0; }
.dark .post-article pre { background: rgba(0, 0, 0, .32); }

/* ---------- 文件夹 / 列表视图 ---------- */
.folder-view { padding: 14px; }
.folder-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding: 8px 12px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink-soft);
}
.folder-toolbar input {
  border: none; background: transparent; outline: none;
  color: var(--ink); font-family: var(--font); font-size: 13px;
  flex: 1 1 auto;
}
.folder-toolbar .ft-ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: .85;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  cursor: pointer;
  /* 卡片是「点开/拖拽」的控件，不允许选中文本，否则拖拽时会拖出一片蓝色高亮 */
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--accent-soft); }
.card .c-cat {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 16px;
  background: var(--accent-ghost);
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.card .c-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.card .c-excerpt {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .c-date { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; }

/* 文件夹卡片（知识笔记 / 解题记录 的子目录） */
.card-folder { display: flex; flex-direction: column; align-items: flex-start; }
.card-folder .cf-ic { width: 46px; height: 46px; margin-bottom: 10px; }
.card-folder .cf-ic img { width: 100%; height: 100%; object-fit: contain; }

/* 面包屑 */
.folder-toolbar .crumbs {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.crumb { color: var(--accent); cursor: pointer; }
.crumb:hover { text-decoration: underline; }
.crumb-sep { color: var(--ink-faint); }
.crumb-up {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: var(--accent-ghost);
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
}
.crumb-up:hover { background: var(--accent-soft); }

/* 分页器 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 6px;
}
.pg-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn:disabled { opacity: .38; cursor: default; }
.pg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pg-gap { color: var(--ink-faint); padding: 0 2px; }
.pager-info { font-size: 12.5px; color: var(--ink-faint); margin-left: 8px; }

/* ---------- 卡片拖拽 ---------- */
.card[data-post] { cursor: grab; }
.card[data-post]:active { cursor: grabbing; }
body.dragging-card { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* 跟随光标的拖拽预览 */
.card-ghost {
  position: fixed;
  z-index: 99998;
  width: 190px;
  margin: 0;
  pointer-events: none;
  opacity: .94;
  transform: rotate(-1.5deg);
  border-color: var(--accent) !important;
  box-shadow: 0 14px 30px rgba(30, 60, 52, .34);
}

/* ---------- 留言板 ---------- */
.board-view { padding-bottom: 18px; }
.board-drop {
  margin: 0 14px;
  padding: 8px;
  border-radius: 14px;
  border: 2px dashed transparent;
  min-height: 180px;
  transition: border-color .15s ease, background-color .15s ease;
}
body.dragging-card .board-drop { border-color: var(--line); }   /* 只在拖拽时提示可放 */
.board-drop.over {
  border-color: var(--accent);
  background: var(--accent-ghost);
}
.giscus-slot { min-height: 140px; }

/* 归档列表 */
.archive-list { list-style: none; }
.archive-list li { margin-bottom: 2px; border-radius: 8px; }
.archive-list a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 12px;
  color: var(--ink); text-decoration: none;
  border-radius: 8px; font-size: 14px;
  user-select: none;          /* 同样是可拖拽条目，禁止选中 */
  -webkit-user-select: none;
}
.archive-list a:hover { background: var(--accent-ghost); }
.archive-list .d {
  flex: 0 0 auto; width: 86px; color: var(--ink-faint); font-size: 12.5px;
}
.archive-list .t { flex: 1 1 auto; }
.archive-list .cat {
  flex: 0 0 auto; font-size: 11.5px; color: var(--purple);
  background: var(--purple-soft); padding: 1px 9px; border-radius: 16px;
}
.archive-year {
  margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: .04em;
}

/* ---------- 关于我（侧边图片 + 头像） ---------- */
.about-wrap { display: flex; min-height: 100%; }
.about-side {
  flex: 0 0 230px;
  min-height: 100%;
  background-image: url("../assets/about-illustration.jpg");
  background-size: cover;
  background-position: center top;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .15);
}
.about-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 24, .02), rgba(20, 20, 24, .5));
}
.about-main { flex: 1 1 auto; padding: 26px 30px; min-width: 320px; }
.about-main .avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.about-main .avatar {
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 3px solid #fff;
  background: var(--teal-soft);
}
.about-main .avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-main .who h1 { font-size: 26px; color: var(--accent); margin-bottom: 2px; }
.about-main .who .handle { color: var(--ink-faint); font-size: 13.5px; }
.about-main .bio p { margin: 10px 0; font-size: 14px; }
.about-main .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.about-main .tags span {
  background: var(--cream-soft); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; color: var(--ink-soft);
}
.section-head {
  margin: 18px 0 10px; font-size: 15px; font-weight: 700;
  color: var(--purple);
  display: flex; align-items: center; gap: 8px;
}
.section-head::before { content: ""; width: 4px; height: 16px; background: var(--purple); border-radius: 3px; }

.social-links { display: flex; flex-direction: column; gap: 8px; }
.social-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 14px;
  transition: border-color .15s, transform .12s;
}
.social-links a:hover { border-color: var(--accent); transform: translateX(3px); }
.social-links .s-ic {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.social-links .s-ic img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- 设置 ---------- */
.settings-view { padding: 8px 18px 24px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.set-row .set-label { font-size: 14px; }
.set-row .set-label small { display: block; color: var(--ink-faint); font-size: 12px; margin-top: 3px; }
.switch {
  width: 46px; height: 26px; border-radius: 20px; border: none;
  background: var(--line); position: relative; cursor: pointer; transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; height: 20px; width: 20px;
  border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.set-btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 7px 16px; border-radius: 9px; cursor: pointer; font-size: 13px; font-family: var(--font);
}
.set-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 任务栏（Win11 风格：居中图标 + 亚克力 + 系统托盘） ---------- */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* 左空白 | 居中图标组 | 右侧托盘 */
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(213, 240, 231, .72);
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border-top: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 -6px 22px rgba(30, 60, 52, .16);
  z-index: 50;
}
.tb-center { justify-self: center; display: flex; align-items: center; gap: 6px; }
.taskbar-windows {
  display: flex;
  gap: 4px;
  align-items: center;
  max-width: 46vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.taskbar-windows::-webkit-scrollbar { display: none; }

/* 应用按钮（开始 / 已打开窗口）：图标居中，悬停圆角高亮 */
.tb-app, .tb-win {
  width: 42px;
  height: 40px;
  border: none;
  border-radius: 9px;
  background: transparent;
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: background .12s;
}
.tb-app:hover, .tb-win:hover { background: rgba(255, 255, 255, .5); }
.tb-app img, .tb-win img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.tb-app .i, .tb-win .i { font-size: 20px; }
.tb-app.active, .tb-win.active { background: rgba(255, 255, 255, .62); }
/* Win11 运行指示条 */
.tb-app.active::after, .tb-win.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.taskbar-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid rgba(47, 107, 92, .16);
}
.tray-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink);
  transition: background .12s;
}
.tray-ico:hover { background: rgba(255, 255, 255, .5); }
.tray-ico svg { width: 17px; height: 17px; }
.taskbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.15;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  cursor: default;
  transition: background .12s;
}
.taskbar-clock:hover { background: rgba(255, 255, 255, .5); }
.taskbar-clock .t-time { font-weight: 600; }
.taskbar-clock .t-date { font-size: 11px; color: var(--ink-soft); }

/* 提示窗 / 空白态 */
.empty-state {
  padding: 40px 20px; text-align: center; color: var(--ink-faint); font-size: 13.5px;
}
.spinner {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin .8s linear infinite; vertical-align: middle; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 右键菜单 */
.context-menu {
  position: fixed; z-index: 100;
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  border-radius: 10px; box-shadow: var(--shadow);
  padding: 6px; min-width: 160px;
}
.context-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border: none; background: transparent;
  border-radius: 7px; font-family: var(--font); font-size: 13px;
  color: var(--ink); cursor: pointer;
}
.context-menu button:hover { background: var(--accent-ghost); }

/* 通知 */
.toast {
  position: fixed; bottom: 54px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow); z-index: 200;
  animation: toast .25s ease;
}
@keyframes toast {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   触摸设备提示（软拦截）
   默认隐藏；只在「以触摸为主」的设备上出现，可用按钮强制进入
   ============================================================ */
.mobile-tip {
  position: fixed;
  inset: 0;
  z-index: 10000;              /* 盖住锁屏（9999） */
  display: none;
  place-items: center;
  padding: 24px;
  background-image: url("../assets/wallpaper.jpg");
  background-size: cover;
  background-position: center;
  color: var(--ink);
}
.mobile-tip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(213, 240, 231, .58);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
}
.dark .mobile-tip {
  background-image: url("../assets/wallpaper-dark.jpg");
}
.dark .mobile-tip::before { background: rgba(8, 14, 14, .62); }

.mt-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 34px 26px 26px;
  text-align: center;
  border-radius: 22px;
  background: rgba(213, 240, 231, .58);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 12px 34px rgba(20, 40, 36, .28), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.dark .mt-card {
  background: rgba(24, 34, 34, .72);
  border-color: rgba(255, 255, 255, .16);
}
.mt-card .mt-ic { color: var(--accent); }
.mt-card .mt-ic svg { width: 46px; height: 46px; }
.mt-card h1 {
  margin: 16px 0 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
}
.mt-card p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.mt-url {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--accent-ghost);
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.mt-primary {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, transform .12s ease;
}
.mt-primary:hover { background: var(--accent-2); }
.mt-primary:active { transform: scale(.98); }
.mt-hint {
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ============================================================
   极简移动版：纯列表 + 正文
   ============================================================ */
.m-view {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.m-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 3px 14px rgba(30, 60, 52, .25);
}
.m-back {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.m-back:active { background: rgba(255, 255, 255, .36); }
.m-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 极简版顶栏的深色 / 浅色切换 */
.m-theme {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  cursor: pointer;
  transition: background-color .12s ease;
}
.m-theme:active { background: rgba(255, 255, 255, .36); }
.m-theme svg { width: 19px; height: 19px; display: none; }
.m-theme .i-moon { display: block; }          /* 浅色模式：显示月亮（点了变深色） */
.dark .m-theme .i-moon { display: none; }
.dark .m-theme .i-sun { display: block; }     /* 深色模式：显示太阳 */
.m-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-image: url("../assets/wallpaper.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.dark .m-body { background-image: url("../assets/wallpaper-dark.jpg"); }

/* 分类筛选 */
.m-chips {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(213, 240, 231, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.dark .m-chips { background: rgba(20, 28, 28, .84); }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: 0 0 auto;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .55);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}
.dark .m-chip { background: rgba(255, 255, 255, .1); }
.m-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 文章列表 */
.m-list { padding: 12px 14px 28px; }
.m-item {
  display: block;
  padding: 15px 16px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 3px 12px rgba(30, 60, 52, .12);
  text-decoration: none;
  color: var(--ink);
}
.dark .m-item {
  background: rgba(28, 38, 38, .74);
  border-color: rgba(255, 255, 255, .12);
}
.m-item:active { background: rgba(255, 255, 255, .9); }
.m-item .m-item-t {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 7px;
}
.m-item .m-item-m {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.m-item .m-cat { font-weight: 600; }

/* 正文 */
.m-article {
  margin: 12px 14px 28px;
  padding: 20px 18px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 4px 18px rgba(30, 60, 52, .14);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.85;
}
.dark .m-article {
  background: rgba(26, 36, 36, .8);
  border-color: rgba(255, 255, 255, .12);
}
.m-article h1 { font-size: 21px; line-height: 1.4; margin-bottom: 10px; color: var(--accent); }
.m-article img { max-width: 100%; border-radius: 8px; }
.m-article pre { font-size: 12.5px; }

/* 以触摸为主的设备（手机 / 平板）：藏起桌面，显示提示 */
@media (hover: none) and (pointer: coarse) {
  .mobile-tip { display: grid; }
  .desktop, .lockscreen, .m-view { display: none; }

  /* 选了「看文章（极简版）」就切到极简版 */
  html.mobile-mode .mobile-tip { display: none; }
  html.mobile-mode .m-view { display: flex; }
}

/* 移动端兜底（仅「强制进入」时生效：触摸设备点了仍要继续，或窄窗口的桌面浏览器） */
@media (max-width: 760px) {
  .left-rail { width: 60px; }
  .left-rail:hover { width: 60px; }
  .rail-panel { display: none; }
  .desktop-icons { top: 96px; right: 12px; grid-template-columns: repeat(2, minmax(84px, 1fr)); gap: 10px; }
  .icon { width: 84px; }
  .about-wrap { flex-direction: column; }
  .about-side { display: none; }
  .about-main { min-width: 0; padding: 20px; }
  .taskbar { height: 46px; padding: 0 8px; }
  .taskbar-windows { max-width: 40vw; }
  .tray-ico { display: none; }
  .widgets-col { left: 68px; top: 66px; bottom: 58px; gap: 12px; }
  .left-rail:hover ~ .widgets-col { transform: none; }   /* 移动端侧边栏不展开，无需让位 */
  .widget-welcome { width: 300px; padding: 20px 24px; }
  .widget-clock { width: 194px; padding: 16px; }
}

/* ============================================================
   深色模式（切换按钮触发，class 加在 <html> 上）
   ============================================================ */
.dark {
  --bg:            #12181a;
  --panel:         rgba(34, 44, 44, .62);
  --panel-2:       rgba(58, 72, 70, .42);
  --ink:           #dcebe5;
  --ink-soft:      #a9c0b9;
  --ink-faint:     #7f958e;
  --line:          rgba(150, 195, 182, .26);

  --accent:        #6fc3ac;
  --accent-2:      #8fd8c2;
  --accent-soft:   rgba(111, 195, 172, .40);
  --accent-ghost:  rgba(111, 195, 172, .16);

  --purple:        #6fc3ac;
  --purple-soft:   rgba(111, 195, 172, .18);
  --teal-soft:     rgba(111, 195, 172, .18);
  --cream-soft:    rgba(255, 255, 255, .09);

  --danger:        #e0708a;
  --shadow:        0 10px 30px rgba(0, 0, 0, .50);
  --shadow-sm:     0 4px 14px rgba(0, 0, 0, .45);
  --glass-edge:    rgba(255, 255, 255, .16);
}

/* 壁纸与薄纱的切换由上面的 ::before / ::after 过渡完成 */

/* 各处毛玻璃底色改为深色 */
.dark .widget,
.dark .context-menu { background: rgba(24, 34, 34, .64); }
.dark .widget { border-color: rgba(255, 255, 255, .16); }
.dark .taskbar { background: rgba(20, 28, 28, .80); }
.dark .left-rail { background: rgba(20, 28, 28, .74); border-right-color: rgba(255, 255, 255, .14); }
.dark .left-rail:hover { background: rgba(20, 28, 28, .90); }

/* 桌面图标 */
.dark .icon .ic { background: rgba(255, 255, 255, .10); }
.dark .icon:hover { background: rgba(255, 255, 255, .12); }
.dark .icon .lbl {
  background: rgba(14, 22, 22, .52);
  color: #e6f2ee;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

/* 侧边栏内部 */
.dark .rail-tags span,
.dark .rail-social a { background: rgba(255, 255, 255, .10); }
.dark .rail-avatar { border-color: rgba(255, 255, 255, .38); }
.dark .rail-social a:hover { background: rgba(255, 255, 255, .18); }

/* 任务栏 */
.dark .tb-app:hover, .dark .tb-win:hover,
.dark .tray-ico:hover, .dark .taskbar-clock:hover { background: rgba(255, 255, 255, .12); }
.dark .tb-app.active, .dark .tb-win.active { background: rgba(255, 255, 255, .18); }

/* 窗口 */
.dark .window:not(.focused) .win-titlebar { background: linear-gradient(180deg, #4c635d, #3b4f4a); }
.dark .about-main .avatar { border-color: rgba(255, 255, 255, .38); }
.dark .post-article blockquote { color: #b7ccc5; }

/* 提示条：浅色模式下是深底白字，深色模式反过来 */
.dark .toast { background: #0d1414; color: var(--ink); }

/* ============================================================
   锁屏（页面打开时出现一次，点 Login 进入桌面）
   ============================================================ */
.lockscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(213, 240, 231, .38);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  transition: opacity .55s ease;
}
.lockscreen.hide { opacity: 0; pointer-events: none; }
.dark .lockscreen { background: rgba(8, 14, 14, .52); }

.lock-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: lock-in .6s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes lock-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.lock-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .82);
  box-shadow: 0 12px 34px rgba(20, 40, 36, .35);
  background: var(--teal-soft);
}
.dark .lock-avatar { border-color: rgba(255, 255, 255, .35); }
.lock-avatar img { width: 100%; height: 100%; object-fit: cover; }

.lock-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(255, 255, 255, .4);
}
.dark .lock-name { text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }

.lock-btn {
  margin-top: 8px;
  min-width: 148px;
  padding: 12px 30px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background-color .15s ease;
}
.lock-btn:hover { transform: translateY(-2px); background: var(--accent-2); }
.lock-btn:active { transform: translateY(0); }
.lock-btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
