/**
 * 灵涵速推合伙人商学院 H5 - 统一样式
 * 所有功能页面共用此样式文件
 * 
 * 【重要】本文件已整合 Design System
 * 统一组件规范请参考 design-system.css
 */

/* design-system.css 由各页 head 内 _common_css_links.php 先于本文件并行加载，勿使用 @import 以免串行阻塞首屏 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /*
     * 全站画布：浅雾青灰（清新、与卡片白对比柔和）；主壳 index 内联渐变在此基础上叠光
     */
    --h5-canvas: #eff4f2;
    /* 统一深色 Logo 色系 */
    --h5-accent: #1a2a33;
    --h5-accent-bright: #1a2a33;
    --h5-accent-soft: rgba(26, 42, 51, 0.12);
    --h5-accent-ring: rgba(26, 42, 51, 0.35);

    /*
     * Logo深蓝风格：与品牌统一
     */
    --ink: #0f172a;
    --ink-soft: #334155;
    --accent-slate-900: #1a365d;
    --accent-slate-800: #152951;
    --accent-slate-750: #0f172a;

    /* 强调（按钮、选中、海报渐变） */
    --primary: #1a365d;
    --primary-light: #2d4a73;
    --primary-dark: #0f172a;
    --accent: #1a365d;
    --accent-light: #2d4a73;
    --accent-subtle: rgba(26, 54, 93, 0.08);

    /* 字与骨架 - 深色系 */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* 主容器 / 卡片：略冷白提升层次；次级区与画布同系 */
    --bg-primary: #fcfdfd;
    --bg-card: #fcfdfd;
    --bg-secondary: #e6eeeb;
    
    /* 边框和阴影：更轻、更漫射（高级感） */
    --border-light: rgba(15, 23, 42, 0.055);
    --border-medium: rgba(15, 23, 42, 0.09);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.045);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.05), 0 20px 40px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.07), 0 40px 64px rgba(15, 23, 42, 0.08);
    
    /* 状态色 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* ========================================
       统一间距系统 (8/12/16/24) - Design System
       ======================================== */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* 页面边距 - 统一 16px */
    --page-padding: 16px;
    
    /* 模块间距 - 统一 16px */
    --section-gap: 16px;
    
    /* 卡片间距 - 统一 12px */
    --card-gap: 12px;
    
    /* ========================================
       统一圆角 - 全部 16px
       ======================================== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 16px; /* 统一为 16px */
    
    /* 安全区域 */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* H5 手机视口宽度上限（与 .app-container 一致；宽屏居中、避免 PC 上整页横拉） */
    --h5-app-max-width: 640px;

    /*
     * 全页弧形浮卡（星空蓝紫风格）
     * 关闭：给 <body> 加 class="h5-no-page-sheet"
     */
    --h5-sheet-inset-x: 0;
    --h5-sheet-inset-y: 0;
    --h5-sheet-radius: 0;
    --h5-sheet-outer-bg: transparent;
    --h5-sheet-shadow: none;

    /* ========================================
       BannerCard 规范 - 紧凑布局
       边距更小，卡片占比更大
       ======================================== */
    --banner-aspect-ratio: 2.1 / 1;
    --banner-padding: 20px;
    
    /* ========================================
       FeatureCard 规范 - 固定高度
       ======================================== */
    --feature-card-height: 110px;
    --feature-card-padding: 12px;
    
    /* ========================================
       VipCard 规范 - 固定高度
       紧凑布局
       ======================================== */
    --vip-card-height: 160px;
    --vip-card-padding: 16px;

    /* 全站统一海报 / 主按钮渐变 · 星空蓝紫 */
    --page-hero-gradient: linear-gradient(145deg, #6080f0 0%, #5575e8 25%, #4a6ae0 50%, #4060d8 75%, #3855d0 100%);
    --gradient-emphasis-short: linear-gradient(145deg, #5575e8 0%, #4a6ae8 100%);

    /* 焦点环 */
    --focus-ring-ink: rgba(255, 255, 255, 0.2);
    --focus-ring-accent: rgba(100, 150, 255, 0.3);
    --page-hero-text: #ffffff;
    --page-hero-text-muted: rgba(255, 255, 255, 0.85);

    /* 字号阶梯（工具页标题/正文/说明；正文以 15px 为基准，角标不低于 11px） */
    --fs-nav-title: 16px;
    --fs-module-title: 15px;
    --fs-body: 15px;
    --fs-label: 13px;
    --fs-caption: 12px;
    --fs-meta: 11px;

    /* 选项 pill / 分段选中 - 玻璃风格 */
    --chip-bg: rgba(255, 255, 255, 0.12);
    --chip-border: rgba(255, 255, 255, 0.2);
    --chip-bg-on: rgba(255, 255, 255, 0.25);
    --chip-border-on: rgba(255, 255, 255, 0.4);
    --chip-ring-on: rgba(79, 70, 229, 0.12);

    /* 信息提示条（非红错、非成功绿） */
    --info-tint-bg: rgba(30, 45, 90, 0.07);
    --info-tint-border: rgba(51, 65, 120, 0.2);
    --info-tint-text: var(--primary-dark);
}

/* ========== 全站统一工作台宽度 ========== */
/* 除画布类页面主动覆盖外，手机、平板、电脑均使用同一 640px 壳层上限。 */
:root {
    --h5-app-max-width: 640px;
}

/* ========== 全站统一顶部海报 - BannerCard 规范 ========== */
/**
 * 【Design System 规范】
 * - 紧凑布局，边距更小，卡片占比更大
 * - 统一圆角 12px
 * - 统一 padding 20px
 */
.hero-card,
.agent-hero-card,
.hero-banner {
    width: 100%;
    aspect-ratio: 2.1 / 1;
    padding: var(--banner-padding);
    border-radius: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background: var(--page-hero-gradient);
    border: none;
    box-shadow: none;
}

/* 颗粒感噪点层 */
.hero-card .hero-noise,
.agent-hero-card .hero-noise,
.hero-banner .hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    z-index: 0;
}

