/* ============================================================
   智蝶AI · 获客助手 —— v1.5「数字人」
   ------------------------------------------------------------
   谷总 2026-09-28：「应用 UI 要重新设计，建议背景加个数字人提升科技感」
               + 参考《AI智能赋能版本》课件把功能与版面升级。

   ★ 数字人这件事的取舍（写在这里，免得以后有人又塞一张人像图进来）
     【2026-09-28 定稿】谷总要求「数字人机器人形象（只放局部）」，
     所以现在分两层用法，各用各的：
       · **落地页 hero 右侧** → 真形象图（`static/img/dh-hero-*.webp`，53KB），
         只出现在这一个地方，不做满屏背景、不进应用内；
       · **应用内氛围** → 矢量光轮廓（`_figure.html`，3.5KB），
         opacity 0.055 的水印，随主题变量变色。
     为什么应用内不用形象图：手机流量、人脸压字、AI 人像易塑料感。
     为什么形象图必须先过 `tools/prepare_hero_figure.py`：
        原图 1024x1536 PNG 是 1.8MB，处理后 WebP 53KB（压掉 97%）。
        回归里有断言卡住单张 ≤150KB，忘了压会直接报红。

   ⚠️ 本文件是**叠加层**：从模板摘掉 <link> 即可回退到 v1.4。
   ⚠️ 加载顺序必须在 style.css / theme-v13 / theme-v14 之后；
      落地页还要排在 landing.css 之后（本文件会改写 hero 布局）。
   ============================================================ */

:root {
    --dh-c1: #2DD4FF;
    --dh-c2: #8B5CF6;
    --dh-c3: #F472B6;
    --v15-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   1. 数字人光轮廓
   ============================================================ */

.dh-figure {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* 轮廓：分段描边（头 / 颈 / 肩各自独立，本身就有"数字化"的意味） */
.dh-outline>* {
    stroke-width: 1.2;
    opacity: 0.92;
}

.dh-outline .dh-neck {
    stroke-width: 1;
    opacity: 0.34;
}

/* 仪器刻度环：虚线，极淡，只作底层的"精密感" */
.dh-rings circle {
    stroke-width: 1;
    opacity: 0.2;
    stroke-dasharray: 2 9;
}

.dh-rings .dh-ring-out {
    opacity: 0.11;
    stroke-dasharray: 1 14;
}

.dh-nodes circle {
    fill: var(--dh-c1);
    opacity: 0.78;
}

.dh-readouts rect {
    opacity: 0.52;
}

.dh-wave rect {
    opacity: 0.55;
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: dhWave 1.9s var(--v15-ease) infinite;
}

.dh-wave rect:nth-child(2) {
    animation-delay: 0.16s;
}

.dh-wave rect:nth-child(3) {
    animation-delay: 0.32s;
}

.dh-wave rect:nth-child(4) {
    animation-delay: 0.48s;
}

.dh-wave rect:nth-child(5) {
    animation-delay: 0.64s;
}

@keyframes dhWave {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.3;
    }

    50% {
        transform: scaleY(1);
        opacity: 0.8;
    }
}

/* 扫描线：从头顶扫到脚下，7.5 秒一轮。节奏放慢才像"仪器"而不是"特效" */
.dh-scan {
    animation: dhScan 7.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes dhScan {
    0% {
        transform: translateY(26px);
        opacity: 0;
    }

    9% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(432px);
        opacity: 0;
    }
}

/* ============================================================
   2. Hero：左文案 / 右数字人
   ============================================================ */

.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 30px 40px;
    align-items: center;
    padding: 40px 0 30px;
    text-align: left;
}

.lp-hero-copy {
    min-width: 0;
}

/* 原本是居中布局，这里改成左对齐 —— 只覆盖对齐，不动字号 */
.lp-hero .lp-sub {
    margin: 0 0 26px;
    max-width: 30em;
}

.lp-hero .lp-cta,
.lp-hero .lp-proof {
    justify-content: flex-start;
}

.lp-hero .lp-badge {
    margin-bottom: 18px;
}

/* 演示对话横跨两列，保持在 hero 下方 */
.lp-demo {
    grid-column: 1 / -1;
    margin-top: 34px;
}

/* ---- 数字人与其环绕标签 ---- */

