/* 电脑端响应式宽度 */
        @media (min-width: 768px) {
            :root { --h5-app-max-width: 540px; }
        }
        @media (min-width: 1024px) {
            :root { --h5-app-max-width: 640px; }
        }

        :root {
            /* 统一深色 Logo 色系 */
            --tool-brand: #1a2a33;
            --tool-brand-rgb: 26, 42, 51;
            --tool-brand-soft: rgba(var(--tool-brand-rgb), 0.10);
            --tool-brand-border: rgba(var(--tool-brand-rgb), 0.28);
        }
        
        .ecom-page { background: var(--bg-primary); min-height: 100vh; overflow-x: hidden; }
        .ecom-page .app-container {
            background: var(--bg-primary);
            min-height: 100%;
        }
        .ecom-page .nav-header {
            position: relative;
        }
        .ecom-page .nav-header h1.nav-title {
            margin-top: 0;
            margin-bottom: 0;
            font-size: 16px;
            font-weight: 600;
        }
        /* 与 common.css 一致：让 main-content 成为唯一纵向滚动区，流式输出才能 scrollIntoView / scrollTo 生效 */
        .ecom-inset {
            padding-left: var(--space-md);
            padding-right: var(--space-md);
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            overflow-x: hidden;
            max-width: 100%;
        }
        .ecom-page .main-content { 
            background: var(--bg-primary); 
            padding-top: 12px;
            padding-left: 0;
            padding-right: 0;
            padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            position: relative;
            z-index: 0;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .ecom-page .main-content::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }

        .tab-nav {
            display: flex;
            gap: 0;
            margin: 0 0 12px;
            background: #f3f4f6;
            border-radius: 14px;
            padding: 4px;
            /* 普通文档流：避免 sticky 盖住下方上传卡 */
            position: relative;
            top: auto;
            z-index: 1;
            flex-shrink: 0;
            box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
        }
        .tab-nav-item {
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: transparent;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 500;
            color: #6b7280;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
        }
        .tab-nav-item.active {
            background: #e4e4e7;
            color: #0a0a0a;
            box-shadow: none;
            border: 1px solid #52525b;
            font-weight: 700;
        }
        .tab-nav-item.active .h5-ico-tab { color: #0a0a0a; opacity: 1; }
        .tab-nav-item .h5-ico-tab {
            width: 17px;
            height: 17px;
            flex-shrink: 0;
            opacity: 0.72;
        }
        .tab-nav-item:active { transform: scale(0.98); }

        .tab-content { display: none; }
        .tab-content.active { display: block; }

        .section-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: var(--space-md);
            margin-bottom: 14px;
            border: 1px solid var(--border-light);
        }
        .section-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .section-title .hint {
            font-size: 12px;
            font-weight: 500;
            color: var(--accent);
            background: var(--accent-subtle);
            padding: 3px 10px;
            border-radius: 100px;
        }
        .section-title i { color: var(--accent); margin-right: 6px; }
        .section-hint-swipe {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 400;
        }

        .upload-zone {
            border: 2px dashed var(--border-medium);
            border-radius: 16px;
            min-height: 132px;
            height: 132px;
            padding: 12px 14px;
            text-align: center;
            transition: all 0.25s;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
        }
        .upload-zone:active { transform: scale(0.99); border-color: var(--accent); }
        .upload-zone.dragover { border-color: var(--accent); background: var(--accent-subtle); }
        .upload-zone-label {
            display: block;
            cursor: pointer;
            width: 100%;
        }
        .upload-zone.has-image { padding: 10px; border-color: var(--accent); border-style: solid; height: auto; min-height: 0; max-height: none; display: block; }
        .upload-zone.has-image .upload-zone-label { display: none !important; }
        .upload-zone input[type="file"],
        .upload-zone #fileInput {
            position: absolute;
            width: 0.1px;
            height: 0.1px;
            opacity: 0;
            overflow: hidden;
            z-index: -1;
        }
        .upload-placeholder { pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
        .upload-icon-wrap {
            width: 44px;
            height: 44px;
            margin: 0 auto 6px;
            background: linear-gradient(135deg, rgba(var(--tool-brand-rgb), 0.14) 0%, rgba(11, 18, 32, 0.06) 100%);
            border: 1px solid rgba(var(--tool-brand-rgb), 0.16);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .upload-icon-wrap svg { width: 20px; height: 20px; color: var(--tool-brand); }
        .section-title .h5-ico-inline {
            display: inline-block;
            vertical-align: -4px;
            width: 16px;
            height: 16px;
            margin-right: 6px;
            color: var(--tool-brand);
        }
        .upload-text { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
        .upload-desc { font-size: 13px; color: var(--text-muted); }
        .upload-preview { display: none; flex-direction: column; align-items: center; gap: 12px; }
        .upload-zone.has-image .upload-preview { display: flex !important; }
        .upload-zone.has-image .upload-placeholder { display: none !important; }
        .upload-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-md); object-fit: contain; }
        .reselect-btn {
            padding: 8px 16px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            border-radius: 100px;
            font-size: 13px;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .scroll-row {
            display: flex;
            flex-wrap: nowrap;
            gap: 8px;
            overflow-x: auto;
            padding: 4px 0;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .scroll-row::-webkit-scrollbar { display: none; }

        /* 场景风格：横向轻量卡片（非模板市场栅格） */
        .section-card--scene {
            background: var(--bg-card);
        }

        /* 场景风格 · 轻量横滑文字胶囊（电商详情图） */
        .scene-style-card {
            background: #ffffff;
            border-radius: 22px;
            padding: 6px 14px 8px;
            margin-bottom: 12px;
            max-height: 90px;
            box-sizing: border-box;
            overflow: hidden;
        }
        .scene-style-card__head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
            flex-shrink: 0;
        }
        .scene-style-card__title {
            margin: 0;
            font-size: 17px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.15;
            letter-spacing: -0.02em;
        }
        .scene-style-card__picked {
            margin: 0;
            font-size: 13px;
            font-weight: 500;
            color: #64748b;
            line-height: 1.25;
            text-align: right;
            flex: 1;
            min-width: 0;
        }
        .scene-style-card__picked-label {
            font-weight: 500;
        }
        .scene-style-card__picked strong {
            color: #334155;
            font-weight: 700;
        }
        .scene-style-card .scene-scroll-wrap {
            margin: 0 -4px 0 0;
            padding: 0;
        }
        .scene-style-card .scene-scroll-wrap::after {
            width: 34px;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 85%);
        }
        .scene-style-card .scene-scroll.scene-scroll-row {
            gap: 10px !important;
            padding: 2px 0 4px !important;
        }
        .scene-style-card #sceneRow .scene-card.scene-option {
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            width: auto !important;
            min-width: 96px !important;
            max-width: none !important;
            height: 54px !important;
            min-height: 54px !important;
            max-height: 54px !important;
            padding: 0 14px !important;
            border-radius: 16px !important;
            gap: 0 !important;
            justify-content: center !important;
            align-items: center !important;
            box-shadow: none !important;
        }
        .scene-style-card #sceneRow .scene-card.scene-option:active {
            transform: scale(0.98);
        }
        .scene-style-card #sceneRow .scene-card.scene-option.active {
            background: color-mix(in srgb, var(--accent, #2f5bff) 9%, #ffffff) !important;
            border: 1px solid color-mix(in srgb, var(--accent, #2f5bff) 30%, transparent) !important;
            color: var(--accent, #1d4fff) !important;
            box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, #2f5bff) 12%, transparent) !important;
        }
        .scene-style-card #sceneRow .scene-card.active .scene-card-name {
            color: var(--accent, #1d4fff) !important;
        }
        .scene-style-card .scene-card-icon,
        .scene-style-card .scene-card-desc {
            display: none !important;
        }
        /* 「我有产品」创作页内联：种草文案配置（与弹层共用 csp-* 组件样式） */
        .section-card--copy-pref {
            background: linear-gradient(160deg, #faf8ff 0%, #f8fafc 100%);
            border-color: rgba(99, 102, 241, 0.14);
        }
        .page-ecom-iw-product .section-card--copy-pref .csp-section {
            margin-bottom: 10px;
        }
        .iw-platform-hint {
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.45;
            margin: 0 0 10px;
        }
        .iw-platform-row {
            display: flex;
            gap: 10px;
        }
        .iw-platform-btn {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 12px 10px;
            border-radius: 14px;
            border: 2px solid rgba(20, 21, 33, 0.08);
            background: #fff;
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
        }
        .iw-platform-btn:active {
            transform: scale(0.98);
        }
        .iw-platform-btn.active {
            border-color: rgba(99, 102, 241, 0.85);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
            background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
        }
        /* 全页（含非 iw=1 的「配套文案」弹层）：平台色与小红书 / 抖音识别色一致 */
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="xhs"].active {
            border: 2px solid #ff2442;
            box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.18), 0 8px 22px rgba(255, 36, 66, 0.22);
            background: #ff2442;
            color: #fff;
        }
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="xhs"].active .iw-platform-ico svg {
            color: #fff;
        }
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="douyin"].active {
            border: 2px solid transparent;
            color: #fff;
            font-weight: 700;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
            background: linear-gradient(105deg, #25f4ee 0%, #25f4ee 18%, #fe2c55 55%, #fe2c55 100%);
            box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.16), 0 8px 24px rgba(254, 44, 85, 0.22);
        }
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="douyin"].active .iw-platform-ico svg {
            color: #fff;
        }
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="xhs"]:not(.active) .iw-platform-ico svg {
            color: #ff2442;
        }
        .page-ecom-env-image-tool .iw-platform-btn[data-platform="douyin"]:not(.active) .iw-platform-ico svg {
            color: #0d9488;
        }
        .iw-platform-ico {
            font-size: 16px;
            line-height: 1;
        }
        .iw-sup-wrap {
            position: relative;
        }
        .iw-paste-btn {
            position: absolute;
            top: 8px;
            left: 8px;
            z-index: 2;
            border: none;
            border-radius: 8px;
            padding: 5px 10px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-secondary);
            background: rgba(248, 250, 252, 0.95);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .iw-sup-textarea {
            padding-top: 38px !important;
            min-height: 108px;
        }
        .iw-char-count {
            display: block;
            text-align: right;
            font-size: 11px;
            color: #94a3b8;
            margin-top: 6px;
        }
        .submit-btn--iw-gradient {
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 42%, #2563eb 100%);
            color: #fff;
            border: none;
            box-shadow: 0 10px 32px rgba(99, 102, 241, 0.35);
        }
        .submit-btn--iw-gradient:disabled {
            opacity: 0.45;
            box-shadow: none;
            cursor: not-allowed;
        }

        .iw-sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .iw-inline-result {
            margin-top: 14px;
            padding: 14px 14px 18px;
            border-radius: 16px;
            border: 1px solid rgba(99, 102, 241, 0.18);
            background: linear-gradient(165deg, #faf5ff 0%, #fff 48%, #f0fdf4 100%);
        }
        .iw-inline-result--busy {
            opacity: 0.92;
        }
        .iw-inline-result-head {
            font-size: 15px;
            font-weight: 800;
            color: #4c1d95;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .iw-inline-block {
            margin-bottom: 14px;
        }
        .iw-inline-block-h {
            font-size: 12px;
            font-weight: 700;
            color: #64748b;
            margin-bottom: 8px;
        }
        .iw-inline-block-meta {
            font-weight: 600;
            color: #94a3b8;
            font-size: 11px;
        }
        .iw-inline-stream-status {
            font-size: 12px;
            font-weight: 600;
            color: #4f46e5;
            margin: -4px 0 10px;
            line-height: 1.45;
        }
        .iw-inline-scroll {
            overflow-x: hidden;
            overflow-y: auto;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            border-radius: 12px;
            border: 1px solid rgba(148, 163, 184, 0.22);
            background: rgba(255, 255, 255, 0.72);
            padding: 10px;
        }
        .iw-inline-scroll--titles {
            max-height: min(24vh, 220px);
        }
        .iw-inline-scroll--body {
            max-height: min(48vh, 440px);
        }
        .iw-inline-scroll--streaming {
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
            /* 流式须瞬时贴底；smooth 会与 scrollTop 写入打架，看起来像「没在跟字走」 */
            scroll-behavior: auto !important;
        }
        .iw-inline-body {
            font-size: 14px;
            line-height: 1.65;
            color: #1e293b;
            background: transparent;
            border-radius: 0;
            padding: 0;
            border: none;
            min-height: 28px;
        }
        .iw-inline-body-plain {
            white-space: pre-wrap;
            word-break: break-word;
        }
        @keyframes iwStreamCursorBlink {
            0%, 45% { opacity: 1; }
            50%, 100% { opacity: 0; }
        }
        .iw-stream-cursor--inline {
            display: inline-block;
            width: 3px;
            height: 1.05em;
            margin-left: 3px;
            vertical-align: -0.12em;
            background: linear-gradient(180deg, #6366f1, #a855f7);
            border-radius: 1px;
            animation: iwStreamCursorBlink 0.95s step-end infinite;
        }
        .iw-inline-title-stream {
            margin: 0;
            font-size: 14px;
            white-space: pre-wrap;
            word-break: break-word;
            font-family: inherit;
        }
        .iw-inline-mini-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }
        .iw-mini-tab {
            border: 1px solid rgba(148, 163, 184, 0.45);
            background: #fff;
            border-radius: 999px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            color: #475569;
            cursor: pointer;
        }
        .iw-mini-tab.active {
            border-color: rgba(99, 102, 241, 0.65);
            color: #4338ca;
            background: #eef2ff;
        }
        .iw-cover-title-label {
            display: block;
            font-size: 12px;
            font-weight: 700;
            color: #64748b;
            margin-bottom: 6px;
        }
        .iw-cover-title-input {
            width: 100%;
            box-sizing: border-box;
            border-radius: 12px;
            border: 1px solid rgba(148, 163, 184, 0.35);
            padding: 10px 12px;
            font-size: 15px;
            margin-bottom: 10px;
        }
        .iw-cover-gen-btn {
            width: 100%;
            border: none;
            border-radius: 14px;
            padding: 12px;
            font-size: 15px;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(135deg, #ff5a6a 0%, #ff2442 48%, #e61e3c 100%);
            cursor: pointer;
            margin-bottom: 8px;
        }
        .iw-cover-gen-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }
        .iw-cover-hint {
            font-size: 11px;
            color: #64748b;
            line-height: 1.45;
            margin: 0 0 12px;
        }
        .iw-cover-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }
        .iw-cover-cell {
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: stretch;
            min-width: 0;
        }
        /* 小红书竖版笔记封：3:4（与导出 1080×1440 一致） */
        .iw-cover-aspect {
            position: relative;
            width: 100%;
            border-radius: 10px;
            overflow: hidden;
            background: #f1f5f9;
            aspect-ratio: 3 / 4;
        }
        @supports not (aspect-ratio: 3 / 4) {
            .iw-cover-aspect {
                height: 0;
                padding-bottom: 133.333333%;
            }
        }
        .iw-cover-preview-btn {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            width: auto;
            height: auto;
            margin: 0;
            padding: 0;
            border: none;
            border-radius: inherit;
            cursor: pointer;
            display: block;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            line-height: 0;
        }
        .iw-cover-preview-btn img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: fill;
            object-position: center;
            vertical-align: top;
        }
        .iw-cover-select-btn {
            border-radius: 10px;
            border: 1px solid rgba(148, 163, 184, 0.45);
            background: #fff;
            padding: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #475569;
            cursor: pointer;
        }
        .iw-extra-images-block {
            margin-top: 8px;
        }
        .iw-extra-images-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 12px;
            border-radius: 14px;
            border: 2px dashed rgba(16, 185, 129, 0.35);
            background: rgba(240, 253, 244, 0.35);
            min-height: 88px;
        }
        .iw-extra-cell {
            position: relative;
            width: 72px;
            height: 72px;
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
            border: 1px solid rgba(148, 163, 184, 0.25);
        }
        .iw-extra-cell img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .iw-extra-cell-tag {
            position: absolute;
            left: 4px;
            top: 4px;
            font-size: 9px;
            font-weight: 700;
            color: #fff;
            background: rgba(15, 23, 42, 0.55);
            padding: 2px 5px;
            border-radius: 4px;
        }
        .iw-extra-remove {
            position: absolute;
            right: 2px;
            top: 2px;
            width: 22px;
            height: 22px;
            border: none;
            border-radius: 50%;
            background: rgba(15, 23, 42, 0.55);
            color: #fff;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            padding: 0;
        }
        .iw-extra-add {
            width: 72px;
            height: 72px;
            border-radius: 12px;
            border: 2px dashed rgba(148, 163, 184, 0.55);
            background: rgba(255, 255, 255, 0.8);
            color: #64748b;
            font-size: 28px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .iw-inline-publish-bar {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }
        .iw-inline-publish-btn {
            flex: 1;
            border-radius: 14px;
            padding: 12px 10px;
            font-size: 14px;
            font-weight: 700;
            border: 2px solid rgba(20, 21, 33, 0.1);
            background: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .iw-inline-publish-btn--xhs {
            border: none;
            color: #fff;
            /* 小红书品牌主色（与官方 Logo 红一致） */
            background: linear-gradient(180deg, #ff335e 0%, #ff2442 48%, #e9153e 100%);
            box-shadow: 0 6px 20px rgba(255, 36, 66, 0.38);
        }
        .iw-inline-publish-btn--dy {
            border: none;
            color: #fff;
            font-weight: 800;
            /* 抖音经典青（#00F2EA）→ 品红（#FF0050）渐变，贴近官方视觉 */
            background: linear-gradient(105deg, #00f2ea 0%, #00f2ea 14%, #ff0050 88%, #ff0050 100%);
            box-shadow: 0 6px 22px rgba(255, 0, 80, 0.32);
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
        }
        .iw-inline-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 12px;
        }
        .iw-inline-action-btn {
            width: 100%;
            border-radius: 14px;
            padding: 11px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: #fff;
            color: #334155;
            cursor: pointer;
        }

        /* 「我有产品」文案生成仪式感全屏层 */
        .iw-copy-gen-portal {
            position: fixed;
            inset: 0;
            z-index: 10008;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px 20px calc(24px + var(--safe-bottom, 0px));
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.28s ease, visibility 0.28s ease;
        }
        .iw-copy-gen-portal--show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .iw-copy-gen-portal__bg {
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse 120% 80% at 50% 18%, #4c1d95 0%, #1e1b4b 42%, #020617 100%);
        }
        .iw-copy-gen-portal__stars {
            position: absolute;
            inset: 0;
            opacity: 0.35;
            background-image:
                radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
                radial-gradient(1px 1px at 30% 80%, rgba(255, 255, 255, 0.7), transparent),
                radial-gradient(1px 1px at 72% 35%, rgba(255, 255, 255, 0.85), transparent),
                radial-gradient(1px 1px at 88% 60%, rgba(255, 255, 255, 0.6), transparent),
                radial-gradient(1px 1px at 55% 12%, rgba(255, 255, 255, 0.75), transparent);
            background-size: 100% 100%;
            animation: iwPortalStars 12s ease-in-out infinite alternate;
        }
        @keyframes iwPortalStars {
            0% { opacity: 0.28; transform: translateY(0); }
            100% { opacity: 0.42; transform: translateY(-6px); }
        }
        .iw-copy-gen-portal__rings {
            position: relative;
            width: 200px;
            height: 200px;
            margin-bottom: 8px;
        }
        .iw-ring {
            position: absolute;
            inset: 0;
            margin: auto;
            border-radius: 50%;
            border: 2px solid transparent;
        }
        .iw-ring--a {
            width: 200px;
            height: 200px;
            border-top-color: rgba(244, 114, 182, 0.85);
            border-right-color: rgba(129, 140, 248, 0.35);
            animation: iwRingSpin 2.4s linear infinite;
        }
        .iw-ring--b {
            width: 152px;
            height: 152px;
            border-bottom-color: rgba(56, 189, 248, 0.75);
            border-left-color: rgba(167, 139, 250, 0.3);
            animation: iwRingSpin 1.8s linear infinite reverse;
        }
        .iw-ring--c {
            width: 104px;
            height: 104px;
            border-top-color: rgba(250, 250, 250, 0.5);
            animation: iwRingSpin 1.2s linear infinite;
        }
        @keyframes iwRingSpin {
            to { transform: rotate(360deg); }
        }
        .iw-copy-gen-portal__core {
            position: absolute;
            inset: 0;
            margin: auto;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .iw-copy-gen-portal__core-dot {
            width: 14px;
            height: 14px;
            border-radius: 4px;
            background: linear-gradient(135deg, #fb7185, #e11d48);
            box-shadow: 0 0 24px rgba(225, 29, 72, 0.65);
            animation: iwPortalCorePulse 1.3s ease-in-out infinite;
        }
        @keyframes iwPortalCorePulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.12); opacity: 0.85; }
        }
        .iw-copy-gen-portal__title {
            position: relative;
            z-index: 1;
            margin: 18px 0 6px;
            padding: 0 12px;
            font-size: 17px;
            font-weight: 800;
            color: #f8fafc;
            text-align: center;
            letter-spacing: 0.02em;
        }
        .iw-copy-gen-portal__sub {
            position: relative;
            z-index: 1;
            margin: 0;
            padding: 0 20px;
            font-size: 13px;
            color: rgba(226, 232, 240, 0.82);
            text-align: center;
            line-height: 1.5;
        }
        .iw-copy-gen-portal__bar {
            position: relative;
            z-index: 1;
            width: min(220px, 70vw);
            height: 3px;
            margin-top: 22px;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.25);
            overflow: hidden;
        }
        .iw-copy-gen-portal__bar-fill {
            display: block;
            height: 100%;
            width: 38%;
            border-radius: inherit;
            background: linear-gradient(90deg, #fb7185, #a855f7, #38bdf8);
            animation: iwPortalBar 1.4s ease-in-out infinite;
        }
        @keyframes iwPortalBar {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(220%); }
        }
        @media (prefers-reduced-motion: reduce) {
            .iw-copy-gen-portal__stars,
            .iw-ring--a,
            .iw-ring--b,
            .iw-ring--c,
            .iw-copy-gen-portal__core-dot,
            .iw-copy-gen-portal__bar-fill {
                animation: none !important;
            }
        }
        .scene-current-hint {
            margin: 0 0 8px;
            padding: 6px 10px;
            font-size: 12px;
            line-height: 1.4;
            color: #64748b;
            background: #f8fafc;
            border: 1px solid rgba(15, 23, 42, 0.06);
            border-radius: 10px;
        }
        .scene-current-hint strong {
            color: var(--text-primary);
            font-weight: 700;
        }
        .scene-current-sep {
            margin: 0 4px;
            opacity: 0.45;
        }
        /* 场景横滑：外层裁切 + 右侧渐隐，避免半卡硬切 */
        .scene-scroll-wrap {
            position: relative;
            overflow: hidden;
            margin: 0 -4px;
            padding: 0 4px;
        }
        .scene-scroll-wrap::after {
            content: "";
            position: absolute;
            right: 0;
            top: 0;
            width: 40px;
            height: 100%;
            pointer-events: none;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 78%);
            z-index: 1;
        }
        .scene-scroll-row.scene-scroll,
        .scene-scroll.scene-scroll-row,
        .scene-scroll-row {
            display: flex;
            flex-wrap: nowrap;
            gap: 10px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 0 6px 2px 0;
            margin: 0;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .scene-scroll-row::-webkit-scrollbar,
        .scene-scroll::-webkit-scrollbar { display: none; }
        
        .scene-card {
            flex: 0 0 auto;
            width: auto;
            min-width: 96px;
            max-width: 112px;
            height: 68px;
            min-height: 68px;
            max-height: 68px;
            padding: 6px 8px;
            margin: 0;
            font: inherit;
            text-align: center;
            -webkit-appearance: none;
            appearance: none;
            background: #fff;
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 15px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
            box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
            touch-action: manipulation;
            box-sizing: border-box;
        }
        .scene-card:active { transform: scale(0.98); }
        .scene-card.active {
            border: 1px solid #52525b;
            background: #e4e4e7;
            box-shadow: none;
        }
        .scene-card-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            border-radius: 7px;
            background: color-mix(in srgb, var(--accent, #2f5bff) 10%, #ffffff);
            color: var(--accent, #1d4fff);
            flex-shrink: 0;
        }
        .scene-card-ico-svg {
            width: 12px;
            height: 12px;
            display: block;
        }
        .scene-card-name {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.15;
        }
        .scene-card-desc {
            display: none;
        }
        .scene-card.active .scene-card-name {
            color: var(--accent, #1d4fff);
        }
        .scene-card.active .scene-card-desc {
            color: var(--text-secondary);
        }

        /* 生成配置：比例 + 清晰度 单卡 */
        .section-card--config.config-card {
            border-radius: 22px;
        }
        .config-card .section-title {
            margin-bottom: 8px;
        }
        .config-group {
            margin-bottom: 0;
        }
        .config-group + .config-group {
            margin-top: 14px;
        }
        .config-group:last-child {
            margin-bottom: 0;
        }
        .config-group-label {
            font-size: 13px;
            font-weight: 700;
            color: #475569;
            margin: 0 0 10px;
            letter-spacing: 0.02em;
        }
        .config-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        #ratioRow.config-chip-row {
            display: flex !important;
            flex-wrap: nowrap !important;
            gap: 8px !important;
            overflow-x: auto !important;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            padding-bottom: 4px;
        }
        #ratioRow.config-chip-row::-webkit-scrollbar {
            display: none;
        }
        #ratioRow .chip-btn.config-option {
            flex: 0 0 auto !important;
            white-space: nowrap !important;
        }
        .config-card .chip-btn.config-option {
            flex: 0 0 auto;
            min-width: 80px;
            height: 42px;
            min-height: 42px;
            padding: 0 10px;
            border-radius: 14px;
            background: #f5f6fa;
            border: 1px solid rgba(15, 23, 42, 0.05);
            color: #475569;
            font-size: 14px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            cursor: pointer;
            transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
        }
        .config-card .chip-btn.config-option:active {
            transform: scale(0.97);
        }
        @media (hover: hover) {
            .config-card .chip-btn.config-option:hover {
                background: #eceef6;
                color: #1e293b;
            }
        }
        .config-card .chip-btn.config-option.active {
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            border-color: transparent;
            color: #ffffff;
            font-weight: 700;
            box-shadow: 0 7px 18px -7px rgba(99, 102, 241, 0.6);
        }

        /* 双列布局（其它页若复用可保留） */
        .section-card-row {
            display: flex;
            gap: 14px;
            margin-top: 10px;
        }
        .section-card-row > .section-card {
            margin-bottom: 0;
        }
        .section-card--half {
            flex: 1;
            min-width: 0;
            padding: 12px 10px;
        }
        .section-card--half .section-title {
            margin-bottom: 8px;
        }
        .section-card--half .section-title span:first-child {
            font-size: 13px;
        }
        .chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }
        .section-card--half .chip-btn {
            padding: 6px 9px;
            font-size: 12px;
            border-radius: 8px;
        }

        .chip-btn {
            flex: 0 0 auto;
            padding: 10px 18px;
            background: var(--chip-bg, var(--bg-secondary));
            border: 1px solid var(--chip-border, var(--border-light));
            border-radius: var(--radius-md);
            font-size: var(--fs-label);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .chip-btn:active { transform: scale(0.98); }
        .chip-btn.active {
            background: var(--chip-bg-on, rgba(26, 42, 51, 0.1));
            color: var(--primary-dark);
            border: 1px solid var(--chip-border-on, rgba(28, 48, 56, 0.32));
            font-weight: 600;
        }

        .submit-btn {
            width: 100%;
            min-height: 56px;
            padding: 14px 16px;
            background: var(--page-hero-gradient, linear-gradient(135deg, #1a2a33 0%, #1e3a44 52%, #1c323b 100%));
            color: var(--text-inverse);
            font-size: 16px;
            font-weight: 600;
            border: none;
            border-radius: 100px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
            margin-top: 14px;
            box-shadow: 0 4px 16px rgba(var(--tool-brand-rgb), 0.28);
        }
        .submit-btn i { font-size: 14px; }
        .submit-btn:disabled { 
            opacity: 1;
            cursor: not-allowed;
            background: linear-gradient(135deg, #d6dee8 0%, #c9d3e0 100%);
            color: rgba(255, 255, 255, 0.92);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
        }
        .submit-hint {
            text-align: center;
            font-size: 13px;
            color: #64748b;
            margin-top: 8px;
            margin-bottom: 0;
            line-height: 1.45;
        }
        .section-title--plain {
            justify-content: flex-start;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--scene-desc .section-title {
            margin-bottom: 10px;
        }
        .section-title--scene-desc {
            align-items: center;
            justify-content: space-between;
        }
        .section-title-meta {
            font-size: 12px;
            font-weight: 500;
            color: #94a3b8;
        }
        .ecom-scene-desc-field {
            position: relative;
            margin-bottom: 12px;
        }
        .ecom-scene-desc-field .ecom-scene-desc-count {
            position: absolute;
            right: 12px;
            bottom: 10px;
            margin: 0;
            font-size: 11px;
            font-weight: 500;
            color: #94a3b8;
            pointer-events: none;
        }
        .ecom-scene-desc-sub {
            margin: 0 0 14px;
            font-size: 12.5px;
            color: #94a3b8;
            line-height: 1.5;
        }
        .ecom-scene-presets {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 16px;
        }
        .ecom-scene-preset {
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 9px 11px;
            border-radius: 16px;
            border: 1px solid rgba(15, 23, 42, 0.08);
            background: #fff;
            text-align: left;
            cursor: pointer;
            font-family: inherit;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
            transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
        }
        .ecom-scene-preset:active {
            transform: scale(0.985);
        }
        .ecom-scene-preset.is-active {
            border-color: color-mix(in srgb, var(--accent, #2f5bff) 55%, transparent);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2f5bff) 12%, transparent);
        }
        .ecom-scene-preset__thumb {
            flex: 0 0 auto;
            width: 46px;
            height: 46px;
            border-radius: 13px;
            position: relative;
            overflow: hidden;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 -8px 16px rgba(15, 23, 42, 0.06);
        }
        .ecom-scene-preset__thumb::after {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(60% 45% at 30% 25%, rgba(255, 255, 255, 0.55), transparent 70%),
                radial-gradient(40% 30% at 80% 85%, rgba(15, 23, 42, 0.08), transparent 70%);
        }
        .ecom-scene-preset__thumb--1 { background: linear-gradient(135deg, #e9edf4 0%, #cbd6e6 100%); }
        .ecom-scene-preset__thumb--2 { background: linear-gradient(135deg, #fbf2e4 0%, #f1ddc1 100%); }
        .ecom-scene-preset__thumb--3 { background: linear-gradient(135deg, #f7f8fb 0%, #e4e8ef 100%); }
        .ecom-scene-preset__thumb--4 { background: linear-gradient(135deg, #ece2d2 0%, #d6c2a4 100%); }
        .ecom-scene-preset__thumb--5 { background: linear-gradient(135deg, #e1e3da 0%, #c0c6b7 100%); }
        .ecom-scene-preset__thumb--6 { background: linear-gradient(135deg, #e8eef1 0%, #cfdbdf 100%); }
        .ecom-scene-preset__text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .ecom-scene-preset__title {
            font-size: 13.5px;
            font-weight: 650;
            color: #0f172a;
            letter-spacing: 0.2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ecom-scene-preset__desc {
            font-size: 11px;
            color: #94a3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .ecom-scene-desc-input {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            height: 76px;
            min-height: 76px;
            padding: 12px 14px 28px;
            border-radius: 16px;
            background: color-mix(in srgb, var(--bg-page, #f8fafc) 97%, var(--accent, #2f5bff));
            border: 1px solid rgba(15, 23, 42, 0.08);
            font-size: 14px;
            line-height: 1.45;
            color: #0f172a;
            resize: none;
            font-family: inherit;
            -webkit-appearance: none;
            appearance: none;
        }
        .ecom-scene-desc-input:focus {
            outline: none;
            border-color: color-mix(in srgb, var(--accent, #2f5bff) 35%, transparent);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2f5bff) 8%, transparent);
        }
        .ecom-scene-desc-input::placeholder {
            color: #94a3b8;
        }
        .ecom-scene-desc-foot {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 0;
        }
        .ecom-scene-desc-action-btn {
            flex: 1;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(15, 23, 42, 0.1);
            background: #fff;
            color: #334155;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
        }
        .ecom-scene-desc-action-btn--ai {
            color: var(--accent, #2f5bff);
            border-color: color-mix(in srgb, var(--accent, #2f5bff) 22%, rgba(15, 23, 42, 0.1));
            background: color-mix(in srgb, var(--accent, #2f5bff) 6%, #fff);
        }
        .ecom-scene-desc-action-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .ecom-scene-desc-action-btn:not(:disabled):active {
            transform: scale(0.98);
        }
        .ecom-scene-desc-foot .ecom-scene-desc-count {
            margin-top: 0;
            flex: 1;
            text-align: right;
        }
        .ecom-legal-note {
            font-size: 12px;
            line-height: 1.5;
            color: #64748b;
            text-align: center;
            padding: 0 18px;
            margin: 10px 0 0;
        }
        .ecom-legal-note a {
            color: var(--accent, #1d4fff);
            text-decoration: none;
        }
        .section-card--scene-desc {
            margin-bottom: 0;
        }
        .submit-btn--env-generate {
            margin-top: 0;
            border-radius: 18px;
            font-weight: 800;
            min-height: 54px;
            height: 54px;
            padding-top: 0;
            padding-bottom: 0;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload {
            border-radius: 22px;
            padding: 16px;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
            border: 1px solid rgba(15, 23, 42, 0.06);
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .section-title {
            margin-bottom: 6px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-zone {
            height: 118px;
            min-height: 118px;
            background: color-mix(in srgb, var(--bg-page, #f8fafc) 96%, var(--accent, #2f5bff));
            border: 1px dashed color-mix(in srgb, var(--accent, #2f5bff) 28%, transparent);
            border-radius: 18px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-icon-wrap {
            width: 31px;
            height: 31px;
            margin: 0 auto 3px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-icon-wrap svg {
            width: 17px;
            height: 17px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-text {
            font-size: 16px;
            margin-bottom: 4px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-desc {
            font-size: 13px;
        }
        body.page-ecom-env-image-tool:not(.tool-page) .section-card--env-upload .upload-zone.has-image {
            height: auto;
            min-height: 0;
        }
        .submit-btn:not(:disabled):active { transform: scale(0.98); }

        .result-section {
            display: none;
            margin-top: var(--section-gap);
            scroll-margin-top: 8px;
            scroll-margin-bottom: 24px;
        }
        body.ecom-result-overlay-open { overflow: hidden; }

        /* ── 优化后的提示词：独立「高级·神秘」全屏面板（深色玻璃 + 品牌紫光晕，从底部升起）── */
        .result-section.show {
            display: flex;
            position: fixed;
            inset: 0;
            z-index: 9990;
            flex-direction: column;
            justify-content: flex-end;
            margin: 0;
            padding: 0;
            background:
                radial-gradient(130% 80% at 50% -10%, rgba(124, 58, 237, 0.30) 0%, rgba(99, 102, 241, 0.12) 34%, rgba(8, 10, 24, 0.0) 60%),
                rgba(6, 8, 20, 0.62);
            -webkit-backdrop-filter: blur(16px) saturate(125%);
            backdrop-filter: blur(16px) saturate(125%);
            animation: ecomResultFade 0.3s ease both;
        }
        @keyframes ecomResultFade { from { opacity: 0; } to { opacity: 1; } }
        @keyframes ecomResultRise {
            from { transform: translate3d(0, 6%, 0); opacity: 0.4; }
            to { transform: translate3d(0, 0, 0); opacity: 1; }
        }

        .result-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            overflow: hidden;
        }
        .result-section.show .result-card {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            max-height: 92vh;
            display: flex;
            flex-direction: column;
            background:
                radial-gradient(120% 60% at 50% 0%, rgba(124, 58, 237, 0.22) 0%, rgba(30, 27, 75, 0.0) 55%),
                linear-gradient(180deg, #171633 0%, #11122a 58%, #0b0c1e 100%);
            border: 1px solid rgba(167, 139, 250, 0.26);
            border-bottom: none;
            border-radius: 28px 28px 0 0;
            box-shadow: 0 -24px 70px -22px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
            color: #e8e9f6;
            overflow: hidden;
            animation: ecomResultRise 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        .result-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px var(--space-md);
            border-bottom: 1px solid var(--border-light);
        }
        .result-card-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .result-card-title i { color: var(--accent); }
        .result-card-subtitle {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-muted);
            letter-spacing: 0.01em;
        }
        .result-close-btn {
            flex: 0 0 auto;
            width: 34px;
            height: 34px;
            display: none;
            align-items: center;
            justify-content: center;
            border: none;
            border-radius: 50%;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
        }

        /* 面板态下的头部：玻璃质感 + 顶部抓手 + 品牌色标题 + 可见关闭键 */
        .result-section.show .result-card-header {
            position: relative;
            flex: 0 0 auto;
            padding: 20px 18px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: transparent;
        }
        .result-section.show .result-card-header::before {
            content: '';
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 42px;
            height: 4px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.18);
        }
        .result-section.show .result-card-title {
            flex-direction: column;
            align-items: flex-start;
            gap: 3px;
            color: #f6f4ff;
            font-size: 16px;
            letter-spacing: 0.02em;
        }
        .result-section.show .result-card-title > span:first-of-type {
            display: inline-flex;
            align-items: center;
        }
        .result-section.show .result-card-title svg { color: #c4b5fd; }
        .result-section.show .result-card-subtitle { color: rgba(196, 181, 253, 0.66); }
        .result-section.show .result-close-btn {
            display: inline-flex;
            background: rgba(255, 255, 255, 0.07);
            color: rgba(231, 233, 245, 0.85);
            transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
        }
        .result-section.show .result-close-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
        .result-section.show .result-close-btn:active { transform: scale(0.92); }

        .prompt-list { }
        .prompt-item {
            padding: var(--space-md);
            border-bottom: 1px solid var(--border-light);
        }
        .prompt-item:last-child { border-bottom: none; }
        .prompt-item-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        .prompt-item-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .prompt-item-num {
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background: var(--tool-brand);
            color: var(--text-inverse);
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
        }
        .prompt-item-actions-top {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .prompt-action-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
            transition: all 0.2s;
            background: none;
            border: none;
        }
        .prompt-action-btn:hover, .prompt-action-btn:active {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        .prompt-action-btn i { font-size: 11px; }
        .prompt-item-content {
            font-size: 14px;
            line-height: 1.75;
            color: var(--text-secondary);
            padding: 12px 14px;
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            position: relative;
        }
        .prompt-item-content[contenteditable="true"] {
            outline: none;
            background: var(--accent-subtle);
            border: 1px solid var(--accent);
        }
        .char-count {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 6px;
            text-align: right;
        }
        .char-count.over { color: var(--danger); }

        .result-actions-bottom {
            display: flex;
            gap: 10px;
            padding: var(--space-md);
            border-top: 1px solid var(--border-light);
            background: var(--bg-secondary);
        }
        .action-btn {
            flex: 1;
            padding: 12px 16px;
            border-radius: 100px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s;
            border: none;
        }
        .action-btn:active { transform: scale(0.98); }
        .action-btn.secondary {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        .action-btn.primary {
            background: var(--tool-brand);
            color: var(--text-inverse);
            box-shadow: 0 2px 10px rgba(var(--tool-brand-rgb), 0.2);
        }
        .action-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .toast {
            position: fixed;
            bottom: calc(100px + var(--safe-bottom));
            left: 50%;
            right: auto;
            transform: translate3d(-50%, 0, 0);
            max-width: min(340px, calc(100vw - 32px));
            width: max-content;
            box-sizing: border-box;
            padding: 12px 20px;
            background: var(--tool-brand);
            color: var(--text-inverse);
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.5;
            text-align: center;
            overflow-wrap: break-word;
            word-break: break-word;
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 10000;
            pointer-events: none;
        }
        .toast.show { opacity: 1; }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .streaming .prompt-item-content {
            animation: pulse 1.5s ease-in-out infinite;
        }

        /* ── 面板态：内部滚动 + 深色玻璃配色（神秘高级）── */
        .result-section.show .prompt-list {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 6px 6px 10px;
        }
        .result-section.show .prompt-list::-webkit-scrollbar { width: 6px; }
        .result-section.show .prompt-list::-webkit-scrollbar-thumb {
            background: rgba(167, 139, 250, 0.3);
            border-radius: 6px;
        }
        .result-section.show .prompt-item { border-bottom-color: rgba(255, 255, 255, 0.07); }
        .result-section.show .prompt-item-title { color: #f6f4ff; }
        .result-section.show .prompt-item-num {
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            color: #fff;
            box-shadow: 0 4px 12px -4px rgba(99, 102, 241, 0.7);
        }
        .result-section.show .prompt-action-btn { color: rgba(231, 233, 245, 0.6); }
        .result-section.show .prompt-action-btn:hover,
        .result-section.show .prompt-action-btn:active {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }
        .result-section.show .prompt-item-content {
            background: rgba(255, 255, 255, 0.045);
            color: #d4d8ef;
            border: 1px solid rgba(167, 139, 250, 0.14);
        }
        .result-section.show .prompt-item-content[contenteditable="true"] {
            background: rgba(124, 58, 237, 0.16);
            border-color: rgba(167, 139, 250, 0.55);
            color: #fff;
        }
        .result-section.show .char-count { color: rgba(231, 233, 245, 0.5); }

        .result-section.show .gen-progress-bar {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(167, 139, 250, 0.12);
        }
        .result-section.show .gen-step-dot { background: rgba(255, 255, 255, 0.1); color: rgba(231, 233, 245, 0.6); }
        .result-section.show .gen-step.active .gen-step-dot {
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
        }
        .result-section.show .gen-step-label { color: rgba(231, 233, 245, 0.55); }
        .result-section.show .gen-step.active .gen-step-label,
        .result-section.show .gen-step.done .gen-step-label { color: #f6f4ff; }
        .result-section.show .gen-step-line { background: rgba(255, 255, 255, 0.12); }
        .result-section.show .gen-progress-tip { color: rgba(231, 233, 245, 0.7); }

        .result-section.show .result-actions-bottom {
            flex: 0 0 auto;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(8, 9, 22, 0.55);
            padding: 14px var(--space-md) calc(14px + env(safe-area-inset-bottom));
        }
        .result-section.show .action-btn.secondary {
            background: rgba(255, 255, 255, 0.06);
            color: #e8e9f6;
            border: 1px solid rgba(255, 255, 255, 0.12);
        }
        .result-section.show .action-btn.primary {
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            color: #fff;
            box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.75);
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* 历史记录 — 两列橱窗网格：主图区略偏竖幅 + contain 陈列，信息区紧凑 */
        #tabHistory {
            padding-top: 2px;
            padding-bottom: 4px;
        }
        .history-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px 12px;
            width: 100%;
            box-sizing: border-box;
            align-items: stretch;
        }
        .history-item {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: 16px;
            overflow: hidden;
            min-width: 0;
            box-sizing: border-box;
            box-shadow:
                0 4px 20px rgba(15, 23, 42, 0.06),
                0 1px 0 rgba(255, 255, 255, 0.9) inset;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            height: 100%;
            transition: box-shadow 0.2s ease, transform 0.2s ease;
        }
        .history-item:active {
            transform: scale(0.985);
        }
        .history-thumb-wrap {
            position: relative;
            flex: 0 0 auto;
            width: 100%;
            max-width: none;
            min-width: 0;
            /* 略竖于 1:1，接近主图/详情首图比例，又比 9:16 更稳重 */
            aspect-ratio: 4 / 5;
            padding: 8px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            background:
                radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.92) 0%, transparent 55%),
                linear-gradient(165deg, #f8fafc 0%, #eef2ff 48%, #f1f5f9 100%);
            border-right: none;
            border-bottom: 1px solid rgba(99, 102, 241, 0.08);
        }
        .history-thumb-wrap.is-processing .history-item-img {
            opacity: 0.92;
            filter: none;
        }
        .history-processing-layer {
            position: absolute;
            inset: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: rgba(15, 23, 42, 0.3);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 12px;
            pointer-events: none;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
        }
        .history-processing-layer span {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.02em;
            color: #f8fafc;
            text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
        }
        .history-processing-layer__main {
            font-size: 12px;
        }
        .history-processing-layer__sub {
            font-size: 10px;
            font-weight: 500;
            opacity: 0.92;
            letter-spacing: 0.01em;
        }
        .history-processing-pulse {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 2.5px solid rgba(99, 102, 241, 0.35);
            border-top-color: #5b21b6;
            animation: ecom-spin 0.85s linear infinite;
        }
        @keyframes ecom-spin {
            to { transform: rotate(360deg); }
        }
        .history-processing-shimmer {
            position: absolute;
            inset: 8px;
            border-radius: 12px;
            background: linear-gradient(
                105deg,
                transparent 38%,
                rgba(255, 255, 255, 0.65) 50%,
                transparent 62%
            );
            background-size: 200% 100%;
            animation: ecom-shimmer 1.8s ease-in-out infinite;
            pointer-events: none;
        }
        @keyframes ecom-shimmer {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }
        .history-item-img {
            width: 100%;
            height: 100%;
            max-height: 100%;
            aspect-ratio: unset;
            object-fit: contain;
            object-position: center;
            display: block;
            border-radius: 10px;
        }
        .history-thumb-open-gallery {
            cursor: pointer;
        }
        .history-item-info {
            flex: 0 0 auto;
            padding: 8px 10px 10px;
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            column-gap: 6px;
            row-gap: 6px;
            min-width: 0;
        }
        .history-item-status {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 100px;
            font-size: 10px;
            font-weight: 600;
            width: fit-content;
            max-width: calc(100% - 76px);
            letter-spacing: 0.02em;
            line-height: 1.3;
        }
        .history-item-status.pending {
            background: rgba(241, 245, 249, 0.95);
            color: #64748b;
            border: 1px solid rgba(148, 163, 184, 0.35);
        }
        .history-item-status.processing {
            background: rgba(99, 102, 241, 0.1);
            color: #4338ca;
            border: 1px solid rgba(99, 102, 241, 0.22);
        }
        .history-item-status.completed {
            background: rgba(16, 185, 129, 0.08);
            color: #0f766e;
            border: 1px solid rgba(16, 185, 129, 0.22);
        }
        .history-item-status.failed {
            background: rgba(254, 242, 242, 0.75);
            color: #b91c1c;
            border: 1px solid rgba(248, 113, 113, 0.35);
        }
        /* 删除按钮 */
        .history-item-delete {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.2s, background 0.2s, transform 0.15s;
            z-index: 10;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .history-item:hover .history-item-delete { opacity: 1; }
        .history-item-delete:hover { background: rgba(239, 68, 68, 0.9); transform: scale(1.1); }
        .history-item-delete:active { transform: scale(0.95); }
        @media (hover: none) and (pointer: coarse) {
            .history-item-delete { opacity: 0.85; }
        }
        .history-item-time {
            font-size: 10px;
            font-weight: 500;
            color: var(--text-secondary);
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 4px 4px;
            margin: 0;
            flex: 0 0 auto;
            margin-left: auto;
            font-variant-numeric: tabular-nums;
            opacity: 0.88;
        }
        .history-item-duration {
            font-size: 9px;
            color: #64748b;
            background: rgba(241, 245, 249, 0.9);
            padding: 2px 5px;
            border-radius: 4px;
            font-weight: 500;
            border: 1px solid rgba(226, 232, 240, 0.9);
        }

        .history-item-pending {
            grid-column: 1 / -1;
        }

        .ecom-history-eta-hint {
            margin: 0;
            padding: 8px 10px;
            font-size: 11px;
            line-height: 1.55;
            color: #475569;
            background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
            border-top: 1px solid rgba(99, 102, 241, 0.12);
        }
        .ecom-history-eta-hint strong {
            color: #334155;
            font-weight: 600;
        }
        .ecom-history-eta-hint--card {
            padding: 8px 12px 11px;
            border-top: 1px solid rgba(99, 102, 241, 0.12);
        }
        .ecom-history-eta-hint--stale {
            color: #92400e;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border-top-color: rgba(245, 158, 11, 0.22);
        }
        .ecom-history-eta-hint--stale strong {
            color: #78350f;
        }

        .history-item-pending .history-pending-hint,
        .history-item-pending .ecom-history-eta-hint {
            padding: 10px 12px 14px;
            font-size: 11px;
            line-height: 1.55;
            color: var(--text-secondary);
            border-top: 1px solid rgba(226, 232, 240, 0.85);
            background: rgba(248, 250, 252, 0.65);
        }
        .history-pending-hint__line {
            margin: 0 0 8px;
        }
        .history-pending-hint__line:last-child {
            margin-bottom: 0;
        }
        .history-pending-hint__line .fas {
            margin-right: 4px;
            opacity: 0.75;
            font-size: 10px;
        }
        
        .history-empty {
            text-align: center;
            padding: 80px 24px;
            color: var(--text-muted);
            background: linear-gradient(180deg, transparent 0%, rgba(248,250,252,0.5) 100%);
            border-radius: 16px;
            margin-top: 8px;
        }
        .history-empty i {
            font-size: 52px;
            margin-bottom: 18px;
            opacity: 0.25;
        }
        .history-empty p {
            font-size: 15px;
            color: #94a3b8;
        }

        .history-results {
            display: flex;
            gap: 4px;
            margin-top: 8px;
        }
        .history-results img {
            width: 32px;
            height: 32px;
            object-fit: cover;
            border-radius: 4px;
        }

        .history-view-results-btn {
            margin-top: 0;
            margin-bottom: 0;
            padding: 7px 10px;
            border: none;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            color: #fff;
            background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 55%, #312e81 100%);
            cursor: pointer;
            box-shadow: 0 3px 12px rgba(91, 33, 182, 0.28);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            flex: 1 1 100%;
            width: 100%;
            box-sizing: border-box;
            transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
        }
        .history-view-results-btn:active {
            transform: scale(0.98);
            box-shadow: 0 2px 8px rgba(91, 33, 182, 0.22);
            filter: brightness(1.05);
        }
        .history-view-results-btn i {
            font-size: 12px;
        }

        .load-more-btn {
            width: 100%;
            padding: 14px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            margin-top: 20px;
            transition: background 0.2s, transform 0.15s;
        }
        .load-more-btn:active {
            transform: scale(0.98);
            background: #e5e7eb;
        }
        
        /* 历史 Tab 保存提示（与其它工具历史黄条口径一致） */
        .ecom-history-running-banner {
            display: none;
            margin: 0 4px 12px;
            padding: 14px 14px 12px;
            border-radius: 14px;
            background: linear-gradient(
                135deg,
                color-mix(in srgb, #6366f1 11%, #ffffff) 0%,
                color-mix(in srgb, #818cf8 9%, #eef2ff) 52%,
                #f8fafc 100%
            );
            border: 1px solid rgba(99, 102, 241, 0.28);
            box-shadow:
                0 8px 24px rgba(99, 102, 241, 0.1),
                0 1px 0 rgba(255, 255, 255, 0.85) inset;
        }
        .ecom-history-running-banner.show {
            display: block;
        }
        .ecom-history-running-banner__head {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
        }
        .ecom-history-running-banner__icon {
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 11px;
            background: linear-gradient(145deg, #6366f1, #4f46e5);
            color: #fff;
            font-size: 15px;
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
        }
        .ecom-history-running-banner__copy {
            min-width: 0;
            flex: 1;
        }
        .ecom-history-running-banner__title {
            font-size: 14px;
            font-weight: 700;
            color: #312e81;
            margin-bottom: 4px;
            letter-spacing: 0.01em;
        }
        .ecom-history-running-banner__text {
            font-size: 12px;
            line-height: 1.6;
            color: #4338ca;
        }
        .ecom-history-running-banner__text strong {
            color: #3730a3;
            font-weight: 700;
        }
        .ecom-history-running-banner__bar {
            height: 5px;
            background: rgba(99, 102, 241, 0.16);
            border-radius: 999px;
            overflow: hidden;
        }
        .ecom-history-running-banner__bar span {
            display: block;
            height: 100%;
            width: 38%;
            background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc);
            border-radius: 999px;
            animation: ecom-history-run-bar 1.7s ease-in-out infinite;
        }
        @keyframes ecom-history-run-bar {
            0% { transform: translateX(-120%); }
            100% { transform: translateX(320%); }
        }

        .ecom-history-notice-bar {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            margin: 0 4px 12px;
            border-radius: 12px;
            background: linear-gradient(105deg, #fff7ed 0%, #ffedd5 48%, #fffbeb 100%);
            border: 1px solid rgba(251, 146, 60, 0.28);
            color: #9a3412;
            font-size: 12px;
            line-height: 1.5;
            box-shadow: 0 2px 10px rgba(234, 88, 12, 0.06);
        }
        .ecom-history-notice-bar i {
            flex-shrink: 0;
            margin-top: 2px;
            opacity: 0.85;
        }

        /* 历史列表区域整体节奏 */
        #historyList {
            min-height: 180px;
        }
        #historyList:empty::before {
            content: "";
            display: block;
            height: 40px;
        }
        
        .history-grid .history-item:first-child {
            margin-top: 0;
        }

        /* 宽屏：略放大字号与圆角，仍保持两列 */
        @media (min-width: 480px) {
            .history-grid {
                gap: 16px 14px;
            }
            .history-item {
                border-radius: 18px;
            }
            .history-item-img {
                border-radius: 11px;
            }
            .history-thumb-wrap {
                padding: 10px;
                border-bottom-color: rgba(99, 102, 241, 0.1);
            }
            .history-item-info {
                padding: 10px 12px 12px;
                column-gap: 8px;
                row-gap: 8px;
            }
            .history-item-status {
                font-size: 11px;
                padding: 4px 9px;
                max-width: calc(100% - 84px);
            }
            .history-item-time {
                font-size: 11px;
            }
            .history-view-results-btn {
                padding: 8px 12px;
                font-size: 12px;
            }
            .history-processing-layer {
                inset: 10px;
                border-radius: 12px;
            }
            .history-processing-shimmer {
                inset: 10px;
                border-radius: 12px;
            }
        }

        /* 图片预览弹层（宽屏与 .app-container 同宽居中，避免 27 寸等大屏整屏拉伸） */
        .image-modal {
            position: fixed;
            top: 0;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: min(100%, var(--h5-app-max-width, 430px));
            background: rgba(0,0,0,0.9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10001;
            padding: 20px;
        }
        @media (min-width: 431px) {
            .image-modal {
                box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
            }
        }
        .image-modal.show { display: flex; }
        .image-modal img {
            max-width: 100%;
            max-height: 100%;
            border-radius: 8px;
        }

        /* 生成结果全屏页（电商详情图结果弹层） */
        .result-gallery-modal {
            position: fixed;
            top: 0;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10002;
            width: 100%;
            max-width: min(100%, var(--h5-app-max-width, 430px));
            background: linear-gradient(180deg, #fafafa 0%, #f1f5f9 45%, #eef2f7 100%);
            display: none;
            flex-direction: column;
            justify-content: flex-start;
            height: 100dvh;
            max-height: 100dvh;
            box-shadow: none;
        }
        .result-gallery-modal.show { display: flex; }
        @media (min-width: 431px) {
            .result-gallery-modal {
                box-shadow: 0 0 48px rgba(15, 23, 42, 0.1);
            }
        }
        .result-gallery-header {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 12px 48px;
            padding-top: calc(12px + env(safe-area-inset-top, 0px));
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: #0f172a;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0.02em;
            border-bottom: 1px solid rgba(15, 23, 42, 0.06);
            box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
        }
        .result-gallery-header-title {
            background: linear-gradient(90deg, #0f172a 0%, #334155 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        @supports not (-webkit-background-clip: text) {
            .result-gallery-header-title { color: #0f172a; }
        }
        .result-gallery-close {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 40px;
            height: 40px;
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 12px;
            background: #f8fafc;
            color: #334155;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.2s, transform 0.15s, border-color 0.2s;
        }
        .result-gallery-close:active {
            transform: translateY(-50%) scale(0.96);
            background: #e2e8f0;
        }
        .result-gallery-scroll {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            padding: 14px 14px 20px;
            -webkit-overflow-scrolling: touch;
        }
        .result-gallery-hint {
            margin: 0 0 12px;
            font-size: 12px;
            color: #64748b;
            text-align: center;
            letter-spacing: 0.02em;
        }
        .result-gallery-section-label {
            display: none;
        }
        .result-gallery-original-wrap {
            margin-bottom: 14px;
        }
        .gallery-hero-strip {
            display: flex;
            align-items: stretch;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 16px;
            background: #fff;
            border-radius: 18px;
            border: 1px solid rgba(15, 23, 42, 0.06);
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.9) inset,
                0 12px 40px rgba(15, 23, 42, 0.06);
        }
        .gallery-hero-col {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .gallery-hero-kicker {
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #94a3b8;
        }
        .gallery-hero-thumb {
            width: 88px;
            height: 88px;
            border-radius: 14px;
            overflow: hidden;
            background: #f1f5f9;
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
            border: 1px solid rgba(15, 23, 42, 0.06);
        }
        .gallery-hero-thumb .result-gallery-original-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        img.ecom-img-load-failed {
            opacity: 1 !important;
        }
        .gallery-hero-connector {
            flex: 0 0 auto;
            align-self: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
            border: 1px solid rgba(15, 23, 42, 0.08);
            color: #64748b;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .gallery-hero-stat {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 2px;
            padding: 10px 0 6px;
        }
        .gallery-hero-stat-num {
            font-size: 34px;
            font-weight: 800;
            letter-spacing: -0.04em;
            line-height: 1;
            color: var(--tool-brand);
        }
        .gallery-hero-stat-unit {
            font-size: 14px;
            font-weight: 600;
            color: #64748b;
        }
        .result-gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .result-gallery-grid--twocol {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .result-gallery-grid--onecol {
            grid-template-columns: minmax(0, 1fr);
            max-width: 320px;
            margin: 0 auto;
        }
        .gallery-item {
            position: relative;
            border-radius: 14px;
            overflow: hidden;
            background: #e2e8f0;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.65);
        }
        .gallery-item::after {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            border-radius: 14px;
            box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
            z-index: 1;
        }
        .gallery-item-num {
            position: absolute;
            top: 8px;
            left: 8px;
            min-width: 22px;
            height: 22px;
            padding: 0 6px;
            background: rgba(15, 23, 42, 0.72);
            backdrop-filter: blur(6px);
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3;
        }
        .gallery-item-dl {
            position: absolute;
            bottom: 8px;
            right: 8px;
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.94);
            border: none;
            border-radius: 10px;
            color: #334155;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
            opacity: 0.96;
            transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
        }
        @media (hover: hover) and (pointer: fine) {
            .gallery-item-dl {
                opacity: 0;
            }
            .gallery-item:hover .gallery-item-dl {
                opacity: 1;
            }
        }
        .gallery-item-dl:active {
            transform: scale(0.94);
            background: var(--tool-brand);
            color: #fff;
        }
        .gallery-item-img {
            width: 100%;
            aspect-ratio: 3 / 4;
            object-fit: cover;
            display: block;
            cursor: pointer;
            vertical-align: top;
        }
        .result-gallery-thumb {
            width: 100%;
            aspect-ratio: 3 / 4;
            object-fit: cover;
            border-radius: 0;
            border: none;
            cursor: pointer;
            display: block;
            background: #e5e7eb;
        }
        .result-gallery-footer {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 14px;
            padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-top: 1px solid rgba(15, 23, 42, 0.06);
            box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.05);
        }
        .result-gallery-download-all-btn {
            flex: 0 0 auto;
            width: 50px;
            height: 50px;
            border: 1px solid rgba(15, 23, 42, 0.1);
            border-radius: 14px;
            background: #fff;
            color: var(--tool-brand);
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.15s ease, box-shadow 0.2s ease;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
        }
        .result-gallery-download-all-btn:active {
            transform: scale(0.96);
            background: #f8fafc;
        }
        .result-gallery-download-all-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .result-gallery-content-btn {
            flex: 1;
            min-width: 0;
            padding: 14px 18px;
            border: none;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 700;
            color: var(--text-inverse, #fff);
            background: linear-gradient(135deg, var(--tool-brand) 0%, #334155 100%);
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(var(--tool-brand-rgb), 0.28);
            transition: transform 0.15s ease, box-shadow 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .result-gallery-content-btn i {
            font-size: 15px;
            opacity: 0.95;
        }
        .result-gallery-content-btn:active {
            transform: scale(0.98);
            box-shadow: 0 4px 14px rgba(var(--tool-brand-rgb), 0.22);
        }

        /* 智能文案生成结果全屏页 */
        .content-stream-modal {
            position: fixed;
            top: 0;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10005;
            width: 100%;
            max-width: min(100%, var(--h5-app-max-width, 430px));
            background: var(--bg-primary, #f9fafb);
            display: none;
            flex-direction: column;
            min-height: 0;
            max-height: 100dvh;
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
        }
        .content-stream-modal.show { display: flex; }
        @media (min-width: 431px) {
            .content-stream-modal {
                box-shadow: 0 0 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
            }
        }
        .content-stream-header {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            padding-top: calc(10px + env(safe-area-inset-top));
            background: var(--tool-brand);
            color: #fff;
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
            position: relative;
        }
        .content-stream-header::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
            pointer-events: none;
        }
        .content-stream-back {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.15s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .content-stream-back:active {
            transform: scale(0.96);
            background: rgba(255, 255, 255, 0.28);
        }
        .content-stream-save-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.15s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .content-stream-save-btn:active {
            transform: scale(0.96);
            background: rgba(255, 255, 255, 0.28);
        }
        .content-stream-title {
            flex: 1;
            font-size: 18px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-align: center;
            padding-right: 0;
            color: #ffffff;
            text-shadow:
                0 0 1px rgba(0, 0, 0, 0.35),
                0 2px 8px rgba(0, 0, 0, 0.28);
            -webkit-font-smoothing: antialiased;
        }
        /* 「我有产品」弹层：选项多时略缩卡片宽度，保持可横滑 */
        .csp-scroll-row--iw .csp-card {
            min-width: 76px;
            padding: 10px 10px;
        }
        .csp-scroll-row--iw .csp-card-t {
            font-size: 11px;
        }
        .page-ecom-iw-product .csp-card:not(.active) .csp-card-t {
            color: #1e293b;
            font-weight: 600;
        }
        .page-ecom-iw-product .csp-card:not(.active) .csp-card-ico {
            opacity: 0.92;
        }
        /* 自有产品：去掉小标题圆点与折叠头装饰点；芯片已为纯文字，略增可读性 */
        .page-ecom-iw-product .section-card--copy-pref .csp-section-title .csp-icon,
        .page-ecom-iw-product .section-card--copy-pref .csp-collapse-head .csp-icon,
        .page-ecom-iw-product .content-style-modal .csp-section-title .csp-icon,
        .page-ecom-iw-product .content-style-modal .csp-collapse-head .csp-icon {
            display: none !important;
        }
        .page-ecom-iw-product .csp-scroll-row--iw .csp-card {
            min-width: 70px;
            padding: 12px 11px;
        }
        .page-ecom-iw-product .csp-scroll-row--iw .csp-card-t {
            font-size: 12px;
            line-height: 1.35;
        }

        .content-stream-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 16px 16px;
            padding-bottom: calc(22px + var(--safe-bottom));
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            background: var(--bg-primary, #f9fafb);
            scroll-behavior: auto;
        }
        .content-stream-body--reveal-iw {
            animation: contentStreamBodyRevealIw 0.5s ease-out;
        }
        /* 仅用淡入，避免 translateY 与 overflow 自动贴底滚动叠在一起产生「上下抖」观感 */
        @keyframes contentStreamBodyRevealIw {
            from { opacity: 0.55; }
            to { opacity: 1; }
        }
        @media (prefers-reduced-motion: reduce) {
            .content-stream-body--reveal-iw { animation: none; }
        }
        .content-stream-original {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            padding: 4px 0 12px;
            margin-bottom: 10px;
        }
        .content-stream-img-wrap {
            position: relative;
            aspect-ratio: 1;
        }
        .content-stream-original img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(20, 21, 33, 0.1);
            border: 3px solid transparent;
            cursor: pointer;
            transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
        }
        .content-stream-original img:hover {
            transform: scale(1.02);
        }
        .content-stream-original img:active {
            transform: scale(0.98);
        }
        .content-stream-img-wrap.selected img {
            border-color: #e11d48;
        }
        .content-stream-img-wrap.unselected img {
            opacity: 0.35;
            border-color: #cbd5e1;
        }
        .content-stream-img-check {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #e11d48;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
            opacity: 0;
            transform: scale(0.5);
            transition: opacity 0.2s, transform 0.2s;
        }
        .content-stream-img-wrap.selected .content-stream-img-check {
            opacity: 1;
            transform: scale(1);
        }
        .content-stream-block {
            margin-bottom: 18px;
        }
        .content-stream-block-h {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-secondary);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .content-stream-block-h--row {
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }
        .content-stream-block-h-main {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            letter-spacing: -0.01em;
        }
        .content-stream-block-h-main::before {
            content: "";
            width: 3px;
            height: 14px;
            border-radius: 2px;
            background: linear-gradient(180deg, var(--tool-brand), var(--ink));
            flex-shrink: 0;
        }
        .content-stream-block-h i { color: #1e293b; font-size: 13px; opacity: 0.85; }
        .cs-copy-chip {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 11px;
            border-radius: 100px;
            border: 1px solid rgba(20, 21, 33, 0.1);
            background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
            font-size: 11px;
            font-weight: 600;
            color: #334155;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(20, 21, 33, 0.06);
            transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }
        .cs-copy-chip i { font-size: 10px; opacity: 0.88; }
        .cs-copy-chip:active {
            transform: scale(0.97);
            box-shadow: 0 1px 4px rgba(20, 21, 33, 0.08);
        }
        .content-titles-box {
            background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-radius: 16px;
            padding: 4px 6px;
            font-size: 14px;
            line-height: 1.55;
            color: var(--text-primary);
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.9) inset,
                0 12px 40px rgba(20, 21, 33, 0.07),
                0 0 0 1px rgba(20, 21, 33, 0.04);
            backdrop-filter: blur(8px);
        }
        /* 流式阶段：纯文本更新，避免整页标题 DOM 反复重建 */
        .content-titles-stream-pre {
            margin: 0 0 10px;
            padding: 14px 14px;
            font-family: inherit;
            font-size: 14px;
            line-height: 1.65;
            white-space: pre-wrap;
            word-break: break-word;
            color: #334155;
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 14px;
            border: 1px solid rgba(99, 102, 241, 0.14);
            max-height: min(38vh, 300px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            contain: content;
            box-shadow: 0 6px 22px rgba(79, 70, 229, 0.08);
            position: relative;
        }
        .content-titles-stream-pre--live::after {
            content: "";
            display: inline-block;
            width: 2px;
            height: 1em;
            margin-left: 2px;
            vertical-align: -0.12em;
            border-radius: 1px;
            background: linear-gradient(180deg, #6366f1, #e11d48);
            animation: csTitleCaret 0.95s step-end infinite;
        }
        @keyframes csTitleCaret {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }
        .content-stream-modal--streaming .content-titles-box {
            backdrop-filter: none !important;
        }
        .content-stream-modal--streaming .content-type-panel {
            backdrop-filter: none !important;
        }
        .content-stream-modal--streaming .content-stream-original img {
            transition: none !important;
        }
        .content-titles-box .title-line {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 12px;
            border-bottom: 1px solid rgba(15, 23, 42, 0.06);
            transition: background 0.18s ease, border-color 0.18s ease;
            cursor: pointer;
            border-left: 3px solid transparent;
        }
        .content-titles-box .title-line:last-child { border-bottom: none; }
        .content-titles-box .title-line:active { background: rgba(59, 130, 246, 0.04); }
        .content-titles-box .title-line.selected {
            background: linear-gradient(135deg, rgba(225, 29, 72, 0.1), rgba(225, 29, 72, 0.05));
            border-left-color: #e11d48;
        }
        .title-line-check {
            flex-shrink: 0;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: transparent;
            transition: all 0.2s;
        }
        .content-titles-box .title-line.selected .title-line-check {
            background: #e11d48;
            border-color: #e11d48;
            color: #fff;
        }
        .title-line-text {
            flex: 1;
            margin: 0;
            font-size: 14px;
            line-height: 1.55;
            letter-spacing: -0.01em;
            color: #1e293b;
        }
        .title-line-copy {
            flex-shrink: 0;
            width: 34px;
            height: 34px;
            border: none;
            border-radius: 10px;
            background: rgba(241, 245, 249, 0.95);
            color: #475569;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
        }
        .title-line-copy:hover { background: #e2e8f0; color: #1e293b; }
        .title-line-copy:active { transform: scale(0.94); }
        .title-line-copy i { font-size: 13px; }
        .content-type-tabs {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 2px 2px 10px;
            margin-bottom: 0;
            min-width: 0;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
        }
        .content-type-tabs::-webkit-scrollbar { display: none; }
        .content-type-tab {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border-radius: 100px;
            border: 1px solid rgba(20, 21, 33, 0.08);
            background: rgba(255, 255, 255, 0.85);
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease;
        }
        .content-type-tab:active { transform: scale(0.98); }
        .content-type-tab .tab-check {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid rgba(100, 116, 139, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            color: transparent;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .content-type-tab.active {
            background: var(--tool-brand);
            color: #fff;
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: 0 2px 8px rgba(var(--tool-brand-rgb), 0.25);
        }
        .content-type-tab.active .tab-check {
            background: #fff;
            border-color: #fff;
            color: var(--tool-brand);
        }
        .content-type-panel {
            display: none;
            background: linear-gradient(168deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.99) 55%, rgba(241, 245, 249, 0.98) 100%);
            border: 1px solid rgba(255, 255, 255, 0.75);
            border-radius: 16px;
            padding: 16px 16px;
            min-height: 120px;
            /* 与同行一致：由整页主区域滚动，避免与外层嵌套双滚动在触控上抢事件、造成卡顿与失灵感 */
            max-height: none;
            overflow: visible;
            font-size: 14px;
            line-height: 1.78;
            color: #334155;
            white-space: pre-wrap;
            word-break: break-word;
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.85) inset,
                0 8px 28px rgba(15, 23, 42, 0.07);
            letter-spacing: 0.01em;
        }
        .content-type-panel.active { display: block; }
        .content-type-panel--typing {
            border-color: rgba(99, 102, 241, 0.35) !important;
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.85) inset,
                0 0 0 1px rgba(99, 102, 241, 0.12),
                0 14px 44px rgba(99, 102, 241, 0.1) !important;
            animation: csPanelTypingGlow 2s ease-in-out infinite;
        }
        .content-stream-modal--streaming .content-type-panel--typing {
            animation: none;
            box-shadow:
                0 1px 0 rgba(255, 255, 255, 0.85) inset,
                0 0 0 1px rgba(99, 102, 241, 0.18),
                0 6px 20px rgba(99, 102, 241, 0.12) !important;
        }
        @keyframes csPanelTypingGlow {
            0%, 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 0 0 1px rgba(99, 102, 241, 0.1), 0 14px 40px rgba(99, 102, 241, 0.08); }
            50% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 0 0 1px rgba(99, 102, 241, 0.22), 0 16px 48px rgba(99, 102, 241, 0.14); }
        }
        @media (prefers-reduced-motion: reduce) {
            .content-type-panel--typing {
                animation: none !important;
            }
            .content-titles-stream-pre--live::after {
                animation: none !important;
                opacity: 0.85;
            }
            .content-stream-loading__dot {
                animation: none !important;
                opacity: 0.75;
            }
        }
        .content-stream-placeholder {
            color: var(--text-muted);
            font-size: 13px;
            text-align: center;
            padding: 24px;
        }
        .content-stream-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            color: #475569;
            font-size: 13px;
            font-weight: 600;
            padding: 18px 16px;
            margin: 8px 0 16px;
            border-radius: 16px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.95) 100%);
            border: 1px solid rgba(99, 102, 241, 0.12);
            box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
        }
        .content-stream-loading__dotwrap {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .content-stream-loading__dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            opacity: 0.35;
            animation: csLoadDot 1.05s ease-in-out infinite;
        }
        .content-stream-loading__dot:nth-child(2) { animation-delay: 0.15s; }
        .content-stream-loading__dot:nth-child(3) { animation-delay: 0.3s; }
        @keyframes csLoadDot {
            0%, 100% { opacity: 0.3; transform: translateY(0); }
            50% { opacity: 1; transform: translateY(-3px); }
        }
        .content-stream-loading__txt {
            letter-spacing: 0.02em;
        }

        /* 勿用 background-clip 透明字：在紫色顶栏上对比度几乎为 0，改为实心高亮 */
        .content-stream-modal--iw-copy .content-stream-title {
            font-size: 17px;
        }

        /* 发布到红薯 / 抖抖 */
        .ecom-publish-section {
            background: #f8fafc;
            border-radius: 16px;
            padding: 0;
            margin: 16px 0 8px;
        }
        .ecom-publish-selection-info {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 12px;
            font-size: 12px;
        }
        .selection-info-item {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: #f1f5f9;
            padding: 4px 10px;
            border-radius: 6px;
            color: #475569;
        }
        .selection-info-item:empty {
            display: none;
        }
        .selection-info-label {
            font-weight: 500;
            color: #64748b;
        }
        .selection-info-label::after {
            content: ":";
        }
        .selection-info-value {
            color: #334155;
            font-weight: 600;
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .ecom-publish-xhs-progress {
            display: none;
            flex-direction: row;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: #ff2442;
            margin-top: 8px;
        }
        .ecom-publish-xhs-progress.show { display: flex; }
        .ecom-publish-xhs-dot {
            width: 8px;
            height: 8px;
            margin-top: 0;
            border-radius: 50%;
            background: #ff2442;
            animation: ecomXhsPulse 1s ease-in-out infinite;
        }
        @keyframes ecomXhsPulse {
            0%, 100% { opacity: 0.35; transform: scale(0.9); }
            50% { opacity: 1; transform: scale(1); }
        }
        .ecom-publish-btns {
            display: flex;
            gap: 10px;
        }
        .ecom-publish-btn {
            flex: 1;
            padding: 12px 10px;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 600;
            color: #fff;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.1s;
        }
        .ecom-publish-btn:active:not(:disabled) { transform: scale(0.98); }
        .ecom-publish-btn.xhs {
            background: linear-gradient(180deg, #ff4d62 0%, #ff2442 55%, #e61e3c 100%);
        }
        .ecom-publish-btn.dy {
            color: #fff;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
            background: linear-gradient(105deg, #25f4ee 0%, #25f4ee 18%, #fe2c55 55%, #fe2c55 100%);
        }
        .ecom-publish-btns--3 {
            gap: 8px;
        }
        .ecom-publish-btns--3 .ecom-publish-btn {
            padding: 12px 6px;
            font-size: 14px;
        }
        .ecom-publish-btns--1 {
            flex-direction: column;
        }
        .ecom-publish-btn--full {
            width: 100%;
            flex: none;
            box-sizing: border-box;
            padding: 14px 12px;
            font-size: 15px;
        }
        .ecom-publish-block--platform {
            background: #fff;
        }
        .ecom-publish-block-desc--tight {
            margin-bottom: 10px;
        }
        .ecom-publish-sdk-hint {
            font-size: 10px;
            line-height: 1.5;
            color: #94a3b8;
            margin: 8px 0 0;
        }
        .ecom-publish-sdk-hint i { margin-right: 4px; }
        .ecom-publish-btn:disabled {
            opacity: 0.38;
            cursor: not-allowed;
            pointer-events: none;
        }
        .ecom-publish-block {
            padding: 14px;
            background: #fff;
            border-radius: 14px;
            border: 1px solid var(--border-light);
        }
        .ecom-publish-block-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
        }
        .ecom-publish-block-icon {
            font-size: 14px;
        }
        .ecom-publish-block-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
        }
        .ecom-publish-block-desc {
            font-size: 12px;
            color: var(--text-muted);
            margin: 0 0 12px;
        }
        .ecom-publish-divider {
            height: 1px;
            background: var(--border-light);
            margin: 14px 0;
        }
        .ecom-publish-manual-check {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            font-size: 13px;
            color: var(--text-secondary);
        }
        .ecom-publish-manual-check input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--tool-brand);
        }
        .ecom-publish-manual-check label {
            cursor: pointer;
        }
        .ecom-publish-actions-row {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }
        .ecom-publish-copy-all {
            flex: 1;
            padding: 12px;
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 500;
            color: #374151;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
        }
        .ecom-publish-copy-all:active { background: #e5e7eb; transform: scale(0.98); }
        .ecom-publish-back-btn {
            flex: 1;
            padding: 12px;
            background: #fff;
            border: 1px solid var(--border-light);
            border-radius: 12px;
            font-size: 13px;
            font-weight: 500;
            color: var(--tool-brand);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
        }
        .ecom-publish-back-btn:active { background: #f8fafc; transform: scale(0.98); }

        /* 跳转小红薯：全屏星空 + 多环旋转 + 步骤点（对标常见「发布仪式感」动效） */
        .ecom-xhs-jump-overlay {
            position: fixed;
            inset: 0;
            z-index: 10100;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
            box-sizing: border-box;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.32s ease;
        }
        .ecom-xhs-jump-overlay.show {
            opacity: 1;
            pointer-events: auto;
        }
        .ecom-xhs-jump-overlay__shade {
            position: absolute;
            inset: 0;
            background:
                radial-gradient(ellipse 90% 70% at 50% 38%, rgba(99, 102, 241, 0.22) 0%, transparent 55%),
                radial-gradient(ellipse 100% 55% at 50% 100%, rgba(15, 23, 42, 0.92) 0%, transparent 58%),
                linear-gradient(168deg, #0b1020 0%, #151032 42%, #0a0f1a 100%);
        }
        .ecom-xhs-jump-overlay__stars {
            position: absolute;
            inset: 0;
            opacity: 0.55;
            background-image:
                radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.95) 50%, transparent 51%),
                radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.8) 50%, transparent 51%),
                radial-gradient(1.2px 1.2px at 46% 72%, rgba(252, 211, 77, 0.7) 50%, transparent 51%),
                radial-gradient(1px 1px at 88% 86%, rgba(255,255,255,0.55) 50%, transparent 51%),
                radial-gradient(1px 1px at 24% 88%, rgba(165, 243, 252, 0.65) 50%, transparent 51%);
            animation: ecomXhsStarsDrift 12s ease-in-out infinite alternate;
        }
        @keyframes ecomXhsStarsDrift {
            from { transform: translateY(0); opacity: 0.48; }
            to { transform: translateY(-6px); opacity: 0.72; }
        }
        .ecom-xhs-jump-overlay__inner {
            position: relative;
            z-index: 2;
            width: 100%;
            max-width: 340px;
            text-align: center;
        }
        .ecom-xhs-jump-hero {
            margin-bottom: 26px;
        }
        .ecom-xhs-jump-rings {
            position: relative;
            width: 168px;
            height: 168px;
            margin: 0 auto;
        }
        .ecom-xhs-jump-ring {
            position: absolute;
            left: 50%;
            top: 50%;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-sizing: border-box;
            pointer-events: none;
        }
        .ecom-xhs-jump-ring--orbit {
            width: 152px;
            height: 152px;
            border: 3px solid rgba(148, 163, 184, 0.2);
            border-top-color: rgba(34, 211, 238, 0.95);
            border-right-color: rgba(168, 85, 247, 0.85);
            animation: ecomXhsRingSpin 2.4s linear infinite;
            box-shadow:
                0 0 0 1px rgba(15, 23, 42, 0.35) inset,
                0 0 36px rgba(34, 211, 238, 0.18);
        }
        .ecom-xhs-jump-ring--dash {
            width: 124px;
            height: 124px;
            border: 2px dashed rgba(244, 63, 94, 0.55);
            border-bottom-color: rgba(236, 72, 153, 0.45);
            animation: ecomXhsRingSpinRev 3.6s linear infinite;
        }
        .ecom-xhs-jump-ring--thin {
            width: 138px;
            height: 138px;
            border: 1px solid transparent;
            border-left-color: rgba(251, 113, 133, 0.5);
            border-top-color: rgba(244, 114, 182, 0.35);
            animation: ecomXhsRingSpin 5s linear infinite;
        }
        @keyframes ecomXhsRingSpin {
            to { transform: translate(-50%, -50%) rotate(360deg); }
        }
        @keyframes ecomXhsRingSpinRev {
            to { transform: translate(-50%, -50%) rotate(-360deg); }
        }
        .ecom-xhs-jump-core {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: linear-gradient(145deg, #ff3355 0%, #e11d48 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow:
                0 0 0 2px rgba(255, 255, 255, 0.2),
                0 12px 32px rgba(225, 29, 72, 0.45);
            animation: ecomXhsCorePulse 1.8s ease-in-out infinite;
        }
        .ecom-xhs-jump-core__mark {
            font-size: 22px;
            font-weight: 800;
            color: #fff;
            line-height: 1;
            font-family: ui-sans-serif, system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
            letter-spacing: -0.02em;
        }
        @keyframes ecomXhsCorePulse {
            0%, 100% { transform: translate(-50%, -50%) scale(0.96); box-shadow: 0 0 0 2px rgba(255,255,255,0.18), 0 10px 28px rgba(225, 29, 72, 0.38); }
            50% { transform: translate(-50%, -50%) scale(1.04); box-shadow: 0 0 0 2px rgba(255,255,255,0.28), 0 16px 40px rgba(225, 29, 72, 0.55); }
        }
        .ecom-xhs-jump-overlay-main {
            font-size: 17px;
            font-weight: 700;
            color: #f8fafc;
            margin: 0 0 14px;
            line-height: 1.45;
            letter-spacing: 0.02em;
            text-shadow: 0 1px 18px rgba(15, 23, 42, 0.65);
        }
        .ecom-xhs-jump-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 16px;
        }
        .ecom-xhs-jump-steps span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.22);
            transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
        }
        .ecom-xhs-jump-steps span.is-on {
            background: #fff;
            transform: scale(1.15);
            box-shadow: 0 0 14px rgba(248, 113, 113, 0.85), 0 0 22px rgba(34, 211, 238, 0.35);
        }
        .ecom-xhs-jump-bar {
            width: min(240px, 72vw);
            height: 3px;
            margin: 0 auto 16px;
            border-radius: 999px;
            background: rgba(15, 23, 42, 0.75);
            overflow: hidden;
            box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
        }
        .ecom-xhs-jump-bar > i {
            display: block;
            height: 100%;
            width: 18%;
            border-radius: inherit;
            background: linear-gradient(90deg, #fb7185, #f43f5e, #fb7185);
            background-size: 200% 100%;
            transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
            animation: ecomXhsBarShine 1.4s ease-in-out infinite;
        }
        @keyframes ecomXhsBarShine {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        .ecom-xhs-jump-overlay-sub {
            font-size: 13px;
            line-height: 1.55;
            color: rgba(226, 232, 240, 0.88);
            margin: 0;
        }
        @media (prefers-reduced-motion: reduce) {
            .ecom-xhs-jump-overlay__stars,
            .ecom-xhs-jump-ring--orbit,
            .ecom-xhs-jump-ring--dash,
            .ecom-xhs-jump-ring--thin,
            .ecom-xhs-jump-core,
            .ecom-xhs-jump-bar > i {
                animation: none !important;
            }
            .ecom-xhs-jump-ring--orbit,
            .ecom-xhs-jump-ring--dash,
            .ecom-xhs-jump-ring--thin {
                transform: translate(-50%, -50%) rotate(0deg) !important;
            }
        }

        /* 电脑浏览器：文案区字号与留白（全屏层宽度已统一用 --h5-app-max-width，不再单独收窄） */
        @media (min-width: 431px) {
            .gallery-hero-thumb {
                width: 96px;
                height: 96px;
            }
            .content-stream-original {
                grid-template-columns: repeat(3, 1fr);
            }
            .content-titles-box {
                font-size: 12px;
                padding: 4px 4px;
            }
            .content-titles-box .title-line {
                padding: 8px 8px;
            }
            .title-line-text { font-size: 12px; }
            .content-type-tab {
                padding: 6px 10px;
                font-size: 11px;
            }
            .content-type-panel {
                font-size: 13px;
                line-height: 1.68;
                padding: 12px;
            }
            .content-stream-body {
                padding: 12px 14px;
            }
            .result-gallery-scroll {
                padding: 6px 10px 10px;
            }
        }
        @media (min-width: 900px) {
            .gallery-hero-thumb {
                width: 100px;
                height: 100px;
            }
            .content-stream-original {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* 文案生成 · 风格配置弹层 */
        .content-style-modal {
            position: fixed;
            inset: 0;
            z-index: 10006;
            display: none;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
        }
        .content-style-modal.show {
            display: flex;
        }
        .content-style-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 18, 28, 0.45);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        .content-style-sheet {
            position: relative;
            width: 100%;
            max-width: min(100%, var(--h5-app-max-width, 430px));
            min-width: 0;
            min-height: min(62vh, 560px);
            max-height: min(96vh, 860px);
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #f1f5f9 100%);
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -12px 48px rgba(20, 21, 33, 0.22);
            display: flex;
            flex-direction: column;
            animation: csp-sheet-up 0.28s ease-out;
        }
        @keyframes csp-sheet-up {
            from { transform: translateY(100%); opacity: 0.9; }
            to { transform: translateY(0); opacity: 1; }
        }
        @media (min-width: 431px) {
            .content-style-modal {
                align-items: center;
                padding: 16px 16px 24px;
            }
            .content-style-sheet {
                border-radius: 20px;
                min-height: min(58vh, 540px);
                max-height: min(92vh, 820px);
            }
        }
        .content-style-head {
            flex-shrink: 0;
            padding: 16px 18px 10px;
            text-align: center;
            position: relative;
        }
        .content-style-x {
            position: absolute;
            left: 12px;
            top: 12px;
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 10px;
            background: rgba(20, 21, 33, 0.06);
            color: var(--text-secondary);
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
        }
        .content-style-head h2 {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            margin: 4px 0 6px;
        }
        .content-style-sub {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
            margin: 0;
        }
        .content-style-body {
            flex: 1;
            min-height: 0;
            min-width: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 6px 16px 16px;
            -webkit-overflow-scrolling: touch;
        }
        .csp-section {
            margin-bottom: 14px;
            min-width: 0;
            padding: 12px 12px 10px;
            background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid rgba(20, 21, 33, 0.07);
            border-radius: 16px;
            box-shadow: 0 2px 12px rgba(20, 21, 33, 0.04);
        }
        .csp-section--collapse {
            background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid rgba(20, 21, 33, 0.07);
            border-radius: 16px;
            padding: 4px 10px 8px;
            margin-bottom: 12px;
            box-shadow: 0 2px 12px rgba(20, 21, 33, 0.04);
        }
        .csp-section-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0 0 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .csp-icon {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        /* 三类选项统一品牌色点（与顶栏深蓝系一致） */
        .csp-icon-brand {
            background: var(--gradient-emphasis-short);
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(20, 21, 33, 0.15);
        }
        .csp-icon-gradient { background: var(--gradient-emphasis-short); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(20, 21, 33, 0.15); }
        .csp-optional {
            font-size: 11px;
            font-weight: 500;
            color: var(--text-muted);
        }
        .csp-swipe-hint {
            font-size: 10px;
            font-weight: 400;
            color: #94a3b8;
            margin-left: auto;
            animation: cspSwipeHint 2s ease-in-out infinite;
        }
        @keyframes cspSwipeHint {
            0%, 100% { opacity: 0.5; transform: translateX(0); }
            50% { opacity: 1; transform: translateX(3px); }
        }
        .csp-scroll-row {
            display: flex;
            flex-wrap: nowrap;
            align-items: stretch;
            gap: 10px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 4px 2px 10px;
            margin: 0 -4px;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            touch-action: pan-x pan-y;
        }
        .csp-scroll-row::-webkit-scrollbar { display: none; }
        .csp-card {
            flex: 0 0 auto;
            width: 78px;
            min-height: 78px;
            padding: 10px 8px;
            border: 1px solid rgba(20, 21, 33, 0.1);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 1px 8px rgba(20, 21, 33, 0.05);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease, color 0.22s ease;
            color: var(--text-primary);
            font: inherit;
        }
        .csp-card:active { transform: scale(0.97); }
        .csp-card.active {
            border-color: rgba(255, 255, 255, 0.14);
            background: linear-gradient(155deg, #1a1f2e 0%, #2a3142 48%, #343d52 100%);
            box-shadow:
                0 8px 26px rgba(20, 21, 33, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
            color: #fff;
        }
        .csp-card.active .csp-card-t {
            color: rgba(255, 255, 255, 0.94);
        }
        .csp-card.active .csp-card-ico {
            opacity: 1;
        }
        .csp-card-ico {
            font-size: 18px;
            line-height: 1;
            opacity: 0.9;
        }
        .csp-card-t {
            font-size: 11px;
            font-weight: 600;
            text-align: center;
            line-height: 1.25;
        }
        .csp-scroll-row--nums {
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-start;
            overflow-x: visible;
        }
        .csp-num-card {
            flex: 0 0 auto;
            width: calc(20% - 7px);
            min-width: 58px;
            max-width: 72px;
            min-height: 74px;
            padding: 10px 6px;
            border: 1px solid rgba(20, 21, 33, 0.1);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 1px 8px rgba(20, 21, 33, 0.05);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            font: inherit;
            transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
        }
        .csp-num-card.active {
            border-color: rgba(255, 255, 255, 0.14);
            background: linear-gradient(155deg, #1a1f2e 0%, #2a3142 48%, #343d52 100%);
            box-shadow:
                0 8px 26px rgba(20, 21, 33, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }
        .csp-num {
            font-size: 22px;
            font-weight: 800;
            color: #1e293b;
            letter-spacing: -0.03em;
            line-height: 1;
            transition: color 0.22s ease;
        }
        .csp-num-card.active .csp-num {
            color: #fff;
        }
        .csp-num-sub {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-secondary);
            transition: color 0.22s ease;
        }
        .csp-num-card.active .csp-num-sub {
            color: rgba(255, 255, 255, 0.78);
        }
        .csp-collapse-head {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 4px;
            border: none;
            background: transparent;
            cursor: pointer;
            text-align: left;
        }
        .csp-chevron {
            font-size: 12px;
            color: var(--text-muted);
            transition: transform 0.2s;
        }
        .csp-section--collapse.is-open .csp-chevron {
            transform: rotate(180deg);
        }
        .csp-collapse-panel {
            padding: 0 2px 8px;
        }
        .csp-collapse-panel[hidden] { display: none !important; }
        .csp-textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--border-light);
            border-radius: 12px;
            font-size: 13px;
            line-height: 1.55;
            resize: vertical;
            min-height: 72px;
            box-sizing: border-box;
            background: #fff;
        }
        .csp-textarea:focus {
            outline: none;
            border-color: rgba(20, 21, 33, 0.25);
        }
        .content-style-footer {
            flex-shrink: 0;
            padding: 12px 16px calc(14px + var(--safe-bottom));
            background: linear-gradient(180deg, transparent, rgba(248,250,252,0.95) 40%);
            border-top: 1px solid var(--border-light);
        }
        .content-style-primary-btn {
            width: 100%;
            padding: 14px 20px;
            border: none;
            border-radius: 100px;
            font-size: 15px;
            font-weight: 700;
            color: var(--text-inverse, #fff);
            background: var(--tool-brand);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 2px 10px rgba(var(--tool-brand-rgb), 0.22);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .content-style-primary-btn:active {
            transform: scale(0.98);
            box-shadow: 0 1px 6px rgba(var(--tool-brand-rgb), 0.2);
        }
        .content-style-primary-btn i { opacity: 0.95; }

        /* 大图滑动查看（与主栏同宽居中） */
        .result-viewer-modal {
            position: fixed;
            top: 0;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10003;
            width: 100%;
            max-width: min(100%, var(--h5-app-max-width, 430px));
            background: rgba(0,0,0,0.95);
            display: none;
            flex-direction: column;
        }
        .result-viewer-modal.show { display: flex; }
        @media (min-width: 431px) {
            .result-viewer-modal {
                box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
            }
        }
        .result-viewer-top {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            padding-top: calc(12px + env(safe-area-inset-top));
        }
        .result-viewer-close {
            width: 44px;
            height: 44px;
            border: none;
            border-radius: 12px;
            background: rgba(255,255,255,0.15);
            color: #fff;
            font-size: 22px;
            cursor: pointer;
        }
        .result-viewer-counter {
            color: rgba(255,255,255,0.85);
            font-size: 14px;
            font-weight: 500;
        }
        .result-viewer-stage {
            flex: 1;
            position: relative;
            overflow: hidden;
            touch-action: none;
        }
        .viewer-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 2;
            width: 44px;
            height: 72px;
            border: none;
            border-radius: 0 12px 12px 0;
            background: rgba(255,255,255,0.12);
            color: #fff;
            font-size: 28px;
            line-height: 1;
            cursor: pointer;
            display: none;
        }
        .viewer-nav-btn.next {
            right: 0;
            border-radius: 12px 0 0 12px;
        }
        .viewer-nav-btn.prev { left: 0; }
        @media (min-width: 480px) {
            .viewer-nav-btn:not(.viewer-nav-hidden) { display: flex; align-items: center; justify-content: center; }
        }
        .viewer-nav-hidden { display: none !important; }
        .result-viewer-track {
            display: flex;
            height: 100%;
            will-change: transform;
        }
        .result-viewer-slide {
            flex-shrink: 0;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
            box-sizing: border-box;
        }
        .result-viewer-slide img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 8px;
        }

        /* 标题行优化 */
        .title-line {
            position: relative;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 12px;
            margin: 6px 0;
            background: #fff;
            border-radius: 12px;
            border: 1.5px solid var(--border-light);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .title-line:hover {
            background: #fafbfc;
            border-color: rgba(26, 42, 51, 0.15);
        }
        .title-line.selected {
            background: linear-gradient(135deg, rgba(26, 42, 51, 0.03) 0%, rgba(26, 42, 51, 0.06) 100%);
            border-color: var(--tool-brand);
            box-shadow: 0 2px 12px rgba(26, 42, 51, 0.08);
        }
        .title-line-num {
            flex: 0 0 auto;
            width: 24px;
            height: 24px;
            background: linear-gradient(135deg, #1a2a33 0%, #2d4a56 100%);
            color: #fff;
            font-size: 12px;
            font-weight: 700;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .title-line.selected .title-line-num {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }
        .title-line-check {
            display: none;
            flex: 0 0 auto;
            width: 22px;
            height: 22px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
            font-size: 11px;
            border-radius: 6px;
            align-items: center;
            justify-content: center;
        }
        .title-line.selected .title-line-check {
            display: flex;
        }
        .title-line.selected .title-line-num {
            display: none;
        }
        .title-line-text {
            flex: 1;
            margin: 0;
            font-size: 14px;
            line-height: 1.5;
            color: var(--text-primary);
            word-break: break-word;
        }
        .title-line-copy {
            flex: 0 0 auto;
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            background: var(--bg-secondary);
            color: var(--text-muted);
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transform: scale(0.9);
            transition: all 0.2s ease;
        }
        .title-line:hover .title-line-copy,
        .title-line.selected .title-line-copy {
            opacity: 1;
            transform: scale(1);
        }
        .title-line-copy:active {
            transform: scale(0.9);
            background: var(--tool-brand);
            color: #fff;
        }

        /* 内容标题盒子 */
        .content-titles-box {
            max-height: 320px;
            overflow-y: auto;
            padding: 4px;
        }

        /* 生成进度条 */
        .gen-progress-bar {
            padding: 20px 16px;
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border-radius: 16px;
            margin: 16px 0;
        }
        .gen-progress-steps {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 4px;
            margin-bottom: 14px;
        }
        .gen-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
            opacity: 0.4;
            transition: all 0.3s ease;
        }
        .gen-step.active {
            opacity: 1;
        }
        .gen-step.done {
            opacity: 1;
        }
        .gen-step-dot {
            width: 32px;
            height: 32px;
            background: #e2e8f0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: #94a3b8;
            transition: all 0.3s ease;
        }
        .gen-step.active .gen-step-dot {
            background: linear-gradient(135deg, #1a2a33 0%, #2d4a56 100%);
            color: #fff;
            box-shadow: 0 4px 14px rgba(26, 42, 51, 0.25);
        }
        .gen-step.done .gen-step-dot {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
        }
        .gen-step-dot i {
            font-size: 12px;
        }
        .gen-step-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            white-space: nowrap;
        }
        .gen-step.active .gen-step-label,
        .gen-step.done .gen-step-label {
            color: var(--text-primary);
        }
        .gen-step-line {
            flex: 1;
            height: 2px;
            background: #e2e8f0;
            border-radius: 1px;
            min-width: 12px;
            margin: 0 2px;
            margin-bottom: 22px;
            transition: background 0.3s ease;
        }
        .gen-step-line.done {
            background: linear-gradient(90deg, #10b981 0%, #059669 100%);
        }
        .gen-progress-tip {
            text-align: center;
            font-size: 13px;
            color: var(--text-secondary);
            padding-top: 4px;
        }
        .gen-progress-tip i {
            margin-right: 6px;
        }

        .ecom-prompt-wait {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            min-height: 160px;
            padding: 28px 20px;
            text-align: center;
            color: rgba(231, 233, 245, 0.82);
        }
        .ecom-prompt-wait__ico {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.08);
            font-size: 22px;
            color: #c4b5fd;
        }
        .ecom-prompt-wait__txt {
            font-size: 14px;
            line-height: 1.55;
            max-width: 280px;
        }
        .result-section.show .ecom-prompt-wait {
            color: rgba(231, 233, 245, 0.85);
        }

        /* 从创作页（from=create）首次点「历史」时的全屏过渡 */
        .ecom-history-enter-portal {
            position: fixed;
            inset: 0;
            z-index: 9996;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px;
            box-sizing: border-box;
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.22s ease, visibility 0.22s ease;
        }
        .ecom-history-enter-portal--show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        .ecom-history-enter-portal--leaving {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.28s ease, visibility 0.28s ease;
        }
        .ecom-history-enter-portal__bg {
            position: absolute;
            inset: 0;
            background:
                radial-gradient(ellipse 85% 55% at 50% 38%, rgba(99, 102, 241, 0.22) 0%, transparent 58%),
                radial-gradient(ellipse 120% 80% at 50% 100%, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.92) 55%, #020617 100%);
        }
        .ecom-history-enter-portal__rings {
            position: relative;
            width: 120px;
            height: 120px;
            margin-bottom: 8px;
        }
        .ecom-history-enter-portal__ring {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 2px solid transparent;
            opacity: 0;
        }
        .ecom-history-enter-portal--show .ecom-history-enter-portal__ring {
            opacity: 1;
            transition: opacity 0.4s ease;
        }
        .ecom-history-enter-portal__ring--a {
            border-top-color: rgba(129, 140, 248, 0.95);
            border-right-color: rgba(99, 102, 241, 0.35);
            animation: ecom-history-portal-spin 1.1s linear infinite;
        }
        .ecom-history-enter-portal__ring--b {
            inset: 14px;
            border-bottom-color: rgba(56, 189, 248, 0.75);
            border-left-color: rgba(56, 189, 248, 0.2);
            animation: ecom-history-portal-spin 0.85s linear infinite reverse;
        }
        @keyframes ecom-history-portal-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .ecom-history-enter-portal__core {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 14px;
            height: 14px;
            margin: -7px 0 0 -7px;
            border-radius: 50%;
            background: radial-gradient(circle at 35% 30%, #fff 0%, #c4b5fd 28%, #6366f1 72%, #312e81 100%);
            box-shadow:
                0 0 24px rgba(129, 140, 248, 0.75),
                0 0 48px rgba(56, 189, 248, 0.35);
            opacity: 0;
            transform: scale(0.3);
        }
        .ecom-history-enter-portal--show .ecom-history-enter-portal__core {
            opacity: 1;
            transform: scale(1);
            transition: opacity 0.35s ease 0.08s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s;
            animation: ecom-history-portal-core-pulse 1.2s ease-in-out 0.55s infinite;
        }
        @keyframes ecom-history-portal-core-pulse {
            0%, 100% { box-shadow: 0 0 24px rgba(129, 140, 248, 0.75), 0 0 48px rgba(56, 189, 248, 0.35); }
            50% { box-shadow: 0 0 32px rgba(167, 139, 250, 0.9), 0 0 64px rgba(56, 189, 248, 0.45); }
        }
        .ecom-history-enter-portal__title {
            position: relative;
            margin: 0 0 6px;
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 0.06em;
            color: #f8fafc;
            text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
            opacity: 0;
            transform: translateY(12px);
        }
        .ecom-history-enter-portal--show .ecom-history-enter-portal__title {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.4s ease 0.12s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
        }
        .ecom-history-enter-portal__sub {
            position: relative;
            margin: 0;
            font-size: 13px;
            font-weight: 500;
            color: rgba(226, 232, 240, 0.82);
            letter-spacing: 0.02em;
            opacity: 0;
            transform: translateY(10px);
        }
        .ecom-history-enter-portal--show .ecom-history-enter-portal__sub {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.38s ease 0.22s, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.22s;
        }
        @media (prefers-reduced-motion: reduce) {
            .ecom-history-enter-portal__ring--a,
            .ecom-history-enter-portal__ring--b,
            .ecom-history-enter-portal--show .ecom-history-enter-portal__core {
                animation: none;
            }
        }

        /* 自有产品 · 文案字数：覆盖默认深色整块选中，与「文案风格」浅底描边一致 */
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums {
            padding: 10px 8px 12px;
            margin: 4px -4px 0;
            border-radius: 16px;
            background: linear-gradient(180deg, rgba(241, 245, 249, 0.85) 0%, rgba(255, 255, 255, 0.45) 100%);
            border: 1px solid rgba(15, 23, 42, 0.06);
            gap: 7px;
            justify-content: space-between;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card {
            border-radius: 16px;
            min-height: 78px;
            padding: 10px 4px 11px;
            gap: 5px;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num {
            font-size: 19px;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.04em;
            line-height: 1;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) .csp-num {
            color: #475569 !important;
            font-weight: 700 !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-sub {
            font-size: 9px;
            font-weight: 700;
            letter-spacing: 0.03em;
            max-width: 5em;
            margin: 0 auto;
            line-height: 1.15;
            text-align: center;
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.58) 0%, rgba(30, 27, 75, 0.38) 100%);
            border-color: rgba(167, 139, 250, 0.12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) .csp-num {
            color: #e2e8f0 !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
            border: 1px solid rgba(15, 23, 42, 0.07) !important;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active {
            background: linear-gradient(
                180deg,
                #ffffff 0%,
                color-mix(in srgb, var(--as-blue, #2563eb) 9%, var(--bg-primary, #eef4ff)) 100%
            ) !important;
            border: 1px solid color-mix(in srgb, var(--as-blue, #2f5bff) 34%, transparent) !important;
            box-shadow:
                0 0 0 3px color-mix(in srgb, var(--as-blue, #2f5bff) 10%, transparent),
                0 8px 22px color-mix(in srgb, var(--as-blue, #2f5bff) 12%, transparent) !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active .csp-num {
            color: var(--as-blue, #1d4fff) !important;
            font-weight: 800 !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active .csp-num-sub {
            color: #475569 !important;
            font-weight: 600 !important;
        }
        .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) .csp-num-sub {
            color: #64748b !important;
        }

        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) {
            background: linear-gradient(180deg, rgba(30, 27, 75, 0.5) 0%, rgba(15, 23, 42, 0.55) 100%) !important;
            border: 1px solid rgba(167, 139, 250, 0.14) !important;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active {
            background: linear-gradient(180deg, rgba(49, 46, 129, 0.45) 0%, rgba(30, 27, 75, 0.55) 100%) !important;
            border: 1px solid rgba(167, 139, 250, 0.38) !important;
            box-shadow:
                0 0 0 3px rgba(129, 140, 248, 0.12),
                0 10px 28px rgba(0, 0, 0, 0.35) !important;
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active .csp-num {
            color: #c4d4ff !important;
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card.active .csp-num-sub {
            color: #94a3b8 !important;
        }
        html[data-h5-appearance='dark'] .page-ecom-iw-product.tool-page .csp-scroll-row--nums .csp-num-card:not(.active) .csp-num-sub {
            color: #94a3b8 !important;
        }

        /* ══════════════════════════════════════════════════════════
           移动端全端美化：提示词面板 / 创作页 / 历史 / 弹层
           ══════════════════════════════════════════════════════════ */

        .ecom-gen-btn-ico {
            width: 17px;
            height: 17px;
            margin-right: 6px;
            vertical-align: -3px;
            flex-shrink: 0;
        }
        .ecom-gen-btn-label--short { display: none; }

        @media (max-width: 767px) {
            /* 面板打开：隐藏底层页面，避免上传图半模糊露出 */
            body.ecom-result-overlay-open .nav-header,
            body.ecom-result-overlay-open .lh-quota-wrap,
            body.ecom-result-overlay-open .h5-tool-intro,
            body.ecom-result-overlay-open .tab-nav,
            body.ecom-result-overlay-open .ecom-pro-bar {
                visibility: hidden;
                pointer-events: none;
            }

            .result-section.show {
                justify-content: stretch;
                align-items: stretch;
                background: #07081a;
                -webkit-backdrop-filter: none;
                backdrop-filter: none;
                padding: 0;
            }

            .result-section.show .result-card {
                width: 100%;
                max-width: none;
                height: 100%;
                max-height: none;
                min-height: 100dvh;
                min-height: 100svh;
                margin: 0;
                border: none;
                border-radius: 0;
                box-shadow: none;
                animation: ecomResultMobileIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
            }
            @keyframes ecomResultMobileIn {
                from { opacity: 0; transform: translate3d(0, 12px, 0); }
                to { opacity: 1; transform: translate3d(0, 0, 0); }
            }

            .result-section.show .result-card-header {
                display: flex;
                align-items: flex-start;
                gap: 10px;
                padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 12px;
            }
            .result-section.show .result-card-header::before {
                display: none;
            }
            .result-section.show .result-card-title {
                flex: 1;
                min-width: 0;
                display: grid;
                grid-template-columns: auto 1fr;
                grid-template-rows: auto auto;
                align-items: center;
                column-gap: 8px;
                row-gap: 3px;
            }
            .result-section.show .result-card-title svg {
                grid-column: 1;
                grid-row: 1;
            }
            .result-section.show .result-card-title > span:first-of-type {
                grid-column: 2;
                grid-row: 1;
                font-size: 17px;
                font-weight: 700;
                letter-spacing: 0.01em;
            }
            .result-section.show .result-card-subtitle {
                grid-column: 1 / -1;
                grid-row: 2;
                margin: 0;
                padding-left: 2px;
                font-size: 12px;
                line-height: 1.35;
            }
            .result-section.show .result-close-btn {
                flex: 0 0 auto;
                width: 36px;
                height: 36px;
                margin-top: 1px;
            }

            .result-section.show .prompt-list {
                padding: 2px 10px 6px;
            }
            .result-section.show .prompt-item {
                padding: 12px 8px;
            }
            .result-section.show .prompt-item-header {
                flex-wrap: wrap;
                gap: 8px 6px;
                margin-bottom: 8px;
            }
            .result-section.show .prompt-item-title {
                flex: 1 1 100%;
                font-size: 13px;
                line-height: 1.35;
            }
            .result-section.show .prompt-item-actions-top {
                flex: 1 1 100%;
                justify-content: flex-end;
                gap: 6px;
            }
            .result-section.show .prompt-action-btn {
                padding: 7px 12px;
                font-size: 12px;
                border-radius: 8px;
                background: rgba(255, 255, 255, 0.05);
            }
            .result-section.show .prompt-item-content {
                font-size: 13px;
                line-height: 1.68;
                padding: 12px 13px;
                border-radius: 14px;
                max-height: min(42vh, 280px);
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            .result-section.show .gen-progress-bar {
                margin: 6px 12px 10px;
                padding: 16px 12px;
            }
            .result-section.show .gen-step-label {
                font-size: 10px;
            }
            .result-section.show .gen-step-dot {
                width: 28px;
                height: 28px;
            }

            .result-section.show .result-actions-bottom {
                padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
                gap: 8px;
                background: linear-gradient(180deg, rgba(11, 12, 30, 0) 0%, rgba(11, 12, 30, 0.85) 24%, #0b0c1e 100%);
                border-top-color: rgba(255, 255, 255, 0.06);
            }
            .result-section.show .action-btn {
                min-height: 48px;
            }
            .result-section.show .action-btn.secondary {
                flex: 0 0 48px;
                width: 48px;
                padding: 0;
            }
            .result-section.show .action-btn.primary {
                flex: 1 1 auto;
                min-width: 0;
                font-size: 14px;
                padding: 12px 14px;
                white-space: nowrap;
            }

            /* 创作页：边距与安全区 */
            .ecom-inset {
                padding-left: max(14px, env(safe-area-inset-left, 0px));
                padding-right: max(14px, env(safe-area-inset-right, 0px));
            }
            .ecom-page .main-content {
                padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
            }
            .tab-nav-item {
                padding: 11px 12px;
                font-size: 14px;
            }
            .section-card {
                padding: 14px !important;
                border-radius: 18px !important;
            }
            .ecom-scene-presets {
                gap: 8px;
            }
            .ecom-scene-preset {
                padding: 8px 10px;
            }
            .submit-btn--env-generate {
                min-height: 50px;
                font-size: 15px;
            }

            /* 历史 Tab */
            .history-grid {
                gap: 10px 8px;
            }

            /* 弹层：贴边全宽 + 安全区 */
            .image-modal {
                max-width: 100%;
                left: 0;
                transform: none;
                padding: max(16px, env(safe-area-inset-top, 0px)) 14px max(16px, env(safe-area-inset-bottom, 0px));
            }
            .result-gallery-modal {
                max-width: 100%;
                left: 0;
                transform: none;
            }
            .content-style-sheet {
                max-width: 100%;
                border-radius: 22px 22px 0 0;
            }
        }

        @media (max-width: 374px) {
            .ecom-gen-btn-label--full { display: none; }
            .ecom-gen-btn-label--short { display: inline; }
            .result-section.show .action-btn.primary {
                font-size: 13px;
                padding: 12px 10px;
            }
            .result-section.show .prompt-item-content {
                max-height: min(38vh, 240px);
            }
            .config-card .chip-btn.config-option {
                padding: 8px 10px;
                font-size: 12px;
            }
        }

        @media (max-height: 680px) and (max-width: 767px) {
            .result-section.show .result-card-header {
                padding-top: calc(8px + env(safe-area-inset-top, 0px));
                padding-bottom: 8px;
            }
            .result-section.show .result-card-title > span:first-of-type {
                font-size: 16px;
            }
            .result-section.show .prompt-item-content {
                max-height: min(36vh, 200px);
            }
            .result-section.show .gen-progress-bar {
                padding: 12px 10px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .result-section.show .result-card {
                animation: none;
            }
        }