/**
 * H5 工具子页版式统一：三列选项、留白、底栏可读性、提示条
 * 依赖 _tool_layout_unify_css.php 在各自页面 CSS 之后加载
 */

/* ── 爆款详情图：市场等三列（图生万物页 body 也有 detail-page，须排除 linghui-page）── */
html body.detail-page:not(.linghui-page) .section-card .scroll-row:not(#platformRow):not(#qualityRow) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    overscroll-behavior-x: auto !important;
    flex-wrap: wrap !important;
}

html body.detail-page #platformRow.scroll-row,
html body.detail-page #qualityRow.scroll-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px 2px !important;
    margin: 0 -2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    overscroll-behavior-x: contain !important;
}

html body.detail-page #platformRow.scroll-row::-webkit-scrollbar,
html body.detail-page #qualityRow.scroll-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 图生万物：比例等仍三列 */
html body.linghui-page .section-card .scroll-row:not(.scroll-row--linghui-category) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    overscroll-behavior-x: auto !important;
    flex-wrap: wrap !important;
}

/* 图生万物：比例行单行横滑 + 胶囊（与详情 / 电商详情图一致） */
/* 图生万物：比例行、分类行均单行横滑（#id 优先级最高，压过历史三列 grid 规则） */
html body.linghui-page #categoryRow.scroll-row,
html body.linghui-page #categoryRow.scroll-row--linghui-category,
html body.linghui-page #categoryRow.linghui-category-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: unset !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    padding: 4px 0 10px !important;
    margin: 0 0 10px !important;
    justify-content: flex-start !important;
    scrollbar-width: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
}

html body.linghui-page #categoryRow.scroll-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html body.linghui-page #categoryRow .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: none !important;
    min-height: 40px !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
    justify-content: center !important;
    position: relative !important;
}

html body.linghui-page #ratioRow.scroll-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: unset !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px 2px !important;
    margin: 0 -2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    overscroll-behavior-x: contain !important;
}

html body.linghui-page #ratioRow.scroll-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html body.linghui-page #ratioRow .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 999px !important;
}

html body.linghui-page .main-content > .detail-tabs:first-child,
html body.detail-page .main-content > .detail-tabs:first-child {
    margin-top: 2px;
}

html body.linghui-page .section-title .section-hint-swipe {
    display: none !important;
}

html body.detail-page .section-card .chip-btn,
html body.linghui-page .section-card .chip-btn {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    border-radius: 14px !important;
    line-height: 1.25 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    position: relative !important;
}

/* 图生万物：比例行、分类行胶囊横滑（压过上行 width:100%） */
html body.linghui-page #categoryRow .chip-btn,
html body.linghui-page #ratioRow .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: none !important;
    white-space: nowrap !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
}

html body.detail-page #platformRow .chip-btn,
html body.detail-page #qualityRow .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 999px !important;
}

html body.detail-page .section-card .chip-btn .chip-code,
html body.linghui-page .section-card .chip-btn .chip-code {
    display: inline;
    margin-right: 3px !important;
}

