/* ===== 电脑桌面样式 ===== */
.computer-desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 背景改透明：让下方的「桌面底色 / 壁纸层」（#bgContainer，2.css 里有默认渐变）
       和它上面的动态背景效果层透出来。视觉和以前一致，
       但用户设置的壁纸和动态效果都能正常显示，弹窗也不会再互相覆盖 */
    background: transparent;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

/* 电脑桌面顶部任务栏 */
.desktop-taskbar {
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    color: white;
    font-size: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.night-mode .desktop-taskbar {
    background: rgba(30, 41, 59, 0.3);
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 1px;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.computer-desktop .taskbar-app {
    padding: 6px 0px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.computer-desktop .taskbar-app:hover {
    background: rgba(255, 255, 255, 0.1);
}

.computer-desktop .taskbar-app i {
    font-size: 16px;
}

/* 电脑桌面壁纸区域 */
.desktop-wallpaper {
    flex: 10;
    padding: 8px;
    overflow: hidden;
    position: relative;
}

/* 电脑桌面图标网格 */
.computer-desktop .desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.desktop-icon {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 10px;
    padding: 10px;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.desktop-icon i {
    font-size: 42px;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.desktop-icon span {
    font-size: 13px;
    color: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 电脑桌面底部Dock栏 */
.desktop-dock {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 0 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.night-mode .desktop-dock {
    background: rgba(30, 41, 59, 0.3);
}

.dock-icon {
    width: 65px;
    height: 65px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dock-icon:hover {
    transform: scale(1.2) translateY(-10px);
}

.dock-icon i {
    font-size: 28px;
    color: white;
}

.dock-icon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dock-icon:hover::after {
    opacity: 1;
}

/* 电脑桌面窗口 */
.desktop-window {
    position: absolute;
    top: 100px;
    left: 150px;
    width: 800px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.night-mode .desktop-window {
    background: #1E293B;
    color: #E2E8F0;
}

.window-header {
    height: 40px;
    background: #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #e2e8f0;
}

.night-mode .window-header {
    background: #334155;
    border-bottom: 1px solid #475569;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.window-btn.close { background: #ff5f57; }
.window-btn.minimize { background: #ffbd2e; }
.window-btn.maximize { background: #28ca42; }

.window-content {
    height: calc(100% - 40px);
    overflow: auto;
    padding: 20px;
}

/* 桌面切换按钮 */
.desktop-toggle {
    position: fixed;
    top: 130px;
    right: 5px;
    z-index: 5001;
    width: 30px;
    height: 29px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(11px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.desktop-toggle i {
    font-size: 28px;
    color: rgb(1, 1, 1);
}

/* 平台切换按钮：从电脑桌面进入安卓平台桌面（新增按钮，原有按钮与位置均不变） */
.platform-switch {
    position: fixed;
    top: 172px;
    right: 5px;
    z-index: 5001;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3DDC84, #34A853);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-switch:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.platform-switch i {
    font-size: 18px;
    color: #ffffff;
}

/* ===== 桌面统一悬浮工具条（新增）=====
   集中放置：锁屏、夜间模式(月亮)、电脑桌面切换、安卓平台、隐藏界面、放大缩小等按钮；
   鼠标滑到右下角自动滑出，滑到右上角自动收起。
   只调整位置与外观，按钮的 id、事件、功能完全不变 */
/* ===== 主题外观（3 套，设置里切换，只改框架与按钮的配色）===== */
body.theme-classic {
    --toolbar-bg: rgba(255, 255, 255, 0.6);
    --toolbar-border: rgba(255, 255, 255, 0.4);
    --toolbar-handle-bg: linear-gradient(135deg, #667eea, #764ba2);
}

body.theme-dark-gold {
    --toolbar-bg: rgba(24, 24, 28, 0.84);
    --toolbar-border: rgba(212, 175, 55, 0.5);
    --toolbar-handle-bg: linear-gradient(135deg, #d4af37, #b8860b);
}

body.theme-mint {
    --toolbar-bg: rgba(228, 250, 243, 0.8);
    --toolbar-border: rgba(16, 185, 129, 0.45);
    --toolbar-handle-bg: linear-gradient(135deg, #34d399, #10b981);
}

/* 主题下的按钮配色 */
body.theme-dark-gold .toolbar-proxy-btn {
    background: rgba(60, 55, 40, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #f5e6b8;
}

body.theme-mint .toolbar-proxy-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ===== 框架外观（3 种，设置里切换）===== */
/* 圆形：框架大圆角，按钮全部变成正圆 */
body.toolbar-shape-round .desktop-toolbar {
    border-radius: 28px;
    padding: 11px;
    gap: 10px;
}

body.toolbar-shape-round .desktop-toolbar > *:not(.toolbar-handle) {
    border-radius: 50% !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
}

body.toolbar-shape-round .toolbar-handle {
    border-radius: 50%;
}

/* 方形：小圆角、紧凑排布 */
body.toolbar-shape-square .desktop-toolbar {
    border-radius: 8px;
    padding: 7px;
    gap: 5px;
}

body.toolbar-shape-square .desktop-toolbar > *:not(.toolbar-handle) {
    border-radius: 6px !important;
}

body.toolbar-shape-square .toolbar-handle {
    border-radius: 6px;
}

/* 玻璃透亮：更通透，强模糊 + 高光边框 */
body.toolbar-shape-glass .desktop-toolbar {
    border-radius: 22px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

body.toolbar-shape-glass .desktop-toolbar > *:not(.toolbar-handle) {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.34) !important;
}

body.toolbar-shape-glass .toolbar-handle {
    border-radius: 16px;
}

.desktop-toolbar {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 5002;
    display: flex;
    flex-direction: column-reverse; /* 把手始终在最下方，其余按钮向上排列 */
    align-items: center;
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
    /* 颜色取自主题变量，可在「设置 → 桌面按钮 → 主题外观」里切换 3 套 */
    background: var(--toolbar-bg, rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--toolbar-border, rgba(255, 255, 255, 0.4));
    max-height: 82vh;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.night-mode .desktop-toolbar {
    background: rgba(30, 41, 59, 0.62);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===== 右上角框架（第二个框架）=====
   贴在屏幕最上面一排，鼠标滑到右上角或点击把手时滑出，
    /收起状态与右下角框架共用同一套 .collapsed 规则 */
.desktop-toolbar-top {
    top: 14px;
    bottom: auto;
    flex-direction: column; /* 把手在最上方，其余按钮向下排列 */
}

/* 右上角框架里的「代理按钮」：外观与主框架按钮一致，
   点击时把动作转发给原来的按钮，因此功能完全相同 */
.toolbar-proxy-btn {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    transition: transform 0.2s ease, background 0.2s ease;
}

.toolbar-proxy-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.9);
}

.night-mode .toolbar-proxy-btn {
    background: rgba(51, 65, 85, 0.72);
}

/* 被「设置 → 桌面按钮」关闭的按钮，在右上角框架里也一起隐藏 */
.toolbar-proxy-btn.desktop-btn-hidden {
    display: none !important;
}

/* ===== 弹窗层级与手机适配 =====
   所有弹窗统一压在最上层，且各有各的层级，保证「每个弹窗独立显示、互不覆盖」 */
.modal-overlay {
    z-index: 100000 !important;
}

#locksys-mask {
    z-index: 100001 !important;
}

#locksys-unlock-tip-mask {
    z-index: 100002 !important;
}

#windowsDesktopSystem .window {
    z-index: 50000;
}

/* 手机上弹窗自适应宽度，不再超出屏幕 */
@media (max-width: 768px) {
    /* 手机 / 窄屏自适应：用 max-* 限制最大尺寸，窗口自动贴合屏幕。
       注意：这里绝对不能再写 width / height / left / top 的 !important ——
       写死位置会压过拖动代码写入的行内样式（!important 比行内样式优先级更高），
       表现就是「记事本、计算器等窗口怎么拖都一动不动」。
       改用 max-* 后既能自适应屏幕，拖动和最大化按钮也都能正常用。 */
    #windowsDesktopSystem .window {
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100vh - 130px) !important;
        left: 6px;
        top: 58px;
        transform: none !important;
    }

    .modal-content {
        width: 94% !important;
        max-width: none !important;
        max-height: 84vh !important;
    }

    .locksys-panel {
        max-width: 100% !important;
        padding: 20px !important;
    }

    /* 手机上框架收窄，避免挡住弹窗 */
    .desktop-toolbar {
        max-height: 70vh;
    }
}

/* ===== 手机 / 平板模式下按钮自动缩小 ===== */
body.compact-ui .desktop-float-btn {
    width: 44px;
    height: 44px;
    font-size: 19px;
}

body.compact-ui .desktop-toolbar > *:not(.toolbar-handle) {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
}

body.compact-ui .desktop-toolbar .toolbar-handle {
    width: 42px;
    height: 42px;
}

body.compact-ui .toolbar-proxy-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

body.compact-ui .color-swatch {
    width: 18px;
    height: 18px;
}

/* 手机下面板文字略微收紧，避免过挤 */
body[data-device-mode="mobile"] .settings-card {
    padding: 14px 14px;
}

body[data-device-mode="mobile"] .setting-item-desc {
    font-size: 11px;
}

/* ===== 设置面板排版美化：整齐、不杂乱 ===== */
/* 功能说明文字（每个按钮下面那句介绍） */
.setting-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.setting-item-text label {
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
}

.setting-item-desc {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a8f98;
    white-space: normal;
    word-break: break-word;
}

/* 说明书里的重点词（怎么开、怎么关、推荐…）用主题色标出来，一眼看到 */
.setting-item-desc b {
    font-weight: 600;
    color: #6366f1;
}

.theme-dark-gold .setting-item-desc {
    color: #a8a29e;
}

.theme-dark-gold .setting-item-desc b {
    color: #d4af37;
}

.theme-mint .setting-item-desc b {
    color: #10b981;
}

/* 设置项：上下留白更透气，鼠标划过有反馈 */
#windowsDesktopSystem .settings-card .setting-item {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.18s ease;
}

#windowsDesktopSystem .settings-card .setting-item:hover {
    background: rgba(99, 102, 241, 0.07);
}

.theme-dark-gold .settings-card .setting-item:hover,
.night-mode .settings-card .setting-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* 卡片本身：统一圆角、间距与标题分隔线 */
#windowsDesktopSystem .settings-card {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 14px;
}

#windowsDesktopSystem .settings-card .card-title {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 15px;
}

/* ===== 显示模式：按设备自动调整整体宽度 ===== */
body[data-device-mode="tablet"] #smartControlPanel .page-container,
body[data-device-mode="tablet"] #windowsDesktopSystem {
    max-width: 1024px;
    margin: 0 auto;
}

body[data-device-mode="mobile"] #smartControlPanel .page-container,
body[data-device-mode="mobile"] #windowsDesktopSystem {
    max-width: 480px;
    margin: 0 auto;
}

/* ===== 桌面提示条（点功能按钮后短暂显示，3 秒自动消失）===== */
.desktop-toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -18px);
    max-width: 80vw;
    padding: 10px 20px;
    border-radius: 14px;
    background: rgba(24, 24, 28, 0.9);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.desktop-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== 文字颜色 / 窗口背景 / 按钮动画（设置里可换）===== */
/* 桌面文字颜色：影响框架、漂浮按钮、状态栏与设置面板的文字 */
.desktop-toolbar,
.toolbar-proxy-btn,
.desktop-float-btn,
.system-status,
.settings-sidebar,
.settings-main {
    color: var(--desktop-text-color, inherit);
}

/* 窗口背景：原来是一块白的，现在可换成任意颜色或图片 */
#windowsDesktopSystem .window {
    background-color: var(--window-bg-color, #f0f0f0) !important;
    background-image: var(--window-bg-image, none) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 弹窗内容背景同样跟随设置（只在设置过窗口背景时才生效，没设置就不动原样式） */
body.has-window-bg .modal-content {
    background-color: var(--window-bg-color, #ffffff) !important;
    background-image: var(--window-bg-image, none) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 按钮动画开关 */
body.no-btn-animation .desktop-float-btn,
body.no-btn-animation .toolbar-proxy-btn,
body.no-btn-animation .floating-btn,
body.no-btn-animation .dock-icon,
body.no-btn-animation .toolbar-handle {
    animation: none !important;
}

/* 动画速度 */
body[data-anim-speed="slow"] {
    --btn-anim-duration: 3.2s;
}

body[data-anim-speed="normal"] {
    --btn-anim-duration: 2s;
}

body[data-anim-speed="fast"] {
    --btn-anim-duration: 0.9s;
}

.desktop-float-btn,
.toolbar-proxy-btn,
.floating-btn,
.dock-icon {
    animation-duration: var(--btn-anim-duration, 2s);
}

/* 设置里的圆形颜色色板 */
.color-swatch-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.color-swatch {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.active {
    border-color: #6366f1;
    transform: scale(1.15);
}

.color-swatch-custom {
    width: 26px;
    height: 22px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: none;
    cursor: pointer;
}

/* ===== 桌面总开关：被关闭的浮动元素彻底隐藏，桌面保持干净 ===== */
.desktop-element-hidden {
    display: none !important;
}

/* 桌面上原有的那组圆形按钮（➕ 🤖 ◎ 🔧 ⚙️ 👤＋ 🔍＋）：
   必须高于电脑桌面层(1000)，否则会被桌面任务栏压住、只露出半个，
   看起来就像「框架从屏幕边上漏出来一块」；
   同时低于框架(5002)和漂浮按钮层(4999)，不会挡住它们。 */
#floatContainer {
    z-index: 4997;
}

/* ===== 桌面漂浮按钮（设置里添加，圆形彩色，可拖到任意位置）===== */
.desktop-float-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4999;
    pointer-events: none; /* 空白区域不挡桌面操作，只有按钮本身可点 */
}

.desktop-float-btn {
    position: fixed;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: #ffffff;
    cursor: grab;
    pointer-events: auto;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
}

.desktop-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
}

/* 拖动中：放大、加深阴影、换成抓手光标 */
.desktop-float-btn.dragging {
    transition: none;
    cursor: grabbing;
    transform: scale(1.16);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    z-index: 99999;
}

@media (max-width: 768px) {
    .desktop-float-btn {
        width: 44px;
        height: 44px;
        font-size: 19px;
    }
}

/* ===== 拖动框架（按住把手即可把整个框架拖到屏幕任意位置）===== */
.desktop-toolbar .toolbar-handle {
    cursor: grab;
}

.desktop-toolbar.toolbar-dragging {
    transition: none;
    opacity: 0.92;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.desktop-toolbar.toolbar-dragging .toolbar-handle {
    cursor: grabbing;
}

/* 右上角框架里的分组分隔线（系统 / 应用 / 弹窗 / 工具 / 文件夹） */
.toolbar-separator {
    flex: 0 0 auto;
    width: 26px;
    height: 1px;
    margin: 3px 0;
    border-radius: 1px;
    background: rgba(0, 0, 0, 0.18);
}

.night-mode .toolbar-separator {
    background: rgba(255, 255, 255, 0.22);
}

/* 当前不可用的按钮：置灰并禁用，避免点了没反应 */
.toolbar-proxy-btn-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.toolbar-proxy-btn-disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
    .desktop-toolbar-top {
        top: 8px;
        right: 8px;
    }
}

/* 横屏 / 矮屏适配：框架自动缩小，避免按钮超出屏幕 */
@media (orientation: landscape) and (max-height: 560px) {
    .desktop-toolbar {
        max-height: 86vh;
        gap: 5px;
        padding: 6px;
    }

    .desktop-toolbar .toolbar-proxy-btn,
    .desktop-toolbar > *:not(.toolbar-handle) {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    .toolbar-proxy-btn {
        font-size: 15px;
    }

    .desktop-toolbar .toolbar-handle {
        width: 38px;
        height: 38px;
    }

    .toolbar-separator {
        margin: 2px 0;
    }
}

/* 收起状态：只保留把手 */
.desktop-toolbar.collapsed {
    padding: 6px;
    gap: 0;
}

.desktop-toolbar.collapsed > *:not(.toolbar-handle) {
    display: none !important;
}

/* 锁屏按钮放进框架后，收起状态下也保持可见：
   这样不用先滑开框架就能直接点开密码 / 图案解锁界面 */
.desktop-toolbar.collapsed > #locksys-single-btn {
    display: flex !important;
}

/* 在「设置 → 桌面按钮」里被关闭的按钮，从桌面和工具条上一起隐藏 */
.desktop-btn-hidden {
    display: none !important;
}

/* ===== 背景照片层（.bookmark-bg）默认隐藏 =====
   它是页面里那张"全屏背景照片"（.img-bg，默认雪景图，可在「图片设置」换）。
   问题：.page-container 带 backdrop-filter，会让这张"全屏照片"以 .page-container 为基准，
   而 .page-container 很矮，于是照片被压成"屏幕顶部一条横带"，看起来就像漏出来一张照片。
   这里在 CSS 层就直接默认关掉；想在智能面板里显示，去
   「设置 → 桌面按钮 → 桌面总开关 → 显示 背景照片（那一整张图片）」打开即可
   （打开时 6.js 会给 body 加上 show-bookmark-bg）。 */
body:not(.show-bookmark-bg) .bookmark-bg {
    display: none !important;
}

/* ===== 智能面板外层（.page-container）默认隐藏 =====
   它是"桌面顶部那条白色横条"的来源：样式表里给它设了 background-color: rgb(255,255,255)（纯白不透明）。
   它里面装着背景照片、天气栏、搜索框、网站导航网格，所以把它整块关掉，桌面才真正干净。
   想在页面上用里面某一项，去「设置 → 桌面按钮 → 桌面总开关」打开对应开关，
   6.js 会自动把这一层一起显示出来（body 上会加 show-page-container）。 */
body:not(.show-page-container) .page-container {
    display: none !important;
}

/* 同上：桌面模式下，页面里那个「导航网格」也一律不显示 ——
   它的彩色方块和按钮图片会直接铺在桌面上（就是你点 ☰ 之后"又冒出来"的那些图片）。
   需要导航就点 ☰，会打开独立的「KZADJ AI 智能导航」浮层（自带深色背景，不碰桌面）。 */
body:not(.show-page-container) .nav-grid {
    display: none !important;
}

/* 导航浮层提到框架（5002）与漂浮按钮之上，确保它是"盖在最上层"的弹层 */
.navigation-menu {
    z-index: 8000;
}

/* 把手：点击或滑动到右下角即可展开 / 收起 */
.toolbar-handle {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--toolbar-handle-bg, linear-gradient(135deg, #667eea, #764ba2));
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toolbar-handle:hover {
    transform: scale(1.07);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.55);
}

.toolbar-handle i {
    font-size: 20px;
    color: #ffffff;
}

/* 工具条内的按钮统一尺寸；原本的 fixed 定位在这里被覆盖，不影响按钮自身功能 */
.desktop-toolbar > *:not(.toolbar-handle) {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform 0.2s ease, background 0.2s ease;
}

.desktop-toolbar > *:not(.toolbar-handle):hover {
    transform: scale(1.08) !important;
    background: rgba(255, 255, 255, 0.8);
}

.desktop-toolbar > *:not(.toolbar-handle) i {
    font-size: 19px !important;
}

/* 缩放控制（- / +）在工具条里竖排，隐藏百分比以免占位过大 */
.desktop-toolbar .zoom-controls {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    flex-direction: column !important;
}

.desktop-toolbar .zoom-controls .zoom-btn {
    width: 38px !important;
    height: 32px !important;
    min-width: 38px !important;
    border-radius: 9px !important;
}

.desktop-toolbar .zoom-controls .zoom-display {
    display: none !important;
}

/* 小屏时工具条自动缩小，避免占满屏幕 */
@media (max-width: 768px) {
    .desktop-toolbar {
        right: 8px;
        bottom: 8px;
        gap: 6px;
        padding: 7px;
        max-height: 76vh;
    }

    .desktop-toolbar > *:not(.toolbar-handle) {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .toolbar-handle {
        width: 42px;
        height: 42px;
    }
}

/* 隐藏/显示桌面 */
.computer-desktop.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== 电脑桌面显示时，把「智能面板」的遗留图层彻底藏起来 =====
   这些元素原本被不透明的桌面盖着；为了让动态背景能透出来，
   电脑桌面的背景改成了透明，于是它们会从桌面里透出来 ——
   最明显的就是屏幕顶部那一条深色横带：那是 .navbar 天气栏
   （Bootstrap 的 fixed-top，层级 1030，直接压在桌面之上），
   另外还有左上角那根竖条 .control-bar（顶部控制栏）。
   只要电脑桌面处于显示状态，这里就一律隐藏，保证桌面干干净净；
   切回智能面板后，仍然按「设置 → 桌面按钮 → 桌面总开关」里的勾选显示。
   body 上的 computer-desktop-visible 由 6.js 实时同步。 */
body.computer-desktop-visible .navbar,
body.computer-desktop-visible .control-bar,
body.computer-desktop-visible .nav-grid,
body.computer-desktop-visible .header-big,
body.computer-desktop-visible .search-box,
body.computer-desktop-visible .system-status,
body.computer-desktop-visible .center-buttons-container,
body.computer-desktop-visible .mega-new-door-frame,
body.computer-desktop-visible .main-footer,
body.computer-desktop-visible .bookmark-bg,
body.computer-desktop-visible #floatContainer {
    display: none !important;
}

/* 上面那套规则再配一份「纯 CSS 版」。
   用 :has() 直接判断桌面是否显示，完全不依赖脚本 ——
   即使 6.js 的初始化被别的脚本报错打断，也一定生效。 */
body:has(.computer-desktop:not(.hidden)) .navbar,
body:has(.computer-desktop:not(.hidden)) .bookmark-bg,
body:has(.computer-desktop:not(.hidden)) #img-bg,
body:has(.computer-desktop:not(.hidden)) .gradient-linear,
body:has(.computer-desktop:not(.hidden)) .control-bar,
body:has(.computer-desktop:not(.hidden)) .nav-grid,
body:has(.computer-desktop:not(.hidden)) .header-big,
body:has(.computer-desktop:not(.hidden)) .search-box,
body:has(.computer-desktop:not(.hidden)) .system-status,
body:has(.computer-desktop:not(.hidden)) .center-buttons-container,
body:has(.computer-desktop:not(.hidden)) .mega-new-door-frame,
body:has(.computer-desktop:not(.hidden)) .main-footer,
body:has(.computer-desktop:not(.hidden)) #floatContainer {
    display: none !important;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .computer-desktop .desktop-icons {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 20px;
    }
    
    .desktop-icon {
        width: 90px;
        height: 90px;
    }
    
    .desktop-icon i {
        font-size: 36px;
    }
    
    .desktop-dock {
        height: 70px;
        bottom: 20px;
    }
    
    .dock-icon {
        width: 55px;
        height: 55px;
    }
    
    .dock-icon i {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .computer-desktop .desktop-icons {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 14px;
        padding: 1px;
    }
    
    .desktop-icon {
        width: 66px;
        height: 80px;
    }
    
    .desktop-icon i {
        font-size: 32px;
    }
    
    .desktop-icon span {
        font-size: 12px;
        max-width: 70px;
    }
    
    .desktop-dock {
        height: 65px;
        bottom: 15px;
        gap: 10px;
        padding: 0 15px;
    }
    
    .dock-icon {
        width: 50px;
        height: 50px;
    }
    
    .dock-icon i {
        font-size: 20px;
    }
}

/* 保持所有原有样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 输入与文本区域保留可选中能力 */
input,
textarea,
select,
[contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC',
        sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease;
    touch-action: manipulation;
}

body.night-mode {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #E2E8F0;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.541);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.689);
    transition: all 0.3s ease;
}

.night-mode .glass-effect {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.folded-corner {
    position: relative;
    overflow: hidden;
}

.folded-corner::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.3) 50%);
    border-radius: 0 0 0 6px;
    box-shadow: -2px -2px 5px rgba(0,0,0,0.1);
}

.night-mode .folded-corner::after {
    background: linear-gradient(135deg, transparent 50%, rgba(30, 41, 59, 0.3) 50%);
}

.category-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(17, 24, 39, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.glow-effect {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.ai-wave {
    position: relative;
    overflow: hidden;
}

.ai-wave::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: aiWave 2s linear infinite;
}

.night-mode .ai-wave::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

@keyframes aiWave {
    0% { left: -150%; }
    100% { left: 150%; }
}

@keyframes colorChange {
    0% { background-color: #10B981; }
    25% { background-color: #0EA5E9; }
    50% { background-color: #EC4899; }
    75% { background-color: #F59E0B; }
    100% { background-color: #10B981; }
}

.link-item {
    position: absolute;
    transition: all 0.5s ease-out;
    z-index: 20;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.link-item:hover, .link-item:active {
    transform: scale(1.2) !important;
    z-index: 30;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#floatContainer {
    position: fixed;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-btn {
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    touch-action: manipulation;
}

.tooltip {
    position: absolute;
    background-color: rgba(17, 24, 39, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100px);
    padding: 12px 20px;
    border-radius: 10px;
    background-color: rgba(17, 24, 39, 0.9);
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
    text-align: center;
    max-width: 80%;
}

.notification.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.function-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.night-mode .function-panel {
    background-color: #1E293B;
    color: #E2E8F0;
}

.function-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.night-mode .panel-header {
    border-bottom: 1px solid #334155;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.night-mode .panel-title {
    color: #E2E8F0;
}

.close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6B7280;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.calculator-display {
    background-color: #f3f4f6;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: right;
    font-size: 28px;
    min-height: 70px;
}

.night-mode .calculator-display {
    background-color: #334155;
    color: #E2E8F0;
}

.calculator-history {
    height: 40px;
    text-align: right;
    color: #6B7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.night-mode .calculator-history {
    color: #94A3B8;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .calc-btn {
    background-color: #334155;
    color: #E2E8F0;
}

.calc-btn:hover {
    background-color: #efefef;
}

.night-mode .calc-btn:hover {
    background-color: #475569;
}

.calc-btn.operator {
    background-color: #e0e7ff;
    color: #4F46E5;
}

.night-mode .calc-btn.operator {
    background-color: #4F46E5;
    color: #E0E7FF;
}

.calc-btn.clear {
    background-color: #fee2e2;
    color: #dc2626;
}

.night-mode .calc-btn.clear {
    background-color: #dc2626;
    color: #FEE2E2;
}

.notes-content {
    width: 100%;
    min-height: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    resize: vertical;
}

.night-mode .notes-content {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.save-notes {
    background-color: #4F46E5;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 420px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    background-color: #f9fafb;
    -webkit-overflow-scrolling: touch;
}

.night-mode .ai-chat-messages {
    background-color: #334155;
    border-color: #475569;
}

.ai-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    word-break: break-word;
}

.ai-message.user {
    background-color: #e0e7ff;
    margin-left: auto;
    text-align: right;
}

.night-mode .ai-message.user {
    background-color: #4F46E5;
    color: #E0E7FF;
}

.ai-message.bot {
    background-color: #d1fae5;
}

.night-mode .ai-message.bot {
    background-color: #10B981;
    color: #D1FAE5;
}

.ai-input-group {
    display: flex;
    gap: 12px;
}

.ai-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    min-height: 44px;
}

.night-mode .ai-input {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.ai-send-btn {
    background-color: #4F46E5;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 10px 18px;
    cursor: pointer;
    min-width: 60px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.ai-search-container {
    margin-top: 18px;
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
}

.night-mode .ai-search-container {
    border-top: 1px solid #475569;
}

.search-results {
    margin-top: 12px;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.night-mode .search-result-item {
    border-bottom: 1px solid #475569;
}

.search-result-item:hover {
    background-color: #f3f4f6;
}

.night-mode .search-result-item:hover {
    background-color: #475569;
}

.ai-mode-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.mode-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background-color: white;
    cursor: pointer;
    font-size: 13px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .mode-btn {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.mode-btn.active {
    background-color: #4F46E5;
    color: white;
}

.mode-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.mode-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.ai-feature-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .ai-feature-btn {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.ai-feature-btn:hover {
    background-color: #f3f4f6;
}

.night-mode .ai-feature-btn:hover {
    background-color: #475569;
}

.ai-suggestion {
    background-color: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 10px;
    margin: 10px 0;
    border-radius: 6px;
}

.night-mode .ai-suggestion {
    background-color: #1E3A8A;
    border-left: 4px solid #3B82F6;
}

.business-opportunities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
    display: none; /* 隐藏商机分析功能 */
}

.business-card {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.night-mode .business-card {
    background-color: #334155;
    border-color: #475569;
}

.business-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.business-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.business-card p {
    font-size: 13px;
    color: #6B7280;
}

.night-mode .business-card p {
    color: #94A3B8;
}

.ai-business-insights {
    margin-top: 18px;
    border-top: 2px solid #10B981;
    padding-top: 18px;
    display: none; /* 隐藏商业洞察功能 */
}

.insight-item {
    padding: 12px;
    border-left: 4px solid #10B981;
    background-color: #f0fdf4;
    margin-bottom: 12px;
    border-radius: 6px;
}

.night-mode .insight-item {
    background-color: #064E3B;
    border-left: 4px solid #10B981;
}

.hidden {
    display: none;
}

.color-options {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option.active {
    border-color: #000;
}

.night-mode .color-option.active {
    border-color: #fff;
}

.voice-controls {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 18px 0;
}

.voice-btn {
    padding: 12px 18px;
    border-radius: 24px;
    border: none;
    background-color: #4F46E5;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: none !important;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.voice-btn.listening {
    background-color: #EF4444;
    animation: pulse 1s infinite;
}

.ai-music-container {
    margin-top: 18px;
}

.music-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.music-btn {
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.night-mode .music-btn {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.music-btn.play {
    background-color: #10B981;
    color: white;
}

.music-genres {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.music-genre {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
}

.night-mode .music-genre {
    background-color: #334155;
    border-color: #475569;
}

.music-genre:hover {
    background-color: #f3f4f6;
}

.night-mode .music-genre:hover {
    background-color: #475569;
}

.music-genre.active {
    background-color: #e0e7ff;
    border-color: #4F46E5;
}

.night-mode .music-genre.active {
    background-color: #4F46E5;
    border-color: #6366F1;
}

.ai-color-changing {
    animation: colorChange 10s infinite;
}

.ai-drawing-container {
    margin-top: 18px;
    text-align: center;
}

.drawing-canvas {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin: 12px 0;
    background-color: #f9fafb;
    width: 100%;
    height: 200px;
}

.night-mode .drawing-canvas {
    background-color: #334155;
    border-color: #475569;
}

.drawing-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.drawing-btn {
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background-color: white;
    cursor: pointer;
}

.night-mode .drawing-btn {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.drawing-color-picker {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 12px 0;
}

.drawing-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

.navigation-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.navigation-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.night-mode .nav-content {
    background: #1E293B;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

.night-mode .nav-header {
    border-bottom: 1px solid #334155;
}

.nav-search {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    margin-bottom: 18px;
}

.night-mode .nav-search {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.nav-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.nav-category {
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.nav-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.nav-items .nav-item {
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .nav-items .nav-item {
    background-color: #334155;
}

.nav-items .nav-item:hover {
    background-color: #f3f4f6;
}

.night-mode .nav-items .nav-item:hover {
    background-color: #475569;
}

.nav-items .nav-item i {
    font-size: 22px;
    margin-bottom: 6px;
}

.nav-items .nav-item span {
    font-size: 13px;
}

.deepseek-chat {
    background: linear-gradient(135deg, #7E3AF2 0%, #5E2CA5 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 18px;
    text-align: center;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.doubao-chat {
    background: linear-gradient(135deg, #1C64F2 0%, #1A56DB 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.kzadj-chat {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.yuanbao-chat {
    background: linear-gradient(135deg, #FF9500 0%, #FFB800 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.wildswordsman-chat {
    background: linear-gradient(135deg, #A78BFA 0%, #C084FC 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.health-monitor {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 18px;
    animation: none !important;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    background-color: #f9fafb;
}

.night-mode .health-item {
    background-color: #334155;
}

.health-progress {
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 6px;
}

.night-mode .health-progress {
    background-color: #475569;
}

.health-progress-bar {
    height: 100%;
    background-color: #10B981;
    border-radius: 5px;
}

.finance-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 18px;
}

.finance-card {
    padding: 14px;
    border-radius: 10px;
    background-color: #f9fafb;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.night-mode .finance-card {
    background-color: #334155;
}

.finance-card h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.finance-card p {
    font-size: 17px;
    font-weight: 600;
}

.learning-assistant {
    margin-top: 18px;
    position: relative;
}

.learning-topic {
    padding: 12px;
    border-radius: 10px;
    background-color: #f0f9ff;
    margin-bottom: 12px;
    cursor: pointer;
}

.night-mode .learning-topic {
    background-color: #1E3A8A;
}

.travel-planner {
    margin-top: 18px;
    position: relative;
}

.destination-card {
    padding: 12px;
    border-radius: 10px;
    background-color: #f0fdf4;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.night-mode .destination-card {
    background-color: #064E3B;
}

.ai-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-selector-btn {
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .ai-selector-btn {
    background-color: #334155;
    border-color: #475569;
    color: #E2E8F0;
}

.ai-selector-btn.active {
    background-color: #4F46E5;
    color: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.feature-card {
    padding: 18px;
    border-radius: 12px;
    background-color: #f9fafb;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.night-mode .feature-card {
    background-color: #334155;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 26px;
    margin-bottom: 10px;
    color: #4F46E5;
}

.feature-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1F2937;
}

.night-mode .feature-card h4 {
    color: #E2E8F0;
}

.feature-card p {
    font-size: 13px;
    color: #6B7280;
}

.night-mode .feature-card p {
    color: #94A3B8;
}

.ai-response-area {
    margin-top: 18px;
    padding: 18px;
    border-radius: 12px;
    background-color: #f9fafb;
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.night-mode .ai-response-area {
    background-color: #334155;
}

.system-status {
    position: fixed;
    top: 2px;
    right: 750px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    align-items: stretch;
    flex-direction: row-reverse;
}

.status-indicator {
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 13px;
    background-color: rgb(0 0 0 / 17%);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.status-indicator.updating {
    background-color: #F59E0B;
    animation: pulse 1s infinite;
}

.status-indicator.updated {
    background-color: #10B981;
}

.status-indicator.error {
    background-color: #EF4444;
}

.upgrade-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: white;
    border-radius: 14px;
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
    padding: 18px;
    max-width: 320px;
    z-index: 0;
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.3s ease;
}

.night-mode .upgrade-panel {
    background-color: #1E293B;
    color: #E2E8F0;
}

.upgrade-panel.show {
    transform: translateY(0);
    opacity: 1;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.upgrade-title {
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
}

.night-mode .upgrade-title {
    color: #E2E8F0;
}

.upgrade-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6B7280;
}

.night-mode .upgrade-close {
    color: #94A3B8;
}

.upgrade-content {
    margin-bottom: 18px;
    font-size: 15px;
    color: #4B5563;
    animation: none !important;
}

.night-mode .upgrade-content {
    color: #CBD5E1;
}

.upgrade-progress {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.night-mode .upgrade-progress {
    background-color: #475569;
}

.upgrade-progress-bar {
    height: 100%;
    background-color: #10B981;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.upgrade-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background-color: #4F46E5;
    color: white;
    cursor: pointer;
}

.ai-enhanced {
    border: 3px solid #10B981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.ai-thinking {
    position: relative;
    overflow: hidden;
}

.ai-thinking::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: aiWave 1.5s infinite;
}

.night-mode .ai-thinking::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.storage-indicator {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.night-mode .storage-indicator {
    background-color: #475569;
}

.storage-used {
    height: 100%;
    background-color: #10B981;
    border-radius: 3px;
    width: 65%;
}

.theme-toggle {
    position: fixed;
    top: 660px;
    left: 10px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.night-mode .theme-toggle {
    background-color: #334155;
}

.animation-control {
    position: fixed;
    top: 600px;
    left: 10px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.night-mode .animation-control {
    background-color: #334155;
}

/* 居中功能按钮容器 */
.center-buttons-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    z-index: 1000;
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
}

.center-buttons-container.active {
    pointer-events: auto;
}

/* 新增：加好友面板样式 */
.friend-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.night-mode .friend-panel {
    background-color: #1E293B;
    color: #E2E8F0;
}

.friend-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.friend-code {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    letter-spacing: 2px;
}

.night-mode .friend-code {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

.friend-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.friend-action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.copy-btn {
    background-color: #4F46E5;
    color: white;
}

.share-btn {
    background-color: #10B981;
    color: white;
}

.qrcode-container {
    text-align: center;
    margin: 20px 0;
}

.qrcode {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background-color: #f4f8ffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.night-mode .qrcode {
    background-color: #7398ccff;
}

/* 新增：搜索引擎升级面板样式 */
.search-upgrade-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: rgb(193, 214, 210);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgb(255, 255, 255);
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.night-mode .search-upgrade-panel {
    background-color: #1E293B;
    color: #E2E8F0;
}

.search-upgrade-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.quick-access-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-access-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.search-history-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.night-mode .search-history-item {
    border-bottom: 1px solid #475569;
}

.search-history-item:hover {
    background-color: #f3f4f6;
}

.night-mode .search-history-item:hover {
    background-color: #475569;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    #floatContainer {
        padding: 0 15px;
        gap: 10px;
        bottom: 15px;
    }
    
    .floating-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 18px !important;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .system-status {
        top: px;
        right: 150px;
    }
    
    .status-indicator {
        font-size: 1px;
        padding: 4px 1px;
    }
    
    .upgrade-panel {
        bottom: 99px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .theme-toggle {
        top: 300px;
        left: 3px;
        width: 40px;
        height: 40px;
    }
    
    .animation-control {
        top: 390px;
        left: 3px;
        width: 40px;
        height: 40px;
    }
    
    .ai-mode-toggle {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mode-btn {
        border-radius: 6px !important;
        margin-bottom: 4px;
    }
    
    .voice-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .ai-selector {
        flex-direction: column;
        gap: 6px;
    }
    
    .center-buttons-container {
        gap: 15px;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    #floatContainer {
        gap: 16px;
        padding: 0 80px;
        bottom: 10px;
    }
    
    .floating-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 16px !important;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-categories {
        grid-template-columns: 1fr;
    }
    
    .ai-selector {
        flex-direction: column;
        gap: 6px;
    }
    
    .function-panel {
        padding: 20px;
    }
    
    .calculator-buttons {
        gap: 8px;
    }
    
    .calc-btn {
        padding: 12px;
        font-size: 16px;
    }
    
    .center-buttons-container {
        gap: 12px;
    }
}

/* 修复漂浮按钮点击卡顿问题 */
.floating-btn {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 优化动画性能 */
.pulse-slow {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* 防止页面加载时的卡顿 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化渲染性能 */
.glass-effect {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    #floatContainer {
        bottom: 5px;
        gap: 5px;
    }
    
    .floating-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
    }
    
    .function-panel {
        max-height: 90vh;
        padding: 15px;
    }
    
    .ai-chat-container {
        height: 300px;
    }
    
    .system-status {
        flex-direction: row;
        top: 5px;
        right: 5px;
    }
    
    .status-indicator {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* 防止iOS Safari的弹性滚动 */
body, html {
    overscroll-behavior: none;
}

/* 修复iOS上的点击延迟 */
a, button, .floating-btn, .nav-items .nav-item, .feature-card, .ai-feature-btn {
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 添加所有自定义颜色的CSS规则 */
.bg-search { background-color: #06B6D4; }
.bg-shopping { background-color: #EC4899; }
.bg-social { background-color: #8B5CF6; }
.bg-video { background-color: #F59E0B; }
.bg-news { background-color: #10B981; }
.bg-tools { background-color: #EF4444; }
.bg-work { background-color: #6366F1; }
.bg-travel { background-color: #0EA5E9; }
.bg-health { background-color: #14B8A6; }
.bg-finance { background-color: #F59E0B; }
.bg-education { background-color: #8B5CF6; }
.bg-entertainment { background-color: #EC4899; }
.bg-productivity { background-color: #8B5CF6; }
.bg-lifestyle { background-color: #14B8A6; }
.bg-deepseek { background-color: #7E3AF2; }
.bg-doubao { background-color: #1C64F2; }
.bg-kzadj { background-color: #FF6B6B; }
.bg-system { background-color: #8B5CF6; }
.bg-upgrade { background-color: #10B981; }
.bg-yuanbao { background-color: #FF9500; }
.bg-wildswordsman { background-color: #A78BFA; }
.bg-wechat { background-color: #07C160; }
.bg-qq { background-color: #12B7F5; }
.bg-douyin { background-color: #000000; }
.bg-kuaishou { background-color: #FF5000; }
.bg-pinduoduo { background-color: #E42E2C; }
.bg-suning { background-color: #0083CF; }
.bg-meituan { background-color: #FFC300; }
.bg-eleme { background-color: #009EFF; }
.bg-didi { background-color: #FF7A00; }
.bg-tencent_news { background-color: #12B7F5; }
.bg-music { background-color: #E60026; }
.bg-qqmusic { background-color: #31C27C; }
.bg-douban { background-color: #2E963D; }
.bg-zhihu { background-color: #0084FF; }
.bg-tieba { background-color: #3385FF; }
.bg-youtube { background-color: #FF0000; }
.bg-stackoverflow { background-color: #F48024; }
.bg-iqiyi { background-color: #00B0FF; }
.bg-tencent_video { background-color: #12B7F5; }
.bg-youku { background-color: #00B0F0; }
.bg-ctrip { background-color: #1BA9EE; }
.bg-qunar { background-color: #1BA9EE; }
.bg-mafengwo { background-color: #FF6A00; }
.bg-custom { background-color: #6366F1; }

/* 文字颜色 */
.text-search { color: #06B6D4; }
.text-shopping { color: #EC4899; }
.text-social { color: #8B5CF6; }
.text-video { color: #F59E0B; }
.text-news { color: #10B981; }
.text-tools { color: #EF4444; }
.text-work { color: #6366F1; }
.text-travel { color: #0EA5E9; }
.text-health { color: #14B8A6; }
.text-finance { color: #F59E0B; }
.text-education { color: #8B5CF6; }
.text-entertainment { color: #EC4899; }
.text-productivity { color: #8B5CF6; }
.text-lifestyle { color: #14B8A6; }
.text-deepseek { color: #7E3AF2; }
.text-doubao { color: #1C64F2; }
.text-kzadj { color: #FF6B6B; }
.text-system { color: #8B5CF6; }
.text-upgrade { color: #10B981; }
.text-yuanbao { color: #FF9500; }
.text-wildswordsman { color: #A78BFA; }
.text-wechat { color: #07C160; }
.text-qq { color: #12B7F5; }
.text-douyin { color: #000000; }
.text-kuaishou { color: #FF5000; }
.text-pinduoduo { color: #E42E2C; }
.text-suning { color: #0083CF; }
.text-meituan { color: #FFC300; }
.text-eleme { color: #009EFF; }
.text-didi { color: #FF7A00; }
.text-tencent_news { color: #12B7F5; }
.text-music { color: #E60026; }
.text-qqmusic { color: #31C27C; }
.text-douban { color: #2E963D; }
.text-zhihu { color: #0084FF; }
.text-tieba { color: #3385FF; }
.text-youtube { color: #FF0000; }
.text-stackoverflow { color: #F48024; }
.text-iqiyi { color: #00B0FF; }
.text-tencent_video { color: #12B7F5; }
.text-youku { color: #00B0F0; }
.text-ctrip { color: #1BA9EE; }
.text-qunar { color: #1BA9EE; }
.text-mafengwo { color: #FF6A00; }

/* AI颜色 */
.bg-ai_primary { background-color: #10B981; }
.bg-ai_secondary { background-color: #0EA5E9; }
.bg-ai_accent { background-color: #F59E0B; }

/* 夜间模式下的文本颜色调整 */
.night-mode .text-search,
.night-mode .text-shopping,
.night-mode .text-social,
.night-mode .text-video,
.night-mode .text-news,
.night-mode .text-tools,
.night-mode .text-work,
.night-mode .text-travel,
.night-mode .text-health,
.night-mode .text-finance,
.night-mode .text-education,
.night-mode .text-entertainment,
.night-mode .text-productivity,
.night-mode .text-lifestyle,
.night-mode .text-deepseek,
.night-mode .text-doubao,
.night-mode .text-kzadj,
.night-mode .text-system,
.night-mode .text-upgrade,
.night-mode .text-yuanbao,
.night-mode .text-wildswordsman,
.night-mode .text-wechat,
.night-mode .text-qq,
.night-mode .text-douyin,
.night-mode .text-kuaishou,
.night-mode .text-pinduoduo,
.night-mode .text-suning,
.night-mode .text-meituan,
.night-mode .text-eleme,
.night-mode .text-didi,
.night-mode .text-tencent_news,
.night-mode .text-music,
.night-mode .text-qqmusic,
.night-mode .text-douban,
.night-mode .text-zhihu,
.night-mode .text-tieba,
.night-mode .text-youtube,
.night-mode .text-stackoverflow,
.night-mode .text-iqiyi,
.night-mode .text-tencent_video,
.night-mode .text-youku,
.night-mode .text-ctrip,
.night-mode .text-qunar,
.night-mode .text-mafengwo {
    color: white;
}

/* ==========================================================================
   框架特效 / 按钮显示类型 / 背景特效 / 流畅模式
   （设置 → 桌面按钮；由 6.js 的 applyLookAndFeel() 在 body 上挂类）
   所有动效只用 transform / opacity / background-position / box-shadow，
   不触发布局重排，保证桌面流畅不卡顿。
   ========================================================================== */

/* ---------- 1. 特效强度：统一用 --fx-speed 控制快慢 ---------- */
.desktop-toolbar {
    --fx-speed: 1;
}

body.toolbar-fx-level-light .desktop-toolbar {
    --fx-speed: 1.7;
}

body.toolbar-fx-level-strong .desktop-toolbar {
    --fx-speed: 0.55;
}

/* ---------- 2. 流光扫过 ---------- */
@keyframes toolbar-fx-flow-kf {
    0% {
        background-position: 130% 0;
    }
    100% {
        background-position: -130% 0;
    }
}

body.toolbar-fx-flow .desktop-toolbar {
    background-image: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    background-size: 240% 100%;
    background-repeat: no-repeat;
    animation: toolbar-fx-flow-kf calc(3.6s * var(--fx-speed, 1)) linear infinite;
}

/* ---------- 3. 轻轻漂浮 ---------- */
@keyframes toolbar-fx-float-kf {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

body.toolbar-fx-float .desktop-toolbar {
    animation: toolbar-fx-float-kf calc(4.4s * var(--fx-speed, 1)) ease-in-out infinite;
}

/* 拖动时不要和漂浮动画打架 */
body.toolbar-fx-float .desktop-toolbar.toolbar-dragging {
    animation: none;
}

/* ---------- 4. 呼吸发光 ---------- */
@keyframes toolbar-fx-glow-kf {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(102, 126, 234, 0);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 0 24px 7px rgba(102, 126, 234, 0.55);
    }
}

body.toolbar-fx-glow .desktop-toolbar {
    animation: toolbar-fx-glow-kf calc(3s * var(--fx-speed, 1)) ease-in-out infinite;
}

/* ---------- 5. 彩虹描边 ---------- */
@keyframes toolbar-fx-rainbow-kf {
    0% {
        border-color: #ff6b6b;
    }
    25% {
        border-color: #fbbf24;
    }
    50% {
        border-color: #34d399;
    }
    75% {
        border-color: #60a5fa;
    }
    100% {
        border-color: #a855f7;
    }
}

body.toolbar-fx-rainbow .desktop-toolbar {
    border-width: 2px;
    animation: toolbar-fx-rainbow-kf calc(7s * var(--fx-speed, 1)) linear infinite;
}

body.toolbar-fx-rainbow .toolbar-handle {
    animation: toolbar-fx-rainbow-kf calc(7s * var(--fx-speed, 1)) linear infinite;
}

/* ---------- 6. 悬浮放大 ---------- */
body.toolbar-fx-hover .desktop-toolbar {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.toolbar-fx-hover .desktop-toolbar:hover {
    transform: translateY(-4px) scale(1.035);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

body.toolbar-fx-hover .desktop-toolbar.toolbar-dragging:hover {
    transform: none;
}

/* ---------- 7. 按钮显示类型：横排条 ---------- */
body.toolbar-layout-row .desktop-toolbar {
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: center;
    max-width: min(94vw, 640px);
    max-height: 40vh;
}

/* ---------- 8. 按钮显示类型：网格方格 ---------- */
body.toolbar-layout-grid .desktop-toolbar {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    align-items: center;
    max-width: min(94vw, 420px);
}

body.toolbar-layout-grid .desktop-toolbar .toolbar-handle {
    grid-column: 1 / -1;
}

/* ---------- 9. 按钮显示类型：斜排阶梯 ---------- */
body.toolbar-layout-stair .desktop-toolbar {
    gap: 6px;
}

body.toolbar-layout-stair .desktop-toolbar > *:not(.toolbar-handle) {
    transform: translateX(0);
}

body.toolbar-layout-stair .desktop-toolbar > *:nth-child(even) {
    transform: translateX(12px);
}

body.toolbar-layout-stair .desktop-toolbar > *:nth-child(3n) {
    transform: translateX(24px);
}

body.toolbar-layout-stair .desktop-toolbar > *:nth-child(4n) {
    transform: translateX(34px);
}

/* ---------- 10. 背景特效层（叠加在动态背景之上、桌面内容之下）---------- */
.desktop-fx-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.bg-fx-sweep .desktop-fx-layer,
body.bg-fx-stars .desktop-fx-layer,
body.bg-fx-aurora .desktop-fx-layer,
body.bg-fx-pulse .desktop-fx-layer {
    opacity: 1;
}

/* 流光扫描 */
@keyframes desktop-fx-sweep-kf {
    0% {
        background-position: 140% 0;
    }
    100% {
        background-position: -140% 0;
    }
}

body.bg-fx-sweep .desktop-fx-layer {
    background-image: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 38%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0) 62%
    );
    background-size: 260% 100%;
    background-repeat: no-repeat;
    animation: desktop-fx-sweep-kf 7s linear infinite;
}

/* 星光闪烁 */
@keyframes desktop-fx-twinkle-kf {
    from {
        opacity: 0.35;
    }
    to {
        opacity: 1;
    }
}

body.bg-fx-stars .desktop-fx-layer {
    background-image:
        radial-gradient(2px 2px at 8% 18%, rgba(255, 255, 255, 0.95), transparent 60%),
        radial-gradient(1.6px 1.6px at 22% 62%, rgba(255, 255, 255, 0.85), transparent 60%),
        radial-gradient(1.8px 1.8px at 36% 30%, rgba(255, 255, 255, 0.9), transparent 60%),
        radial-gradient(1.4px 1.4px at 48% 78%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(2px 2px at 61% 22%, rgba(255, 255, 255, 0.95), transparent 60%),
        radial-gradient(1.6px 1.6px at 74% 58%, rgba(255, 255, 255, 0.85), transparent 60%),
        radial-gradient(1.8px 1.8px at 88% 34%, rgba(255, 255, 255, 0.9), transparent 60%),
        radial-gradient(1.4px 1.4px at 93% 76%, rgba(255, 255, 255, 0.8), transparent 60%);
    animation: desktop-fx-twinkle-kf 3.4s ease-in-out infinite alternate;
}

/* 极光流动 */
@keyframes desktop-fx-aurora-kf {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

body.bg-fx-aurora .desktop-fx-layer {
    background-image: linear-gradient(
        120deg,
        rgba(56, 189, 248, 0.3),
        rgba(168, 85, 247, 0.28),
        rgba(52, 211, 153, 0.28),
        rgba(56, 189, 248, 0.3)
    );
    background-size: 320% 320%;
    animation: desktop-fx-aurora-kf 18s ease-in-out infinite;
}

/* 呼吸渐变 */
@keyframes desktop-fx-pulse-kf {
    0%, 100% {
        opacity: 0.25;
        transform: scale(1);
    }
    50% {
        opacity: 0.75;
        transform: scale(1.08);
    }
}

body.bg-fx-pulse .desktop-fx-layer {
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 68%);
    animation: desktop-fx-pulse-kf 6.5s ease-in-out infinite;
}

/* ---------- 11. 流畅模式：关掉最耗性能的毛玻璃与装饰动效 ---------- */
body.smooth-mode .desktop-toolbar,
body.smooth-mode .toolbar-proxy-btn,
body.smooth-mode .toolbar-handle,
body.smooth-mode .modal-content,
body.smooth-mode .panel-overlay,
body.smooth-mode .navigation-menu,
body.smooth-mode .nav-content,
body.smooth-mode .page-container,
body.smooth-mode .desktop-float-btn,
body.smooth-mode .desktop-taskbar,
body.smooth-mode .window {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.smooth-mode .desktop-toolbar,
body.smooth-mode .toolbar-handle,
body.smooth-mode .toolbar-proxy-btn,
body.smooth-mode .desktop-float-btn {
    animation: none !important;
    transition: none !important;
}

body.smooth-mode .desktop-fx-layer,
body.smooth-mode .desktop-toolbar::after {
    display: none !important;
}

/* ---------- 12. AI 助手扩展：把原来写死 display:none 的两块功能放出来 ----------
   这两块在样式表里一直是隐藏的（商机分析 .business-opportunities、商业洞察 .ai-business-insights），
   现在由「设置 → 桌面按钮 → AI 助手扩展」两个开关控制，默认仍然是隐藏。 */
body.show-business-opportunities .business-opportunities {
    display: grid !important;
}

body.show-business-insights .ai-business-insights {
    display: block !important;
}

/* ---------- 13. 电脑桌面窗口在窄屏 / 手机上的自适应宽度 ----------
   只限制「最大尺寸」，绝对不写死 width / height / left / top ——
   写死位置并用 !important 会压过拖动代码写入的行内样式，窗口就再也拖不动了。 */
@media (max-width: 900px) {
    .desktop-window {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 90px) !important;
    }
}

/* 【修复】原来这里有一段：
   @media (prefers-reduced-motion: reduce) {
       .desktop-toolbar, .toolbar-handle, .desktop-fx-layer, .desktop-float-btn { animation: none !important }
   }
   它的副作用：只要系统里关了"显示动画"（Windows 的减少动态效果 / 部分浏览器默认值），
   用户在设置里主动选的「框架特效 / 背景特效」就会被静默全部关掉 ——
   表现就是"特效设置没效果、桌面效果没了"，而用户完全不知道原因。
   特效是用户主动选的，必须看得见。要省性能请用设置里的「流畅模式」开关，
   不要把系统设置当成隐形的总开关。 */

/* ---------- 【新增】外观增强：框架按钮大小 / 导航栏排版 ----------
   设计原则：默认值下不产生任何变化。
   · --ui-btn-scale 默认 1：只有用户在设置里调过「框架按钮大小」才不等于 1
   · 只有 body 上加了 .nav-custom-layout，导航栏才会用自定义列数 / 间距
   写法上用"排在最后 + 同等权重"覆盖，不影响上面任何已有规则；
   下面所有按钮规则都排除了把手与缩放控件，保证它们原来的行为完全不变。 */

.desktop-toolbar > *:not(.toolbar-handle):not(.zoom-controls) {
    width: calc(42px * var(--ui-btn-scale, 1)) !important;
    height: calc(42px * var(--ui-btn-scale, 1)) !important;
    min-width: calc(42px * var(--ui-btn-scale, 1)) !important;
    border-radius: calc(12px * var(--ui-btn-scale, 1)) !important;
}

.desktop-toolbar > *:not(.toolbar-handle):not(.zoom-controls) i {
    font-size: calc(19px * var(--ui-btn-scale, 1)) !important;
}

body.compact-ui .desktop-toolbar > *:not(.toolbar-handle):not(.zoom-controls) {
    width: calc(38px * var(--ui-btn-scale, 1)) !important;
    height: calc(38px * var(--ui-btn-scale, 1)) !important;
    min-width: calc(38px * var(--ui-btn-scale, 1)) !important;
}

.toolbar-handle {
    width: calc(46px * var(--ui-btn-scale, 1)) !important;
    height: calc(46px * var(--ui-btn-scale, 1)) !important;
}

body.compact-ui .desktop-toolbar .toolbar-handle {
    width: calc(42px * var(--ui-btn-scale, 1)) !important;
    height: calc(42px * var(--ui-btn-scale, 1)) !important;
}

/* 导航栏自定义排版（只有用户在设置里动过列数 / 间距才会生效） */
body.nav-custom-layout .nav-items {
    display: grid !important;
    grid-template-columns: repeat(var(--nav-cols, 6), minmax(0, 1fr)) !important;
    gap: var(--nav-gap, 14px) !important;
    justify-items: center;
}

/* 新增卡片自己的控件样式（只作用于 .ui-tweak-*，不碰任何原有控件） */
.ui-tweak-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.ui-tweak-row > label {
    flex: 0 0 132px;
    font-size: 13px;
}

.ui-tweak-row > input[type="range"] {
    flex: 1 1 auto;
    min-width: 90px;
}

.ui-tweak-row > input[type="color"] {
    width: 44px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: none;
    cursor: pointer;
}

.ui-tweak-row > span {
    flex: 0 0 64px;
    text-align: right;
    font-size: 12px;
    opacity: 0.85;
}

.ui-tweak-reset,
.ui-tweak-actions button {
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
}

.ui-tweak-actions {
    margin-top: 12px;
    text-align: right;
}

/* ============================================================
   【新增·电脑桌面】① 上下滑动  ② 桌面排版（网格 / 紧凑 / 列表 / 悬浮）
   —— 全部「追加覆盖」，上面任何原有规则一行未改；
      不选排版（默认网格）时，观感与以前完全一致。
   ============================================================ */

/* ① 滑动修复
   以前 .desktop-wallpaper 是 overflow: hidden，图标一多就被裁掉、滚不动。
   现在改成可纵向滑动，并给底部 Dock 栏留出高度。 */
.computer-desktop .desktop-wallpaper {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    cursor: grab;
}

/* 按住拖动滑动时的状态 */
body.dl-dragging .computer-desktop .desktop-wallpaper {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

body.dl-dragging .computer-desktop .desktop-icon {
    transition: none;
}

/* Dock 栏高度占位：最后一行图标不会被底部 Dock 挡住 */
.computer-desktop .desktop-icons {
    padding-bottom: 132px;
}

/* 滚动条：细、半透明 */
.computer-desktop .desktop-wallpaper::-webkit-scrollbar {
    width: 10px;
}

.computer-desktop .desktop-wallpaper::-webkit-scrollbar-track {
    background: transparent;
}

.computer-desktop .desktop-wallpaper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.computer-desktop .desktop-wallpaper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
    background-clip: content-box;
}

.night-mode .computer-desktop .desktop-wallpaper::-webkit-scrollbar-thumb {
    background: rgba(226, 232, 240, 0.32);
    background-clip: content-box;
}

/* 下方还有内容时，底部一层渐隐（滑到底自动消失） */
.computer-desktop .desktop-wallpaper::after {
    content: '';
    position: sticky;
    bottom: 0;
    display: block;
    height: 56px;
    margin-top: -56px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.dl-has-more .computer-desktop .desktop-wallpaper::after {
    opacity: 1;
}

/* 追加图标的分组标题（横跨整行） */
.dl-group-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 2px 2px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

.dl-group-title span {
    font-weight: 400;
    opacity: 0.8;
    font-size: 12px;
}

body.dl-list .dl-group-title {
    width: 100%;
}

/* ② 排版模式一：紧凑 */
body.dl-compact .computer-desktop .desktop-icons {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 12px;
    max-width: 1500px;
    padding: 14px 14px 132px;
}

body.dl-compact .desktop-icon {
    width: 76px;
    height: 84px;
    padding: 6px;
    border-radius: 12px;
}

body.dl-compact .desktop-icon i {
    font-size: 30px;
    margin-bottom: 4px;
}

body.dl-compact .desktop-icon span {
    font-size: 11px;
    max-width: 72px;
}

/* ③ 排版模式二：列表（一行一个，像资源管理器） */
body.dl-list .computer-desktop .desktop-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 680px;
    padding: 16px 16px 132px;
}

body.dl-list .desktop-icon {
    width: 100%;
    height: 58px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 16px;
    border-radius: 14px;
}

body.dl-list .desktop-icon i {
    font-size: 26px;
    margin-bottom: 0;
    width: 34px;
    text-align: center;
}

body.dl-list .desktop-icon span {
    font-size: 14px;
    max-width: none;
    text-align: left;
}

body.dl-list .desktop-icon:hover {
    transform: translateX(6px);
}

/* ④ 排版模式三：悬浮（大圆角 + 投影 + 轻微错落） */
body.dl-float .computer-desktop .desktop-icons {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 20px;
    max-width: 1200px;
    padding: 24px 20px 132px;
}

body.dl-float .desktop-icon {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

body.dl-float .desktop-icon:nth-child(3n) {
    transform: translateY(14px);
}

body.dl-float .desktop-icon:nth-child(3n + 1) {
    transform: translateY(-6px);
}

body.dl-float .desktop-icon:nth-child(4n) {
    transform: translateY(22px);
}

/* ⑤ 右侧「上一屏 / 下一屏」翻屏按钮 */
.dl-pager {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 6;
}

.dl-pager button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-pager button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* ⑥ 右侧页码点（放在翻屏按钮正下方，避免重叠） */
.dl-dots {
    position: absolute;
    right: 14px;
    top: calc(50% + 58px);
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 6;
    padding: 8px 0;
}

.dl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
}

.dl-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.dl-dot.active {
    background: #fff;
    height: 20px;
    border-radius: 5px;
}

/* ⑦ 排版切换控件（「系统设置与状态」面板 / 设置窗口里共用） */
.dl-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dl-layout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: #1F2937;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dl-layout-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

.dl-layout-btn.active {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    font-weight: 600;
}

.night-mode .dl-layout-btn {
    background: rgba(51, 65, 85, 0.7);
    border-color: rgba(255, 255, 255, 0.14);
    color: #E2E8F0;
}

.night-mode .dl-layout-btn:hover {
    background: rgba(71, 85, 105, 0.9);
}

.night-mode .dl-layout-btn.active {
    border-color: #60A5FA;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

/* 设置窗口里的排版区块 */
.dl-layout-hint {
    font-size: 12px;
    color: #888888;
    margin-top: 8px;
    line-height: 1.6;
}

/* ============================================================
   【新增·第二轮】渐隐更柔和 + 更多排版（大图标 / 双列卡片）
                    + 图标风格 + 画质开关
   ============================================================ */

/* 底部渐隐改淡（原来那一层黑边太明显） */
.computer-desktop .desktop-wallpaper::after {
    height: 42px;
    margin-top: -42px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));
}

.computer-desktop .desktop-wallpaper {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* 排版：大图标 */
body.dl-big .computer-desktop .desktop-icons {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px;
    max-width: 1280px;
    padding: 22px 20px 132px;
}

body.dl-big .desktop-icon {
    width: 132px;
    height: 132px;
    border-radius: 30px;
    padding: 12px;
}

body.dl-big .desktop-icon i {
    font-size: 54px;
    margin-bottom: 10px;
}

body.dl-big .desktop-icon span {
    font-size: 14px;
    max-width: 120px;
}

/* 排版：双列卡片（图标在左、文字在右，一屏多行） */
body.dl-card .computer-desktop .desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    max-width: 1100px;
    padding: 18px 18px 132px;
}

body.dl-card .desktop-icon {
    width: 100%;
    height: 74px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 18px;
}

body.dl-card .desktop-icon i {
    font-size: 28px;
    margin-bottom: 0;
    width: 38px;
    text-align: center;
}

body.dl-card .desktop-icon span {
    font-size: 14px;
    max-width: none;
    text-align: left;
    white-space: normal;
    line-height: 1.3;
}

/* 图标风格：玻璃 */
body.icon-style-glass .computer-desktop .desktop-icon {
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(7px);
}

/* 图标风格：霓虹 */
body.icon-style-neon .computer-desktop .desktop-icon {
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.35), 0 0 30px rgba(0, 0, 0, 0.35), inset 0 0 14px rgba(255, 255, 255, 0.2);
}

/* 图标风格：浮雕 */
body.icon-style-emboss .computer-desktop .desktop-icon {
    box-shadow: inset 0 -5px 9px rgba(0, 0, 0, 0.28), inset 0 5px 9px rgba(255, 255, 255, 0.42), 0 9px 18px rgba(0, 0, 0, 0.3);
}

/* 图标风格：描边（空心线条） */
body.icon-style-outline .computer-desktop .desktop-icon {
    background-image: none !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    border: 2px solid rgba(255, 255, 255, 0.78);
    box-shadow: none;
}

/* 画质开关 */
body.no-icon-shadow .computer-desktop .desktop-icon {
    box-shadow: none !important;
}

body.no-icon-hover .computer-desktop .desktop-icon:hover {
    transform: none !important;
    background: transparent !important;
}

body.dl-no-anim .computer-desktop .desktop-icon {
    transition: none !important;
    animation: none !important;
}

/* 画质控件（滑块 + 数值） */
.dl-layout-value {
    min-width: 34px;
    text-align: right;
    font-size: 12px;
    opacity: 0.75;
}

.setting-item input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.15);
    outline: none;
    flex: 1;
}

.night-mode .setting-item input[type="range"] {
    background: rgba(255, 255, 255, 0.2);
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0078d7;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   【新增】电脑桌面：固定框架 + 固定列 + 整齐排版 + 流动光效
   要点：
   ① 排版位移一律不用 transform —— 6.js 会给每个图标写内联 transform
      （入场动画），内联优先级最高，会把 CSS 的 transform 排版全部盖掉。
   ② 不设置任何一项时，观感与原来 100% 一致（框架默认开，但极淡透明）。
   ============================================================ */

/* ---------- 一、整齐化：图标尺寸由列宽决定，绝不溢出、不挤压 ---------- */

.computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 100px);
    height: 100px;
    justify-self: center;
    align-self: center;
    justify-content: flex-start;
    padding: 8px 6px 10px;
    overflow: hidden;
    box-sizing: border-box;
}

/* 图标本体固定占一块高度，名称不会忽高忽低 */
.computer-desktop .desktop-icon > i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    margin-bottom: 0;
    flex: 0 0 auto;
}

/* 名称：固定位置 + 单行省略 + 描边清晰 */
.computer-desktop .desktop-icon > span {
    margin-top: 7px;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 5px rgba(0, 0, 0, 0.45);
}

body.dl-text-plate .computer-desktop .desktop-icon > span {
    padding: 1px 7px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(3px);
}

body.dl-text-big .computer-desktop .desktop-icon > span {
    font-size: 13.5px;
}

/* 悬停反馈：用 filter + 阴影（transform 被内联占用） */
.computer-desktop .desktop-icons > .desktop-icon:hover {
    filter: brightness(1.12) saturate(1.05);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

body.no-icon-hover .computer-desktop .desktop-icons > .desktop-icon:hover {
    filter: none;
    box-shadow: none;
}

/* 各排版模式的精确尺寸（全部 justify-self: center 对齐） */
body.dl-compact .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 76px);
    height: 84px;
    padding: 6px 4px 8px;
    border-radius: 12px;
}

body.dl-compact .computer-desktop .desktop-icon > i {
    height: 34px;
    font-size: 30px;
}

body.dl-compact .computer-desktop .desktop-icon > span {
    font-size: 11px;
    margin-top: 5px;
}

body.dl-big .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 132px);
    height: 132px;
    padding: 12px 8px 14px;
    border-radius: 30px;
}

body.dl-big .computer-desktop .desktop-icon > i {
    height: 62px;
    font-size: 54px;
}

body.dl-big .computer-desktop .desktop-icon > span {
    font-size: 13.5px;
    margin-top: 9px;
}

body.dl-list .computer-desktop .desktop-icons > .desktop-icon {
    width: 100%;
    height: 58px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 16px;
    border-radius: 14px;
    justify-self: stretch;
}

body.dl-list .computer-desktop .desktop-icon > i {
    width: 34px;
    height: 34px;
    font-size: 26px;
}

body.dl-list .computer-desktop .desktop-icon > span {
    margin-top: 0;
    font-size: 14px;
    text-align: left;
    max-width: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

body.dl-card .computer-desktop .desktop-icons > .desktop-icon {
    width: 100%;
    height: 74px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 18px;
    justify-self: stretch;
}

body.dl-card .computer-desktop .desktop-icon > i {
    width: 40px;
    height: 40px;
    font-size: 28px;
}

body.dl-card .computer-desktop .desktop-icon > span {
    margin-top: 0;
    font-size: 13.5px;
    text-align: left;
    max-width: none;
    white-space: normal;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* 悬浮：错落改用 margin-top（transform 方案会被内联盖掉） */
body.dl-float .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 112px);
    height: 112px;
    border-radius: 28px;
}

body.dl-float .computer-desktop .desktop-icons > .desktop-icon:nth-child(3n) {
    margin-top: 14px;
}

body.dl-float .computer-desktop .desktop-icons > .desktop-icon:nth-child(3n + 1) {
    margin-top: -6px;
}

body.dl-float .computer-desktop .desktop-icons > .desktop-icon:nth-child(4n) {
    margin-top: 22px;
}

/* ---------- 二、固定框架（透明玻璃框，内容在框内往下滑） ---------- */

body.dl-framed .computer-desktop .desktop-wallpaper {
    margin: 10px 10px 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 0 46px rgba(255, 255, 255, 0.06), 0 14px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(2px);
}

.night-mode body.dl-framed .computer-desktop .desktop-wallpaper {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.16);
    box-shadow: inset 0 0 46px rgba(255, 255, 255, 0.04), 0 14px 40px rgba(0, 0, 0, 0.3);
}

body.dl-framed .computer-desktop .desktop-wallpaper::after {
    border-radius: 0 0 20px 20px;
}

/* 多屏时给右侧翻屏条留位置（单屏时完全不变） */
body.dl-multi .computer-desktop .desktop-icons {
    padding-right: 62px;
}

body.dl-multi.dl-framed .computer-desktop .desktop-icons {
    padding-right: 76px;
}

/* ---------- 三、固定列数（排版再也不会乱换行） ---------- */

body.dl-cols-6 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 900px;
}

body.dl-cols-8 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: 1150px;
}

body.dl-cols-10 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    max-width: 1400px;
}

body.dl-cols-12 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    max-width: 1660px;
}

/* 列表模式恒为 1 列；卡片模式按列数换算成 2/3/4 列大卡片 */
body.dl-list .computer-desktop .desktop-icons {
    grid-template-columns: none;
}

body.dl-card.dl-cols-6 .computer-desktop .desktop-icons,
body.dl-card.dl-cols-8 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
}

body.dl-card.dl-cols-10 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1080px;
}

body.dl-card.dl-cols-12 .computer-desktop .desktop-icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1400px;
}

/* ---------- 四、图标形状：圆角 / 尺寸 ---------- */

body.dl-radius-6 .computer-desktop .desktop-icons > .desktop-icon {
    border-radius: 6px;
}

body.dl-radius-18 .computer-desktop .desktop-icons > .desktop-icon {
    border-radius: 18px;
}

body.dl-radius-50 .computer-desktop .desktop-icons > .desktop-icon {
    border-radius: 50%;
}

body.dl-size-s .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 64px);
    height: 70px;
}

body.dl-size-s .computer-desktop .desktop-icon > i {
    height: 28px;
    font-size: 26px;
}

body.dl-size-s .computer-desktop .desktop-icon > span {
    font-size: 10.5px;
    margin-top: 4px;
}

body.dl-size-m .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 92px);
    height: 96px;
}

body.dl-size-m .computer-desktop .desktop-icon > i {
    height: 42px;
    font-size: 40px;
}

body.dl-size-m .computer-desktop .desktop-icon > span {
    font-size: 12px;
    margin-top: 6px;
}

body.dl-size-l .computer-desktop .desktop-icons > .desktop-icon {
    width: min(100%, 128px);
    height: 128px;
}

body.dl-size-l .computer-desktop .desktop-icon > i {
    height: 56px;
    font-size: 58px;
}

body.dl-size-l .computer-desktop .desktop-icon > span {
    font-size: 13.5px;
    margin-top: 8px;
}

/* ---------- 五、图标流动光效（6 种，可任选其一） ---------- */

/* 光束扫过（持续流动） */
body.fx-beam .computer-desktop .desktop-icons > .desktop-icon {
    position: relative;
    overflow: hidden;
}

body.fx-beam .computer-desktop .desktop-icons > .desktop-icon::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -130%;
    width: 55%;
    height: 220%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
    transform: rotate(18deg);
    pointer-events: none;
    animation: dlBeam 3.2s ease-in-out infinite;
}

@keyframes dlBeam {
    0% { left: -130%; opacity: 0; }
    12% { opacity: 1; }
    55% { left: 150%; opacity: 0; }
    100% { left: 150%; opacity: 0; }
}

/* 呼吸光 */
body.fx-breath .computer-desktop .desktop-icons > .desktop-icon {
    animation: dlBreath 3.2s ease-in-out infinite;
}

@keyframes dlBreath {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 22px rgba(255, 255, 255, 0.55), 0 0 40px rgba(125, 249, 255, 0.35); }
}

/* 霓虹脉冲 */
body.fx-pulse .computer-desktop .desktop-icons > .desktop-icon {
    animation: dlPulse 2.2s ease-in-out infinite;
}

@keyframes dlPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 229, 255, 0.35); }
    50% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.9), 0 0 44px rgba(255, 45, 149, 0.5); }
}

/* 彩虹流光（色相旋转） */
body.fx-rainbow .computer-desktop .desktop-icons > .desktop-icon {
    animation: dlRainbow 7s linear infinite;
}

@keyframes dlRainbow {
    from { filter: hue-rotate(0deg) saturate(1.15); }
    to { filter: hue-rotate(360deg) saturate(1.15); }
}

/* 电流纹（斜纹流动） */
body.fx-volt .computer-desktop .desktop-icons > .desktop-icon {
    position: relative;
    overflow: hidden;
}

body.fx-volt .computer-desktop .desktop-icons > .desktop-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: screen;
    background-image: repeating-linear-gradient(45deg, rgba(125, 249, 255, 0.42) 0 5px, rgba(125, 249, 255, 0) 5px 13px);
    animation: dlVolt 0.9s linear infinite;
}

@keyframes dlVolt {
    from { background-position: 0 0; }
    to { background-position: 26px 0; }
}

/* 光环绕行（一圈光弧绕着图标转） */
body.fx-orbit .computer-desktop .desktop-icons > .desktop-icon {
    position: relative;
    overflow: visible;
}

body.fx-orbit .computer-desktop .desktop-icons > .desktop-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
    background: conic-gradient(from 0deg,
        rgba(125, 249, 255, 0) 0deg,
        rgba(125, 249, 255, 0.95) 40deg,
        rgba(255, 45, 149, 0.55) 70deg,
        rgba(125, 249, 255, 0) 110deg,
        rgba(125, 249, 255, 0) 360deg);
    animation: dlOrbitSpin 2.6s linear infinite;
}

@keyframes dlOrbitSpin {
    to { transform: rotate(360deg); }
}

/* 鼠标移过时的一道光泽（与上面可叠加） */
body.dl-icon-shine .computer-desktop .desktop-icons > .desktop-icon {
    position: relative;
}

body.dl-icon-shine .computer-desktop .desktop-icons > .desktop-icon > span {
    position: relative;
    z-index: 2;
}

/* ---------- 六、桌面特效：涟漪 / 星尘 / 壁纸缩放 ---------- */

.dl-ripple {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
    z-index: 8;
    animation: dlRipple 0.7s ease-out forwards;
}

@keyframes dlRipple {
    from { transform: scale(0.4); opacity: 0.9; }
    to { transform: scale(6); opacity: 0; }
}

.dl-dust-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-image:
        radial-gradient(2px 2px at 15% 22%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(1.6px 1.6px at 62% 12%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.6px 1.6px at 38% 68%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.4px 1.4px at 82% 54%, rgba(255, 255, 255, 0.65), transparent),
        radial-gradient(1.4px 1.4px at 8% 84%, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.8px 1.8px at 90% 88%, rgba(255, 255, 255, 0.6), transparent);
    background-size: 340px 340px;
    animation: dlDust 30s linear infinite;
}

body.dl-dust .dl-dust-layer {
    opacity: 0.9;
}

@keyframes dlDust {
    from { background-position: 0 0; }
    to { background-position: 0 -340px; }
}

body.dl-bg-zoom #bgContainer {
    animation: dlBgZoom 46s ease-in-out infinite alternate;
    transform-origin: center center;
}

@keyframes dlBgZoom {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}

/* 底部渐隐更柔和（原来那层黑边太明显） */
.computer-desktop .desktop-wallpaper::after {
    height: 42px;
    margin-top: -42px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));
}

.computer-desktop .desktop-wallpaper {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* ---------- 【追加】全透明玻璃图标 / 水晶图标 ---------- */

body.icon-style-clear .computer-desktop .desktop-icons > .desktop-icon {
    background-image: none !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(12px) saturate(1.25);
    -webkit-backdrop-filter: blur(12px) saturate(1.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.22);
}

body.icon-style-clear .computer-desktop .desktop-icon > i {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body.icon-style-clear .computer-desktop .desktop-icon > span {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.45);
}

body.icon-style-crystal .computer-desktop .desktop-icons > .desktop-icon {
    background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 44%, rgba(255, 255, 255, 0.3) 100%) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26), inset 0 6px 12px rgba(255, 255, 255, 0.42), inset 0 -8px 14px rgba(0, 0, 0, 0.18);
}

body.icon-style-crystal .computer-desktop .desktop-icon > i {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ---------- 【追加】字体：字号 / 颜色 / 字体族 / 字重 / 阴影 ---------- */

body.dl-font-on .computer-desktop .desktop-icon > span {
    font-size: var(--dl-fs, 12px) !important;
    color: var(--dl-fc, #ffffff) !important;
    font-family: var(--dl-ff, inherit) !important;
    font-weight: var(--dl-fw, 400) !important;
    text-shadow: var(--dl-ts, 0 1px 2px rgba(0, 0, 0, 0.75)) !important;
}

/* ---------- 【追加】透明外壳：3 个版本 ---------- */

body.shell-clear .computer-desktop .desktop-wallpaper {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.shell-glass .computer-desktop .desktop-wallpaper {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 40px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

body.shell-dark .computer-desktop .desktop-wallpaper {
    background: rgba(10, 14, 26, 0.42);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45), 0 16px 44px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

body.dl-frame-glow.dl-framed .computer-desktop .desktop-wallpaper {
    border-color: transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)),
        conic-gradient(from 0deg, #7df9ff, #ff2d95, #ffd166, #7c6cf6, #7df9ff);
    box-shadow: 0 0 22px rgba(125, 249, 255, 0.28), 0 16px 44px rgba(0, 0, 0, 0.3);
}

/* ---------- 【追加】Dock（底部那排按钮）位置：下 / 上 / 左 / 右 ---------- */

body.dock-bottom .computer-desktop .desktop-dock {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 30px;
    transform: translateX(-50%);
    flex-direction: row;
    height: 80px;
    width: auto;
    max-width: calc(100% - 40px);
    overflow-x: auto;
    overflow-y: hidden;
}

body.dock-top .computer-desktop .desktop-dock {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 56px;
    transform: translateX(-50%);
    flex-direction: row;
    height: 80px;
    width: auto;
    max-width: calc(100% - 40px);
    overflow-x: auto;
    overflow-y: hidden;
}

body.dock-left .computer-desktop .desktop-dock {
    left: 14px;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    height: auto;
    width: 80px;
    max-height: calc(100% - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 0;
}

body.dock-right .computer-desktop .desktop-dock {
    right: 14px;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    height: auto;
    width: 80px;
    max-height: calc(100% - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 0;
}

.computer-desktop .desktop-dock::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.computer-desktop .desktop-dock::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.32);
    border-radius: 6px;
}

.computer-desktop .desktop-dock::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- 【追加】工具条（框架里那条小横条）位置：4 个方向 ----------
   不用 !important —— 页面原有的"按住把手拖动"依然有效。 */

body.dl-tb-top .desktop-toolbar {
    top: 10px;
    bottom: auto;
}

body.dl-tb-bottom .desktop-toolbar {
    bottom: 10px;
    top: auto;
}

body.dl-tb-left .desktop-toolbar {
    left: 10px;
    right: auto;
}

body.dl-tb-right .desktop-toolbar {
    right: 10px;
    left: auto;
}

/* ---------- 【追加】桌面极光（可选） ---------- */

.dl-aurora-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-image:
        radial-gradient(60% 40% at 18% 22%, rgba(125, 249, 255, 0.3), transparent 60%),
        radial-gradient(50% 36% at 78% 30%, rgba(255, 45, 149, 0.26), transparent 62%),
        radial-gradient(70% 44% at 50% 88%, rgba(120, 255, 190, 0.24), transparent 60%);
    background-size: 200% 200%;
    animation: dlAurora 26s ease-in-out infinite alternate;
}

body.dl-aurora .dl-aurora-layer {
    opacity: 1;
}

@keyframes dlAurora {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

/* ---------- 【追加】Dock 大小（小 / 中 / 大） ---------- */

body.dock-size-s .computer-desktop .desktop-dock {
    height: 64px;
    gap: 10px;
    padding: 0 18px;
}

body.dock-size-s .computer-desktop .dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

body.dock-size-s .computer-desktop .dock-icon i {
    font-size: 22px;
}

body.dock-size-l .computer-desktop .desktop-dock {
    height: 96px;
    gap: 18px;
    padding: 0 30px;
}

body.dock-size-l .computer-desktop .dock-icon {
    width: 78px;
    height: 78px;
    border-radius: 18px;
}

body.dock-size-l .computer-desktop .dock-icon i {
    font-size: 34px;
}

/* 竖排（左/右）时宽度跟着变 */
body.dock-left.dock-size-s .computer-desktop .desktop-dock,
body.dock-right.dock-size-s .computer-desktop .desktop-dock {
    height: auto;
    width: 64px;
}

body.dock-left.dock-size-l .computer-desktop .desktop-dock,
body.dock-right.dock-size-l .computer-desktop .desktop-dock {
    height: auto;
    width: 96px;
}

/* ---------- 【追加】Dock 自由拖动 ---------- */

body.dock-free .computer-desktop .desktop-dock {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    cursor: grab;
    z-index: 40;
}

body.dl-dock-dragging .computer-desktop .desktop-dock {
    cursor: grabbing;
    opacity: 0.92;
}

body.dl-dock-dragging .computer-desktop .dock-icon {
    pointer-events: none;
}

/* 拖动时给个提示环 */
body.dl-dock-dragging .computer-desktop .desktop-dock {
    box-shadow: 0 0 0 2px rgba(125, 249, 255, 0.55), 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- 【追加】按钮可读性 + 每个按钮的一行说明 ---------- */

.dl-layout-grid {
    gap: 10px;
}

.dl-layout-btn {
    justify-content: flex-start;
    text-align: left;
    align-items: flex-start;
    padding: 10px 12px;
    line-height: 1.25;
    min-height: 46px;
}

.dl-layout-btn > i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
    margin-top: 1px;
}

.dl-layout-btn > span {
    display: block;
    min-width: 0;
}

/* 按钮下面那行小字：这个按钮是干什么的 */
.dl-btn-note {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;
    opacity: 0.6;
    white-space: normal;
}

.dl-layout-btn.active .dl-btn-note {
    opacity: 0.82;
}

.dl-layout-btn.active {
    background: rgba(59, 130, 246, 0.14);
}

.night-mode .dl-layout-btn.active {
    background: rgba(96, 165, 250, 0.18);
}

/* 说明书卡片 */
.dl-manual {
    font-size: 12.5px;
    line-height: 1.85;
    color: #475569;
}

.dl-manual p {
    margin: 0 0 6px;
}

.dl-manual b {
    color: #0F172A;
}

.dl-manual code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 6px;
    font-family: Consolas, Monaco, monospace;
    font-size: 11.5px;
}

.night-mode .dl-manual {
    color: #CBD5E1;
}

.night-mode .dl-manual b {
    color: #FFFFFF;
}

.night-mode .dl-manual code {
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- 【追加】透明外壳：再加 3 个版本（共 7 个） ---------- */

body.shell-acrylic .computer-desktop .desktop-wallpaper {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 20px 50px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(26px) saturate(1.4);
    -webkit-backdrop-filter: blur(26px) saturate(1.4);
}

body.shell-neon .computer-desktop .desktop-wallpaper {
    background: rgba(6, 10, 22, 0.5);
    border: 2px solid rgba(125, 249, 255, 0.75);
    box-shadow: 0 0 18px rgba(125, 249, 255, 0.5), 0 0 46px rgba(255, 45, 149, 0.35), inset 0 0 40px rgba(125, 249, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.shell-paper .computer-desktop .desktop-wallpaper {
    background: rgba(247, 243, 235, 0.86);
    border-color: rgba(120, 100, 70, 0.28);
    box-shadow: inset 0 0 60px rgba(150, 130, 100, 0.14), 0 14px 34px rgba(0, 0, 0, 0.22);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 纸张外壳下文字自动转深色，才看得清 */
body.shell-paper .computer-desktop .desktop-icon > span {
    color: #2B2118;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ---------- 【追加】外壳再加 6 个版本（共 13 个） ---------- */

/* 钢化玻璃：高透 + 硬边高光（"玻璃钢"那种硬挺感） */
body.shell-tempered .computer-desktop .desktop-wallpaper {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.62);
    border-radius: 16px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.75),
        inset 0 -2px 0 rgba(255, 255, 255, 0.25),
        0 18px 44px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px) saturate(1.3);
    -webkit-backdrop-filter: blur(6px) saturate(1.3);
}

/* 金属边框：银色描边 + 冷光 */
body.shell-metal .computer-desktop .desktop-wallpaper {
    background: rgba(226, 232, 240, 0.12);
    border: 2px solid rgba(203, 213, 225, 0.85);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(120, 130, 150, 0.6),
        0 0 0 1px rgba(80, 90, 110, 0.35),
        0 18px 44px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

/* 渐变流光：彩色半透明 + 缓慢流动 */
body.shell-gradient .computer-desktop .desktop-wallpaper {
    border-color: rgba(255, 255, 255, 0.32);
    background-image: linear-gradient(120deg,
        rgba(124, 108, 246, 0.32),
        rgba(34, 211, 238, 0.3),
        rgba(255, 45, 149, 0.3),
        rgba(124, 108, 246, 0.32));
    background-size: 320% 320%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 44px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: dlShellFlow 16s ease infinite;
}

@keyframes dlShellFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 水波纹玻璃：几层径向高光，像水面 */
body.shell-water .computer-desktop .desktop-wallpaper {
    border-color: rgba(255, 255, 255, 0.42);
    background-color: rgba(255, 255, 255, 0.06);
    background-image:
        radial-gradient(60% 45% at 22% 18%, rgba(255, 255, 255, 0.38), transparent 62%),
        radial-gradient(45% 35% at 78% 30%, rgba(180, 240, 255, 0.32), transparent 60%),
        radial-gradient(70% 50% at 50% 92%, rgba(255, 255, 255, 0.26), transparent 64%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 18px 44px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px) saturate(1.25);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

/* 木质：深棕木纹 */
body.shell-wood .computer-desktop .desktop-wallpaper {
    border-color: rgba(120, 80, 40, 0.5);
    background-color: rgba(60, 38, 22, 0.72);
    background-image: repeating-linear-gradient(92deg,
        rgba(255, 255, 255, 0.05) 0 2px,
        rgba(0, 0, 0, 0.08) 2px 7px,
        rgba(255, 255, 255, 0.03) 7px 12px);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* 墨色半透：黑金感 */
body.shell-ink .computer-desktop .desktop-wallpaper {
    border-color: rgba(212, 175, 55, 0.55);
    background: linear-gradient(160deg, rgba(8, 10, 16, 0.82), rgba(20, 24, 38, 0.72));
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.6), 0 0 22px rgba(212, 175, 55, 0.22), 0 18px 44px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 深色系外壳下，图标名称统一转白才看得清 */
body.shell-wood .computer-desktop .desktop-icon > span,
body.shell-ink .computer-desktop .desktop-icon > span,
body.shell-neon .computer-desktop .desktop-icon > span,
body.shell-dark .computer-desktop .desktop-icon > span {
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.5);
}

/* 外壳按钮排布更整齐（13 个按钮，两列显示，行高一致） */
#dlShellCard .dl-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 字号快捷按钮（小 / 中 / 大 / 特大 / 超大）行 */
.dl-font-size-row .dl-layout-btn {
    min-height: 40px;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8px 6px;
}

/* ---------- 【追加】右侧翻屏按钮（▲▼）与页码点：默认不显示 ----------
   设置里打开「翻屏按钮」「页码圆点」后才出现。 */
#dlPager,
#dlDots {
    display: none !important;
}

body.dl-show-pager #dlPager {
    display: flex !important;
}

body.dl-show-dots #dlDots {
    display: flex !important;
}

/* 只有显示了翻屏条时才给图标区右侧留位置，否则保持整齐满排 */
body.dl-multi .computer-desktop .desktop-icons {
    padding-right: 20px;
}

body.dl-multi.dl-show-pager .computer-desktop .desktop-icons,
body.dl-multi.dl-show-dots .computer-desktop .desktop-icons {
    padding-right: 76px;
}

body.dl-multi.dl-framed.dl-show-pager .computer-desktop .desktop-icons,
body.dl-multi.dl-framed.dl-show-dots .computer-desktop .desktop-icons {
    padding-right: 88px;
}

/* ============================================================
   【新增】桌面图标：删除按钮 / 回收站 / 添加应用面板
   ============================================================ */

/* 悬停时右上角的删除按钮 */
.dl-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.94);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    z-index: 7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.computer-desktop .desktop-icons > .desktop-icon:hover .dl-del {
    display: flex;
}

body.dl-list .computer-desktop .desktop-icon .dl-del,
body.dl-card .computer-desktop .desktop-icon .dl-del {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.dl-icon-hidden {
    display: none !important;
}

/* 右下角回收站入口（有内容时才出现） */
.dl-recycle-entry {
    position: absolute;
    right: 16px;
    bottom: 132px;
    z-index: 30;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 19px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

body.dl-has-recycle .dl-recycle-entry {
    display: flex;
}

.dl-recycle-entry:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dl-recycle-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    font-style: normal;
}

/* 图标右键菜单
   注意：页面自己的 .modal-overlay 用了 z-index:100000、桌面用 1000，
   所以我的浮层必须比它们更高，否则会被盖住点不到。 */
.dl-menu {
    position: fixed;
    z-index: 100002;
    min-width: 172px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    color: #1F2937;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
    display: none;
    font-size: 13px;
}

.night-mode .dl-menu {
    background: rgba(30, 41, 59, 0.97);
    color: #E2E8F0;
}

.dl-menu.show {
    display: block;
}

.dl-menu-item {
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dl-menu-item:hover {
    background: rgba(59, 130, 246, 0.16);
}

.dl-menu-item.danger {
    color: #EF4444;
}

/* 应用选择 / 回收站 面板（层级要高于页面所有弹窗，否则会被桌面盖住） */
.dl-picker {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    background: rgba(8, 12, 20, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dl-picker.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-picker-box {
    width: min(780px, 92vw);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    color: #1F2937;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.night-mode .dl-picker-box {
    background: rgba(23, 32, 48, 0.98);
    color: #E2E8F0;
}

.dl-picker-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.night-mode .dl-picker-head {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dl-picker-head b {
    font-size: 15px;
    white-space: nowrap;
}

.dl-picker-head input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.03);
    font-size: 13px;
    color: inherit;
}

.night-mode .dl-picker-head input {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.dl-picker-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.06);
    font-size: 18px;
    line-height: 1;
}

.night-mode .dl-picker-close {
    background: rgba(255, 255, 255, 0.12);
}

.dl-picker-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 4px;
}

.dl-picker-cat {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 12.5px;
    cursor: pointer;
}

.dl-picker-cat.active {
    background: #3B82F6;
    color: #fff;
}

.night-mode .dl-picker-cat {
    background: rgba(255, 255, 255, 0.1);
}

.dl-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    padding: 12px 16px 18px;
    overflow-y: auto;
}

.dl-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 14px;
    cursor: pointer;
}

.dl-picker-item:hover {
    background: rgba(59, 130, 246, 0.14);
}

.dl-picker-item i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.dl-picker-item span {
    font-size: 11.5px;
    text-align: center;
    line-height: 1.2;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.6;
    padding: 24px 0;
    font-size: 13px;
}

/* 回收站列表 */
.dl-recycle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 16px 16px;
    overflow-y: auto;
}

.dl-recycle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
}

.night-mode .dl-recycle-row {
    background: rgba(255, 255, 255, 0.06);
}

.dl-recycle-row i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex: 0 0 34px;
}

.dl-recycle-info {
    flex: 1;
    min-width: 0;
}

.dl-recycle-name {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-recycle-meta {
    font-size: 11px;
    opacity: 0.62;
}

.dl-recycle-btn {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #1F2937;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.night-mode .dl-recycle-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #E2E8F0;
}

.dl-recycle-btn.danger {
    color: #EF4444;
}

/* ============================================================
   【新增】AI 真实接口：设置卡片 + 工具/创作按钮说明 + 搜索结果卡片
   ============================================================ */

.dl-ai-hint {
    font-size: 12px;
    line-height: 1.7;
    opacity: 0.75;
    margin-bottom: 8px;
}

.dl-ai-hint b {
    opacity: 1;
}

.dl-ai-input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: #1F2937;
    font-size: 12.5px;
}

.night-mode .dl-ai-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #E2E8F0;
}

.dl-ai-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

/* 工具 / 创作 / 游戏按钮下面那句小字说明 */
.dl-ai-tool-note {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    line-height: 1.35;
    pointer-events: none;
}

/* 聊天里"正在思考"的省略号动画 */
.dl-ai-dots {
    display: inline-block;
    animation: dlAiBlink 1.1s ease-in-out infinite;
}

@keyframes dlAiBlink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 搜索结果卡片 */
.dl-ai-search-card {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    line-height: 1.75;
}

.night-mode .dl-ai-search-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #E2E8F0;
}

/* AI 模型按钮变多时自动换行，排得紧凑清楚 */
.ai-selector {
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 7px;
}

.ai-selector-btn {
    font-size: 11.5px;
    padding: 6px 9px;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 模型按钮上的小标签：免费 / 需Key */
.dl-model-tag {
    font-style: normal;
    font-size: 9.5px;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.dl-model-tag.free {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    color: #047857;
}

.dl-model-tag.need {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.5);
    color: #475569;
}

.night-mode .dl-model-tag.free {
    color: #6EE7B7;
}

.night-mode .dl-model-tag.need {
    color: #CBD5E1;
}

/* ============================================================
   【新增·性能与流畅度优化】
   ① AI 面板布局修复：输入框永远在底部、回答区独立滚动
   ② 忙碌时自动降级特效（滚动/打字时暂停动画与毛玻璃，停下自动恢复）
   ③ 渲染优化：屏幕外图标不参与渲染
   ④ 尊重系统"减少动态效果"
   —— 全部为追加规则，不改任何原有功能与默认外观。
   ============================================================ */

/* ---------- ① AI 面板：回答区固定高度可滚 + 输入框钉在底部 ----------
   上版把面板改成 flex 列，结果上面的控件把 .ai-chat-container 压成
   只剩输入条那么高 —— 回答区变成 0 高度，所以"看不到、滑不动"。
   这里改成**确定高度**方案：回答区自己带滚动条，面板可整体滚动，
   输入条 sticky 钉在面板底部（滚动时也永远可见）。 */
#aiPanel {
    max-height: 88vh;
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* 聊天回答区：固定高度 + 自带滚动条（可用 --dl-chat-h 按设备调，见自动配置）
   注意：这里不强制 display，否则会盖掉 6.js 切换模式时加的 .hidden */
#aiPanel .ai-chat-container {
    height: auto !important;
    min-height: 0;
}

#aiPanel .ai-chat-container.hidden,
#aiPanel .ai-chat-container[style*="display: none"] {
    display: none !important;
}

#aiPanel .ai-chat-messages,
#aiPanel #aiChatMessages {
    height: var(--dl-chat-h, clamp(220px, 34vh, 460px));
    min-height: 200px;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    contain: content;
    transform: translateZ(0);
}

#aiPanel .ai-chat-messages::-webkit-scrollbar {
    width: 8px;
}

#aiPanel .ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#aiPanel .ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 8px;
}

#aiPanel .ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.7);
}

/* 输入条钉在面板底部：面板怎么滚都看得见 */
#aiPanel .ai-input-group {
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding: 8px 0 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 26%);
}

.night-mode #aiPanel .ai-input-group {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0), #1E293B 26%);
}

#aiInput {
    caret-color: #2563EB;
}

/* 上排控件：**保持原来的换行显示**（上一版强制单行横滚，把按钮挤得只剩 1~2 个，
   手机上尤其严重），这里只做紧凑化 —— 不动 display / flex-wrap / 高度限制 */
#aiPanel .ai-selector,
#aiPanel .ai-mode-toggle {
    gap: 6px;
    max-height: none;
    overflow: visible;
    padding-bottom: 0;
}

#aiPanel .ai-selector-btn,
#aiPanel .mode-btn {
    white-space: nowrap;
    min-width: 0;
    padding: 6px 10px;
    font-size: 12.5px;
    line-height: 1.2;
}

#aiPanel .color-options {
    margin: 6px 0;
}

#aiPanel .voice-controls {
    margin: 4px 0 8px;
}

#aiPanel .voice-btn {
    padding: 7px 14px;
    font-size: 13px;
}

/* 注入的状态条 / 说明 / 示例条 / 学习卡：都不再抢高度 */
#aiPanel .dl-ai-status,
#aiPanel .dl-ai-note,
#aiPanel .dl-ai-chips,
#aiPanel .dl-ai-study {
    max-height: 90px;
    overflow-y: auto;
}

#aiPanel .dl-ai-status {
    padding: 5px 9px;
    font-size: 11.5px;
    line-height: 1.35;
}

.dl-ai-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 40px;
    padding-bottom: 2px;
}

.dl-ai-chips .dl-ai-chip {
    flex: 0 0 auto;
}

/* ---------- ② 忙碌时降级（滚动 / 打字 / 开着面板时） ---------- */
body.dl-busy .computer-desktop .desktop-icon,
body.dl-ai-open .computer-desktop .desktop-icon {
    animation-play-state: paused !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.dl-busy .computer-desktop .desktop-icons > .desktop-icon {
    box-shadow: none !important;
    filter: none !important;
}

body.dl-busy .dl-dust-layer,
body.dl-busy .dl-aurora-layer,
body.dl-busy #bgContainer,
body.dl-ai-open .dl-dust-layer,
body.dl-ai-open .dl-aurora-layer,
body.dl-ai-open #bgContainer {
    animation-play-state: paused !important;
}

body.dl-busy .computer-desktop .desktop-wallpaper,
body.dl-ai-open .computer-desktop .desktop-wallpaper {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ---------- ③ 渲染优化（已按兼容性收敛） ----------
   原来这里用了 content-visibility: auto + contain: layout paint style，
   实测会让部分浏览器出现「首次进入点击图标没反应」（命中测试失效）。
   为了不牺牲点击，这里全部取消，改为只保留安全的 backface-visibility。 */
.computer-desktop .desktop-icons > .desktop-icon {
    backface-visibility: hidden;
}

.computer-desktop .desktop-wallpaper {
    overflow-anchor: none;
}

/* 浮层独立成层，避免整页重绘 */
.dl-picker,
.dl-menu {
    contain: layout paint;
}

/* 各滚动区域限制越界滚动，减少连锁重排 */
.settings-main,
.function-panel,
.ai-chat-messages,
.computer-desktop .desktop-wallpaper {
    overscroll-behavior: contain;
}

/* ---------- ④ 系统"减少动态效果"时自动关动画 ---------- */
@media (prefers-reduced-motion: reduce) {
    .computer-desktop .desktop-icon,
    .dl-dust-layer,
    .dl-aurora-layer,
    #bgContainer,
    .dl-ai-status .dl-ai-dot,
    .dl-ai-dots {
        animation: none !important;
    }
}

/* ============================================================
   【新增·手机 / 平板适配 + 层级修复】
   ① AI 面板打开时必须盖住桌面上的浮动按钮（它们 z-index 高达 5001~999999，
      手机端以前会把聊天内容和按钮整片挡掉）
   ② 手机 / 小屏下：面板、按钮、聊天区一起缩小，保证"换模型的按钮"和
      "输入框"都能在同一屏里看到、摸得到
   ============================================================ */

/* ---------- ① 层级：面板永远在最上层 ---------- */
body.dl-ai-open .function-panel,
body.dl-ai-open #aiPanel,
body.dl-ai-open .function-panel.active {
    z-index: 99990 !important;
}

body.dl-ai-open .panel-overlay {
    z-index: 99980 !important;
}

/* 其它模式面板（搜索/工具/健康/金融/创作/游戏/学习）同样处理 */
body.dl-mode-open .function-panel.active {
    z-index: 99990 !important;
}

/* ---------- ② 手机 / 平板 / 小屏适配 ---------- */
@media (max-width: 820px), (max-height: 780px) {
    #aiPanel {
        width: 94% !important;
        max-width: 560px;
        max-height: 92vh;
        padding: 14px !important;
        border-radius: 18px;
        -webkit-overflow-scrolling: touch;
    }

    /* 聊天回答区：小屏更矮，保证上面按钮 + 下面输入框都露在同一屏 */
    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages {
        height: var(--dl-chat-h, clamp(140px, 24vh, 270px));
        min-height: 120px;
        font-size: 13px;
        -webkit-overflow-scrolling: touch;
    }

    #aiPanel .panel-header {
        margin-bottom: 8px;
    }

    #aiPanel .panel-title {
        font-size: 15px;
        line-height: 1.3;
    }

    /* 换模型的按钮：紧凑但不隐藏（手机上一屏能看到好几个） */
    #aiPanel .ai-selector {
        gap: 5px;
        margin-bottom: 6px;
    }

    #aiPanel .ai-selector-btn,
    #aiPanel .mode-btn {
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 10px;
    }

    #aiPanel .color-options {
        margin: 4px 0;
    }

    #aiPanel .color-option {
        width: 22px;
        height: 22px;
    }

    #aiPanel .voice-controls {
        margin: 2px 0 6px;
        gap: 6px;
    }

    #aiPanel .voice-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    #aiPanel .ai-message {
        padding: 8px 11px;
        font-size: 12.5px;
        max-width: 92%;
    }

    #aiPanel .ai-input {
        font-size: 13px;
        min-height: 40px;
        padding: 8px 12px;
    }

    #aiPanel .ai-send-btn {
        width: 40px;
        height: 40px;
    }

    #aiPanel .dl-ai-status {
        font-size: 11px;
        padding: 4px 8px;
    }

    #aiPanel .dl-ai-note,
    #aiPanel .dl-ai-study {
        max-height: 64px;
        font-size: 11px;
    }

    #aiPanel .dl-ai-chips {
        max-height: 34px;
    }

    #aiPanel .dl-ai-chip {
        padding: 3px 8px;
        font-size: 11px;
    }

}

/* 超窄屏（手机竖屏）再收一档 */
@media (max-width: 420px) {
    #aiPanel {
        width: 96% !important;
        padding: 12px !important;
        max-height: 94vh;
    }

    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages {
        height: var(--dl-chat-h, clamp(120px, 22vh, 230px));
        min-height: 110px;
    }

    #aiPanel .panel-title {
        font-size: 14px;
    }

    #aiPanel .ai-selector-btn,
    #aiPanel .mode-btn {
        padding: 4px 7px;
        font-size: 11.5px;
    }
}

/* ============================================================
   【新增·触控屏优化】手机 / 平板上点按更好按，减少"点了没反应"
   ============================================================ */
@media (hover: none), (pointer: coarse) {
    /* 点按高亮改成淡蓝一闪（系统默认灰块很难看） */
    * {
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.18);
    }

    /* 按钮统一最小 40px 触控高度，手指不会点空 */
    #aiPanel .mode-btn,
    #aiPanel .ai-selector-btn,
    #aiPanel .voice-btn,
    .dl-layout-btn,
    .dl-ai-chip {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #aiPanel .color-option {
        width: 30px;
        height: 30px;
    }

    /* 桌面图标：手指点到的范围更大 */
    .computer-desktop .desktop-icons > .desktop-icon {
        min-width: 84px;
        min-height: 92px;
    }

    /* 触摸时不做 hover 变化（否则一按就"跳"一下） */
    .computer-desktop .desktop-icons > .desktop-icon:hover {
        filter: none;
    }

    /* 滚动更跟手 */
    .computer-desktop .desktop-wallpaper,
    #aiPanel,
    #aiPanel .ai-chat-messages,
    .settings-main {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    /* 翻屏按钮 / 页码点在手机上加大 */
    .dl-pager button {
        width: 46px;
        height: 46px;
        font-size: 17px;
    }

    .dl-dot {
        width: 11px;
        height: 11px;
    }
}

/* ============================================================
   【新增·关键修复】输入框文字可见 + 遮罩不再吃掉点击 + 极致流畅开关
   ============================================================ */

/* ① 输入框 / 文本域：明确文字颜色（以前可能继承桌面白字，白底白字＝"打不出来"）
   【20261009 修正】原来这里无条件写了 pointer-events:auto !important + opacity:1 !important：
   面板关着时整块面板是全透明的，但里面的输入框仍然"看不见却能点、能打字"，
   在超级搜索框里按回车还会直接打开百度搜索 —— 就是桌面上那两个"透明输入框"的来源。
   现在只保留文字颜色等外观修正；"强制可点"挪到下面的 ①-3，只在面板真正打开时生效。 */
#aiPanel input,
#aiPanel textarea,
#aiInput,
.ai-input,
.ai-input-group input,
.ai-input-group textarea,
.dl-ai-search-input {
    color: #111827 !important;
    background-color: #ffffff;
    caret-color: #2563EB !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* ①-2 面板关着（没有 .active）时：里面的输入框一律不许点、不许打字 ——
   彻底消灭"桌面上看不见却能打字、一回车就跳百度"的透明输入框。
   visibility:hidden 同时让它退出 Tab 键焦点顺序、并在面板关闭瞬间自动失焦，
   "面板关了还偷偷握着焦点、打字回车照样跳百度"的漏洞也一起堵死。
   面板打开时本条不生效，一切照旧。 */
.function-panel:not(.active) input,
.function-panel:not(.active) textarea,
.search-upgrade-panel:not(.active) input,
.search-upgrade-panel:not(.active) textarea {
    pointer-events: none !important;
    visibility: hidden !important;
}

/* ①-3 面板打开（.active）时：输入框一定可点、可见（保留原修复的本意） */
.function-panel.active input,
.function-panel.active textarea,
.search-upgrade-panel.active input,
.search-upgrade-panel.active textarea {
    pointer-events: auto !important;
    opacity: 1 !important;
}

#aiPanel input::placeholder,
#aiPanel textarea::placeholder,
#aiInput::placeholder,
.ai-input::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
}

.night-mode #aiPanel input,
.night-mode #aiPanel textarea,
.night-mode #aiInput,
.night-mode .ai-input {
    color: #E2E8F0 !important;
    background-color: #334155;
}

.night-mode #aiPanel input::placeholder,
.night-mode #aiInput::placeholder {
    color: #94A3B8 !important;
}

/* 聊天消息文字也要能选中、看得清 */
#aiPanel .ai-message {
    color: #1F2937;
    -webkit-user-select: text;
    user-select: text;
}

.night-mode #aiPanel .ai-message {
    color: #E2E8F0;
}

/* ② 面板打开时，黑色遮罩不再"吃掉"桌面点击：
      点桌面上的图标 → 面板先自动关闭 + 图标照常打开（原来是点一下只关面板，像没反应） */
body.dl-ai-open .panel-overlay,
body.dl-mode-open .panel-overlay {
    pointer-events: none !important;
}

/* ③ 已被页面自己隐藏的浮层不拦点击
      ⚠️ 修正：.dl-menu / .dl-picker 打开时的类名是 **.show**（不是 .dl-open）——
      之前写成 :not(.dl-open) 会让"打开着的回收站 / 添加应用面板"也被判成隐藏，
      整块变成 pointer-events: none → 里面所有按钮点不动 ✗
      这里改成真实类名 .show ✓ 关闭时才不拦点击 ✓ */
.panel-overlay:not(.active),
.dl-menu:not(.show),
.dl-picker:not(.show) {
    pointer-events: none !important;
}

/* 兜底：这两个面板只要处于展开状态，一定可点（即使类名以后又改了） */
.dl-picker.show,
.dl-menu.show {
    pointer-events: auto !important;
}

/* ④ 极致流畅（一键）：关掉动画 / 毛玻璃 / 大阴影，老设备也丝滑 */
body.dl-turbo .computer-desktop .desktop-icon,
body.dl-turbo .desktop-icon,
body.dl-turbo .dl-dust-layer,
body.dl-turbo .dl-aurora-layer,
body.dl-turbo #bgContainer,
body.dl-turbo .dl-ai-status .dl-ai-dot {
    animation: none !important;
    transition: none !important;
}

body.dl-turbo .computer-desktop .desktop-icon,
body.dl-turbo .function-panel,
body.dl-turbo .panel-overlay,
body.dl-turbo .desktop-dock,
body.dl-turbo .desktop-taskbar,
body.dl-turbo .dl-ai-chips,
body.dl-turbo .dl-ai-status {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.dl-turbo .computer-desktop .desktop-icons > .desktop-icon {
    box-shadow: none !important;
    filter: none !important;
}

body.dl-turbo .computer-desktop .desktop-wallpaper {
    scroll-behavior: auto !important;
}

body.dl-turbo .dl-pager button,
body.dl-turbo .dl-layout-btn {
    backdrop-filter: none !important;
    box-shadow: none !important;
}

/* ============================================================
   【关键修复】窗口按钮真实可用：最小化 / 最大化 / 关闭
   ============================================================ */

/* 按钮本身：可点、有反馈 */
.win-btn,
.window-btn,
.window-controls > * {
    cursor: pointer;
}

.win-btn:hover,
.window-btn:hover {
    filter: brightness(1.18);
}

.win-btn:active,
.window-btn:active {
    transform: scale(0.92);
}

/* 最小化：只留标题栏，缩到左下角（再点一次还原） */
.window.dl-win-min,
.search-upgrade-panel.dl-win-min,
.settings-window.dl-win-min,
.function-panel.dl-win-min {
    transform: none !important;
    top: auto !important;
    left: 16px !important;
    right: auto !important;
    bottom: 16px !important;
    width: 280px !important;
    max-width: 280px !important;
    height: auto !important;
    max-height: 52px !important;
    overflow: hidden !important;
    opacity: 1 !important;
    z-index: 99960 !important;
}

.window.dl-win-min .win-content,
.window.dl-win-min .settings-sidebar,
.function-panel.dl-win-min > *:not(.panel-header):not(.win-header),
.search-upgrade-panel.dl-win-min > *:not(.panel-header):not(.win-header),
.settings-window.dl-win-min > *:not(.panel-header):not(.win-header) {
    display: none !important;
}

/* 最大化：铺满桌面可视区（再点一次还原） */
.window.dl-win-max,
.search-upgrade-panel.dl-win-max,
.settings-window.dl-win-max,
.function-panel.dl-win-max {
    transform: none !important;
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    opacity: 1 !important;
    z-index: 99960 !important;
}

.function-panel.dl-win-max {
    display: flex !important;
    flex-direction: column;
}

.function-panel.dl-win-max .ai-chat-messages,
.function-panel.dl-win-max #aiChatMessages {
    height: auto !important;
    max-height: none !important;
    flex: 1 1 auto;
    min-height: 140px;
}

/* 关闭 */
.window.dl-win-closed {
    display: none !important;
}

/* 窗口 / 面板里的输入框：文字一律看得见（这里是"打字打不出来"的另一个来源） */
.window input,
.window textarea,
.win-content input,
.win-content textarea,
.function-panel input,
.function-panel textarea,
.start-app input {
    color: #111827 !important;
    caret-color: #2563EB !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

.night-mode .window input,
.night-mode .window textarea,
.night-mode .function-panel input,
.night-mode .function-panel textarea {
    color: #E2E8F0 !important;
}

.window input::placeholder,
.window textarea::placeholder,
.function-panel input::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
}

/* ---------- 三个色点（红黄绿）：明确可点 + 有反馈 + 一定点得到 ---------- */
.window-controls,
.win-controls {
    position: relative;
    z-index: 99960;
    pointer-events: auto;
}

.window-controls .window-btn,
.win-controls .win-btn {
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.window-controls .window-btn:hover,
.win-controls .win-btn:hover {
    filter: brightness(1.3);
    transform: scale(1.18);
}

.window-controls .window-btn:active,
.win-controls .win-btn:active {
    transform: scale(0.88);
}

/* 色点上有手指/光标时给出提示条 */
.window-controls .window-btn[title],
.win-controls .win-btn[title] {
    text-decoration: none;
}

/* 被真实接口接管的按钮给个可点的手感 */
[data-dl-ai] {
    cursor: pointer;
}

/* 「真实 AI 已连接」状态条 */
.dl-ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 8px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-size: 12px;
    line-height: 1.45;
    color: #065F46;
}

.night-mode .dl-ai-status {
    background: rgba(16, 185, 129, 0.2);
    color: #D1FAE5;
}

.dl-ai-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
    animation: dlAiBlink 1.6s ease-in-out infinite;
}

/* 学习模式区块 */
.dl-ai-study {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.dl-ai-study-btn {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.35;
    color: #312E81;
}

.night-mode .dl-ai-study-btn {
    background: rgba(129, 140, 248, 0.18);
    border-color: rgba(129, 140, 248, 0.35);
    color: #E0E7FF;
}

.dl-ai-study-btn:hover {
    background: rgba(99, 102, 241, 0.22);
}

.dl-ai-study-btn b {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
}

/* 示例快捷条（点一下 → 真实出图 / 出文案） */
.dl-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.dl-ai-chip {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.1);
    color: #3730A3;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dl-ai-chip:hover {
    background: rgba(99, 102, 241, 0.22);
    transform: translateY(-1px);
}

.night-mode .dl-ai-chip {
    background: rgba(129, 140, 248, 0.16);
    border-color: rgba(129, 140, 248, 0.4);
    color: #E0E7FF;
}

.dl-ai-chips.pulse {
    animation: dlAiChipPulse 1.8s ease;
}

@keyframes dlAiChipPulse {
    0%, 100% { box-shadow: none; }
    20%, 60% { box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45); }
}

/* 搜索：3 个 AI 回答选项 */
.dl-ai-search-title {
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0 8px;
}

.dl-ai-search-opt {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

.night-mode .dl-ai-search-opt {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #E2E8F0;
}

.dl-ai-search-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.dl-ai-search-head button {
    margin-left: auto;
}

.dl-ai-search-body {
    font-size: 12.5px;
    line-height: 1.75;
}
/* ============================================================
   ★ KZADJ · 整屏 + 聊天滑动（最小改动版 · 第二次补回）★
   只改样式：不动任何 JS、不改任何层级/z-index、不动任何功能 ✓
   ① AI 面板：点开就是整屏；中间聊天区自己滑（保底 150px）；
      输入框永远钉在最底部 ✓
   ② 黑色电脑里每个功能框架（含搜索导航等面板）：点开整屏 ✓
   ③ 窗口（设置/计算器/记事本/资源管理器/浏览器/媒体）：
      手机 / 窄屏上整屏；电脑大屏保持原样 ✓
   ④ 只对 AI 面板做极轻量优化（面板内停过渡 → 滑动不闪）✓
   ============================================================ */

/* ---------- ① AI 面板：整屏 ---------- */
#aiPanel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 12px 14px 10px !important;
}

#aiPanel > * {
    flex: 0 0 auto;
}

#aiPanel .ai-chat-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 中间聊天区：一定看得见（保底 150px）+ 自己滑 */
#aiPanel .ai-chat-messages,
#aiPanel #aiChatMessages {
    flex: 1 1 auto !important;
    min-height: 150px !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

/* 上面控件区（更换模型 / 更换模式这两块）：限高 + 自己滑，不会把中间挤没 ✓ */
#aiPanel .ai-selector {
    flex: 0 1 auto !important;
    max-height: 24vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

#aiPanel .ai-mode-toggle {
    flex: 0 1 auto !important;
    max-height: 16vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

/* 下面输入区：钉在最底部 ✓ */
#aiPanel .ai-input-group {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 9 !important;
    padding-top: 6px !important;
}

/* ---------- ② 黑色电脑里每个功能框架：点开整屏 ---------- */
.function-panel.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

/* ---------- ③ 窗口：手机 / 窄屏整屏（电脑大屏不动 ✓） ---------- */
@media (max-width: 900px), (max-height: 800px), (hover: none), (pointer: coarse) {
    .window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    .window .window-header,
    .window .win-header {
        position: sticky;
        top: 0;
        z-index: 8;
    }

    /* AI 面板：手机字号与触控优化（滑动更顺 ✓） */
    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages,
    #aiPanel .ai-message {
        font-size: 14.5px !important;
        line-height: 1.7 !important;
    }

    #aiPanel .ai-input {
        font-size: 15px !important;
        min-height: 46px !important;
    }

    #aiPanel .ai-send-btn {
        width: 46px !important;
        height: 46px !important;
    }

    #aiPanel button {
        min-height: 36px;
        touch-action: manipulation;
    }

    /* 面板内不做过渡动画（滑动更稳、不闪 ✓） */
    #aiPanel * {
        transition: none !important;
    }
}

/* ---------- ④ 电脑宽屏：整屏但内容居中限宽，看着舒服 ✓ ---------- */
@media (min-width: 1100px) {
    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages,
    #aiPanel .ai-input-group {
        padding-left: max(12px, calc((100vw - 900px) / 2)) !important;
        padding-right: max(12px, calc((100vw - 900px) / 2)) !important;
    }
}

/* 手机文字不被浏览器自动缩小 ✓ */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ============================================================
   ★ 修正块：整屏下"上面内容不许把聊天区顶出去" ★
   问题：上一块里 #aiPanel > * { flex: 0 0 auto } 让所有子块都不能收缩 ✗
         → 说明/状态/颜色/语音/学习卡 一起把 模型栏·模式栏·聊天区·输入框
           顶到屏幕外（打开只剩学习卡列表 ✗）
   修法：① 顶部各块允许收缩 ✓ ② 高块（学习卡/说明）限高自己滚 ✓
        ③ 聊天区保底 170px 并抢占剩余空间 ✓ ④ 输入框钉底 ✓
   只改样式，不动任何功能代码 ✓
   ============================================================ */

/* ① 顶部所有子块：允许收缩（不再把下面顶出去 ✓） */
#aiPanel > * {
    flex: 0 1 auto !important;
    min-height: 0 !important;
}

/* ② 聊天容器：抢占剩余空间，且保底高度（一定看得见 ✓） */
#aiPanel .ai-chat-container {
    flex: 1 1 auto !important;
    min-height: 170px !important;
    display: flex !important;
    flex-direction: column !important;
}

#aiPanel .ai-chat-messages,
#aiPanel #aiChatMessages {
    flex: 1 1 auto !important;
    min-height: 150px !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

/* ③ 高块限高 + 自己滚（学习卡、说明、状态、示例条 ✓） */
#aiPanel .dl-ai-study {
    max-height: 20vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

#aiPanel .dl-ai-note,
#aiPanel .dl-ai-status {
    max-height: 12vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

#aiPanel .dl-ai-chips {
    max-height: 40px !important;
    overflow-y: auto !important;
}

/* ④ 模型栏 / 模式栏：限高 + 自己滚（始终露出来 ✓） */
#aiPanel .ai-selector {
    flex: 0 0 auto !important;
    max-height: 22vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

#aiPanel .ai-mode-toggle {
    flex: 0 0 auto !important;
    max-height: 14vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

/* ⑤ 颜色 / 语音 / 输入区：固定高度，永远可见 ✓ */
#aiPanel .color-options,
#aiPanel .voice-controls,
#aiPanel .ai-input-group {
    flex: 0 0 auto !important;
}

#aiPanel .ai-input-group {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 9 !important;
    padding-top: 6px !important;
}

/* ⑥ 手机：整体再压紧一档（保证四块都在屏幕上 ✓） */
@media (max-width: 900px), (max-height: 800px), (hover: none), (pointer: coarse) {
    #aiPanel .dl-ai-study {
        max-height: 16vh !important;
    }

    #aiPanel .ai-selector {
        max-height: 18vh !important;
    }

    #aiPanel .ai-mode-toggle {
        max-height: 12vh !important;
    }

    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages {
        min-height: 140px !important;
        font-size: 14.5px !important;
        line-height: 1.7 !important;
    }

    #aiPanel .ai-input {
        min-height: 44px !important;
        font-size: 15px !important;
    }

    #aiPanel .ai-send-btn {
        width: 44px !important;
        height: 44px !important;
    }

    #aiPanel * {
        transition: none !important;
    }
}

/* ⑦ 极矮窗口：再压（保证输入框一定露出 ✓） */
@media (max-height: 620px) {
    #aiPanel .dl-ai-study {
        max-height: 12vh !important;
    }

    #aiPanel .ai-selector {
        max-height: 16vh !important;
    }

    #aiPanel .ai-mode-toggle {
        max-height: 10vh !important;
    }

    #aiPanel .ai-chat-messages,
    #aiPanel #aiChatMessages {
        min-height: 110px !important;
    }
}

/* ============================================================
   超级搜索增强块样式：AI 搜索按钮 + 放大整屏 / 缩小还原
   只加样式，不动原界面 ✓（配合 dl-search-ai.js 使用）
   ============================================================ */

/* ① 放大：整个屏幕（覆盖整个窗口，方便看完整个搜索结果 ✓） */
#searchUpgradePanel.dl-se-full {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 2147483600 !important;
    padding: 14px !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
}

/* 放大时内容居中限宽，看着舒服 ✓ */
@media (min-width: 1100px) {
    #searchUpgradePanel.dl-se-full {
        padding-left: max(14px, calc((100vw - 1040px) / 2)) !important;
        padding-right: max(14px, calc((100vw - 1040px) / 2)) !important;
    }
}

/* ② AI 搜索按钮：触控友好（手机也好点 ✓） */
#searchUpgradePanel [data-dl-se-go] {
    touch-action: manipulation;
}

#searchUpgradePanel [data-dl-se-go]:active,
#searchUpgradePanel [data-dl-se-full]:active,
#searchUpgradePanel [data-dl-se-norm]:active {
    transform: scale(0.96);
    filter: brightness(1.06);
}

/* ③ 夜间模式配色跟随 ✓ */
.night-mode #searchUpgradePanel [data-dl-se-go] {
    background: #1E293B;
    color: #BFDBFE;
    border-color: rgba(147, 197, 253, .45);
}

/* ④ 手机：按钮大一点，一行两个更整齐 ✓ */
@media (max-width: 560px) {
    #searchUpgradePanel [data-dl-se-go] {
        flex: 1 1 44% !important;
        font-size: 12px !important;
    }

    #searchUpgradePanel [data-dl-se-full],
    #searchUpgradePanel [data-dl-se-norm] {
        min-height: 38px;
    }
}

/* ============================================================
   【20261010 新增·手机端稳定 + 丝滑】
   现象：手机上打开 / 拖动 / 放大框架时白屏、内容时有时无、卡顿
        （电脑端一直正常；任务栏那种不带毛玻璃的就没事）。
   原因：① 毛玻璃 backdrop-filter（-webkit 那份还是 16px 大模糊）
        ② transition:all —— 拖动/缩放/整屏切换时每帧都在给
           left/top/width/height/shadow 做 0.3s 过渡插值
        ③ 每个玻璃元素 translateZ(0) 强制建独立合成层
        手机显存一紧张，整块层被丢掉 = 白屏 / 显示不全。
   处理（只降"模糊 / 阴影 / 过渡"三样最贵的，外观与功能全保留）：
   ① 触屏设备关掉毛玻璃模糊（背景色 / 边框 / 圆角 / 文字不变）
   ② transition:all 收窄为 opacity / transform（开面板动画照旧）
   ③ 关掉 translateZ(0) 强制建层（视觉上是无操作，层数一多手机必爆）
   ④ 大阴影降成小阴影（拖动时每帧重绘便宜得多）
   只对触屏设备生效（hover:none + pointer:coarse）——
   电脑端一条规则都匹配不上，原样不动 ✓
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    .glass-effect,
    .search-upgrade-panel,
    .function-panel,
    .friend-panel,
    .navigation-menu,
    .upgrade-panel,
    .desktop-window,
    #windowsDesktopSystem .window,
    #windowsDesktopSystem .start-menu,
    #windowsDesktopSystem .context-menu,
    .desktop-toolbar,
    .toolbar-handle {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* 注意：这里故意不带 !important —— 不能压过
       .search-upgrade-panel.active 等更高优先级的定位 transform */
    .glass-effect {
        transform: none;
        will-change: auto;
    }

    /* 开面板的淡入 / 缩放动画保留（opacity + transform），
       位置 / 尺寸 / 阴影不再被 0.3s 过渡拖着跑 = 拖动丝滑 */
    .search-upgrade-panel,
    .function-panel,
    .friend-panel,
    .navigation-menu,
    .upgrade-panel,
    .glass-effect {
        transition: opacity .25s ease, transform .25s ease !important;
    }

    .desktop-window,
    #windowsDesktopSystem .window {
        transition: none !important;
    }

    /* 大模糊阴影降成小阴影（允许的降级项：阴影） */
    .search-upgrade-panel,
    .function-panel,
    .friend-panel,
    .desktop-window,
    #windowsDesktopSystem .window {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
    }

    /* 面板里滚动更跟手：滑到头不连带页面橡皮筋 */
    .search-upgrade-panel,
    .function-panel,
    .win-content,
    .window-content {
        overscroll-behavior: contain !important;
    }
}

/* ============================================================
   【20261010b 补丁·隐形按钮清除】
   "透明按钮挡住点击、一点就触发自动更新"的根源：
   关掉的升级面板只是 translateY(120px)+opacity:0 —— 看不见了，
   但命中区域还在屏幕底部（手机上左12右12横贯全宽、压住任务栏），
   点到里面隐形的"立即升级"按钮就会真的开始升级。
   同类问题：.notification（隐形通知条，挡住屏幕底部中间）、
            .tooltip（隐形提示条，挡在鼠标附近）。
   处理：这几个东西只在"显示中"才允许接收点击/聚焦，
   隐藏状态一律 pointer-events:none + visibility:hidden。
   显示中的外观、动画、功能全部原样不动。
   ============================================================ */
.upgrade-panel:not(.show) {
    pointer-events: none !important;
    visibility: hidden;
}

.notification:not(.show) {
    pointer-events: none !important;
    visibility: hidden;
}

.tooltip {
    pointer-events: none;
}

/* ============================================================
   【20261010c 补丁·自动性能适配接线 + 拖动时暂停装饰动画】
   ① 设置 → 桌面按钮 → 自动性能适配 以前没有接线（勾了没反应）。
      现在由 index.html 末尾的新增脚本控制：勾选后 body 加 dl-auto-perf，
      设备偏弱（手机/平板 或 核心数≤4 / 内存≤4GB）时再加 dl-perf-weak，
      按开关说明里写好的承诺自动轻量渲染：
      · 关掉实时毛玻璃模糊（手机流畅度提升最明显）
      · 大阴影降小
      · 暂停装饰性动效（框架特效动画 + 背景特效层）
      布局、按钮、功能完全不变；不勾选时这些规则一条都不生效。
   ② 拖动框架时，"流光 / 呼吸发光 / 彩虹描边"照旧每帧重绘会拖慢拖动
      ——照抄"漂浮"特效已有的拖动保护（toolbar-dragging 时暂停动画）。
   ============================================================ */

/* ①-1 弱设备 + 开关打开：关毛玻璃（与流畅模式同一份清单） */
body.dl-perf-weak .desktop-toolbar,
body.dl-perf-weak .toolbar-proxy-btn,
body.dl-perf-weak .toolbar-handle,
body.dl-perf-weak .modal-content,
body.dl-perf-weak .panel-overlay,
body.dl-perf-weak .navigation-menu,
body.dl-perf-weak .nav-content,
body.dl-perf-weak .page-container,
body.dl-perf-weak .desktop-float-btn,
body.dl-perf-weak .desktop-taskbar,
body.dl-perf-weak .window,
body.dl-perf-weak .search-upgrade-panel,
body.dl-perf-weak .function-panel,
body.dl-perf-weak .friend-panel {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* ①-2 弱设备 + 开关打开：暂停装饰动画与背景特效层（与流畅模式同款） */
body.dl-perf-weak .desktop-toolbar,
body.dl-perf-weak .toolbar-handle,
body.dl-perf-weak .toolbar-proxy-btn,
body.dl-perf-weak .desktop-float-btn {
    animation: none !important;
}

body.dl-perf-weak .desktop-fx-layer,
body.dl-perf-weak .desktop-toolbar::after {
    display: none !important;
}

/* ①-3 弱设备 + 开关打开：大阴影降小 */
body.dl-perf-weak .desktop-toolbar,
body.dl-perf-weak .desktop-float-btn,
body.dl-perf-weak .desktop-taskbar,
body.dl-perf-weak .window,
body.dl-perf-weak .search-upgrade-panel,
body.dl-perf-weak .function-panel,
body.dl-perf-weak .friend-panel {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ② 拖动框架时暂停其余装饰动画（与"漂浮"特效的拖动保护一致） */
body.toolbar-fx-flow .desktop-toolbar.toolbar-dragging,
body.toolbar-fx-glow .desktop-toolbar.toolbar-dragging,
body.toolbar-fx-rainbow .desktop-toolbar.toolbar-dragging {
    animation: none;
}

/* ============================================================
   【20261026】面板搬进「电脑桌面窗口」时的样式
   ------------------------------------------------------------
   ① 通用：把 .function-panel 从"浮在屏幕中间的弹窗"变成"铺满窗口内容区"
   ② AI 面板：重排成微信 / 豆包那种聊天版 —— 顶部模型条一行、模式一行、
      中间消息区占满剩余高度、底部输入条钉住，不再被一堆说明文字挤爆
   ============================================================ */

/* ---------- ① 通用 ----------
   注意：这里**不能**只写 .function-panel。
   #searchUpgradePanel（超级搜索）的类是 search-upgrade-panel，
   #friendPanel（添加好友）的类是 friend-panel —— 它们都不是 .function-panel，
   所以以前搬进窗口后面板还是 position:fixed，直接浮在屏幕上，
   窗口里只剩一个空标题栏（用户截图：左边一个空白白框，内容跑到右边）。
   改成只认 .kz-in-desktop-window 这个「已搬进窗口」的标记即可通吃所有面板。 */
#windowContent .function-panel.kz-in-desktop-window,
body #windowContent .function-panel.kz-in-desktop-window,
#windowContent .kz-in-desktop-window,
body #windowContent .kz-in-desktop-window {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: auto !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 12px 14px 12px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow-y: auto !important;
    box-sizing: border-box;
    transition: none !important;
}

#windowContent .function-panel.kz-in-desktop-window > .panel-header,
#windowContent .kz-in-desktop-window > .panel-header {
    flex: 0 0 auto !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}

/* ---------- ② AI 面板：聊天版排版 ---------- */
#windowContent #aiPanel {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 10px 12px 10px !important;
    overflow: hidden !important;
    gap: 0 !important;
}

/* 顶栏：一行模型胶囊，横向滚动，不再换成三行把聊天区挤没 */
#windowContent #aiPanel .ai-selector {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
    scrollbar-width: thin;
}
#windowContent #aiPanel .ai-selector-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    border-radius: 99px !important;
}

/* 模式条：同样一行 */
#windowContent #aiPanel .ai-mode-toggle {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
    scrollbar-width: thin;
}
#windowContent #aiPanel .mode-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
    border-radius: 99px !important;
}

/* 长说明文字在窗口里就别占地方了（设置里还能看到） */
#windowContent #aiPanel #dlModelHint { display: none !important; }

/* 状态条 / 配色 / 语音：压成一条小行 */
#windowContent #aiPanel .dl-ai-status {
    flex: 0 0 auto !important;
    font-size: 11px !important;
    padding: 3px 8px !important;
    margin: 0 0 5px !important;
}
#windowContent #aiPanel .color-options {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 0 5px !important;
}
#windowContent #aiPanel .color-option {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
}
#windowContent #aiPanel .voice-controls {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 6px !important;
    margin: 0 0 6px !important;
}
#windowContent #aiPanel .voice-btn {
    font-size: 11.5px !important;
    padding: 4px 10px !important;
    border-radius: 99px !important;
}

/* 聊天区：吃掉剩余高度，自己滚 */
#windowContent #aiPanel .ai-chat-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
#windowContent #aiPanel .ai-chat-messages {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 10px 6px !important;
    margin: 0 0 8px !important;
    border-radius: 12px !important;
}

/* 气泡：左右分开，宽度按内容走，最多 78%，绝不挤成一条竖线 */
#windowContent #aiPanel .ai-message {
    display: block !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    max-width: 78% !important;
    min-width: 0 !important;
    margin: 0 0 8px 0 !important;
    padding: 8px 12px !important;
    border-radius: 14px !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box;
}
#windowContent #aiPanel .ai-message.bot {
    margin-right: auto !important;
    border-bottom-left-radius: 4px !important;
}
#windowContent #aiPanel .ai-message.user {
    margin-left: auto !important;
    margin-right: 0 !important;
    border-bottom-right-radius: 4px !important;
}

/* 输入条：钉在底部 */
#windowContent #aiPanel .ai-input-group {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}
#windowContent #aiPanel .ai-input {
    flex: 1 1 auto !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 13.5px !important;
    padding: 8px 14px !important;
    border-radius: 99px !important;
}
#windowContent #aiPanel .ai-send-btn {
    flex: 0 0 auto !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

/* 其它模式（搜索 / 工具 / 健康…）在窗口里也要能滚 */
#windowContent #aiPanel > div:not(.ai-chat-container) {
    min-height: 0;
}

/* ============================================================
   【20261026】窗口里的 AI 聊天：再往「微信 / 豆包」那种观感靠一层
   —— 纯 CSS，不动任何 JS 结构
   ============================================================ */

/* 聊天区：浅灰底 + 内边距，气泡才"浮"得出来 */
#windowContent #aiPanel .ai-chat-messages {
    background: #f5f6f7 !important;
    border: 1px solid #e9ecf0 !important;
    padding: 12px 12px 8px !important;
}

/* 对方（AI）：白色气泡 + 头像 🤖 */
#windowContent #aiPanel .ai-message.bot {
    position: relative !important;
    margin-left: 36px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #eceff3 !important;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .04) !important;
}
#windowContent #aiPanel .ai-message.bot::before {
    content: '🤖';
    position: absolute;
    left: -36px;
    top: 1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

/* 自己：微信那种淡绿色气泡 + 头像「我」 */
#windowContent #aiPanel .ai-message.user {
    position: relative !important;
    margin-right: 36px !important;
    background: #95ec69 !important;
    color: #0f172a !important;
    border: 1px solid #86dd5c !important;
    text-align: left !important;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .04) !important;
}
#windowContent #aiPanel .ai-message.user::after {
    content: '我';
    position: absolute;
    right: -36px;
    top: 1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    line-height: 1;
}

/* 深色模式：气泡配色跟着换，别刺眼 */
.night-mode #windowContent #aiPanel .ai-chat-messages {
    background: #1e293b !important;
    border-color: #334155 !important;
}
.night-mode #windowContent #aiPanel .ai-message.bot {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #1e293b !important;
}
.night-mode #windowContent #aiPanel .ai-message.user {
    background: #15803d !important;
    color: #ecfdf5 !important;
    border-color: #166534 !important;
}

