/* ============ Win7 Shell 样式 ============ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", Tahoma, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  background: #1a3a6b;
}

/* ---- 桌面壁纸（近似 Win7 经典蓝）---- */
#desktop {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(ellipse at 50% 120%, #7fc4f5 0%, rgba(127,196,245,0) 55%),
    linear-gradient(160deg, #0b3d78 0%, #1f6fb8 42%, #2b8fd4 70%, #4fb3e8 100%);
  background-size: cover;
}
/* 壁纸上的光效飘带 */
#desktop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 30% at 78% 18%, rgba(255,255,255,.18), transparent 70%),
    radial-gradient(ellipse 50% 25% at 18% 78%, rgba(180,230,255,.16), transparent 70%);
}
/* 中央旗帜（CSS 近似） */
#wallmark {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%);
  width: 320px; height: 300px; pointer-events: none; opacity: .9;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
}

/* ---- 桌面图标（横向排列，仿 Win7 大图标）---- */
#icons {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 42px);  /* 底部留出任务栏 */
  z-index: 5;
}
.dicon {
  position: absolute;
  width: 82px; height: 92px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1px solid transparent; border-radius: 4px; cursor: default;
  color: #fff; text-align: center;
  touch-action: none;   /* 允许长按拖动，禁止页面滚动/手势干扰 */
}
.dicon:hover { background: rgba(120,180,255,.22); border-color: rgba(255,255,255,.35); }
.dicon.selected { background: rgba(60,140,230,.45); border-color: rgba(255,255,255,.6); }
.dicon.dragging { z-index: 50; background: rgba(60,140,230,.55); border-color: rgba(255,255,255,.75); box-shadow: 0 8px 18px rgba(0,0,0,.35); opacity: .92; }
.dicon .glyph {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.35));
}
.dicon .glyph svg { width: 100%; height: 100%; display: block; }
.dicon .label {
  font-size: 12px; line-height: 1.2; max-width: 80px;
  text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.7); word-break: break-all;
}
/* 图标尺寸档位 */
#icons.size-large .dicon { width: 92px; height: 104px; }
#icons.size-large .glyph { width: 60px; height: 60px; }
#icons.size-large .label { font-size: 13px; max-width: 90px; }
#icons.size-medium .dicon { width: 82px; height: 92px; }
#icons.size-medium .glyph { width: 52px; height: 52px; }
#icons.size-medium .label { font-size: 12px; max-width: 80px; }
#icons.size-small .dicon { width: 62px; height: 74px; }
#icons.size-small .glyph { width: 38px; height: 38px; }
#icons.size-small .label { font-size: 11px; max-width: 60px; }