/* 爆款详情图：同行风 — 选中橙底白字，未选白底灰字 */
html body.detail-page .section-card .chip-btn:not(.active) {
    background: #ffffff !important;
    border: 1px solid #e7e5e4 !important;
    color: #57534e !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html body.detail-page .section-card .chip-btn.active {
    background: #e4e4e7 !important;
    border: 1px solid #52525b !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

html body.detail-page .section-card .chip-btn.active::after {
    display: none !important;
    content: none !important;
}

html body.detail-page {
    background: var(--h5-canvas, #eff4f2) !important;
    background-image: none !important;
}

html body.detail-page .section-card .chip-btn .chip-code {
    opacity: 0.95 !important;
}

html body.detail-page .section-card .chip-btn.active .chip-code {
    color: #0a0a0a !important;
    opacity: 1 !important;
}

/* 主按钮：纯深色（无渐变）；生成中态保留页内 .is-generating 样式 */
html body.detail-page .submit-btn:not(:disabled):not(.is-generating) {
    background: #18181b !important;
    box-shadow: none !important;
    border-radius: 999px !important;
}

html body.ecom-page .submit-btn:not(:disabled) {
    background: #18181b !important;
    box-shadow: none !important;
}

/* 图生万物：蓝系选中（与详情橙区分开） */
html body.linghui-page .section-card .chip-btn:not(.active) {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

html body.linghui-page .section-card .chip-btn.active {
    background: rgba(26, 42, 51, 0.14) !important;
    border: 1px solid rgba(26, 42, 51, 0.45) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(26, 42, 51, 0.12) !important;
}

html body.linghui-page .section-card .chip-btn.active::after {
    display: none !important;
    content: none !important;
}

/* ── 电商详情图：比例/清晰度单行横滑 + 胶囊（对齐同行右图）── */
html body.ecom-page .scroll-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px 2px !important;
    margin: 0 -2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    overscroll-behavior-x: contain !important;
}

html body.ecom-page .scroll-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html body.ecom-page .section-title .section-hint-swipe {
    display: none !important;
}

html body.ecom-page .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* 有界面主题时勿铺极简白底，否则压过专页 brand-ui / --bg-page（电商详情图比例·清晰度等） */
html:not([data-h5-skin]) body.ecom-page .chip-btn:not(.active) {
    background: #ffffff !important;
    border: 1px solid #e7e5e4 !important;
    color: #57534e !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html:not([data-h5-skin]) body.ecom-page .chip-btn.active {
    background: rgba(26, 42, 51, 0.14) !important;
    border: 1px solid rgba(26, 42, 51, 0.45) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(26, 42, 51, 0.12) !important;
}

html body.ecom-page .chip-btn.active::after {
    display: none !important;
    content: none !important;
}

/* 仅默认壳：有界面主题时不铺 var(--h5-canvas)，交给 h5-skin-themes */
html:not([data-h5-skin]) body.ecom-page {
    background: var(--h5-canvas, #eff4f2) !important;
    background-image: none !important;
}

/* 透出整页暖色底（避免页内灰底盖住 body 渐变） */
html body.ecom-page .app-container,
html body.ecom-page .ecom-inset {
    background: transparent !important;
}

/* 勿并用 #mainContent：ID 特异性会盖过 h5-skin-themes 里仅含 .main-content 的主题底规则，导致主滚动区仍透出冷灰壳 */
html body.ecom-page .main-content {
    background: transparent !important;
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) !important;
}

html body.ecom-page .section-card {
    margin-bottom: 12px !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05) !important;
}

html body.ecom-page .section-title {
    gap: 8px !important;
    align-items: center !important;
}

/* 创作/历史 Tab：样式由 h5-songyun-tool-shell.css 全站统一（中性灰 pill 选中） */

html body.ecom-page .submit-hint {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #475569 !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    padding: 0 4px !important;
}

/* 详情 / 图生万物：主区底留白（详情略加大，避免底栏裁切感） */
html body.detail-page .main-content {
    padding-bottom: max(40px, calc(env(safe-area-inset-bottom, 0px) + 28px)) !important;
}

html body.linghui-page .main-content {
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) !important;
}

/* 区块标题与卡片间距略收紧，层次更清楚 */
html body.detail-page .section-card,
html body.linghui-page .section-card {
    margin-bottom: 12px !important;
}

html body.detail-page .section-title,
html body.linghui-page .section-title {
    gap: 8px !important;
    align-items: center !important;
}

/* ── 图生万物：分类单行横滑（多分类时不换行挤占版面）── */
html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding: 4px 0 8px !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    scrollbar-width: none;
}

html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll::-webkit-scrollbar {
    display: none;
}

html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll .chip-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 76px !important;
    min-height: 40px !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
    justify-content: center !important;
    position: relative !important;
}

html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll .chip-btn:not(.active) {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll .chip-btn.active {
    background: rgba(26, 42, 51, 0.14) !important;
    border: 1px solid rgba(26, 42, 51, 0.45) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(26, 42, 51, 0.12) !important;
}

html body.linghui-page .scroll-row--linghui-category.linghui-category-scroll .chip-btn.active::after {
    display: none !important;
    content: none !important;
}

/* ── AI 视频快创：顶栏提示改琥珀条 + 底部脚注可读 ── */
html body.page-nova-video .nova-flow-hint {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    margin: 0 0 14px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(59, 130, 246, 0.22) !important;
    background: rgba(239, 246, 255, 0.92) !important;
    box-shadow: none !important;
}

html body.page-nova-video .nova-flow-hint__ico {
    color: #1a2a33 !important;
    flex-shrink: 0 !important;
}

html body.page-nova-video .nova-flow-hint span:last-child {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #1e3a8a !important;
    letter-spacing: -0.02em !important;
}

html body.page-nova-video .nova-ratio-row {
    gap: 10px !important;
}

html body.page-nova-video .nova-ratio-btn {
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
}

html body.page-nova-video .nova-foot,
html body.page-nova-video .nova-foot--muted {
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: #475569 !important;
}

html body.page-nova-video .nova-foot--muted {
    color: #64748b !important;
    margin-top: 6px !important;
}

html body.page-nova-video .main-content {
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) + 24px)) !important;
}