/* 右上角光斑 */
.hero-card::before,
.agent-hero-card::before,
.hero-banner::before {
    content: '';
    position: absolute;
    top: -48%;
    right: -18%;
    width: min(300px, 78vw);
    height: min(300px, 78vw);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 68%);
    pointer-events: none;
    z-index: 1;
}

/* 左下角光斑 */
.hero-card::after,
.agent-hero-card::after,
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -38%;
    left: -12%;
    width: min(240px, 62vw);
    height: min(240px, 62vw);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.045) 0%, transparent 72%);
    pointer-events: none;
    z-index: 1;
}

/* 星星装饰 */
.hero-stars {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.15);
    z-index: 2;
    pointer-events: none;
}
.hero-stars::before {
    content: '✦';
    position: absolute;
    top: 0;
    right: 0;
    font-size: 20px;
    opacity: 0.6;
}
.hero-stars::after {
    content: '✦';
    position: absolute;
    top: 24px;
    right: 28px;
    font-size: 12px;
    opacity: 0.4;
}

.hero-card,
.agent-hero-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card {
    align-items: stretch;
    text-align: left;
}

.agent-hero-card {
    align-items: flex-start;
    text-align: left;
}

.hero-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content,
.agent-hero-content {
    position: relative;
    z-index: 2;
}

.hero-banner > * {
    position: relative;
    z-index: 1;
}

/* 徽章：半透明胶囊 + 霓虹绿点 */
.hero-badge,
.agent-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--page-hero-text);
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-badge .hero-badge-dot,
.agent-hero-badge .hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.65);
    flex-shrink: 0;
    animation: hero-badge-pulse 2.2s ease-in-out infinite;
}

@keyframes hero-badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.08); }
}

/* 标题 / 副标题：全站同一层级 */
.hero-title,
.agent-hero-title {
    font-size: clamp(1.125rem, 3.5vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--page-hero-text);
    margin: 0 0 8px 0;
}

.hero-subtitle,
.agent-hero-subtitle {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--page-hero-text-muted);
    margin: 0;
}

.hero-banner .hero-title {
    max-width: 22em;
}

.hero-banner .hero-subtitle {
    max-width: 24em;
}

/* 功能页顶部 emoji / 图标区 */
.hero-emoji {
    font-size: 2.125rem;
    line-height: 1;
    margin: 0 0 12px 0;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.2));
}

/* 首页海报主标题可略大（仍同一套比例） */
.hero-card .hero-title {
    font-size: clamp(1.2rem, 3.8vw, 1.5rem);
    margin-bottom: 10px;
}

.hero-card .hero-subtitle {
    margin-bottom: 0;
    max-width: 26em;
}

/* 首页 / 智能体子页共用：顶栏海报外框（与 index 创作 Tab 一致） */
.hero-section {
    padding: 8px 10px;
    padding-top: 10px;
}

/* 功能页 .main-content 有内边距时，与首页海报左右对齐 */
.main-content > .hero-section.hero-section--home-sync {
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-md)) var(--space-md);
    padding: 8px 10px;
    padding-top: 10px;
}

