/* ============================================================
   KZ Windows 桌面应用 / 文件夹系统  kz-win-apps.css
   —— 只作用于 Windows 桌面，安卓页不加载
   ============================================================ */

/* ---------------- 桌面图标统一（可拖 / 可删 / 可分组） ---------------- */
#windowsDesktopIcons.kz-apps-on {
    align-content: start;
    position: relative;
}

#windowsDesktopIcons .kz-app {
    position: relative;
    user-select: none;
    touch-action: none;
    transition: transform .16s ease, box-shadow .18s ease, background .2s ease;
}
#windowsDesktopIcons .kz-app.kz-dragging {
    opacity: .95;
    z-index: 80;
    cursor: grabbing;
    transition: none;
    box-shadow: 0 18px 36px rgba(2, 6, 23, .45);
    will-change: transform;
}
#windowsDesktopIcons .kz-app.kz-drop-hover {
    background: rgba(56, 189, 248, .28) !important;
    box-shadow: 0 0 0 2px #22d3ee, 0 10px 26px rgba(34, 211, 238, .45) !important;
    transform: scale(1.06);
}

/* 删除按钮 */
#windowsDesktopIcons .kz-app-x {
    position: absolute;
    top: 0;
    right: 6px;
    width: 17px;
    height: 17px;
    border: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 5;
}
#windowsDesktopIcons .kz-app:hover .kz-app-x { opacity: 1; }

/* 拖拽跟随的幽灵 */
.kz-drag-ghost {
    position: fixed;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    pointer-events: none;
    z-index: 9999;
    opacity: .9;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .45);
    transform: translate(-50%, -50%) scale(1.05);
}

/* ---------------- 文件夹图标 ---------------- */
#windowsDesktopIcons .kz-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#windowsDesktopIcons .kz-folder .kz-folder-face {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 8px 20px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 8px;
    box-sizing: border-box;
    position: relative;
}
#windowsDesktopIcons .kz-folder .kz-folder-face i {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    font-style: normal;
    overflow: hidden;
}
#windowsDesktopIcons .kz-folder .kz-folder-face b {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    text-align: center;
    padding: 0 3px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
#windowsDesktopIcons .kz-folder > span {
    margin-top: 5px;
    font-size: 11.5px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 自定义应用图标 */
#windowsDesktopIcons .kz-app .kz-app-tile {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(2, 6, 23, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
#windowsDesktopIcons .kz-app > span {
    margin-top: 5px;
    font-size: 11.5px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   文件夹弹出层
   ============================================================ */
.kzf {
    position: fixed;
    inset: 0;
    z-index: 340;
    display: none;
    align-items: center;
    justify-content: center;
    /* 不加暗色遮罩：拖桌面图标过来时才看得见、拖得动 */
    background: transparent;
    pointer-events: none;
}
.kzf.kz-open { display: flex; animation: kzfIn .2s ease; }
@keyframes kzfIn { from { opacity: 0; } to { opacity: 1; } }

