/* ===================================================================
   Win11 Web — 系统外壳样式 (shell chrome)
   深色为默认主题, html[data-theme="light"] 切换浅色
   =================================================================== */

:root {
  --accent: #0078d4;
  --tb-h: 48px;
  --radius: 8px;
  --font: 'Segoe UI Variable Text', 'Segoe UI', 'Microsoft YaHei UI', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: Consolas, 'Cascadia Mono', 'Courier New', monospace;
  color-scheme: dark;
}
:root, html[data-theme="dark"] {
  --text: #ffffff;
  --text-2: #cfcfcf;
  --text-3: #9a9a9a;
  --panel: rgba(44, 44, 44, .78);
  --panel-solid: #2c2c2c;
  --frame: rgba(32, 32, 32, .82);
  --surface: #292929;
  --surface-2: #323232;
  --divider: rgba(255, 255, 255, .09);
  --divider-strong: rgba(255, 255, 255, .16);
  --shadow-win: 0 22px 60px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .4);
  --shadow-fly: 0 10px 34px rgba(0, 0, 0, .45);
  --hover: rgba(255, 255, 255, .08);
  --hover-2: rgba(255, 255, 255, .045);
}
html[data-theme="light"] {
  --text: #1b1b1b;
  --text-2: #5d5d5d;
  --text-3: #8a8a8a;
  --panel: rgba(243, 243, 243, .82);
  --panel-solid: #f3f3f3;
  --frame: rgba(249, 249, 249, .85);
  --surface: #f6f6f6;
  --surface-2: #fbfbfb;
  --divider: rgba(0, 0, 0, .08);
  --divider-strong: rgba(0, 0, 0, .14);
  --shadow-win: 0 18px 48px rgba(0, 0, 0, .22), 0 4px 12px rgba(0, 0, 0, .12);
  --shadow-fly: 0 8px 28px rgba(0, 0, 0, .2);
  --hover: rgba(0, 0, 0, .05);
  --hover-2: rgba(0, 0, 0, .028);
  color-scheme: light;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input:focus-visible, textarea:focus-visible { outline-offset: -1px; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: #0a0f1c;
}
input, textarea { user-select: text; -webkit-user-select: text; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.selectable { user-select: text; -webkit-user-select: text; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 140, .55);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(160, 160, 160, .85); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 开机画面 ---------- */
#boot-screen {
  position: fixed; inset: 0; z-index: 2000;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 90px;
  transition: opacity .5s ease;
}
body.booted #boot-screen { opacity: 0; pointer-events: none; }
.boot-logo { opacity: .96; }
.boot-spinner { position: relative; width: 34px; height: 34px; animation: boot-spin 1.6s linear infinite; }
.boot-spinner i {
  position: absolute; top: 0; left: 50%; width: 6px; height: 6px;
  margin-left: -3px; border-radius: 50%; background: #fff;
  transform-origin: 3px 17px;
}
.boot-spinner i:nth-child(1) { transform: rotate(0deg); }
.boot-spinner i:nth-child(2) { transform: rotate(40deg); opacity: .85; }
.boot-spinner i:nth-child(3) { transform: rotate(80deg); opacity: .7; }
.boot-spinner i:nth-child(4) { transform: rotate(120deg); opacity: .55; }
.boot-spinner i:nth-child(5) { transform: rotate(160deg); opacity: .4; }
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* ---------- 壁纸（纯 CSS 渐变渲染） ---------- */
#wallpaper { position: fixed; inset: 0; z-index: 0; background: #0b2f6e; }
#wallpaper-dim {
  position: fixed; inset: 0; z-index: 1;
  background: #000; opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}

.wall-bloom {
  background:
    radial-gradient(90% 70% at 62% 40%, rgba(90, 170, 255, .28) 0%, transparent 60%),
    radial-gradient(70% 55% at 38% 62%, rgba(0, 90, 200, .5) 0%, transparent 65%),
    conic-gradient(from 210deg at 58% 44%, rgba(110, 180, 255, .0) 0deg, rgba(120, 190, 255, .35) 60deg, rgba(40, 110, 220, .12) 130deg, rgba(90, 160, 250, .4) 200deg, rgba(30, 80, 190, .05) 300deg, rgba(110, 180, 255, 0) 360deg),
    radial-gradient(130% 100% at 30% 25%, #4aa3ff 0%, #1e5cb8 35%, #0b2f6e 70%, #061538 100%);
}
.wall-flow {
  background:
    radial-gradient(80% 60% at 80% 15%, rgba(120, 220, 255, .35) 0%, transparent 55%),
    radial-gradient(90% 70% at 15% 85%, rgba(2, 60, 110, .6) 0%, transparent 60%),
    linear-gradient(135deg, #04202e 0%, #0e6ba8 55%, #35c4dc 100%);
}
.wall-night {
  background:
    radial-gradient(3px 3px at 22% 30%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 18%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 42% 62%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 82% 48%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(3px 3px at 12% 74%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 56% 84%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 76%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 34% 12%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(100% 100% at 70% 20%, #4b2a72 0%, #1b1b3a 55%, #050510 100%);
}
.wall-sunset {
  background:
    radial-gradient(70% 50% at 70% 78%, rgba(255, 200, 90, .5) 0%, transparent 60%),
    radial-gradient(90% 60% at 20% 20%, rgba(70, 10, 60, .55) 0%, transparent 65%),
    linear-gradient(160deg, #2b0f3a 0%, #b8336a 55%, #f9a03f 100%);
}
.wall-mint {
  background:
    radial-gradient(80% 60% at 75% 25%, rgba(190, 255, 220, .3) 0%, transparent 55%),
    radial-gradient(90% 70% at 20% 80%, rgba(3, 60, 55, .55) 0%, transparent 60%),
    linear-gradient(140deg, #052e2b 0%, #0b7a6b 55%, #7ed6a5 100%);
}
.wall-ember {
  background:
    radial-gradient(70% 55% at 70% 70%, rgba(255, 170, 90, .45) 0%, transparent 60%),
    radial-gradient(90% 70% at 25% 20%, rgba(60, 8, 8, .6) 0%, transparent 65%),
    linear-gradient(150deg, #2d0a0a 0%, #a3312a 50%, #f2a65a 100%);
}

/* ---------- 桌面与图标 ---------- */
#desktop { position: fixed; inset: 0; z-index: 10; }
#desktop-icons {
  position: absolute; inset: 0 0 calc(var(--tb-h) + 4px) 0;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 2px;
  padding: 8px;
}
.dicon {
  width: 84px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--text); border-color: transparent;
  cursor: default;
}
.dicon svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.dicon-label {
  font-size: 12px; line-height: 1.25; text-align: center;
  max-width: 100%; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
  word-break: break-all;
}
html[data-theme="light"] .dicon-label { text-shadow: 0 1px 3px rgba(255, 255, 255, .8); }
.dicon:hover { background: var(--hover-2); border-color: var(--divider); }
.dicon.selected { background: color-mix(in srgb, var(--accent) 32%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.dicon:active { transform: scale(.97); }

/* ---------- 窗口 ---------- */
#windows-layer { position: absolute; inset: 0; pointer-events: none; }
.window {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 320px; min-height: 200px;
  background: var(--frame);
  backdrop-filter: blur(60px) saturate(1.6);
  -webkit-backdrop-filter: blur(60px) saturate(1.6);
  border: 1px solid var(--divider-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  pointer-events: auto;
}
.window:not(.focused) { box-shadow: 0 8px 26px rgba(0, 0, 0, .32); }
.window:not(.focused) .win-titlebar { opacity: .82; }
.window.maximized, .window.fullscreen, .window.snapped { border-radius: 0; }
.window.maximized, .window.fullscreen { border-color: transparent; }
.window.snapped { border-color: var(--divider); }
.window.closing { animation: win-out .14s ease-in both; pointer-events: none; }
@keyframes win-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes win-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.93); } }
.window:not(.minimized):not(.closing):not(.win-minimizing):not(.win-restoring) { animation: win-in .18s cubic-bezier(.1, .9, .2, 1); }
.window.minimized { visibility: hidden !important; pointer-events: none !important; }
/* 最小化 / 还原：向任务栏图标收缩（Win11 招牌动画） */
.window.win-minimizing { animation: win-minimize .24s cubic-bezier(.62, .01, .8, .5) both !important; pointer-events: none !important; will-change: transform, opacity; }
.window.win-restoring { animation: win-restore .28s cubic-bezier(.05, .85, .2, 1) both !important; will-change: transform, opacity; }
@keyframes win-minimize { from { opacity: 1; } to { opacity: 0; transform: translate(var(--min-dx), var(--min-dy)) scale(.06); } }
@keyframes win-restore { from { opacity: 0; transform: translate(var(--min-dx), var(--min-dy)) scale(.06); } to { opacity: 1; } }

.win-titlebar {
  position: relative;
  flex: none; height: 34px;
  display: flex; align-items: center; gap: 8px;
  padding-left: 12px;
  touch-action: none;
}
.win-ico { flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
.win-ico svg { width: 16px; height: 16px; display: block; }
.win-title {
  flex: 1; font-size: 12px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* busy 转圈盖住图标 */
.win-ico > * { transition: opacity .15s; }
.window.busy .win-ico > svg { opacity: 0; }
.window.busy .win-ico::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--divider-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: boot-spin .8s linear infinite;
}
.win-snap-left {
  position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  width: 84px; height: 8px; border-radius: 99px;
  background: var(--divider-strong); opacity: 0;
  transition: opacity .15s, background .15s;
  cursor: pointer; z-index: 5;
}
.win-titlebar:hover .win-snap-left { opacity: .65; }
.win-snap-left:hover { background: var(--accent); opacity: .9; }
.win-btns { flex: none; display: flex; height: 100%; margin-left: auto; }
.win-btn {
  width: 46px; height: 100%;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--text);
  transition: background .12s;
}
.win-btn svg { width: 11px; height: 11px; display: block; }
.win-btn:hover { background: var(--hover); }
.win-btn:active { background: var(--hover-2); }
.win-btn.win-close:hover { background: #c42b1c; color: #fff; }
.win-btn.win-close:active { background: #b12a1a; color: #fff; }
.window:not(.focused) .win-title { color: var(--text-2); }

/* ---------- 磁贴布局面板（Hover 最大化按钮，仿 Win11 22H2） ---------- */
.snap-layouts {
  position: fixed; z-index: 9800; padding: 14px;
  display: flex; gap: 16px;
}
.snap-layouts .slg { display: flex; flex-direction: column; gap: 5px; width: 66px; }
.slp { display: flex; gap: 3px; height: 40px; }
.slp i {
  flex: 1; min-width: 0; min-height: 0; display: block; border-radius: 3.5px;
  background: var(--surface-2); border: 1px solid var(--divider-strong);
  transition: background .1s, border-color .1s;
}
.slp i:hover { background: color-mix(in srgb, var(--accent) 42%, transparent); border-color: var(--accent); }
.slp-grid { flex-wrap: wrap; }
.slp-grid i { flex: none; width: calc(50% - 1.5px); height: calc(50% - 1.5px); }
.slp-col { flex-direction: column; }
.slp .sl-row { flex: 1; display: flex; gap: 3px; min-height: 0; }

.win-body {
  flex: 1; min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
}
.window.maximized .win-body, .window.snapped .win-body, .window.fullscreen .win-body { border-radius: 0; }

/* 缩放边 */
.win-resize { position: absolute; inset: 0; pointer-events: none; }
.win-r-n, .win-r-s { position: absolute; left: 8px; right: 8px; height: 5px; pointer-events: auto; cursor: ns-resize; }
.win-r-n { top: -2px; } .win-r-s { bottom: -2px; }
.win-r-e, .win-r-w { position: absolute; top: 8px; bottom: 8px; width: 5px; pointer-events: auto; cursor: ew-resize; }
.win-r-e { right: -2px; } .win-r-w { left: -2px; }
.win-r-ne, .win-r-nw, .win-r-se, .win-r-sw { position: absolute; width: 12px; height: 12px; pointer-events: auto; }
.win-r-ne { top: -3px; right: -3px; cursor: nesw-resize; }
.win-r-nw { top: -3px; left: -3px; cursor: nwse-resize; }
.win-r-se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.win-r-sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.window.maximized .win-resize, .window.fullscreen .win-resize { display: none; }

/* 吸附预览 */
.snap-guide {
  position: fixed; z-index: 9998; pointer-events: none;
  border-radius: 7px;
  background: rgba(128, 170, 255, .26);
  border: 1px solid rgba(128, 170, 255, .6);
  transition: left .13s ease, top .13s ease, width .13s ease, height .13s ease, opacity .12s;
}

/* ---------- 任务栏 ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tb-h); z-index: 9000;
  display: flex; align-items: center;
  background: var(--panel);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-top: 1px solid var(--divider);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
body.booting #taskbar { transform: translateY(var(--tb-h)); }
#tb-center {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px;
}
.tb-icon {
  width: 40px; height: 40px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text);
  display: grid; place-items: center;
  transition: background .12s, transform .08s;
  position: relative;
}
.tb-icon:hover { background: var(--hover); }
.tb-icon:active { transform: scale(.9); }
.tb-icon svg { display: block; }
#btn-start svg rect { transition: fill .2s; }
.tb-sep { width: 1px; height: 22px; background: var(--divider-strong); margin: 0 6px; flex: none; }

#tb-apps { display: flex; align-items: center; gap: 2px; }
.tb-app {
  position: relative; width: 40px; height: 40px;
  border: 0; border-radius: 5px; background: transparent;
  display: grid; place-items: center;
  transition: background .12s, transform .08s;
}
.tb-app:hover { background: var(--hover); }
.tb-app:active { transform: scale(.9); }
.tb-app-ico { display: grid; place-items: center; }
.tb-app-ico svg { display: block; }
.tb-dot {
  position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%);
  width: 5px; height: 3px; border-radius: 2px;
  background: var(--text-3); opacity: 0;
  transition: width .18s ease, background .18s, opacity .18s;
}
.tb-app.running .tb-dot { opacity: 1; background: var(--text-3); }
.tb-app.active { background: var(--hover); }
.tb-app.active .tb-dot { width: 16px; background: var(--accent); }

#tb-right { display: flex; align-items: center; gap: 0; padding-right: 4px; }
#btn-tray {
  display: flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 9px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text);
}
#btn-tray:hover { background: var(--hover); }
#btn-tray svg { display: block; }
#btn-clock {
  height: 40px; padding: 0 10px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text);
  font-family: inherit; text-align: right; line-height: 1.35;
}
#btn-clock:hover { background: var(--hover); }
#tb-time, #tb-date { font-size: 12px; white-space: nowrap; }
#btn-notif {
  width: 8px; height: 40px; border: 0; border-radius: 3px;
  background: transparent; position: relative;
}
#btn-notif:hover { background: var(--hover); }
#btn-notif.has-unread::after {
  content: ''; position: absolute; right: 1px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---------- 气泡提示 ---------- */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 5px 9px; border-radius: 5px;
  background: var(--panel-solid); border: 1px solid var(--divider);
  color: var(--text); font-size: 12px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  z-index: 9600; pointer-events: none;
  animation: flyin .15s ease-out;
}

/* ---------- 通用浮层 / 菜单 ---------- */
.acrylic {
  background: var(--panel);
  backdrop-filter: blur(48px) saturate(1.7);
  -webkit-backdrop-filter: blur(48px) saturate(1.7);
  border: 1px solid var(--divider-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-fly);
}
/* Acrylic 噪点纹理（Win11 亚克力材质的关键细节，data-URI SVG 纯代码生成） */
.acrylic::after, .toast::after, #taskbar::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .04;
}
html[data-theme="light"] .acrylic::after,
html[data-theme="light"] .toast::after,
html[data-theme="light"] #taskbar::after { opacity: .022; }
/* 夜间模式：暖色色温遮罩 */
html.nightlight body::after {
  content: ''; position: fixed; inset: 0; z-index: 9650;
  pointer-events: none; background: #ff9a3c; opacity: .13; mix-blend-mode: multiply;
}
.flyout { position: fixed; z-index: 8500; }
.flyout:not([hidden]) { animation: flyin .16s cubic-bezier(.2, .9, .3, 1); }
@keyframes flyin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } }

.menu { min-width: 200px; padding: 4px; display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text); font-size: 13px; text-align: left;
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { flex: none; opacity: .9; }
.menu-item .mi-check { margin-left: auto; opacity: .9; }
.menu-item.danger:hover { background: rgba(196, 43, 28, .18); }
.menu-item[disabled] { opacity: .45; pointer-events: none; }
.menu-sep { height: 1px; margin: 4px 8px; background: var(--divider); }

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1px solid var(--divider); border-radius: 99px;
  background: var(--surface-2); color: var(--text); font-size: 12px;
}
.pill-btn:hover { background: var(--hover); }

/* ---------- 开始菜单 ---------- */
#start-menu {
  left: 50%; bottom: calc(var(--tb-h) + 8px); transform: translateX(-50%);
  width: 620px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - var(--tb-h) - 20px);
  display: flex; flex-direction: column;
  padding: 26px 26px 0;
  overflow: hidden;
}
#start-menu:not([hidden]) { animation: start-in .2s cubic-bezier(.2, .9, .3, 1); }
@keyframes start-in { from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.99); } to { opacity: 1; transform: translateX(-50%); } }
.start-search {
  flex: none; display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--divider);
  border-bottom-color: var(--divider-strong);
  background: var(--surface);
}
.start-search .s-icon { width: 15px; height: 15px; flex: none; color: var(--text-2); }
.start-search .s-icon svg { display: block; width: 100%; height: 100%; }
#start-search-input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 13px; font-family: inherit;
}
.start-section-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 10px; font-size: 13px; font-weight: 600;
}
.start-pinned {
  flex: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px;
}
.start-app {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 4px 8px; border: 0; border-radius: 5px; background: transparent;
  color: var(--text);
}
.start-app:hover { background: var(--hover); }
.start-app:active { transform: scale(.96); }
.start-app svg { width: 32px; height: 32px; display: block; }
.start-app span { font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-allapps {
  flex: 1; min-height: 0; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  align-content: start; padding-right: 4px;
}
.start-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 9px; border: 0; border-radius: 5px; background: transparent;
  color: var(--text); font-size: 13px; text-align: left;
}
.start-row:hover { background: var(--hover); }
.start-row svg { flex: none; }
.allapp-letter {
  grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--accent);
  padding: 8px 9px 2px;
}
.start-recommended {
  flex: 1; min-height: 0; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  align-content: start;
}
.rec-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 9px; border: 0; border-radius: 5px; background: transparent;
  color: var(--text); text-align: left;
}
.rec-item:hover { background: var(--hover); }
.rec-item svg { flex: none; width: 26px; height: 26px; }
.rec-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-sub { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-footer {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  height: 58px; margin: 12px -26px 0; padding: 0 26px;
  border-top: 1px solid var(--divider);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}
.start-user { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.start-power-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 0; border-radius: 5px;
  background: transparent; color: var(--text); font-size: 12.5px;
}
.start-power-btn:hover { background: var(--hover); }

/* ---------- 电源菜单 ---------- */
#power-menu { width: 190px; }

/* ---------- 通知中心 ---------- */
#notif-center {
  right: 8px; bottom: calc(var(--tb-h) + 8px);
  width: 370px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - var(--tb-h) - 20px);
  display: flex; flex-direction: column;
  padding: 16px;
}
.notif-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
#notif-clear { border: 0; background: transparent; color: var(--accent); font-size: 12px; padding: 3px 6px; border-radius: 4px; }
#notif-clear:hover { background: var(--hover); }
.notif-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.notif-item {
  position: relative;
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: 7px; padding: 11px 30px 11px 12px;
  animation: flyin .2s ease-out;
}
.notif-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.notif-title svg { flex: none; color: var(--accent); }
.notif-body { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; user-select: text; }
.notif-time { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.notif-close {
  position: absolute; right: 6px; top: 6px;
  width: 22px; height: 22px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-2);
  display: grid; place-items: center;
}
.notif-close:hover { background: var(--hover); color: var(--text); }
.notif-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 34px 0; }