/* 模型条 / 模式条：始终从左开始排，溢出时横向滚动（否则居中会把头几个按钮裁掉） */
#windowContent #aiPanel .ai-selector,
#windowContent #aiPanel .ai-mode-toggle {
    justify-content: flex-start !important;
    align-items: center !important;
}
#windowContent #aiPanel .ai-selector > *,
#windowContent #aiPanel .ai-mode-toggle > * {
    flex: 0 0 auto !important;
}

/* ============================================================
   【20261026·全屏聊天版】让 AI 聊天"一屏放下、字看得清"
   ------------------------------------------------------------
   问题：原来模型按钮会换成 3~4 行、下面一排示例词条再挤一层，
   中间聊天区只剩一百多 px，一直在滚；输入框又小又窄，手机上更看不清。
   这里统一成：顶部两行（模型 / 模式）→ 状态 → 配色+语音 → 聊天区吃满 →
   示例词条一行 → 大输入框。窗口模式和全屏模式都适用。
   （窗口内的规则带 #windowContent 前缀，优先级更高，互不打架）
   ============================================================ */

#aiPanel {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    padding: 10px 14px 12px !important;
    gap: 0 !important;
    overflow: hidden !important;
}

/* 模型条：一行横向滚动 */
#aiPanel .ai-selector {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
}
#aiPanel .ai-selector-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    padding: 5px 11px !important;
    border-radius: 99px !important;
}

