﻿/* ==========================================================================
   Windows 12 · Aurora — 系统级样式
   设计语言：Porcelain & Graphite
   · 暖中性纸色 / 石墨色基底，取代蓝紫渐变玻璃
   · 1px 发丝线 + 低扩散阴影 + 细颗粒噪点
   · 展示字体用 Bahnschrift（数字与大标题），正文保持 Segoe UI Variable
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --accent: #2a56c6;
  --accent-strong: #1f44a8;
  --accent-soft: rgba(42, 86, 198, .12);

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --paper: #edeae3;
  --mica: rgba(246, 244, 238, .82);
  --mica-strong: #fbfaf6;
  --acrylic: rgba(247, 245, 240, .76);
  --acrylic-deep: rgba(251, 250, 246, .9);
  --stroke: rgba(28, 26, 22, .10);
  --stroke-strong: rgba(28, 26, 22, .17);
  --stroke-outer: rgba(255, 255, 255, .62);

  --text: #1b1a17;
  --text-2: #5d5a53;
  --text-3: #8b877e;

  --hover: rgba(28, 26, 22, .055);
  --active: rgba(28, 26, 22, .10);
  --tile: rgba(255, 255, 255, .54);
  --tile-2: rgba(28, 26, 22, .035);

  --shadow-win: 0 30px 60px -26px rgba(28, 25, 18, .40), 0 4px 14px -6px rgba(28, 25, 18, .14);
  --shadow-fly: 0 26px 54px -24px rgba(28, 25, 18, .38), 0 2px 8px -2px rgba(28, 25, 18, .10);
  --shadow-tb: 0 18px 36px -22px rgba(28, 25, 18, .42), 0 1px 2px rgba(28, 25, 18, .10);

  --tb-h: 58px;
  --tb-gap: 16px;

  --ease: cubic-bezier(.22, .9, .24, 1);
  --ease-snap: cubic-bezier(.32, 1.24, .5, 1);

  --font: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei",
          "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-display: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI Variable Display",
                  "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.5'/></svg>");
}

html[data-theme="dark"] {
  --paper: #101112;
  --mica: rgba(23, 24, 26, .84);
  --mica-strong: #17181a;
  --acrylic: rgba(22, 23, 25, .82);
  --acrylic-deep: rgba(26, 27, 30, .93);
  --stroke: rgba(255, 255, 255, .10);
  --stroke-strong: rgba(255, 255, 255, .18);
  --stroke-outer: rgba(255, 255, 255, .11);

  --text: #f0ede6;
  --text-2: #a6a29a;
  --text-3: #75716a;

  --hover: rgba(255, 255, 255, .065);
  --active: rgba(255, 255, 255, .12);
  --tile: rgba(255, 255, 255, .05);
  --tile-2: rgba(255, 255, 255, .03);

  --shadow-win: 0 30px 60px -22px rgba(0, 0, 0, .78), 0 4px 14px -6px rgba(0, 0, 0, .5);
  --shadow-fly: 0 26px 54px -22px rgba(0, 0, 0, .72), 0 2px 8px -2px rgba(0, 0, 0, .4);
  --shadow-tb: 0 18px 36px -20px rgba(0, 0, 0, .8), 0 1px 2px rgba(0, 0, 0, .45);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  background: #0b0c0d;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { user-select: none; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  outline: none;
}
input {
  font-family: inherit;
  color: inherit;
  border: 0;
  outline: none;
  background: none;
}
input::placeholder { color: var(--text-3); }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 输入框由容器负责聚焦态，避免整行出现描边矩形 */
.sm-search input:focus-visible,
.field input:focus-visible,
.login-box input:focus-visible,
.term-input:focus-visible,
.ai-input:focus-visible,
.np-area:focus-visible { outline: none; }

.hidden { display: none !important; }

svg { display: block; }
.ic {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 通用浮层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   开机动画
   ========================================================================== */
#boot {
  background:
    radial-gradient(90% 70% at 50% 44%, #16181b 0%, #0c0d0f 62%, #08090a 100%);
  transition: opacity .6s var(--ease);
}
#boot::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: .16;
  pointer-events: none;
}
.boot-center { position: relative; display: grid; justify-items: center; gap: 30px; }
.boot-logo { width: 66px; height: 66px; }
.boot-logo svg { width: 100%; height: 100%; }

/* 进度线（替代圆环） */
.boot-ring {
  position: relative;
  width: 168px; height: 2px;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}
.boot-ring::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 40%;
  border-radius: 2px;
  background: var(--accent);
  animation: track .95s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes track {
  0%   { left: -42%; }
  100% { left: 102%; }
}

.boot-tip {
  color: rgba(255, 255, 255, .42);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ==========================================================================
   锁屏
   ========================================================================== */
.lock { overflow: hidden; }
.lock-bg {
  position: absolute; inset: -1%;
  background:
    linear-gradient(155deg, rgba(5, 8, 14, .46) 0%, rgba(5, 8, 14, .16) 46%, rgba(5, 8, 14, .54) 100%),
    url("../assets/win11/bloom-dark.jpg") center / cover no-repeat;
  animation: kenburns 42s ease-in-out infinite alternate;
}
/* 巨大细线圆环 + 颗粒 */
.lock-bg::before {
  content: "";
  position: absolute;
  width: 116vmax; height: 116vmax;
  left: 58%; top: 6%;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
}
.lock-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: .2;
}
@keyframes kenburns {
  from { transform: scale(1.00) translate3d(0, 0, 0); }
  to   { transform: scale(1.04) translate3d(-1%, .8%, 0); }
}

.lock-clock {
  position: absolute;
  left: clamp(28px, 7vw, 108px);
  bottom: clamp(40px, 13vh, 128px);
  color: #f5f1e9;
  text-align: left;
}
.lock-time {
  font-family: var(--font-display);
  font-size: clamp(76px, 11.6vw, 172px);
  font-weight: 300;
  letter-spacing: -.038em;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.lock-date {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .72;
}

.lock-corner {
  position: absolute; right: 32px; bottom: 30px;
  display: flex; gap: 18px;
  color: rgba(255, 255, 255, .68);
}
.lock-corner .ic { width: 18px; height: 18px; }

.lock-login {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(8, 9, 11, .58);
  backdrop-filter: blur(26px) saturate(120%);
  -webkit-backdrop-filter: blur(26px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .34s var(--ease);
}
.lock-login.show { opacity: 1; pointer-events: auto; }
.login-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 400;
  color: #f6f2ea;
  background: #22252a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 9px rgba(255, 255, 255, .03);
}
.login-name {
  color: #f5f1e9;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  margin-top: 2px;
}
.login-box {
  display: flex; align-items: center;
  margin-top: 6px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .16s, background .16s;
}
.login-box:focus-within { border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .11); }
.login-box input {
  width: 216px;
  padding: 12px 16px;
  color: #fff;
  font-size: 13.5px;
  letter-spacing: .16em;
}
.login-box input::placeholder { color: rgba(255, 255, 255, .42); letter-spacing: .05em; }
.login-box button {
  width: 46px;
  align-self: stretch;
  display: grid; place-items: center;
  color: #fff;
  border-left: 1px solid rgba(255, 255, 255, .14);
  transition: background .16s;
}
.login-box button:hover { background: rgba(255, 255, 255, .12); }
.login-box button::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.6px solid #fff;
  border-top: 1.6px solid #fff;
  transform: rotate(45deg);
  margin-left: -3px;
}
.login-hint {
  color: rgba(255, 255, 255, .36);
  font-size: 10.5px;
  letter-spacing: .1em;
  margin-top: 6px;
}

/* ==========================================================================
   桌面 & 壁纸
   ========================================================================== */
.desktop { position: fixed; inset: 0; overflow: hidden; }

.wallpaper {
  position: absolute; inset: -2%;
  background-size: cover;
  background-position: center;
  transition: filter .3s var(--ease);
  transform: scale(1.02);
}