/* ---------- 快捷设置面板（系统托盘弹出，仿 Win11 22H2） ---------- */
#quick-panel {
  right: 8px; bottom: calc(var(--tb-h) + 8px);
  width: 372px; max-width: calc(100vw - 16px);
  padding: 18px;
}
.qs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.qs-tile {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border: 1px solid var(--divider); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px;
  transition: background .15s, border-color .15s, color .15s;
}
.qs-tile:hover { background: var(--surface-2); border-color: var(--divider-strong); }
.qs-tile svg { flex: none; }
.qs-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-tile.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.qs-tile.on:hover { filter: brightness(1.08); }
.qs-sliders { margin-top: 15px; display: flex; flex-direction: column; gap: 12px; }
.qs-slider { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.qs-slider svg { flex: none; }
.qs-slider input[type="range"] {
  flex: 1; appearance: none; -webkit-appearance: none;
  height: 4px; border-radius: 99px; outline: none;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--divider-strong) var(--fill, 50%));
}
.qs-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--panel-solid); border: 5px solid var(--accent);
  box-shadow: 0 0 0 1px var(--divider-strong);
  cursor: pointer; transition: transform .1s;
}
.qs-slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.qs-slider input[type="range"]::-moz-range-thumb {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 5px solid var(--panel-solid);
  cursor: pointer;
}
.qs-pct { width: 40px; text-align: right; font-size: 11.5px; color: var(--text-2); }
.qs-foot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 14px; padding-top: 11px;
  border-top: 1px solid var(--divider);
  font-size: 11.5px; color: var(--text-2);
}
.qs-gear {
  margin-left: auto; width: 30px; height: 30px;
  border: 0; border-radius: 5px; background: transparent; color: var(--text);
  display: grid; place-items: center;
}
.qs-gear:hover { background: var(--hover); }