/* ── 无痕提取：底说明对比度 ── */
html body.watermark-tool-page .wm-platform-note {
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: #475569 !important;
    margin-top: 14px !important;
}

html body.watermark-tool-page .wm-fold {
    background: rgba(248, 250, 252, 0.95) !important;
}

html body.watermark-tool-page .main-content {
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) + 24px)) !important;
}

/* ── AI 视频提示词：叙事模板等胶囊三列 ── */
html body.page-ai-video-prompt .avp-presets {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

html body.page-ai-video-prompt .avp-chip {
    width: 100% !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 13px !important;
    padding: 10px 8px !important;
    border-radius: 12px !important;
}

html body.page-ai-video-prompt .main-content {
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) !important;
}

/* ── 自媒体工作台：三卡略放大触控与字阶 ── */
html body.page-creator-studio .studio-trio {
    gap: 10px !important;
}

html body.page-creator-studio .studio-card {
    border-radius: 16px !important;
    padding: 16px 12px 14px !important;
    min-height: 118px !important;
}

html body.page-creator-studio .studio-card-title {
    font-size: 15px !important;
    font-weight: 750 !important;
    letter-spacing: -0.02em !important;
}

html body.page-creator-studio .studio-card-desc {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: #64748b !important;
}

html body.page-creator-studio .main-content {
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) !important;
}

/* ── 获客外链：主区底留白（表单长页）── */
html body.hk-page .hk-pro-main,
html body.hk-page .main-content {
    padding-bottom: max(36px, calc(env(safe-area-inset-bottom, 0px) + 28px)) !important;
}

html body.hk-page .hk-hint {
    font-size: 13px !important;
    line-height: 1.58 !important;
    color: #475569 !important;
}

/* ════════════════════════════════════════════════════════════════════════════
 * 极简扁平风格（全局默认）
 * 白底、浅灰背景、黑色文字、灰色细边框、无阴影无渐变、选中时深色边框
 * 用户在「我的 → 界面主题」选择后：html 带 data-h5-skin，本段颜色类规则不生效，
 * 由 h5-skin-themes.css / 专页 brand-ui 与 --bg-page、--as-blue 等接管。
 * ════════════════════════════════════════════════════════════════════════════ */

/* —— 全局 CSS 变量（默认极简黑白灰，跟随主题时用 --as-blue / --as-primary）—— */
html:not([data-h5-skin]) {
    --as-blue: #333333 !important;
    --as-primary: #1A1A1A !important;
    --as-page-bg: #F7F8FA !important;
    --h5-canvas: #F7F8FA !important;
    --lh-bg: #F7F8FA !important;
    --bg-page: #F7F8FA !important;
    --tool-brand: #333333 !important;
    --tool-brand-rgb: 51, 51, 51 !important;
    --tool-brand-soft: rgba(51, 51, 51, 0.08) !important;
    --tool-brand-border: rgba(51, 51, 51, 0.25) !important;
    --tool-brand-ring: rgba(51, 51, 51, 0.15) !important;
}