/* 模式条：一行 */
#aiPanel .ai-mode-toggle {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
}
#aiPanel .mode-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    padding: 4px 13px !important;
    border-radius: 99px !important;
}

/* 长说明文字不占地方 */
#aiPanel #dlModelHint { display: none !important; }

/* 状态条 / 配色 / 语音：各一行，尽量矮 */
#aiPanel .dl-ai-status {
    flex: 0 0 auto !important;
    font-size: 11.5px !important;
    padding: 2px 8px !important;
    margin: 0 0 5px !important;
}
#aiPanel .color-options {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 0 4px !important;
}
#aiPanel .color-option { width: 20px !important; height: 20px !important; flex: 0 0 auto !important; }
#aiPanel .voice-controls {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 6px !important;
    margin: 0 0 6px !important;
}
#aiPanel .voice-btn {
    font-size: 12px !important;
    padding: 4px 11px !important;
    border-radius: 99px !important;
}

/* 聊天区：吃满中间所有剩余高度 */
#aiPanel .ai-chat-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
#aiPanel .ai-chat-messages {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 0 8px !important;
}

/* 气泡：按内容宽度，最多 78%，文字不会被挤成竖条 */
#aiPanel .ai-message {
    display: block !important;
    width: fit-content !important;
    max-width: 78% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    word-break: break-word !important;
}
#aiPanel .ai-message.user { margin-left: auto !important; margin-right: 0 !important; }

