

        /* iOS 悬浮胶囊提示 */
        .ios-toast-capsule {
            position: absolute;
            top: 60px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: #fff;
            padding: 10px 24px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 600;
            z-index: 10000;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            white-space: nowrap;
        }
        .ios-toast-capsule.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* --- 图标操作菜单 UI 样式 --- */
        .icon-menu-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: 9999;
            display: none;
        }
        .icon-menu {
            position: absolute;
            width: 240px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            /* 降低模糊度至 10px，让背后图像透得更清晰；提高饱和度保持色彩 */
            backdrop-filter: blur(10px) saturate(180%);
            -webkit-backdrop-filter: blur(10px) saturate(180%);
            /* 将白色背景透明度降至极低 (0.02)，几乎完全透明 */
            background: rgba(255, 255, 255, 0.02);
            /* 保持阴影和边缘高光，维持玻璃的物理边缘感 */
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
            /* 增加圆角大小，从 28px 增加到 34px */
            border-radius: 34px;
            padding: 8px 0;
            transform-origin: top left;
            animation: menuPop 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .icon-menu-item {
            display: flex;
            align-items: center;
            gap: 14px;
            cursor: pointer;
            transition: background-color 0.2s ease;
            padding: 14px 24px;
            color: #000;
        }
        .icon-menu-item svg {
            width: 22px;
            height: 22px;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke: #1c1c1e;
        }
        .icon-menu-item span {
            font-size: 16px;
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        .icon-menu-item:active {
            background-color: rgba(0, 0, 0, 0.06);
        }

/* --- 保存预设名称弹窗样式 --- */
        .preset-modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.4);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .preset-modal-overlay.show {
            opacity: 1;
            pointer-events: auto;
        }
        
        .preset-modal-style-1 {
            width: 255px;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(20px) saturate(120%);
            -webkit-backdrop-filter: blur(20px) saturate(120%);
            border: 0.5px solid rgba(0, 0, 0, 0.05);
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            transform: scale(0.95);
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .preset-modal-overlay.show .preset-modal-style-1 { transform: scale(1); }
        
        /* 强制去除输入框弹窗顶部和内容的分割线，并设置文本居中 */
        .preset-m-header {
            border-bottom: none !important;
            padding: 24px 16px 10px !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            text-align: center !important;
        }
        .preset-m-header-text {
            width: 100% !important;
            text-align: center !important;
            font-size: 17px !important;
            font-weight: 600 !important;
            color: #000 !important;
        }
        .preset-m-stars { display: none !important; }
        .preset-m1-body {
            padding: 10px 16px 20px !important;
            box-sizing: border-box !important;
        }
        .preset-m1-input {
            width: 100% !important;
            height: 50px !important;
            min-height: 44px !important;
            box-sizing: border-box !important;
            padding: 0 12px !important;
            border-radius: 8px !important;
            border: none !important;
            background: rgba(0, 0, 0, 0.05) !important;
            font-size: 15px !important;
            outline: none !important;
        }
        .preset-m1-footer {
            display: flex !important;
            gap: 10px !important;
            padding: 0 16px 20px !important;
            box-sizing: border-box !important;
        }
        .preset-m1-btn {
            flex: 1; border: none; border-radius: 8px; height: 38px;
            font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s;
            display: flex; justify-content: center; align-items: center;
        }
        .preset-m1-btn:active { transform: scale(0.96); }
        .preset-m1-btn-cancel { background-color: rgba(0, 0, 0, 0.06); color: #000; }
        .preset-m1-btn-save { background-color: #007aff; color: #fff; box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35); }


        /* --- 自定义现代悬浮毛玻璃弹窗样式 --- */

        .custom-dialog-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.35);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 99999;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        .custom-dialog-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        .custom-dialog {
            width: 280px;
            background-color: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(20px) saturate(120%);
            -webkit-backdrop-filter: blur(20px) saturate(120%);
            border: 0.5px solid rgba(0, 0, 0, 0.05);
            border-radius: 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            padding-bottom: 16px;
            transform: scale(1.15);
            opacity: 0;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .custom-dialog-overlay.show .custom-dialog {
            transform: scale(1);
            opacity: 1;
        }
        .custom-dialog-text {
            padding: 26px 20px 18px 20px;
            text-align: center;
        }
        .custom-dialog-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 6px;
            line-height: 1.3;
            color: #000;
        }
        .custom-dialog-message {
            font-size: 14px;
            line-height: 1.4;
            color: rgba(0, 0, 0, 0.6);
        }
        .custom-dialog-btns {
            display: flex;
            padding: 0 16px;
            gap: 12px;
        }
        .custom-dialog-btn {
            flex: 1;
            border: none;
            border-radius: 12px;
            padding: 12px 0;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            background-color: rgba(0, 0, 0, 0.06);
            color: #000;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .custom-dialog-btn.bold {
            background-color: #007aff;
            color: #fff;
            box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
        }
        .custom-dialog-btn.danger {
            color: #ff3b30;
            background-color: rgba(255, 59, 48, 0.1);
        }
        .custom-dialog-btn.danger.bold {
            background-color: #ff3b30;
            color: #fff;
            box-shadow: 0 6px 16px rgba(255, 59, 48, 0.35);
        }
        .custom-dialog-btn:active {
            transform: scale(0.96);
        }

        /* --- 全局搜索抽屉 UI 样式 --- */
        .search-drawer-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 9000;
        }
        .search-drawer-overlay.show { opacity: 1; pointer-events: auto; }
        .search-drawer {
            position: fixed; bottom: 0; left: 0; right: 0; height: min(85dvh, 85%); /* 改为 left:0; right:0; 强制吸附两侧 */
            background: #f2f2f7; border-radius: 24px 24px 0 0;
            transform: translateY(100%); 
            visibility: hidden; /* 核心修复：彻底隐藏，脱离浏览器焦点顺序，防止被回车选中或滚动露出 */
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.35s;
            z-index: 9001; display: flex; flex-direction: column; overflow: hidden;
            box-sizing: border-box; /* 增加盒模型保险 */
        }
        .search-drawer.show { 
            transform: translateY(0); 
            visibility: visible; /* 核心修复：展开时恢复可见 */
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0s;
        }
        .search-drawer-header {
            padding: 16px 20px 10px; display: flex; flex-direction: column;
            box-sizing: border-box; width: 100%; /* 移除 align-items: center，增加 100% 宽度 */
        }
        .search-drawer-handle {
            width: 36px; height: 5px; background: #c7c7cc; border-radius: 3px; margin-bottom: 16px;
        }
        .search-input-container {
            width: 100%; background: #e3e3e8; border-radius: 12px; height: 40px;
            display: flex; align-items: center; padding: 0 12px;
            box-sizing: border-box; /* 增加盒模型保险 */
        }
        .search-input-container svg { width: 18px; height: 18px; fill: #8e8e93; margin-right: 8px; flex-shrink: 0; } /* 防止图标被挤压 */
        .search-input-container input {
            flex: 1; border: none; background: transparent; outline: none;
            font-size: 16px; color: #000; font-weight: 500; min-width: 0; /* 关键修复：防止 input 隐式撑宽父容器 */
        }
        .search-results-area {
            flex: 1; overflow-y: auto; padding: 10px 20px 40px; scrollbar-width: none;
            box-sizing: border-box; width: 100%; /* 增加盒模型保险 */
        }
        .search-results-area::-webkit-scrollbar { display: none; }
        .search-result-card {
            background: #fff; border-radius: 16px; overflow: hidden; margin-bottom: 16px;
        }
        .search-result-item {
            display: flex; align-items: center; padding: 12px 16px;
            border-bottom: 1px solid #f2f2f7; cursor: pointer;
        }
        .search-result-item:last-child { border-bottom: none; }
        .search-result-item:active { background: #e5e5ea; }
        .search-result-icon {
            width: 30px; height: 30px; border-radius: 8px; display: flex;
            justify-content: center; align-items: center; margin-right: 14px; color: #fff;
        }
        .search-result-text { flex: 1; font-size: 16px; font-weight: 500; color: #000; }
        .search-result-arrow { width: 16px; height: 16px; stroke: #c7c7cc; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

        /* --- iCloud 页面 UI 样式 --- */
        .icloud-app-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #f2f2f7; z-index: 170; display: none; flex-direction: column; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); overflow: hidden; }

        /* --- 通用选择弹窗样式 --- */
        .univ-sel-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100dvh; min-height: 100%; background-color: rgba(0, 0, 0, 0.35); z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
        .univ-sel-overlay.show { opacity: 1; visibility: visible; }
        .univ-sel-frame { width: 300px; max-width: 90%; max-height: 65vh; background-color: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); border: 0.5px solid rgba(0, 0, 0, 0.05); border-radius: 24px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; overflow: hidden; transform: scale(1.15); opacity: 0; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; }

        .univ-sel-overlay.show .univ-sel-frame { transform: scale(1); opacity: 1; }
        .univ-sel-window-header { display: none !important; }
        .univ-sel-search-wrap { padding: 12px 16px 8px 16px; flex-shrink: 0; }
        .univ-sel-search { background-color: rgba(0, 0, 0, 0.06); border-radius: 10px; height: 36px; display: flex; align-items: center; padding: 0 8px; }
        .univ-sel-search svg { width: 16px; height: 16px; fill: #8e8e93; margin: 0 6px; flex-shrink: 0; }
        .univ-sel-search input { border: none; background: transparent; flex: 1; font-size: 15px; color: #000; outline: none; }
        .univ-sel-search input::placeholder { color: #8e8e93; }
        .univ-sel-content { overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; border: none; }
        .univ-sel-inner { padding: 0 16px 8px 16px; display: flex; flex-direction: column; }
        .univ-sel-content::-webkit-scrollbar { width: 14px; }
        .univ-sel-content::-webkit-scrollbar-track { background: transparent; border: none; }
        .univ-sel-content::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.25); border-radius: 10px; border: 4px solid transparent; background-clip: padding-box; }
        .univ-sel-content::-webkit-scrollbar-button { display: none; }
        .univ-sel-card { display: flex; align-items: center; padding: 10px 4px; cursor: pointer; transition: opacity 0.2s; border: none; background: transparent; }
        .univ-sel-card:active { opacity: 0.5; }
        .univ-sel-radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #c7c7cc; margin-right: 12px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; transition: all 0.2s ease; }
        .univ-sel-radio svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.5); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .univ-sel-card.selected .univ-sel-radio { background-color: #007aff; border-color: #007aff; }
        .univ-sel-card.selected .univ-sel-radio svg { opacity: 1; transform: scale(1); }
        .univ-sel-info { display: flex; flex-direction: column; gap: 2px; }
        .univ-sel-name { font-size: 15px; font-weight: 500; color: #000; word-break: break-word; white-space: normal; }
        .univ-sel-footer { padding: 8px 16px 14px 16px; display: flex; gap: 10px; align-items: center; flex-shrink: 0; background: transparent; }
        .univ-sel-cancel, .univ-sel-save { flex: 1; height: 38px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: transform 0.1s, opacity 0.2s; }
        .univ-sel-cancel { background-color: rgba(0, 0, 0, 0.06); color: #000; }
        .univ-sel-cancel:active { transform: scale(0.96); }
        .univ-sel-save { background-color: #007aff; color: #fff; box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35); }
        .univ-sel-save:active { transform: scale(0.96); opacity: 0.85; }
        .univ-sel-save.disabled { background-color: #c7c7cc; box-shadow: none; pointer-events: none; opacity: 0.5; }