/* ---------- 壁纸：几何构成（非流光渐变） ---------- */
.wallpaper[data-wp="aurora"] {
  background-color: #081018;
  background-image:
    repeating-radial-gradient(circle at 34% 118%,
      rgba(150, 214, 206, .085) 0 1px, transparent 1px 54px),
    radial-gradient(70% 52% at 50% 122%, rgba(47, 118, 132, .38), transparent 66%),
    conic-gradient(from 208deg at 70% 16%,
      rgba(88, 142, 220, .16), transparent 20%,
      rgba(126, 208, 184, .12) 38%, transparent 56%),
    linear-gradient(157deg, #0b1723 0%, #091119 48%, #060a0e 100%);
}
.wallpaper[data-wp="sunrise"] {
  background-color: #2a1a16;
  background-image:
    radial-gradient(circle at 74% 66%, #f0ae70 0 17.4%, transparent 17.7%),
    repeating-linear-gradient(0deg,
      rgba(255, 236, 214, .055) 0 1px, transparent 1px 76px),
    linear-gradient(172deg, #2b1a17 0%, #5b3026 42%, #b96f45 76%, #e6a877 100%);
}
.wallpaper[data-wp="midnight"] {
  background-color: #07080a;
  background-image:
    radial-gradient(circle at 21% 25%, #e6e2d8 0 6.2%, transparent 6.5%),
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(158deg, #0a0b0d 0%, #0d0f13 58%, #070809 100%);
  background-size: auto, 100% 78px, 78px 100%, auto;
}
.wallpaper[data-wp="mint"] {
  background-color: #e2eae1;
  background-image:
    radial-gradient(circle at 78% 24%, #b9d2c2 0 15.5%, transparent 15.8%),
    linear-gradient(116deg, transparent 43.6%, rgba(28, 60, 48, .10) 43.8% 44.2%, transparent 44.4%),
    repeating-linear-gradient(90deg,
      rgba(24, 52, 42, .045) 0 1px, transparent 1px 104px),
    linear-gradient(160deg, #eef3ea 0%, #dde8de 62%, #e8efe4 100%);
}
.wallpaper[data-wp="paper"] {
  background-color: #f2eee5;
  background-image:
    radial-gradient(circle at 24% 80%, rgba(196, 118, 88, .16), transparent 34%),
    radial-gradient(circle at 76% 16%, rgba(58, 96, 150, .13), transparent 38%),
    repeating-linear-gradient(0deg,
      rgba(32, 28, 22, .05) 0 1px, transparent 1px 92px),
    linear-gradient(150deg, #f7f4ec 0%, #efe9dd 100%);
}

/* Win11 原生壁纸（取自 25H2 镜像 Windows\Web\Wallpaper\Windows） */
.wallpaper[data-wp="bloom"] {
  background-color: #bfd3e8;
  background-image: url("../assets/win11/bloom-light.jpg");
}
.wallpaper[data-wp="bloom-dark"] {
  background-color: #08111e;
  background-image: url("../assets/win11/bloom-dark.jpg");
}

/* 颗粒 + 暗角 */
.wallpaper-fx {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    var(--grain),
    radial-gradient(126% 106% at 50% 50%, transparent 52%, rgba(0, 0, 0, .30) 100%);
  background-size: 160px 160px, cover;
  opacity: .5;
}

/* ---------- 桌面图标 ---------- */
.desktop-icons {
  position: absolute;
  top: 22px; left: 20px; bottom: 96px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 98px);
  grid-auto-columns: 94px;
  align-content: start;
  gap: 4px;
  z-index: 2;
  overflow: hidden;
}
.desk-icon {
  width: 94px;
  padding: 10px 4px 9px;
  border-radius: var(--radius-md);
  display: grid; justify-items: center; gap: 8px;
  cursor: default;
  border: 1px solid transparent;
  transition: background .13s, border-color .13s;
}
.desk-icon:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .14);
}
.desk-icon.selected {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .34);
}
.desk-icon .di-icon { width: 42px; height: 42px; }
.desk-icon .di-label {
  font-size: 11.5px;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  letter-spacing: .01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .72);
  word-break: break-all;
  max-width: 88px;
}
html[data-theme="light"] .wallpaper[data-wp="paper"] ~ .desktop-icons .di-label,
html[data-theme="light"] .wallpaper[data-wp="mint"] ~ .desktop-icons .di-label {
  color: #1c1a17;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .9);
}

/* ==========================================================================
   任务栏
   ========================================================================== */
.taskbar {
  position: absolute;
  left: 50%;
  bottom: var(--tb-gap);
  transform: translateX(-50%);
  height: var(--tb-h);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 16px;
  background: var(--acrylic);
  backdrop-filter: blur(30px) saturate(135%);
  -webkit-backdrop-filter: blur(30px) saturate(135%);
  border: 1px solid var(--stroke-outer);
  box-shadow: var(--shadow-tb);
  max-width: calc(100vw - 24px);
}
html[data-theme="dark"] .taskbar { border-color: rgba(255, 255, 255, .11); }

.tb-group { display: flex; align-items: center; gap: 4px; }
.taskbar > .tb-group { flex: none; }
.tb-left, .tb-right { gap: 2px; }

.tb-btn {
  position: relative;
  flex: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  white-space: nowrap;
  transition: background .15s, transform .15s var(--ease-snap);
}
.tb-btn:hover { background: var(--hover); }
.tb-btn:active { transform: scale(.93); }
.tb-btn.wide {
  width: auto;
  padding: 0 12px;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-btn.wide > svg { flex: none; width: 16px; height: 16px; }
.tb-weather { font-size: 11.5px; color: var(--text-2); letter-spacing: .01em; white-space: nowrap; }

@media (max-width: 980px) {
  .tb-weather { display: none; }
}

.tb-start { color: var(--accent); }
html[data-theme="dark"] .tb-start { color: #dfe6f5; }

/* 运行指示：图标下方短划线 */
.tb-btn .tb-dot {
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%) scaleX(.35);
  width: 16px; height: 3px;
  border-radius: 2px;
  background: var(--text-3);
  opacity: 0;
  transition: opacity .18s, transform .22s var(--ease), background .18s;
}
.tb-btn.running .tb-dot { opacity: .7; transform: translateX(-50%) scaleX(1); }
.tb-btn.focused .tb-dot {
  background: var(--accent);
  opacity: 1;
  transform: translateX(-50%) scaleX(1.35);
}
.tb-btn.focused:not(:hover) { background: var(--hover); }

.tb-tray {
  display: flex; align-items: center; gap: 2px;
  height: 38px;
  padding: 0 8px;
  border-radius: 9px;
  transition: background .15s;
  cursor: pointer;
}
.tb-tray:hover { background: var(--hover); }
.tb-tray .tray-net, .tb-tray .tray-vol { display: grid; place-items: center; }
.tb-tray .ic { width: 16px; height: 16px; }
.tb-tray.dim .ic { opacity: .55; }

.tb-clock {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 2px;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  transition: background .15s;
  cursor: pointer;
}
.tb-clock:hover { background: var(--hover); }
.tb-clock .t1 { font-weight: 600; letter-spacing: .02em; }
.tb-clock .t2 { color: var(--text-3); font-size: 10px; letter-spacing: .06em; }

/* ---------- 菜单栏（任务栏）样式 ---------- */
html[data-tb="joined"] { --tb-gap: 0px; }
html[data-tb="classic"] { --tb-gap: 0px; --tb-h: 52px; }
html[data-tb="compact"] { --tb-gap: 10px; --tb-h: 44px; }

/* 拼接：贴住屏幕底边，图标区居中 */
html[data-tb="joined"] .taskbar,
html[data-tb="classic"] .taskbar {
  left: 0; right: 0; bottom: 0;
  transform: none;
  max-width: none;
  border-radius: 0;
  border-left: 0; border-right: 0; border-bottom: 0;
  box-shadow: 0 -1px 0 var(--stroke-outer);
}
html[data-tb="joined"] .tb-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
html[data-tb="joined"] .tb-right { margin-left: auto; }
html[data-tb="joined"] .tb-left { margin-right: auto; }

/* 经典：贴底全宽、图标靠左、方形边角 */
html[data-tb="classic"] .taskbar { gap: 6px; padding: 0 8px; }
html[data-tb="classic"] .tb-center { gap: 2px; }
html[data-tb="classic"] .tb-right { margin-left: auto; }
html[data-tb="classic"] .tb-btn { width: 38px; height: 38px; border-radius: 7px; }
html[data-tb="classic"] .tb-btn .si { width: 23px !important; height: 23px !important; }
html[data-tb="classic"] .tb-tray,
html[data-tb="classic"] .tb-clock { height: 34px; }

/* 紧凑：更矮更小，隐藏天气文字 */
html[data-tb="compact"] .taskbar { padding: 0 7px; gap: 6px; border-radius: 12px; }
html[data-tb="compact"] .tb-btn { width: 34px; height: 34px; border-radius: 8px; }
html[data-tb="compact"] .tb-btn .si { width: 21px !important; height: 21px !important; }
html[data-tb="compact"] .tb-weather { display: none; }
html[data-tb="compact"] .tb-tray,
html[data-tb="compact"] .tb-clock { height: 32px; padding: 0 8px; }
html[data-tb="compact"] .tb-clock { font-size: 10.5px; }
html[data-tb="compact"] .tb-btn .tb-dot { bottom: 2px; width: 12px; height: 2px; }

/* ---------- App Group（菜单栏应用分组） ---------- */
.tb-group-ic {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  width: 17px; height: 17px;
}
.tb-group-ic i { border-radius: 2px; display: block; }

.app-group {
  width: 248px;
  padding: 13px 12px 14px;
  border-radius: 18px;
  transform-origin: bottom center;
  background: var(--acrylic);
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
}
.ag-head { display: flex; align-items: center; gap: 6px; padding: 0 3px 10px; }
.ag-title { flex: 1; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.ag-rename {
  flex: 1; min-width: 0;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--tile);
  border: 1px solid var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.ag-more {
  width: 24px; height: 24px; flex: none; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: background .13s, color .13s;
}
.ag-more:hover { background: var(--hover); color: var(--text); }
.ag-more .ic { width: 14px; height: 14px; }
.ag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ag-app {
  height: 64px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--tile);
  border: 1px solid var(--stroke);
  transition: background .14s var(--ease), border-color .14s var(--ease), transform .14s var(--ease);
}
.ag-app:hover { background: var(--hover); border-color: var(--stroke-strong); transform: translateY(-1px); }
.ag-app:active { transform: scale(.96); }

/* ==========================================================================
   浮出面板通用
   ========================================================================== */
.flyout {
  position: absolute;
  z-index: 600;
  background: var(--acrylic-deep);
  backdrop-filter: blur(34px) saturate(140%);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--stroke-outer);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-fly);
  opacity: 0;
  transform: translateY(14px) scale(.9);
  transform-origin: bottom center;
  transition: opacity .16s var(--ease), transform .22s var(--ease),
              background-color .28s var(--ease), color .28s var(--ease);
  pointer-events: none;
}
.flyout.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: opacity .18s var(--ease), transform .3s var(--ease-snap);
}
html[data-theme="dark"] .flyout { border-color: rgba(255, 255, 255, .11); }

/* ---------- 运行对话框 ---------- */
.run-dialog {
  left: 24px;
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  width: 420px;
  max-width: calc(100vw - 24px);
  padding: 18px 20px 16px;
  transform-origin: bottom left;
}
.run-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.run-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .62);
  font-size: 12.5px;
  color: var(--text);
}
html[data-theme="dark"] .run-input { background: rgba(255, 255, 255, .07); }
.run-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.run-hint { font-size: 11.5px; color: var(--text-2); margin-top: 10px; }
.run-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.run-btn {
  height: 30px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .6);
  font-size: 12.5px;
  color: var(--text);
}
.run-btn:hover { background: rgba(255, 255, 255, .82); }
.run-btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.run-btn.primary:hover { filter: brightness(1.06); }

/* ---------- 开始菜单 ---------- */
.start-menu {
  left: 0; /* 由 JS 按开始按钮定位，不再相对屏幕居中 */
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  transform: translateY(14px) scale(.9);
  transform-origin: bottom left;
  width: 648px;
  max-width: calc(100vw - 24px);
  padding: 24px 28px 0;
}
.start-menu.open { transform: translateY(0) scale(1); }

.sm-search {
  display: flex; align-items: center; gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  margin-bottom: 22px;
  transition: border-color .15s, background .15s;
}
.sm-search:focus-within { border-color: var(--stroke-strong); background: var(--tile); }
.sm-search input { flex: 1; font-size: 13px; letter-spacing: .01em; }
.sm-search .ic { color: var(--text-3); width: 16px; height: 16px; }

.sm-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.sm-head .sm-more {
  font-size: 10.5px; font-weight: 500; color: var(--text-2);
  letter-spacing: .04em;
  padding: 4px 8px; border-radius: 6px;
}
.sm-head .sm-more:hover { background: var(--hover); color: var(--text); }

.sm-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.sm-app {
  display: grid; justify-items: center; gap: 9px;
  padding: 14px 4px 12px;
  border-radius: var(--radius-md);
  transition: background .13s;
}
.sm-app:hover { background: var(--hover); }
.sm-app:active { background: var(--active); }
.sm-app .si { width: 36px; height: 36px; }
.sm-app .sl {
  font-size: 11px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.2;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-recos { margin-top: 16px; }
.sm-reco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
}
.sm-reco {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background .13s;
  text-align: left;
  min-width: 0;
}
.sm-reco:hover { background: var(--hover); }
.sm-reco .si { width: 28px; height: 28px; flex: none; }
.sm-reco .rt {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sm-reco .rs { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.sm-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 -28px;
  padding: 11px 20px;
  border-top: 1px solid var(--stroke);
  background: var(--tile-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.sm-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  transition: background .13s;
}
.sm-user:hover { background: var(--hover); }
.sm-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  color: #f4f0e7; font-family: var(--font-display); font-size: 12px;
  background: #2a2d33;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.sm-username { font-size: 12px; letter-spacing: .02em; }
.sm-power { display: flex; gap: 2px; }
.sm-pbtn {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .13s, color .13s;
}
.sm-pbtn:hover { background: var(--hover); color: var(--text); }
.sm-pbtn .ic { width: 17px; height: 17px; }

/* ---------- 开始菜单 · 默认 / 拼接 / 经典 / 紧凑 四样式 ---------- */
#startMenu[data-style="classic"] { width: 624px; padding: 16px 20px 0; }
#startMenu[data-style="default"] { width: 884px; padding: 16px 22px 0; }
#startMenu[data-style="joined"] { width: 768px; padding: 16px 20px 0; }
#startMenu[data-style="compact"] { width: 376px; padding: 14px 16px 0; }
#startMenu[data-style="classic"],
#startMenu[data-style="default"],
#startMenu[data-style="joined"],
#startMenu[data-style="compact"] {
  display: flex;
  flex-direction: column;
  height: min(570px, calc(100vh - var(--tb-h) - var(--tb-gap) - 30px));
  overflow: hidden;
}

.sm2-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--stroke); }
.sm2-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  color: #f4f0e7; font-family: var(--font-display); font-size: 14px;
  background: #2a2d33; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  cursor: pointer;
}
.sm2-who { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.sm2-who b { font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.sm2-who em { font-style: normal; font-size: 10px; color: var(--text-3); }
.sm2-actions { margin-left: auto; display: flex; gap: 2px; }
.sm2-ico {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .13s, color .13s;
}
.sm2-ico:hover { background: var(--hover); color: var(--text); }
.sm2-ico .ic { width: 16px; height: 16px; }

.sm2-search {
  display: flex; align-items: center; gap: 9px;
  height: 38px; margin-top: 12px; padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--tile-2);
  border: 1px solid var(--stroke);
}
.sm2-search .ic { width: 15px; height: 15px; color: var(--text-3); }
.sm2-input { flex: 1; min-width: 0; font-size: 12.5px; }

.sm2-body {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  padding: 14px 0 12px;
  flex: 1; min-height: 0;
  overflow: hidden;
}
.sm2-left, .sm2-right, .smd-col { min-width: 0; display: flex; flex-direction: column; }
.sm2-right { overflow: hidden; }

/* 拼接布局：小组件与日程同栏，右侧应用区更宽 */
.smj-body { grid-template-columns: 288px minmax(0, 1fr); padding-bottom: 10px; }
.smj-left, .smj-right { min-width: 0; display: flex; flex-direction: column; }
.smj-right { overflow: hidden; }
.smj-left .sm2-note { margin-top: 6px; }
.smj-cal { margin-top: 6px; padding: 9px 12px 8px; }

/* 紧凑布局：单栏列表 */
.smc-label { margin-top: 12px; }
.smc-list {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px;
  padding-bottom: 8px;
}
.smc-list .sm2-row { padding: 7px 8px; }
.smc-list .sm2-ric svg { width: 22px; height: 22px; }
.smc-list .sm2-rtt { font-size: 12px; }

.sm2-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 8px;
  font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3);
}
.sm2-label:not(:first-child) { margin-top: 14px; }
.sm2-more {
  font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: none;
  color: var(--text-2); padding: 2px 6px; border-radius: 5px;
}
.sm2-more:hover { background: var(--hover); color: var(--text); }
.sm2-z { font-size: 9.5px; letter-spacing: .08em; }