/* 底部示例词条：一行横向滚动，不再堆成两排把输入框顶掉 */
#aiPanel .dl-ai-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 0 6px !important;
    margin: 0 !important;
    scrollbar-width: none;
}
#aiPanel .dl-ai-chips::-webkit-scrollbar { height: 0; }
#aiPanel .dl-ai-chip {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 99px !important;
}

/* 输入条：加大、加高，写字看得清 */
#aiPanel .ai-input-group {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
}
#aiPanel .ai-input,
#aiPanel .ai-input-group input,
#aiPanel .ai-input-group textarea {
    flex: 1 1 auto !important;
    height: 50px !important;
    min-height: 50px !important;
    font-size: 15.5px !important;
    line-height: 1.4 !important;
    padding: 10px 16px !important;
    border-radius: 99px !important;
}
#aiPanel .ai-send-btn {
    flex: 0 0 auto !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 18px !important;
}

/* 手机 / 小平板：面板必须真·全屏，字和输入框再放大一档 */
@media (max-width: 820px) {
    #aiPanel {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        padding: 8px 10px 10px !important;
    }
    #aiPanel .ai-selector-btn,
    #aiPanel .mode-btn { font-size: 12px !important; padding: 5px 10px !important; }
    #aiPanel .ai-message { font-size: 15px !important; max-width: 86% !important; }
    #aiPanel .ai-input,
    #aiPanel .ai-input-group input,
    #aiPanel .ai-input-group textarea {
        height: 48px !important;
        min-height: 48px !important;
        font-size: 16px !important;   /* ≥16px 手机上不会触发自动放大 */
    }
    #aiPanel .ai-send-btn { width: 48px !important; min-width: 48px !important; height: 48px !important; }
}