/* —— 页面背景：浅灰（仅未选界面主题；有主题时由 h5-skin-themes / 专页接管）—— */
html:not([data-h5-skin]) body.detail-page,
html:not([data-h5-skin]) body.linghui-page,
html:not([data-h5-skin]) body.ecom-page,
html:not([data-h5-skin]) body.page-nova-video,
html:not([data-h5-skin]) body.page-ai-video-prompt,
html:not([data-h5-skin]) body.page-creator-studio,
html:not([data-h5-skin]) body.watermark-tool-page,
html:not([data-h5-skin]) body.hk-page,
html:not([data-h5-skin]) body.hec-page,
html:not([data-h5-skin]) body.paint-studio-page,
html:not([data-h5-skin]) body.tool-page {
    background: var(--h5-canvas, #F7F8FA) !important;
    background-image: none !important;
}

/* —— 导航栏：白底（仅无主题）—— */
html:not([data-h5-skin]) body .nav-header {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E5E5 !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .nav-title {
    font-weight: 600 !important;
    color: #1A1A1A !important;
}

/* —— 卡片：白底（仅无主题）—— */
html:not([data-h5-skin]) body .section-card,
html:not([data-h5-skin]) body .ps-card,
html:not([data-h5-skin]) body .nova-card,
html:not([data-h5-skin]) body .ecom-card,
html:not([data-h5-skin]) body .upload-card,
html:not([data-h5-skin]) body .eed-card,
html:not([data-h5-skin]) body .vrp-card,
html:not([data-h5-skin]) body .hec-hist-card,
html:not([data-h5-skin]) body .lh-script-card,
html:not([data-h5-skin]) body .lh-expert-card,
html:not([data-h5-skin]) body .studio-card,
html:not([data-h5-skin]) body .piv-card,
html:not([data-h5-skin]) body .card {
    background: #FFFFFF !important;
    border-radius: 14px !important;
    border: none !important;
    box-shadow: none !important;
}

/* —— 区块标题：黑色文字（仅无主题）—— */
html:not([data-h5-skin]) body .section-title,
html:not([data-h5-skin]) body .ps-section-title,
html:not([data-h5-skin]) body .kuajing-section-title,
html:not([data-h5-skin]) body .hec-step-title,
html:not([data-h5-skin]) body .studio-card-title,
html:not([data-h5-skin]) body .nova-card-title,
html:not([data-h5-skin]) body .ps-section-heading__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1A1A1A !important;
}

html:not([data-h5-skin]) body .section-title .hint,
html:not([data-h5-skin]) body .ps-hint {
    font-size: 12px !important;
    color: #999999 !important;
    font-weight: 500 !important;
}

/* —— 选项按钮（chip-btn）：极简（仅无主题）—— */
html:not([data-h5-skin]) body .chip-btn:not(.active),
html:not([data-h5-skin]) body .ratio-btn:not(.active),
html:not([data-h5-skin]) body .nova-ratio-btn:not(.active),
html:not([data-h5-skin]) body .quality-btn:not(.active),
html:not([data-h5-skin]) body .eed-chip:not(.active),
html:not([data-h5-skin]) body .es-chip:not(.active),
html:not([data-h5-skin]) body .kuajing-lang-chip:not(.active),
html:not([data-h5-skin]) body .lh-ai-chip:not(.active),
html:not([data-h5-skin]) body .pm-chip:not(.active),
html:not([data-h5-skin]) body .kuajing-chip:not(.active),
html:not([data-h5-skin]) body .nova-mode-btn:not(.active) {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    color: #666666 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .chip-btn.active,
html:not([data-h5-skin]) body .ratio-btn.active,
html:not([data-h5-skin]) body .nova-ratio-btn.active,
html:not([data-h5-skin]) body .quality-btn.active,
html:not([data-h5-skin]) body .eed-chip.active,
html:not([data-h5-skin]) body .es-chip.active,
html:not([data-h5-skin]) body .kuajing-lang-chip.active,
html:not([data-h5-skin]) body .lh-ai-chip.active,
html:not([data-h5-skin]) body .pm-chip.active,
html:not([data-h5-skin]) body .kuajing-chip.active,
html:not([data-h5-skin]) body .nova-mode-btn.active {
    background: #e4e4e7 !important;
    border: 1px solid #52525b !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .chip-btn.active::after,
html:not([data-h5-skin]) body .ratio-btn.active::after {
    display: none !important;
    content: none !important;
}

/* —— Tab 切换：极简（仅无主题）—— */
html:not([data-h5-skin]) body .detail-tabs,
html:not([data-h5-skin]) body .ps-main-tabs,
html:not([data-h5-skin]) body .ecom-tabs,
html:not([data-h5-skin]) body .nova-tabs {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E5E5 !important;
    padding: 12px 14px 10px !important;
    gap: 8px !important;
}

html:not([data-h5-skin]) body .detail-tab,
html:not([data-h5-skin]) body .ps-tab,
html:not([data-h5-skin]) body .ecom-tab,
html:not([data-h5-skin]) body .nova-tab {
    background: #F5F5F5 !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    color: #666666 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .detail-tab.active,
html:not([data-h5-skin]) body .ps-tab.active,
html:not([data-h5-skin]) body .ecom-tab.active,
html:not([data-h5-skin]) body .nova-tab.active {
    background: #e4e4e7 !important;
    border: 1px solid #52525b !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

/* —— 上传区（仅无主题）—— */
html:not([data-h5-skin]) body .upload-zone,
html:not([data-h5-skin]) body .upload-area,
html:not([data-h5-skin]) body .ps-upload-shell,
html:not([data-h5-skin]) body .upload-box {
    background: #FAFAFA !important;
    border: 1.5px dashed #D0D5DD !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .upload-icon,
html:not([data-h5-skin]) body .upload-icon-wrap,
html:not([data-h5-skin]) body .ps-upload-ico {
    color: #CCCCCC !important;
}

html:not([data-h5-skin]) body .upload-text,
html:not([data-h5-skin]) body .ps-upload-lead {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666666 !important;
}

html:not([data-h5-skin]) body .upload-desc,
html:not([data-h5-skin]) body .ps-upload-sub {
    font-size: 12px !important;
    color: #999999 !important;
}

/* —— 输入框（仅无主题；有主题时勿盖 textarea 专页色）—— */
html:not([data-h5-skin]) body textarea,
html:not([data-h5-skin]) body .ps-textarea,
html:not([data-h5-skin]) body input[type="text"],
html:not([data-h5-skin]) body input[type="number"] {
    background: #FAFAFA !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px !important;
    color: #1A1A1A !important;
    font-size: 15px !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body textarea:focus,
html:not([data-h5-skin]) body .ps-textarea:focus,
html:not([data-h5-skin]) body input[type="text"]:focus,
html:not([data-h5-skin]) body input[type="number"]:focus {
    border-color: var(--as-blue, #333333) !important;
    outline: none !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body textarea::placeholder,
html:not([data-h5-skin]) body input::placeholder {
    color: #BBBBBB !important;
}

/* —— 主按钮（仅无主题时强制极简；有主题时由 h5-skin-themes / 专页）—— */
html:not([data-h5-skin]) body .submit-btn:not(:disabled),
html:not([data-h5-skin]) body .ps-submit-btn:not(:disabled),
html:not([data-h5-skin]) body .action-btn.primary:not(:disabled),
html:not([data-h5-skin]) body .linghui-submit-btn:not(:disabled) {
    background: #18181b !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .submit-btn:disabled,
html:not([data-h5-skin]) body .ps-submit-btn:disabled,
html:not([data-h5-skin]) body .linghui-submit-btn:disabled {
    background: #E0E0E0 !important;
    color: #BDBDBD !important;
    box-shadow: none !important;
}

/* —— 次要按钮（仅无主题）—— */
html:not([data-h5-skin]) body .action-btn:not(.primary),
html:not([data-h5-skin]) body .ps-btn-ghost,
html:not([data-h5-skin]) body .reselect-btn {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    color: #666666 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* —— 提示文字（仅无主题）—— */
html:not([data-h5-skin]) body .hint,
html:not([data-h5-skin]) body .tips,
html:not([data-h5-skin]) body .note,
html:not([data-h5-skin]) body .ps-foot-note,
html:not([data-h5-skin]) body .submit-hint {
    font-size: 13px !important;
    color: #999999 !important;
    line-height: 1.6 !important;
}

/* —— 链接：跟随主题色 —— */
html body a:not(.nav-back):not(.detail-tab):not(.chip-btn) {
    color: var(--as-blue, #333333) !important;
}

/* —— 步骤指示器（仅无主题）—— */
html:not([data-h5-skin]) body .detail-wizard-track,
html:not([data-h5-skin]) body .hec-step-track {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E5E5 !important;
}

html:not([data-h5-skin]) body .detail-wiz-num,
html:not([data-h5-skin]) body .hec-step-num {
    background: #18181b !important;
    color: #FFFFFF !important;
}

html:not([data-h5-skin]) body .detail-wiz-line,
html:not([data-h5-skin]) body .hec-step-line {
    background: #E5E5E5 !important;
}

/* —— 标签徽章（仅无主题）—— */
html:not([data-h5-skin]) body .badge,
html:not([data-h5-skin]) body .tag,
html:not([data-h5-skin]) body .label {
    background: #F5F5F5 !important;
    color: #666666 !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

/* —— 历史列表卡片（仅无主题）—— */
html:not([data-h5-skin]) body .history-card,
html:not([data-h5-skin]) body .task-card,
html:not([data-h5-skin]) body .ps-task-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* —— 分隔线（仅无主题）—— */
html:not([data-h5-skin]) body hr,
html:not([data-h5-skin]) body .divider {
    border-color: #E5E5E5 !important;
    background: #E5E5E5 !important;
}

/* —— 滚动条：隐藏（保持简洁）—— */
html body .scroll-row::-webkit-scrollbar,
html body .chip-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* —— 工具介绍区（仅无主题）—— */
html:not([data-h5-skin]) body .tool-intro,
html:not([data-h5-skin]) body .lh-tool-intro {
    background: #FFFFFF !important;
    border: none !important;
    box-shadow: none !important;
}

html:not([data-h5-skin]) body .tool-intro-title {
    color: #1A1A1A !important;
    font-weight: 700 !important;
}

html:not([data-h5-skin]) body .tool-intro-desc {
    color: #666666 !important;
}

/* ════════════════════════════════════════════════════════════════════════════
 * 产品图视频、图生视频 - 强制极简扁平风格覆盖
 * ════════════════════════════════════════════════════════════════════════════ */

/* 页面背景 */
html body.page-piv,
html body.page-i2v {
    background: #F7F8FA !important;
}

html body.page-piv .main-content,
html body.page-i2v .main-content {
    background: #F7F8FA !important;
    background-image: none !important;
}

/* 顶部 Tab */
html body.page-piv .piv-tabs-top,
html body.page-piv .piv-tab-top,
html body.page-i2v .i2v-main-tabs,
html body.page-i2v .i2v-tab {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    box-shadow: none !important;
}

html body.page-piv .piv-tab-top.is-on,
html body.page-i2v .i2v-tab.is-active {
    background: #FFFFFF !important;
    border: 2px solid var(--as-blue, #333333) !important;
    color: var(--as-primary, #1A1A1A) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

html body.page-piv .piv-tab-top:not(.is-on),
html body.page-i2v .i2v-tab:not(.is-active) {
    background: #F5F5F5 !important;
    border: 1px solid transparent !important;
    color: #666666 !important;
}

/* 卡片 */
html body.page-piv .piv-card,
html body.page-piv .piv-strip,
html body.page-piv .piv-preset-bar,
html body.page-i2v .i2v-card,
html body.page-i2v .i2v-section {
    background: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* 上传区域 */
html body.page-piv .piv-drop,
html body.page-i2v .i2v-upload-zone {
    background: #FAFAFA !important;
    border: 1.5px dashed #D0D5DD !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

html body.page-piv .piv-drop-plus,
html body.page-i2v .i2v-upload-icon {
    color: #CCCCCC !important;
    background: none !important;
}

html body.page-piv .piv-drop.has-img,
html body.page-i2v .i2v-upload-zone.has-img {
    border-style: solid !important;
    border-color: var(--as-blue, #333333) !important;
}

/* 选项按钮 */
html body.page-piv .piv-chip:not(.is-on),
html body.page-piv .piv-preset-item:not(.is-sel),
html body.page-i2v .i2v-option-btn:not(.active) {
    background: #FFFFFF !important;
    border: 1px solid #E5E5E5 !important;
    color: #666666 !important;
    box-shadow: none !important;
}

html body.page-piv .piv-chip.is-on,
html body.page-piv .piv-preset-item.is-sel,
html body.page-i2v .i2v-option-btn.active {
    background: #e4e4e7 !important;
    border: 1px solid #52525b !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

/* 提交按钮：纯深色 */
html body.page-piv .piv-submit-btn:not(:disabled),
html body.page-piv .piv-dock-go:not(:disabled),
html body.page-i2v .i2v-submit-btn:not(:disabled) {
    background: #18181b !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 14px !important;
}

/* 卡片标题 */
html body.page-piv .piv-card-title,
html body.page-piv .piv-preset-head span,
html body.page-i2v .i2v-section-title {
    color: #1A1A1A !important;
    font-weight: 700 !important;
}

/* 辅助文字 */
html body.page-piv .piv-drop-hint,
html body.page-piv .piv-preset-head i,
html body.page-i2v .i2v-hint {
    color: #999999 !important;
}

/* 徽章 */
html body.page-piv .piv-badge,
html body.page-i2v .i2v-badge {
    background: #F5F5F5 !important;
    color: #666666 !important;
    border: 1px solid #E5E5E5 !important;
    box-shadow: none !important;
}

html body.page-piv .piv-badge[style*="background"],
html body.page-i2v .i2v-badge--required {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    border: 1px solid #FECACA !important;
}

/* 底部栏 */
html body.page-piv .piv-dock,
html body.page-i2v .i2v-bottom-bar {
    background: #FFFFFF !important;
    border-top: 1px solid #E5E5E5 !important;
    box-shadow: none !important;
}

/* ════════════════════════════════════════════════════════════════════════════
 * 字体大小统一规范（商业化专业标准）
 * 页面标题：20-24px | 区块标题：15-16px | 正文：14-15px | 辅助：12-13px
 * ════════════════════════════════════════════════════════════════════════════ */

/* —— 页面标题：20px（导航栏标题）—— */
html body .nav-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

/* —— 区块标题：15px —— */
html body .section-title,
html body .ps-section-title,
html body .card-title,
html body .panel-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em !important;
}

/* —— 正文/选项文字：14px —— */
html body .chip-btn,
html body .ratio-btn,
html body .quality-btn,
html body .ps-tag,
html body .ps-cat-chip,
html body .nova-ratio-btn,
html body .option-btn {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* —— Tab 文字：14px —— */
html body .detail-tab,
html body .ps-tab,
html body .ecom-tab,
html body .nova-tab {
    font-size: 14px !important;
    font-weight: 500 !important;
}

html body .detail-tab.active,
html body .ps-tab.active,
html body .ecom-tab.active,
html body .nova-tab.active {
    font-weight: 600 !important;
}

/* —— 输入框：15px —— */
html body textarea,
html body input[type="text"],
html body input[type="number"],
html body .ps-textarea,
html body .form-input {
    font-size: 15px !important;
    line-height: 1.5 !important;
}

html body textarea::placeholder,
html body input::placeholder {
    font-size: 14px !important;
}

/* —— 按钮文字：15-16px —— */
html body .submit-btn,
html body .ps-submit-btn,
html body .action-btn.primary,
html body .linghui-submit-btn {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}

/* —— 辅助/提示文字：12-13px —— */
html body .hint,
html body .tips,
html body .note,
html body .ps-hint,
html body .ps-foot-note,
html body .submit-hint,
html body .form-hint,
html body .upload-desc,
html body .ps-upload-sub {
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* —— 上传区主文字：14px —— */
html body .upload-text,
html body .ps-upload-lead {
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* —— 徽章/标签：11-12px —— */
html body .badge,
html body .tag,
html body .label,
html body .ps-task-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

/* —— 历史卡片文字 —— */
html body .task-card .task-title,
html body .ps-task-card .ps-task-note {
    font-size: 13px !important;
    line-height: 1.45 !important;
}

html body .task-card .task-time,
html body .ps-task-card .ps-task-time {
    font-size: 12px !important;
    color: #999999 !important;
}

/* —— 工具介绍区 —— */
html body .tool-intro-title,
html body .lh-tool-intro-title {
    font-size: 16px !important;
    font-weight: 700 !important;
}

html body .tool-intro-desc,
html body .lh-tool-intro-desc {
    font-size: 13px !important;
    line-height: 1.55 !important;
}

/* —— 步骤指示器文字 —— */
html body .detail-wiz-num,
html body .hec-step-num {
    font-size: 12px !important;
    font-weight: 800 !important;
}

html body .detail-wiz-t,
html body .hec-step-title {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Appended: 比例选中灰胶囊（与 Tab active 一致） */
html body .hec-ratio-pill.is-on {
    background: #e4e4e7 !important;
    border-color: #52525b !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

/* ════════════════════════════════════════════════════════════════════════════
 * 桌面端工具尺寸统一
 * 手机端由屏幕宽度自然收缩；桌面端统一内容宽度、间距和控件高度，
 * 避免同一工具架下出现 520 / 640 / 840 / 1180px 多套尺寸。
 * ════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    html body.detail-page,
    html body.ecom-page,
    html body.product-max-page,
    html body.page-nova-video,
    html body.page-nova-outfit-studio,
    html body.vrp-page,
    html body.arv-page,
    html body.watermark-tool-page,
    html body.page-creator-studio,
    html body.tool-page {
        --h5-tool-desktop-max: 840px;
        --h5-tool-desktop-gutter: 24px;
    }

    html body.detail-page .app-container,
    html body.ecom-page .app-container,
    html body.product-max-page .app-container,
    html body.page-nova-video .app-container,
    html body.page-nova-outfit-studio .app-container,
    html body.vrp-page .app-container,
    html body.arv-page .app-container,
    html body.watermark-tool-page .app-container,
    html body.page-creator-studio .app-container,
    html body.tool-page .app-container {
        width: min(100%, var(--h5-tool-desktop-max)) !important;
        max-width: var(--h5-tool-desktop-max) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    html body.detail-page .main-content,
    html body.ecom-page .main-content,
    html body.product-max-page .pm-main,
    html body.page-nova-video .main-content,
    html body.page-nova-outfit-studio .main-content,
    html body.vrp-page .main-content,
    html body.arv-page .main-content,
    html body.watermark-tool-page .main-content,
    html body.page-creator-studio .main-content,
    html body.tool-page .main-content {
        width: 100% !important;
        max-width: var(--h5-tool-desktop-max) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: var(--h5-tool-desktop-gutter) !important;
        padding-right: var(--h5-tool-desktop-gutter) !important;
        box-sizing: border-box !important;
    }

    html body.detail-page .section-card,
    html body.ecom-page .section-card,
    html body.product-max-page .pm-section,
    html body.page-nova-video .nova-card,
    html body.page-nova-outfit-studio .i2v-card,
    html body.vrp-page .vrp-card,
    html body.arv-page .arv-panel,
    html body.watermark-tool-page .form-card,
    html body.page-creator-studio .studio-panel,
    html body.tool-page .card {
        margin-bottom: 12px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
    }

    html body.detail-page .section-card,
    html body.ecom-page .section-card,
    html body.product-max-page .pm-section,
    html body.page-nova-video .nova-card,
    html body.page-nova-outfit-studio .i2v-card,
    html body.vrp-page .vrp-card,
    html body.arv-page .arv-panel,
    html body.watermark-tool-page .form-card,
    html body.page-creator-studio .studio-panel,
    html body.tool-page .card {
        padding: 16px !important;
    }

    html body.detail-page .chip-btn,
    html body.ecom-page .chip-btn,
    html body.product-max-page .pm-chip,
    html body.product-max-page .pm-ratio-card,
    html body.product-max-page .pm-type-card,
    html body.page-nova-video .nova-ratio-btn,
    html body.vrp-page .vrp-chip,
    html body.arv-page .arv-option,
    html body.tool-page .choice,
    html body.tool-page .option-btn {
        min-height: 42px !important;
        box-sizing: border-box !important;
    }

    html body.detail-page textarea,
    html body.ecom-page textarea,
    html body.product-max-page .pm-ta,
    html body.vrp-page .vrp-url-input,
    html body.arv-page textarea,
    html body.tool-page textarea {
        min-height: 46px;
        box-sizing: border-box !important;
    }

    html body.detail-page .submit-btn,
    html body.ecom-page .submit-btn,
    html body.product-max-page .pm-submit,
    html body.page-nova-video .nova-cta,
    html body.page-nova-outfit-studio .i2v-cta,
    html body.vrp-page .vrp-primary,
    html body.arv-page .arv-submit,
    html body.watermark-tool-page .submit-btn,
    html body.tool-page .submit {
        min-height: 48px !important;
        box-sizing: border-box !important;
    }

    html body.page-nova-video .nova-preset-grid,
    html body.product-max-page .pm-type-grid,
    html body.tool-page .form-grid {
        gap: 12px !important;
    }
}

@media (min-width: 768px) {
    html body.detail-page .nav-header,
    html body.ecom-page .nav-header,
    html body.product-max-page .pm-nav,
    html body.page-nova-video .nav-header,
    html body.page-nova-outfit-studio .nav-header,
    html body.vrp-page .nav-header,
    html body.arv-page .nav-header,
    html body.watermark-tool-page .nav-header,
    html body.page-creator-studio .nav-header,
    html body.tool-page .nav-header,
    html body.eda-page .eda-nav {
        width: min(100%, var(--h5-tool-desktop-max, 840px)) !important;
        max-width: var(--h5-tool-desktop-max, 840px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    html body.detail-page .nav-header,
    html body.ecom-page .nav-header,
    html body.page-nova-video .nav-header,
    html body.page-nova-outfit-studio .nav-header,
    html body.vrp-page .nav-header,
    html body.arv-page .nav-header,
    html body.watermark-tool-page .nav-header,
    html body.page-creator-studio .nav-header,
    html body.tool-page .nav-header {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    html body.product-max-page .pm-nav {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (min-width: 1100px) {
    html body.detail-page .main-content,
    html body.ecom-page .main-content,
    html body.product-max-page .pm-main,
    html body.page-nova-video .main-content,
    html body.page-nova-outfit-studio .main-content,
    html body.vrp-page .main-content,
    html body.arv-page .main-content,
    html body.watermark-tool-page .main-content,
    html body.page-creator-studio .main-content,
    html body.tool-page .main-content {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}