.lp-hero-fig {
    position: relative;
    min-width: 0;
    /* 光轮廓自己带光晕，这里只把它压到画面里合适的位置 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- 数字人形象图（只放 hero 局部；谷总 2026-09-28 定） ---- */

/* 图后面垫一层柔光：让"贴上去的图"看起来是从页面里长出来的。
   图自身的背景与页面底色只差 ~28/765，但那点差在渐变背景上仍会显出方块边，
   所以底边用遮罩淡出 —— 不靠"图的背景刚好对上"这种运气。 */
.dh-halo {
    position: absolute;
    top: 12%;
    left: 50%;
    width: min(86%, 400px);
    aspect-ratio: 1;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%,
            rgba(139, 92, 246, 0.22), rgba(45, 212, 255, 0.1) 46%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}

.dh-photo {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 360px);
    margin: 0 auto;
}

.dh-photo img {
    display: block;
    width: 100%;
    height: auto;
    /* ⚠️ 必须给 aspect-ratio 或写死 height：不给的话图片下载完成前高度是 0，
       会把右边的 hero 文案顶一下再落回去（CLS）。width/height 属性 + 这里双保险。 */
    aspect-ratio: 2 / 3;
    /* 底边淡入页面，消除方块边 */
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.35) 90%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.35) 90%, transparent 100%);
}

/* 矢量光轮廓版本（备选：把 landing.html 的 <picture> 换回 include '_figure.html'） */
.dh-hero {
    width: min(100%, 340px);
    margin: 0 auto;
}

.dh-tag {
    position: absolute;
    z-index: 2;
    padding: 5px 12px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    color: var(--text-muted);
    background: rgba(11, 16, 36, 0.74);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: dhFloat 6.5s ease-in-out infinite;
}

.dh-tag::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--dh-c1);
    vertical-align: 1px;
}

.dh-tag-tl {
    top: 8%;
    left: 0;
}

.dh-tag-tr {
    top: 15%;
    right: 0;
    animation-delay: 0.7s;
}

.dh-tag-ml {
    top: 40%;
    left: -4%;
    animation-delay: 1.3s;
}

.dh-tag-mr {
    top: 46%;
    right: -3%;
    animation-delay: 1.9s;
}

.dh-tag-bl {
    top: 68%;
    left: 2%;
    animation-delay: 2.4s;
}

.dh-tag-br {
    top: 74%;
    right: 2%;
    animation-delay: 3s;
}

@keyframes dhFloat {

    0%,
    100% {
        transform: translateY(-3px);
    }

    50% {
        transform: translateY(3px);
    }
}

/* ============================================================
   3. 效率对比（懂 AI vs 不懂 AI）
   ============================================================ */

.eff-block {
    padding: 46px 0 6px;
}

.eff-claim {
    max-width: 660px;
    margin: 0 auto 26px;
    text-align: center;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

.eff-claim b {
    color: var(--cyan);
    font-weight: 600;
}

.eff-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.eff-card {
    position: relative;
    padding: 18px 16px 16px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    overflow: hidden;
}

/* 顶部一道极细的进度暗示：从"慢"到"快" */
.eff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.eff-task {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.eff-times {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.eff-before {
    font-size: 15px;
    color: var(--text-dim);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(124, 139, 174, 0.7);
}

.eff-arrow {
    color: var(--dh-c2);
    font-size: 12px;
}

.eff-after {
    font-size: 19px;
    font-weight: 700;
    color: var(--cyan);
}

/* ============================================================
   4. AI 角色条：AI = 助理 + 文案 + 设计师 + …
   ============================================================ */

.role-block {
    margin-top: 30px;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(45, 212, 255, 0.07), rgba(139, 92, 246, 0.07) 55%, rgba(244, 114, 182, 0.06));
    border: 1px solid var(--line);
}

.role-head {
    font-size: 14.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-align: center;
}

.role-head b {
    color: var(--text);
    font-weight: 600;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.role-list li {
    padding: 5px 13px;
    font-size: 13px;
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
}

/* ============================================================
   5. 六大能力
   ============================================================ */

.ab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px 20px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.22s var(--v15-ease), transform 0.22s var(--v15-ease), background 0.22s var(--v15-ease);
}

.ab-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    background: var(--glass-hover);
}

/* 大编号：对齐课件的 01~06，销售可以直接照着讲 */
.ab-no {
    position: absolute;
    top: 14px;
    right: 18px;
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    color: rgba(255, 255, 255, 0.055);
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.ab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(45, 212, 255, 0.14), rgba(139, 92, 246, 0.14));
    border: 1px solid rgba(45, 212, 255, 0.24);
    box-shadow: inset 0 0 16px rgba(139, 92, 246, 0.24);
}