/* AI 全屏打开时窗口不要圆角，看着就是"整个屏幕都是聊天" */
.desktop-window.kz-win-full {
    border-radius: 0 !important;
    box-shadow: none !important;
}
.desktop-window.kz-win-full > .window-header {
    border-radius: 0 !important;
}

/* 窗口模式下的 AI：窗口自己已经有标题栏和关闭按钮了，
   面板自带的标题栏就别再重复一份 —— 省下的高度全给聊天区 */
#windowContent #aiPanel > .panel-header {
    display: none !important;
}

/* 【20261026】手机窄屏（≤480px）时页面原来会把模型条 / 语音按钮改成竖排，
   结果整屏被一排排按钮占满、聊天区没了 —— 这里强制保持横排 + 横向滚动 */
#aiPanel .ai-selector,
#aiPanel .ai-mode-toggle,
#aiPanel .voice-controls,
#aiPanel .color-options {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}
#aiPanel .ai-selector > *,
#aiPanel .ai-mode-toggle > *,
#aiPanel .voice-controls > *,
#aiPanel .color-options > * {
    flex: 0 0 auto !important;
}

/* ============================================================
   【20261026】AI 全屏聊天时，把桌面上的浮动按钮 / 框架收起来
   —— 不然它们会浮在聊天内容上面挡住字（用户说的"不要干扰"）
   只在这个状态下隐藏，关掉聊天窗口立刻恢复
   ============================================================ */
body.kz-ai-fs #floatContainer,
body.kz-ai-fs #desktopToolbar,
body.kz-ai-fs #desktopToolbarTop,
body.kz-ai-fs #desktopFloatLayer,
body.kz-ai-fs .theme-toggle,
body.kz-ai-fs .animation-control,
body.kz-ai-fs .system-status,
body.kz-ai-fs #locksys-single-btn,
body.kz-ai-fs #platformSwitch,
body.kz-ai-fs #desktopToggle,
body.kz-ai-fs .zoom-controls,
body.kz-ai-fs .hide-toggle-btn {
    display: none !important;
}