.kzf-win {
    width: min(760px, 92vw);
    height: auto;              /* 高度跟着内容走，不再固定一大块空白 */
    min-height: 180px;
    max-height: 78vh;
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 30px 80px rgba(2, 6, 23, .45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}
.kzf-win.kz-drop-on { box-shadow: 0 0 0 3px #22d3ee, 0 30px 80px rgba(2, 6, 23, .45); }
.kzf-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
}
.kzf-head b { font-size: 14px; color: #0f172a; }
.kzf-head small { font-size: 11px; color: #64748b; }

/* 【20261028J】名字后面的 ✏️：默认淡淡的，鼠标移到窗口上才明显；
   margin-left 必须压掉 .kzf-head button 的 auto，否则三个按钮会散开 */
.kzf-head .kzf-ren {
    margin-left: 2px;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 7px;
    background: rgba(248, 250, 252, .95);
    font-size: 13px;
    line-height: 1;
    color: #475569;
    opacity: .82;
    transition: opacity .14s ease, background .14s ease, border-color .14s ease;
}
.kzf-head .kzf-ren:hover {
    background: rgba(99, 102, 241, .14);
    border-color: rgba(99, 102, 241, .45);
    color: #4338ca;
    opacity: 1;
}
.kzf-win:hover .kzf-head .kzf-ren { opacity: .92; }

/* 原地改名用的输入框：跟标题一个字号，看着就是「标题变成了可输入的」 */
.kzf-ren-in {
    width: 168px;
    max-width: 46vw;
    height: 26px;
    padding: 0 8px;
    border: 1px solid rgba(99, 102, 241, .55);
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    font: 600 13.5px/26px -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}
.kzf-head button {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: 15px;
    cursor: pointer;
}
.kzf-head button:hover { background: #ef4444; color: #fff; }

.kzf-body { padding: 14px; overflow-y: auto; }
.kzf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 12px;
}
.kzf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 4px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background .15s ease;
}
.kzf-item:hover { background: rgba(99, 102, 241, .08); }
.kzf-item .box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .22);
}
.kzf-item > span {
    font-size: 11px;
    color: #334155;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kzf-item .ops {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s ease;
}
.kzf-item:hover .ops { opacity: 1; }
.kzf-item .ops button {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    font-size: 9px;
    cursor: pointer;
    padding: 0;
    line-height: 18px;
}
.kzf-item .ops button:hover { background: #ef4444; }

.kzf-empty {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    padding: 30px 10px;
    line-height: 1.8;
}
.kzf-tip {
    font-size: 11px;
    color: #64748b;
    padding: 0 14px 12px;
}

/* ============================================================
   应用库（面板里的 tab）
   ============================================================ */
.kza-search {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.kza-search input {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, .14);
    padding: 0 10px;
    font-size: 12px;
    outline: none;
    background: #fff;
    color: #0f172a;
}
.kza-search input:focus { border-color: #6366f1; }

.kza-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kza-cat {
    height: 26px;
    padding: 0 10px;
    border-radius: 99px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: #fff;
    font-size: 11.5px;
    color: #475569;
    cursor: pointer;
}
.kza-cat.kz-on { background: #eef2ff; border-color: #6366f1; color: #3730a3; font-weight: 700; }

.kza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}
.kza-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 2px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
}
.kza-app:hover { background: rgba(99, 102, 241, .08); border-color: rgba(99, 102, 241, .2); }
.kza-app .box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .2);
    position: relative;
}
.kza-app.added .box::after {
    content: '✓';
    position: absolute;
    right: -5px;
    top: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #22c55e;
    font-size: 9px;
    line-height: 15px;
    text-align: center;
}
.kza-app > span { font-size: 10.5px; color: #334155; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kza-trash {
    margin-top: 14px;
    border-top: 1px dashed rgba(100, 116, 139, .3);
    padding-top: 10px;
}
.kza-trash h4 { margin: 0 0 8px; font-size: 12px; color: #b91c1c; }
.kza-trash-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kza-trash-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 11px;
}
.kza-trash-item button {
    border: 0;
    background: #fff;
    border-radius: 6px;
    font-size: 10px;
    padding: 1px 6px;
    cursor: pointer;
    color: #b91c1c;
}

/* ============================================================
   开始菜单主题化（随皮肤配色）
   ============================================================ */
#windowsDesktopSystem[data-kz-menu="jelly"] .start-menu {
    background: linear-gradient(160deg, rgba(96, 165, 250, .82), rgba(37, 99, 235, .78));
    backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 24px 60px rgba(2, 20, 60, .45);
}
#windowsDesktopSystem[data-kz-menu="mono"] .start-menu {
    background: rgba(255, 255, 255, .96);
    color: #111;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
