@font-face {
            font-family: 'Noto Sans SC';
            font-style: normal;
            font-weight: 400;
            src: url('/fonts/NotoSansSC-Regular.ttf') format('truetype');
        }
        @font-face {
            font-family: 'Noto Sans SC';
            font-style: normal;
            font-weight: 700;
            src: url('/fonts/NotoSansSC-Bold.ttf') format('truetype');
        }
        @font-face {
            font-family: 'Noto Serif SC';
            font-style: normal;
            font-weight: 400;
            src: url('/fonts/NotoSerifSC-Regular.ttf') format('truetype');
        }
        @font-face {
            font-family: 'Material Symbols Outlined';
            font-style: normal;
            font-weight: 100 700;
            src: url('/fonts/MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght.ttf') format('truetype');
        }
        .material-symbols-outlined {
            font-family: 'Material Symbols Outlined';
            font-weight: normal;
            font-style: normal;
            font-size: 24px;
            line-height: 1;
            letter-spacing: normal;
            text-transform: none;
            display: inline-block;
            white-space: nowrap;
            word-wrap: normal;
            direction: ltr;
            -webkit-font-feature-settings: 'liga';
            -webkit-font-smoothing: antialiased;
            font-feature-settings: 'liga';
        }
        /* ===== 全局重置 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: #f8f8f8;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 12px;
        }

        .phone-frame {
            max-width: 420px;
            width: 100%;
            background: #ffffff;
            border-radius: 32px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
            overflow: hidden;
            min-height: 780px;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* ===== 导航栏 ===== */
        .nav-bar {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 8px 20px 12px 20px;
            flex-shrink: 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .nav-bar .back-btn {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #222;
            padding: 4px 8px;
            line-height: 1;
            visibility: hidden;
        }

        .nav-bar .back-btn.visible {
            visibility: visible;
        }

        .nav-bar .title {
            font-size: 16px;
            font-weight: 600;
            color: #222;
            letter-spacing: -0.3px;
        }

        .nav-bar .action-icon {
            background: none;
            border: none;
            font-size: 18px;
            cursor: pointer;
            color: #666;
            padding: 4px 8px;
        }

        /* ===== 步骤条 ===== */
        .step-indicator {
            padding: 10px 0 8px 0;
            flex-shrink: 0;
            display: flex;
            justify-content: center;
        }

        .step-wrapper {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0;
        }

        .step-item {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-shrink: 0;
            z-index: 2;
        }

        .step-num {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #e8e8e8;
            color: #aaa;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 11px;
            font-weight: 600;
            transition: all 0.3s ease;
            font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        /* 当前步骤 */
        .step-item.active .step-num {
            background: #222;
            color: #fff;
        }

        /* 已完成步骤 */
        .step-item.done .step-num {
            background: #999;
            color: #fff;
        }

        /* 步骤之间的线（固定宽度，不拉伸） */
        .step-line {
            width: 18px;          /* 固定宽度，不再伸缩 */
            height: 2px;
            flex-shrink: 0;
            background: #e0e0e0;  /* 未完成状态为浅灰色实线 */
            transition: background 0.3s ease;
        }

        /* 已完成部分的连线变为深灰色 */
        .step-line.done {
            background: #999;
        }

        /* ===== 页面容器 ===== */
        .page-container {
            flex: 1;
            padding: 0 20px 20px 20px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .page {
            display: none;
            flex-direction: column;
            flex: 1;
            animation: fadeIn 0.25s ease;
        }

        .page.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ===== 页面1：上传页 ===== */
        .upload-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .preview-box {
            flex: 1;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border-radius: 16px;
            border: 2px dashed rgba(255, 255, 255, 0.4);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 240px;
            overflow: hidden;
            position: relative;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        border-color 0.3s ease;
            cursor: pointer;
            transform: translateZ(0);           /* 开启硬件加速 */
            backface-visibility: hidden;        /* 防止闪烁 */
            will-change: transform;             /* 告知浏览器优化 */
        }

        .preview-box:hover {
            transform: scale(1.015);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        }

        .preview-box .placeholder-text {
            font-size: 14px;
            color: #aaa;
            transition: color 0.25s ease;
            transform: translateZ(0);           /* 子元素也加硬件加速 */
            backface-visibility: hidden;
        }

        .preview-box .placeholder-icon .material-symbols-outlined {
            color: #888;
            transition: color 0.25s ease;
            transform: translateZ(0);           /* 子元素也加硬件加速 */
            backface-visibility: hidden;
        }

        .preview-box:hover .placeholder-text {
            color: #222;
        }
        .preview-box:hover .placeholder-icon .material-symbols-outlined {
            color: #222;
        }

        .preview-box.has-image {
            border-color: #222;
            border-style: solid;
        }

        .preview-box .placeholder-icon {
            font-size: 48px;
            color: #ccc;
            margin-bottom: 8px;
            transition: color 0.25s ease;
        }

        .preview-box .placeholder-text {
            font-size: 14px;
            color: #888;
            transition: color 0.25s ease;
        }

        .preview-box img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: none;
        }

        .preview-box img.show {
            display: block;
        }

        .preview-box .placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .preview-box .placeholder.hidden {
            display: none;
        }
        
        .toolbar {
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 12px 0;
            border-top: 1px solid #f0f0f0;
            gap: 8px;
            flex-shrink: 0;
        }

        .toolbar .tool-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.23);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 14px;
            font-size: 14px;
            color: #888;
            cursor: pointer;
            padding: 10px 32px;
            min-width: 140px;

            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        color 0.2s ease;
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
            transform-style: preserve-3d;
        }

        .toolbar .tool-btn:hover {
            transform: scale(1.01);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            color: #222;
        }

        /* 保留辅助样式 */
        .toolbar .tool-btn .material-symbols-outlined {
            margin-bottom: 2px;
        }
        .toolbar .tool-btn:active {
            color: #222;
        }
        .toolbar .tool-btn.primary {
            color: #222;
            font-weight: 500;
        }
        
        .bottom-actions {
            display: flex;
            gap: 12px;
            flex-shrink: 0;
            padding: 4px 0;
        }

        .bottom-actions .btn {
            flex: 1;
            padding: 14px;
            border-radius: 12px;
            border: 1.5px solid #222;
            background: #fff;
            font-size: 15px;
            font-weight: 500;
            color: #222;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .bottom-actions .btn:active {
            background: #222;
            color: #fff;
        }

        .bottom-actions .btn-primary {
            background: #7A3A22;
            color: #fff;
            border: none;
        }

        .bottom-actions .btn-primary:active {
            background: #7a3a22;
        }

        .bottom-actions .btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .error-tip {
            font-size: 13px;
            color: #e74c3c;
            padding: 8px 12px;
            background: #fef0ef;
            border-radius: 8px;
            display: none;
            margin-top: 4px;
        }

        .error-tip.show {
            display: block;
        }

        /* ===== 页面2：风格选择 ===== */
        .style-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            flex: 1;
            padding: 4px 0 12px 0;
        }

        .style-card {
            background: #ffffff;
            border-radius: 14px;
            border: 2px solid transparent;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .style-card:active {
            transform: scale(0.97);
        }

        .style-card.selected {
            border-color: #7A3A22;
            background: #fff;
        }

        .style-card img {
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            background: #eee;
        }

        .style-card .style-label {
            padding: 6px 10px 8px 10px;
            font-size: 13px;
            font-weight: 500;
            color: #222;
            text-align: center;
            border-top: 1px solid rgba(0, 0, 0, 0.04);
            background: #fff;
        }

        .style-card .check-mark {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #7A3A22;
            color: #fff;
            display: none;
            justify-content: center;
            align-items: center;
            font-size: 14px;
        }

        .style-card.selected .check-mark {
            display: flex;
        }

        .style-card .style-label .sub {
            font-weight: 400;
            color: #999;
            font-size: 11px;
        }

        .style-actions {
            display: flex;
            gap: 10px;
            flex-shrink: 0;
            padding: 4px 0 0 0;
        }

        .style-actions .btn {
            padding: 14px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            border: 1.5px solid #e0e0e0;
            background: #fff;
            color: #222;
        }

        .style-actions .btn:active {
            background: #f5f5f5;
        }

        .style-actions .btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .style-actions .btn-back {
            flex: 0.4;
        }

        .style-actions .btn-generate {
            flex: 1;
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .style-actions .btn-generate:active {
            background: #7A3A22;
        }

        /* ===== 调试面板（保留） ===== */
        .debug-panel {
            display: none;
            margin-top: 10px;
            padding: 12px;
            background: #f5f5f5;
            border-radius: 12px;
            border: 1px solid #eee;
            flex-shrink: 0;
        }

        .debug-panel.show {
            display: block;
        }

        .debug-panel label {
            font-size: 12px;
            color: #888;
            display: block;
            margin-bottom: 4px;
        }

        .debug-panel textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 13px;
            resize: vertical;
            min-height: 60px;
            font-family: inherit;
        }

        /* ===== 页面3：结果预览 ===== */
        .result-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .result-canvas {
            flex: 1;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border-radius: 16px;
            border: 2px dashed rgba(255, 255, 255, 0.4);
            overflow: hidden;
            min-height: 240px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
        }

        .result-canvas img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: none;
        }

        .result-canvas img.show {
            display: block;
        }

        .result-canvas .loading-overlay {
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.7);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 12px;
        }

        .result-canvas .loading-overlay.show {
            display: flex;
        }

        .result-canvas .spinner {
            width: 36px;
            height: 36px;
            border: 3px solid #eee;
            border-top-color: #222;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .text-editor {
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex-shrink: 0;
        }

        .text-editor label {
            font-size: 12px;
            font-weight: 500;
            color: #888;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .text-editor input {
            padding: 12px 16px;
            border: 1.5px solid #e0e0e0;
            border-radius: 12px;
            font-size: 15px;
            background: #fff;
            color: #222;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .text-editor input:focus {
            border-color: #222;
        }

        /* 文案输入框 + 内嵌按钮 */
        .text-editor .input-wrapper {
            position: relative;
            width: 100%;
            display: flex;
            align-items: center;      /* 垂直居中 */
        }

        .text-editor .input-wrapper input {
            width: 100%;
            padding: 12px 50px 12px 16px; /* 右侧留空给按钮 */
            border: 1.5px solid #e0e0e0;
            border-radius: 12px;
            font-size: 15px;
            background: #fff;
            color: #222;
            outline: none;
            transition: border-color 0.2s ease;
            box-sizing: border-box;
        }

        .text-editor .input-wrapper input:focus {
            border-color: #222;
        }

        .text-editor .input-wrapper .regenerate-icon {
            position: absolute;
            right: 30px;
            top: 0;
            bottom: 0;
            margin: auto;       /* 利用 margin: auto 居中 */
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #999;
            padding: 4px;
            line-height: 1;
            transition: color 0.2s ease;
        }

        .text-editor .input-wrapper .regenerate-icon:hover {
            color: #222;
        }
        /* 页面3操作按钮 - 两行布局 */
        .result-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-top: 4px;
        }

        .action-row {
            display: flex;
            gap: 10px;
        }

        .action-row .btn {
            flex: 1;
            padding: 14px;          /* 与第二页、第四页底部按钮一致 */
            border-radius: 12px;
            border: 1.5px solid #e0e0e0;
            background: #fff;
            font-size: 15px;        /* 与第二页、第四页底部按钮一致 */
            font-weight: 500;
            color: #222;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
        }

        .action-row .btn:active {
            background: #f5f5f5;
        }
        /* 🔥 返回按钮：与页面2/4完全一致 */
        .action-row .btn-back {
            flex: 0.4;
            border-color: #e0e0e0;
            color: #222;
            background: #fff;
        }

        .action-row .btn-back:hover {
            background: #f5f5f5;
        }

        /* 🔥 主要按钮（重新合成、下一步）：与页面2/4一致 */
        .action-row .btn-primary {
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .action-row .btn-primary:active {
            background: #7a3a22;
        }
        
        /* ===== 页面4：导出页 ===== */
        .export-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .export-canvas {
            flex: 1;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border-radius: 16px;
            border: 2px dashed rgba(255, 255, 255, 0.4);
            overflow: visible !important;
            min-height: 240px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .export-canvas img {
            width: 100%;
            height: auto;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 8px;
        }

        .export-tools {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 10px;
            flex-shrink: 0;
        }

        .export-tools .btn {
            padding: 12px 8px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.15);          /* 半透明白色 */
            backdrop-filter: blur(2px);                     /* 毛玻璃模糊 */
            -webkit-backdrop-filter: blur(2px);             /* Safari 兼容 */
            border: 1px solid rgba(255, 255, 255, 0.4);    /* 透明边框 */
            font-size: 13px;
            font-weight: 500;
            color: #888;                                    /* 默认浅灰 */
            cursor: pointer;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;

            /* 硬件加速 + 防抖动 */
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
            transform-origin: center;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        background 0.25s ease,
                        color 0.25s ease;

            /* 优化文字渲染 */
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }

        .export-tools .btn:hover {
            transform: scale(1.01);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
            color: #222;
            background: rgba(255, 255, 255, 0.3) !important;
        }

        .export-tools .btn .material-symbols-outlined {
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        .export-tools .btn .icon {
            font-size: 20px;
        }

        .export-tools .btn:active {
            background: #f5f5f5;
        }

        .export-tools .btn-primary {
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .export-tools .btn-primary:active {
            background: #7a3a22;
        }
        /* 第三页的两个按钮毛玻璃效果（增强硬件加速） */
        #retakeBtn,
        #regenerateBtn {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            color: #888;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        color 0.2s ease;
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
            transform-style: preserve-3d;
        }

        #retakeBtn:hover,
        #regenerateBtn:hover {
            transform: scale(1.01);        /* 减小到 1.01 减少抖动 */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            color: #222;
            background: rgba(255, 255, 255, 0.15);  /* 可选 */
        }

        /* 给按钮内图标独立加速 */
        #retakeBtn .material-symbols-outlined,
        #regenerateBtn .material-symbols-outlined {
            transform: translateZ(0);
            backface-visibility: hidden;
        }
        .social-matrix {
            display: flex;
            justify-content: center;
            gap: 16px;
            flex-shrink: 0;
            padding: 2px 0 4px 0;
            flex-wrap: wrap;
        }

        /* ===== 分享标签（与“明信片文案”风格一致） ===== */
        .share-label {
            font-size: 12px;
            font-weight: 500;
            color: #888;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            margin-bottom: 2px;
            margin-top: 18px;
            text-align: left;
            font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        /* ===== 社交按钮（带文字标签） ===== */
        .social-matrix .social-btn {
            display: flex;
            flex-direction: column;    /* 图标在上，文字在下 */
            align-items: center;
            justify-content: center;
            gap: 2px;
            width: 56px;              /* 稍微加宽以容纳文字 */
            height: 56px;
            border-radius: 12px;
            border: 1.5px solid #e0e0e0;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            cursor: pointer;
            transition: all 0.2s ease;
            color: #555;
            text-decoration: none;
            font-size: 12px;
            font-weight: 500;
        }

        .social-matrix .social-btn .social-label {
            font-size: 10px;
            color: #888;
            line-height: 1.2;
        }

        .social-matrix .social-btn:hover {
            background: rgba(255, 255, 255, 0.7);
            transform: scale(1.04);
            border-color: #ccc;
        }

        /* ===== 社交图标尺寸控制 ===== */
        .social-icon {
            width: 20px;          /* 你想要的尺寸，可调整 */
            height: 20px;
            object-fit: contain;
            display: block;
            flex-shrink: 0;
        }

        .social-matrix .social-btn:active {
            background: #f0f0f0;
            transform: scale(0.94);
        }



        .export-bottom {
            display: flex;
            gap: 10px;
            flex-shrink: 0;
            padding-top: 4px;
        }

        .export-bottom .btn {
            padding: 14px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            border: 1.5px solid #e0e0e0;
            background: #fff;
            color: #222;
        }

        .export-bottom .btn:active {
            background: #f5f5f5;
        }

        .export-bottom .btn-back {
            flex: 0.4;
        }

        .export-bottom .btn-done {
            flex: 1;
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .export-bottom .btn-done:active {
            background: #7a3a22;
        }

        /* ===== 页面5：反馈 ===== */
        .feedback-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 20px;
            text-align: center;
            padding: 20px 0;
        }

        .feedback-area .big-icon {
            font-size: 56px;
        }

        .feedback-area h2 {
            font-size: 20px;
            font-weight: 600;
            color: #222;
        }

        .feedback-area p {
            font-size: 14px;
            color: #888;
            max-width: 260px;
        }

        .feedback-actions {
            display: flex;
            gap: 10px;
            width: 100%;
        }

        .feedback-actions .btn {
            flex: 1;
            padding: 14px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            border: 1.5px solid #e0e0e0;
            background: #fff;
            color: #222;
        }

        .feedback-actions .btn:active {
            background: #f5f5f5;
        }

        .feedback-actions .btn-primary {
            background: #222;
            color: #fff;
            border-color: #222;
        }

        .feedback-actions .btn-primary:active {
            background: #444;
        }

        /* ===== 弹窗 ===== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.35);
            backdrop-filter: blur(6px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal {
            background: #fff;
            border-radius: 24px;
            padding: 28px 24px;
            max-width: 340px;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from {
                opacity: 0;
                transform: scale(0.94) translateY(12px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .modal h3 {
            font-size: 18px;
            font-weight: 600;
            color: #222;
            margin-bottom: 8px;
        }

        .modal p {
            font-size: 14px;
            color: #888;
            margin-bottom: 20px;
        }

        .modal-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .modal-actions .btn {
            padding: 14px;
            border-radius: 12px;
            border: 1.5px solid #e0e0e0;
            background: #fff;
            font-size: 15px;
            font-weight: 500;
            color: #222;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
        }

        .modal-actions .btn:active {
            background: #f5f5f5;
        }

        .modal-actions .btn-primary {
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .modal-actions .btn-primary:active {
            background: #7a3a22;
        }

        /* ===== 弹窗按钮：伪元素缩放 + 保留原色 ===== */
        /* ===== 弹窗按钮：伪元素缩放 + 保留原色 ===== */
        .modal-actions .btn,
        .modal-actions .btn-primary {
            position: relative;               /* 为伪元素定位 */
            background: transparent;          /* 按钮本身透明 */
            border: none;
            padding: 14px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            color: #222;                      /* 拍照按钮文字颜色 */
            cursor: pointer;
            text-align: center;
            z-index: 1;
            transition: none;                 /* 按钮本身无过渡 */
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        /* 拍照按钮（默认白色背景） */
        .modal-actions .btn::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 12px;
            background: #fff;
            border: 1.5px solid #e0e0e0;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
            z-index: -1;
            pointer-events: none;
            transform: scale(1);
            transform-origin: center;         /* 确保缩放从中心开始 */
        }

        /* 从相册选择按钮（深棕色背景） */
        .modal-actions .btn-primary::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 12px;
            background: #7A3A22;
            border: 1.5px solid #7A3A22;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
            z-index: -1;
            pointer-events: none;
            transform: scale(1);
            transform-origin: center;
        }

        /* 悬停时伪元素缩放 + 阴影 */
        .modal-actions .btn:hover::before,
        .modal-actions .btn-primary:hover::before {
            transform: scale(1.01);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        /* 文字颜色在悬停时保持原样，不做任何改变 */
        .modal-actions .btn:hover,
        .modal-actions .btn-primary:hover {
            color: inherit;  /* 保持默认颜色不变 */
        }
        /* 但拍照按钮默认是 #222，从相册选择是 #fff，所以要显式固定 */
        .modal-actions .btn {
            color: #222;
        }
        .modal-actions .btn-primary {
            color: #fff;
        }
        /* 悬停时不改变颜色 */
        .modal-actions .btn:hover {
            color: #222;
        }
        .modal-actions .btn-primary:hover {
            color: #fff;
        }

        .modal-close {
            display: block;
            margin-top: 12px;
            padding: 10px;
            border: none;
            background: none;
            font-size: 14px;
            color: #999;
            cursor: pointer;
            width: 100%;
            text-align: center;
        }

        /* ===== 隐藏文件输入 ===== */
        .hidden-input {
            display: none;
        }

        /* ===== 滚动条 ===== */
        .page-container::-webkit-scrollbar {
            width: 3px;
        }
        .page-container::-webkit-scrollbar-thumb {
            background: #ddd;
            border-radius: 4px;
        }

        .export-canvas {
            overflow: visible !important;
        }

        #exportImage {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* ===== 响应式 ===== */
        @media (max-width: 440px) {
            .phone-frame {
                border-radius: 20px;
                min-height: 700px;
            }
            .style-grid {
                gap: 10px;
            }
            .export-tools {
                gap: 8px;
            }
            .export-tools .btn {
                font-size: 12px;
                padding: 10px 6px;
            }
            /* ===== 拖拽文字样式 ===== */
            /* ===== 文案样式（图片下方居中） ===== */
            #textLayer {
                text-align: center;
                padding: 8px 16px;
                margin-top: 4px;
            }

            #textContent {
                font-size: 20px;
                line-height: 1.6;
                color: #222;
                font-weight: 600;
                word-break: break-word;
            }
            #textContent {
                font-size: 20px;
                line-height: 1.5;
                word-break: break-word;
            }
            /* 不同风格字体 */
            .style-watercolor #textContent {
                font-family: 'Noto Serif SC', serif;
            }
            .style-oil #textContent {
                font-family: 'Georgia', 'Times New Roman', serif;
            }
            .style-sketch #textContent {
                font-family: 'Courier New', monospace;
            }
            .style-anime #textContent {
                font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
            }
            #wordCount {
                font-weight: 500;
                letter-spacing: 0.3px;
            }
            /* 预览页和导出页的图片统一显示方式 */
            #resultImage {
                display: block;
                width: 100%;
                height: 100%;
                object-fit: contain;
            }

            /* 确保两个 canvas 容器尺寸相同 */
            .result-canvas,
            .export-canvas {
                width: 100%;
                aspect-ratio: 1 / 1;
                max-width: 100%;
            }
        }
        /* ===== 思源黑体 UI 文字 ===== */
        body,
        .nav-bar .title,
        .btn,
        .btn-primary,
        .btn-secondary,
        .btn-back,
        .btn-done,
        label,
        input,
        textarea,
        .style-label,
        .placeholder-text,
        .error-tip,
        .feedback-area p,
        .ai-notice {
            font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
            font-weight: 700;
        }

        /* ===== 时间和文案保留思源宋体 ===== */
        #textContent,
        #wordCountNum,
        .time-stamp {
            font-family: 'Noto Serif SC', "Songti SC", serif;
            font-weight: 400;
        }
        /* ===== 新增：Material Symbols 线性风格 ===== */
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0;  /* 0 = 描边，1 = 填充 */
        }
        /* ===== 风格按钮（Material Symbols） ===== */
        .style-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 14px;
            cursor: pointer;
            color: #888;
            padding: 10px 32px;
            min-width: 140px;

            /* ✅ 新增过渡（更丰富） */
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        color 0.2s;
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
            transform-style: preserve-3d;   /* 新增 */
        }

        .style-btn:hover {
            transform: scale(1.005);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            color: #222;
        }

        .style-btn .material-symbols-outlined {
            margin-bottom: 2px;   /* 同样控制间距 */
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        .style-btn:hover {
            color: #222;
        }
        .material-symbols-outlined {
            font-size: 26px;
            font-variation-settings: 'FILL' 0;
        }
        /* 右上角对勾标记（Material Symbols 版本） */
        .check-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #7A3A22;
            display: none;
            justify-content: center;
            align-items: center;
        }
        .check-badge .material-symbols-outlined {
            font-size: 16px;
            color: #ffffff;
            font-variation-settings: 'wght' 600;
        }
        /* 选中时显示 */
        .style-card.selected .check-badge {
            display: flex;
        }
        /* 风格卡片悬停动画 */
        .style-card:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
        }
        /* 所有按钮基础样式（硬件加速） */
        .btn {
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
            transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        box-shadow 0.25s cubic-bezier(0.2, 0.9, 0.4, 1),
                        background 0.2s ease,
                        color 0.2s ease;
        }

        /* 按钮悬停动画（缩放缩小到 1.015） */
        .btn:hover {
            transform: scale(1.015);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        /* 主要按钮悬停：背景色加深 */
        .btn-primary:hover,
        .btn-generate:hover,
        .btn-done:hover {
            background: #5A2A1A;   /* 比 #7A3A22 更深 */
            border-color: #5A2A1A;
            color: #fff;
        }

        /* 返回/次要按钮悬停：背景变浅灰（不缩放） */
        .btn-back:hover,
        .btn:not(.btn-primary):not(.btn-generate):not(.btn-done):not(.btn-back):hover {
            background: #f0f0f0;
        }
        
        /* 统一图标大小 */
        .toolbar .tool-btn .material-symbols-outlined,
        .style-btn .material-symbols-outlined {
            font-size: 26px;
        }
        /* ===== 页面5：分享成功页 ===== */
        .feedback-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 24px;
            padding: 20px 0;
            flex: 1;
            text-align: center;
        }

        /* 成功图标 */
        .success-icon-wrapper {
            position: relative;
            width: 120px;
            height: 120px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .icon-pulse-ring {
            position: absolute;
            inset: -8px;
            border-radius: 50%;
            background: rgba(153, 70, 42, 0.08);
            animation: pulse-ring 2s ease-in-out infinite;
        }

        .icon-circle {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid rgba(153, 70, 42, 0.2);
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .send-icon {
            font-size: 40px;
            color: #99462a;
            font-variation-settings: 'wght' 200;
        }

        @keyframes pulse-ring {
            0% { transform: scale(1); opacity: 0.8; }
            50% { transform: scale(1.25); opacity: 0; }
            100% { transform: scale(1.25); opacity: 0; }
        }

        /* 标题与描述 */
        .feedback-header h2 {
            font-size: 28px;
            font-weight: 600;
            color: #222;
            margin-bottom: 6px;
            font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .feedback-header p {
            font-size: 15px;
            color: #888;
            max-width: 280px;
            line-height: 1.6;
        }

        /* 明信片预览卡片 */
        .postcard-preview-card {
            width: 100%;
            max-width: 280px;
            margin: 0 auto;
        }

        .card-inner {
            padding: 10px;
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.35);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            transform: rotate(1deg);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        }

        .card-inner:hover {
            transform: rotate(0deg) scale(1.01);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        }

        .card-image-wrapper {
            position: relative;
            aspect-ratio: 4 / 5;
            border-radius: 12px;
            overflow: hidden;
            background: #f5f5f5;
        }

        .card-image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .card-image-wrapper:hover img {
            transform: scale(1.06);
        }

        /* 卡片装饰标签 */
        .card-badge {
            position: absolute;
            bottom: 12px;
            left: 12px;
            right: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: rgba(255, 255, 255, 0.85);
            font-size: 10px;
            font-weight: 500;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
            pointer-events: none;
        }
        .card-badge .material-symbols-outlined {
            font-size: 16px;
        }

        /* 卡片印章装饰 */
        .card-stamp {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.25);
            display: flex;
            justify-content: center;
            align-items: center;
            pointer-events: none;
            transform: rotate(12deg);
        }
        .card-stamp span {
            font-size: 8px;
            font-weight: 700;
            text-transform: uppercase;
            text-align: center;
            line-height: 1.2;
            color: rgba(255, 255, 255, 0.35);
            letter-spacing: 0.02em;
        }

        /* 社交矩阵（与第四页保持一致） */
        .feedback-area .social-matrix {
            display: flex;
            justify-content: center;
            gap: 14px;
            flex-wrap: wrap;
            padding: 6px 0 4px 0;
        }

        .feedback-area .social-matrix .social-btn {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            border: 1.5px solid #e0e0e0;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #555;
            text-decoration: none;
        }

        .feedback-area .social-matrix .social-btn:hover {
            background: rgba(255, 255, 255, 0.7);
            transform: scale(1.04);
            border-color: #ccc;
        }

        /* 操作按钮（毛玻璃风格） */
        .feedback-actions {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
            max-width: 320px;
        }

        .feedback-actions .btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
            border: none;
            background: rgba(255, 255, 255, 0.35);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #222;
        }

        .feedback-actions .btn .material-symbols-outlined {
            font-size: 20px;
        }

        .feedback-actions .btn:hover {
            transform: scale(1.015);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        }

        .feedback-actions .btn-primary {
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .feedback-actions .btn-primary:hover {
            background: #5A2A1A;
            border-color: #5A2A1A;
            color: #fff;
        }

        .feedback-actions .btn-ghost:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        /* 入场动画（首次加载时） */
        .stagger-in {
            opacity: 0;
            animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* ===== 飞机飞入动画 ===== */
        .plane-wrapper {
            width: 80px;
            height: 80px;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transform: translateX(200px) scale(0.5);
            transition: none;
        }

        .plane-wrapper.animate {
            animation: planeFlyIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes planeFlyIn {
            0% {
                opacity: 0;
                transform: translateX(200px) scale(0.3) rotate(-10deg);
            }
            60% {
                opacity: 1;
                transform: translateX(-20px) scale(1.05) rotate(2deg);
            }
            100% {
                opacity: 1;
                transform: translateX(0) scale(1) rotate(0deg);
            }
        }

        .plane-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: rgba(122, 58, 34, 0.1);
            border: 2px solid rgba(122, 58, 34, 0.2);
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 8px 30px rgba(122, 58, 34, 0.08);
        }

        .plane-icon .material-symbols-outlined {
            font-size: 32px;
            color: #7A3A22;
            font-variation-settings: 'wght' 300;
        }

        /* ===== 第五页按钮布局 ===== */
        .feedback-actions {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
            max-width: 320px;
        }

        .feedback-actions .action-row {
            display: flex;
            gap: 12px;
        }

        .feedback-actions .action-row .btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 16px;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.35);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            color: #222;
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
        }

        .feedback-actions .action-row .btn .material-symbols-outlined {
            font-size: 20px;
        }

        .feedback-actions .action-row .btn:hover {
            transform: scale(1.015);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        }

        .feedback-actions .action-row .btn-primary {
            background: #7A3A22;
            color: #fff;
            border-color: #7A3A22;
        }

        .feedback-actions .action-row .btn-primary:hover {
            background: #5A2A1A;
            border-color: #5A2A1A;
        }

        .feedback-actions .action-row .btn-ghost:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        /* 查看集邮册按钮（独立占一行） */
        .feedback-actions .btn-stamp {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
            border: 1.5px solid rgba(122, 58, 34, 0.25);
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            color: #7A3A22;
            width: 100%;
            transform: translateZ(0);
            backface-visibility: hidden;
            will-change: transform;
        }

        .feedback-actions .btn-stamp .material-symbols-outlined {
            font-size: 20px;
        }

        .feedback-actions .btn-stamp:hover {
            background: rgba(122, 58, 34, 0.08);
            transform: scale(1.015);
            box-shadow: 0 4px 16px rgba(122, 58, 34, 0.06);
        }

        /* ===== 集邮册模态框 ===== */
        #stampBookModal .modal {
            max-width: 420px;
            max-height: 85vh;
            padding: 20px 20px 24px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

        .modal-header h3 {
            font-size: 18px;
            font-weight: 600;
            color: #222;
            margin: 0;
        }

        .modal-close-btn {
            background: none;
            border: none;
            font-size: 22px;
            color: #999;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 8px;
            transition: background 0.2s;
        }

        .modal-close-btn:hover {
            background: #f0f0f0;
        }

        .stamp-book-grid {
            flex: 1;
            overflow-y: auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            padding: 8px 0 4px;
            min-height: 100px;
        }


        .stamp-book-grid .stamp-item:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        }

        .stamp-empty {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            color: #ccc;
            text-align: center;
        }

        .stamp-empty p {
            font-size: 14px;
            color: #aaa;
            margin-top: 8px;
            line-height: 1.6;
        }

        /* 集邮册模态框滚动条 */
        .stamp-book-grid::-webkit-scrollbar {
            width: 3px;
        }
        .stamp-book-grid::-webkit-scrollbar-thumb {
            background: #ddd;
            border-radius: 4px;
        }
        .stamp-book-grid::-webkit-scrollbar-track {
            background: transparent;
        }

        /* ===== 下载选择弹窗 ===== */
        .download-modal {
            max-width: 380px;
            padding: 28px 24px;
        }

        .download-options {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin: 16px 0 20px 0;
        }

        .download-option-btn {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            border-radius: 12px;
            border: 2px solid #e8e8e8;
            background: #fff;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
            width: 100%;
        }

        .download-option-btn:hover {
            border-color: #7A3A22;
            background: #fcf8f5;
            transform: scale(1.01);
        }

        .download-option-btn:active {
            transform: scale(0.98);
        }

        .download-option-btn .option-icon {
            font-size: 24px;
            flex-shrink: 0;
        }

        .download-option-btn .option-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .download-option-btn .option-title {
            font-size: 15px;
            font-weight: 600;
            color: #222;
        }

        .download-option-btn .option-desc {
            font-size: 12px;
            color: #999;
            margin-top: 2px;
        }

        .download-option-btn .option-arrow {
            font-size: 22px;
            color: #ccc;
            flex-shrink: 0;
        }

        /* ===== 第五页整体紧凑布局 ===== */
        #page5 .feedback-area {
            padding: 12px 0;        /* 上下内边距从 20px 改为 12px */
            gap: 12px;              /* 子元素间距从 24px 改为 12px */
        }

        #page5 .feedback-header h2 {
            font-size: 24px;        /* 标题字号稍微缩小，视觉上更紧凑（可选） */
            margin-bottom: 2px;
        }

        #page5 .feedback-header p {
            font-size: 13px;
            margin-bottom: 0;
        }

        /* 明信片预览卡片缩小 */
        #page5 .postcard-preview-card {
            max-width: 200px;       /* 卡片宽度缩小（可选） */
        }

        #page5 .postcard-preview-card .card-inner {
            padding: 6px;           /* 卡片内边距缩小 */
        }

        /* 分享标签间距缩小 */
        #page5 .share-label {
            margin-top: 4px;        /* 从 18px 改为 4px */
            margin-bottom: 2px;
        }

        /* 社交矩阵间距缩小 */
        #page5 .social-matrix {
            padding: 2px 0 2px 0;
            gap: 10px;
        }

        /* 底部操作按钮间距缩小 */
        #page5 .feedback-actions {
            gap: 8px;               /* 按钮间距从 12px 改为 8px */
            max-width: 280px;       /* 稍微窄一点更紧凑（可选） */
        }

        #page5 .feedback-actions .action-row {
            gap: 8px;               /* 行内按钮间距缩小 */
        }

        #page5 .feedback-actions .btn {
            padding: 10px 12px;     /* 按钮内边距缩小 */
            font-size: 13px;        /* 字号稍微缩小 */
        }

        #upgradeStorageBtn {
            transition: transform 0.2s ease, background 0.2s ease;
        }
        #upgradeStorageBtn:hover {
            transform: scale(1.05);
            background: #5A2A1A; /* 深棕色 */
        }

        /* 集邮册网格 - 保持两列 */
        .stamp-book-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            padding: 8px 0 4px;
            flex: 1;
            overflow-y: auto;
            min-height: 100px;
            overflow-x: hidden;   /* 新增：隐藏水平溢出 */
        }

        /* 每个卡片 - 固定高度，无内边距 */
        .stamp-item {
            position: relative;
            background: #f8f8f8;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #eee;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            height: 190px;
            cursor: pointer;
            max-width: 100%;        /* 新增：限制最大宽度 */
            box-sizing: border-box; /* 确保边框和内边距算在宽度内 */
        }

        /* 叠加地点（半透明，绝对定位） */
        .stamp-overlay {
            position: absolute;
            bottom: 8px;
            left: 8px;
            right: 8px;
            color: #fff;
            font-size: 12px;
            font-weight: 500;
            text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
            background: rgba(0, 0, 0, 0.35);
            padding: 4px 10px;
            border-radius: 6px;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            pointer-events: none;  /* 不阻挡点击事件 */
        }

        .stamp-item:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        }

        /* 图片填满卡片，裁剪 */
        .stamp-item img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* 裁剪填充，保持比例 */
            display: block;
        }

        /* 卡片上的复选框 */
        .stamp-item {
            position: relative;
            /* 原有样式保持不变 */
        }

        /* ===== 复选框容器：默认隐藏，极简风格 ===== */
        .stamp-checkbox {
            display: none;
            position: absolute;
            top: 6px;
            left: 6px;
            z-index: 5;
            width: 28px;
            height: 28px;
            align-items: center;
            justify-content: center;
            pointer-events: none;          /* 容器不拦截鼠标事件 */
            background: transparent !important;  /* 确保无背景 */
            border: none !important;
        }

        /* ===== 选择模式下显示复选框 ===== */
        .selection-mode .stamp-checkbox {
            display: flex !important;
        }

        /* 选择模式下卡片点击不显示手指（可选） */
        .selection-mode .stamp-item {
            cursor: default;
        }

        .stamp-checkbox:hover {
            background: rgba(0, 0, 0, 0.6);
        }

        /* ===== 复选框本体：纯勾，无背景 ===== */
        .stamp-checkbox input[type="checkbox"] {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
            pointer-events: auto;
            z-index: 2;

            /* ✅ 完全移除原生外观（最关键） */
            appearance: none !important;
            -webkit-appearance: none !important;

            /* 清除所有可能残留的样式 */
            outline: none !important;
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            -webkit-tap-highlight-color: transparent !important;
        }

        /* 同时，明确禁用悬停和焦点时的任何变化 */
        .stamp-checkbox input[type="checkbox"]:hover,
        .stamp-checkbox input[type="checkbox"]:focus,
        .stamp-checkbox input[type="checkbox"]:active,
        .stamp-checkbox input[type="checkbox"]:checked {
            appearance: none !important;
            -webkit-appearance: none !important;
            outline: none !important;
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .stamp-checkbox input[type="checkbox"]:checked::after {
            content: '✓';
            animation: checkPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .check-icon {
            font-size: 28px;
            color: #7A3A22;
            opacity: 0;
            transform: scale(0.5);
            transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
            pointer-events: none;
        }

        .stamp-item.selected .check-icon {
            opacity: 1;
            transform: scale(1);
        }

        /* ===== 勾选时弹入动画 ===== */
        @keyframes checkPop {
            0% { transform: scale(0); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        /* 批量删除面板 */
        .batch-delete-panel {
            position: sticky;
            bottom: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            padding: 12px 16px;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 12px 12px 0 0;
            margin-top: 8px;
        }

        .batch-delete-panel.hidden {
            display: none;
        }

        .batch-delete-panel .info {
            font-size: 14px;
            color: #666;
        }

        .batch-delete-panel .btn-delete-selected {
            padding: 8px 20px;
            background: #e74c3c;
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .batch-delete-panel .btn-delete-selected:hover {
            background: #c0392b;
            transform: scale(1.02);
        }

        .batch-delete-panel .btn-delete-selected:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
        }

        /* 底部面板样式微调 */
        .batch-delete-panel .btn-cancel-selection {
            padding: 8px 16px;
            background: #f5f5f5;        /* 从 #f0f0f0 改为 #f5f5f5 */
            border: 1px solid #ddd;      /* 从 border: none 改为有边框 */
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            color: #666;
            transition: all 0.2s;        /* 从 background 0.2s 改为 all 0.2s */
        }

        .batch-delete-panel .btn-cancel-selection:hover {
            background: #eee;
        }

        /* 集邮册底部需要给批量删除面板留空间 */
        .stamp-book-grid {
            padding-bottom: 4px;
        }