/* 爆款详情图页 main-content 使用较小 --page-padding */
.detail-page .main-content > .hero-section.hero-section--home-sync {
    margin-top: calc(-1 * var(--page-padding));
    margin-left: calc(-1 * var(--page-padding));
    margin-right: calc(-1 * var(--page-padding));
    margin-bottom: var(--section-gap, 12px);
}

.hero-card-decor {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    color: rgba(255, 255, 255, 0.35);
}

.hero-card-decor svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.12));
}

/* 后台配置的顶部图片海报（整卡可点跳转） */
.hero-card.hero-card--poster {
    padding: 0;
}

.hero-card.hero-card--poster::before,
.hero-card.hero-card--poster::after {
    display: none;
}

.hero-card.hero-card--poster .hero-card-decor {
    display: none;
}

.hero-poster-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-poster-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.hero-content.hero-content--on-poster {
    z-index: 2;
    padding: var(--banner-padding);
    width: 100%;
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    left: 0;
}

.hero-content.hero-content--pass-through {
    pointer-events: none;
}

.hero-card.hero-card--poster .hero-subtitle {
    margin-bottom: 0;
}

a.hero-poster-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    text-decoration: none;
}

/* ========== VipCard 规范 - 会员卡组件 ========== */
/**
 * 【Design System 规范】
 * - 固定高度 150px (唯一允许写死高度的卡片)
 * - 统一圆角 16px
 * - 统一 padding 16px
 */
.profile-card {
    width: 100%;
    height: var(--vip-card-height);
    border-radius: var(--radius-lg);
    padding: var(--vip-card-padding);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

html, body {
    height: 100%;
    overflow: hidden;
}

html {
    background: #4a6ae8;
    background-image:
        radial-gradient(ellipse 90% 90% at 5% 25%, rgba(255, 150, 200, 0.45) 0%, transparent 45%),
        radial-gradient(ellipse 60% 50% at 15% 15%, rgba(255, 200, 230, 0.35) 0%, transparent 40%),
        radial-gradient(ellipse 80% 70% at 95% 30%, rgba(100, 160, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 100% 80% at 50% 90%, rgba(80, 120, 220, 0.4) 0%, transparent 55%),
        linear-gradient(145deg, #6080f0 0%, #5575e8 25%, #4a6ae0 50%, #4060d8 75%, #3855d0 100%);
    background-attachment: fixed;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: transparent;
    color: #ffffff;
    line-height: 1.55;
    font-size: var(--fs-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    padding: var(--safe-top) 0 var(--safe-bottom);
}

/* 全页颗粒纹理层（轻量版） */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.25;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* 星光点缀层 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(2.5px 2.5px at 75% 20%, rgba(200, 220, 255, 0.7) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40% 65%, rgba(255, 255, 255, 0.6) 50%, transparent 100%),
        radial-gradient(3px 3px at 85% 55%, rgba(180, 210, 255, 0.65) 50%, transparent 100%),
        radial-gradient(2px 2px at 15% 80%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    background-size: 100% 100%;
    opacity: 0.6;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* 不需要弧形浮卡的全屏页 */
body.h5-no-page-sheet {
    background: transparent;
    padding: 0;
}

body.h5-no-page-sheet .app-container {
    border-radius: 0;
    box-shadow: none;
}

/* 主容器 - 与 --h5-app-max-width 同宽居中（手机 430 / 平板 540 / 电脑 640） */
.app-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--h5-app-max-width, 430px);
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    box-sizing: border-box;
}

@media (min-width: 431px) {
    .app-container {
        box-shadow: var(--h5-sheet-shadow);
    }

    body.h5-no-page-sheet .app-container {
        box-shadow: none;
    }
}

/* 顶部导航 */
.nav-header {
    display: flex;
    align-items: center;
    padding: 12px var(--space-md);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 200;
}

.nav-back {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    position: relative;
    z-index: 2;
}

.nav-back:active {
    background: var(--bg-secondary);
}

.nav-title {
    flex: 1;
    text-align: center;
    font-size: var(--fs-nav-title);
    font-weight: 600;
    margin-right: 40px;
    letter-spacing: -0.3px;
    pointer-events: none;
}

/* 顶栏「灵涵速推合伙人商学院」品牌角标 — 与各子页 nav-title 内 h5_nav_brand_mark() 配套 */
.nav-brand-mark {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #27272a;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 5px;
    vertical-align: middle;
    line-height: 1.35;
    white-space: nowrap;
}

/* 主内容区 */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-lg) var(--space-md);
    padding-bottom: calc(var(--space-lg) + var(--safe-bottom));
}

/* 提示卡片 */
.tips-card {
    background: var(--accent-subtle);
    border: 1px solid rgba(20, 21, 33, 0.12);
    border-radius: var(--radius-lg);
    padding: 14px var(--space-md);
    margin-bottom: var(--space-md);
}

.tips-text {
    font-size: var(--fs-label);
    color: var(--text-secondary);
    line-height: 1.6;
}

.tips-text strong {
    color: var(--accent);
}

/* 表单卡片 */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-module-title);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.form-title-icon {
    width: 32px;
    height: 32px;
    background: var(--page-hero-gradient, linear-gradient(135deg, var(--primary), var(--primary-light)));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 14px;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--fs-label);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-label .required {
    color: var(--danger);
}