#windowsDesktopSystem[data-kz-menu="mono"] .start-menu .start-search,
#windowsDesktopSystem[data-kz-menu="mono"] .start-menu .start-app { color: #111; }
#windowsDesktopSystem[data-kz-menu="mono"] .start-menu .start-search {
    background: rgba(0, 0, 0, .05);
    color: #111;
}
#windowsDesktopSystem[data-kz-menu="space"] .start-menu {
    background: rgba(8, 12, 30, .82);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
}
#windowsDesktopSystem[data-kz-menu="neon"] .start-menu {
    background: linear-gradient(160deg, rgba(28, 10, 44, .9), rgba(10, 4, 24, .92));
    border: 1px solid rgba(244, 114, 182, .5);
    box-shadow: 0 0 40px -10px rgba(244, 114, 182, .8), inset 0 0 30px rgba(124, 58, 237, .28);
    color: #ffe9fb;
}
#windowsDesktopSystem[data-kz-menu="cream"] .start-menu {
    background: rgba(255, 252, 246, .97);
    color: #4a3b2c;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 24px 60px rgba(120, 80, 40, .3);
}
#windowsDesktopSystem[data-kz-menu="cream"] .start-menu .start-search {
    background: rgba(120, 80, 40, .08);
    color: #4a3b2c;
}
#windowsDesktopSystem[data-kz-menu="anime"] .start-menu {
    background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(226, 244, 255, .88));
    color: #16405c;
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 24px 60px rgba(30, 90, 130, .3);
}
#windowsDesktopSystem[data-kz-menu="anime"] .start-menu .start-search {
    background: rgba(22, 64, 92, .07);
    color: #16405c;
}

/* 圆角 / 布局微调，让开始菜单更贴近主题 */
#windowsDesktopSystem[data-kz-menu] .start-menu {
    border-radius: 14px;
    padding: 18px;
}
#windowsDesktopSystem[data-kz-menu] .start-app { border-radius: 10px; }
#windowsDesktopSystem[data-kz-menu] .start-search { border-radius: 10px; }

