        /* --- 0. 全局设置 --- */
        :root {
            --input-bg: #fbf1ec;
            --input-border: #4c200c;
            --text-brown: #59474a;
            --main-pink: #FF9A9E;
            --btn-gradient: linear-gradient(90deg, #fd5392 0%, #ff6b81 100%);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }

        html,
        body {
            width: 100%;
            min-height: 100vh;
            /* 恢复自然高度 */
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            /* 只防左右横跳 */
            /* 移除 position: fixed/overflow: hidden，让浏览器能感知滚动 */

            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            touch-action: manipulation;
        }

        /* --- 单独的背景层 (焊死在最底下) --- */
        #bg-layer {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -999;
            /* 放在所有内容后面 */
            background-color: #FFF0F5;
            background-image: url('https://i.postimg.cc/28Fj5nBt/04.jpg');
            background-size: cover;
            background-position: center;
            pointer-events: none;
            /* 让点击穿透 */
        }

        /* --- 页面切换控制 --- */
        .page-view {
            display: none;
            width: 100%;
            /* 移除 position: absolute/height: 100% */

            /* 底部留白 */
            padding-bottom: calc(100px + env(safe-area-inset-bottom));
            animation: fadeIn 0.3s ease;
        }

        .page-view.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* --- 1. 首页 (Home) 样式 --- */
        .home-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            justify-content: center;
            min-height: 100%;
            /* 改为100% */
            padding: 20px;
        }

        .home-title {
            font-size: 32px;
            color: var(--text-brown);
            margin-bottom: 50px;
            text-shadow: 2px 2px 0 #fff;
            font-weight: bold;
        }

        .home-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            width: 100%;
            max-width: 400px;
        }

        .home-card {
            background: rgba(255, 255, 255, 0.9);
            border: 3px solid #FFB7C5;
            border-radius: 20px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 5px 15px rgba(255, 183, 197, 0.4);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 150px;
            user-select: none;
            -webkit-user-select: none;
        }

        .home-card:active {
            transform: scale(0.95);
            background: #fff0f5;
        }

        .home-card img {
            width: 60px;
            height: 60px;
            margin-bottom: 10px;
            object-fit: contain;
            pointer-events: none;
        }

        .home-card span {
            color: var(--text-brown);
            font-size: 16px;
            font-weight: bold;
            pointer-events: none;
        }

        /* 修复头图样式 */
        .header-wrapper {
            position: relative;
            width: 100%;
            aspect-ratio: 1125 / 354;
            background: url('https://i.postimg.cc/52zsWZmJ/01.png') no-repeat top center;
            background-size: 100% auto;
            z-index: 10;
            margin-top: 20px;
        }

        /* --- 2. API 设置页样式 --- */
        .api-container {
            padding: 20px;
            max-width: 600px;
            margin: 0 auto;
            padding-bottom: 50px;
        }

        .nav-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            padding: 10px 0;
        }

        .back-btn {
            font-size: 24px;
            color: var(--text-brown);
            cursor: pointer;
            background: #fff;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .section-card {
            background: #fff;
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 20px;
            border: 2px solid #FFDEE9;
            box-shadow: 0 4px 10px rgba(255, 222, 233, 0.3);
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            color: #888;
            font-size: 14px;
            margin-bottom: 5px;
        }

        .api-input,
        .api-select {
            width: 100%;
            padding: 12px;
            background: var(--input-bg);
            border: 2px solid var(--input-border);
            border-radius: 12px;
            color: var(--text-brown);
            font-family: inherit;
            font-size: 14px;
        }

        .save-btn {
            width: 100%;
            padding: 12px;
            background: var(--btn-gradient);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(255, 107, 129, 0.3);
        }

        .save-btn:active {
            transform: scale(0.98);
        }

        /* 保存的列表 */
        .saved-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #FFF5F7;
            border: 1px solid #FFB7C5;
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 10px;
        }

        .saved-info {
            display: flex;
            flex-direction: column;
        }

        .saved-name {
            font-weight: bold;
            color: var(--text-brown);
        }

        .saved-detail {
            font-size: 12px;
            color: #aaa;
            margin-top: 2px;
        }

        .action-btns {
            display: flex;
            gap: 10px;
        }

        .btn-mini {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            border: none;
            cursor: pointer;
        }

        .btn-use {
            background: #81C784;
            color: white;
        }

        .btn-del {
            background: #FFCDD2;
            color: #D32F2F;
        }

        .current-badge {
            background: var(--main-pink);
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 5px;
        }

        /* --- 3. 小目标页样式 (保留原样式) --- */
        .header-wrapper {
            position: relative;
            width: 100%;
            aspect-ratio: 1125 / 354;
            background: url('https://i.postimg.cc/52zsWZmJ/01.png') no-repeat top center;
            background-size: 100% auto;
            z-index: 10;
            margin-top: 20px;
        }

        .apple-counter {
            position: absolute;
            top: 20%;
            right: 15%;
            width: 10vw;
            text-align: center;
            font-size: 8vw;
            color: white;
            font-weight: 900;
            text-shadow: 1.5px 0 0 #43200b, -1.5px 0 0 #43200b, 0 1.5px 0 #43200b, 0 -1.5px 0 #43200b;
            transform: rotate(10deg);
            z-index: 20;
            pointer-events: none;
        }

        .input-area {
            position: absolute;
            left: 28%;
            bottom: 24%;
            width: 52%;
            height: 23%;
            z-index: 50;
        }

        .custom-input {
            width: 100%;
            height: 100%;
            background-color: var(--input-bg);
            border: 2px solid var(--input-border);
            border-radius: 50px;
            padding: 0 10px 0 30px;
            color: var(--text-brown);
            font-family: inherit;
            font-size: 14px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2359474a'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-size: 15px;
            background-position: 12px center;
        }

        .paw-btn {
            position: absolute;
            width: 10vw;
            height: 10vw;
            max-width: 28px;
            max-height: 28px;
            right: 10%;
            bottom: 23%;
            background: url('https://i.postimg.cc/ZnkrHq1n/02.png') no-repeat center;
            background-size: contain;
            border: none;
            cursor: pointer;
            z-index: 60;
            transition: transform 0.1s;
        }

        .paw-btn:active {
            transform: scale(0.8);
        }

        .main-content {
            padding: 20px;
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            position: relative;
            z-index: 5;
            padding-bottom: 120px;
        }

        .goal-title-custom {
            text-align: center;
            color: #dd4b6d;
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 15px;
            margin-top: -15px;
            display: none;
            text-shadow: 1px 1px 0 #fff;
        }

        .star-decor {
            margin: 0 10px;
        }

        .glass-progress-container {
            width: 100%;
            height: 24px;
            background-color: #F8F0F2;
            border-radius: 50px;
            position: relative;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            border: 2px solid #FFB7C5;
            margin-bottom: 40px;
            display: none;
        }

        .glass-progress-fill {
            height: 100%;
            width: 0%;
            background-color: #FF69B4;
            background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
            background-size: 15px 15px;
            border-radius: 50px;
            transition: width 0.5s ease;
        }

        .progress-text {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            font-size: 16px;
            /* 稍微加大一点 */
            color: #FF5EAA;
            /* 字体内部颜色 */
            font-weight: 900;
            /* 核心修改：使用矢量描边替代阴影 */
            -webkit-text-stroke: 3px white;
            paint-order: stroke fill;
            /* 让描边在字体下面，不遮挡文字 */
            text-shadow: none;
            /* 清除旧的阴影 */
        }

        .category-card {
            background: #FFF;
            border: 2px solid #e48d99;
            border-radius: 20px;
            /* 👇 优化：顶部内边距改大到 40px，给标题胶囊留位置 */
            padding: 40px 15px 15px 15px;
            margin-bottom: 40px;
            position: relative;
            box-shadow: 0 6px 0 #ffbac6;
            animation: popIn 0.4s ease-out;
        }

        @keyframes popIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .card-header-pill {
            position: absolute;
            top: -18px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(90deg, #fd5392 0%, #ff6b81 100%);
            padding: 8px 40px;
            border-radius: 50px;
            border: 2px solid white;
            color: white;
            font-size: 18px;
            white-space: nowrap;
            z-index: 10;
            box-shadow: 0 3px 8px rgba(255, 107, 129, 0.4);
        }

        .card-header-pill::before,
        .card-header-pill::after {
            content: '✦';
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.9em;
            opacity: 0.9;
        }

        .card-header-pill::before {
            left: 12px;
        }

        .card-header-pill::after {
            right: 12px;
        }

        .card-controls-left {
            position: absolute;
            top: 5px;
            left: 10px;
            display: flex;
            gap: 8px;
            z-index: 20;
        }

        .card-controls-right {
            position: absolute;
            top: 5px;
            right: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 20;
        }

        .ctrl-btn {
            font-size: 13px !important;
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.2s;
            user-select: none;
        }

        .ctrl-btn:hover {
            opacity: 1;
            transform: scale(1.2);
        }

        .task-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 15px;
            margin-bottom: 8px;
            border-radius: 12px;
            background: #FFF5F7;
            transition: all 0.2s;
            width: 100%;
            box-sizing: border-box;
            user-select: none;
            -webkit-user-select: none;
        }

        .task-item.completed {
            background: #e9f3e8;
        }

        .check-box {
            width: 22px;
            height: 22px;
            border: 2px solid #FFC0CB;
            border-radius: 50%;
            background: white;
            flex-shrink: 0;
            margin-right: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .task-item.completed .check-box {
            border-color: #81C784;
            background: #81C784;
            color: white;
        }

        .task-item.completed .check-box::after {
            content: '✔';
            font-size: 14px;
        }

        .task-item.completed .task-text {
            text-decoration: line-through;
            color: #999;
        }

        .task-text {
            flex: 1;
            width: 0;
            min-width: 0;
            font-size: 16px;
            border: none;
            background: transparent;
            font-family: inherit;
            color: var(--text-brown);
        }

        .task-del {
            color: #ffb7c5;
            padding: 5px;
            cursor: pointer;
            font-size: 18px;
            flex-shrink: 0;
            margin-left: 5px;
        }

        .add-project-btn {
            width: 50%;
            margin: -15px auto 80px auto;
            display: block;
            padding: 10px;
            background: var(--btn-gradient);
            border: 2px solid #fff;
            border-radius: 50px;
            color: white;
            font-size: 18px;
            font-weight: bold;
            text-align: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(255, 154, 158, 0.4);
            user-select: none;
        }

        /* 底部导航栏 */
        .bottom-nav-container {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 90px;
            z-index: 100;
            pointer-events: none;
        }

        .center-bump {
            position: absolute;
            bottom: 35px;
            left: 50%;
            transform: translateX(-50%);
            width: 70px;
            height: 70px;
            background: #fff;
            border-radius: 50%;
            box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.02);
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: auto;
            z-index: 101;
        }

        .add-btn-circle {
            width: 50px;
            height: 50px;
            background: linear-gradient(180deg, #ffe0e0 0%, #ffc0cb 100%);
            border-radius: 50%;
            border: 2px solid #59474a;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: #59474a;
            cursor: pointer;
            border: none;
        }

        .nav-bg {
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 70px;
            background: #fff;
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
            box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-around;
            align-items: center;
            pointer-events: auto;
        }

        .nav-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            border: none;
            background: none;
            cursor: pointer;
            padding: 0 20px;
            width: 30%;
        }

        .nav-icon-img {
            width: 25px;
            height: 25px;
            object-fit: contain;
        }

        .nav-text {
            font-size: 12px;
            color: #888;
        }

        /* 弹窗与特效 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: white;
            width: 85%;
            max-width: 320px;
            border-radius: 25px;
            padding: 20px;
            text-align: center;
        }

        .win-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.5s;
        }

        .win-img {
            width: 80%;
            max-width: 300px;
            margin-bottom: 20px;
            animation: popIn 0.5s;
        }

        .win-btn-row {
            display: flex;
            gap: 20px;
            margin-top: 10px;
        }

        .overlay-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            border: 3px solid #e8718d;
            color: #e8718d;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s;
        }

        .overlay-btn:active {
            transform: scale(0.9);
        }

        /* Loading */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 3000;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .loading-img {
            width: 80%;
            max-width: 300px;
            animation: breathe 1.5s infinite ease-in-out;
        }

        @keyframes breathe {
            0% {
                transform: scale(0.95);
            }

            50% {
                transform: scale(1.05);
            }

            100% {
                transform: scale(0.95);
            }
        }

        .empty-hint {
            text-align: center;
            margin-top: 50px;
            color: #ccc;
        }

        /* 长按气泡菜单样式 */
        .task-context-menu {
            position: fixed;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.98);
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 183, 197, 0.3);
            padding: 8px 0;
            min-width: 140px;
            animation: menuPopIn 0.2s ease-out;
            backdrop-filter: blur(10px);
        }

        @keyframes menuPopIn {
            from {
                opacity: 0;
                transform: scale(0.8) translateY(-10px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .context-menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 18px;
            font-size: 15px;
            color: var(--text-brown);
            cursor: pointer;
            transition: background 0.15s;
        }

        .context-menu-item:hover,
        .context-menu-item:active {
            background: #FFF0F5;
        }

        .context-menu-item .menu-icon {
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .context-menu-item.danger {
            color: #e74c3c;
        }

        .context-menu-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, #FFD0D8, transparent);
            margin: 6px 0;
        }

        .context-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 999;
            background: transparent;
        }

        /* 任务长按高亮效果 */
        .task-item.long-press-active {
            background: #FFE8EE !important;
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
        }

        /* --- 2.5 设置页面样式 --- */
        .settings-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 30px;
            cursor: pointer;
            z-index: 100;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s;
        }

        .settings-btn:active {
            transform: scale(0.9);
        }

        .avatar-upload-container {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 3px solid #ffb7c5;
            margin: 0 auto 15px auto;
            position: relative;
            cursor: pointer;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .avatar-preview {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .avatar-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            font-size: 10px;
            padding: 2px 0;
            text-align: center;
            opacity: 0.8;
        }

        /* --- 2.6 角色互动区 & 任务列表升级 --- */
        .char-area {
            display: flex;
            align-items: center;
            /* 垂直居中 */
            margin-bottom: 20px;
            padding: 0 10px;
            gap: 15px;
            animation: fadeIn 0.5s;
        }

        .char-avatar {
            width: 45px;
            /* 缩小头像 */
            height: 45px;
            border-radius: 50%;
            border: 3px solid #FFB7C5;
            object-fit: cover;
            background: white;
            flex-shrink: 0;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .char-bubble {
            background: #fff;
            /* 改回纯白背景 */
            padding: 12px 18px;
            border-radius: 18px;
            border-top-left-radius: 4px;
            border: 2px solid #FFDEE9;
            /* 淡粉色边框 */
            box-shadow: 0 4px 10px rgba(255, 183, 197, 0.2);
            color: #59474a;
            /* 深色字体 */
            font-size: 14px;
            line-height: 1.4;
            position: relative;
            max-width: 70%;
            transition: opacity 0.3s;
        }

        .char-bubble::before {
            content: '';
            position: absolute;
            top: 15px;
            left: -8px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-bottom: 8px solid transparent;
            border-right: 12px solid #fff;
            /* 匹配白色背景 */
        }

        .task-text-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin-left: 5px;
            /* 稍微给点间距 */
        }

        /* --- 文件夹分类样式 --- */
        .folder-scroll {
            display: flex;
            overflow-x: auto;
            gap: 10px;
            margin-bottom: 15px;
            padding-bottom: 5px;
            border-bottom: 1px dashed #eee;
            -ms-overflow-style: none;
            /* 隐藏滚动条 */
            scrollbar-width: none;
        }

        .folder-scroll::-webkit-scrollbar {
            display: none;
        }

        .folder-chip {
            padding: 6px 15px;
            background: #f0f0f0;
            border-radius: 20px;
            font-size: 13px;
            color: #888;
            white-space: nowrap;
            cursor: pointer;
            border: 1px solid transparent;
            transition: all 0.2s;
            user-select: none;
            flex-shrink: 0;
        }

        .folder-chip.active {
            background: #FF9A9E;
            color: white;
            font-weight: bold;
            box-shadow: 0 2px 6px rgba(255, 154, 158, 0.4);
        }

        .saved-item-row {
            padding: 12px;
            border-bottom: 1px solid #fff0f5;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff;
            border-radius: 8px;
            margin-bottom: 8px;
        }

        .task-title {
            font-size: 16px;
            color: var(--text-brown);
        }

        .task-subtitle {
            font-size: 12px;
            color: #999;
            margin-top: 4px;
        }

        /* ================= 日历 (Calendar) 样式 ================= */
        :root {
            /* 日历专用配色 */
            --theme-black: #4b4b4b;
            --theme-pink-text: #ff9cb7;
            --theme-weekend: #f06e8e;
            --today-red: #ff3333;
            --prio-high: #ffb7c5;
            --prio-mid: #baffc9;
            --prio-low: #bae1ff;
            --cal-bg-pink: #FFF0F5;
        }

        /* 顶部月份导航 */
        .calendar-header {
            padding: 30px 20px 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 40px;
            /* Increased gap for diamonds */
            background: transparent;
            margin-top: 10px;
        }

        /* Stacked Date Styles */
        .month-title {
            display: flex;
            flex-direction: column;
            align-items: center;
            line-height: 1;
            color: var(--theme-black);
            font-weight: bold;
        }

        .month-year {
            font-size: 28px;
            color: #555;
            font-weight: 800;
            margin-bottom: 5px;
            letter-spacing: 1px;
        }

        .month-num {
            font-size: 40px;
            font-weight: 900;
            letter-spacing: 1px;
            color: var(--theme-black);
        }

        /* Custom Navigation Button */
        .cal-nav-btn {
            background: none;
            border: none;
            color: var(--theme-black);
            font-size: 18px;
            /* Diamond size */
            cursor: pointer;
            padding: 8px;
            transition: transform 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cal-nav-btn:active {
            transform: scale(0.8);
        }

        /* 日历主体 */
        .calendar-container {
            padding: 10px 12px;
            padding-bottom: 200px;
        }

        .weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            margin-bottom: 15px;
            margin-left: -10px;
            margin-right: -10px;
            padding: 10px 10px;
            font-size: 15px;
            font-weight: bold;
            background: var(--theme-black);
            border-radius: 25px;
            color: var(--theme-pink-text);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            font-family: "Arial Rounded MT Bold", "Helvetica Rounded", sans-serif;
        }

        .days-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px;
            row-gap: 2px;
        }

        .day-cell {
            background: transparent;
            border-radius: 14px;
            height: 56px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding-top: 4px;
            cursor: pointer;
            position: relative;
            transition: all 0.2s;
            z-index: 2;
        }

        .day-number {
            font-size: 17px;
            font-weight: bold;
            z-index: 3;
            position: relative;
            margin-top: 12px;
            color: var(--theme-black);
        }

        .day-cell.weekend .day-number {
            color: var(--theme-weekend);
        }

        .day-cell.selected::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--theme-black);
            border-radius: 12px;
            z-index: -1;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .day-cell.selected .day-number {
            color: white !important;
        }

        .day-cell.today .day-number {
            color: var(--today-red);
        }

        /* 标记点 */
        .day-heart {
            position: absolute;
            top: 2px;
            font-size: 11px;
            z-index: 3;
        }

        .event-dots {
            display: flex;
            gap: 3px;
            position: absolute;
            bottom: 7px;
            z-index: 3;
        }

        .dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #FFB7C5;
        }

        /* 下方日程列表 (弹窗式) */
        .schedule-area {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 40vh;
            background: rgba(255, 255, 255, 0.98);
            border-top-left-radius: 25px;
            border-top-right-radius: 25px;
            padding: 20px;
            box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.1);
            transform: translateY(110%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 2000;
            /* 层级要高 */
            display: flex;
            flex-direction: column;
        }

        .schedule-area.show {
            transform: translateY(0);
        }

        .schedule-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 10px;
            flex-shrink: 0;
        }

        .selected-date-info {
            font-size: 18px;
            font-weight: bold;
            color: var(--theme-black);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .heart-selector {
            display: flex;
            gap: 8px;
        }

        .heart-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.4;
            transition: all 0.2s;
        }

        .heart-btn.active {
            opacity: 1;
            transform: scale(1.2);
        }

        /* 任务列表与卡片 */
        #scheduleList {
            overflow-y: auto;
            flex: 1;
            padding-bottom: 20px;
            scrollbar-width: none;
        }

        #scheduleList::-webkit-scrollbar {
            display: none;
        }

        .task-card {
            display: flex;
            align-items: stretch;
            background: white;
            border-radius: 12px;
            margin-bottom: 10px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            overflow: hidden;
            min-height: 50px;
        }

        .task-time {
            font-size: 15px;
            font-weight: bold;
            width: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-right: 1px solid rgba(0, 0, 0, 0.1);
            background: transparent;
        }

        .task-content {
            flex: 1;
            font-size: 15px;
            color: var(--theme-black);
            display: flex;
            align-items: center;
            padding-left: 15px;
        }

        .task-icon {
            margin-right: 10px;
            font-size: 18px;
        }

        .task-card.prio-high {
            background: #FFF0F5;
            color: #fd5392;
        }

        .task-card.prio-high .task-time {
            color: #fd5392;
        }

        .task-card.prio-mid {
            background: #f0fff4;
            color: #2d6a40;
        }

        .task-card.prio-mid .task-time {
            color: #2d6a40;
        }

        .task-card.prio-low {
            background: #f0f8ff;
            color: #2d5a88;
        }

        .task-card.prio-low .task-time {
            color: #2d5a88;
        }

        /* 浮动按钮组 */
        .fab-group {
            position: absolute;
            top: -20px;
            right: 20px;
            display: flex;
            gap: 10px;
            z-index: 2100;
        }

        .mini-fab {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            cursor: pointer;
            font-weight: bold;
            transition: transform 0.2s;
        }

        .btn-add {
            background: #fd5392;
            color: white;
            font-size: 24px;
        }

        .btn-close {
            background: white;
            color: #999;
            font-size: 18px;
        }

        /* 弹窗表单 (Modal Box) */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 3000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(2px);
        }

        .modal-box {
            background: white;
            width: 85%;
            max-width: 320px;
            border-radius: 20px;
            padding: 25px;
            animation: popIn 0.3s;
        }

        .form-row {
            margin-bottom: 15px;
        }

        .label-text {
            display: block;
            color: #888;
            font-size: 12px;
            margin-bottom: 6px;
        }

        .form-input {
            width: 100%;
            height: 42px;
            padding: 0 10px;
            border-radius: 10px;
            border: 1px solid #FFDEE9;
            background: #FFF0F5;
            color: #333;
            outline: none;
            font-size: 14px;
        }

        .prio-selector {
            display: flex;
            gap: 8px;
        }

        .prio-opt {
            flex: 1;
            padding: 8px;
            text-align: center;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
            font-weight: bold;
        }

        .prio-opt.high {
            background: #ffeef2;
            color: #ff8fa3;
        }

        .prio-opt.high.selected {
            background: var(--prio-high);
            border-color: #fd5392;
            color: #fd5392;
        }

        .prio-opt.mid {
            background: #e8f5e9;
            color: #81c784;
        }

        .prio-opt.mid.selected {
            background: var(--prio-mid);
            border-color: #4caf50;
            color: #2e7d32;
        }

        .prio-opt.low {
            background: #e3f2fd;
            color: #64b5f6;
        }

        .prio-opt.low.selected {
            background: var(--prio-low);
            border-color: #2196f3;
            color: #1565c0;
        }



        /* 表情贴纸选择 */
        .sticker-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
            overflow-x: auto;
            padding-bottom: 2px;
        }

        .sticker-tab {
            font-size: 16px;
            padding: 4px 10px;
            background: #f2f2f2;
            border-radius: 12px;
            cursor: pointer;
            white-space: nowrap;
        }

        .sticker-tab.active {
            background: #FFB7C5;
            color: white;
        }

        .sticker-grid {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 10px 5px;
            background: #fafafa;
            border-radius: 10px;
            scrollbar-width: none;
        }

        .sticker-item {
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            border-radius: 8px;
            cursor: pointer;
        }

        .sticker-item.selected {
            background: #ffe4e8;
            border: 1px solid #FFB7C5;
        }

        .btn-block-confirm {
            width: 100%;
            background: #fd5392;
            color: white;
            border: none;
            padding: 12px;
            border-radius: 25px;
            font-size: 16px;
            margin-top: 15px;
            cursor: pointer;
        }

        .menu-item.danger {
            color: #ff4757;
        }

        /* === 强制修复日历顶部排版 (Fix Calendar Header) === */
        .calendar-header {
            display: flex !important;
            /* 强制弹性布局 */
            flex-direction: row !important;
            /* 强制横向排列，不准换行 */
            justify-content: center !important;
            /* 居中对齐 */
            align-items: center !important;
            /* 垂直居中 */
            gap: 15px !important;
            /* 按钮和文字的间距 */
            white-space: nowrap !important;
            /* 禁止内容换行 */
            width: 100% !important;
            padding-top: 50px !important;
            /* 顶部留出足够空间 */
            margin-top: 0 !important;
        }

        .month-title {
            font-size: 32px !important;
            /* 保持原版大字体 */
            font-weight: bold !important;
            color: #4b4b4b !important;
            /* 确保颜色正确 */
            letter-spacing: 2px !important;
            line-height: 1 !important;
            /* 压低行高 */
            margin: 0 !important;
            /* 去掉多余边距 */
            display: inline-block !important;
            /* 确保在同一行 */
        }

        .nav-btn {
            font-size: 24px !important;
            background: transparent !important;
            border: none !important;
            padding: 0 5px !important;
            cursor: pointer !important;
            display: inline-block !important;
            color: #4b4b4b !important;
            /* Update diamond color */
        }

        /* 修复返回按钮的位置，防止它挤压标题 */
        .calendar-header .back-btn {
            top: 5px !important;
            /* 调整垂直位置，往上挪 */
            left: 10px !important;
        }

        /* 日历页面专用背景 */
        #calendar-layer {
            background-image: url('https://i.postimg.cc/6pzb10qS/09.jpg') !important;
            background-size: cover !important;
            background-position: center !important;
            background-attachment: fixed !important;
            height: 100vh !important;
            overflow: hidden !important;
        }

        /* --- AI Schedule Assistant (Post-it Style) --- */
        /* --- AI Schedule AssistantRefined (Round 3) --- */
        /* 容器 */
        #ai-schedule-wrapper {
            position: relative;
            width: 95%;
            height: 0;
            padding-bottom: 75%;
            /* 维持背景图比例 */
            margin: -190px auto 40px auto;
            background: url('https://i.postimg.cc/VNJWk2Pc/011.png') no-repeat center center;
            background-size: 100% 100%;
            transform: rotate(-1deg);
            box-shadow: none;
            z-index: 10;
        }

        /* 1. 左上角头像 (拍立得风格) - 向左歪 */
        .polaroid-avatar {
            position: absolute;
            top: -5px;
            left: 15px;
            background: white;
            padding: 4px 4px 15px 4px;
            box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
            transform: rotate(-8deg);
            z-index: 10;
        }

        #ai-char-avatar {
            width: 50px;
            height: 50px;
            object-fit: cover;
            display: block;
        }

        /* 2. 用户标题胶囊 (深色背景) */
        #user-schedule-pill {
            position: absolute;
            top: 25px;
            left: 85px;
            background: #59474a;
            color: #ffb8cc;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: bold;
            z-index: 5;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            transform: none;
        }

        /* 3. 右上角按钮组 */
        .ai-btn-group {
            position: absolute;
            top: 23px;
            right: 60px;
            display: flex;
            gap: 8px;
            z-index: 10;
        }

        .circle-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.1s;
        }

        .circle-btn:active {
            transform: scale(0.9);
        }

        #btn-ai-gen {
            background: #FFDEE9;
        }

        /* 粉色 */
        #btn-ai-play {
            background: #E0F2F1;
        }

        /* 浅绿 */

        /* 4. 滚动文字区 (上移 + 宽行高) */
        #ai-text-scroll-area {
            position: absolute;
            top: 26%;
            left: 12%;
            /* 往左移动 */
            width: 75%;
            height: 60%;
            /* 底部留空 */
            overflow-y: auto;
            /* 隐藏滚动条 */
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        #ai-text-scroll-area::-webkit-scrollbar {
            display: none;
        }

        #ai-reply-text {
            margin: 0;
            font-size: 14px;
            /* 字体稍微大一点 */
            line-height: 1.8;
            /* 宽松行高 */
            color: #59474a;
            text-align: justify;
            /* 两端对齐 */
            font-weight: 500;
        }

        /* 高亮样式的圆角优化 */
        .highlight-pill {
            padding: 2px 6px;
            border-radius: 12px !important;
            /* 更圆润 */
            font-weight: bold;
            font-size: 12px;
            margin: 0 2px;
        }

        /* ================= 番茄钟专属样式 ================= */

        /* 新增：番茄钟中间的AI气泡区 */
        .pomo-ai-interaction {
            display: flex;
            align-items: center;
            /* 垂直居中 */
            gap: 10px;
            /* 使用绝对定位，不影响下面瓶子的布局 */
            position: absolute;
            top: 171px;
            /* 在顶部卡片下方 */
            left: 15px;
            /* 往左靠 */
            z-index: 80;
            /* 保证在瓶子上面 */
            animation: fadeIn 0.5s;
        }

        .pomo-ai-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 2px solid #FFB7C5;
            background: #fff;
            object-fit: cover;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .pomo-ai-bubble {
            background: #fff;
            padding: 8px 12px;
            border-radius: 20px;
            border-top-left-radius: 4px;
            /* 气泡尖角在左边 */
            border: 2px solid #FFDEE9;
            color: #59474a;
            font-size: 13px;
            box-shadow: 0 4px 10px rgba(255, 183, 197, 0.2);
            position: relative;
            white-space: nowrap;
            /* 强制单行不换行 */
        }

        /* 给气泡加个小尖角 */
        .pomo-ai-bubble::before {
            content: '';
            position: absolute;
            top: 10px;
            left: -8px;
            width: 0;
            height: 0;
            border-top: 6px solid transparent;
            border-bottom: 6px solid transparent;
            border-right: 10px solid #FFDEE9;
        }

        .pomo-ai-bubble::after {
            content: '';
            position: absolute;
            top: 10px;
            left: -5px;
            /* 盖住边框颜色 */
            width: 0;
            height: 0;
            border-top: 6px solid transparent;
            border-bottom: 6px solid transparent;
            border-right: 10px solid #fff;
        }

        /* 新按钮样式：告诉角色并开始 */
        .btn-confirm-ai {
            flex: 1.5;
            /* 比普通按钮宽一点 */
            padding: 12px;
            border: none;
            border-radius: 25px;
            font-size: 14px;
            cursor: pointer;
            font-weight: bold;
            background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%);
            /* 紫粉渐变，区别于普通开始 */
            color: white;
            margin: 0 5px;
            /* 左右留点缝隙 */
            box-shadow: 0 4px 10px rgba(161, 140, 209, 0.3);
        }

        /* 1. 容器调整 */
        .pomo-wrapper {
            width: 100%;
            max-width: 400px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding-top: 30px;
            /* 顶部间距 */
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        /* 1. 顶部统计卡片 */
        .stats-card {
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            /* 让子元素填满高度 */
            background-color: rgba(255, 255, 255, 0.56);
            border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 25px;
            padding: 2px 15px;
            width: 95%;
            height: 130px;
            box-shadow: 0 2px 5px rgba(255, 150, 170, 0.3),
                inset 0 0 10px rgba(255, 230, 240, 0.3);
            position: relative;
            flex-shrink: 0;
            z-index: 50;
            margin-bottom: 10px;
            overflow: visible;
            /* 左侧角色需要溢出 */
        }

        /* 3. 左侧：角色与气泡区 */
        .pomo-char-container {
            position: relative;
            width: 140px;
            /* 限制左侧宽度 */
            height: 100%;
            flex-shrink: 0;
        }

        /* 2. 左侧角色图片 */
        .pomo-char-img {
            position: absolute;
            bottom: -2px;
            left: -10px;
            /* 往右挑一点 */
            width: 150px;
            /* 缩小到150px */
            height: 150px;
            object-fit: contain;
            z-index: 60;
        }

        /* 3. 气泡文字定位 */
        .pomo-bubble-text {
            position: absolute;
            top: -26px;
            left: 5px;
            display: flex;
            align-items: center;
            gap: 6px;
            transform: rotate(0);
            /* 不旋转 */
            z-index: 70;
            background: transparent;
            /* 透明背景 */
            padding: 5px 12px;
            border-radius: 15px;
            box-shadow: none;
            /* 去掉阴影 */
        }

        /* "今日努力" 竖排小字：上面“今日”，下面“努力” */
        .pomo-label-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            line-height: 1.2;
        }

        .pomo-label-small {
            font-size: 11px;
            color: #ff8b8b;
            font-weight: 800;
            letter-spacing: 1px;
        }

        /* 时间大字 00:00 */
        .pomo-time-big {
            font-size: 24px;
            color: #6d5c56;
            font-weight: 900;
            font-family: "Arial Rounded MT Bold", sans-serif;
            letter-spacing: 1px;
            line-height: 1;
            text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
            /* 稍微加粗效果 */
        }

        /* 4. 右侧：迷你日历区 */
        .pomo-calendar-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            /* 垂直居中 */
            align-items: stretch;
            padding-left: 10px;
            padding-right: 5px;
            overflow: hidden;
            /* 防止溢出 */
        }

        /* 日历表头 */
        .mini-cal-header {
            background-color: #ff9ca0;
            border-radius: 10px;
            display: flex;
            justify-content: space-between;
            padding: 3px 5px;
            margin-bottom: 9px;
            flex-shrink: 0;
        }

        .mini-cal-weekday {
            color: white;
            font-size: 9px;
            font-weight: bold;
            width: 14.28%;
            /* 7等分 */
            text-align: center;
        }

        /* 日历格子间距 */
        .mini-cal-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            row-gap: 3px;
            column-gap: 0;
        }

        /* 日历圆圈 */
        .mini-day-cell {
            height: 14px;
            width: 14px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            color: #6d5c56;
            font-weight: bold;
            border-radius: 50%;
            position: relative;
        }

        /* 打卡成功的样式 (蓝色圆圈+白色勾) */
        .mini-day-cell.checked {
            background-color: #8FD3FE;
            color: white;
            width: 14px;
            height: 14px;
            border: 1.5px solid white;
        }

        .mini-day-cell.checked::after {
            content: '✔';
            font-size: 7px;
            position: absolute;
            color: white;
        }

        /* 今天的样式 (稍微加个红框) */
        .mini-day-cell.is-today {
            border: 1px solid #ff8b8b;
            color: #ff8b8b;
        }

        /* --- 物理番茄钟容器 (修正版) --- */
        .pomodoro-section {
            flex: 1;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            /* 改为顶部对齐，方便用 margin 控制位置 */
            position: relative;
            padding-top: 10px;
            /* 稍微往下顶一点 */
            overflow: hidden;
            /* 防止瓶子超出 */
        }

        /* 瓶子容器：通过 height 和 scaleY 来压扁 */
        .physics-container {
            width: 423px;
            height: 520px;
            /* 高度减小，原639 */
            position: relative;
            transform-origin: center top;
            transform: scale(0.85);
            /* 整体缩放 */
            margin-top: 45px;
            /* 往下挨，给对话气泡留出空间 */
        }

        /* 瓶子背景 */
        .jar-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://i.postimg.cc/yYncJzxQ/013.png');
            background-size: 100% 100%;
            z-index: 1;
        }

        /* 画布 */
        #matter-canvas {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 2;
            background: transparent;
            /* 既然瓶子压扁了，画布不需要变，MatterJS里我们会调整边界墙 */
        }

        /* 玻璃反光 (位置微调) */
        .glass-shine {
            position: absolute;
            top: 20%;
            left: 5%;
            width: 90%;
            height: 60%;
            border-radius: 40px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 30%, transparent 50%);
            pointer-events: none;
            z-index: 3;
        }

        .shine-stripe {
            position: absolute;
            top: 22%;
            left: 12%;
            width: 15px;
            height: 180px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            transform: rotate(5deg);
            filter: blur(2px);
            z-index: 4;
            pointer-events: none;
        }

        /* --- 文字层 (横排修正) --- */
        .timer-overlay {
            position: absolute;
            top: 55%;
            /* 垂直居中偏下 */
            left: 0;
            width: 100%;
            display: flex;
            /* 使用Flex布局 */
            flex-direction: column;
            /* 垂直排列：上时间，下任务 */
            align-items: center;
            /* 水平居中 */
            justify-content: center;
            z-index: 10;
            pointer-events: none;
        }

        .pomo-wrapper .timer-text {
            font-size: 70px;
            /* 稍微调小一点，防止太宽 */
            color: white;
            font-weight: 900;
            line-height: 1;
            /* 虚化散开的多层阴影，颜色深度不变但更柔和 */
            text-shadow:
                0 0 8px rgba(221, 108, 130, 0.9),
                0 0 15px rgba(221, 108, 130, 0.7),
                0 0 25px rgba(221, 108, 130, 0.5),
                0 0 35px rgba(221, 108, 130, 0.3);
            font-family: "Arial Rounded MT Bold", sans-serif;
            letter-spacing: 2px;
        }

        .pomo-wrapper .task-text {
            font-size: 28px;
            color: white;
            font-weight: 800;
            margin-top: 5px;
            /* 虚化散开的多层阴影 */
            text-shadow:
                0 0 6px rgba(221, 108, 130, 0.9),
                0 0 12px rgba(221, 108, 130, 0.7),
                0 0 20px rgba(221, 108, 130, 0.5);
            /* 强制横排 */
            writing-mode: horizontal-tb;
            width: 80%;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* --- 番茄钟设置弹窗样式 --- */
        .pomo-setup-modal {
            display: none;
            /* 默认隐藏 */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(3px);
        }

        .pomo-setup-box {
            background: #fff;
            width: 85%;
            max-width: 320px;
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            animation: popIn 0.3s;
        }

        .pomo-setup-box h3 {
            text-align: center;
            color: #dd6c82;
            margin-top: 0;
            margin-bottom: 20px;
        }

        .setup-row {
            margin-bottom: 15px;
        }

        .setup-row label {
            display: block;
            color: #59474a;
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 5px;
        }

        .setup-input {
            width: 100%;
            padding: 10px;
            border: 2px solid #FFDEE9;
            border-radius: 10px;
            font-size: 14px;
            color: #333;
            background: #FFF0F5;
        }

        .setup-input:focus {
            border-color: #dd6c82;
        }

        /* 模式切换开关 */
        .mode-switch {
            display: flex;
            background: #f0f0f0;
            border-radius: 10px;
            padding: 3px;
        }

        .mode-opt {
            flex: 1;
            text-align: center;
            padding: 8px 0;
            font-size: 13px;
            cursor: pointer;
            border-radius: 8px;
            color: #888;
            transition: all 0.2s;
        }

        .mode-opt.active {
            background: #fff;
            color: #dd6c82;
            font-weight: bold;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .setup-actions {
            display: flex;
            gap: 10px;
            margin-top: 25px;
        }

        .btn-cancel,
        .btn-confirm {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 25px;
            font-size: 15px;
            cursor: pointer;
            font-weight: bold;
        }

        .btn-cancel {
            background: #f0f0f0;
            color: #888;
        }

        .btn-confirm {
            background: linear-gradient(90deg, #fd5392 0%, #ff6b81 100%);
            color: white;
        }

        /* --- 底部控制栏样式 (V3 变窄版) --- */
        .pomo-controls {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 320px;
            height: 55px;

            /* 玻璃底框 */
            background: rgba(255, 255, 255, 0.57);
            border: 2px solid #fff;
            border-radius: 40px;

            box-shadow: 0 10px 20px rgba(221, 108, 130, 0.3);

            display: flex;
            justify-content: space-evenly;
            align-items: center;
            z-index: 100;
            padding: 0 5px;
        }

        /* 通用按钮 */
        .pomo-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.1s;
            color: #dd6c82;
            /* 统一颜色 */
            padding: 0;
            /* 去除内边距干扰 */
        }

        .pomo-btn:active {
            transform: scale(0.9);
        }

        /* 1,2,4号按钮：只有图标，无背景圆 */
        .icon-btn {
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .icon-btn svg {
            fill: #dd6c82;
        }

        /* 各图标独立尺寸 */
        .asmr-icon svg {
            width: 38px;
            height: 38px;
        }

        .volume-icon svg {
            width: 38px;
            height: 38px;
        }

        .chat-icon svg {
            width: 32px;
            height: 32px;
        }

        /* 3号按钮：播放键 (缩小版) */
        .play-btn {
            width: 44px;
            height: 44px;
            background-color: #dd6c82;
            border-radius: 50%;
            color: white;
            border: none;
            box-shadow: none;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* 播放键内部的三角形 */
        .play-btn svg {
            width: 26px;
            height: 26px;
        }

        /* 5号按钮：关闭键 */
        .close-btn {
            width: 32px;
            /* 和左边图标视觉平衡 */
            height: 32px;
            background-color: #dd6c82;
            border-radius: 50%;
            color: white;
        }

        .close-btn svg {
            width: 18px;
            height: 18px;
        }

        /* 番茄钟音量弹窗容器 */
        .pomo-vol-wrap {
            position: relative;
        }

        /* 番茄钟音量弹窗 */
        .pomo-vol-popup {
            position: absolute;
            bottom: 50px;
            left: 50%;
            transform: translateX(-50%) scale(0.9);
            width: 130px;
            height: 40px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 15px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.2s ease;
            touch-action: none;
        }

        .pomo-vol-popup.show {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) scale(1);
        }

        #pomo-asmr-volume {
            width: 100%;
            height: 6px;
            background: rgba(221, 108, 130, 0.25);
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
            touch-action: none;
        }

        #pomo-asmr-volume::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            background: #dd6c82;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        /* ================= ASMR 弹窗样式 ================= */
        .asmr-modal-layer {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 350px;
            background: rgba(228, 202, 203, 0.35);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-top-left-radius: 30px;
            border-top-right-radius: 30px;
            border-top: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            align-items: center;
            transform: translateY(120%);
            transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        }

        .asmr-modal-layer.show {
            transform: translateY(0);
        }

        /* 顶部把手 */
        .modal-handle {
            width: 40px;
            height: 5px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 10px;
            margin-top: 15px;
            cursor: pointer;
        }

        /* 控制区 */
        .asmr-controls-area {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 30px;
            width: 100%;
            margin-top: 20px;
            margin-bottom: 15px;
        }

        /* 播放按钮 */
        .asmr-btn-play {
            width: 50px;
            height: 50px;
            background: #fff;
            border-radius: 50%;
            border: none;
            color: #dd6c82;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 5px 15px rgba(221, 108, 130, 0.2);
            cursor: pointer;
            transition: transform 0.2s;
        }

        .asmr-btn-play:active {
            transform: scale(0.9);
        }

        .asmr-btn-play svg {
            width: 26px;
            height: 26px;
        }

        /* 切歌/音量按钮 */
        .asmr-btn-small {
            width: 44px;
            height: 44px;
            background: transparent;
            border: none;
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
        }

        .asmr-btn-small:active {
            transform: scale(0.85);
        }

        .asmr-btn-small svg {
            width: 32px;
            height: 32px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
        }

        /* 音量按钮容器 */
        .asmr-vol-wrap {
            position: relative;
        }

        /* 音量弹窗 - 横向滑块 */
        .asmr-vol-popup {
            position: absolute;
            bottom: 55px;
            left: 50%;
            transform: translateX(-50%) scale(0.9);
            width: 130px;
            height: 40px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 15px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.2s ease;
            touch-action: none;
        }

        .asmr-vol-popup.show {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) scale(1);
        }

        #asmr-volume {
            width: 100%;
            height: 6px;
            background: rgba(221, 108, 130, 0.25);
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
            touch-action: none;
        }

        #asmr-volume::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            background: #dd6c82;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        /* --- 3D 卡片滑动区 --- */
        .interactive-section {
            width: 100%;
            height: 220px;
            perspective: 1000px;
            overflow: visible;
        }

        .card-slider {
            display: flex;
            overflow-x: auto;
            overflow-y: visible;
            scroll-snap-type: x mandatory;
            gap: 12px;
            padding: 15px 0;
            scrollbar-width: none;
            height: 100%;
            align-items: center;
        }

        .card-slider::-webkit-scrollbar {
            display: none;
        }

        .asmr-spacer {
            min-width: 50vw;
            margin-left: -70px;
        }

        /* 占位，保证第一张居中 */

        .asmr-card {
            flex-shrink: 0;
            width: 140px;
            height: 200px;
            background: #fff;
            border-radius: 15px;
            scroll-snap-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            opacity: 0.6;
            transform: scale(0.9);
        }

        .asmr-card.active {
            opacity: 1;
            transform: scale(1.1);
            /* 放大 */
            box-shadow: 0 15px 30px rgba(221, 108, 130, 0.25);
            border: 2px solid #fff;
            z-index: 10;
        }

        .asmr-img {
            width: 100%;
            height: 72%;
            object-fit: cover;
            border-bottom: 1px solid #f0f0f0;
        }

        .asmr-info {
            padding: 10px;
            text-align: center;
        }

        .asmr-title {
            font-size: 14px;
            font-weight: bold;
            color: #59474a;
        }

        .asmr-tag {
            font-size: 10px;
            color: #999;
            margin-top: 3px;
        }

        /* ================= 番茄钟小手机聊天 ================= */
        .phone-modal-layer {
            display: none;
            /* 默认隐藏 */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            /* 背景压暗 */
            z-index: 2500;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s;
        }

        .phone-case {
            width: 320px;
            height: 600px;
            max-height: 85vh;
            background: linear-gradient(145deg, #fff5f8 0%, #fff0f5 50%, #ffe8ee 100%);
            border: 8px solid #ffb7c5;
            border-radius: 40px;
            position: relative;
            display: flex;
            flex-direction: column;
            /* 多层阴影增加立体感 */
            box-shadow:
                0 20px 50px rgba(0, 0, 0, 0.25),
                0 0 0 2px rgba(255, 255, 255, 0.8) inset,
                0 -3px 10px rgba(255, 183, 197, 0.3) inset,
                0 3px 10px rgba(255, 255, 255, 0.5) inset;
            overflow: hidden;
            animation: slideUpPhone 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes slideUpPhone {
            from {
                transform: translateY(100px) scale(0.9);
                opacity: 0;
            }

            to {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }

        /* 小猫挂饰 (挂在手机外面) */
        .phone-charm {
            position: absolute;
            top: calc(50% - 301px);
            /* 与手机顶部对齐，高出1px */
            left: calc(50% - 165px);
            /* 相对于手机左侧 */
            width: 50px;
            height: auto;
            z-index: 100;
            transform-origin: top center;
            animation: swingCharm 2.5s ease-in-out infinite;
            pointer-events: none;
            filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
        }

        @keyframes swingCharm {

            0%,
            100% {
                transform: rotate(-12deg);
            }

            50% {
                transform: rotate(12deg);
            }
        }

        /* 顶部刘海和关闭键 */
        .phone-header {
            height: 40px;
            background: #fff0f5;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            padding: 0 15px;
            position: relative;
            flex-shrink: 0;
            border-bottom: 1px solid #ffeef2;
        }

        .phone-notch {
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 22px;
            background: linear-gradient(180deg, #ffb7c5 0%, #ffc4d0 100%);
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px;
            box-shadow: 0 2px 4px rgba(255, 183, 197, 0.3);
        }

        .phone-close-btn {
            color: #ff8a9b;
            font-size: 22px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10;
        }

        /* 聊天屏幕 */
        /* 聊天屏幕 */
        .phone-screen {
            flex: 1;
            background: #fff;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
            /* 内阴影让屏幕有嵌入感 */
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        /* 消息气泡通用 */
        .chat-msg {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            max-width: 100%;
        }

        .chat-msg.ai {
            align-self: flex-start;
            /* AI靠左 */
        }

        .chat-msg.user {
            align-self: flex-end;
            /* 用户靠右 */
            flex-direction: row-reverse;
            /* 头像在右边 */
        }

        .chat-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: 2px solid #ffb7c5;
            object-fit: cover;
            flex-shrink: 0;
        }

        .msg-bubble {
            padding: 10px 14px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.4;
            word-break: break-all;
            max-width: 220px;
            position: relative;
        }

        /* 1. AI 气泡：浅蓝色背景 + 深灰字 */
        .msg-bubble.ai {
            background: #E1F5FE;
            /* 浅蓝 */
            color: #59474a;
            /* 深灰字 */
            border-bottom-left-radius: 4px;
            border: 1px solid #B3E5FC;
            /* 微微一点深蓝边框增加质感 */
        }

        /* 2. 用户气泡：淡粉色背景 + 深灰字 */
        .msg-bubble.user {
            background: #FFDEE9;
            /* 淡粉 */
            color: #59474a;
            /* 深灰字 */
            border-bottom-right-radius: 4px;
            border: 1px solid #FFB7C5;
        }

        /* 底部输入栏 */
        .phone-input-bar {
            height: 60px;
            background: #fff0f5;
            display: flex;
            align-items: center;
            padding: 0 12px 0 10px;
            gap: 6px;
            border-top: 2px solid #ffeef2;
            flex-shrink: 0;
        }

        .phone-input {
            flex: 1;
            height: 40px;
            border-radius: 20px;
            border: 2px solid #ffb7c5;
            padding: 0 15px;
            outline: none;
            font-size: 14px;
            color: #59474a;
        }

        .chat-tool-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: transform 0.1s;
            color: white;
            flex-shrink: 0;
        }

        .chat-tool-btn:active {
            transform: scale(0.9);
        }

        /* 3. 召唤AI按钮：使用图片 (更具体的选择器覆盖全局样式) */
        .phone-input-bar .paw-btn {
            position: static !important;
            background: transparent url('https://i.postimg.cc/ZnkrHq1n/02.png') no-repeat center center !important;
            background-size: contain !important;
            border: none !important;
            width: 32px !important;
            height: 32px !important;
            max-width: none !important;
            max-height: none !important;
            right: auto !important;
            bottom: auto !important;
            transition: transform 0.2s;
        }

        .phone-input-bar .paw-btn:active {
            transform: scale(0.8) rotate(-10deg);
        }

        .send-btn {
            background: linear-gradient(90deg, #fd5392 0%, #ff6b81 100%);
        }