           /* 录音按钮样式 */
           #voice-record-btn {
               transition: all 0.3s ease;
           }

           #voice-record-btn:hover {
               transform: scale(1.1);
           }

           #voice-record-btn:active {
               transform: scale(0.95);
           }

           .voice-play-btn:hover {
               background-color: rgba(0, 0, 0, 0.2);
           }

           .voice-spinner {
               width: 20px;
               height: 20px;
               border: 2px solid rgba(0, 0, 0, 0.2);
               border-top-color: var(--accent-color);
               border-radius: 50%;
               animation: spin 1s linear infinite;
               display: none;
               margin: 4px;
           }

           .voice-duration {
               font-size: 14px;
               font-weight: 500;
               margin: 0 10px;
               flex-shrink: 0;
           }

           .message-bubble.user .voice-duration {
               color: #3e6224;
           }

           #product-category-tabs {
               display: flex;
               overflow-x: auto;
               padding: 10px 15px 0 15px;
               flex-shrink: 0;
               border-bottom: 1px solid var(--border-color);
               background-color: var(--secondary-bg);
               -ms-overflow-style: none;
               scrollbar-width: none;
           }

           #product-category-tabs::-webkit-scrollbar {
               display: none;
           }

           .product-category-tab {
               padding: 8px 16px;
               cursor: pointer;
               border: none;
               background-color: transparent;
               font-size: 15px;
               font-weight: 500;
               color: var(--text-secondary);
               border-bottom: 2px solid transparent;
               margin-bottom: -1px;
               transition: all 0.2s ease-in-out;
               white-space: nowrap;
               flex-shrink: 0;
           }

           .product-category-tab.active {
               color: #FF5722;
               border-bottom-color: #FF5722;
               font-weight: 600;
           }

           #phone-screen.dark-mode .product-category-tab.active {
               color: #FF8A65;
               border-bottom-color: #FF8A65;
           }

           #product-category-tabs {
               overflow-x: auto;
               white-space: nowrap;
               -webkit-overflow-scrolling: touch;
               scrollbar-width: none;
               -ms-overflow-style: none;
           }

           #product-category-tabs::-webkit-scrollbar {
               display: none;
           }

           .product-category-tab {
               flex-shrink: 0;
           }

           #shopping-screen.management-mode .product-item {
               cursor: pointer;
           }

           #shopping-screen.management-mode .product-management-overlay {
               display: none;
           }

           #shopping-screen.management-mode .product-item::before {
               content: '';
               position: absolute;
               top: 10px;
               right: 10px;
               width: 22px;
               height: 22px;
               border: 2px solid #ccc;
               border-radius: 50%;
               background-color: rgba(255, 255, 255, 0.7);
               transition: all 0.2s ease;
               z-index: 6;
           }

           #shopping-screen.management-mode .product-item.selected::before {
               background-color: var(--accent-color);
               border-color: var(--accent-color);
               content: '✔';
               color: white;
               font-size: 14px;
               text-align: center;
               line-height: 22px;
           }

           #shopping-screen.management-mode .product-item:not(.selected) {
               opacity: 0.8;
           }

           #shopping-action-bar {
               position: absolute;
               bottom: 0;
               left: 0;
               right: 0;
               width: auto;
               padding: 10px 15px;
               padding-bottom: calc(10px + env(safe-area-inset-bottom));
               background-color: rgba(247, 247, 247, 0.9);
               backdrop-filter: blur(10px);
               -webkit-backdrop-filter: blur(10px);
               border-top: 1px solid var(--border-color);
               box-sizing: border-box;
               z-index: 5;
               display: none;
               justify-content: space-between;
               align-items: center;
           }

           #shopping-action-bar .select-all-label {
               display: flex;
               align-items: center;
               gap: 8px;
               font-size: 16px;
               color: var(--text-primary);
               cursor: pointer;
           }

           #shopping-action-bar .action-bar-btn {
               padding: 10px 25px;
               border-radius: 20px;
               border: none;
               font-size: 15px;
               font-weight: 600;
               cursor: pointer;
               background-color: #ff3b30;
               color: white;
           }

           .polaroid-widget-container {
               width: 100%;
               display: flex;
               flex-direction: column;
               align-items: center;
               margin-bottom: 30px;
               flex-shrink: 0;
               margin-top: 20px;
           }

           .polaroid-photos {
               display: flex;
               justify-content: center;
               align-items: center;
               gap: 5px;
           }

           .polaroid-photo {
               background-color: white;
               padding: 8px 8px 15px 8px;
               border-radius: 4px;
               box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
               transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
               width: 80px;
               flex-shrink: 0;
           }

           .polaroid-photo:hover {
               transform: scale(1.1) rotate(0deg) !important;
               box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
               z-index: 10;
           }

           .polaroid-photo img {
               width: 100%;
               display: block;
               aspect-ratio: 1 / 1;
               object-fit: cover;
           }

           .polaroid-widget-title {
               margin-top: 15px;
               font-size: 13px;
               font-weight: 500;
               color: white;
               text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
           }

           #page-2-app-container {
               display: grid;
               grid-template-columns: 155px 1fr;
               gap: 15px;
               width: 100%;
               padding-top: 20px;
               align-items: start;
           }

           .app-subgrid {
               display: grid;
               grid-template-columns: 1fr 1fr;
               gap: 15px;
           }

           .large-widget {
               display: flex;
               flex-direction: column;
               align-items: center;
               gap: 8px;
           }

           .large-widget-img {
               width: 100%;
               aspect-ratio: 1 / 1;
               border-radius: 22px;
               object-fit: cover;
               box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
           }

           .large-widget-label {
               color: white;
               font-size: 13px;
               font-weight: 500;
               text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
           }

           .small-widget {
               display: flex;
               flex-direction: column;
               align-items: center;
               gap: 8px;
           }

           .small-widget-icon-wrapper {
               width: 55px;
               height: 55px;
               display: flex;
               align-items: center;
               justify-content: center;
           }

           .small-widget-img {
               width: 100%;
               height: 100%;
               object-fit: cover;
               border-radius: 14px;
           }

           .small-widget-label {
               color: white;
               font-size: 13px;
               font-weight: 500;
               text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
           }

           #page-2-app-container .small-widget-label {
               color: #000 !important;
               text-shadow: none !important;
           }

           #phone-screen.dark-mode #char-diary-list .list-item .item-title,
           #phone-screen.dark-mode #char-diary-list .list-item .item-content,
           #phone-screen.dark-mode #char-memo-list .list-item .item-title,
           #phone-screen.dark-mode #char-memo-list .list-item .item-content,
           #phone-screen.dark-mode #char-browser-history .char-browser-item .title,
           #phone-screen.dark-mode #char-usage-list .usage-item-name,
           #phone-screen.dark-mode #char-music-list .music-item-name {
               color: #f0f0f0;
           }

           #phone-screen.dark-mode #char-diary-list .list-item .item-content,
           #phone-screen.dark-mode #char-browser-history .char-browser-item .url,
           #phone-screen.dark-mode #char-usage-list .usage-item-category,
           #phone-screen.dark-mode #char-music-list .music-item-artist {
               color: #a0a0a0;
           }

           #phone-screen.dark-mode #char-diary-detail-content .diary-highlight {
               background-color: rgba(255, 223, 100, 0.2);
               color: #FFD700;
           }

           #phone-screen.dark-mode #char-diary-detail-content .diary-underline {
               border-bottom-color: #FF85B3;
           }

           #phone-screen.dark-mode #char-diary-detail-content .diary-emphasis {
               color: #FF85B3;
           }

           #phone-screen.dark-mode #char-diary-detail-content .diary-handwritten,
           #phone-screen.dark-mode #char-diary-detail-content .diary-messy {
               color: #dcdcdc;
           }

           #phone-screen.dark-mode .spoiler {
               background-color: #444;
               color: #444;
           }

           #phone-screen.dark-mode .spoiler:hover,
           #phone-screen.dark-mode .spoiler:active {
               background-color: #555;
               color: #fff;
           }

           #avatar-frame-modal .frame-grid.management-mode .frame-item {
               cursor: pointer;
           }

           #avatar-frame-modal .frame-grid.management-mode .frame-item:has(.delete-btn)::after {
               content: '';
               position: absolute;
               top: -2px;
               left: -2px;
               width: calc(100% + 4px);
               height: calc(100% + 4px);
               border: 3px solid transparent;
               border-radius: 12px;
               box-sizing: border-box;
               transition: border-color 0.2s;
               pointer-events: none;
           }

           #avatar-frame-modal .frame-grid.management-mode .frame-item.selected::after {
               border-color: var(--accent-color);
           }

           #frame-action-bar {
               display: none;
               flex-shrink: 0;
               padding: 10px 15px;
               padding-bottom: calc(10px + env(safe-area-inset-bottom));
               background-color: rgba(247, 247, 247, 0.9);
               backdrop-filter: blur(10px);
               -webkit-backdrop-filter: blur(10px);
               border-top: 1px solid var(--border-color);
               justify-content: space-between;
               align-items: center;
           }

           #frame-action-bar .select-all-label {
               font-size: 16px;
               color: var(--text-primary);
               cursor: pointer;
           }

           #frame-action-bar .action-bar-btn {
               padding: 10px 25px;
               border-radius: 20px;
               border: none;
               font-size: 15px;
               font-weight: 600;
               cursor: pointer;
               background-color: #ff3b30;
               color: white;
           }

           #favorite-memo-btn.active svg {
               fill: #ffc107;
               color: #ffc107;
           }

           .favorite-item-card .memo-title {
               font-weight: 600;
               display: block;
               margin-bottom: 8px;
               font-size: 15px;
           }

           #chat-interface-screen .back-btn {
               position: relative;
           }

           .back-btn .unread-indicator {
               position: absolute;
               top: -2px;
               right: -10px;
               min-width: 18px;
               height: 18px;
               padding: 0 5px;
               background-color: #ff3b30;
               color: white;
               font-size: 11px;
               font-weight: bold;
               line-height: 18px;
               text-align: center;
               border-radius: 9px;
               box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
               display: none;
               z-index: 20;
               transform: scale(0.8);
           }

           #phone-screen.dark-mode .back-btn .unread-indicator {
               border: 1px solid #333;
           }

           #favorite-article-btn.active svg {
               fill: #ffc107;
               color: #ffc107;
           }

           .modal,
           #custom-modal-overlay,
           #transfer-modal,
           #battery-alert-modal,
           #photo-viewer-modal,
           #character-profile-modal,
           #update-notice-modal {
               background-color: transparent !important;
               backdrop-filter: none !important;
               -webkit-backdrop-filter: none !important;
           }

           #character-profile-modal .jottings .label {
               display: flex !important;
           }

           #total-image-size-display {
               /* <--- 在这里添加了 ID */
               display: flex;
               justify-content: space-between;
               align-items: center;
               font-size: 14px;
               color: var(--text-secondary);
               margin-bottom: 15px;
               padding: 8px 12px;
               background-color: #f0f2f5;
               border-radius: 8px;
               border: 1px solid var(--border-color);
           }

           #phone-screen.dark-mode #total-image-size-display {
               /* <--- 在这里添加了 ID */
               background-color: #2c2c2e;
               border-color: #38383a;
           }

           #total-image-size-display #image-size-label {
               /* <--- 新增 */
               font-weight: 500;
           }

           #total-image-size-display #image-size-value,
           #token-count-display #token-count-value,
           #message-count-display #message-count-value {
               /* <--- 新增 */
               font-weight: 600;
               color: var(--text-primary);
           }

           /* ▼▼▼ RealImag多图布局样式 ▼▼▼ */
           /* 多图容器 */
           .post-images-grid {
               display: grid;
               gap: 8px;
               /* 图片之间的固定间距 */
               margin-top: 10px;
           }

           /* 单张图片 - 大图，等比例缩放 */
           .post-images-grid.grid-1 {
               grid-template-columns: 1fr;
               justify-items: start;
           }

           .post-images-grid.grid-1 .realimag-image,
           .post-images-grid.grid-1 .naiimag-image {
               max-width: 280px;
               max-height: 280px;
               width: auto;
               height: auto;
           }

           /* 2张图片 - 横向并排，等比例缩放 */
           .post-images-grid.grid-2 {
               grid-template-columns: auto auto;
               gap: 5px;
               justify-content: start;
           }

           .post-images-grid.grid-2 .realimag-image,
           .post-images-grid.grid-2 .naiimag-image {
               max-width: 135px;
               max-height: 135px;
               width: auto;
               height: auto;
           }

           /* 3张图片 - 横向排列，等比例缩放 */
           .post-images-grid.grid-3 {
               grid-template-columns: repeat(3, 1fr);
               gap: 5px;
           }

           .post-images-grid.grid-3 .realimag-image {
               max-width: 130px;
               max-height: 130px;
               width: auto;
               height: auto;
           }

           /* 4张图片 - 2x2方格，等比例缩放 */
           .post-images-grid.grid-4 {
               grid-template-columns: repeat(2, 1fr);
               gap: 5px;
           }

           .post-images-grid.grid-4 .realimag-image {
               max-width: 195px;
               max-height: 195px;
               width: auto;
               height: auto;
           }

           /* 5张图片 - 上2下3，等比例缩放 */
           .post-images-grid.grid-5 {
               display: grid;
               grid-template-columns: repeat(6, 1fr);
               gap: 5px;
           }

           .post-images-grid.grid-5 .realimag-image:nth-child(1),
           .post-images-grid.grid-5 .realimag-image:nth-child(2) {
               grid-column: span 3;
               max-width: 195px;
               max-height: 195px;
               width: auto;
               height: auto;
           }

           .post-images-grid.grid-5 .realimag-image:nth-child(n+3) {
               grid-column: span 2;
               max-width: 130px;
               max-height: 130px;
               width: auto;
               height: auto;
           }

           /* 6张图片 - 3x2网格，等比例缩放 */
           .post-images-grid.grid-6 {
               grid-template-columns: repeat(3, 1fr);
               gap: 5px;
           }

           .post-images-grid.grid-6 .realimag-image {
               max-width: 130px;
               max-height: 130px;
               width: auto;
               height: auto;
           }

           /* 7-9张图片 - 3x3九宫格，等比例缩放 */
           .post-images-grid.grid-7,
           .post-images-grid.grid-8,
           .post-images-grid.grid-9 {
               grid-template-columns: repeat(3, 1fr);
               gap: 5px;
           }

           .post-images-grid.grid-7 .realimag-image,
           .post-images-grid.grid-8 .realimag-image,
           .post-images-grid.grid-9 .realimag-image {
               max-width: 130px;
               max-height: 130px;
               width: auto;
               height: auto;
           }

           /* 图片基础样式 - 完整显示，等比例缩放，不裁剪 */
           .post-images-grid .realimag-image,
           .post-images-grid .naiimag-image {
               object-fit: contain;
               border-radius: 8px;
               cursor: pointer;
               transition: transform 0.2s;
           }

           .post-images-grid .realimag-image:hover,
           .post-images-grid .naiimag-image:hover {
               transform: scale(1.05);
           }

           /* ▲▲▲ RealImag多图布局样式结束 ▲▲▲ */
           /* 【修复】解决夜间模式下浏览器和足迹页面文字颜色不正确的问题 */
           #phone-screen.dark-mode #browser-content {
               color: #dcdcdc;
               /* 浏览器文章正文颜色 */
           }

           #phone-screen.dark-mode #browser-content .article-title {
               color: #ffffff;
               /* 浏览器文章标题颜色 */
           }

           #phone-screen.dark-mode #browser-content .article-meta {
               color: #8d8d92;
               /* 浏览器文章元数据（来源）颜色 */
               border-bottom-color: #38383a;
           }

           #phone-screen.dark-mode .amap-item-title {
               color: #f0f0f0;
               /* 足迹 - 地点标题颜色 */
           }

           #phone-screen.dark-mode .amap-item-comment {
               color: #dcdcdc;
               /* 足迹 - 评论内容颜色 */
           }

           /* 【修复】CPhone 浏览器详情页在夜间模式下的文字颜色 */
           #phone-screen.dark-mode #char-article-content {
               color: #dcdcdc;
               /* 设置为浅灰色，使其在深色背景上可见 */
           }

           #char-article-content {
               color: #333;
               /* CPhone 浏览器文章正文 - 白天模式默认颜色 */
           }

           #open-nai-gallery-btn svg path {
               fill: currentColor;
               stroke: none;
           }

           #nai-gallery-panel {
               position: absolute;
               bottom: 0;
               left: 0;
               width: 100%;
               height: 65%;
               /* 画廊面板高度 */
               background-color: rgba(242, 242, 247, 0.85);
               backdrop-filter: blur(15px);
               -webkit-backdrop-filter: blur(15px);
               border-top: 1px solid var(--border-color);
               border-radius: 20px 20px 0 0;
               z-index: 200;
               display: flex;
               flex-direction: column;
               transform: translateY(100%);
               transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
               visibility: hidden;
           }

           #nai-gallery-panel.visible {
               transform: translateY(0);
               visibility: visible;
           }

           #nai-gallery-panel-header {
               padding: 10px 20px;
               display: flex;
               justify-content: space-between;
               align-items: center;
               flex-shrink: 0;
               border-bottom: 1px solid var(--border-color);
           }

           #nai-gallery-panel-header .title {
               font-weight: 600;
           }

           #nai-gallery-panel-header .panel-btn {
               font-size: 16px;
               padding: 5px 10px;
               cursor: pointer;
               color: var(--accent-color);
           }

           #nai-gallery-grid {
               flex-grow: 1;
               overflow-y: auto;
               padding: 15px;
               display: grid;
               grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
               gap: 15px;
           }

           .nai-gallery-item {
               position: relative;
               display: flex;
               flex-direction: column;
               align-items: center;
               gap: 6px;
               cursor: pointer;
               /* 移除了背景、阴影等属性，因为它们将移到子元素上 */
           }

           /* 新增：NAI的图片容器，样式模仿 .sticker-image-container */
           .nai-image-container {
               position: relative;
               /* 用于定位内部的 controls */
               width: 100%;
               aspect-ratio: 1 / 1;
               background-color: white;
               border-radius: 10px;
               background-size: contain;
               /* 核心修改：保持图片完整 */
               background-repeat: no-repeat;
               background-position: center;
               box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
               overflow: hidden;
               /* 隐藏溢出的 controls */
           }

           /* 新增：NAI的文字标签，样式模仿 .sticker-name */
           .nai-gallery-name {
               font-size: 12px;
               color: var(--text-secondary);
               width: 100%;
               text-align: center;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