/* 浅色卡片内可读（form-card 为白底；登录注册页用 body.page-auth 覆盖为深色输入框） */
.form-input,
.form-textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 2px solid rgba(15, 23, 42, 0.14);
    border-radius: var(--radius-md);
    font-size: var(--fs-body);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (max-width: 768px) {
    .main-content .form-input,
    .main-content .form-textarea {
        font-size: 16px; /* 移动端可读 + 减少 iOS 聚焦放大整页 */
    }
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

/* 选项按钮组 */
.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.option-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.option-btn {
    padding: 10px var(--space-sm);
    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;
    text-align: center;
    transition: all 0.2s;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-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;
}

/* 主按钮 - 深色（Logo 色系） */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--page-hero-gradient, linear-gradient(135deg, #1a2a33 0%, #0f172a 100%));
    color: var(--text-inverse);
    border: none;
    border-radius: 100px;
    font-size: var(--fs-module-title);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 结果区域 */
.result-section {
    display: none;
}

.result-section.show {
    display: block;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.result-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.result-title i,
.result-title svg {
    color: var(--accent);
}

/* 结果卡片 */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.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-content {
    padding: var(--space-md);
    font-size: var(--fs-body);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 列表项 */
.list-item {
    padding: 14px var(--space-md);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
    font-size: var(--fs-body);
    line-height: 1.6;
}

/* 操作按钮 */
.action-btn {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn.primary {
    background: linear-gradient(135deg, #1a2a33 0%, #0f172a 100%);
    color: #fff;
    border: none;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 标签 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--accent-subtle);
    border: 1px solid rgba(20, 21, 33, 0.16);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}

.tag-item:active {
    transform: scale(0.95);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: var(--space-md);
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.stat-num {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-num.danger { color: var(--danger); }
.stat-num.warning { color: var(--warning); }
.stat-num.success { color: var(--success); }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 问题项 */
.issue-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.issue-item:last-child {
    margin-bottom: 0;
}

.issue-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.issue-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.issue-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.issue-content {
    flex: 1;
}

.issue-word {
    font-weight: 600;
    color: var(--danger);
}

.issue-type {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
    gap: var(--space-md);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Toast提示（水平居中 + 文案居中，会员等长提示可换行） */
.toast {
    position: fixed;
    bottom: 100px;
    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(--primary);
    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;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

/* 图片网格 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-download {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 错误提示 */
.error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 12px var(--space-md);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: var(--space-md);
    display: none;
}

.error-msg.show {
    display: block;
}

/* 字符计数 */
.char-count {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.textarea-wrapper {
    position: relative;
}

/* 分组标题 */
.group-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 隐藏的文件输入：勿 display:none（Android/微信/摩托罗拉 无法唤起相册，须视觉隐藏） */
#fileInput,
input[type="file"].h5-file-input-accessible,
input[type="file"][hidden] {
    display: block !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.upload-zone,
.upload-box,
.upload-card,
.kuajing-upload-zone,
.ps-upload-shell,
.pm-upload-box {
    position: relative;
}

/* 上传区域 */
.upload-card {
    background: var(--bg-card);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 40px var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: var(--space-md);
}

.upload-card:active {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.upload-card.has-image {
    padding: var(--space-md);
    border-style: solid;
}

.upload-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--text-inverse);
    font-size: 24px;
}

.upload-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.upload-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* ========== H5 统一居中弹层（宽度与 app-container 一致感，避免宽屏下整页铺满） ========== */
.h5-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) 20px calc(16px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.h5-dialog-overlay.show {
    display: flex;
}

.h5-dialog-panel {
    width: 100%;
    max-width: min(400px, 100%);
    max-height: min(85vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
    animation: h5DialogIn 0.28s ease;
}

@keyframes h5DialogIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.h5-dialog-body-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