/* 全屏聊天窗口本身提到最上层，确保压在一切浮动层之上 */
.desktop-window.kz-win-full {
    z-index: 9000 !important;
}

/* ============================================================
   【20261027g】窗口左上角三个圆点：太小、点半天点不中
   ------------------------------------------------------------
   原来圆点只有 12px × 12px，鼠标得精准瞄到一个很小的圆才行。
   这里做两件事：
   ① 圆点本身放大到 18px（看着更清楚）；
   ② 用 ::before 把**可点击热区**撑到 32×32 —— 圆点外观不变，
      但鼠标落在圆点周围一圈也算点中。
   热区 32px、圆点间距 12px，中心距正好 30px，热区之间只相接不重叠，
   不会出现「点黄的变成点绿的」。
   原来的 hover 放大、:active 缩小反馈保持不变。
   ============================================================ */
.desktop-window .window-btn {
    position: relative;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* 点击热区：比圆点大一圈，透明，不挡视觉。
   做成矩形而不是圆形 —— 三个圆点中心距只有 30px（18 宽 + 12 间距），
   圆形热区稍微放大就会互相压住，想点黄的容易点到绿的。
   矩形宽 29px：水平方向正好卡在中心距以内，三个热区一个接一个、谁也不压谁，
   屏幕上每个点都归离它最近的那个按钮；高 28px：上下各多借 5px。
   能点到的面积从 18×18 变成 29×28，大了约一倍半，而且不会点错。 */
.desktop-window .window-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 29px;
    height: 28px;
    transform: translate(-50%, -50%);
}

.desktop-window .window-controls {
    gap: 12px !important;
}

/* 鼠标移到圆点上时浮出符号，一眼看出哪个是关 / 最小化 / 最大化 */
.desktop-window .window-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 11px/1 -apple-system, "Segoe UI", sans-serif;
    color: rgba(0, 0, 0, .62);
    opacity: 0;
    transition: opacity .12s ease;
    pointer-events: none;
}

.desktop-window .window-controls:hover .window-btn::after { opacity: 1; }
.desktop-window .window-btn.close::after { content: '×'; }
.desktop-window .window-btn.minimize::after { content: '−'; }
.desktop-window .window-btn.maximize::after { content: '+'; }

/* ============================================================
   【20261027i】桌面收纳盒 —— 把「顶部那条又白又矮的框」改成真正能装东西的盒子
   ------------------------------------------------------------
   原来 .page-container 一打开就是这个样子：
     · position: static，量出来是 1304 x 36 的一条纯白横条，贴在屏幕最顶上，
       还把 #windowsDesktopSystem（电脑桌面）整个往下顶掉 102px；
     · 而它里面装的东西（天气栏 / 搜索框 / 网站导航网格 / 页脚）又被
       上面那套「桌面显示时隐藏智能面板图层」的规则全部 display:none，
       所以它其实是个空壳 —— 看着碍眼，点上去也什么都不会发生。

   现在改成：
     · position: fixed —— 退出文档流，桌面再也不会被顶下去；
     · 只在「电脑桌面可见」（body.computer-desktop-visible）时才改造，
       普通网页模式下它还是原来那个居中的页面主体，一个字都不动；
     · 暗色玻璃外壳 + 标题栏，按住标题栏可拖到桌面任意位置（位置会记住）；
     · 内部三块：
         老内容槽 —— 天气 / 搜索 / 导航 / 页脚，仍由原来的开关决定显示哪个
         小组件   —— 时钟（时间 + 日期）、便签（可以直接写字，自动保存）
         软件格子 —— 点 ＋ 往里放，或把桌面图标直接拖进来，点一下就打开
    ------------------------------------------------------------
   注意：下面所有规则都带 !important，因为 1.css 里 .page-container 自带
   一堆背景/边距/圆角，行内样式压不过它们。
   ============================================================ */

/* ---- ① 外壳 ----
   收纳盒不再去改造 .page-container，而是一个独立的 div（#kzDeskBox），
   由 kz-desk-box.js 挂到 #windowsDesktopSystem（Windows 桌面）里 ——
   挂在那儿它才是「桌面上」的东西；挂在别处就会浮到黑色电脑上面去。
   z-index 取 900：压住桌面图标和壁纸，但要**低于开始菜单（999）**，
   否则一打开开始菜单 / 设置，盒子就盖在人家上面 —— 用户说的"挡住设置了"。 */
#kzDeskBox {
    position: fixed !important;
    left: 50% !important;
    top: 64px !important;
    transform: translateX(-50%) !important;
    width: 440px !important;
    max-width: 94vw !important;
    min-height: 170px !important;
    max-height: 74vh !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: none;
    flex-direction: column;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    border-radius: 14px !important;
    background: rgba(14, 18, 30, .6) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .5) !important;
    z-index: 900 !important;
    color: #eaf0ff;
    font-size: 13px;
    line-height: 1.4;
}

/* 开关在「设置 → 桌面按钮 → 桌面总开关 → 📦 桌面收纳盒」。
   注意用的是 kz-deskbox-open，不是 show-page-container ——
   后者是「天气 / 搜索 / 导航 / 页脚任意一项开着」的汇总类，
   用它的话在设置里随便打开个开关，收纳盒就自己弹出来了（用户 10-26 反馈）。
   现在只认自己那一个开关。 */
body.kz-deskbox-open #kzDeskBox { display: flex !important; }

/* 黑色电脑开着的时候不显示收纳盒 ——
   盒子是 Windows 桌面上的东西，别跑到黑色电脑里面去 */
body.computer-desktop-visible #kzDeskBox { display: none !important; }

/* ===== .page-container（那个「白条外壳」）=====
   它本来是 1304x36 的纯白横条，还会把桌面整体往下顶 102px，
   但它同时是「背景照片 / 天气栏 / 搜索框 / 网站导航 / 页脚」唯一的容器。
   以前这里直接 display:none —— 结果设置里那 7 个开关点了完全没反应
   （元素还在，父级被关掉，量出来全是 0x0），用户只看到收纳盒莫名弹出来。

   现在分三种情况：
     ① 一项都没开       → 整块不显示（桌面干净）
     ② 开了里面任意一项 → 显示成「全屏透明的承载层」：没有白底、不占 36px、
                          不把桌面顶下去、容器不吃点击（里面元素照旧可点）
     ③ 收纳盒开着       → 整块让位（内容已经被搬进盒子的「老内容槽」）
*/
#smartControlPanel .page-container { display: none !important; }

body.show-page-container #smartControlPanel .page-container {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    /* 顶部让出天气栏的高度，下面那些 static 的（搜索框 / 导航网格）才不会被压住 */
    padding: 56px 24px 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    /* 取 30：压住桌面图标（图标层是 z-index:auto），
       又低于盒子 900 / 开始菜单 999 / 设置 9000 / 窗口 50000。
       注意：这里一旦给数字就会创建层叠上下文，里面的 .bookmark-bg
       （全屏背景照片）会被整层关在里面 —— 所以背景照片单独在下面关掉，
       不让它参与这一层（桌面模式下背景交给桌面自己的壁纸体系）。 */
    z-index: 30 !important;
}

/* 容器本身不吃点击，里面的东西照旧能点 */
body.show-page-container #smartControlPanel .page-container > * {
    pointer-events: auto;
}

/* 背景照片（.bookmark-bg）：桌面模式下**不叠加**。
   它是 position:fixed 的整屏图，无论怎么调 z-index 都只能待在
   .page-container 这个层叠上下文里面 —— 要么盖住整屏图标导致点不了，
   要么被桌面壁纸挡住看不见，两头都不对。
   桌面本身有壁纸体系（个性化 → 主题壁纸中心，34 套整套搭配），
   要换背景用那个；这一项在桌面模式下保持干净。
   网页模式（没有 show-page-container）时它照旧按原来的规则走，一点没动。 */
body.show-page-container #smartControlPanel .page-container > .bookmark-bg {
    display: none !important;
}

/* 导航网格要盖在桌面图标之上才点得到（图标本身是 z-index:auto） */
body.show-page-container #smartControlPanel .page-container > .nav-grid {
    position: relative !important;
    z-index: 2 !important;
}

/* 导航网格默认 max-height:0，要靠 .active 才展开 —— 这是左上角 ☰ 按钮的原始行为，
   必须保留，否则点了 ☰ 没有任何变化（之前这里写死 max-height:none !important，
   把 ☰ 的展开/收起整个压死了）。
   现在改成：只加「展开后的最大高度」上限，展开/否仍由 .active 决定；
   .active 由 ☰ 按钮（1.js）和「设置 → 网站导航网格」开关（6.js）共同维护。 */
body.show-page-container #smartControlPanel .page-container .nav-grid.active:not(.desktop-element-hidden) {
    max-height: 2000px !important;
    overflow: visible !important;
}

/* 收起状态（没有 .active）时把内边距和边框也一起收掉 ——
   否则 max-height:0 只能压住内容，12px 的上下内边距和 1px 边框还在，
   屏幕上会留一条 26px 高的空条，看着像"没收干净"。 */
body.show-page-container #smartControlPanel .page-container > .nav-grid:not(.active) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 收纳盒开着的时候整块让位 —— 里面的东西已经搬进盒子的老内容槽了 */
body.kz-deskbox-open #smartControlPanel .page-container {
    display: none !important;
}

/* 折叠状态：只剩一条标题栏 */
#kzDeskBox.kzbox-folded {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

/* ---- ② 标题栏 ---- */
.kzbox-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 8px 0 10px;
    box-sizing: border-box;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(255, 255, 255, .07);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.kzbox-head:active { cursor: grabbing; }
.kzbox-grip { flex: 0 0 auto; font-size: 13px; opacity: .5; }
.kzbox-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #eaf0ff;
}
.kzbox-acts { flex: 0 0 auto; display: flex; gap: 4px; }
.kzbox-acts button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .12);
    color: #eaf0ff;
    font: 600 13px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .12s ease;
}
.kzbox-acts button:hover { background: rgba(255, 255, 255, .26); }
.kzbox-acts button[data-act="close"]:hover { background: #e04b4b; color: #fff; }

/* ---- ③ 内容区 ---- */
.kzbox-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kzbox-folded .kzbox-body { display: none !important; }
.kzbox-body::-webkit-scrollbar { width: 8px; }
.kzbox-body::-webkit-scrollbar-track { background: transparent; }
.kzbox-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 4px; }

/* ---- ④ 老内容槽（天气栏 / 搜索框 / 网站导航网格 / 页脚 / 背景照片） ----
   这些东西在桌面模式下被「智能面板图层隐藏规则」统一关掉了，
   收进盒子以后，这里只对「用户在设置里打开了的那些」放出来 ——
   后面带 :not(.desktop-element-hidden)，就是继续听原来那个开关的话。 */
#kzDeskBox .kzbox-legacy .navbar:not(.desktop-element-hidden),
#kzDeskBox .kzbox-legacy .header-big:not(.desktop-element-hidden),
#kzDeskBox .kzbox-legacy .nav-grid:not(.desktop-element-hidden),
#kzDeskBox .kzbox-legacy .main-footer:not(.desktop-element-hidden),
/* 背景照片别进盒子 —— 它是 position:fixed 的整屏图，一进盒子就糊满屏幕 */
#kzDeskBox .kzbox-legacy .bookmark-bg {
    display: none !important;
}
.kzbox-legacy {
    flex: 0 0 auto;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #101828;
}
.kzbox-legacy > * { max-width: 100%; }
.kzbox-legacy > .navbar { padding: 0 !important; }
.kzbox-legacy > .header-big { margin: 0 !important; }
.kzbox-legacy > .nav-grid { margin: 0 !important; }
/* 导航网格在 1.css 里 max-height: 2000px（本来是铺满整个页面的），
   收进盒子以后限一下高，不然要滚很久才到底 */
.kzbox-legacy > .nav-grid {
    max-height: 210px !important;
    overflow-y: auto !important;
}

/* ---- ⑤ 小组件 ---- */
.kzbox-widgets { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }

.kzbox-clock {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
}
.kzbox-clock-time {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.kzbox-clock-date { font-size: 12px; opacity: .72; }

.kzbox-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
}
.kzbox-search select,
.kzbox-search input {
    padding: 5px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
    color: #eaf0ff;
    font-size: 12.5px;
    outline: none;
}
.kzbox-search select { flex: 0 0 auto; }
.kzbox-search select option { background: #1a1f30; color: #eaf0ff; }
.kzbox-search input { flex: 1 1 auto; min-width: 0; }
.kzbox-search input::placeholder { color: rgba(234, 240, 255, .45); }
.kzbox-search button {
    flex: 0 0 auto;
    width: 28px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(110, 168, 255, .38);
    color: #eaf0ff;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s ease;
}
.kzbox-search button:hover { background: rgba(110, 168, 255, .6); }

.kzbox-note {
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    overflow: hidden;
}
.kzbox-note-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 11px;
    opacity: .72;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.kzbox-note textarea {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    outline: none;
    resize: vertical;
    color: #eaf0ff;
    font: 13px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.kzbox-note textarea::placeholder { color: rgba(234, 240, 255, .42); }

/* ---- ⑥ 软件格子 ---- */
.kzbox-apps { flex: 0 0 auto; }
.kzbox-apps-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11.5px;
    opacity: .72;
}
.kzbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.kzbox-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    cursor: pointer;
    overflow: hidden;
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.kzbox-cell:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .38);
}
.kzbox-cell:active { transform: scale(.94); }
.kzbox-cell.kzbox-cell-add {
    font-size: 20px;
    opacity: .6;
    color: #eaf0ff;
}
.kzbox-cell i { font-size: 17px; line-height: 1; }
.kzbox-cell img { width: 20px; height: 20px; object-fit: contain; }
.kzbox-cell > span {
    max-width: 100%;
    padding: 0 3px;
    box-sizing: border-box;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: .9;
}
.kzbox-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font: 700 10px/15px -apple-system, "Segoe UI", sans-serif;
    text-align: center;
    opacity: 0;
    transition: opacity .12s ease;
}
.kzbox-cell:hover .kzbox-del { opacity: 1; }
.kzbox-del:hover { background: #e04b4b; }
/* 从桌面拖东西进来时，整个盒子亮一下边 */
body.kzbox-dragging .kzbox-body { outline: 2px dashed rgba(110, 168, 255, .7); outline-offset: -6px; }
.kzbox-cell.kzbox-drop-target { border-color: #6ea8ff; background: rgba(110, 168, 255, .22); }

/* ---- ⑦ 添加面板（点 ＋ 弹出的选择层） ---- */
.kzbox-picker {
    position: fixed;
    z-index: 8000;
    width: 320px;
    max-width: 92vw;
    max-height: 58vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(16, 20, 32, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .6);
    color: #eaf0ff;
}
.kzbox-picker-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.kzbox-picker-head input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #eaf0ff;
    font-size: 12.5px;
    outline: none;
}
.kzbox-picker-head input::placeholder { color: rgba(234, 240, 255, .45); }
.kzbox-picker-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    padding: 7px 8px 0;
}
.kzbox-picker-tabs button {
    flex: 1 1 auto;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px;
    background: rgba(255, 255, 255, .05);
    color: #eaf0ff;
    font-size: 12px;
    cursor: pointer;
    transition: background .12s ease;
}
.kzbox-picker-tabs button:hover { background: rgba(255, 255, 255, .14); }
.kzbox-picker-tabs button.on {
    background: rgba(110, 168, 255, .28);
    border-color: rgba(110, 168, 255, .6);
    font-weight: 600;
}
.kzbox-picker-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.kzbox-picker-list::-webkit-scrollbar { width: 8px; }
.kzbox-picker-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 4px; }
.kzbox-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
}
.kzbox-picker-item:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.kzbox-picker-item i { font-size: 16px; line-height: 1; }
.kzbox-picker-item img { width: 18px; height: 18px; object-fit: contain; }
.kzbox-picker-item > span {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: .88;
}
.kzbox-picker-empty { padding: 18px 12px; text-align: center; font-size: 12px; opacity: .6; }

/* ---- ⑧ 设置里的「电脑开关机」卡片（由 kz-desk-box.js 注入） ---- */
.kz-power-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.kz-pw {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: rgba(255, 255, 255, .7);
    color: #2c3038;
    font-size: 12.5px;
    line-height: 1.5;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.kz-pw:hover { border-color: rgba(0, 0, 0, .28); }
.kz-pw[data-pw="on"]:hover {
    background: rgba(45, 170, 110, .18);
    border-color: rgba(45, 170, 110, .55);
    color: #146b41;
}
.kz-pw[data-pw="off"]:hover {
    background: rgba(224, 75, 75, .16);
    border-color: rgba(200, 60, 60, .55);
    color: #9b1c1c;
}
.kz-power-state {
    font-size: 12px;
    margin-left: 2px;
}
.kz-power-state[data-on="1"] { color: #14914f; }
.kz-power-state[data-on="0"] { color: #8a8f99; }

/* ---- ⑨ 拖拽时跟着鼠标走的"影子" ---- */
.kzbox-ghost {
    position: fixed;
    z-index: 9000;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
    background: rgba(20, 24, 38, .82);
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
    color: #eaf0ff;
    font-size: 9px;
    transform: translate(-50%, -50%);
}
.kzbox-ghost i { font-size: 15px; line-height: 1; }
.kzbox-ghost img { width: 16px; height: 16px; object-fit: contain; }

/* ============================================================
   【20261027L】收纳盒 v3 —— 放大 / 可缩放 / 拖动统一 / 功能全量
   ------------------------------------------------------------
   这一块全部是「覆盖」，不改上面的原有规则；选择器都带 #kzDeskBox
   或 .kzbox- 前缀，只影响盒子自己和盒子弹出的面板。
   ============================================================ */

/* ---- ① 外壳：更宽、更高，带右下角缩放把手 ---- */
#kzDeskBox {
    width: 584px !important;
    min-height: 300px !important;
    max-height: 80vh !important;
    font-size: 13.5px;
}
#kzDeskBox .kzbox-body { padding: 12px; gap: 12px; }

.kzbox-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 6;
}
.kzbox-resize::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, .5);
    border-bottom: 2px solid rgba(255, 255, 255, .5);
    border-radius: 0 0 4px 0;
}
body.kzbox-resizing { cursor: nwse-resize !important; }

/* ---- ② 小组件：字大一圈、留白大一圈 ---- */
#kzDeskBox .kzbox-widgets { gap: 10px; }
#kzDeskBox .kzbox-clock {
    padding: 12px 14px;
    gap: 12px;
    border-radius: 12px;
}
#kzDeskBox .kzbox-clock-time {
    font-size: 30px;
    letter-spacing: .5px;
}
#kzDeskBox .kzbox-clock-date { font-size: 13px; }

#kzDeskBox .kzbox-search {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
}
#kzDeskBox .kzbox-search select,
#kzDeskBox .kzbox-search input {
    font-size: 14px;
    padding: 7px 10px;
    border-radius: 8px;
}
#kzDeskBox .kzbox-search button {
    width: 40px;
    height: 34px;
    font-size: 15px;
    border-radius: 8px;
}

#kzDeskBox .kzbox-note { border-radius: 12px; }
#kzDeskBox .kzbox-note-bar { font-size: 12.5px; padding: 7px 12px; }
#kzDeskBox .kzbox-note textarea {
    min-height: 96px;
    font-size: 14px;
    padding: 10px 12px;
}

/* 小组件的外壳：可以用来拖动排序 */
.kzbox-wg { position: relative; border-radius: 12px; }
.kzbox-wg-grip {
    position: absolute;
    left: 3px;
    top: 3px;
    font-size: 10px;
    line-height: 1;
    color: rgba(255, 255, 255, .8);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}
.kzbox-wg:hover .kzbox-wg-grip { opacity: .55; }
.kzbox-wg.kzbox-wg-over::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    border: 2px dashed rgba(110, 168, 255, .8);
    pointer-events: none;
}
/* 小组件里的「拿走」按钮：不再 absolute 到右上角，跟着文字排 */
#kzDeskBox .kzbox-wg-del,
.kzbox-wg-del {
    position: static !important;
    margin-left: auto;
    width: 18px;
    height: 18px;
    line-height: 18px;
    flex: 0 0 auto;
    opacity: .55;
}
#kzDeskBox .kzbox-clock .kzbox-wg-del { margin-left: auto; opacity: .55; }
#kzDeskBox .kzbox-clock:hover .kzbox-wg-del,
#kzDeskBox .kzbox-note:hover .kzbox-wg-del,
#kzDeskBox .kzbox-search:hover .kzbox-wg-del { opacity: 1; }

/* ---- ③ 软件格子：格子大、图标大、名字最多两行 ---- */
#kzDeskBox .kzbox-apps-bar { font-size: 12px; margin-bottom: 9px; }
#kzDeskBox .kzbox-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}
#kzDeskBox .kzbox-cell {
    aspect-ratio: auto;
    min-height: 90px;
    gap: 6px;
    padding: 9px 5px 7px;
    border-radius: 12px;
    border-style: solid;
    border-color: rgba(255, 255, 255, .12);
}
#kzDeskBox .kzbox-cell.kzbox-cell-add {
    font-size: 26px;
    border-style: dashed;
    border-color: rgba(255, 255, 255, .22);
}
.kzbox-cell-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 30px;
    flex: 0 0 auto;
}
.kzbox-cell-ico i { font-size: 24px; line-height: 1; }
.kzbox-cell-ico img { width: 28px; height: 28px; object-fit: contain; }
.kzbox-cell-ico.kzbox-cell-emoji { font-size: 24px; line-height: 1; }
#kzDeskBox .kzbox-cell-label {
    max-width: 100%;
    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: .92;
}
#kzDeskBox .kzbox-del {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    top: 3px;
    right: 3px;
}
/* 拖到盒子上方时整块亮边 */
#kzDeskBox.kzbox-drop-hot .kzbox-body {
    outline: 2px dashed rgba(110, 168, 255, .85);
    outline-offset: -7px;
    background: rgba(110, 168, 255, .08);
}

/* ---- ④ 添加面板：三个页签、条目更大 ---- */
.kzbox-picker {
    width: 420px;
    max-height: 64vh;
}
.kzbox-picker-tabs button {
    font-size: 12.5px;
    padding: 6px 8px;
}
.kzbox-picker-tabs button em {
    font-style: normal;
    opacity: .6;
    font-size: 11px;
    margin-left: 2px;
}
.kzbox-picker-list {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
    padding: 8px;
}
.kzbox-picker-item {
    padding: 10px 4px 8px;
    gap: 5px;
    border-radius: 10px;
}
.kzbox-picker-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 28px;
    flex: 0 0 auto;
}
.kzbox-picker-ico i { font-size: 21px; line-height: 1; }
.kzbox-picker-ico img { width: 24px; height: 24px; object-fit: contain; }
.kzbox-picker-ico.kzbox-cell-emoji { font-size: 21px; line-height: 1; }
.kzbox-picker-label {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: .9;
}
.kzbox-picker-item-off { opacity: .4; }
.kzbox-picker-empty {
    grid-column: 1 / -1;
    padding: 20px 12px;
    text-align: center;
    font-size: 12.5px;
    opacity: .6;
}

/* ---- ⑤ 提示条 ---- */
.kzbox-toast {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    max-width: 86%;
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(18, 22, 34, .94);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #eaf0ff;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    transition: opacity .16s ease;
    z-index: 12;
}
.kzbox-toast.on { opacity: 1; }

/* ---- ⑥ 拖动的光标与「禁止浏览器自己拖图」 ---- */
body.kzbox-dragging,
body.kzbox-dragging * { cursor: grabbing !important; user-select: none !important; }
#kzDeskBox img,
.kzbox-picker img,
#windowsDesktopIcons .icon img,
#desktopIcons .desktop-icon img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ---- ⑦ 图标本体：kz-win-apps 那套 .kz-ic 是 width/height:100%，
        直接搬进盒子会撑满整格，这里给它固定尺寸 ---- */
.kzbox-cell-ico .kz-ic,
.kzbox-picker-ico .kz-ic {
    width: 28px;
    height: 28px;
    border-radius: 9px;
}
.kzbox-cell-ico .kz-ic svg,
.kzbox-picker-ico .kz-ic svg {
    width: 18px;
    height: 18px;
}
.kzbox-cell-ico .kz-ic-t { font-size: 12px !important; }
.kzbox-picker-ico .kz-ic-t { font-size: 11px !important; }
.kzbox-cell-ico svg,
.kzbox-picker-ico svg { max-width: 100%; max-height: 100%; }

/* 拖动时的影子：装得下「图标 + 名字」 */
.kzbox-ghost {
    width: 54px;
    height: 54px;
    font-size: 9px;
    gap: 2px;
    padding: 3px;
    box-sizing: border-box;
}
.kzbox-ghost .kz-ic {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}
.kzbox-ghost .kz-ic svg { width: 19px; height: 19px; }
.kzbox-ghost-t {
    max-width: 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

/* ============================================================
   【20261027M】收纳盒 v4 —— Windows 桌面小组件 + 应用库全部接进来
   全部是新增覆盖，不动上面的任何现有规则。
   ============================================================ */

/* ---- ① 添加面板里的分组小标题 ---- */
.kzbox-picker-group {
    grid-column: 1 / -1;
    margin: 4px 2px 0;
    padding: 4px 2px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .3px;
    color: rgba(110, 168, 255, .95);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.kzbox-picker-group:first-child { margin-top: 0; }

/* ---- ② 盒子里的 Windows 桌面小组件（.kz-tc-card 本来是 absolute 208px 的卡片） ---- */
.kzbox-tc-host {
    display: block;
    width: 100%;
    box-sizing: border-box;
}
#kzDeskBox .kz-tc-card {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    cursor: default;
    touch-action: auto;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}
#kzDeskBox .kz-tc-card .kz-tc-head { display: none !important; }
.kzbox-tc-fail {
    padding: 14px 10px;
    text-align: center;
    font-size: 12px;
    opacity: .65;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
}

/* ---- ③ 小组件的「拿走」按钮统一放到右上角（悬停才出现） ---- */
#kzDeskBox .kzbox-wg-del,
.kzbox-wg-del {
    position: absolute !important;
    top: 4px;
    right: 4px;
    margin: 0 !important;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    opacity: 0;
    z-index: 3;
}
.kzbox-wg:hover .kzbox-wg-del { opacity: .9; }
.kzbox-wg-del:hover { background: #e04b4b; }

/* ---- ④ 拖动影子里放 emoji 图标时 ---- */
.kzbox-ghost-emo { font-size: 17px; line-height: 1; }

/* ---- ⑤ 应用库那一组：条目更多，间距紧一点 ---- */
.kzbox-picker-list { align-content: start; }

/* ============================================================
   【20261027N】三件事：
     ① 桌面图标的红色删除按钮 —— 放大、换成真叉号、不用摸黑找
     ② 收纳盒层级降到 900（低于开始菜单 999），不再挡住开始菜单/设置
     ③ 开始菜单里的「桌面收纳盒」入口
   仍然全部是新增覆盖，不删改上面的任何规则。
   ============================================================ */

/* ---- ① 删除按钮 ----
   原来是 17×17、font-size:10px 的一个文字「×」，小到看不清，
   用户形容成"红色的小感叹号"。改成 22×22 + 纯 CSS 画的白叉。 */
#windowsDesktopIcons .kz-app-x,
#desktopIcons .kz-app-x {
    width: 22px !important;
    height: 22px !important;
    right: 1px !important;
    top: -3px !important;
    border-radius: 50% !important;
    background: rgba(239, 68, 68, .95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    z-index: 12 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#windowsDesktopIcons .kz-app-x::before,
#desktopIcons .kz-app-x::before {
    content: '' !important;
    width: 9px;
    height: 9px;
    background:
        linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
        linear-gradient(-45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%);
}
#windowsDesktopIcons .kz-app-x:hover,
#desktopIcons .kz-app-x:hover {
    background: #dc2626 !important;
    transform: scale(1.12);
}
/* 悬停图标时把按钮露出来（原来 opacity 0 完全看不到） */
#windowsDesktopIcons .kz-app:hover .kz-app-x,
#desktopIcons .kz-app:hover .kz-app-x { opacity: 1 !important; }

/* ---- ③ 开始菜单里的「桌面收纳盒」入口 ---- */
.start-app.kz-start-box {
    cursor: pointer;
}
.start-app.kz-start-box .kz-ic {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.start-app.kz-start-box .kz-ic svg {
    width: 20px;
    height: 20px;
}
/* 这个入口是我们自己的，别让 kz-win-apps 的「移除」按钮出现 */
.start-app.kz-start-box .kz-sx { display: none !important; }

/* ============================================================
   【20261027P】开始菜单收纳盒 #kzStartBox —— 第二个独立盒子
   ------------------------------------------------------------
   用户要的是「两个桌面两个盒子」：
     #kzDeskBox  = Windows 桌面上那个（设置 → 桌面总开关里打开）
     #kzStartBox = 开始菜单里那个（磁贴「菜单收纳盒」/「添加」面板里打开）
   两边内容各存各的，收拾一个不影响另一个。

   这一块只**新增** #kzStartBox 的规则：
   盒子内部所有结构还是 .kzbox-xxx 那套 class，老规则自动生效；
   只有原来写死成「#kzDeskBox 里面」的尺寸规则要在这里照抄一份。
   上面任何一条老规则都没有被改动。
   ============================================================ */

/* ---- ① 外壳 ----
   默认落在开始菜单右边（620px 是兜底，JS 打开时会贴着菜单重新算）；
   z-index 1005：高于开始菜单（999），低于设置（9000）和窗口（50000），
   所以它不会像以前那样盖住设置窗口。 */
#kzStartBox {
    position: fixed !important;
    left: 620px !important;
    top: 96px !important;
    transform: none !important;
    width: 584px !important;
    max-width: 94vw !important;
    min-height: 300px !important;
    max-height: 80vh !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: none;
    flex-direction: column;
    overflow: hidden !important;
    border: 1px solid rgba(20, 184, 166, .42) !important;
    border-radius: 14px !important;
    background: rgba(13, 18, 30, .72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .5) !important;
    z-index: 1005 !important;
    color: #eaf0ff;
    font-size: 13.5px;
    line-height: 1.4;
}

/* 开始菜单那个磁贴 / 添加面板里的按钮 → 给 body 加 kz-startbox-open */
body.kz-startbox-open #kzStartBox { display: flex !important; }

/* 黑色电脑开着的时候也不显示（跟桌面那个一样，别串台） */
body.computer-desktop-visible #kzStartBox { display: none !important; }

#kzStartBox.kzbox-folded {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

/* 标题栏换成青绿渐变，一眼就知道这是「开始菜单那个」，不是桌面上那个 */
#kzStartBox .kzbox-head {
    background: linear-gradient(90deg, rgba(20, 184, 166, .34), rgba(14, 165, 233, .26));
    border-bottom-color: rgba(20, 184, 166, .3);
}