@media (max-width: 640px) {
    .kzf-win { width: 94vw; max-height: 86vh; }
    .kzf-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

/* ============================================================
   品牌图标（SVG / 文字）统一容器
   ============================================================ */
.kz-ic {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    overflow: hidden;
    position: relative;
}
.kz-ic svg {
    width: 64%;
    height: 64%;
    display: block;
}
.kzf-item .kz-ic-t,
.kza-app .kz-ic-t,
.kz-app-tile .kz-ic-t,
.kz-folder-face .kz-ic-t { color: #fff !important; }
.kz-ic-t {
    color: #fff;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    white-space: nowrap;
}
.kz-ic-t[data-len="2"] { font-size: .86em; }
.kz-ic-t[data-len="3"] { font-size: .62em; }
.kz-ic-t[data-len="4"] { font-size: .48em; }
.kz-ic-t[data-len="5"] { font-size: .4em; }

/* 尺寸：各处容器里让字更像真图标 */
.kz-app-tile .kz-ic-t { font-size: 23px; }
.kza-app .box .kz-ic-t { font-size: 18px; }
.kzf-item .box .kz-ic-t { font-size: 19px; }
.kz-folder-face i .kz-ic-t { font-size: 8.5px; }
.kz-folder-face i .kz-ic svg { width: 74%; height: 74%; }

/* 容器不再自带背景，交给 .kz-ic */
.kz-app-tile {
    padding: 0;
    background: none !important;
    box-shadow: none;
}
.kz-app-tile .kz-ic {
    box-shadow: 0 8px 18px rgba(2, 6, 23, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}

/* 深海毛玻璃的开始菜单 */
#windowsDesktopSystem[data-kz-menu="deepsea"] .start-menu {
    background: linear-gradient(160deg, rgba(120, 205, 215, .42), rgba(40, 120, 150, .38));
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 24px 60px rgba(0, 40, 60, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
    color: #fff;
    border-radius: 16px;
}
#windowsDesktopSystem[data-kz-menu="deepsea"] .start-menu .start-search {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}

/* ============================================================
   开始菜单：可拖 / 可删 / 可加
   ============================================================ */
#windowsDesktopSystem .start-app {
    position: relative;
    user-select: none;
    touch-action: none;
}
#windowsDesktopSystem .start-app .kz-sx {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 17px;
    height: 17px;
    border: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 3;
}
#windowsDesktopSystem .start-app:hover .kz-sx { opacity: 1; }
#windowsDesktopSystem .start-app.kz-start-dragging {
    opacity: .55;
    transform: scale(.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
#windowsDesktopSystem .start-app .kz-ic {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
#windowsDesktopSystem .start-app .kz-ic-t { font-size: 13px; }
#windowsDesktopSystem .start-app .kz-ic svg { width: 62%; height: 62%; }

/* 面板里的开始菜单管理 */
.kza-start {
    margin-top: 14px;
    border-top: 1px dashed rgba(100, 116, 139, .3);
    padding-top: 10px;
}
.kza-start-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kza-start-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
}
.kza-start-item.kz-off { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.kza-start-item button {
    border: 0;
    background: #fff;
    border-radius: 6px;
    font-size: 10px;
    padding: 1px 6px;
    cursor: pointer;
    color: #4338ca;
}

/* 站点图标（原本是白色 SVG 图片）放进文件夹时，给它一个深色底，保证白图标看得见 */
.kz-ic-img {
    background: linear-gradient(150deg, #475569, #0f172a) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 12px rgba(2, 6, 23, .28);
}
.kz-ic-img img {
    width: 62%;
    height: 62%;
    object-fit: contain;
    display: block;
}
/* 文件夹弹层里图标稍大一点 */
.kzf-item .box .kz-ic-img img,
.kzf-item .box .kz-ic svg { width: 58%; height: 58%; }

/* ---------- 文件夹：添加内容 ---------- */
.kzf-add {
    margin-left: 6px;
    height: 28px;
    padding: 0 12px;
    flex: none;
    white-space: nowrap;      /* 之前没写，导致「添加内容」竖着排 */
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    border: 1px dashed rgba(99, 102, 241, .5);
    background: rgba(99, 102, 241, .08);
    color: #4338ca;
    font-size: 11.5px;
    cursor: pointer;
}
.kzf-add:hover { background: rgba(99, 102, 241, .16); }

.kzf-picker { display: none; border-bottom: 1px solid rgba(15, 23, 42, .08); background: #f8fafc; }
.kzf-picker.kz-on { display: block; }
.kzf-tabs { display: flex; gap: 6px; padding: 8px 12px 0; }
.kzf-tab {
    height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 99px;
    background: #fff;
    font-size: 11.5px;
    color: #475569;
    cursor: pointer;
}
.kzf-tab.kz-on { background: #eef2ff; border-color: #6366f1; color: #3730a3; font-weight: 700; }
.kzf-plist {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 12px;
    max-height: 168px;
    overflow-y: auto;
}
.kzf-pitem {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px 4px 4px;
    border-radius: 99px;
    border: 1px solid rgba(15, 23, 42, .1);
    background: #fff;
    font-size: 11.5px;
    color: #334155;
    cursor: pointer;
}
.kzf-pitem:hover { border-color: #6366f1; color: #3730a3; }
.kzf-pitem .mini {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: #eee;
}
.kzf-pitem .mini .kz-ic { width: 100%; height: 100%; }
.kzf-pitem .mini .kz-ic-t { font-size: 11px; }
.kzf-pitem .mini .kz-ic svg { width: 62%; height: 62%; }

/* 文件夹面板里的“添加”提示 */
.kzf-hint {
    font-size: 11px;
    color: #94a3b8;
    padding: 0 14px 12px;
    text-align: center;
}


/* ---------- 开始菜单的「添加」选择面板 ---------- */
.kzp {
    position: fixed;
    inset: 0;
    z-index: 1200;              /* 必须高于开始菜单(999)，否则会被菜单盖住、点不动 */
    display: none;
    background: transparent;
    pointer-events: none;       /* 不挡桌面，也不挡开始菜单 */
}
.kzp.kz-open { display: block; }
.kzp-win {
    position: absolute;
    pointer-events: auto;
    width: min(400px, 46vw);
    max-height: 62vh;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: 0 24px 70px rgba(2, 6, 23, .45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kzp-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}
.kzp-head b { font-size: 13px; color: #0f172a; }
.kzp-head small { font-size: 11px; color: #64748b; }
.kzp-head button {
    margin-left: auto;
    width: 28px; height: 28px;
    border: 0; border-radius: 8px;
    background: transparent; color: #334155;
    font-size: 14px; cursor: pointer;
}
.kzp-head button:hover { background: #ef4444; color: #fff; }
.kzp-tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.kzp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 14px;
    overflow-y: auto;
}
.kzp-list input {
    width: 100%; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, .14);
    padding: 0 10px; font-size: 12px;
    margin-bottom: 4px;
}

/* 开始菜单装了很多东西时：内部滚动，别溢出到任务栏点不到 */
#windowsDesktopSystem .start-menu { overflow: hidden; }
#windowsDesktopSystem .start-apps {
    max-height: calc(500px - 118px);
    overflow-y: auto;
    align-content: start;
    padding-right: 4px;
}
#windowsDesktopSystem .start-apps::-webkit-scrollbar { width: 6px; }
#windowsDesktopSystem .start-apps::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .32);
    border-radius: 9px;
}

/* ---------- 小组件预览窗（从开始菜单磁贴打开，不影响桌面上的组件） ---------- */
.kzw {
    position: fixed;
    z-index: 950;
    display: none;
    width: 300px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 60px rgba(2, 6, 23, .45);
    overflow: hidden;
}
.kzw.kz-open { display: block; }
.kzw-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 8px 14px;
    cursor: move;
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}
.kzw-head b { font-size: 12.5px; color: #0f172a; flex: 1; }
.kzw-head button {
    width: 24px; height: 24px;
    border: 0; border-radius: 7px;
    background: transparent; color: #334155;
    font-size: 13px; cursor: pointer;
}
.kzw-head button:hover { background: #ef4444; color: #fff; }
.kzw-body { padding: 12px; }
.kzw-body .kz-tc-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    background: #fff;
    color: #0f172a;
    border-radius: 14px;
    box-shadow: none;
    border: 1px solid rgba(15, 23, 42, .08);
}

/* ---------- 开始菜单里直接显示的小组件 ---------- */
#windowsDesktopSystem .start-menu.active { display: flex; flex-direction: column; }
#windowsDesktopSystem .kz-start-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, .18);
    margin-top: 8px;
}
#windowsDesktopSystem .kz-start-wcard {
    width: 208px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    overflow: hidden;
}
#windowsDesktopSystem .kz-start-wbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    font-size: 10.5px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
}
#windowsDesktopSystem .kz-start-wbar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#windowsDesktopSystem .kz-start-wbar button {
    width: 16px; height: 16px;
    border: 0; border-radius: 50%;
    background: rgba(239, 68, 68, .85);
    color: #fff; font-size: 9px; line-height: 16px;
    padding: 0; cursor: pointer;
}
#windowsDesktopSystem .kz-start-wbody { padding: 6px; }
#windowsDesktopSystem .kz-start-wbody .kz-tc-card {
    /* 卡片本身是 position:absolute，放进菜单后必须改回普通流，否则会叠在一起只剩几个数字 */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    inset: auto !important;
    width: 100% !important;
    padding: 10px 12px 11px !important;
    border-radius: 14px !important;
    color: #fff !important;
    background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08)) !important;
    border: 1px solid rgba(255, 255, 255, .34) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .38) !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    cursor: default;
}
#windowsDesktopSystem .kz-start-wbody .kz-tc-head { display: none !important; }
#windowsDesktopSystem .kz-start-wbody .kz-tc-big { font-size: 22px !important; }
#windowsDesktopSystem .kz-start-wbody .kz-tc-sub { font-size: 10.5px !important; opacity: .85; }