/* ---- 任务栏 ---- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 42px; z-index: 9999;
  background: linear-gradient(180deg, rgba(30,110,190,.78), rgba(12,70,140,.92));
  border-top: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 -2px 10px rgba(0,0,0,.25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
}
#start-btn {
  width: 54px; height: 38px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.35); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  color: #fff; font-size: 14px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
#start-btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.14)); }
#start-btn.active { background: rgba(255,255,255,.35); box-shadow: inset 0 2px 6px rgba(0,0,0,.25); }
.start-flag { width: 22px; height: 22px; }
.task-divider { width: 2px; height: 26px; background: rgba(0,0,0,.25); border-right: 1px solid rgba(255,255,255,.2); margin: 0 2px; }
#task-windows { flex: 1; display: flex; align-items: center; gap: 5px; overflow: hidden; height: 100%; }
.task-item {
  min-width: 120px; max-width: 180px; height: 32px; flex: 0 1 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.28); border-radius: 5px;
  color: #fff; font-size: 12px; display: flex; align-items: center; gap: 6px;
  padding: 0 10px; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.task-item .ti-glyph { width: 18px; height: 18px; flex:0 0 18px; display:inline-flex; align-items:center; justify-content:center; }
.task-item .ti-glyph svg { width: 100%; height: 100%; display:block; }
.task-item.active { background: rgba(255,255,255,.4); box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.task-item:hover { background: rgba(255,255,255,.28); }
#tray { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; padding-right: 6px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.tray-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; width: 20px; height: 24px; border-radius: 4px; transition: background .12s; }
.tray-btn:hover { background: rgba(255,255,255,.18); }
.tray-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tray-btn.active { background: rgba(255,255,255,.3); }
#clock { text-align: right; line-height: 1.15; min-width: 62px; }
#clock .t { font-size: 13px; } #clock .d { font-size: 11px; opacity: .9; }

/* ---- 托盘弹出面板（音量 / 网络）---- */
.tray-panel {
  position: fixed; right: 12px; bottom: 48px; z-index: 10001;
  background: linear-gradient(180deg, rgba(246,251,255,.98), rgba(222,238,252,.98));
  border: 1px solid rgba(255,255,255,.92); border-radius: 9px;
  box-shadow: 0 10px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #234; padding: 13px 15px; width: 260px; box-sizing: border-box;
  display: none; font-family: 'Segoe UI','Microsoft YaHei',sans-serif;
  text-shadow: none;
}
.tray-panel.open { display: block; animation: tp-in .14s ease-out; }
@keyframes tp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tp-head { font-size: 13px; font-weight: 600; color: #123a6b; margin-bottom: 11px; padding-bottom: 8px; border-bottom: 1px solid #d3e2f0; }

/* ---- 日期和时间设置面板 ---- */
#clock { cursor: pointer; border-radius: 5px; padding: 1px 5px; margin: -1px -5px; transition: background .12s; }
#clock:hover, #clock.active { background: rgba(255,255,255,.18); }
#clock:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.clock-panel { width: 292px; }
.clk-preview { text-align: center; padding: 8px 0 12px; margin-bottom: 4px; border-bottom: 1px solid #d3e2f0; }
.clk-big-time { font-size: 34px; font-weight: 300; letter-spacing: 1px; color: #14375f; line-height: 1.1; }
.clk-big-date { font-size: 12px; color: #4a6b8c; margin-top: 4px; }
.clk-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e0ebf5; }
.clk-label { font-size: 13px; color: #234; }
.clk-switch { position: relative; width: 38px; height: 21px; flex: 0 0 38px; border: 0; border-radius: 11px; background: #b9c9d8; cursor: pointer; transition: background .18s; padding: 0; }
.clk-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s; }
.clk-switch.on { background: #2b7ecd; }
.clk-switch.on::after { transform: translateX(17px); }
.clk-switch:focus-visible { outline: 2px solid #0d5fc4; outline-offset: 2px; }
.clk-manual { padding: 8px 0; border-bottom: 1px solid #e0ebf5; }
.clk-subhead { font-size: 11px; color: #6a86a2; margin-bottom: 8px; }
.clk-fields { display: flex; gap: 10px; }
.clk-field { flex: 1; display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #cddfef; border-radius: 6px; padding: 4px 6px; }
.clk-field span { font-size: 12px; color: #4a6b8c; }
.clk-field b { font-size: 16px; color: #14375f; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.clk-step { width: 24px; height: 24px; border: 0; background: #eaf4ff; color: #1f6dbb; border-radius: 5px; font-size: 15px; line-height: 1; cursor: pointer; }
.clk-step:hover { background: #d5e9fb; }
.clk-step:active { background: #bcdcf7; }
.clk-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.clk-link { border: 0; background: transparent; color: #1f6dbb; font-size: 12px; cursor: pointer; padding: 4px 2px; }
.clk-link:hover { text-decoration: underline; }
.clk-done { border: 0; background: linear-gradient(180deg,#3f92db,#2b7ecd); color: #fff; font-size: 12px; padding: 6px 18px; border-radius: 6px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.clk-done:hover { background: linear-gradient(180deg,#4b9de3,#246fb8); }
/* 音量 */
.tp-vol-row { display: flex; align-items: center; gap: 10px; }
.vol-mute { flex: 0 0 26px; width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 5px; }
.vol-mute:hover { background: rgba(13,95,196,.1); }
.vol-mute svg { width: 20px; height: 20px; }
.vol-range { flex: 1; min-width: 0; height: 24px; cursor: pointer; touch-action: none; -webkit-appearance: none; appearance: none; background: transparent; }
.vol-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #0d5fc4 var(--vp, 100%), #cfe0f0 var(--vp, 100%)); border: 1px solid #b9cee2; }
.vol-range::-moz-range-track { height: 6px; border-radius: 3px; background: #cfe0f0; border: 1px solid #b9cee2; }
.vol-range::-moz-range-progress { height: 6px; border-radius: 3px; background: #0d5fc4; }
.vol-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg,#fff,#dceaf7); border: 1px solid #7aa5d0; box-shadow: 0 1px 3px rgba(0,0,0,.3); margin-top: -6px; }
.vol-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg,#fff,#dceaf7); border: 1px solid #7aa5d0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tp-vol-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; font-size: 12px; color: #456; }
#vol-pct { font-weight: 600; color: #123a6b; min-width: 38px; }
.tp-hint { font-size: 10px; color: #8296ac; }
/* 网络 */
.tp-net-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.net-signal { flex: 0 0 44px; width: 44px; height: 40px; display: flex; align-items: flex-end; }
.net-signal svg { width: 100%; height: 100%; }
.tp-net-info { flex: 1; min-width: 0; }
.net-status { font-size: 14px; font-weight: 600; color: #123a6b; }
.net-quality { font-size: 11px; color: #5d7290; margin-top: 3px; }
.tp-net-detail { border-top: 1px solid #d3e2f0; padding-top: 9px; }
.tp-net-detail > div { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; color: #61758c; }
.tp-net-detail b { color: #234; font-weight: 600; }
.tp-net-note { font-size: 10px; color: #93a2b2; margin-top: 9px; text-align: center; }

/* ---- 开始菜单 ---- */
#start-menu {
  position: fixed; left: 8px; bottom: 44px; width: 400px; z-index: 10000;
  background: linear-gradient(180deg, rgba(245,251,255,.97), rgba(225,240,252,.97));
  border: 1px solid rgba(255,255,255,.9); border-radius: 8px 8px 0 0;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); backdrop-filter: blur(10px);
  display: none; overflow: hidden;
}
#start-menu.open { display: flex; }
.sm-left { width: 62px; background: linear-gradient(180deg,#1e5fa8,#0d3f7a); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; color: #cfe4ff; }
.sm-left .sm-ic { font-size: 18px; opacity: .85; }
.sm-left .sm-ic.round { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.12); }
.sm-right { flex: 1; padding: 12px 14px; }
.sm-right h3 { margin: 0 0 10px; font-size: 14px; color: #0d3f7a; }
.sm-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sm-app { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; color: #234; }
.sm-app:hover { background: rgba(30,110,190,.14); }
.sm-app .sa-glyph { width: 28px; height: 28px; display:flex;align-items:center;justify-content:center;flex:0 0 28px; }
.sm-app .sa-glyph svg { width: 100%; height: 100%; display: block; }
/* 开始菜单文件夹（如「附件」） */
.sm-folder { grid-column: 1 / -1; }
.sm-folder-head { font-weight: 600; }
.sm-folder-head.open { background: rgba(30,110,190,.14); }
.sm-folder-head .sm-fa { transition: transform .15s; }
.sm-folder-head.open .sm-fa { transform: rotate(180deg); }
.sm-folder-list { padding-left: 20px; }
.sm-folder-item { font-size: 12px; }
.sm-footer { margin-top: 12px; border-top: 1px solid #cddfef; padding-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.sm-footer button { font-size: 12px; padding: 6px 12px; border: 1px solid #9fc3e8; border-radius: 5px; background: #eaf4ff; color: #234; cursor:pointer; }

/* ---- 窗口 ---- */
.window {
  position: fixed; z-index: 100; background: #fff;
  border: 1px solid #3a7fc4; border-radius: 8px 8px 4px 4px;
  box-shadow: 0 10px 34px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.5) inset;
  display: flex; flex-direction: column; overflow: hidden;
  min-width: 320px; min-height: 220px;
}
.window.maximized { border-radius: 0; }
.win-titlebar {
  height: 34px; flex: 0 0 34px; cursor: move;
  background: linear-gradient(180deg,#6cb6ef 0%,#3f92db 48%,#2b7ecd 52%,#1f6dbb 100%);
  border-bottom: 1px solid #1a5da3;
  display: flex; align-items: center; padding-left: 10px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.win-titlebar .wt-glyph { width: 18px; height: 18px; margin-right: 8px; display:inline-flex; align-items:center; justify-content:center; }
.win-titlebar .wt-glyph svg { width: 100%; height: 100%; display:block; }
.win-titlebar .wt-text { font-size: 13px; font-weight: 600; flex: 1; }
.win-controls { display: flex; height: 100%; align-items: stretch; }
.win-btn {
  width: 44px; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
/* 窗口按钮图形：纯 CSS 绘制，避免字体缺字空心方块 */
.win-btn.min::before { content: ""; width: 10px; height: 2px; background: currentColor; border-radius: 1px; }
.win-btn.max::before { content: ""; width: 10px; height: 9px; border: 2px solid currentColor; border-radius: 1px; }
.win-btn.close::before, .win-btn.close::after {
  content: ""; position: absolute; width: 12px; height: 2px; background: currentColor; border-radius: 1px;
}
.win-btn.close::before { transform: rotate(45deg); }
.win-btn.close::after { transform: rotate(-45deg); }
.win-btn:hover { background: rgba(255,255,255,.22); }
.win-btn.close:hover { background: #e04343; }
.win-body { flex: 1; min-height: 0; overflow: hidden; position: relative; background: #fff; }
.win-body iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- 窗口拉伸手柄（仿 Win7，右下角加重为斜纹角）---- */
.rs-handle { position: absolute; z-index: 20; touch-action: none; }
.rs-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.rs-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.rs-w { left: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.rs-e { right: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.rs-nw { top: 0; left: 0; width: 15px; height: 15px; cursor: nwse-resize; }
.rs-ne { top: 0; right: 0; width: 15px; height: 15px; cursor: nesw-resize; }
.rs-sw { bottom: 0; left: 0; width: 15px; height: 15px; cursor: nesw-resize; }
.rs-se {
  bottom: 0; right: 0; width: 18px; height: 18px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(58,127,196,.16) 50%);
}
.rs-se::after {
  content: ""; position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px;
  background: repeating-linear-gradient(135deg, rgba(37,96,160,.55) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.window.maximized .rs-handle { display: none; }

/* 拖拽时的占位边框 */
#drag-ghost { position: fixed; border: 2px dashed #4a90d9; background: rgba(74,144,217,.12); z-index: 50; display: none; pointer-events: none; }

/* ============ 手机横屏适配（矮屏）============ */
@media (max-height: 500px) {
  /* 中央旗帜缩小、上移，避免挡住图标和窗口 */
  #wallmark { width: 210px; height: 200px; top: 52%; opacity: .75; }
  /* 开始按钮加宽，防止"开始"换行 */
  #start-btn { width: 72px; gap: 3px; font-size: 12px; }
  .start-flag { width: 18px; height: 18px; }
  /* 任务栏略矮 */
  #taskbar { height: 38px; }
  #icons { height: calc(100% - 38px); }
  /* 桌面图标紧凑一点（仅默认中档，尺寸档位类优先） */
  #icons:not(.size-large):not(.size-small) .dicon { height: 80px; }
  #icons:not(.size-large):not(.size-small) .glyph { width: 44px; height: 44px; }
  /* 开始菜单在矮屏下限制高度并可滚动 */
  #start-menu { bottom: 40px; max-height: calc(100% - 48px); }
  .sm-apps { max-height: 220px; overflow-y: auto; }
  /* 窗口最小高度降低，避免小屏撑爆 */
  .window { min-height: 160px; }
}

/* ============ 手机竖屏提示（宽<高 时提示旋转）============ */
#rotate-tip {
  display: none;
  position: fixed; inset: 0; z-index: 20000;
  background: linear-gradient(160deg,#0b3d78,#2b8fd4);
  color: #fff; align-items: center; justify-content: center; flex-direction: column;
  text-align: center; padding: 30px;
}
@media (orientation: portrait) and (max-width: 700px) {
  #rotate-tip { display: flex; }
}
#rotate-tip .rot-icon { font-size: 56px; animation: rot 2s ease-in-out infinite; }
#rotate-tip h2 { margin: 16px 0 8px; font-size: 22px; }
#rotate-tip p { margin: 0; font-size: 14px; opacity: .85; }
@keyframes rot { 0%,100%{transform:rotate(0)} 50%{transform:rotate(90deg)} }

/* 右键菜单（真 Win7 风格） */
#ctx-menu {
  position: fixed; z-index: 10001; min-width: 172px; display: none;
  background: rgba(250,252,255,.99); border: 1px solid #a9c8e8; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.32); padding: 4px; font-size: 13px; color: #234;
}
#ctx-menu .mi {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 3px; cursor: default; white-space: nowrap;
}
#ctx-menu .mi:hover, #ctx-menu .mi.open > .ml-holder, #ctx-menu > .mi.open { background: #2b7ecd; color: #fff; }
#ctx-menu .mi:hover { background: #2b7ecd; color: #fff; }
/* 刚点过的选项：延迟收起期间抑制 hover 蓝底，让 ✓ 落在清爽白底上 */
#ctx-menu .mi.just-picked,
#ctx-menu .mi.just-picked:hover { background: transparent !important; color: #234 !important; }
/* 勾选标记：纯 CSS border+rotate 画勾，零依赖（无 SVG/字体/背景图），老内核也稳 */
#ctx-menu .mk { width: 14px; flex: 0 0 14px; height: 14px; position: relative; }
#ctx-menu .mk.on::after {
  content: ""; position: absolute; left: 3px; top: 0;
  width: 5px; height: 9px; border: solid #0d5fc4; border-width: 0 2.5px 2.5px 0;
  -webkit-transform: rotate(45deg); transform: rotate(45deg);
  /* 白色描边：即使触屏 sticky-hover 把勾变白，白底上仍有清晰轮廓 */
  filter: drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 0 1px rgba(255,255,255,.7));
}
/* 悬停/触屏激活：勾改白 + 深蓝描边，蓝底白勾/白底蓝勾都清晰 */
#ctx-menu .mi:hover .mk.on::after {
  border-color: #fff;
  filter: drop-shadow(0 0 1px rgba(13,95,196,.95)) drop-shadow(0 0 1px rgba(13,95,196,.7));
}
#ctx-menu .mi:hover .ar { border-color: #fff; color: #fff; }
#ctx-menu .ml { flex: 1 1 auto; }
/* 子菜单箭头：纯 CSS 三角形 */
#ctx-menu .ar { width: 8px; height: 8px; flex: 0 0 8px; position: relative; }
#ctx-menu .ar::after {
  content: ""; position: absolute; right: 1px; top: 1px;
  width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 5px solid #6a89a8;
}
#ctx-menu .mi:hover .ar::after { border-left-color: #fff; }
#ctx-menu .sep { height: 1px; background: #d3e2f0; margin: 4px 6px; }
#ctx-menu .sub {
  display: none; position: absolute; left: 100%; top: -5px; min-width: 150px;
  background: rgba(250,252,255,.99); border: 1px solid #a9c8e8; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.32); padding: 4px;
}
#ctx-menu .mi.open > .sub { display: block; }
#ctx-menu .sub.flip { left: auto; right: 100%; }
#ctx-menu .sub .mi { color: #234; }
#ctx-menu .sub .mi:hover { background: #2b7ecd; color: #fff; }
/* 图标专属菜单（长按 / 右键） */
#icon-menu {
  position: fixed; z-index: 10002; min-width: 132px; display: none;
  background: rgba(250,252,255,.99); border: 1px solid #a9c8e8; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.32); padding: 4px; font-size: 13px; color: #234;
}
#icon-menu .mi {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 3px; cursor: default; white-space: nowrap;
}
#icon-menu .mi:hover { background: #2b7ecd; color: #fff; }
#icon-menu .mk { width: 14px; flex: 0 0 14px; height: 14px; position: relative; }
#icon-menu .mk.on::after {
  content: ""; position: absolute; left: 4px; top: 0;
  width: 4px; height: 8px; border: solid #0d5fc4; border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg); transform: rotate(45deg);
}
#icon-menu .mi:hover .mk.on::after { border-color: #fff; }
#icon-menu .ml { flex: 1 1 auto; }
#icon-menu .sep { height: 1px; background: #d3e2f0; margin: 4px 6px; }

/* 点「移动」后的可拖动就绪态 */
.dicon.armed {
  outline: 2px solid #3b8eea; outline-offset: -2px;
  box-shadow: 0 0 14px rgba(59,142,234,.85), inset 0 0 8px rgba(59,142,234,.25);
  cursor: move;
}

/* 删除确认框 */
#confirm-box {
  position: fixed; inset: 0; z-index: 10003; display: none;
  align-items: center; justify-content: center; background: rgba(0,0,0,.28);
}
#confirm-box .cb-card {
  width: min(340px, 86vw); padding: 18px 20px 16px; color: #234;
  background: linear-gradient(180deg,#f7fbff,#eaf3ff); border: 1px solid #8fb8e0;
  border-radius: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.4);
  font-family: 'Segoe UI','Microsoft YaHei',sans-serif;
}
#confirm-box .cb-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #0d5fc4; }
#confirm-box .cb-msg { font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
#confirm-box .cb-btns { display: flex; justify-content: flex-end; gap: 10px; }
#confirm-box button {
  min-width: 76px; height: 28px; padding: 0 12px; font-size: 13px; color: #234; cursor: pointer;
  background: #fff; border: 1px solid #7aa7d4; border-radius: 3px;
}
#confirm-box button:hover { background: #e8f2ff; }
#confirm-box .cb-ok { background: #2b7ecd; border-color: #1f6fb8; color: #fff; }
#confirm-box .cb-ok:hover { background: #1f6fb8; }

/* 图标隐藏态 */
#icons.hidden { display: none; }

/* 真实 PNG 图标适配（img） */
.dicon .glyph img,
.task-item .ti-glyph img,
.sm-app .sa-glyph img,
.win-titlebar .wt-glyph img { width: 100%; height: 100%; object-fit: contain; display: block; }