/* ---- ② 内部尺寸（照抄桌面盒子的那套，保持一模一样的手感） ---- */
#kzStartBox .kzbox-body { padding: 12px; gap: 12px; }
#kzStartBox .kzbox-widgets { gap: 10px; }
#kzStartBox .kzbox-clock {
    padding: 12px 14px;
    gap: 12px;
    border-radius: 12px;
}
#kzStartBox .kzbox-clock-time { font-size: 30px; letter-spacing: .5px; }
#kzStartBox .kzbox-clock-date { font-size: 13px; }
#kzStartBox .kzbox-search {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
}
#kzStartBox .kzbox-search select,
#kzStartBox .kzbox-search input {
    font-size: 14px;
    padding: 7px 10px;
    border-radius: 8px;
}
#kzStartBox .kzbox-search button {
    width: 40px;
    height: 34px;
    font-size: 15px;
    border-radius: 8px;
}
#kzStartBox .kzbox-note { border-radius: 12px; }
#kzStartBox .kzbox-note-bar { font-size: 12.5px; padding: 7px 12px; }
#kzStartBox .kzbox-note textarea {
    min-height: 96px;
    font-size: 14px;
    padding: 10px 12px;
}
#kzStartBox .kzbox-clock .kzbox-wg-del { margin-left: auto; opacity: .55; }
#kzStartBox .kzbox-clock:hover .kzbox-wg-del,
#kzStartBox .kzbox-note:hover .kzbox-wg-del,
#kzStartBox .kzbox-search:hover .kzbox-wg-del { opacity: 1; }
#kzStartBox .kzbox-apps-bar { font-size: 12px; margin-bottom: 9px; }
#kzStartBox .kzbox-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}
#kzStartBox .kzbox-cell {
    aspect-ratio: auto;
    min-height: 90px;
    gap: 6px;
    padding: 9px 5px 7px;
    border-radius: 12px;
    border-style: solid;
    border-color: rgba(255, 255, 255, .12);
}
#kzStartBox .kzbox-cell.kzbox-cell-add {
    font-size: 26px;
    border-style: dashed;
    border-color: rgba(255, 255, 255, .22);
}
#kzStartBox .kzbox-cell-label {
    max-width: 100%;
    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: .92;
}
#kzStartBox .kzbox-del {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    top: 3px;
    right: 3px;
}
/* 把桌面图标拖到这个盒子上时，整块亮青边（和桌面那个蓝边区分开） */
#kzStartBox.kzbox-drop-hot .kzbox-body {
    outline: 2px dashed rgba(45, 212, 191, .9);
    outline-offset: -7px;
    background: rgba(45, 212, 191, .08);
}

/* 盒子里的 Windows 桌面小组件：.kz-tc-card 本来是 absolute 208px 的卡片 */
#kzStartBox .kz-tc-card {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    cursor: default;
    touch-action: auto;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}
#kzStartBox .kz-tc-card .kz-tc-head { display: none !important; }

/* 图片/图标别被浏览器原生拖动抢走 */
#kzStartBox img { -webkit-user-drag: none; user-drag: none; }

/* ---- ③ 开始菜单里的第二个磁贴 ---- */
.start-app.kz-start-box[data-kzbox="menu"] .kz-ic {
    background: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
}

/* ---- ④ 「添加」面板（#kzStartPicker）标题栏里那个「📦 收纳盒」按钮 ---- */
.kzp-head .kzbox-open-btn:hover {
    background: rgba(20, 184, 166, .26) !important;
    color: #0d9488 !important;
}

/* ============================================================
   【20261027Q】收纳盒「内嵌进开始菜单」+ 磁贴能删
   ------------------------------------------------------------
   用户的要求（10-26 傍晚）：
     · 开始菜单里那两个收纳盒图标删不了、拖不动、改不了
       → 只留一个，而且带 ×，点了就删；
     · 开始菜单自己的「＋ 添加」里能把收纳盒塞进去
       → 那个面板标题栏的「📦 收纳盒」按钮改成「塞回去 + 打开」；
     · **显示界面要在开始菜单里面显示，不要它自己的独立框架**
       → #kzStartBox 从 position:fixed 浮窗改成 position:absolute，
         直接铺满 .start-menu（挂在它里面），当成菜单里的一页。

   做法：只给 #kzStartBox 加一个 .kzst-inline class 覆盖定位，
   盒子内部的 .kzbox-xxx 结构 / 尺寸 / 手感全部沿用上面已有的规则。
   上面所有老规则一条没删没改；这些只对 .kzst-inline 生效。
   ============================================================ */

/* ---- ① 定位：从「浮窗」改成「菜单里的一页」 ---- */
#kzStartBox.kzst-inline {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, rgba(30, 37, 51, .99) 0%, rgba(19, 24, 34, .995) 100%) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    /* 压住 .start-search / .start-apps，但不能高到盖住自己的添加面板。
       取 30 而不是 4：磁贴上的删除按钮自己带 z-index:12，
       4 压不住它 —— 会有一个「×」孤零零浮在收纳盒页面中间（踩过一次）。 */
    z-index: 30 !important;
}

/* 收纳盒这一页开着的时候，把菜单原来的应用列表整块「藏起来」。
   光靠 z-index 盖不住磁贴里的 ×（它自己带 z-index），
   而且藏着还能防止隔着页面点到下面的应用 / 搜索框。
   用 visibility 不用 display —— 菜单尺寸一点不变，关掉收纳盒立刻回来。 */
body.kz-startbox-open #windowsDesktopSystem .start-menu .start-apps,
body.kz-startbox-open #windowsDesktopSystem .start-menu .start-search {
    visibility: hidden !important;
}

/* 内嵌的时候整个盒子就是菜单本身，别再叠一层模糊 */
#kzStartBox.kzst-inline.kzbox-folded {
    height: auto !important;
    max-height: none !important;
}

/* ---- ② 标题栏：不能拖（拖了也没地方去），但按钮照旧 ---- */
#kzStartBox.kzst-inline .kzbox-grip { display: none; }
#kzStartBox.kzst-inline .kzbox-head {
    cursor: default;
    height: 40px;
    padding: 0 10px 0 14px;
    background: linear-gradient(90deg, rgba(20, 184, 166, .30), rgba(14, 165, 233, .18));
    border-bottom: 1px solid rgba(20, 184, 166, .28);
    border-radius: 8px 8px 0 0;
}
#kzStartBox.kzst-inline .kzbox-title { font-size: 13px; letter-spacing: .5px; }
#kzStartBox.kzst-inline .kzbox-acts button {
    background: rgba(255, 255, 255, .14);
}
#kzStartBox.kzst-inline .kzbox-acts button[data-act="close"] {
    font-size: 15px;
    font-weight: 700;
}

/* ---- ③ 内容区：铺满剩下的高度，自己滚 ---- */
#kzStartBox.kzst-inline .kzbox-body {
    padding: 14px;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}
#kzStartBox.kzst-inline .kzbox-resize { display: none !important; }

/* 滚动条细一点，别把开始菜单撑丑 */
#kzStartBox.kzst-inline .kzbox-body::-webkit-scrollbar { width: 8px; }
#kzStartBox.kzst-inline .kzbox-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 8px;
}
#kzStartBox.kzst-inline .kzbox-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .3);
}

/* ---- ④ 开始菜单里那个磁贴的 ×（.kz-box-tile-x） ----
   以前磁贴没有 ×，用户说「删不了」。这个 × 只删磁贴本身，
   盒子里收的东西一件都不动；想加回来点「＋ 添加 → 📦 收纳盒」。 */
.start-app.kz-start-box .kz-box-tile-x {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font: 600 12px/18px -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    text-align: center;
    cursor: pointer;
    /* 常显半透明：用户抱怨过「删不了」，藏到 hover 里他更找不着 */
    opacity: .55;
    transition: opacity .12s ease, background .12s ease, transform .12s ease;
    z-index: 12;
}
.start-app.kz-start-box:hover .kz-box-tile-x { opacity: 1; }
.start-app.kz-start-box .kz-box-tile-x:hover {
    background: #e0483c;
    transform: scale(1.12);
    opacity: 1;
}

/* 拖磁贴的时候给个手感 */
.start-app.kz-start-box.kz-start-dragging {
    opacity: .72;
    transform: scale(.96);
    z-index: 20;
}

/* ============================================================
   【20261027S】添加面板：能拖、能滚、高度不超屏
   ------------------------------------------------------------
   用户反馈（10-26 傍晚第二张图）：
     · 应用 440 / 桌面功能 41 / 小组件 46 三个页签，往下滑不动
     · 收纳盒自己的这个列表框架「一动不动」—— 拖不了

   原因：
     · 面板位置用 Math.min(盒子底 + 8, innerHeight - 340) 一句话算，
       高度又由内容撑开，400 多个应用一屏放不完时下半截直接跑到屏幕外，
       列表的可视区被挤没了，看起来就是"滑不动"；
     · 面板本身根本没绑拖动。

   现在：JS 里 placePicker() 算死宽高并保证整块落在视口内，
   bindPickerDrag() 按住标题栏能拖，bindPickerWheel() 在面板任意位置
   滚轮都翻列表。这里只补样式，上面所有老规则一条没动。
   ============================================================ */

/* 标题栏可以拖 */
.kzbox-picker-head {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.kzbox-picker-dragging .kzbox-picker-head { cursor: grabbing; }
body.kzbox-dragging,
body.kzbox-dragging * { cursor: grabbing !important; }

/* 滚动条做明显一点，让人一眼知道下面还有东西 */
.kzbox-picker-list::-webkit-scrollbar { width: 10px; }
.kzbox-picker-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
    border-radius: 6px;
}
.kzbox-picker-list::-webkit-scrollbar-thumb {
    background: rgba(140, 190, 255, .55);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.kzbox-picker-list::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 190, 255, .85);
    background-clip: padding-box;
}

/* 列表本身要能滚动 —— 有的主题会把 overflow 改掉，这里钉死 */
.kzbox-picker .kzbox-picker-list {
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

/* 分组标题别被挤成一行小字 */
.kzbox-picker .kzbox-picker-group {
    grid-column: 1 / -1;
    position: sticky;
    top: -6px;
    z-index: 2;
    padding: 5px 6px;
    margin: 2px -2px 0;
    border-radius: 6px;
    background: rgba(16, 20, 32, .96);
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(234, 240, 255, .72);
}

/* ---- 【20261027T】添加面板每个格子的高度（顺手修「只有图标没有名字」） ----
   面板高度一旦算死（placePicker 里那个 ph），grid 的 auto 行在这种
   「高度受限 + 溢出滚动」的情况下会被压成 20px：图标 28px 直接顶出格子，
   下面那行 11px 的名字被压成 0 高 —— 截图上就是"只有图标、没名字"。
   这里把每格的最小高度钉住，名字给 2 行固定行高，格子就不会再塌。 */
.kzbox-picker .kzbox-picker-item {
    min-height: 62px;
    height: auto !important;
    align-self: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px 4px 7px;
}
.kzbox-picker .kzbox-picker-item .kzbox-picker-ico {
    flex: 0 0 28px;
    height: 28px;
}
.kzbox-picker .kzbox-picker-item .kzbox-picker-label {
    display: block;
    flex: 0 0 auto;
    min-height: 13px;
    max-height: 26px;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-all;
    overflow: hidden;
    text-align: center;
    opacity: .9;
}

/* ============================================================
   【20261027V】桌面承载层里的老元素：排版与外观
   ------------------------------------------------------------
   背景：设置 → 桌面按钮 → 桌面总开关 里那一批「显示 XX」，
   对应的是原项目网页主体里的元素。以前 .page-container 被
   display:none 整块关掉，开关写了存档但桌面上一个都看不见
   —— 用户反馈「点了没效果，还莫名其妙弹出收纳盒」。
   现在承载层能显示了（见上面那段），但直接铺开很难看：
   导航网格是 20px 一列的密密麻麻一大片，天气栏只有 16px 高。
   这里只补「桌面承载层里」的排版，网页模式与其它地方一概不碰。
   ============================================================ */

/* ① 网站导航网格：限宽居中 + 玻璃底板，像一块正经的导航面板，
      不再糊满整屏、跟桌面图标混成一片。 */
body.show-page-container #smartControlPanel .page-container > .nav-grid {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 12px !important;
    gap: 10px !important;
    /* 用 border-box：否则收起（max-height:0）时那 12px 上下内边距还会撑着，
       屏幕上会留一条 26px 高的空条 —— 收起来就要真的收干净 */
    box-sizing: border-box !important;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)) !important;
    border-radius: 16px !important;
    background: rgba(10, 14, 24, .46) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .12) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28) !important;
}

/* ② 顶部天气栏：和风天气插件没加载时只有一个 16px 的空条，
      给个最小高度和底色，至少不会像"屏幕漏了一条线"。 */
body.show-page-container #smartControlPanel .page-container > .navbar {
    min-height: 36px !important;
    border-radius: 0 0 12px 12px !important;
    background: rgba(10, 14, 24, .55) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ---- 【20261027W】桌面图标层与「导航面板」明确分层 ----
   只靠 .nav-grid 自己的 z-index:2 压不住图标（#windowsDesktopIcons 是
   position:relative + z-index:auto，同一个层叠上下文里谁也不让谁，
   实测点导航第一格命中的还是桌面图标）。
   这里在「承载层显示中」时，把图标层钉到 1、导航钉到 2 —— 明确的上下关系。
   不影响不开任何开关时的桌面（那条规则只在 show-page-container 下生效）。 */
body.show-page-container #windowsDesktopIcons {
    position: relative !important;
    z-index: 1 !important;
}
body.show-page-container #smartControlPanel .page-container > .nav-grid {
    z-index: 2 !important;
}

/* ============================================================
   【20261027X】设置 → 显示：让每一个开关都真的看得见
   ------------------------------------------------------------
   实测（无头 Edge，1366×768，进入 Windows 桌面后逐项打开 21 个开关）：
     ✅ 右下角框架 70×126 · 右上角框架 70×70 · 漂浮按钮层 1340×599
     ❌ 收纳盒 .page-container 0×0 · 背景照片 0×0 · 收藏夹按钮组 0×0
     ❌ 导航网格 0×0 · 天气栏 0×0 · 搜索框 0×0 · 状态指示器 0×0
     ❌ 居中按钮 0×0 · 梅干阿牛框架 0×0 · 页脚 0×0
     ❌ 右下角框架里那 7 个按钮 0×0（它们跟着框架走，单开本来就没反应）
   原因有两层：
     ① 这批元素被「电脑桌面图层隐藏规则」整块 display:none !important；
     ② 收纳盒老内容槽那段（7790 行）只给 .bookmark-bg 写了 display:none，
        另外四个选择器一个属性都没写 —— 等于空转，搬进盒子也还是空的。
   这里只补 display / 定位，不动任何一条已有规则。
   ============================================================ */

/* ---- ① 收纳盒老内容槽：设置里打开了的，按原样放出来 ---- */
/* 天气栏（Bootstrap .fixed-top）搬进盒子必须改回 static，否则会钉在视口顶部 */
#kzDeskBox .kzbox-legacy > .navbar:not(.desktop-element-hidden) {
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    z-index: auto !important;
}

/* 搜索框（原项目里表单已被注释，是个空壳，只有一条 0 高的边） */
#kzDeskBox .kzbox-legacy > .header-big:not(.desktop-element-hidden) {
    display: block !important;
    width: 100% !important;
}

/* 网站导航网格 */
#kzDeskBox .kzbox-legacy > .nav-grid:not(.desktop-element-hidden) {
    display: grid !important;
    max-height: 210px !important;
    overflow-y: auto !important;
    width: 100% !important;
}

/* 页脚（原项目里内容已被注释，同样是空壳） */
#kzDeskBox .kzbox-legacy > .main-footer:not(.desktop-element-hidden) {
    display: block !important;
    width: 100% !important;
}

/* 状态指示器（fixed 定位，搬进盒子同样要改回 static） */
#kzDeskBox .kzbox-legacy > .system-status:not(.desktop-element-hidden) {
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    align-items: center !important;
    flex-direction: row !important;
}

/* 居中功能按钮（平时是空的，只有展开链接菜单时才装东西） */
#kzDeskBox .kzbox-legacy > .center-buttons-container:not(.desktop-element-hidden) {
    display: flex !important;
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    z-index: auto !important;
    max-height: none !important;
    pointer-events: auto !important;
}

/* 天气栏：靠「和风天气」插件出内容，插件没加载成功时高度是 0，
   打开开关也像没反应 —— 这里补一行占位说明。 */
#kzDeskBox .kzbox-legacy > .navbar:not(.desktop-element-hidden):has(#he-plugin-simple:empty)::after {
    content: "天气栏：和风天气插件没加载成功（离线 / 被浏览器拦了），这里只剩一条底";
    flex: 1 1 auto;
    padding: 6px 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
}

/* ---- ② 空壳项：打开以后至少让人看见「这块本来就空的」 ---- */
/* 搜索框 / 页脚在原项目里内容被注释掉了，开关打开也只有一条 0 高的空边，
   看起来和「开关坏了」一模一样。这里给它们补一行很轻的占位说明。 */
#kzDeskBox .kzbox-legacy > .header-big:not(.desktop-element-hidden):not(:has(*))::after,
#kzDeskBox .kzbox-legacy > .header-big:not(.desktop-element-hidden) > .s-search:not(:has(*))::after {
    content: "搜索框：原项目里这块表单已被注释，当前版本没有输入框（要搜索请用右上角 🔍）";
    display: block;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 8px;
}
#kzDeskBox .kzbox-legacy > .main-footer:not(.desktop-element-hidden):not(:has(*))::after {
    content: "页脚：原项目里这块内容已被注释，当前版本没有文字（留着是为了布局完整）";
    display: block;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 8px;
}
#kzDeskBox .kzbox-legacy > .center-buttons-container:not(.desktop-element-hidden):not(:has(*))::after {
    content: "居中功能按钮：平时是空的，点主按钮展开「链接菜单」时才会出现那一圈按钮";
    display: block;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 8px;
}

/* ---- ③ 电脑桌面模式（body.computer-desktop-visible）下，
        用户在设置里打开的网页元素也放行 ----
   注意：电脑桌面那层 z-index 1000 会把它们挡住，所以这一条主要是让
   「白天模式 / 网页模式」下开关立刻有反应；桌面模式想看内容请用收纳盒。 */
body.computer-desktop-visible .navbar.kz-vis-on { display: flex !important; }
body.computer-desktop-visible .header-big.kz-vis-on { display: block !important; }
/* 【20261027Z3】导航网格【绝不在桌面上铺开】
   这一条原来写的是 `body.computer-desktop-visible .nav-grid.kz-vis-on{display:grid}`，
   结果就是「点完 ☰ 之后，一整张彩色方块图直接糊在桌面上」——用户看到的就是那张"单独冒出来的图片"。
   现在改成：桌面模式下它只在「📦 收纳盒 → 老内容槽」里出现（见 #kzDeskBox .kzbox-legacy > .nav-grid），
   桌面上要导航请点 ☰，打开独立的「KZADJ AI 智能导航」浮层。
   网页模式（没有 computer-desktop-visible）完全不受影响，照旧。 */
body.computer-desktop-visible #kzDeskBox .kzbox-legacy > .nav-grid.kz-vis-on { display: grid !important; }
body.computer-desktop-visible .system-status.kz-vis-on { display: flex !important; }
body.computer-desktop-visible .center-buttons-container.kz-vis-on { display: flex !important; }
body.computer-desktop-visible .main-footer.kz-vis-on { display: block !important; }
body.computer-desktop-visible .control-bar.kz-vis-on { display: flex !important; }
body.computer-desktop-visible #floatContainer.kz-vis-on { display: flex !important; }
body.computer-desktop-visible .mega-new-door-frame.kz-vis-on { display: block !important; }
body.computer-desktop-visible .bookmark-bg.kz-vis-on { display: block !important; pointer-events: none !important; }


/* ============================================================
   【20261027Z2】左上角 ☰ 点不动（真凶：被桌面层压在下面）
   ------------------------------------------------------------
   实测（无头 Edge，1366×768，桌面模式，打开「顶部控制栏」）：
     · .control-bar 是 position:fixed; top:2px; left:1px; z-index:100
     · 整个电脑桌面 .computer-desktop 是 position:fixed; z-index:1000
   也就是说这排按钮虽然"看得见"（桌面层背景是透明的，所以能从下面透出来），
   但它在桌面层的下面 —— 点下去的每一次都落在桌面任务栏（.desktop-taskbar）上，
   按钮本身收不到 click。这就是"第一个按钮点了没反应"的真正原因，
   和 JS 绑定无关（绑定那边也一起修了，见 1.js toggleNav）。
   另外 top:2px 还跟顶部任务栏（45px 高）叠在一起，第一个按钮正好压在「开始」上。

   修法：只把层级提到桌面层之上（1100 > 1000），位置**一点不动** ——
   保持你原来看到的那一排，只是从"看得见、点不到"变成"看得见、也点得到"。
   只对「桌面模式 + 用户自己打开了顶部控制栏」生效，其余情况一个属性都不动。
   ============================================================ */
body.computer-desktop-visible .control-bar.kz-vis-on {
    z-index: 1100 !important;
}


/* ============================================================
   【20261027AB】收纳盒：老内容默认收起 + 导航方块在盒子里排整齐
   ------------------------------------------------------------
   用户 10-27 反馈：只开了「桌面收纳盒」，盒子里就摊着天气栏、52 个彩色
   导航方块（字被挤成竖排）、搜索框、页脚 —— 又挤又乱，"哪儿冒出来的"。
   内容本身没问题（就是 .page-container 里原来那些），问题在「一股脑全铺开」：
     · 盒子宽 380px 左右，导航网格按 20px 一格 auto-fit → 一格仅 20px，
       中文被压成竖排，看着像一堵彩色栅栏；
     · 老内容槽没有开关，盒子一开就全露出来。
   这里两件事：
     ① 老内容槽默认折叠，上面加一条「▤ 老内容」按钮，点一下才展开；
     ② 展开时导航方块按 64px 一格重排、字号回到 10.5px，正常横排。
   所有规则都只作用于 #kzDeskBox，盒子之外的元素一个像素都不动。
   ============================================================ */

/* ---- ① 折叠条 ---- */
#kzDeskBox .kzbox-legacy-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px 10px;
    box-sizing: border-box;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: #dbe4ff;
    font: inherit;
    font-size: 11.5px;
    line-height: 1;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease;
}
#kzDeskBox .kzbox-legacy-bar:hover { background: rgba(255, 255, 255, .13); }
#kzDeskBox .kzbox-legacy-bar .kzlb-ic { flex: 0 0 auto; opacity: .85; }
#kzDeskBox .kzbox-legacy-bar .kzlb-t {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#kzDeskBox .kzbox-legacy-bar .kzlb-x { flex: 0 0 auto; opacity: .7; font-size: 11px; }

/* ---- ② 默认折叠 ----
   kz-desk-box.js 的 refreshLegacy() 会往槽上写行内 display，
   所以这里必须 !important 才压得住；只有盒子带了 .kzbox-legacy-open 才展开。 */
#kzDeskBox .kzbox-legacy { display: none !important; }
#kzDeskBox.kzbox-legacy-open .kzbox-legacy {
    display: block !important;
    max-height: 220px !important;
    overflow-y: auto !important;
}

/* ---- ③ 展开后：导航方块排整齐（盒子窄，20px 一格会把人逼成竖排） ---- */
#kzDeskBox .kzbox-legacy > .nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)) !important;
    gap: 6px !important;
    justify-content: center !important;
    padding: 2px !important;
}
#kzDeskBox .kzbox-legacy > .nav-grid .nav-item {
    padding: 7px 4px !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    border-radius: 7px !important;
    word-break: keep-all !important;
    overflow: hidden !important;
}


/* ============================================================
   【20261027AC】「设置 → 桌面按钮 → 底部框架按钮」7 个开关关掉后没反应
   ------------------------------------------------------------
   实测（无头 Edge，强制触发 load 后逐项拨开关）：
     · 设置确实生效了，按钮上也真的加上了 class="desktop-btn-hidden"，
       可是 computed display 还是 flex —— 按钮照样挂在框架上。
   原因只有一个：权重打不过。
     .desktop-btn-hidden            → (0,1,0) + !important
     .desktop-toolbar > *:not(.toolbar-handle) → (0,2,1) + !important  ← 更具体，赢
     .desktop-toolbar.collapsed > #locksys-single-btn → (1,1,0) + !important ← 更赢
   所以「锁屏 / 夜间 / 电脑 / 安卓 / 隐藏 / 放大缩小 / 把手」这 7 个开关
   全部看着像坏的（其实只是样式被压住了）。
   修法：给隐藏规则加上 id 前缀（1,1,1），并放在文件最后 —— 只改权重，不改任何行为。
   ============================================================ */
body #desktopToolbar > .desktop-btn-hidden,
body #desktopToolbarTop > .desktop-btn-hidden,
body .desktop-toolbar .desktop-btn-hidden,
body #desktopToolbar.collapsed > #locksys-single-btn.desktop-btn-hidden,
body #desktopToolbar > .zoom-controls.desktop-btn-hidden,
body #desktopToolbar > .hide-toggle-btn.desktop-btn-hidden {
    display: none !important;
}


/* ============================================================
   【20261027AD】「图片设置」面板：透明度滑块在桌面上要看得见变化
   ------------------------------------------------------------
   那 4 个滑块（亮度 / 对比度 / 饱和度 / 透明度）原来只作用在 #img-bg 上，
   桌面模式下那层是隐藏的，拖了等于没拖。
   亮度 / 对比度 / 饱和度 由 1.js 直接写到 #bgContainer 的行内 filter 上，
   不用 CSS 配合；只有「透明度」需要一个落点：
   它原来控制 .gradient-linear 的浓度，桌面上没有那层渐变，
   于是改控制壁纸上面那层压暗遮罩（.kz-wall-layer::after）的浓度。
   变量 --kz-wall-dim 由 1.js 写在 #bgContainer 上，class 挂在 body 上，
   只有用户真拖过滑块才生效 —— 不动默认外观。
   ============================================================ */