/* ---------- 菜单内的天气 / 时间小卡（与桌面同款玻璃感） ---------- */
#windowsDesktopSystem .kz-tw-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px !important;
}
#windowsDesktopSystem .kz-tw-mini .mini-city {
    font-size: 11px;
    opacity: .92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#windowsDesktopSystem .kz-tw-mini .mini-big {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}
#windowsDesktopSystem .kz-tw-mini .mini-big b {
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.5px;
}
#windowsDesktopSystem .kz-tw-mini .mini-big small {
    font-size: 12px;
    font-weight: 600;
    opacity: .75;
    margin-left: 2px;
}
#windowsDesktopSystem .kz-tw-mini .mini-meta {
    font-size: 10px;
    opacity: .82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#windowsDesktopSystem .kz-tw-mini .mini-ic svg { width: 30px; height: 30px; display: block; }

/* ---------- 菜单内迷你音乐卡 ---------- */
#windowsDesktopSystem .kz-music-mini {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 10px !important;
}
#windowsDesktopSystem .kz-music-mini .mm-cover {
    width: 34px; height: 34px; flex: none;
    border-radius: 10px;
    background: linear-gradient(140deg, #22d3ee, #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
#windowsDesktopSystem .kz-music-mini .mm-txt { flex: 1; min-width: 0; }
#windowsDesktopSystem .kz-music-mini .mm-title {
    display: block; font-size: 11.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#windowsDesktopSystem .kz-music-mini .mm-sub { font-size: 9.5px; opacity: .75; }
#windowsDesktopSystem .kz-music-mini .mm-ctrl { display: flex; gap: 3px; flex: none; }
#windowsDesktopSystem .kz-music-mini .mm-ctrl button {
    width: 22px; height: 22px;
    border: 0; border-radius: 50%;
    background: rgba(255,255,255,.28);
    color: #fff; font-size: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
#windowsDesktopSystem .kz-music-mini .mm-play { background: rgba(255,255,255,.55) !important; color: #111 !important; }

/* 菜单内音乐卡的进度条 */
#windowsDesktopSystem .kz-music-mini .mm-bar {
    display: block;
    height: 3px;
    margin-top: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
}
#windowsDesktopSystem .kz-music-mini .mm-bar > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #67e8f9, #a78bfa);
}
#windowsDesktopSystem .kz-music-mini .mm-time {
    display: block;
    font-size: 8.5px;
    opacity: .65;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* 菜单内迷你音乐卡：跟随播放器特效设置 */