/* ---------- 日历浮层 ---------- */
#calendar-flyout {
  right: 8px; bottom: calc(var(--tb-h) + 8px);
  width: 340px; max-width: calc(100vw - 16px);
  padding: 18px;
}
.cal-clock { font-size: 30px; font-weight: 250; letter-spacing: .5px; line-height: 1.1; }
.cal-date { font-size: 12.5px; color: var(--text-2); margin: 5px 0 14px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-mon { font-size: 13px; font-weight: 600; }
.cal-nav-btn {
  width: 28px; height: 28px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text);
  display: grid; place-items: center;
}
.cal-nav-btn:hover { background: var(--hover); }
#calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-h { text-align: center; font-size: 11px; color: var(--text-3); padding: 5px 0; }
.cal-cell {
  aspect-ratio: 1; display: grid; place-items: center;
  font-size: 12px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text);
  padding: 0;
}
button.cal-cell:hover { background: var(--hover); }
.cal-cell.other { color: var(--text-3); opacity: .55; }
.cal-cell.today { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- Toast 通知 ---------- */
#toast-stack {
  position: fixed; right: 12px; bottom: calc(var(--tb-h) + 12px);
  z-index: 9700; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 350px; max-width: calc(100vw - 24px);
  background: var(--panel); backdrop-filter: blur(48px) saturate(1.7);
  border: 1px solid var(--divider-strong); border-radius: 8px;
  box-shadow: var(--shadow-fly);
  padding: 13px 14px;
  animation: toast-in .25s cubic-bezier(.2, .9, .3, 1);
  display: flex; gap: 11px; align-items: flex-start;
  position: relative;
}
.toast.out { animation: toast-out .2s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(60px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(60px); } }
.toast-ico { flex: none; color: var(--accent); margin-top: 1px; }
.toast-ico svg { display: block; }
.toast-title { font-size: 13px; font-weight: 600; padding-right: 20px; }
.toast-body { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; user-select: text; }
.toast-close {
  position: absolute; right: 7px; top: 7px;
  width: 22px; height: 22px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-2);
  display: grid; place-items: center;
}
.toast-close:hover { background: var(--hover); color: var(--text); }

/* ---------- 关机遮罩 ---------- */
#shutdown-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.shutdown-box { display: flex; flex-direction: column; align-items: center; gap: 46px; }
#shutdown-text { color: #fff; font-size: 14px; opacity: .75; }
#shutdown-overlay.restarting #shutdown-text { opacity: .9; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  #start-menu { width: calc(100vw - 16px); max-height: calc(100vh - var(--tb-h) - 16px); }
  .start-pinned { grid-template-columns: repeat(4, 1fr); }
  .start-allapps, .start-recommended { grid-template-columns: 1fr; }
  #notif-center, #quick-panel { width: calc(100vw - 16px); }
  #tb-center { gap: 0; }
  .tb-sep { display: none; }
}