body.kz-wall-dim-on #bgContainer .kz-wall-layer::after {
    opacity: var(--kz-wall-dim, 0.55) !important;
}

/* ============================================================
   【20261027E】收纳盒「全透明玻璃」 + 开始菜单的「🌐 网站」面板
   ------------------------------------------------------------
   用户 10-27 要求：
     ① 收纳盒（以及之后从开始菜单打开的网站面板）要「全部透明」，
        能透出后面的壁纸；
     ② 收纳盒里那 52 个彩色网站方块不要了，改到开始菜单里看
        （节点搬家逻辑在 kz-desk-box.js 里，这里只管长相）。
   做法：高透明度深色玻璃 + 较大模糊，文字加一点投影保证可读。
   这一段全是覆盖规则，放在文件最后 —— 同权重时后出现的赢，
   前面那些老规则一条没删，出问题把这一段整段注释掉就回到原样。
   ============================================================ */

/* ---- ① 收纳盒本体 ---- */
#kzDeskBox {
    background: rgba(10, 16, 28, .28) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, .38) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

#kzDeskBox .kzbox-head {
    background: rgba(255, 255, 255, .10) !important;
    border-bottom-color: rgba(255, 255, 255, .18) !important;
}

#kzDeskBox .kzbox-legacy {
    background: rgba(255, 255, 255, .10) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    color: #fff !important;
}

/* 盒子里的滑块 / 进度条这类浅色底的东西在透明玻璃上要压暗一点 */
#kzDeskBox input[type="range"] {
    background: rgba(255, 255, 255, .22) !important;
}

/* ---- ② 开始菜单的「🌐 网站」磁贴 ---- */
.kz-sites-app .kz-ic {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%) !important;
}

/* ---- ③ 网站列表面板（从开始菜单磁贴点开） ---- */
#kzSitesPanel {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(780px, 92vw) !important;
    max-height: 76vh !important;
    display: none;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: rgba(10, 16, 28, .72) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, .40) !important;
    box-shadow: 0 26px 64px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    z-index: 1200 !important;
}

#kzSitesPanel.kz-open { display: flex !important; }

.kz-sp-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px 0 14px;
    background: rgba(255, 255, 255, .10);
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.kz-sp-title {
    flex: 1 1 auto;
    font: 600 13px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    letter-spacing: .3px;
}

.kz-sp-title small {
    font-weight: 400;
    font-size: 11px;
    opacity: .72;
    margin-left: 6px;
}

.kz-sp-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font: 600 13px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    cursor: pointer;
    transition: background .12s ease;
}

.kz-sp-close:hover { background: #e04b4b; }

.kz-sp-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
}

.kz-sp-grid::-webkit-scrollbar { width: 8px; }
.kz-sp-grid::-webkit-scrollbar-track { background: transparent; }
.kz-sp-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .24); border-radius: 4px; }

.kz-sp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 6px;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .13);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
    transition: background .12s ease, transform .12s ease;
}

.kz-sp-item:hover {
    background: rgba(255, 255, 255, .22);
    transform: translateY(-1px);
}

.kz-sp-ic {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, .18);
    flex: 0 0 auto;
}

/* ============================================================
   【20261028A】网站面板的「编辑」部件
   ------------------------------------------------------------
   用户 10-28 要求：网站面板里也要有原来桌面那套操作 ——
   拖动排序、删除、更换（名字 / 网址 / 图标）、恢复。
   这一段只管长相，逻辑在 kz-desk-box.js 末尾那个 IIFE 里。
   全段为新增规则，不影响任何老样式。
   ============================================================ */

/* 头部小按钮（＋ 添加 / ↺ 恢复） */
#kzSitesPanel .kz-sp-btn {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font: 600 14px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    cursor: pointer;
    transition: background .12s ease;
    text-shadow: none;
}

#kzSitesPanel .kz-sp-btn:hover { background: rgba(255, 255, 255, .30); }

/* 名字标签 */
#kzSitesPanel .kz-sp-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 每格右上角的 ✏️：平时藏着，鼠标移上去才出现 */
#kzSitesPanel .kz-sp-pen {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, .42);
    color: #fff;
    font-size: 10px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(.9);
    transition: opacity .12s ease, transform .12s ease, background .12s ease;
    z-index: 2;
}

#kzSitesPanel .kz-sp-item:hover .kz-sp-pen {
    opacity: 1;
    transform: scale(1);
}

#kzSitesPanel .kz-sp-pen:hover { background: #2563eb; }

/* 让格子成为 ✏️ 的定位基准 */
#kzSitesPanel .kz-sp-item { position: relative; }

/* 底部一行操作提示 */
#kzSitesPanel .kz-sp-hint {
    flex: 0 0 auto;
    padding: 7px 12px 9px;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .62);
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
}

/* 空列表 */
#kzSitesPanel .kz-sp-empty {
    grid-column: 1 / -1;
    padding: 34px 12px;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .68);
}

/* 拖动中 */
#kzSitesPanel .kz-sp-dragging {
    opacity: .38;
    outline: 2px dashed rgba(255, 255, 255, .55);
}

/* 恢复菜单 */
#kzSitesPanel .kz-sp-menu {
    position: absolute;
    min-width: 196px;
    padding: 5px;
    border-radius: 10px;
    background: rgba(16, 22, 34, .96);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
    display: none;
    z-index: 5;
}

#kzSitesPanel .kz-sp-menu.kz-on { display: block; }

#kzSitesPanel .kz-sp-menu button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #e8eef8;
    font: 12.5px/1.3 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    text-align: left;
    cursor: pointer;
}

#kzSitesPanel .kz-sp-menu button:hover { background: rgba(255, 255, 255, .14); }
#kzSitesPanel .kz-sp-menu button[disabled] { opacity: .38; cursor: default; }
#kzSitesPanel .kz-sp-menu button[disabled]:hover { background: transparent; }

/* ---- 编辑小窗 ---- */
#kzSitesEditor {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 8, 16, .42);
    z-index: 50000;
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

#kzSitesEditor.kz-on { display: flex; }

#kzSitesEditor .kz-se-win {
    width: min(340px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0 0 12px;
    border-radius: 14px;
    color: #fff;
    background: rgba(16, 22, 34, .97);
    border: 1px solid rgba(255, 255, 255, .26);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
}

#kzSitesEditor .kz-se-head {
    display: flex;
    align-items: center;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

#kzSitesEditor .kz-se-t { flex: 1 1 auto; font-size: 13px; }

#kzSitesEditor .kz-se-x {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

#kzSitesEditor .kz-se-x:hover { background: #e04b4b; }

#kzSitesEditor .kz-se-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 0;
}

#kzSitesEditor .kz-se-row span {
    flex: 0 0 34px;
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

#kzSitesEditor .kz-se-row input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 12.5px;
    outline: none;
}

#kzSitesEditor .kz-se-row input:focus { border-color: #38bdf8; }

#kzSitesEditor .kz-se-lb {
    padding: 11px 12px 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

#kzSitesEditor .kz-se-emojis {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 0 12px;
}

#kzSitesEditor .kz-se-em {
    height: 28px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

#kzSitesEditor .kz-se-em:hover { background: rgba(255, 255, 255, .22); }
#kzSitesEditor .kz-se-em.kz-on { border-color: #38bdf8; background: rgba(56, 189, 248, .26); }

#kzSitesEditor .kz-se-upload {
    display: flex;
    gap: 8px;
    padding: 9px 12px 0;
}

#kzSitesEditor .kz-se-file,
#kzSitesEditor .kz-se-clr {
    flex: 1 1 auto;
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
}

#kzSitesEditor .kz-se-file input { display: none; }
#kzSitesEditor .kz-se-file:hover,
#kzSitesEditor .kz-se-clr:hover { background: rgba(255, 255, 255, .2); }

#kzSitesEditor .kz-se-prev {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .6);
}

#kzSitesEditor .kz-se-prev .kz-sp-ic {
    width: 30px;
    height: 30px;
    font-size: 15px;
}

#kzSitesEditor .kz-se-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 0;
}

#kzSitesEditor .kz-se-gap { flex: 1 1 auto; }

#kzSitesEditor .kz-se-del,
#kzSitesEditor .kz-se-ok {
    padding: 7px 14px;
    border: 0;
    border-radius: 8px;
    font-size: 12.5px;
    cursor: pointer;
    color: #fff;
}

#kzSitesEditor .kz-se-del { background: rgba(224, 75, 75, .22); border: 1px solid rgba(224, 75, 75, .5); }
#kzSitesEditor .kz-se-del:hover { background: rgba(224, 75, 75, .5); }
#kzSitesEditor .kz-se-ok { background: #2563eb; }
#kzSitesEditor .kz-se-ok:hover { background: #1d4ed8; }

/* 底部小提示（删除 / 保存后的那一句） */
#kzSitesToast {
    position: fixed;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%) translateY(6px);
    max-width: min(520px, 86vw);
    padding: 9px 16px;
    border-radius: 10px;
    background: rgba(14, 18, 28, .94);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    color: #fff;
    font: 12.5px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    text-align: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

#kzSitesToast.kz-on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 【20261028A】补的两块内容（顶部搜索框 / 页脚一行字）—— 原来都是空壳 */
.kz-ss-form {
    display: flex;
    gap: 8px;
    width: min(560px, 86vw);
    margin: 0 auto;
    box-sizing: border-box;
}

.kz-ss-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 15px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, .30);
    background: rgba(18, 24, 36, .62);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font: 14px/1.2 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    outline: none;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

.kz-ss-input::placeholder { color: rgba(255, 255, 255, .58); }
.kz-ss-input:focus { border-color: #38bdf8; }

.kz-ss-btn {
    flex: 0 0 46px;
    height: 44px;
    border: 0;
    border-radius: 11px;
    background: #2563eb;
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

.kz-ss-btn:hover { background: #1d4ed8; }

.kz-footer-line {
    padding: 20px 12px;
    text-align: center;
    font: 12px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: rgba(255, 255, 255, .78);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

/* ============================================================
   【20261028B】电脑桌面模式下，设置里这些开关真正看得见
   ------------------------------------------------------------
   病因（10-28 实测）：
     桌面层 .computer-desktop 是 position:fixed; z-index:1000，
     而承载层 .page-container 只有 z-index:30 ——
     所以「顶部天气栏 / 搜索框 / 状态指示器 / 页脚 / 居中功能按钮 /
     漂浮按钮组 / 网站导航网格」这些开关拨上去，元素确实 display 了，
     但整层被桌面压在下面，屏幕上一个像素都看不到 → 用户就是「没效果」。
     另外 .nav-grid 还被 20261027Z3 那条规则强制 display:none。
   修法：
     ① 只在「桌面模式 + 用户主动打开了里面某项」时，把承载层提到桌面之上
        （1050 > 1000，但低于收纳盒 900？不，低于开始菜单/设置窗口，够用）；
     ② 导航网格放行，但不像以前那样整屏铺开 —— 限宽 1080 / 限高 48vh / 可滚动；
     ③ 底部留出任务栏高度，免得页脚压住「开始」按钮点不到。
   全部只在 body.show-page-container 成立时生效（也就是你真的开了某项），
   所以默认那个干净的桌面一点没变。
   ============================================================ */
body.computer-desktop-visible.show-page-container #smartControlPanel .page-container {
    z-index: 1050 !important;
    padding-bottom: 58px !important;
}

/* 导航网格：桌面模式下放行，但收成一个「玻璃面板」，不再糊满整屏 */
body.computer-desktop-visible.show-page-container #smartControlPanel .page-container > .nav-grid.kz-vis-on {
    display: grid !important;
    width: min(1080px, 92vw) !important;
    max-height: 48vh !important;
    overflow-y: auto !important;
    margin: 8px auto 0 !important;
    padding: 12px !important;
    box-sizing: border-box;
    border-radius: 14px;
    background: rgba(10, 16, 28, .34) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
}

body.computer-desktop-visible.show-page-container #smartControlPanel .page-container > .nav-grid.kz-vis-on::-webkit-scrollbar {
    width: 8px;
}

body.computer-desktop-visible.show-page-container #smartControlPanel .page-container > .nav-grid.kz-vis-on::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .26);
    border-radius: 4px;
}

/* 页脚 / 搜索框在桌面模式下也压不到任务栏 */
body.computer-desktop-visible.show-page-container #smartControlPanel .page-container > .main-footer.kz-vis-on,
body.computer-desktop-visible.show-page-container #smartControlPanel .page-container > .header-big.kz-vis-on {
    position: relative !important;
    z-index: 3 !important;
}

/* ============================================================
   【20261028B】漂浮按钮的兜底尺寸
   ------------------------------------------------------------
   这排按钮的 56px 全靠 tailwind 的 w-14 h-14。
   CDN 一旦慢/被墙（国内很常见），tailwind 没加载成功，
   按钮就塌成 2x2 —— 开关明明打开了，屏幕上只有几个小点，
   看着也是「没效果」。这里给一份不依赖 CDN 的默认尺寸；
   tailwind 正常时它的工具类会照常覆盖，窄屏那份 50px 的 !important 规则仍然优先。
   ============================================================ */
#floatContainer .floating-btn {
    width: 56px;
    height: 56px;
}

/* 漂浮按钮组：它自己是 z-index:1000，和桌面层同层、DOM 又在前面 → 被桌面盖住。
   桌面模式下用户主动打开时提到 1100（跟顶部控制栏同一层）。 */
body.computer-desktop-visible #floatContainer.kz-vis-on {
    z-index: 1100 !important;
}

/* ============================================================
   【20261028B-2】导航网格在桌面模式下的最终形态
   ------------------------------------------------------------
   上面那段（20261028B）实测被内置规则压住了，两个原因：
     ① 内置 `... .nav-grid.active:not(.desktop-element-hidden)` 的权重是
        (1,5,1)，比 (1,4,1) 高，它把 max-height 写回 2000px / overflow:visible，
        于是 52 个方块照样从面板里溢到屏幕底部；
     ② 1.css 里有两条 `.nav-grid { grid-template-columns: minmax(20px,1fr) }`，
        每格只有 20px 宽 —— 中文被挤成竖排，方块互相压在一起，
        看起来就是一张糊掉的彩色布。
   这里用重复一次 #smartControlPanel 把权重抬到 (2,6,1)，并且把列宽改成 92px。
   只在「桌面模式 + 用户主动打开了网站导航网格」时生效。
   ============================================================ */
body.computer-desktop-visible.show-page-container #smartControlPanel#smartControlPanel .page-container > .nav-grid.kz-vis-on {
    display: grid !important;
    width: min(1080px, 92vw) !important;
    max-height: 52vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 10px auto 0 !important;
    padding: 14px !important;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)) !important;
    gap: 10px !important;
    border-radius: 14px;
    background: rgba(10, 16, 28, .66) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
    scrollbar-width: thin;
}

body.computer-desktop-visible.show-page-container #smartControlPanel#smartControlPanel .page-container > .nav-grid.kz-vis-on .nav-item {
    box-sizing: border-box;
    min-height: 74px;
    padding: 10px 8px !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    overflow: hidden;
}

/* ============================================================
   【20261028D】「背景照片」的小预览卡（右下角）
   ------------------------------------------------------------
   只在电脑桌面模式下、这一项打开时出现，带 ✕。
   位置避开右下角的工具条（那里有一排圆按钮）和任务栏。
   ============================================================ */
#kzBgPeek {
    position: fixed;
    right: 16px;
    bottom: 116px;
    width: 280px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(12, 18, 30, .92);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .45);
    z-index: 1060;
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #fff;
}

#kzBgPeek .kz-bgp-h {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px 7px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .82);
}

#kzBgPeek .kz-bgp-h span { flex: 1 1 auto; }

#kzBgPeek .kz-bgp-h button {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

#kzBgPeek .kz-bgp-h button:hover { background: #e04b4b; }

#kzBgPeek .kz-bgp-img {
    width: 100%;
    height: 148px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, .06);
    background-repeat: no-repeat;
}

#kzBgPeek .kz-bgp-t {
    padding: 7px 2px 1px;
    font-size: 10.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .55);
}

/* ============================================================
   【20261028C】设置面板 —— 按钮旁的小说明书（小感叹号 + 弹出卡片）
   ------------------------------------------------------------
   逻辑在 kz-settings-help.js，这里只负责长相。
   全段新增，不影响任何老规则；把新脚本的引用去掉，这段样式就完全不会生效。
   ============================================================ */

/* 名字 + 小图标排在一行 */
.kz-set-head {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.kz-set-head > label {
    flex: 0 1 auto;
    min-width: 0;
}

/* 那个小小的感叹号 / 表情 */
.kz-help-badge {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(99, 102, 241, .30);
    border-radius: 50%;
    background: rgba(99, 102, 241, .10);
    color: #4f46e5;
    font: 400 10px/15px -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    text-align: center;
    cursor: pointer;
    opacity: .78;
    transition: opacity .14s ease, transform .14s ease, background .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.kz-help-badge:hover,
.kz-help-badge.kz-on {
    opacity: 1;
    transform: scale(1.14);
    background: rgba(99, 102, 241, .22);
}

/* 说明收起来之后，行距立刻变紧凑 */
.setting-item-desc.kz-desc-folded,
.setting-hint.kz-hint-folded {
    display: none !important;
}

/* 长提示收成一个小药丸 */
.kz-hint-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px 0 6px;
    padding: 3px 9px 3px 7px;
    border: 1px solid rgba(99, 102, 241, .26);
    border-radius: 999px;
    background: rgba(99, 102, 241, .08);
    color: #4f46e5;
    font: 500 11.5px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    cursor: pointer;
    transition: background .14s ease, opacity .14s ease;
}

.kz-hint-chip:hover,
.kz-hint-chip.kz-on {
    background: rgba(99, 102, 241, .2);
}

.kz-hint-ic {
    font-size: 11px;
    line-height: 1;
}

/* ---- 弹出的小卡片 ---- */
#kzSetHelpTip {
    position: fixed;
    left: 0;
    top: 0;
    width: min(400px, calc(100vw - 16px));
    max-height: 58vh;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 0 12px;
    border-radius: 13px;
    /* 【20261030U】说明卡片也做成透明玻璃，别再是一块实心白 / 实心黑 */
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .06);
    color: #1f2430;
    z-index: 60000;
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

#kzSetHelpTip.kz-on { display: flex; }

#kzSetHelpTip .kz-sht-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 8px 8px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}

#kzSetHelpTip .kz-sht-ic {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 1;
}

#kzSetHelpTip .kz-sht-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
}

#kzSetHelpTip .kz-sht-x {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(15, 23, 42, .06);
    color: #6b7280;
    font: 600 11px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    cursor: pointer;
}

#kzSetHelpTip .kz-sht-x:hover {
    background: #ef4444;
    color: #fff;
}

#kzSetHelpTip .kz-sht-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 13px 2px;
    font-size: 12.5px;
    line-height: 1.78;
    color: #4b5563;
    word-break: break-word;
}

#kzSetHelpTip .kz-sht-body b,
#kzSetHelpTip .kz-sht-body strong {
    color: #4f46e5;
    font-weight: 600;
}

#kzSetHelpTip .kz-sht-none {
    color: #9ca3af;
}

#kzSetHelpTip .kz-sht-body::-webkit-scrollbar { width: 7px; }
#kzSetHelpTip .kz-sht-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .2);
    border-radius: 4px;
}

/* 夜间模式 / 深色主题 */
.night-mode #kzSetHelpTip,
.theme-dark-gold #kzSetHelpTip {
    background: rgba(27, 33, 48, .72);
    border-color: rgba(255, 255, 255, .18);
    color: #e8eef8;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}

.night-mode #kzSetHelpTip .kz-sht-head,
.theme-dark-gold #kzSetHelpTip .kz-sht-head {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.night-mode #kzSetHelpTip .kz-sht-title,
.theme-dark-gold #kzSetHelpTip .kz-sht-title {
    color: #f3f6fb;
}

.night-mode #kzSetHelpTip .kz-sht-body,
.theme-dark-gold #kzSetHelpTip .kz-sht-body {
    color: #b9c2d0;
}

.night-mode #kzSetHelpTip .kz-sht-body b,
.night-mode #kzSetHelpTip .kz-sht-body strong,
.theme-dark-gold #kzSetHelpTip .kz-sht-body b,
.theme-dark-gold #kzSetHelpTip .kz-sht-body strong {
    color: #93a5ff;
}

.night-mode #kzSetHelpTip .kz-sht-x,
.theme-dark-gold #kzSetHelpTip .kz-sht-x {
    background: rgba(255, 255, 255, .12);
    color: #cfd6e2;
}

.night-mode .kz-help-badge,
.theme-dark-gold .kz-help-badge {
    border-color: rgba(147, 165, 255, .34);
    background: rgba(147, 165, 255, .12);
    color: #a9b8ff;
}

.night-mode .kz-hint-chip,
.theme-dark-gold .kz-hint-chip {
    border-color: rgba(147, 165, 255, .3);
    background: rgba(147, 165, 255, .12);
    color: #a9b8ff;
}

/* 手机：卡片贴着屏幕，字号略小 */
body[data-device-mode="mobile"] #kzSetHelpTip .kz-sht-body {
    font-size: 12px;
    line-height: 1.7;
}

/* ============================================================
   【20261028C-2】小图标尺寸兜底
   ------------------------------------------------------------
   设置窗口里有一批「通用按钮美化」（#settingsWin button:not(...)）的规则，
   会给所有按钮套 34px 高 + 6px 16px 内边距 + 999px 圆角，
   把上面那个 17px 的小感叹号顶成了一个大胶囊。
   这一段用 id 前缀 + !important 把它拉回小圆点。
   ============================================================ */
#settingsWin#settingsWin .kz-set-head > .kz-help-badge {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    max-width: 17px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(99, 102, 241, .32) !important;
    border-radius: 50% !important;
    background: rgba(99, 102, 241, .10) !important;
    color: #4f46e5 !important;
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    transform: none;
    opacity: .78;
    cursor: pointer;
}

#settingsWin#settingsWin .kz-set-head > .kz-help-badge:hover,
#settingsWin#settingsWin .kz-set-head > .kz-help-badge.kz-on {
    opacity: 1;
    background: rgba(99, 102, 241, .24) !important;
    transform: scale(1.14);
}

.night-mode #settingsWin#settingsWin .kz-set-head > .kz-help-badge,
.theme-dark-gold #settingsWin#settingsWin .kz-set-head > .kz-help-badge {
    border-color: rgba(147, 165, 255, .36) !important;
    background: rgba(147, 165, 255, .14) !important;
    color: #a9b8ff !important;
}

#settingsWin#settingsWin .kz-hint-chip {
    padding: 3px 10px 3px 8px !important;
    margin: 2px 0 8px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

/* 手机 / 平板上图标稍大一点，手指点得中 */
body[data-device-mode="mobile"] #settingsWin#settingsWin .kz-set-head > .kz-help-badge {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    font-size: 11px !important;
}

/* ============================================================
   【20261030A】隐私保险箱设置页：收起来的说明长什么样
   ------------------------------------------------------------
   加密仓库 / 用户列表 / 后台密码表 / 入口与编号这几张卡片的整段说明，
   收成小药丸（❓ 说明）；每一行下面的小字收进名字后面的小图标（ℹ️）。
   上面那套「通用按钮美化」会把它们顶成大胶囊，这里用 id 前缀 +
   !important 拉回小圆点。逻辑在 kz-settings-help.js 的 20261030A 段。
   ============================================================ */
#settingsWin#settingsWin .kzv-help-badge {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    padding: 0 !important;
    margin: 0 0 0 5px !important;
    border: 1px solid rgba(99, 102, 241, .30) !important;
    border-radius: 50% !important;
    background: rgba(99, 102, 241, .10) !important;
    color: #4f46e5 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: 1px;
    box-shadow: none !important;
    opacity: .8;
    cursor: pointer;
}

#settingsWin#settingsWin .kzv-help-badge:hover,
#settingsWin#settingsWin .kzv-help-badge.kz-on {
    opacity: 1;
    background: rgba(99, 102, 241, .22) !important;
    transform: none;
}

.night-mode #settingsWin#settingsWin .kzv-help-badge,
.theme-dark-gold #settingsWin#settingsWin .kzv-help-badge {
    border-color: rgba(147, 165, 255, .34) !important;
    background: rgba(147, 165, 255, .14) !important;
    color: #a9b8ff !important;
}

/* 收起来的小药丸紧贴卡片标题下面，别把卡片撑高 */
#settingsWin#settingsWin #kzVault .kzv-set-card > .kz-hint-chip {
    margin: 2px 0 9px !important;
}

/* 手机 / 平板：图标稍大一点，手指点得中 */
body[data-device-mode="mobile"] #settingsWin#settingsWin .kzv-help-badge {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px !important;
    font-size: 10px !important;
}

/* ============================================================
   【20261028E】把设置里成段的说明全部收起来
   ------------------------------------------------------------
   用户 10-28 第二次反馈：卡片里那些「按钮说明书」「本节说明」成段文字
   还是太长、看着难看，五个字以上的都要收起来，只留一个小药丸/小图标，
   点开才看全文。逻辑在 kz-settings-help.js，这里只管长相。全段新增。
   ============================================================ */
.setting-item-desc.kz-desc-folded,
.setting-hint.kz-hint-folded,
.kz-block-folded {
    display: none !important;
}

/* 成段说明收成的小药丸：块级，自己占一行，别跟标题挤 */
.settings-card > .kz-hint-chip,
.settings-section > .kz-hint-chip,
.kz-set-card > .kz-hint-chip {
    margin: 4px 0 10px !important;
}

/* 卡片正文里原来带 <p>、<code>、<br> 的（按钮说明书那种），
   放进小卡片后要重新排一下，不然行距会散 */
#kzSetHelpTip .kz-sht-body p {
    margin: 0 0 9px;
}

#kzSetHelpTip .kz-sht-body p:last-child {
    margin-bottom: 0;
}

#kzSetHelpTip .kz-sht-body code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(99, 102, 241, .10);
    color: #4f46e5;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11.5px;
}

#kzSetHelpTip .kz-sht-body br {
    line-height: 1.9;
}

.night-mode #kzSetHelpTip .kz-sht-body code,
.theme-dark-gold #kzSetHelpTip .kz-sht-body code {
    background: rgba(147, 165, 255, .16);
    color: #a9b8ff;
}

/* 排版按钮下面那行小字（每个按钮都带一行，撑高按钮）——收进悬浮提示 */
.dl-btn-note.kz-note-muted {
    display: none !important;
}

/* 卡片标题里那个小 i 图标：跟文字齐平，别被通用按钮美化撑成胶囊 */
#settingsWin#settingsWin .card-title > .kz-help-badge,
#settingsWin#settingsWin h3.card-title > .kz-help-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    padding: 0 !important;
    margin: 0 0 0 6px !important;
    border: 1px solid rgba(99, 102, 241, .30) !important;
    border-radius: 50% !important;
    background: rgba(99, 102, 241, .10) !important;
    color: #4f46e5 !important;
    font: 400 9px/1 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif !important;
    vertical-align: middle !important;
    position: relative !important;
    top: -1px !important;
    opacity: .8 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transform: none !important;
}

#settingsWin#settingsWin .card-title > .kz-help-badge:hover {
    opacity: 1 !important;
    background: rgba(99, 102, 241, .22) !important;
}

/* ============================================================
   【20261028F】系统设置与状态（黑色电脑顶部那个设置入口）
   ------------------------------------------------------------
   用户 10-28 第二张图：这个面板里「桌面排版」每个按钮下面都带一行
   灰字说明，最长的「手机用：列表 + 全透明图标 + 按钮靠右」还要折行，
   把按钮撑得又高又乱。这里统一收掉 ——
   说明文字没丢：鼠标停在按钮上还能看到（脚本写进了 title），
   「桌面图标设置」页里那张「按钮说明书」也还在。
   只加这一条，老规则一行没动。
   ============================================================ */
.dl-btn-note {
    display: none !important;
}

/* 「系统设置与状态」面板里的排版按钮：面板很宽，默认只排 2 列会把
   每个按钮拉成 500 多像素、空空荡荡。这里改成按宽度自动多列。
   （只作用于这个面板，设置页里的卡片不受影响） */
#systemPanel #dlPanelLayout .dl-layout-grid {
    /* 固定 6 列：三组按钮（6 个 / 5 个 / 4 个）格子宽度一致，看起来才齐。
       !important 是为了压掉 JS 写在内联 style 里的 repeat(5) */
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

#systemPanel #dlPanelLayout .dl-layout-btn {
    justify-content: center;
    text-align: center;
}