#windowsDesktopSystem .kz-music-mini[data-mfx="gradient"] {
    background: linear-gradient(135deg, rgba(103,232,249,.32), rgba(167,139,250,.3) 50%, rgba(244,114,182,.28)) !important;
    background-size: 220% 220% !important;
    animation: kzdjFlowMini 9s ease infinite;
}
@keyframes kzdjFlowMini {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
#windowsDesktopSystem .kz-music-mini[data-mfx="neon"] {
    border-color: rgba(103,232,249,.85) !important;
    box-shadow: 0 0 0 1px rgba(103,232,249,.5), 0 0 26px rgba(34,211,238,.55) !important;
}
#windowsDesktopSystem .kz-music-mini[data-mfx="electric"] {
    position: relative;
    overflow: hidden;
    border-color: rgba(56,189,248,.8) !important;
    box-shadow: 0 0 22px rgba(56,189,248,.45) !important;
}
#windowsDesktopSystem .kz-music-mini[data-mfx="electric"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.55) 50%, transparent 64%);
    background-size: 260% 100%;
    animation: kzdjScanMini 3.4s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes kzdjScanMini {
    0% { background-position: 180% 0; }
    100% { background-position: -80% 0; }
}
#windowsDesktopSystem .kz-music-mini[data-mfx="dj"] {
    border-color: rgba(244,114,182,.85) !important;
    animation: kzdjDjMini 1.1s steps(1, end) infinite;
}
@keyframes kzdjDjMini {
    0% { box-shadow: 0 0 26px rgba(244,114,182,.8) !important; }
    25% { box-shadow: 0 0 18px rgba(103,232,249,.7) !important; }
    50% { box-shadow: 0 0 30px rgba(251,191,36,.75) !important; }
    75% { box-shadow: 0 0 20px rgba(167,139,250,.75) !important; }
}