.ab-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}

.ab-tag {
    font-size: 13px;
    line-height: 1.6;
    color: var(--cyan);
    margin: 0 0 12px;
}

.ab-desc {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.ab-bullets {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 7px;
}

.ab-bullets li {
    position: relative;
    padding-left: 16px;
    font-size: 12.8px;
    line-height: 1.6;
    color: var(--text-2);
}

.ab-bullets li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--dh-c1);
    opacity: 0.7;
}

/* 诚实说明：功能还没完全到位时的一句话，必须在卡片上看得见 */
.ab-honest {
    margin: 0 0 12px;
    padding: 7px 11px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 9px;
}

/* CTA 沉到底部，让六张卡高度不齐时按钮仍对齐 */
.ab-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: auto;
}

.ab-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(45, 212, 255, 0.32);
    padding-bottom: 1px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.ab-cta-2 {
    color: var(--text-muted);
    border-bottom-color: var(--line-strong);
}

.ab-cta:hover {
    border-color: var(--cyan);
}

/* ============================================================
   6. 收益条（投入产出比）
   ============================================================ */

.roi-block {
    margin-top: 34px;
    padding: 26px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    background:
        radial-gradient(ellipse 60% 140% at 50% 0%, rgba(45, 212, 255, 0.1), transparent 70%),
        var(--glass);
    border: 1px solid var(--line);
}

.roi-eq {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.roi-eq .roi-in {
    font-family: var(--font-mono);
    color: var(--dh-c1);
}

.roi-eq .roi-out {
    background: var(--accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.roi-note {
    max-width: 540px;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text-muted);
}

/* ============================================================
   7. 三大趋势
   ============================================================ */

.tr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tr-card {
    padding: 22px 20px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.tr-no {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    font-size: 11.5px;
    letter-spacing: 0.6px;
    color: var(--dh-c2);
    background: var(--violet-soft);
    border: 1px solid rgba(139, 92, 246, 0.26);
    border-radius: 999px;
}

.tr-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}

.tr-desc {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.tr-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.tr-points li {
    position: relative;
    padding-left: 15px;
    font-size: 12.6px;
    line-height: 1.6;
    color: var(--text-2);
}

.tr-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--dh-c2);
    opacity: 0.8;
}

/* ============================================================
   8. 应用内氛围层（很淡的数字人水印）
   ------------------------------------------------------------
   只画在 body 直系子元素上（templates/_ambient.html）：
   一旦某个祖先带 backdrop-filter / transform，position:fixed
   会改以它为包含块，水印就会跑到内容里、挡住操作。
   ============================================================ */

/* ============================================================
   应用页首屏「瘦身」配套（2026-09-28，起因：「页面排版有点臃肿」）
   ------------------------------------------------------------
   对话页只有一个任务：**让人马上能说话**。所以核心指标就一条 ——
   `#messageInput` 在不在**首屏之内**。

   实测（改动前）：
     1280×900：输入框 bottom 917 > 视口 900，差 **17px**
     390×844 ：差 **347px**（要滚一屏才看见输入框）
     首屏被"装饰层"占掉 **91%**，首屏内有 **5 条**带边框的横条

   让路的四刀：
     ① 删掉页面标题区（154px）—— 品牌名顶栏已经在说
     ② 聊天区标题去掉「对话记录」（这一整页就是对话记录）
     ③ 标题行里罗列 5 个能力的长句 → 一句
     ④ 欢迎语的 6 条 bullet → 一行标签（下面还有快捷按钮和导航）

   验证：`tools/diagnose_layout.py` —— 会逐层打印占了多少、输入框差几 px。
   ⛔ 改对话页模板后请重跑它；这条指标是**可量化**的，不靠"感觉不挤了"。
   ============================================================ */

/* 视觉隐藏、保留给屏幕阅读器。
   ⚠️ 必须双写 class：style.css 里 `.container, .container * { position: relative }`
      的特异性是 (0,1,1)，单写 `.sr-only`(0,1,0) 会被它覆盖成 relative，
      元素就"藏不住"了。 */
.sr-only,
.sr-only.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;
}