.sm2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.sm2-app {
  display: grid; justify-items: center; gap: 7px;
  padding: 10px 2px 8px;
  border-radius: 10px;
  transition: background .13s, transform .15s var(--ease);
}
.sm2-app:hover { background: var(--hover); transform: translateY(-1px); }
.sm2-app:active { background: var(--active); }
.sm2-ic svg { width: 30px; height: 30px; }
.sm2-al {
  max-width: 74px;
  font-size: 10px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sm2-list { display: flex; flex-direction: column; gap: 1px; }
.sm2-row {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 7px; border-radius: 7px;
  text-align: left; min-width: 0;
  transition: background .13s;
}
.sm2-row:hover { background: var(--hover); }
.sm2-ric { width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.sm2-ric svg { width: 20px; height: 20px; }
.sm2-rtt { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm2-scroll { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }

/* 天气卡片 */
.sm2-weather {
  display: block; width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  text-align: left;
  color: #f4f8ff;
  background: linear-gradient(135deg, #3a6fc4 0%, #6aa5e8 100%);
  box-shadow: 0 10px 20px -14px rgba(30, 70, 130, .9);
  transition: transform .18s var(--ease), box-shadow .18s;
}
.sm2-weather:hover { transform: translateY(-1px); box-shadow: 0 14px 24px -14px rgba(30, 70, 130, .9); }
.sm2-weather .w-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; opacity: .84; }
.sm2-weather .w-ico .ic { width: 16px; height: 16px; }
.sm2-weather .w-main { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.sm2-weather .w-temp { font-family: var(--font-display); font-size: 32px; line-height: 1; }
.sm2-weather .w-txt { display: flex; flex-direction: column; font-size: 11px; }
.sm2-weather .w-txt em { font-style: normal; font-size: 9.5px; opacity: .72; margin-top: 3px; }
.sm2-weather .w-days { display: flex; gap: 10px; font-size: 9.5px; opacity: .78; }

/* 音乐卡片 */
.sm2-spotify {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-top: 8px; padding: 8px 10px;
  border-radius: 10px;
  background: #14161a; color: #f2f4f8;
  text-align: left;
  transition: transform .18s var(--ease);
}
.sm2-spotify:hover { transform: translateY(-1px); }
.sm2-spotify .sp-art {
  width: 34px; height: 34px; flex: none;
  border-radius: 7px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #1ed760, #0e6b33);
  color: #06240f;
}
.sm2-spotify .sp-art .ic { width: 16px; height: 16px; }
.sm2-spotify .sp-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm2-spotify .sp-meta b { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm2-spotify .sp-meta em { font-style: normal; font-size: 9.5px; opacity: .6; margin-top: 2px; }
.sm2-spotify .sp-play { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.sm2-spotify .sp-play .ic { width: 11px; height: 11px; }

/* 便签 */
.sm2-note { background: var(--tile-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; }
.sm2-rowhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-2); }
.sm2-mini { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); }
.sm2-mini:hover { background: var(--hover); color: var(--text); }
.sm2-mini .ic { width: 12px; height: 12px; }
.nt-line { position: relative; font-size: 10.5px; color: var(--text-2); padding: 3px 0 3px 9px; }
.nt-line::before { content: ""; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .8; }
.nt-line.muted { color: var(--text-3); }

/* 底部栏 */
.sm2-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 -20px; padding: 9px 16px;
  border-top: 1px solid var(--stroke);
  background: var(--tile-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.sm2-avatarbig { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #2a2d33; color: #f4f0e7; font-size: 11px; }
.sm2-footnote { font-size: 10.5px; color: var(--text-3); }
.sm2-power { display: flex; gap: 2px; }
.sm2-pbtn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.sm2-pbtn:hover { background: var(--hover); color: var(--text); }
.sm2-pbtn .ic { width: 16px; height: 16px; }

/* ---------- 开始菜单 · 仪表盘样式 ---------- */
#startMenu[data-style="default"] .sm2-foot { justify-content: flex-start; margin: 0 -22px; padding: 9px 18px; }
#startMenu[data-style="default"] .sm2-power { margin-left: auto; }
#startMenu[data-style="compact"] .sm2-foot { margin: 0 -16px; }

/* ---------- 开始菜单 · 概念样式 ---------- */
#startMenu[data-style="concept"] {
  width: 900px;
  padding: 0;
  height: min(610px, calc(100vh - var(--tb-h) - var(--tb-gap) - 30px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cs-wrap { flex: 1; display: flex; min-height: 0; }
.cs-left {
  width: 330px; flex: none;
  display: flex; flex-direction: column;
  padding: 16px 12px 14px 18px;
  overflow: auto;
}
.cs-search { margin-bottom: 10px; }
.cs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 4px;
  margin-top: 8px;
  font-size: 12px; font-weight: 600;
}
.cs-more {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 500; color: var(--text-3);
}
.cs-more:hover { background: var(--hover); color: var(--text); }
.cs-more .ic { width: 11px; height: 11px; }
.cs-list { display: flex; flex-direction: column; }
.cs-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  text-align: left;
  transition: background .13s, color .13s;
}
.cs-row:hover { background: var(--hover); color: var(--text); }
.cs-row > span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-row.recent { height: 42px; }
.cs-file {
  width: 27px; height: 27px; flex: none;
  border-radius: 7px;
  display: grid; place-items: center;
  background: var(--tile);
  border: 1px solid var(--stroke);
}
.cs-row-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cs-row-txt b { font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-row-txt em { font-style: normal; font-size: 9.5px; color: var(--text-3); }

.cs-right {
  flex: 1; min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 16px 18px 16px 14px;
  border-left: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(204, 222, 246, .52), rgba(222, 232, 247, .26));
  overflow: auto;
}
html[data-theme="dark"] .cs-right {
  background: linear-gradient(180deg, rgba(96, 130, 178, .16), rgba(70, 92, 128, .08));
}

.cs-profile {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding-bottom: 2px;
}
.cs-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 20px; color: var(--accent);
  background: linear-gradient(160deg, #f4f7fc, #d9e4f2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 4px 12px -5px rgba(28, 25, 18, .35);
}
html[data-theme="dark"] .cs-avatar { background: linear-gradient(160deg, #2a3040, #1c2130); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.cs-name { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.cs-mail { font-size: 9.5px; color: var(--text-3); }
.cs-tools { display: flex; gap: 2px; margin-top: 4px; }

.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}
.cs-tile {
  display: grid; justify-items: center; gap: 7px;
  padding: 13px 6px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .72);
  transition: background .15s, transform .15s var(--ease-snap);
}
.cs-tile:hover { background: #fff; color: var(--text); transform: translateY(-1px); }

.cs-weather {
  position: relative;
  border-radius: 14px;
  padding: 12px;
  display: flex; flex-direction: column;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(160deg, #4f97e8, #1f60b8);
  box-shadow: 0 12px 24px -18px rgba(31, 96, 184, .9);
}
.cs-weather::after {
  content: "";
  position: absolute; right: -30px; top: -30px;
  width: 104px; height: 104px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.cs-wx-ic { position: absolute; right: 12px; top: 11px; }
.cs-wx-ic .ic { width: 24px; height: 24px; }
.cs-temp {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 300;
  line-height: 1; letter-spacing: -.02em;
  margin-top: auto;
}
.cs-hl { font-size: 9.5px; opacity: .85; margin-top: 4px; }
.cs-cond { font-size: 11px; font-weight: 600; margin-top: 7px; }
.cs-city { font-size: 9.5px; opacity: .72; margin-top: 1px; }

.cs-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 118px;
  color: #fff;
  background: #191a1f url("../assets/gallery/candle-light.jpg") center / cover no-repeat;
}
.cs-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 16, .18), rgba(12, 12, 16, .8));
}
.cs-media-in {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  gap: 1px;
  padding: 10px 12px;
}
.cs-media-in b { font-size: 11px; font-weight: 600; }
.cs-media-in > span { font-size: 9.5px; opacity: .68; }
.cs-media-ctl { display: flex; align-items: center; gap: 8px; margin: 6px 0 5px; }
.cs-mbtn {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  transition: background .13s;
}
.cs-mbtn:hover { background: rgba(255, 255, 255, .26); }
.cs-mbtn .ic { width: 12px; height: 12px; }
.cs-mbtn.play { width: 30px; height: 30px; background: #fff; color: #1b1a17; }
.cs-mbtn.play .ic { width: 14px; height: 14px; }
.cs-mbtn.play:hover { background: #fff; }
.cs-prog { width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .26); overflow: hidden; }
.cs-prog i { display: block; height: 100%; background: #fff; border-radius: 2px; }

.cs-todo {
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .72);
}
.cs-todo-head, .cs-stock-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 600; color: var(--text-2);
}
.cs-dots { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); }
.cs-dots:hover { background: var(--hover); color: var(--text); }
.cs-dots .ic { width: 14px; height: 14px; }
.cs-todo-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px;
  color: var(--text-2);
  text-align: left;
}
.cs-todo-row:hover { color: var(--text); }
.cs-box {
  width: 13px; height: 13px; flex: none;
  border-radius: 4px;
  border: 1.4px solid var(--stroke-strong);
  display: grid; place-items: center;
  transition: background .13s, border-color .13s;
}
.cs-todo-row.done .cs-box { background: var(--accent); border-color: var(--accent); }
.cs-todo-row.done .cs-box::after {
  content: "";
  width: 6px; height: 3px;
  border-left: 1.4px solid #fff;
  border-bottom: 1.4px solid #fff;
  transform: rotate(-45deg) translate(0, -1px);
}
.cs-todo-row.done > span { text-decoration: line-through; opacity: .55; }
.cs-plus {
  position: absolute; right: 10px; bottom: 8px;
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.cs-plus .ic { width: 13px; height: 13px; }

.cs-stocks {
  grid-column: 1 / -1;
  display: grid; gap: 4px;
  padding: 9px 11px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .72);
}
.cs-stock { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.cs-tk { width: 34px; font-weight: 700; letter-spacing: .02em; }
.cs-co { flex: 1; min-width: 0; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-stock b { font-weight: 600; }
.cs-stock em { font-style: normal; width: 46px; text-align: right; font-size: 10px; }
.cs-stock em.up { color: #2f9e58; }
.cs-stock em.down { color: #c9483d; }

html[data-theme="dark"] .cs-tile,
html[data-theme="dark"] .cs-todo,
html[data-theme="dark"] .cs-stocks {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .cs-tile:hover { background: rgba(255, 255, 255, .1); }

/* ---------- 开始菜单 · 侧栏样式 ---------- */
#startMenu[data-style="rail"] {
  width: 452px;
  padding: 0;
  max-height: calc(100vh - var(--tb-h) - var(--tb-gap) - 30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rl-wrap { flex: 1; display: flex; min-height: 0; }
.rl-rail {
  width: 68px; flex: none;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 12px 0;
  border-right: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .26);
}
.rl-avatar {
  width: 34px; height: 34px;
  border-radius: 50%; overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 3px 10px -4px rgba(28, 25, 18, .45);
}
.rl-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rl-nav {
  position: relative;
  width: 100%;
  padding: 7px 0 6px;
  display: grid; justify-items: center; gap: 4px;
  font-size: 8.5px; color: var(--text-3);
  transition: color .13s, background .13s;
}
.rl-nav .ic { width: 18px; height: 18px; }
.rl-nav:hover { color: var(--text); background: var(--hover); }
.rl-nav.active { color: var(--accent); font-weight: 600; }
.rl-nav.active::before {
  content: "";
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.rl-flex { flex: 1; }
.rl-ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .13s, color .13s;
}
.rl-ico:hover { background: var(--hover); color: var(--text); }
.rl-ico .ic { width: 16px; height: 16px; }

.rl-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 14px 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(234, 241, 251, .5), rgba(246, 238, 246, .34));
}
html[data-theme="dark"] .rl-main {
  background: linear-gradient(180deg, rgba(86, 108, 148, .2), rgba(96, 76, 112, .12));
}
.rl-search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  border-radius: 10px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  margin-bottom: 12px;
}
.rl-search .ic { width: 14px; height: 14px; flex: none; color: var(--text-3); }
.rl-search input { flex: 1; min-width: 0; font-size: 12px; }
.rl-search:focus-within { border-color: var(--stroke-strong); }

.rl-h {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em;
  margin: 6px 0 8px;
}
.rl-sub { font-size: 9.5px; color: var(--text-3); margin: -4px 0 8px; }

.rl-recent {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-bottom: 10px;
}
.rl-recent-item {
  display: grid; justify-items: center; gap: 5px;
  padding: 4px 1px;
  border-radius: 9px;
  font-size: 8.5px; color: var(--text-2);
  transition: background .13s, transform .13s;
}
.rl-recent-item:hover {
  background: rgba(255, 255, 255, .6);
  color: var(--text);
  transform: translateY(-1px);
}
.rl-recent-item span {
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rl-meets {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.rl-meet {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 118px;
  padding: 11px 11px 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
}
.rl-meet.purple { background: linear-gradient(150deg, #e8e7fb, #dbd7f6); }
.rl-meet.warm { background: linear-gradient(150deg, #f7e7d8, #f2dfe6 58%, #e6e0f5); }
.rl-when { font-size: 8.5px; color: #5c5a86; letter-spacing: .02em; }
.rl-meet-row { display: flex; align-items: flex-start; gap: 6px; }
.rl-meet-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rl-meet-info b { font-size: 11px; font-weight: 600; line-height: 1.3; color: #33324f; }
.rl-meet-info em { font-style: normal; font-size: 8.5px; color: #6f6c8c; }
.rl-avatars { display: flex; flex: none; }
.rl-avatars i {
  width: 16px; height: 16px;
  margin-left: -5px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  display: grid; place-items: center;
  font-style: normal; font-size: 7px; color: #fff;
}
.rl-avatars i:first-child { margin-left: 0; }
.rl-meet-t { font-size: 11px; font-weight: 600; color: #4a2f22; }
.rl-meet-f { font-style: normal; font-size: 8.5px; color: #8a6350; }
.rl-mbtn {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px;
  border-radius: 6px;
  font-size: 9px; color: #fff;
  transition: filter .13s, background .13s;
}
.rl-mbtn .ic { width: 10px; height: 10px; }
.rl-mbtn.blue { background: #2f6bd6; }
.rl-mbtn.blue:hover { background: #2559b5; }
.rl-mbtn.blue.on { background: #3f9a5d; }
.rl-mbtn.orange { background: linear-gradient(120deg, #d2542f, #c4452a); }
.rl-mbtn.orange:hover { filter: brightness(1.06); }

html[data-theme="dark"] .rl-meet.purple {
  background: linear-gradient(150deg, rgba(108, 112, 180, .45), rgba(80, 78, 138, .4));
  border-color: rgba(255, 255, 255, .1);
}
html[data-theme="dark"] .rl-meet.warm {
  background: linear-gradient(150deg, rgba(150, 104, 72, .4), rgba(120, 82, 100, .36) 58%, rgba(96, 88, 140, .34));
  border-color: rgba(255, 255, 255, .1);
}
html[data-theme="dark"] .rl-meet-info b,
html[data-theme="dark"] .rl-meet-t { color: #f0eef7; }
html[data-theme="dark"] .rl-meet-info em,
html[data-theme="dark"] .rl-when,
html[data-theme="dark"] .rl-meet-f { color: rgba(240, 238, 247, .66); }

.rl-folders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rl-folder {
  padding: 8px 9px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--stroke);
}
html[data-theme="dark"] .rl-folder {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .08);
}
.rl-folder-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px; font-weight: 600;
  margin-bottom: 7px;
}
.rl-edit {
  width: 18px; height: 18px;
  border-radius: 5px;
  display: grid; place-items: center;
  color: var(--text-3);
}
.rl-edit:hover { background: var(--hover); color: var(--text); }
.rl-edit .ic { width: 10px; height: 10px; }
.rl-folder-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px 2px;
  justify-items: center;
}
.rl-fitem { padding: 2px; border-radius: 7px; }
.rl-fitem:hover { background: var(--hover); }

.smd-search {
  display: flex; align-items: center; gap: 10px;
  width: min(440px, 100%);
  margin: 2px auto 14px; padding: 0 14px;
  height: 40px;
  border-radius: 10px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  transition: border-color .15s, background .15s;
}
.smd-search:focus-within { border-color: var(--stroke-strong); background: var(--tile); }
.smd-search .ic { width: 16px; height: 16px; color: var(--text-3); }
.smd-hint { font-size: 9.5px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--stroke); color: var(--text-3); }

.smd-body {
  display: grid;
  grid-template-columns: 272px 258px minmax(0, 1fr);
  gap: 16px;
  flex: 1; min-height: 0;
  padding-bottom: 12px;
  overflow: hidden;
}
.smd-col { gap: 10px; overflow: hidden; }
.smd-apps { overflow-y: auto; padding-right: 2px; }
.smd-apps .sm2-app { padding: 6px 2px 5px; gap: 4px; }
.smd-apps .sm2-ic svg { width: 26px; height: 26px; }
.smd-apps .sm2-al { font-size: 9.5px; max-width: 66px; }
.smd-apps .sm2-label { margin-bottom: 6px; }
.smd-card { background: var(--tile-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 11px 12px; }
.smd-recos { display: flex; flex-direction: column; gap: 1px; }
.smd-reco { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 7px; text-align: left; }
.smd-reco:hover { background: var(--hover); }
.smd-reco .si { width: 24px; height: 24px; flex: none; }
.smd-reco span { display: flex; flex-direction: column; min-width: 0; }
.smd-reco b { font-size: 11.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smd-reco em { font-style: normal; font-size: 9.5px; color: var(--text-3); margin-top: 1px; }

.smd-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 6px 0 8px; }
.cal-d { display: grid; justify-items: center; gap: 3px; padding: 4px 0; border-radius: 6px; }
.cal-d em { font-style: normal; font-size: 8.5px; color: var(--text-3); }
.cal-d b { font-size: 11px; font-weight: 500; color: var(--text-2); }
.cal-d.today { background: var(--accent); }
.cal-d.today em, .cal-d.today b { color: #fff; }
.smd-events { display: flex; flex-direction: column; gap: 6px; }
.smd-events .ev { display: flex; align-items: flex-start; gap: 8px; }
.ev-dot { width: 3px; height: 26px; border-radius: 3px; background: var(--accent); flex: none; }
.ev-dot.alt { background: #c07a3a; }
.smd-events b { display: block; font-size: 11px; font-weight: 500; }
.smd-events em { font-style: normal; font-size: 9.5px; color: var(--text-3); }

.smd-quick { padding: 10px 11px; }
.smd-quickgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.smd-q {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
  border: 1px solid var(--stroke);
  background: var(--tile);
  font-size: 10.5px; color: var(--text-2);
  transition: background .13s, color .13s;
}
.smd-q:hover { background: var(--hover); color: var(--text); }
.smd-q .si { width: 18px; height: 18px; flex: none; }
.smd-q .si svg { width: 18px; height: 18px; }

.sm2-scroll, .smd-apps {
  mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
}

.sm2-group .sm2-label { margin-top: 10px; }
.sm2-power-wide { gap: 4px; }
.sm2-pbtnw { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 7px; font-size: 10.5px; color: var(--text-2); }
.sm2-pbtnw:hover { background: var(--hover); color: var(--text); }
.sm2-pbtnw .ic { width: 14px; height: 14px; }

/* 搜索时收起装饰区域 */
#startMenu.searching .smd-col:not(.smd-apps) { display: none; }
#startMenu.searching .sm2-left .sm2-weather,
#startMenu.searching .sm2-left .sm2-spotify,
#startMenu.searching .sm2-right > .sm2-list:first-of-type { display: none; }

/* ==========================================================================
   设置 · 开始菜单样式选择
   ========================================================================== */
.menu-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-opt {
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--tile-2);
  transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.menu-opt:hover { background: var(--tile); transform: translateY(-1px); }
.menu-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.mo-prev {
  position: relative;
  height: 96px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--mica-strong);
  overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
}
.mo-head { display: flex; align-items: center; gap: 5px; }
.mo-av { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); opacity: .6; }
.mo-ln { width: 34px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: .35; }
.mo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; }
.mo-cols3 { display: grid; grid-template-columns: 1fr .8fr 1.1fr; gap: 6px; flex: 1; }
.mo-c { display: flex; flex-direction: column; gap: 4px; }
.mo-c i { display: block; height: 9px; border-radius: 3px; background: var(--hover); }
.mo-cols .mo-c:first-child i:first-child { height: 26px; background: linear-gradient(135deg, rgba(58, 111, 196, .55), rgba(106, 165, 232, .35)); }
.mo-modern .mo-search { width: 58%; height: 8px; border-radius: 4px; margin: 0 auto; background: var(--hover); }
.mo-c i.mo-blue { background: linear-gradient(135deg, rgba(58, 111, 196, .55), rgba(106, 165, 232, .35)); }
.mo-narrow { width: 62%; margin: 0 auto; display: flex; flex-direction: column; gap: 5px; }
.mo-narrow i { display: block; height: 8px; border-radius: 3px; background: var(--hover); }
.mo-narrow .mo-head { margin-bottom: 1px; }
.mo-bar { height: 6px; border-radius: 3px; background: var(--hover); }
.mo-rail { flex-direction: row; gap: 6px; }
.mo-railbar {
  width: 14px; flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding-top: 3px;
  border-right: 1px solid var(--stroke);
}
.mo-railbar i { width: 6px; height: 6px; border-radius: 2px; background: var(--hover); }
.mo-railbar i:first-child { background: linear-gradient(135deg, rgba(58, 111, 196, .55), rgba(106, 165, 232, .35)); }
.mo-railmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 2px 0 0 2px; }
.mo-railmain i { display: block; height: 10px; border-radius: 3px; background: var(--hover); }
.mo-railmain i:first-child { height: 8px; width: 72%; }
.mo-railmain i:nth-child(3) { height: 26px; }
.mo-name { margin-top: 9px; font-size: 12px; font-weight: 600; }
.mo-desc { margin-top: 3px; font-size: 10.5px; line-height: 1.5; color: var(--text-3); }

/* 菜单栏样式预览 */
.bp-stage {
  position: relative;
  height: 96px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, var(--tile), var(--tile-2));
  overflow: hidden;
}
.bp-bar {
  position: absolute;
  display: flex; align-items: center; gap: 3px;
  padding: 4px 6px;
  background: var(--mica-strong);
  border: 1px solid var(--stroke);
}
.bp-bar i {
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--text-3); opacity: .55;
  flex: none;
}
.bp-bar em {
  width: 12px; height: 5px; border-radius: 2px;
  background: var(--text-3); opacity: .5;
  margin-left: auto;
}
.bp-default .bp-bar { left: 22%; right: 22%; bottom: 10px; border-radius: 5px; }
.bp-joined .bp-bar {
  left: 0; right: 0; bottom: 0;
  border-radius: 5px 5px 0 0;
  justify-content: center;
  padding-right: 40px;
}
.bp-joined .bp-bar em { position: absolute; right: 6px; }
.bp-classic .bp-bar {
  left: 0; right: 0; bottom: 0;
  border-radius: 0;
  height: 15px;
}
.bp-compact .bp-bar { left: 30%; right: 30%; bottom: 14px; border-radius: 4px; padding: 2px 4px; }
.bp-compact .bp-bar i { width: 5px; height: 5px; }

/* 新菜单入场 */
.flyout.open .sm2-app,
.flyout.open .sm2-row,
.flyout.open .smd-card,
.flyout.open .sm2-weather,
.flyout.open .sm2-spotify,
.flyout.open .sm2-note { animation: popIn .32s var(--ease) backwards; }
.flyout.open .sm2-app:nth-child(2) { animation-delay: .02s; }
.flyout.open .sm2-app:nth-child(3) { animation-delay: .04s; }
.flyout.open .sm2-app:nth-child(4) { animation-delay: .06s; }
.flyout.open .sm2-app:nth-child(5) { animation-delay: .08s; }
.flyout.open .sm2-app:nth-child(6) { animation-delay: .1s; }
.flyout.open .sm2-app:nth-child(7) { animation-delay: .12s; }
.flyout.open .sm2-app:nth-child(8) { animation-delay: .14s; }

/* ---------- 快捷设置 ---------- */
.quick-panel {
  right: 16px;
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  width: 372px;
  padding: 14px;
  transform-origin: bottom right;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-content: start;
  gap: 8px;
}
.qs-head {
  grid-column: 1 / -1;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  letter-spacing: .01em;
  padding: 2px 2px 6px;
}
.qs-card {
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  border-radius: 14px;
}

/* 电池卡片 */
.qs-battery {
  grid-column: 1;
  grid-row: 2;
  display: grid; justify-items: center; align-content: center;
  gap: 2px;
  padding: 16px 12px 14px;
}
.qs-ring { position: relative; width: 84px; height: 84px; }
.qs-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.qs-ring circle { fill: none; stroke-width: 6; }
.qs-ring .ring-bg { stroke: var(--stroke-strong); opacity: .5; }
.qs-ring .ring-fg { stroke: var(--accent); stroke-linecap: round; }
.qs-ring-txt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 600; letter-spacing: -.01em;
}
.qs-device { margin-top: 8px; font-size: 11.5px; font-weight: 600; }
.qs-device-sub { font-size: 10px; color: var(--text-3); }

/* 正在播放 */
.qs-media {
  grid-column: 2;
  grid-row: 2;
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px;
}
.qs-art {
  width: 100%; aspect-ratio: 1 / 1; max-height: 92px;
  border-radius: 9px; object-fit: cover;
  display: block; margin-bottom: 4px;
}
.qs-song {
  font-size: 10.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-artist { font-size: 9.5px; color: var(--text-3); }
.qs-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 4px;
}
.qs-ctrl {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-2);
}
.qs-ctrl:hover { background: var(--hover); color: var(--text); }
.qs-ctrl.on { color: var(--accent); }
.qs-ctrl .ic { width: 13px; height: 13px; fill: none; }

/* 滑杆卡片 */
.qs-slider-card {
  grid-column: 1;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 10px;
}
.qs-slider-card.bright { grid-row: 3; }
.qs-slider-card.vol { grid-row: 4; }
.qs-slider-card .ic.lead { width: 16px; height: 16px; color: var(--text-2); flex: none; }
.qs-slider-card .qs-chev { width: 12px; height: 12px; color: var(--text-3); flex: none; }
.qs-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--p, 70%), var(--stroke-strong) var(--p, 70%));
  outline: none;
}
.qs-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .26);
  cursor: pointer;
}

/* 连接管理 */
.qs-conn {
  grid-column: 2; grid-row: 3 / span 3;
  padding: 12px 11px 6px;
  display: flex; flex-direction: column;
}
.qs-conn-title { font-size: 10.5px; font-weight: 700; margin-bottom: 4px; }
.qs-conn-row {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 0;
  border-top: 1px solid var(--stroke);
}
.qs-conn-row:first-of-type { border-top: 0; }
.qs-conn-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.qs-conn-name { font-size: 10.5px; font-weight: 500; }
.qs-conn-sub {
  font-size: 9px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-conn-row .ic { width: 14px; height: 14px; color: var(--text-2); flex: none; }

/* 底部快捷磁贴 */
.qs-tiles {
  grid-column: 1;
  grid-row: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.qs-tile {
  position: relative;
  height: 46px;
  border-radius: 12px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .15s, border-color .15s, color .15s;
}
.qs-tile:hover { background: var(--hover); }
.qs-tile.on { background: var(--accent); border-color: transparent; color: #fff; }
.qs-tile .ic { width: 16px; height: 16px; }
.qs-tile .qs-chev {
  position: absolute; right: 6px; bottom: 6px;
  opacity: .55;
}
.qs-tile .qs-chev .ic { width: 9px; height: 9px; }

/* 底部状态栏 */
.qs-foot {
  grid-column: 1 / -1;
  grid-row: 6;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 2px 0;
}
.qs-batt { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); }
.qs-batt .ic { width: 16px; height: 16px; }
.qs-foot .spacer { flex: 1; }
.qs-fbtn {
  width: 27px; height: 27px; border-radius: 7px;
  display: grid; place-items: center;
  color: var(--text-2);
}
.qs-fbtn:hover { background: var(--hover); color: var(--text); }
.qs-fbtn .ic { width: 15px; height: 15px; }
.qs-fbtn.edit { background: var(--tile); border: 1px solid var(--stroke); }

/* ---------- 系统托盘总览 ---------- */
.tb-btn.tb-caret { width: 26px; }
.tb-btn.tb-caret .ic { width: 14px; height: 14px; }

.glance-panel {
  right: 16px;
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  width: 400px;
  padding: 16px 16px 14px;
  transform-origin: bottom right;
  background: linear-gradient(165deg, rgba(244, 242, 253, .96), rgba(229, 230, 247, .94));
  border-color: rgba(255, 255, 255, .72);
}
html[data-theme="dark"] .glance-panel {
  background: linear-gradient(165deg, rgba(33, 32, 43, .96), rgba(24, 24, 32, .95));
  border-color: rgba(255, 255, 255, .12);
}
.gl-head {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: .01em;
  padding: 2px 2px 10px;
}
.gl-sect {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  padding: 6px 2px 8px;
}
.gl-sect .ic { width: 15px; height: 15px; }

.gl-card {
  display: flex; align-items: center; gap: 12px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 1px 2px rgba(28, 25, 18, .06);
}
.gl-art {
  width: 66px; height: 66px; flex: none;
  border-radius: 9px; object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 1px 3px rgba(28, 25, 18, .18);
}
.gl-meta { flex: 1; min-width: 0; display: grid; gap: 3px; }
.gl-live { display: block; height: 8px; }
.gl-live i {
  display: block; width: 8px; height: 8px;
  border-radius: 50%; background: #3fbf57;
  box-shadow: 0 0 0 3px rgba(63, 191, 87, .16);
}
.gl-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gl-artist { font-size: 11px; color: var(--text-3); }
.gl-controls { display: flex; align-items: center; gap: 4px; flex: none; }
.gl-ctrl {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.gl-ctrl:hover { background: var(--hover); color: var(--text); }
.gl-ctrl .ic { width: 14px; height: 14px; }
.gl-ctrl.play {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid rgba(28, 25, 18, .06);
  box-shadow: 0 1px 3px rgba(28, 25, 18, .12);
  color: var(--text);
}
.gl-ctrl.play.on { background: var(--accent); border-color: transparent; color: #fff; }
.gl-ctrl.play .ic { width: 16px; height: 16px; }

.gl-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gl-app {
  position: relative;
  height: 68px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 1px 2px rgba(28, 25, 18, .06);
  display: grid; place-items: center;
  transition: background .15s, transform .15s var(--ease-snap);
}
.gl-app:hover { background: #fff; transform: translateY(-1px); }
.gl-sys {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 1px 3px rgba(28, 25, 18, .2);
}
.gl-sys .ic { width: 20px; height: 20px; stroke-width: 1.8; }
.gl-sys.bt { background: linear-gradient(160deg, #57a8f5, #1f6fd0); }
.gl-sys.sec { background: linear-gradient(160deg, #b9bfc8, #7d848f); }

.gl-badge {
  position: absolute;
  right: -6px; bottom: -6px;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: #fff;
  display: grid; place-items: center;
  color: var(--text);
  box-shadow: 0 4px 10px -2px rgba(28, 25, 18, .28), 0 0 0 1px rgba(28, 25, 18, .05);
}
.gl-badge .ic { width: 13px; height: 13px; }

html[data-theme="dark"] .gl-card,
html[data-theme="dark"] .gl-app {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: none;
}
html[data-theme="dark"] .gl-app:hover { background: rgba(255, 255, 255, .10); }
html[data-theme="dark"] .gl-ctrl.play,
html[data-theme="dark"] .gl-badge {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .14);
  color: var(--text);
  box-shadow: none;
}
html[data-theme="dark"] .gl-art { box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

/* ---------- 通知中心 ---------- */
.notif-panel {
  right: 16px;
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  width: 352px;
  padding: 18px;
  transform-origin: bottom right;
  max-height: 62vh;
  overflow: auto;
}
.nf-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
}
.nf-clear {
  font-size: 10.5px; letter-spacing: .04em;
  color: var(--accent); text-transform: none;
}
.nf-card {
  padding: 12px 13px;
  border-radius: var(--radius-md);
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  margin-bottom: 6px;
}
.nf-card .nf-t { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.nf-card .nf-b { font-size: 11px; color: var(--text-2); line-height: 1.6; }
.nf-empty { text-align: center; color: var(--text-3); font-size: 11.5px; padding: 26px 0; }

/* ---------- 小组件 ---------- */
.widget-panel {
  left: 16px;
  bottom: calc(var(--tb-h) + var(--tb-gap) + 10px);
  width: 500px;
  padding: 16px;
  transform-origin: bottom left;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
.wg-card {
  border-radius: var(--radius-md);
  padding: 15px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.wg-card.wg-weather { grid-column: 1 / -1; }
.wg-weather-main { display: flex; align-items: center; justify-content: space-between; }
.wg-weather-main > div:last-child { display: grid; place-items: center; }
.wg-weather-main .ic { width: 46px; height: 46px; color: var(--accent); stroke-width: 1.2; }
.wg-temp {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 300;
  letter-spacing: -.02em; line-height: 1;
}
.wg-where { font-size: 11px; color: var(--text-2); letter-spacing: .04em; margin-bottom: 6px; }
.wg-desc { font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.wg-label {
  font-size: 9.5px; color: var(--text-3);
  letter-spacing: .16em; text-transform: uppercase;
}
.wg-big {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 300;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.wg-note { font-size: 11px; line-height: 1.65; color: var(--text-2); margin-top: 8px; }

/* ---------- 右键菜单 ---------- */
.context-menu {
  position: absolute;
  z-index: 1500;
  min-width: 212px;
  padding: 5px;
  border-radius: var(--radius-md);
  background: var(--acrylic-deep);
  backdrop-filter: blur(34px) saturate(140%);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--stroke-outer);
  box-shadow: var(--shadow-fly);
  font-size: 12px;
  transform-origin: top left;
  animation: ctxIn .14s var(--ease);
}
@keyframes ctxIn { from { opacity: 0; transform: scale(.94); } }
.ctx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: default;
  white-space: nowrap;
}
.ctx-item:hover { background: var(--hover); }
.ctx-item .ic { width: 15px; height: 15px; color: var(--text-3); }
.ctx-item .ctx-kbd { margin-left: auto; font-size: 10px; color: var(--text-3); letter-spacing: .04em; }
.ctx-sep { height: 1px; margin: 4px 5px; background: var(--stroke); }

/* ---------- Alt+Tab ---------- */
.alt-tab {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  display: flex; gap: 6px;
  padding: 12px;
  border-radius: 18px;
  background: var(--acrylic-deep);
  backdrop-filter: blur(34px) saturate(140%);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--stroke-outer);
  box-shadow: var(--shadow-fly);
}
.at-item {
  width: 116px;
  padding: 14px 8px 12px;
  border-radius: var(--radius-md);
  display: grid; justify-items: center; gap: 9px;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.at-item.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
}
.at-item .si { width: 38px; height: 38px; }
.at-item .al {
  font-size: 10.5px; color: var(--text-2);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 提示气泡 ---------- */
.toast-layer {
  position: absolute;
  right: 20px; bottom: 96px;
  z-index: 1800;
  display: grid; gap: 6px; justify-items: end;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  background: var(--acrylic-deep);
  backdrop-filter: blur(30px) saturate(140%);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  border: 1px solid var(--stroke-outer);
  box-shadow: var(--shadow-fly);
  font-size: 11.5px;
  letter-spacing: .01em;
  animation: toastIn .26s var(--ease-snap);
}
.toast .ic { width: 16px; height: 16px; color: var(--accent); }
.toast.out { animation: toastOut .2s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(5px) scale(.98); } }

/* ---------- 关机 / 已关机 ---------- */
.power-screen { background: #0b0c0d; }
.power-center { display: grid; justify-items: center; gap: 26px; }
.power-tip {
  color: rgba(255, 255, 255, .5);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.off-screen { background: #060708; }
.off-center { display: grid; justify-items: center; gap: 20px; }
.off-mark {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
}
.off-mark::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--accent);
}
.off-tip { color: rgba(255, 255, 255, .34); font-size: 10.5px; letter-spacing: .24em; }
.off-btn {
  margin-top: 8px;
  padding: 9px 22px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: #f2efe8;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: background .16s, border-color .16s;
}
.off-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }

/* ==========================================================================
   动效层 — 全局微交互
   ========================================================================== */

/* 桌面图标：错峰入场 + 悬浮抬升 */
@keyframes iconIn {
  from { opacity: 0; transform: translateY(12px) scale(.86); }
}
.desk-icon {
  transition: transform .18s var(--ease), background .16s var(--ease);
  animation: iconIn .34s var(--ease) backwards;
}
.desk-icon:nth-child(1) { animation-delay: .02s; }
.desk-icon:nth-child(2) { animation-delay: .05s; }
.desk-icon:nth-child(3) { animation-delay: .08s; }
.desk-icon:nth-child(4) { animation-delay: .11s; }
.desk-icon:nth-child(5) { animation-delay: .14s; }
.desk-icon:nth-child(6) { animation-delay: .17s; }
.desk-icon:nth-child(7) { animation-delay: .2s; }
.desk-icon:nth-child(8) { animation-delay: .23s; }
.desk-icon:nth-child(9) { animation-delay: .26s; }
.desk-icon:hover { transform: translateY(-2px); }
.desk-icon:active { transform: translateY(0) scale(.97); }
.desk-icon .di-icon { transition: transform .2s var(--ease); }
.desk-icon:hover .di-icon { transform: scale(1.06); }

/* 壁纸缓慢呼吸 */
@keyframes wpDrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.055) translate3d(-1%, -.8%, 0); }
}
.wallpaper { animation: wpDrift 64s ease-in-out infinite alternate; will-change: transform; }

/* 任务栏：悬浮上浮 + 图标微放大 + 运行点弹入 */
@keyframes dotPop {
  from { opacity: 0; transform: translateX(-50%) scaleX(.2); }
}
.tb-btn {
  transition: background .16s var(--ease), transform .18s var(--ease);
}
.tb-btn:hover { transform: translateY(-2px); }
.tb-btn:active { transform: translateY(0) scale(.93); }
.tb-btn svg, .tb-btn .ic { transition: transform .2s var(--ease); }
.tb-btn:hover svg, .tb-btn:hover .ic { transform: scale(1.07); }
.tb-btn.running .tb-dot { animation: dotPop .24s var(--ease); }
.tb-start:hover svg { transform: scale(1.1) rotate(-4deg); }

/* 开始菜单内容错峰出场 */
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
}
.flyout.open .sm-search { animation: popIn .26s var(--ease) backwards; }
.flyout.open .sm-app { animation: popIn .3s var(--ease) backwards; }
.flyout.open .sm-app:nth-child(1) { animation-delay: .02s; }
.flyout.open .sm-app:nth-child(2) { animation-delay: .045s; }
.flyout.open .sm-app:nth-child(3) { animation-delay: .07s; }
.flyout.open .sm-app:nth-child(4) { animation-delay: .095s; }
.flyout.open .sm-app:nth-child(5) { animation-delay: .12s; }
.flyout.open .sm-app:nth-child(6) { animation-delay: .145s; }
.flyout.open .sm-app:nth-child(7) { animation-delay: .17s; }
.flyout.open .sm-app:nth-child(8) { animation-delay: .195s; }
.flyout.open .sm-reco { animation: popIn .32s var(--ease) backwards; }
.flyout.open .sm-reco:nth-child(1) { animation-delay: .12s; }
.flyout.open .sm-reco:nth-child(2) { animation-delay: .16s; }
.flyout.open .sm-reco:nth-child(3) { animation-delay: .2s; }
.flyout.open .sm-reco:nth-child(4) { animation-delay: .24s; }

/* 快捷设置磁贴 */
@keyframes tileIn {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
}
.flyout.open .qs-tile { animation: tileIn .3s var(--ease) backwards; }
.flyout.open .qs-tile:nth-child(1) { animation-delay: .03s; }
.flyout.open .qs-tile:nth-child(2) { animation-delay: .06s; }
.flyout.open .qs-tile:nth-child(3) { animation-delay: .09s; }
.flyout.open .qs-tile:nth-child(4) { animation-delay: .12s; }
.flyout.open .qs-tile:nth-child(5) { animation-delay: .15s; }
.flyout.open .qs-tile:nth-child(6) { animation-delay: .18s; }

/* 锁屏元素依次浮现 */
@keyframes lockIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
}
.lock:not(.hidden) .lock-time { animation: lockIn .8s var(--ease) backwards; }
.lock:not(.hidden) .lock-date { animation: lockIn .8s var(--ease) .1s backwards; }
.lock:not(.hidden) .lock-net { animation: lockIn .6s var(--ease) .3s backwards; }
.lock:not(.hidden) .login-avatar { animation: lockIn .7s var(--ease) .18s backwards; }
.lock:not(.hidden) .login-name { animation: lockIn .7s var(--ease) .24s backwards; }
.lock:not(.hidden) .login-box { animation: lockIn .7s var(--ease) .3s backwards; }
.lock:not(.hidden) .login-hint { animation: lockIn .7s var(--ease) .36s backwards; }

/* 桌面整体淡入 */
@keyframes deskIn {
  from { opacity: 0; transform: scale(1.012); }
}
#desktop:not(.hidden) { animation: deskIn .5s var(--ease) backwards; }

/* 主题切换平滑（.flyout 的过渡由自身规则负责，避免覆盖缩放动画） */
body, .desktop, .taskbar { transition: background-color .28s var(--ease), color .28s var(--ease); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb {
  background: var(--text-3);
  border-radius: 10px;
  border: 4px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-2); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 动效为本仿真系统的核心体验，不随系统“减少动画”设置关闭 */

/* ==========================================================================
   桌面小组件栏
   ========================================================================== */
.widget-bar {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 264px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  pointer-events: none;
}
.dw {
  pointer-events: auto;
  border-radius: 15px;
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  color: var(--text);
  overflow: hidden;
}

/* Copilot */
.dw-copilot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.dw-copilot:hover { transform: translateY(-1px); background: var(--hover); }
.dw-cp-logo {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #f7b26a, #f26f8b, #a56cf0, #67b6f5, #6fd6b8, #f7b26a);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .85);
}
.dw-cp-txt { display: flex; flex-direction: column; min-width: 0; }
.dw-cp-txt b { font-size: 12.5px; font-weight: 600; }
.dw-cp-txt em { font-size: 10.5px; color: var(--text-3); font-style: normal; }

/* 天气 */
.dw-weather {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: background .15s;
}
.dw-weather:hover { background: var(--hover); }
.dw-w-ic { width: 26px; height: 26px; color: #e0a03e; flex: none; }
.dw-w-ic .ic { width: 26px; height: 26px; }
.dw-w-txt { display: flex; flex-direction: column; }
.dw-w-txt b { font-size: 19px; font-weight: 500; line-height: 1.1; }
.dw-w-txt em { font-size: 10px; color: var(--text-3); font-style: normal; }
.dw-where { margin-left: auto; font-size: 10px; color: var(--text-3); }

/* 媒体播放 */
.dw-media {
  padding: 12px;
  background: rgba(20, 22, 27, .84);
  border-color: rgba(255, 255, 255, .1);
  color: #f3f1ec;
}
.dw-m-top { display: flex; align-items: center; gap: 10px; }
.dw-m-art {
  width: 42px; height: 42px; flex: none;
  border-radius: 9px;
  object-fit: cover;
}
.dw-m-meta { display: flex; flex-direction: column; min-width: 0; }
.dw-m-meta b {
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dw-m-meta em { font-size: 10px; color: rgba(243, 241, 236, .55); font-style: normal; }
.dw-wave { display: flex; align-items: flex-end; gap: 2px; height: 16px; margin-left: auto; }
.dw-wave i { width: 2px; height: 6px; border-radius: 1px; background: #8fd0a8; }
.dw-wave i:nth-child(2) { height: 11px; }
.dw-wave i:nth-child(3) { height: 8px; }
.dw-wave i:nth-child(4) { height: 13px; }
.dw-media.playing .dw-wave i { animation: dwWave .9s ease-in-out infinite; }
.dw-media.playing .dw-wave i:nth-child(2) { animation-delay: .15s; }
.dw-media.playing .dw-wave i:nth-child(3) { animation-delay: .3s; }
.dw-media.playing .dw-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes dwWave { 50% { transform: scaleY(.4); } }

.dw-m-bar {
  height: 3px; margin: 11px 0 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
}
.dw-m-bar span {
  display: block; height: 100%; width: 26%;
  border-radius: 3px;
  background: #e9e6de;
  transition: width .3s linear;
}
.dw-m-ctl { display: flex; align-items: center; justify-content: space-between; }
.dw-m-ctl button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: rgba(243, 241, 236, .82);
  font-size: 12px;
  transition: background .13s, color .13s;
}
.dw-m-ctl button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.dw-m-ctl button .ic { width: 14px; height: 14px; }
.dw-m-ctl button.on { color: #f2779a; }
.dw-m-play {
  width: 32px !important; height: 32px !important;
  background: #f3f1ec; color: #17181c !important;
}
.dw-m-play:hover { background: #fff !important; }

/* Dropzone */
.dw-drop { padding: 11px 12px 12px; }
.dw-d-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; }
.dw-d-ic { width: 16px; height: 16px; color: var(--text-2); }
.dw-d-ic .ic { width: 16px; height: 16px; }
.dw-d-head b { font-weight: 600; }
.dw-d-count {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}
.dw-d-body {
  margin-top: 8px;
  padding: 16px 10px;
  border: 1px dashed var(--stroke-strong);
  border-radius: 10px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-3);
  transition: border-color .15s, background .15s;
}
.dw-d-body em { font-style: normal; font-size: 9.5px; opacity: .8; }
.dw-drop.over .dw-d-body { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dw-d-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dw-chip {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%;
  padding: 4px 4px 4px 8px;
  border-radius: 6px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
  font-size: 10px;
  color: var(--text-2);
}
.dw-chip i { font-style: normal; cursor: pointer; opacity: .6; padding: 0 3px; }
.dw-chip i:hover { opacity: 1; color: #c4453d; }

/* ==========================================================================
   任务栏悬停预览
   ========================================================================== */
.tb-preview {
  position: fixed;
  z-index: 900;
  width: 252px;
  padding: 10px;
  border-radius: 12px;
  background: var(--acrylic);
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  animation: tbpIn .16s var(--ease);
}
@keyframes tbpIn { from { opacity: 0; transform: translateY(6px); } }
.tbp-main { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.tbp-main .si { flex: none; }
.tbp-txt { display: flex; flex-direction: column; min-width: 0; }
.tbp-txt b {
  font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbp-txt em { font-size: 10px; color: var(--text-3); font-style: normal; }
.tbp-tabs {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 8px; padding-top: 6px;
  border-top: 1px solid var(--stroke);
}
.tbp-tabs button {
  text-align: left;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbp-tabs button:hover { background: var(--hover); color: var(--text); }
.tbp-foot {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--stroke);
  font-size: 9.5px;
  color: var(--text-3);
  text-align: center;
}

/* ==========================================================================
   小任务栏按钮
   ========================================================================== */
html[data-tb-small="1"] .tb-btn { height: 34px; min-width: 34px; padding: 0 4px; }
html[data-tb-small="1"] .tb-btn .si,
html[data-tb-small="1"] .tb-btn > svg { transform: scale(.8); }
html[data-tb-small="1"] .tb-btn.tb-start > svg { transform: scale(.82); }
html[data-tb-small="1"] .tb-btn.tb-appgroup .tb-group-ic { transform: scale(.85); }
html[data-tb-small="1"] .tb-btn.tb-caret { width: 22px; }

/* 拖拽固定到桌面时的提示 */
.desktop.drop-active { box-shadow: inset 0 0 0 2px var(--accent); }
.desktop.drop-active::after {
  content: "松开鼠标即可固定到桌面";
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--acrylic);
  border: 1px solid var(--stroke);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
  font-size: 12px;
  color: var(--text);
  pointer-events: none;
  z-index: 300;
}

/* ==========================================================================
   灵动岛
   ========================================================================== */
.dyn-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 158px;
  height: 32px;
  border-radius: 18px;
  background: rgba(12, 15, 18, .93);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  overflow: hidden;
  cursor: pointer;
  z-index: 700;
  transition: width .38s var(--ease-snap), height .38s var(--ease-snap),
              border-radius .32s var(--ease), background-color .25s var(--ease);
}
.dyn-island:hover { background: rgba(16, 20, 24, .96); }
.dyn-island.open {
  width: 352px;
  height: 116px;
  border-radius: 26px;
  cursor: default;
}

/* 紧凑态 */
.di-compact {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #f3f5f7;
  opacity: 1;
  transition: opacity .16s var(--ease);
}
.dyn-island.open .di-compact { opacity: 0; pointer-events: none; }
.di-time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.di-net {
  position: absolute;
  right: 13px;
  display: flex;
  color: rgba(255, 255, 255, .55);
}
.di-net .ic { width: 13px; height: 13px; }
.di-wave { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.di-wave i {
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: #8fd0a8;
}
.di-wave i:nth-child(2) { height: 9px; }
.di-wave i:nth-child(3) { height: 6px; }
.di-wave i:nth-child(4) { height: 10px; }
.dyn-island.playing .di-wave i { animation: dwWave .9s ease-in-out infinite; }
.dyn-island.playing .di-wave i:nth-child(2) { animation-delay: .15s; }
.dyn-island.playing .di-wave i:nth-child(3) { animation-delay: .3s; }
.dyn-island.playing .di-wave i:nth-child(4) { animation-delay: .45s; }

/* 展开态 */
.di-exp {
  position: absolute;
  inset: 0;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .18s var(--ease) .04s, transform .26s var(--ease) .04s;
}
.dyn-island.open .di-exp { opacity: 1; transform: none; pointer-events: auto; }
.di-head { display: flex; align-items: center; gap: 10px; }
.di-head-ic {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  color: #ffd27d;
}
.di-head-ic .ic { width: 16px; height: 16px; }
.di-head-txt { display: flex; flex-direction: column; min-width: 0; }
.di-head-txt b {
  font-size: 12.5px;
  font-weight: 600;
  color: #f5f7fa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.di-head-txt em { font-size: 10.5px; font-style: normal; color: rgba(255, 255, 255, .52); }
.di-hwave { display: flex; align-items: flex-end; gap: 2px; height: 15px; margin-left: auto; flex: none; }
.di-hwave i { width: 2px; height: 5px; border-radius: 1px; background: #8fd0a8; }
.di-hwave i:nth-child(2) { height: 10px; }
.di-hwave i:nth-child(3) { height: 14px; }
.di-hwave i:nth-child(4) { height: 8px; }
.di-hwave i:nth-child(5) { height: 12px; }
.dyn-island.playing .di-hwave i { animation: dwWave .9s ease-in-out infinite; }
.dyn-island.playing .di-hwave i:nth-child(2) { animation-delay: .12s; }
.dyn-island.playing .di-hwave i:nth-child(3) { animation-delay: .24s; }
.dyn-island.playing .di-hwave i:nth-child(4) { animation-delay: .36s; }
.dyn-island.playing .di-hwave i:nth-child(5) { animation-delay: .48s; }

.di-bar {
  height: 3px;
  margin: 9px 0 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.di-bar span {
  display: block;
  height: 100%;
  width: 26%;
  border-radius: 2px;
  background: #8fd0a8;
  transition: width .4s linear;
}
.di-acts { display: flex; align-items: center; gap: 3px; }
.di-acts button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .78);
  transition: background .15s, color .15s, transform .15s;
}
.di-acts button:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.di-acts button:active { transform: scale(.92); }
.di-acts button .ic { width: 15px; height: 15px; }
.di-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .13); margin: 0 6px; }

/* 通知态：隐藏进度与按钮，突出消息 */
.dyn-island.notify .di-bar,
.dyn-island.notify .di-acts { display: none; }
.dyn-island.notify .di-hwave { opacity: 0; }
.dyn-island.notify .di-head-ic { color: #9fc6ff; }
.dyn-island.notify.open { width: 316px; height: 64px; border-radius: 22px; }

/* ---------- 小组件板新增卡片 ---------- */
.wg-wsun { width: 56px; height: 56px; display: grid; place-items: center; color: var(--accent); }
.wg-wsun .ic { width: 46px; height: 46px; stroke-width: 1.2; }
.wg-week {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}
.wg-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  border-radius: 10px;
}
.wg-day span { font-size: 9.5px; color: var(--text-3); }
.wg-day .ic { width: 16px; height: 16px; color: var(--accent); }
.wg-day b { font-size: 11px; font-weight: 600; }
.wg-day em { font-size: 9.5px; font-style: normal; color: var(--text-3); }

.wg-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wg-cal-h b { font-size: 12px; font-weight: 600; }
.wg-today {
  font-size: 9.5px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 8px;
  border-radius: 99px;
}
.wg-dates { display: flex; gap: 4px; margin-bottom: 12px; }
.wg-dates button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border-radius: 9px;
  color: var(--text-2);
}
.wg-dates button span { font-size: 9px; color: var(--text-3); }
.wg-dates button b { font-size: 11.5px; font-weight: 600; }
.wg-dates button.on { background: var(--accent); color: #fff; }
.wg-dates button.on span { color: rgba(255, 255, 255, .78); }
.wg-agenda { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.wg-agenda li { display: flex; gap: 8px; align-items: flex-start; }
.wg-agenda li i { width: 3px; height: 26px; border-radius: 2px; flex: none; margin-top: 1px; }
.wg-agenda li div { display: flex; flex-direction: column; }
.wg-agenda li b { font-size: 10.5px; font-weight: 600; }
.wg-agenda li em { font-size: 9.5px; font-style: normal; color: var(--text-3); }

.wg-tasks { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.wg-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--text-1);
  text-align: left;
}
.wg-task:hover { background: var(--hover); }
.wg-check {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  border: 1.4px solid rgba(120, 120, 120, .5);
  display: grid;
  place-items: center;
  color: transparent;
}
.wg-check .ic { width: 9px; height: 9px; stroke-width: 3; }
.wg-task.done .wg-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.wg-task.done span:last-child { text-decoration: line-through; color: var(--text-3); }

.wg-photos .wg-phgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wg-phgrid figure { margin: 0; position: relative; overflow: hidden; border-radius: 9px; aspect-ratio: 1.5; }
.wg-phgrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wg-phgrid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 6px 4px;
  font-size: 8.5px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .58));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 桌面左下固定小组件 ---------- */
.pinned-widgets {
  position: absolute;
  left: 18px;
  bottom: calc(var(--tb-h) + var(--tb-gap) * 2 + 6px);
  display: flex;
  gap: 10px;
  z-index: 60;
}
.pw {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(14, 17, 21, .74);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #f2f5f8;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.pw:hover { transform: translateY(-2px); background: rgba(22, 26, 31, .88); box-shadow: 0 14px 30px rgba(0, 0, 0, .3); }
.pw-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  color: #ffcf7a;
}
.pw-ic .ic { width: 17px; height: 17px; }
.pw-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.pw-txt b { font-size: 11.5px; font-weight: 600; }
.pw-txt em { font-size: 9.5px; font-style: normal; color: rgba(255, 255, 255, .55); }
.pw-deg { font-family: var(--font-display); font-size: 24px; font-weight: 300; margin-left: 4px; }
.pw-num { display: flex; flex-direction: column; align-items: flex-end; margin-left: 2px; }
.pw-num b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pw-num em { font-size: 9px; font-style: normal; color: #7fd3a0; }

/* ==========================================================================
   小组件板顶部 · 仪表盘 · 日历浮出卡
   ========================================================================== */
.wg-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 2px;
}
.wg-head > span {
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-3);
}
.wg-head-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--accent);
}
.wg-head-btn .ic { width: 12px; height: 12px; }
.wg-head-btn:hover { text-decoration: underline; }

/* ---------- 仪表盘面板 ---------- */
.dash-panel {
  left: 22px; top: 18px;
  max-height: calc(100vh - var(--tb-h) - var(--tb-gap) - 46px);
  width: min(920px, calc(100vw - 350px));
  padding: 0;
  display: flex; flex-direction: column;
  transform-origin: bottom left;
  overflow: hidden;
}
.dash-head {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--stroke);
}
.dash-title { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dash-title b { font-family: var(--font-display); font-size: 17px; font-weight: 500; letter-spacing: .01em; }
.dash-title em {
  font-style: normal; font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-new {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 11.5px; color: #fff; background: var(--accent);
  transition: background .14s;
}
.dash-new .ic { width: 13px; height: 13px; }
.dash-new:hover { background: var(--accent-strong); }
.dash-x {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: var(--text-2);
}
.dash-x:hover { background: var(--hover); color: var(--text); }
.dash-x .ic { width: 14px; height: 14px; }

.dash-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; padding: 12px 16px 16px;
  overflow-y: auto;
}
.dash-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dash-card {
  border-radius: 13px; padding: 13px;
  background: var(--tile-2);
  border: 1px solid var(--stroke);
}
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dc-head b { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.dc-dots { color: var(--text-3); }
.dc-dots .ic { width: 14px; height: 14px; }
.dc-sub { font-size: 9px; color: var(--text-3); letter-spacing: .05em; white-space: nowrap; }

.dash-weather {
  background:
    radial-gradient(120% 120% at 88% -10%, rgba(224, 161, 65, .2), transparent 62%),
    var(--tile-2);
}
.dash-w-main { display: flex; align-items: center; gap: 10px; }
.dash-w-main .ic { width: 34px; height: 34px; color: #d9922f; stroke-width: 1.4; }
.dash-w-main b {
  font-family: var(--font-display); font-size: 25px; font-weight: 400;
  display: block; line-height: 1.05;
}
.dash-w-main em { font-style: normal; font-size: 10px; color: var(--text-2); }
.dash-w-sub { margin-top: 9px; font-size: 9px; color: var(--text-3); letter-spacing: .04em; }

.dash-note-t { font-size: 10.5px; color: var(--text-2); margin-bottom: 7px; }
.dash-notes { display: grid; gap: 2px; margin-bottom: 8px; }
.dash-note-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 6px;
  font-size: 10.5px; text-align: left;
}
.dash-note-row:hover { background: var(--hover); }
.dash-note-row em { font-style: normal; margin-left: auto; font-size: 9px; color: var(--text-3); }
.dash-note-row.done > span:nth-child(2) { text-decoration: line-through; color: var(--text-3); }
.dash-note-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dash-ghost {
  width: 100%; height: 26px; border-radius: 7px;
  border: 1px dashed var(--stroke-strong);
  font-size: 10px; color: var(--text-2);
}
.dash-ghost:hover { background: var(--hover); color: var(--text); }

.dash-live {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; color: #3fa98a; letter-spacing: .04em;
}
.dash-live i { width: 5px; height: 5px; border-radius: 50%; background: #3fa98a; animation: dashPulse 1.6s infinite; }
@keyframes dashPulse { 50% { opacity: .3; } }

.dash-sp { display: flex; align-items: center; gap: 9px; }
.dash-sp-art { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.dash-sp-meta { flex: 1; min-width: 0; }
.dash-sp-meta b {
  display: block; font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-sp-meta em { font-style: normal; font-size: 9.5px; color: var(--text-3); }
.dash-sp-play {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
}
.dash-sp-play .ic { width: 13px; height: 13px; }
.dash-sp-bar {
  margin-top: 10px; height: 3px; border-radius: 3px;
  background: var(--tile); overflow: hidden;
}
.dash-sp-bar span { display: block; width: 34%; height: 100%; background: var(--accent); }
.dash-sp-bar.on span { animation: dashSpBar 12s linear infinite; }
@keyframes dashSpBar { from { width: 34%; } to { width: 100%; } }

.dash-tasks { display: grid; gap: 2px; }
.dash-task {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 5px; border-radius: 7px;
  font-size: 10.5px; text-align: left; line-height: 1.4;
}
.dash-task:hover { background: var(--hover); }
.dash-check {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--stroke-strong);
  display: grid; place-items: center; color: transparent;
}
.dash-check .ic { width: 9px; height: 9px; stroke-width: 2.6; }
.dash-task.done .dash-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.dash-task.done > span:last-child { color: var(--text-3); text-decoration: line-through; }

.dash-projects { display: grid; gap: 2px; }
.dash-proj {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 6px; border-radius: 7px; font-size: 10.5px; text-align: left;
}
.dash-proj:hover { background: var(--hover); }
.dash-proj-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dash-proj-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-proj em { font-style: normal; font-size: 9px; color: var(--text-3); }

.dash-bars { display: flex; align-items: flex-end; gap: 4px; height: 60px; padding: 4px 0; }
.dash-bars i {
  flex: 1; border-radius: 3px; min-height: 4px;
  background: linear-gradient(180deg, #58b98d, #3fa98a);
  opacity: .82;
}
.dash-legend { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.dash-legend em { font-style: normal; font-size: 9px; color: var(--text-3); }

.dash-recents { display: grid; gap: 2px; }
.dash-recent {
  display: flex; align-items: center; gap: 9px;
  padding: 6px; border-radius: 7px; text-align: left;
}
.dash-recent:hover { background: var(--hover); }
.dash-recent-t { flex: 1; min-width: 0; }
.dash-recent-t b {
  display: block; font-size: 10.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-recent-t em { font-style: normal; font-size: 9px; color: var(--text-3); }

.dash-week { display: flex; gap: 2px; margin-bottom: 10px; }
.dash-week span {
  flex: 1; display: grid; justify-items: center; gap: 3px;
  padding: 6px 0; border-radius: 8px;
}
.dash-week span em { font-style: normal; font-size: 8.5px; color: var(--text-3); letter-spacing: .04em; }
.dash-week span b { font-size: 10.5px; font-weight: 500; }
.dash-week span.on { background: var(--accent); color: #fff; }
.dash-week span.on em { color: rgba(255, 255, 255, .72); }

.dash-events { display: grid; gap: 6px; }
.dash-ev {
  display: flex; gap: 9px; padding: 7px 8px; border-radius: 8px;
  background: var(--tile); border: 1px solid var(--stroke);
}
.dash-ev i { width: 3px; border-radius: 3px; flex: none; }
.dash-ev b { display: block; font-size: 10px; font-weight: 600; }
.dash-ev em { font-style: normal; font-size: 9px; color: var(--text-3); }

/* ---------- 日历浮出卡（通知中心） ---------- */
.cal-card {
  border-radius: 12px; padding: 12px;
  background: var(--tile-2); border: 1px solid var(--stroke);
  margin-bottom: 12px;
}
.cal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-h-t { display: grid; gap: 2px; }
.cal-h-t b { font-family: var(--font-display); font-size: 14px; font-weight: 500; }
.cal-h-t em { font-style: normal; font-size: 9px; color: var(--text-3); letter-spacing: .04em; }
.cal-new {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 10px; color: #fff; background: var(--accent); white-space: nowrap;
}
.cal-new .ic { width: 11px; height: 11px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.cal-week span { text-align: center; font-size: 9px; color: var(--text-3); letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.cal-grid > span, .cal-day {
  height: 26px; display: grid; place-items: center;
  font-size: 10.5px; color: var(--text); border-radius: 7px;
}
.cal-day { position: relative; }
.cal-day:hover { background: var(--hover); }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 600; }
.cal-day.evt::after {
  content: ""; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}
.cal-day.today.evt::after { background: #fff; }
.cal-day.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-events { display: grid; gap: 5px; margin-top: 10px; }
.cal-ev { display: flex; gap: 8px; padding: 6px 7px; border-radius: 7px; background: var(--tile); }
.cal-ev i { width: 3px; border-radius: 3px; flex: none; }
.cal-ev b { display: block; font-size: 10px; font-weight: 600; }
.cal-ev em { font-style: normal; font-size: 9px; color: var(--text-3); }

/* ==========================================================================
   Wi-Fi 配网浮层
   ========================================================================== */
.wifi-panel {
  right: 16px;
  bottom: calc(var(--tb-h) + var(--tb-gap) * 2 + 6px);
  width: 344px; padding: 14px;
  max-height: calc(100vh - var(--tb-h) - var(--tb-gap) * 2 - 30px);
  overflow-y: auto;
  scrollbar-width: none;
}
.wifi-panel::-webkit-scrollbar { width: 0; height: 0; }
.wf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wf-head-t { display: grid; gap: 3px; }
.wf-head-t b { font-family: var(--font-display); font-size: 15px; font-weight: 500; }
.wf-head-t em { font-style: normal; font-size: 10px; color: var(--text-3); }
.wf-switch {
  position: relative; flex: none;
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--active);
  transition: background .18s var(--ease);
}
.wf-switch i {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--mica-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .32);
  transition: left .18s var(--ease);
}
.wf-switch.on { background: var(--accent); }
.wf-switch.on i { left: 21px; }

.wf-off-card {
  display: grid; justify-items: center; gap: 6px;
  padding: 18px 10px;
  border: 1px dashed var(--stroke-strong); border-radius: 10px;
  color: var(--text-3); text-align: center;
}
.wf-off-card .ic { width: 20px; height: 20px; }
.wf-off-card b { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.wf-off-card em { font-style: normal; font-size: 9.5px; }

.wf-sec {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 2px 6px;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
}
.wf-refresh { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); }
.wf-refresh:hover { background: var(--hover); color: var(--text); }
.wf-refresh .ic { width: 12px; height: 12px; }

.wf-list { display: grid; gap: 2px; }
.wf-list.dim { opacity: .45; pointer-events: none; }
.wf-net {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 7px; border-radius: 8px;
  font-size: 11px; text-align: left;
}
.wf-net:hover { background: var(--hover); }
.wf-net.connected { background: var(--accent-soft); }
.wf-net.connecting { opacity: .55; }
.wf-net-n { flex: none; }
.wf-net-tag {
  font-style: normal; font-size: 8.5px; color: var(--text-3);
  border: 1px solid var(--stroke); border-radius: 999px;
  padding: 1px 5px;
}
.wf-net-state { margin-left: auto; font-size: 9.5px; color: var(--accent); }
.wf-net-state.pending { color: var(--text-3); }
.wf-lock { margin-left: auto; display: grid; place-items: center; color: var(--text-3); }
.wf-lock .ic { width: 11px; height: 11px; }

.wf-bars { display: flex; align-items: flex-end; gap: 2px; width: 17px; height: 13px; flex: none; }
.wf-bars i { flex: 1; border-radius: 1px; background: var(--text-2); opacity: .18; }
.wf-bars i:nth-child(1) { height: 4px; }
.wf-bars i:nth-child(2) { height: 7px; }
.wf-bars i:nth-child(3) { height: 10px; }
.wf-bars i:nth-child(4) { height: 13px; }
.wf-bars.b1 i:nth-child(-n+1),
.wf-bars.b2 i:nth-child(-n+2),
.wf-bars.b3 i:nth-child(-n+3),
.wf-bars.b4 i:nth-child(-n+4) { opacity: 1; }
.wf-net.connected .wf-bars i { background: var(--accent); }

.wf-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--stroke);
}
.wf-link { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--text-2); }
.wf-link:hover { color: var(--accent); }
.wf-link .ic { width: 11px; height: 11px; }

/* 网络属性 / 密码视图 */
.wf-subhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wf-back { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); }
.wf-back:hover { background: var(--hover); color: var(--text); }
.wf-back .ic { width: 14px; height: 14px; }
.wf-subhead b { font-size: 12px; font-weight: 600; }
.wf-subhead span { margin-left: auto; font-size: 9.5px; color: var(--text-3); }

.wf-prop-card {
  border: 1px solid var(--stroke); border-radius: 10px;
  background: var(--tile-2); padding: 8px 10px;
}
.wf-prow { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 10.5px; }
.wf-prow span { color: var(--text-3); }
.wf-prow b { font-weight: 500; text-align: right; }
.wf-prow b.ok { color: #3fa98a; }

.wf-modes {
  display: flex; gap: 4px; padding: 3px;
  background: var(--tile-2);
  border: 1px solid var(--stroke); border-radius: 8px;
}
.wf-modes button { flex: 1; height: 26px; border-radius: 6px; font-size: 10.5px; color: var(--text-2); }
.wf-modes button.on {
  background: var(--mica-strong); color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.wf-field {
  display: flex; align-items: center; gap: 8px;
  height: 32px; margin-top: 8px; padding: 0 10px;
  border-radius: 8px;
  background: var(--tile-2); border: 1px solid var(--stroke);
}
.wf-field span { width: 56px; flex: none; font-size: 9.5px; color: var(--text-3); }
.wf-field input { flex: 1; min-width: 0; font-size: 11px; }
.wf-field input:disabled { opacity: .4; }

.wf-actions { display: flex; gap: 6px; margin-top: 12px; }
.wf-btn {
  height: 30px; padding: 0 14px; border-radius: 7px;
  font-size: 11px;
  background: var(--tile); border: 1px solid var(--stroke-strong);
}
.wf-btn:hover { background: var(--hover); }
.wf-btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.wf-btn.primary:hover { background: var(--accent-strong); }

.wf-auth { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 2px; text-align: center; }
.wf-auth-ic {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.wf-auth-ic .ic { width: 20px; height: 20px; }
.wf-auth > b { font-size: 12.5px; }
.wf-auth > em { font-style: normal; font-size: 10px; color: var(--text-3); margin-bottom: 4px; }
.wf-auth .wf-field, .wf-auth .wf-actions { width: 100%; }
.wf-show {
  display: flex; align-items: center; gap: 6px;
  justify-self: start; margin-top: 6px;
  font-size: 10px; color: var(--text-2);
}
.wf-show input { accent-color: var(--accent); }

/* 任务栏网络图标 / 快速设置连接行 */
.tb-tray .tray-net { width: 20px; height: 20px; display: grid; place-items: center; color: inherit; }
.tb-tray .tray-net .ic { width: 16px; height: 16px; }
.tb-tray .tray-net.off { opacity: .38; }
.qs-conn-row.link { cursor: pointer; }
.qs-conn-row.link:hover { background: var(--hover); }