/* ============================================================
   【20261028G】开始菜单：拖动排序 + 一个磁贴塞进另一个（文件夹）
   ------------------------------------------------------------
   用户 10-28 反馈：
     · 「开始菜单里面的功能拖动不了，一个里面一个放不了」
     · 「一个里面一个软件塞不了」
   JS 在 kz-win-apps.js（bindStartDrag / makeStartGroup / 面板那几段），
   这里只管长相。整段新增，上面老规则一条没改。
   ============================================================ */

/* ---- ① 拖动中的磁贴 ----
   pointer-events:none 是关键：不关掉的话 elementFromPoint 永远只会
   返回它自己，底下压着哪块磁贴一辈子也看不见（老版就是这么拖不动的）。 */
#windowsDesktopSystem .start-app.kz-start-dragging {
    pointer-events: none !important;
    opacity: .92;
    transform: scale(1.05);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
    background: rgba(255, 255, 255, .14) !important;
    z-index: 40;
    transition: none;
}

body.kz-start-dragging,
body.kz-start-dragging * {
    cursor: grabbing !important;
}

/* ---- ② 松手会发生什么：整块磁贴亮起来 ---- */
#windowsDesktopSystem .start-app.kz-start-merge {
    background: rgba(99, 102, 241, .30) !important;
    box-shadow: inset 0 0 0 2px rgba(129, 140, 248, .95), 0 10px 24px rgba(79, 70, 229, .35) !important;
    transform: scale(1.04);
}

#windowsDesktopSystem .start-app.kz-start-into {
    background: rgba(16, 185, 129, .28) !important;
    box-shadow: inset 0 0 0 2px rgba(52, 211, 153, .95), 0 10px 24px rgba(16, 185, 129, .32) !important;
    transform: scale(1.04);
}

/* ---- ③ 拖动时菜单底部那条提示 ---- */
#windowsDesktopSystem .kz-start-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translate(-50%, 8px);
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .82);
    border: 1px solid rgba(148, 163, 184, .32);
    color: #e2e8f0;
    font: 500 11.5px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 60;
}

#windowsDesktopSystem .kz-start-hint b {
    color: #a5b4fc;
    font-weight: 700;
}