/* 欢迎语里的能力清单：一行标签，替代原来的 6 条项目符号列表 */
.msg-abilities {
    margin: 8px 0;
    padding: 7px 11px;
    font-size: 0.92em;
    line-height: 1.65;
    letter-spacing: 0.2px;
    color: var(--cyan);
    background: rgba(45, 212, 255, 0.07);
    border: 1px solid rgba(45, 212, 255, 0.16);
    border-radius: 9px;
}

/* ============================================================
   管理员「看访客首页」入口（应用版首屏最上方）
   ------------------------------------------------------------
   为什么放这么显眼：`/` 对**登录用户**返回的是对话页，新版落地页只有
   访客能看见 ⇒ 管理员"改了但看不到"。谷总连着反馈了两次，
   光给 `?preview=1` 不够 —— 参数藏在地址栏里，人不会去记。
   ============================================================ */

.admin-peek {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    color: var(--text-2);
    background:
        linear-gradient(90deg, rgba(45, 212, 255, 0.12), rgba(139, 92, 246, 0.1)),
        var(--glass);
    border: 1px solid rgba(45, 212, 255, 0.3);
    border-radius: var(--radius);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.admin-peek:hover {
    border-color: rgba(45, 212, 255, 0.55);
}

.admin-peek-tag {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 11.5px;
    color: var(--cyan);
    background: rgba(45, 212, 255, 0.12);
    border-radius: 999px;
}

.admin-peek-text {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-peek-text b {
    color: var(--text);
}

.admin-peek-go {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--cyan);
    white-space: nowrap;
}

/* 手机上让说明文字独占一行，别把"看访客首页"挤没 */
@media (max-width: 520px) {
    .admin-peek {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .admin-peek-text {
        flex: 1 1 100%;
        order: 3;
    }

    .admin-peek-go {
        margin-left: auto;
    }
}

/* ============================================================
   背景层：数字人光轮廓（应用页）
   ------------------------------------------------------------
   ⚠️ 这里改过三轮，三轮的错法都不同，别再退回任何一版：
     ① 右下角小水印（48vw / opacity 0.055）—— **感知不到 = 没做**
     ② 右侧竖贯的完整版图形（580px / 1.81×）—— **放大后细节糊成灰网**（谷总："太模糊"）
     ③ 现在：竖贯的**简化版**图形（500px / 1.56×）+ 横向遮罩

   ★★ 「糊」是几何问题，不是画质问题（2026-09-28 实测）：
      完整版按 320 宽设计，铺到 580px 时——
        数据流纹理间距 → 屏上 12.7px；刻度环虚线 → 16.3px 的散点；
        主轮廓线宽 → 只有 2.17px。
      细线放大**不会变清晰，只会变成更粗的模糊线**，再叠 0.2 不透明度
      = 一片均匀的灰网。所以图形换成了 `fig_variant='ambient'`（见 _figure.html），
      CSS 这边把留下的线条加粗到屏上 ≥ 4px。

   ★ 横向遮罩解决的是"臃肿"的另一半：背景原本压进正文 352px，
     文字背后有东西，读起来累。用渐变遮罩让**靠左的一半淡出** ——
     这样它仍然是占满右侧的大背景（高度 ~78% 视口），
     但压在正文上的那部分自动隐形，不跟字抢。
   ============================================================ */

.dh-ambient {
    position: fixed;
    right: -6vw;
    top: 50%;
    transform: translateY(-50%);
    /* 从 580 收到 500：缩放比 1.81 → 1.56，线宽换来的清晰度比尺寸更值 */
    width: min(58vh, 500px);
    max-width: 56vw;
    /* ★★ 2026-09-28 第四轮。谷总：「不清楚还得调亮度」「对话页根本都没有显示」。
       两处改动，都在"让它确实看得见"这件事上：

       ① **删掉横向遮罩。** 原意是"压到正文的那半边淡出"，但它有两个代价：
          · 实测**吃掉 20% 亮度**（无遮罩 26 级 → 有遮罩 21 级）；
          · 遮罩用**纯黑**做"显示"端 —— 按 alpha 解释是显示，按 **luminance**
            解释是**全遮**。同一份 CSS 在两种模式下结果相反，
            本机 headless 是 alpha 模式（黑/白遮罩测出来一样），
            **但我无法确认访客浏览器是哪种** ⇒ 一旦是后者，就是"整块不见"，
            正好对应谷总说的"根本都没有显示"。这个风险不值得为 20% 亮度承担。
          背景与正文的对比度本来就只有 8~11%（正文白字 200+），
          它天生是"氛围"不是"干扰"，不需要靠遮罩解决重叠问题 ——
          改成把元素再往右推一点（right -4vw → -6vw）就够了。

       ② opacity 0.26 → **0.40**（手机 0.30）。他说"还得调亮度"。
          0.40 是"明显能看见轮廓"的量级；上限断言放宽到 0.5，
          同时新增一条反向断言：**压到正文上的那部分不能让正文变得难读**
          （由 diagnose_ambient_contrast.py 量）。 */
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    -webkit-user-select: none;
    user-select: none;
}

/* 背景版留下的线条要**加粗**：缩放 1.56× 后
   stroke-width 2.8 → 屏上 ≈ 4.4px（低于 4px 就回到"糊"了）。
   ⛔ 别用 1.2（那是完整版小尺寸下的值）。 */
.dh-ambient .dh-outline>* {
    stroke-width: 2.8;
}

.dh-ambient .dh-outline .dh-neck {
    stroke-width: 2.2;
}

/* 背景版的外圈是**实线**，不是虚线 ——
   dasharray 2 9 在 1.56× 下是间距 14px 的一圈散点，看起来就是脏。
   实线始终是干净的一条。 */
.dh-ambient .dh-rings-plain circle {
    stroke-width: 1.6;
    stroke-dasharray: none;
    opacity: 0.34;
}

.dh-ambient .dh-rings-plain .dh-ring-out {
    stroke-dasharray: none;
    opacity: 0.2;
}

.dh-ambient .dh-nodes circle {
    opacity: 0.85;
}

/* ============================================================
   背景层备选：机器人真图（2026-09-28）
   ------------------------------------------------------------
   谷总：「或者换机器人图看看效果」。做成 `?bg=photo` 开关做对比，
   **不直接替换** —— 哪个更好要看了才知道。

   ★ 为什么这张图能做背景：它是 720×1080 的**深底图**
     （九宫格平均色 ≈ (23,23,30)，四角 ≈ (10,10,17)，
      与页面底色 #0B1024 = (11,16,36) 只差十几级）
     ⇒ 铺上去**不会显出方块边**。这是位图当背景的硬前提；
     换成浅底图就必须先抠图或大幅调色。

   ⛔ 遮罩的显示端一律用**白色** —— 黑色在 luminance 模式下等于全遮，
      整块会不见（同一份 CSS 在 alpha / luminance 两种模式下结果相反）。
   ============================================================ */

.dh-ambient-photo {
    position: fixed;
    right: -5vw;
    top: 50%;
    transform: translateY(-50%);
    width: min(52vh, 440px);
    height: auto;
    opacity: 0.4;
    /* 边缘径向淡出，把"矩形边界"也抹掉 */
    -webkit-mask-image: radial-gradient(ellipse 74% 78% at 50% 46%,
            #fff 0%, rgba(255, 255, 255, 0.85) 46%,
            rgba(255, 255, 255, 0.35) 74%, rgba(255, 255, 255, 0) 100%);
    mask-image: radial-gradient(ellipse 74% 78% at 50% 46%,
            #fff 0%, rgba(255, 255, 255, 0.85) 46%,
            rgba(255, 255, 255, 0.35) 74%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 0;
    -webkit-user-select: none;
    user-select: none;
}

/* 手机上正文更窄、和背景重叠更多 ⇒ 淡一点、往边上退一点，别跟聊天内容打架 */
@media (max-width: 640px) {
    .dh-ambient {
        right: -16vw;
        width: min(62vh, 420px);
        /* ⚠️ 必须显式放开 max-width：若继承桌面的 56vw，390 屏只剩 218px 宽，
           缩放比掉到 0.68×、线宽只剩 1.9px —— **手机上又糊回去了**
           （这是实测数字，不是推测，见 tools/diagnose_layout.py）。 */
        max-width: 84vw;
        /* 手机：0.30（桌面 0.40）。手机上正文是满宽的，比桌面克制一档，
           但**同样不加遮罩** —— 理由见上面 .dh-ambient 的第 ① 条。 */
        opacity: 0.3;
    }

    /* 手机缩放比小（≈1.0×），线宽要单独保足到屏上 ≈4px，
       否则和桌面用同一个值就会在手机上偏细。 */
    .dh-ambient .dh-outline>* {
        stroke-width: 4;
    }

    .dh-ambient .dh-outline .dh-neck {
        stroke-width: 3.2;
    }

    .dh-ambient .dh-rings-plain circle {
        stroke-width: 2.2;
    }

    /* 真图版在手机上同样退一点、淡一档 */
    .dh-ambient-photo {
        right: -18vw;
        width: min(58vh, 380px);
        opacity: 0.32;
    }
}

/* 应用页的内容层要浮在水印之上 */
.container {
    position: relative;
    z-index: 1;
}

/* ============================================================
   9. 响应式
   ============================================================ */

@media (max-width: 960px) {
    .ab-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .eff-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tr-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {

    /* Hero 改为单列：数字人退到文案下面，居中 */
    .lp-hero {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        padding: 30px 0 22px;
    }

    .lp-hero .lp-sub {
        margin: 0 auto 24px;
    }

    .lp-hero .lp-cta,
    .lp-hero .lp-proof {
        justify-content: center;
    }

    /* 单列时形象图放在文案之后，且缩小 —— 首屏不能被它占满 */
    .lp-hero-fig {
        order: 2;
        margin-top: 6px;
    }

    .lp-hero-copy {
        order: 1;
    }

    .dh-photo {
        width: min(70%, 290px);
    }

    .dh-hero {
        width: min(72%, 260px);
    }

    /* 窄屏标签会压到人形脸上，只留四个角上的 */
    .dh-tag-ml,
    .dh-tag-mr {
        display: none;
    }

    .ab-no {
        font-size: 28px;
    }
}

/* 平板竖屏（768 左右）六张卡排两列还放得下，到 640 以下才收成单列 ——
   过早收单列会让整页变得非常长，六张卡变成六屏。 */
@media (max-width: 640px) {
    .ab-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    /* 手机上形象图只是"气质"，不该占掉半屏滚动 —— 收小到 240px 宽（≈360 高） */
    .dh-photo {
        width: min(66%, 240px);
    }

    .dh-hero {
        width: min(80%, 220px);
    }

    .dh-tag {
        font-size: 11px;
        padding: 4px 9px;
    }

    .dh-tag-tl,
    .dh-tag-tr {
        top: 2%;
    }

    .eff-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   13. 落地页预览条（仅管理员可见）
   ------------------------------------------------------------
   存在理由：落地页只对**未登录**访客渲染，管理员平时是登录着的，
   于是"改了但看不到"。加这个口，免得每次都要退出登录再看。
   ============================================================ */

.preview-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--text-2);
    /* 用暖色而不是极光色：它是一条"提醒"，不该抢视觉 */
    background: rgba(251, 191, 36, 0.13);
    border-bottom: 1px solid rgba(251, 191, 36, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.preview-bar b {
    color: var(--warning);
    font-weight: 700;
}

.preview-bar a {
    padding: 3px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 999px;
    text-decoration: none;
}

/* ============================================================
   14. 六项导航在窄屏的收紧
   ------------------------------------------------------------
   2026-09-28 加第 6 项「朋友圈」后实测（tools/diagnose_ui_v14.py）：
       · 390px 溢出 23px、360px 溢出 53px、320px 溢出 93px
   而 style.css 的移动端规则是 **flex-wrap: nowrap + overflow-x: auto**
   （横向滚动、不换行），`.nav-item` 还是 `flex: 0 0 auto` 不收缩 ——
   于是「工具箱」要**横滑才看得见**。
   看不见的入口等于没有入口 ⇒ 必须收紧内边距和字号把它塞进去。
   （不想改 style.css：那是基底文件，改它会连带影响别的页面。）
   ============================================================ */

@media (max-width: 640px) {
    .nav-menu {
        gap: 3px;
    }

    .nav-item {
        padding: 10px 7px;
        font-size: 0.8rem;
    }
}

/* ============================================================
   10. 无障碍
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .dh-scan,
    .dh-wave rect,
    .dh-tag {
        animation: none !important;
    }

    /* 动画关掉后扫描线会停在起点，直接隐藏，免得像一条横杠卡在头上 */
    .dh-scan {
        display: none;
    }
}