#windowsDesktopSystem .kz-start-hint.kz-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---- ④ 文件夹磁贴：2×2 小图标脸 ---- */
#windowsDesktopSystem .start-app.kz-start-group {
    cursor: pointer;
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-face {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    padding: 2px;
    box-sizing: border-box;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, .10);
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-cell .kz-ic {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-cell .kz-ic svg {
    width: 80%;
    height: 80%;
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-cell .kz-ic-t {
    font-size: 9px;
}

#windowsDesktopSystem .start-app.kz-start-group .kz-sg-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- ⑤ 文件夹展开面板（铺在开始菜单里，不做成独立窗口） ---- */
#windowsDesktopSystem .kz-sgp {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 30;
    border-radius: 8px;
    background: rgba(12, 16, 24, .72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

#windowsDesktopSystem .kz-sgp.kz-open { display: block; }

#windowsDesktopSystem .kz-sgp-win {
    /* 中间一张紧凑卡片，不铺满整个菜单 —— 铺满会留一大片空白，很丑 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100% - 36px));
    max-height: calc(100% - 36px);
    min-height: 180px;
    border-radius: 14px;
    background: rgba(28, 34, 47, .98);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .5);
    overflow: hidden;
}

#windowsDesktopSystem .kz-sgp.kz-sgp-drop .kz-sgp-win {
    border-color: rgba(52, 211, 153, .85);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, .35), 0 18px 44px rgba(0, 0, 0, .45);
}

#windowsDesktopSystem .kz-sgp-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: linear-gradient(90deg, rgba(99, 102, 241, .26), rgba(139, 92, 246, .12));
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

#windowsDesktopSystem .kz-sgp-ico { font-size: 15px; line-height: 1; }

#windowsDesktopSystem .kz-sgp-name {
    flex: 0 1 190px;
    min-width: 90px;
    margin-right: auto;
    height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
    color: #f1f5f9;
    font: 600 12.5px/26px -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    outline: none;
}

#windowsDesktopSystem .kz-sgp-name:focus {
    border-color: rgba(129, 140, 248, .85);
    background: rgba(255, 255, 255, .14);
}

#windowsDesktopSystem .kz-sgp-btn {
    flex: 0 0 auto;
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
    font: 600 12px/26px -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    cursor: pointer;
}

#windowsDesktopSystem .kz-sgp-btn:hover {
    background: rgba(239, 68, 68, .85);
    border-color: rgba(239, 68, 68, .85);
    color: #fff;
}

#windowsDesktopSystem .kz-sgp-x {
    width: 28px;
    padding: 0;
}

#windowsDesktopSystem .kz-sgp-x:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}

#windowsDesktopSystem .kz-sgp-grid {
    flex: 0 1 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    align-content: start;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    min-height: 0;
}

#windowsDesktopSystem .kz-sgp-grid::-webkit-scrollbar { width: 8px; }
#windowsDesktopSystem .kz-sgp-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 8px;
}

#windowsDesktopSystem .kz-sgp-app {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px 9px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .14s ease;
}

#windowsDesktopSystem .kz-sgp-app:hover { background: rgba(255, 255, 255, .10); }

#windowsDesktopSystem .kz-sgp-face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, .10);
}

#windowsDesktopSystem .kz-sgp-face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#windowsDesktopSystem .kz-sgp-face .kz-ic {
    width: 100%;
    height: 100%;
    border-radius: 9px;
}

#windowsDesktopSystem .kz-sgp-face .kz-ic svg {
    width: 62%;
    height: 62%;
}

#windowsDesktopSystem .kz-sgp-label {
    max-width: 100%;
    padding: 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
    font: 500 11.5px/1.35 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

#windowsDesktopSystem .kz-sgp-noface {
    color: #94a3b8;
    font: 700 14px/1 -apple-system, "Segoe UI", sans-serif;
}

#windowsDesktopSystem .kz-sgp-out {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 17px;
    height: 17px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    font: 600 10px/17px -apple-system, "Segoe UI", sans-serif;
    cursor: pointer;
    opacity: 0;
    transition: opacity .14s ease;
}

#windowsDesktopSystem .kz-sgp-app:hover .kz-sgp-out { opacity: 1; }

#windowsDesktopSystem .kz-sgp-hint {
    flex: 0 0 auto;
    padding: 7px 14px 9px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #94a3b8;
    font: 500 11px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    text-align: center;
}

/* 手机窄屏 */
@media (max-width: 640px) {
    #windowsDesktopSystem .kz-sgp-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; padding: 10px; }
    #windowsDesktopSystem .kz-sgp-hint { display: none; }
    #windowsDesktopSystem .kz-start-hint { font-size: 10.5px; padding: 4px 10px; }
}
