
.hp { position: absolute; inset: 0; overflow: hidden; background: var(--shell-bg); color: var(--ink); display: flex; flex-direction: row; --hp-panel: rgba(255,255,255,.82); --hp-card: rgba(0,0,0,.04); --hp-card-h: rgba(0,0,0,.07); --hp-pop: #fff; --hp-ill: #c7c7cc; --hp-ill-2: #e5e5ea; --hp-ill-n: #fff; --hp-glass: rgba(255,255,255,.55); --hp-glass-h: rgba(255,255,255,.72); --hp-side: rgba(0,0,0,.03); --hp-col: 880px; }
/* 左栏 + 内容区：内容区自己再是一列（顶栏 → 生成流 → 输入框） */
.hp-main { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* 左侧栏：项目 / 对话 */
.hp-side { position: relative; z-index: 5; display: none; flex: 0 0 246px; width: 246px; flex-direction: column; padding: calc(var(--tbh) + 10px) 10px 8px; box-sizing: border-box; border-right: 1px solid var(--line); background: var(--hp-side); }
.hp-side.open { display: flex; }
/* 窄屏抽屉：用 class 控制（不靠媒体查询，避免被更高特异性的基础规则压掉） */
.hp-side.drawer { position: absolute; top: 0; bottom: 0; left: 0; z-index: 46; flex: 0 0 264px; width: 264px; background: var(--hp-pop); box-shadow: 10px 0 34px rgba(0,0,0,.18); }
.hp-side-bg { display: block; position: absolute; inset: 0; z-index: 45; background: rgba(0,0,0,.26); }
.hp-side-hd, .hp-side-sec { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 6px; font: 600 12px/1 var(--font-sans); color: var(--ink-3); }
.hp-side-sec { margin-top: 10px; height: auto; padding: 9px 6px 0; border-top: 1px solid var(--line); }
.hp-side-ic { width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-4); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hp-side-ic:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-side-ic .nv-i { width: 15px; height: 15px; }
.hp-side-new { height: 34px; margin: 2px 2px 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink-2); display: flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--font-sans); cursor: pointer; text-align: left; }
.hp-side-new:hover { background: var(--hp-card); color: var(--ink); }
.hp-side-new .nv-i { width: 15px; height: 15px; color: var(--ink-3); }
.hp-side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 2px; }
.hp-side-grp { font: 400 11px/1 var(--font-sans); color: var(--ink-4); padding: 10px 8px 6px; }
.hp-side-it { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; text-align: left; font-family: var(--font-sans); }
.hp-side-it:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-side-it .ic { width: 22px; height: 22px; border-radius: 6px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: var(--hp-card); color: var(--ink-3); }
.hp-side-it .ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-side-it .ic .nv-i { width: 13px; height: 13px; }
.hp-side-it .tx { min-width: 0; flex: 1; }
.hp-side-it b { display: block; font: 400 12.5px/1.35 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-side-it small { display: block; margin-top: 1px; font: 400 10.5px/1 var(--font-sans); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.hp-side-it small em.bad { font-style: normal; font-weight: 600; color: #d0342c; }
.hp-side-empty { padding: 16px 8px; font: 400 11.5px/1.7 var(--font-sans); color: var(--ink-4); text-align: center; }
.hp-side-ft { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; padding: 6px 4px 0; border-top: 1px solid var(--line); font: 400 10.5px/1 var(--font-sans); color: var(--ink-4); font-variant-numeric: tabular-nums; }
/* 每条对话右侧的删除：悬停出现，点一下变「确认」，再点才真的删 */
.hp-side-item { position: relative; }
.hp-side-item .hp-side-it { padding-right: 38px; }
.hp-side-del { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: var(--hp-pop); color: var(--ink-4); cursor: pointer; opacity: .34; transition: opacity var(--duration-fast), background var(--duration-fast), color var(--duration-fast); }
.hp-side-item:hover .hp-side-del, .hp-side-del:focus-visible { opacity: 1; }
.hp-side-del:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-side-del .nv-i { width: 13px; height: 13px; }
.hp-side-del.on { width: auto; padding: 0 7px; opacity: 1; font: 500 10.5px/1 var(--font-sans); color: #d0342c; background: #fdeceb; }
html.theme-dark .hp-side-del.on { background: #3b2422; color: #ff8b80; }
html.theme-dark .hp-side { --hp-side: rgba(255,255,255,.03); }

/* 首屏：标题 + 对话框垂直居中；出图之后对话框沉到底部，上方给结果流 */
.hp-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; padding: calc(var(--tbh) + 8px) 24px 48px; }
.hp.docked .hp-stage { flex: 0 0 auto; justify-content: flex-end; padding: 4px 24px 78px; }
.hp-feed { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--tbh) + 54px) 24px 2px; scrollbar-width: none; }
/* 隐藏滚动条：结果列才能和底部输入框严格左对齐（内容仍可用滚轮滚动） */
.hp-feed::-webkit-scrollbar { width: 0; height: 0; }
.hp-feed-in { max-width: var(--hp-col); margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }

/* 左上角模型选择：内容区左上（标题栏之下），滚动不跟随 */
.hp-top { position: absolute; top: calc(var(--tbh) + 10px); left: 22px; z-index: 14; display: flex; align-items: center; gap: 8px; }
.hp-side-btn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--hp-glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
    display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); }
.hp-side-btn:hover, .hp-side-btn.on { background: var(--hp-glass-h); color: var(--ink); }
.hp-side-btn .nv-i { width: 16px; height: 16px; }
.hp-mpill { height: 32px; max-width: 240px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--hp-glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink); font: 500 13px/1 var(--font-sans);
    transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
.hp-mpill:hover, .hp-mpill.open { background: var(--hp-glass-h); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.hp-mpill .nv-i { width: 15px; height: 15px; color: var(--ink-2); flex: none; }
.hp-mpill .mn { max-width: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-mpill .cd { width: 12px; height: 12px; color: var(--ink-4); flex: none; }
.hp-mpill.open .cd { color: var(--ink-2); }

/* 标题打字机 */
.hp-title { margin: 20px 0 22px; min-height: 1.4em; font: 600 26px/1.3 var(--font-sans); letter-spacing: -.01em; display: flex; align-items: center; justify-content: center; text-align: center; }
.hp-title > span:first-child { white-space: pre; }
.hp-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 4px; border-radius: 1px; background: var(--ink); animation: hpBlink 1s steps(1) infinite; }
.hp-caret.typing { animation: none; }
@keyframes hpBlink { 50% { opacity: 0; } }

/* 输入框：画布助手 composer 放大版，磨砂浮卡 */
.hp-composer { position: relative; z-index: 10; width: 100%; max-width: var(--hp-col); border-radius: 20px; background: var(--hp-panel); backdrop-filter: var(--material-thick); -webkit-backdrop-filter: var(--material-thick);
    box-shadow: var(--shadow-lift); padding: 14px 14px 12px; transition: box-shadow var(--duration-fast) var(--ease-out); }
.hp-composer.drag { box-shadow: var(--shadow-lift), 0 0 0 2px var(--ink-4); }
.hp-composer.shaking { animation: hpShake .4s; }
@keyframes hpShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* 流光边框：npm border-beam@1.4.1 原版移植（size=md / colorVariant=colorful / borderRadius=20）。
   结构与数值照官方：容器转 --beam-angle-hp + 淡入 --beam-opacity-hp；::after 是 1px 环（白/黑扫光 conic + 9 颗彩色径向光斑）；
   ::before 是跟着扫光走的内层泛光；[data-beam-bloom] 是 blur(8px) 的外泛光。test1 → hp；
   深浅色只差 9 处（环与泛光颜色、三层不透明度、内阴影、bloom 饱和度），用变量切。
   与官方的两处差别（2026-11 流畅度）：① 官方 1.96s 一圈是按 348 宽的 demo 卡的，780 宽卡上每帧位移太大，放慢到
   --beam-duration: 3.6s；② 去掉官方 12s 的 hue-shift（两个全尺寸 filter 动画，纯烧 GPU），彩色光斑用静态配色。
   官方在这里有 overflow: hidden，去掉——技能/插件弹层要伸到卡片外。 */
@property --beam-angle-hp { syntax: "<angle>"; initial-value: 0deg; inherits: true; }
@property --beam-opacity-hp { syntax: "<number>"; initial-value: 0; inherits: true; }

[data-beam="hp"] {
    position: relative;
    border-radius: 20px;
    --hp-ring-rgb: 0, 0, 0;
    --hp-ring-a1: 0.08; --hp-ring-a2: 0.2; --hp-ring-a3: 0.4; --hp-ring-a4: 0.55;
    --hp-stroke-opacity: 0.12;
    --hp-inner-shadow: rgba(0, 0, 0, 0.14);
    --hp-inner-opacity: 0.26;
    --hp-bloom-rgb: 0, 0, 0;
    --hp-bloom-a1: 0.02; --hp-bloom-a4: 0.4; --hp-bloom-a5: 0.6;
    --hp-bloom-saturate: 1.5;
    --hp-bloom-opacity: 0.34;
}
html.theme-dark [data-beam="hp"] {
    --hp-ring-rgb: 255, 255, 255;
    --hp-ring-a1: 0.1; --hp-ring-a2: 0.3; --hp-ring-a3: 0.6; --hp-ring-a4: 0.75;
    --hp-stroke-opacity: 0.26;
    --hp-inner-shadow: rgba(255, 255, 255, 0.27);
    --hp-inner-opacity: 0.42;
    --hp-bloom-rgb: 255, 255, 255;
    --hp-bloom-a1: 0.03; --hp-bloom-a4: 0.45; --hp-bloom-a5: 0.85;
    --hp-bloom-saturate: 1.2;
    --hp-bloom-opacity: 0.24;
}

[data-beam="hp"][data-active] {
    --beam-duration: 3.6s;
    animation: beam-spin-hp var(--beam-duration) linear infinite, beam-fade-in-hp 0.6s ease forwards;
}
[data-beam="hp"][data-fading] {
    --beam-duration: 3.6s;
    animation: beam-spin-hp var(--beam-duration) linear infinite, beam-fade-out-hp 0.5s ease forwards;
}

[data-beam="hp"][data-active]::after,
[data-beam="hp"][data-fading]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 19px;
    padding: 1px;
    clip-path: inset(0 round 20px);
    background: conic-gradient(
            from var(--beam-angle-hp),
            transparent 0%, transparent 54%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a1)) 57%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a2)) 60%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a3)) 63%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a4)) 66%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a3)) 69%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a2)) 72%,
            rgba(var(--hp-ring-rgb), var(--hp-ring-a1)) 75%,
            transparent 78%, transparent 100%
        ),
        radial-gradient(ellipse 70px 40px at 33% -7.4%, rgb(255, 50, 100), transparent),
        radial-gradient(ellipse 60px 35px at 12% -5%, rgb(40, 140, 255), transparent),
        radial-gradient(ellipse 40px 70px at 2.1% 68.3%, rgb(50, 200, 80), transparent),
        radial-gradient(ellipse 20px 35px at 2.1% 68.3%, rgb(30, 185, 170), transparent),
        radial-gradient(ellipse 180px 32px at 74.4% 100%, rgb(100, 70, 255), transparent),
        radial-gradient(ellipse 85px 26px at 55% 100%, rgb(40, 140, 255), transparent),
        radial-gradient(ellipse 74px 32px at 93.9% 0%, rgb(255, 120, 40), transparent),
        radial-gradient(ellipse 26px 42px at 100% 27.1%, rgb(240, 50, 180), transparent),
        radial-gradient(ellipse 52px 48px at 100% 27.1%, rgb(180, 40, 240), transparent);
    -webkit-mask:
        conic-gradient(
            from var(--beam-angle-hp),
            transparent 0%, transparent 30%,
            rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%,
            white 52%, white 80%,
            rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%,
            transparent 95%, transparent 100%
        ),
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: source-in, xor;
    mask:
        conic-gradient(
            from var(--beam-angle-hp),
            transparent 0%, transparent 30%,
            rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%,
            white 52%, white 80%,
            rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%,
            transparent 95%, transparent 100%
        ),
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: intersect, exclude;
    pointer-events: none;
    z-index: 2;
    opacity: calc(var(--beam-opacity-hp) * var(--hp-stroke-opacity) * var(--beam-stroke-opacity, 1) * var(--beam-strength, 1));
}

[data-beam="hp"][data-active]::before,
[data-beam="hp"][data-fading]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(ellipse 63px 36px at 33% -7.4%, rgba(255, 50, 100, 0.45), transparent),
        radial-gradient(ellipse 54px 32px at 12% -5%, rgba(40, 140, 255, 0.45), transparent),
        radial-gradient(ellipse 36px 63px at 2.1% 68.3%, rgba(50, 200, 80, 0.45), transparent),
        radial-gradient(ellipse 18px 32px at 2.1% 68.3%, rgba(30, 185, 170, 0.45), transparent),
        radial-gradient(ellipse 162px 29px at 74.4% 100%, rgba(100, 70, 255, 0.45), transparent),
        radial-gradient(ellipse 77px 23px at 55% 100%, rgba(40, 140, 255, 0.45), transparent),
        radial-gradient(ellipse 67px 29px at 93.9% 0%, rgba(255, 120, 40, 0.45), transparent),
        radial-gradient(ellipse 23px 38px at 100% 27.1%, rgba(240, 50, 180, 0.45), transparent),
        radial-gradient(ellipse 47px 43px at 100% 27.1%, rgba(180, 40, 240, 0.45), transparent);
    box-shadow: inset 0 0 9px 1px var(--hp-inner-shadow);
    -webkit-mask-image:
        conic-gradient(
            from var(--beam-angle-hp),
            transparent 0%, transparent 30%,
            rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%,
            white 52%, white 80%,
            rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%,
            transparent 95%, transparent 100%
        ),
        linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
        linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
    -webkit-mask-composite: source-in, source-over;
    mask-image:
        conic-gradient(
            from var(--beam-angle-hp),
            transparent 0%, transparent 30%,
            rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%,
            white 52%, white 80%,
            rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%,
            transparent 95%, transparent 100%
        ),
        linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white),
        linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
    mask-composite: intersect, add;
    pointer-events: none;
    z-index: 1;
    opacity: calc(var(--beam-opacity-hp) * var(--hp-inner-opacity) * var(--beam-inner-opacity, 1) * var(--beam-strength, 1));
    clip-path: inset(0 round 20px);
}

[data-beam="hp"] [data-beam-bloom] {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: 19px;
    clip-path: inset(0 round 20px);
    background: conic-gradient(
        from var(--beam-angle-hp),
        transparent 0%, transparent 58%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a1)) 62%,
        rgba(var(--hp-bloom-rgb), 0.08) 65%,
        rgba(var(--hp-bloom-rgb), 0.2) 67%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a4)) 69%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a5)) 70%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a5)) 70.5%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a4)) 71.5%,
        rgba(var(--hp-bloom-rgb), 0.2) 73%,
        rgba(var(--hp-bloom-rgb), 0.08) 75%,
        rgba(var(--hp-bloom-rgb), var(--hp-bloom-a1)) 78%,
        transparent 82%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 1px;
    filter: blur(8px) brightness(1.30) saturate(var(--hp-bloom-saturate));
    pointer-events: none;
    z-index: 3;
    opacity: 0;
}
[data-beam="hp"][data-active] [data-beam-bloom],
[data-beam="hp"][data-fading] [data-beam-bloom] {
    display: block;
    opacity: calc(var(--beam-opacity-hp) * var(--hp-bloom-opacity) * var(--beam-bloom-opacity, 1) * var(--beam-strength, 1));
}

@keyframes beam-spin-hp {
    to { --beam-angle-hp: 360deg; }
}
@keyframes beam-fade-in-hp {
    to { --beam-opacity-hp: 1; }
}
@keyframes beam-fade-out-hp {
    from { --beam-opacity-hp: 1; }
    to { --beam-opacity-hp: 0; }
}
[data-beam="hp"][data-paused],
[data-beam="hp"][data-paused]::after,
[data-beam="hp"][data-paused]::before,
[data-beam="hp"][data-paused] [data-beam-bloom] {
    animation-play-state: paused !important;
}

/* 关动效时容器没有 fade-in，--beam-opacity-hp 会停在 0（光消失），显式给 1 留一帧静态光 */
@media (prefers-reduced-motion: reduce) {
    [data-beam="hp"],
    [data-beam="hp"]::before,
    [data-beam="hp"]::after,
    [data-beam="hp"] [data-beam-bloom] { animation: none !important; }
    [data-beam="hp"] { --beam-opacity-hp: 1; }
}
.hp-attached { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 8px; }
.hp-att { height: 30px; max-width: 220px; padding: 0 6px 0 3px; border-radius: 9px; background: var(--hp-card); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.hp-att img, .hp-att .gi { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.hp-att .gi { background: var(--hp-card-h); display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.hp-att .gi .nv-i, .hp-att.skill > .nv-i { width: 13px; height: 13px; }
.hp-att.skill { padding-left: 9px; }
.hp-att.skill > .nv-i { color: var(--ink-3); }
.hp-att.loading { opacity: .6; }
.hp-att > span:not(.gi) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-att button { width: 18px; height: 18px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.hp-att button:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-att button .nv-i { width: 11px; height: 11px; }
.hp-input { position: relative; display: block; width: 100%; box-sizing: border-box; min-height: 86px; max-height: 240px; overflow-y: auto; border: 0; outline: none; background: transparent; padding: 4px 6px; color: var(--ink); font: 400 14px/1.75 var(--font-sans); box-shadow: none; white-space: pre-wrap; word-break: break-word; cursor: text; }
.hp-input:focus { outline: none; box-shadow: none; background: transparent; }
.hp-input.empty::before { content: attr(data-placeholder); position: absolute; left: 6px; right: 6px; top: 4px; color: var(--ink-4); pointer-events: none; white-space: pre-wrap; }
.hp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.hp-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hp-chip { height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: var(--hp-card); color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; font: 500 12px/1 var(--font-sans); cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.hp-chip .nv-i { width: 14px; height: 14px; }
.hp-chip .cd { width: 11px; height: 11px; margin-left: -1px; color: var(--ink-4); }
.hp-chip:hover, .hp-chip.open { background: var(--hp-card-h); color: var(--ink); }
.hp-chip.ghost { background: transparent; }
.hp-chip.ic { width: 30px; padding: 0; justify-content: center; }
.hp-chip .n { font-size: 11px; color: var(--ink-4); }
.hp-model-chip .mn { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-model-chip .cd { width: 12px; height: 12px; color: var(--ink-4); flex-shrink: 0; }
.hp-model-chip.open .cd { color: var(--ink-2); }

/* 对话模型：画布助手式两级菜单（一级供应商 hover 开二级模型），磨砂玻璃。
   Teleport 到 #nv-layer + fixed：composer 自己是 backdrop root，留在里面磨砂会采样不到页面背景、变成平色，二级还会被裁。 */
.hp-pop.hp-model-wrap {
    position: fixed; z-index: 60; width: auto; padding: 0; background: transparent; box-shadow: none;
    /* .hp 上的页面变量 Teleport 出去后拿不到，这里补一份 */
    --hp-pop: #fff; --hp-card: rgba(0, 0, 0, .04); --hp-card-h: rgba(0, 0, 0, .07);
}
html.theme-dark .hp-pop.hp-model-wrap { --hp-pop: #1e1e20; --hp-card: rgba(255, 255, 255, .04); --hp-card-h: rgba(255, 255, 255, .07); }
/* 磨砂玻璃（一级 / 二级共用）+ 柔和投影；零 border / 零发丝线。 */
.hp-mpanel {
    width: 300px; padding: 6px; border-radius: 14px; border: 0;
    background: color-mix(in srgb, var(--hp-pop) 86%, transparent);
    -webkit-backdrop-filter: blur(42px) saturate(180%);
    backdrop-filter: blur(42px) saturate(180%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .14), 0 4px 12px rgba(0, 0, 0, .07);
}
html.theme-dark .hp-mpanel { box-shadow: 0 18px 40px rgba(0, 0, 0, .36), 0 4px 12px rgba(0, 0, 0, .22); }
/* 二级子菜单：绝对定位在一级面板左侧，right:100% 贴边（中间不留缝），top = 当前供应商行（内联 style 覆盖） */
.hp-mpanel-models { position: absolute; top: 0; right: 100%; width: 300px; display: flex; flex-direction: column; z-index: 2; }
.hp-mpanel-hd { display: flex; align-items: baseline; gap: 6px; padding: 4px 8px 6px; }
.hp-mpanel-hd b { font: 400 11px/1.2 var(--font-sans); color: var(--ink-3); }
.hp-mpanel-hd small { font-size: 11px; color: var(--ink-4); }
.hp-mv-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; }
.hp-effort { margin: 4px 0 2px; }
.hp-mv { min-height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); display: flex; align-items: center; gap: 6px;
    font: 400 13px/1 var(--font-sans); cursor: pointer; text-align: left; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.hp-mv:hover, .hp-mv.on { background: var(--hp-card-h); color: var(--ink); }
.hp-mv.cur { background: var(--hp-card); color: var(--ink); }
.hp-mv.def { min-height: 40px; padding: 6px 8px; }
.hp-mv .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-mv.def .nm { white-space: normal; }
.hp-mv .nm small { display: block; font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.hp-mv .n { font-size: 11px; color: var(--ink-4); flex-shrink: 0; }
.hp-mv .chk { width: 13px; height: 13px; color: var(--ink); flex-shrink: 0; }
.hp-mv .ar { width: 12px; height: 12px; color: var(--ink-4); flex-shrink: 0; }
.hp-mpanel-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 8px 2px; margin-top: 4px; }
.hp-mpanel-foot button { border: 0; background: transparent; padding: 0; color: var(--ink-3); font: 400 11px/1.4 var(--font-sans); cursor: pointer; }
.hp-mpanel-models .hp-search { margin-bottom: 4px; }
.hp-mpanel-models .hp-list { max-height: 300px; }
/* 二级模型列表：Prompt Input 版式 —— 行高 38px、13px 左对齐，选中不铺色块，只在右侧出 14px 线性对勾 + 字重 600 */
.hp-mpanel-models .hp-it { min-height: 38px; padding: 0 10px; border-radius: 9px; gap: 8px; }
.hp-mpanel-models .hp-it .tx { min-width: 0; }
.hp-mpanel-models .hp-it b { font-size: 13px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-mpanel-models .hp-it.cur { background: transparent; }
.hp-mpanel-models .hp-it.cur b { font-weight: 600; }
.hp-mpanel-models .hp-it .chk { width: 14px; height: 14px; color: var(--ink); flex-shrink: 0; }
.hp-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hp-send { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: opacity var(--duration-fast), transform var(--duration-instant); }
.hp-send:active { transform: scale(.94); }
.hp-send:disabled { opacity: .3; cursor: default; transform: none; }
.hp-send .nv-i { width: 16px; height: 16px; }
.hp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: hpSpin .7s linear infinite; }
@keyframes hpSpin { to { transform: rotate(360deg); } }

/* 弹层：实底 + 投影，无描边；opacity + 4px 位移 */
.hp-pop { position: absolute; top: calc(100% - 6px); z-index: 30; width: 340px; max-width: calc(100vw - 48px); padding: 8px; border-radius: 16px; background: var(--hp-pop); box-shadow: var(--shadow-pop); }
/* 输入框沉到底部时，弹层一律向上开：否则会被底部磨砂条挡住、甚至超出视口 */
.hp.docked .hp-composer .hp-pop:not(.hp-mention) { top: auto; bottom: calc(100% + 8px); }
.hp.docked .hp-composer .hp-pop-enter-from, .hp.docked .hp-composer .hp-pop-leave-to { transform: translateY(-4px); }
/* 张数选择 */
.hp-pop.hp-count-pop { left: 126px; width: 268px; }
.hp-counts { display: flex; gap: 6px; padding: 2px 2px 6px; }
.hp-count-b { flex: 1 1 0; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 12px; background: var(--hp-card); color: var(--ink-2); cursor: pointer; font-family: var(--font-sans); transition: background var(--duration-fast), color var(--duration-fast); }
.hp-count-b b { font: 600 16px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.hp-count-b small { font: 400 10px/1 var(--font-sans); color: var(--ink-4); }
.hp-count-b:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-count-b.on { background: var(--ink); color: var(--on-accent); }
.hp-count-b.on small { color: var(--on-accent); opacity: .68; }
.hp-count-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; padding: 7px 8px 2px; border-top: 1px solid var(--line); font: 400 11px/1 var(--font-sans); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.hp-pop-enter-active, .hp-pop-leave-active { transition: opacity .14s ease, transform .14s ease; }
.hp-pop-enter-from, .hp-pop-leave-to { opacity: 0; transform: translateY(4px); }
.hp-search { height: 32px; border-radius: 10px; background: var(--hp-card); display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--ink-4); margin-bottom: 4px; }
.hp-search .nv-i { width: 13px; height: 13px; flex-shrink: 0; }
.hp-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 12px/1 var(--font-sans); box-shadow: none; }
.hp-search:focus-within { background: var(--hp-card-h); }
.hp-list { max-height: 300px; overflow: auto; }
.hp-grp { font-size: 11px; color: var(--ink-4); padding: 8px 8px 4px; }
.hp-it { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font-sans); }
.hp-it:hover { background: var(--hp-card-h); }
.hp-mention .hp-it:hover { background: transparent; }
.hp-mention .hp-it.cur { background: var(--hp-card-h); }
.hp-mention .hp-it:disabled { cursor: default; opacity: .55; }
.hp-mention .ic.th { overflow: hidden; padding: 0; }
.hp-mention .ic.th img { width: 100%; height: 100%; object-fit: cover; }
.hp-mention.grid { width: 372px; }
.hp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 2px 4px 6px; }
.hp-tile { min-width: 0; padding: 4px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink); font-family: var(--font-sans); display: flex; flex-direction: column; gap: 4px; }
.hp-tile.cur { background: var(--hp-card-h); }
.hp-tile .tm { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--hp-card); color: var(--ink-3); }
.hp-tile .tm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-tile .tm > .nv-i { width: 18px; height: 18px; }
.hp-tile .tm .bd { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 5px; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; }
.hp-tile .tm .bd .nv-i { width: 9px; height: 9px; }
.hp-tile .nm { font-size: 11px; line-height: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.hp-tile.cur .tm { box-shadow: 0 0 0 2px var(--ink); }
.hp-mention .hp-foot span { color: var(--ink-4); font: 400 11px/1.4 var(--font-sans); }
.hp-it:disabled { opacity: .5; cursor: default; }
.hp-it .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--hp-card); display: flex; align-items: center; justify-content: center; color: var(--ink-3); flex-shrink: 0; }
.hp-it .ic .nv-i { width: 14px; height: 14px; }
.hp-it .tx { flex: 1; min-width: 0; }
.hp-it b { display: block; font-size: 12px; font-weight: 500; }
.hp-it small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-it .chk { width: 14px; height: 14px; }
.hp-sw { width: 26px; height: 15px; border-radius: 8px; background: var(--fill-3); position: relative; flex-shrink: 0; transition: background .14s ease; }
.hp-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--solid); transition: transform .14s ease; }
.hp-it[aria-pressed="true"] .hp-sw { background: var(--ink); }
.hp-it[aria-pressed="true"] .hp-sw::after { transform: translateX(11px); }
.hp-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 8px 2px; margin-top: 4px; }
.hp-foot button { border: 0; background: transparent; padding: 0; color: var(--ink-3); font: 400 11px/1.4 var(--font-sans); cursor: pointer; }
.hp-foot button:hover { color: var(--ink); }
.hp-empty { padding: 18px 8px; text-align: center; color: var(--ink-4); font-size: 12px; }

/* 快速开始 */
.hp-quick { width: 100%; max-width: 780px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.hp-q { border: 0; background: transparent; padding: 0; text-align: left; color: var(--ink); cursor: pointer; font-family: var(--font-sans); }
.hp-q .art { height: 108px; border-radius: 14px; background: var(--hp-card); display: flex; align-items: center; justify-content: center; transition: background var(--duration-fast), transform var(--duration-base) var(--ease-out); }
.hp-q:hover .art { background: var(--hp-card-h); transform: translateY(-2px); }
.hp-q .art svg { width: 150px; height: 84px; max-width: 90%; }
.hp-q .art.plus .nv-i { width: 28px; height: 28px; color: var(--ink-3); }
.hp-q .art .n { fill: var(--hp-ill-n); stroke: var(--hp-ill); }
.hp-q .art .f { fill: var(--hp-ill-2); }
.hp-q .art .f2 { fill: var(--hp-ill-2); stroke: var(--hp-ill); }
.hp-q .art .ln { stroke: var(--hp-ill); }
.hp-q .art .pt { fill: var(--shell-bg); stroke: var(--hp-ill); }
.hp-q .art .d { fill: var(--hp-ill); }
.hp-q .lb { display: block; font-size: 12px; font-weight: 500; margin-top: 8px; padding-left: 2px; }
.hp-q .ds { display: block; font-size: 11px; color: var(--ink-3); padding-left: 2px; margin-top: 2px; }

/* 最新项目 */
.hp-recent { width: 100%; max-width: 780px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.hp-new, .hp-pj { min-width: 0; border: 0; border-radius: 18px; background: var(--hp-glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); color: var(--ink); cursor: pointer; font-family: var(--font-sans); text-align: left; transition: background var(--duration-fast), transform var(--duration-base) var(--ease-out); }
.hp-new:hover, .hp-pj:hover { background: var(--hp-glass-h); transform: translateY(-2px); }
.hp-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 196px; font: 500 13px/1 var(--font-sans); }
.hp-new .nv-i { width: 22px; height: 22px; color: var(--ink-2); }
.hp-pj { display: flex; flex-direction: column; gap: 8px; padding: 6px; overflow: hidden; }
.hp-pj .cv { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--hp-card); }
.hp-pj .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-pj .cv .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-4); }
.hp-pj .cv .ph .nv-i { width: 20px; height: 20px; }
.hp-pj .cv.art { display: flex; align-items: center; justify-content: center; }
.hp-pj .cv.art svg { width: 130px; height: 74px; max-width: 86%; }
.hp-pj .cv.art .n { fill: var(--hp-ill-n); stroke: var(--hp-ill); }
.hp-pj .cv.art .f { fill: var(--hp-ill-2); }
.hp-pj .cv.art .f2 { fill: var(--hp-ill-2); stroke: var(--hp-ill); }
.hp-pj .cv.art .ln { stroke: var(--hp-ill); }
.hp-pj .cv.art .pt { fill: var(--shell-bg); stroke: var(--hp-ill); }
.hp-pj .cv.art .d { fill: var(--hp-ill); }
.hp-pj .mt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 0 4px; min-width: 0; overflow: hidden; }
.hp-pj .mt b { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/16px var(--font-sans); color: var(--ink-2); }
.hp-pj .mt em { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: normal 400 11px/16px var(--font-sans); color: var(--ink-3); white-space: nowrap; }
.hp-pj .go { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 10px; background: var(--hp-card); }
.hp-pj:hover .go { background: var(--hp-card-h); }
.hp-pj .go span { flex: 1; min-width: 0; font: 500 12px/1 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-pj .go .ne { width: 13px; height: 13px; color: var(--ink-3); transform: rotate(-90deg); flex: none; transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast); }
.hp-pj:hover .go .ne { color: var(--ink); transform: rotate(-90deg) translate(1px, 1px); }
.hp-all { width: 100%; max-width: 780px; display: flex; justify-content: flex-end; margin-top: 10px; }
.hp-all button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; font: 400 12px/1 var(--font-sans); color: var(--ink-3); cursor: pointer; }
.hp-all button:hover { color: var(--ink); }
.hp-all .nv-i { width: 13px; height: 13px; }

/* 模板库 */
.hp-tpl { width: 100%; margin-top: 56px; }
.hp-tpl-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.hp-tpl-head h2 { margin: 0; font: 600 15px/1.3 var(--font-sans); }
.hp-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
/* 模板库右上角搜索（磨砂玻璃；点进去无描边/阴影/上浮） */
.hp-tpl-search { margin-left: auto; width: 220px; max-width: 100%; height: 32px; border-radius: 16px; padding: 0 6px 0 12px; display: flex; align-items: center; gap: 6px; color: var(--ink-4);
    background: var(--hp-glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); transition: background var(--duration-fast); }
.hp-tpl-search:focus-within { background: var(--hp-glass-h); }
.hp-tpl-search .nv-i { width: 13px; height: 13px; flex: none; }
.hp-tpl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; box-shadow: none; background: transparent; color: var(--ink); font: 400 12px/1 var(--font-sans); -webkit-appearance: none; appearance: none; }
.hp-tpl-search input::-webkit-search-cancel-button { display: none; }
.hp-tpl-search button { width: 22px; height: 22px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.hp-tpl-search button:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-tpl-search button .nv-i { width: 11px; height: 11px; }
.hp-tpl-empty { margin: 24px 0; text-align: center; font-size: 12px; color: var(--ink-3); }
@media (max-width: 720px) { .hp-tpl-search { margin-left: 0; width: 100%; } }
.hp-tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-3); font: 500 12px/1 var(--font-sans); cursor: pointer; }
.hp-tabs button:hover { color: var(--ink); }
.hp-tabs button.on { background: var(--hp-card-h); color: var(--ink); }
.hp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
/* bento 栅格：每 5 张一组（2 大 16:9 + 3 小 4:3），尾组按剩余张数用 is-full / is-half / is-third 收尾 */
.hp-grid .hp-card.is-wide { grid-column: span 3; aspect-ratio: 16 / 9; }
.hp-grid .hp-card.is-half { grid-column: span 3; aspect-ratio: 16 / 9; }
.hp-grid .hp-card.is-small { grid-column: span 2; aspect-ratio: 4 / 3; }
.hp-grid .hp-card.is-third { grid-column: span 2; aspect-ratio: 4 / 3; }
.hp-grid .hp-card.is-full { grid-column: span 6; aspect-ratio: 21 / 9; }
.hp-grid:not(.is-search) .hp-card { border-radius: 20px; }
.hp-card.is-wide .t b { font-size: 16px; }
.hp-card.is-full .t b { font-size: 18px; }
/* 搜索态退回原来的 5 列等宽卡片 */
.hp-grid.is-search { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
/* <=1100 统一干净的两列：所有 bento 卡都占半宽、4:3，避免大小卡混排留半格空洞 */
@media (max-width: 1100px) {
    .hp-grid, .hp-grid.is-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-grid .hp-card.is-wide, .hp-grid .hp-card.is-half, .hp-grid .hp-card.is-full, .hp-grid .hp-card.is-small, .hp-grid .hp-card.is-third { grid-column: span 1; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
    .hp-grid, .hp-grid.is-search { grid-template-columns: minmax(0, 1fr); }
    .hp-grid .hp-card.is-wide, .hp-grid .hp-card.is-half, .hp-grid .hp-card.is-full, .hp-grid .hp-card.is-small, .hp-grid .hp-card.is-third { grid-column: span 1; aspect-ratio: 4 / 3; }
}
.hp-card { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--hp-card); text-align: left; cursor: pointer;
    transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.hp-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; pointer-events: none; transition: opacity var(--duration-fast); }
.hp-card:hover video, .hp-card:focus-visible video { opacity: 1; }
.hp-card::after { content: ''; position: absolute; inset: 68% 0 0; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.22) 40%, rgba(0,0,0,.66) 100%); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 50%); mask-image: linear-gradient(180deg, transparent 0%, #000 50%); pointer-events: none; }
.hp-card .t { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff; }
.hp-card .t b { display: block; font: 600 13px/1.3 var(--font-sans); }
.hp-card .t small { display: block; font-size: 11px; opacity: .8; margin-top: 3px; }
.hp-card .tag { position: absolute; top: 10px; left: 10px; z-index: 1; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; color: #fff; background: rgba(0,0,0,.32); backdrop-filter: blur(12px); display: flex; align-items: center; }
.hp-card .use { position: absolute; right: 10px; top: 10px; z-index: 1; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 4px 14px rgba(0,0,0,.18); color: #fff; font: 500 11px/1 var(--font-sans); display: flex; align-items: center; gap: 4px;
    opacity: 0; transform: translateY(-3px); transition: opacity .16s, transform .16s; }
.hp-card .use .nv-i { width: 12px; height: 12px; }
.hp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.hp-card:hover .use, .hp-card:focus-visible .use { opacity: 1; transform: none; }

/* 底部渐变磨砂（与标题栏同款，方向相反） */
.hp-bfx { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; z-index: 5; pointer-events: none; }
.hp-bfx i { position: absolute; inset: 0; display: block; }
.hp-bfx i:nth-child(1) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); -webkit-mask: linear-gradient(to top, #000 45%, transparent); mask: linear-gradient(to top, #000 45%, transparent); }
.hp-bfx i:nth-child(2) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); -webkit-mask: linear-gradient(to top, #000 30%, transparent 75%); mask: linear-gradient(to top, #000 30%, transparent 75%); }
.hp-bfx i:nth-child(3) { backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); -webkit-mask: linear-gradient(to top, #000 15%, transparent 55%); mask: linear-gradient(to top, #000 15%, transparent 55%); }
.hp-bfx i:nth-child(4) { background: linear-gradient(to top, var(--tb-tint), transparent 85%); }

@media (max-width: 640px) {
    .hp-inner { padding-left: 16px; padding-right: 16px; }
    .hp-quick, .hp-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-pop { left: 0 !important; width: calc(100vw - 48px) !important; }
    /* 模型菜单是 fixed 的 teleport 容器，不吃上面那条宽度/左对齐 */
    .hp-pop.hp-model-wrap { left: auto !important; width: auto !important; }
    /* 二级浮层贴在一级左侧：窄屏跟一级同宽，切换时不横向跳 */
    .hp-mpanel { width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .hp-caret { display: none; } .hp-card, .hp-q .art { transition: none; } }

/* 窄屏：侧栏变抽屉，压在主内容上（必须留在 scoped 块里，否则被 .hp-side.scoped 的更高特异性压掉） */
@media (max-width: 900px) {
    .hp-side { position: absolute; top: 0; bottom: 0; left: 0; z-index: 46; width: 264px; background: var(--hp-pop); box-shadow: 10px 0 32px rgba(0, 0, 0, .16); }
    .hp-side-bg { display: block; position: absolute; inset: 0; z-index: 45; background: rgba(0, 0, 0, .26); }
}
@media (max-width: 560px) {
    .hp-top { left: 12px; gap: 6px; }
    .hp-mpill { height: 30px; max-width: calc(100vw - 96px); }
} 


/* 深色：放非 scoped 块（scoped 下 :global(html.theme-dark) .x 会把整条选择器编译成 html.theme-dark） */
html.theme-dark .hp { --hp-panel: rgba(26,26,26,.74); --hp-card: rgba(255,255,255,.04); --hp-card-h: rgba(255,255,255,.07); --hp-pop: #1e1e20; --hp-ill: #4a4a4f; --hp-ill-2: #2a2a2d; --hp-ill-n: #1f1f22; --hp-glass: rgba(38,38,40,.52); --hp-glass-h: rgba(48,48,50,.62); }

/* 输入区里的标签：用 DOM API 插进 contenteditable，拿不到 scoped 属性，所以放这里 */
.hp-input .hp-tk { --tk-bg: #fff; --tk-bd: rgba(0,0,0,.12); --tk-ref: rgba(0,0,0,.05); display: inline-flex; align-items: center; gap: 5px; height: 24px; margin: 0 2px; padding: 0 8px 0 6px; vertical-align: middle; position: relative; top: -1px;
    border-radius: 8px; border: 1px solid var(--tk-bd); background: var(--tk-bg); color: var(--ink); font: 500 12.5px/1 var(--font-sans); white-space: nowrap; user-select: none; -webkit-user-select: none; cursor: default; }
.hp-input .hp-tk .nv-i { width: 13px; height: 13px; color: var(--ink-2); flex: none; }
.hp-input .hp-tk .nm { display: inline-block; white-space: nowrap; overflow: hidden; }
.hp-input .hp-tk .nm.long { max-width: 3.4em; -webkit-mask-image: linear-gradient(to right, #000 52%, transparent); mask-image: linear-gradient(to right, #000 52%, transparent); }
.hp-input .hp-tk.ref { padding-left: 3px; background: var(--tk-ref); border-color: transparent; box-shadow: inset 0 0 0 1px var(--tk-bd); }
.hp-input .hp-tk.ref .th { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; flex: none; display: block; }
.hp-input .hp-tk.ref .th.ic { display: inline-flex; align-items: center; justify-content: center; background: var(--tk-bg); }
.hp-input .hp-tk.ref .th.ic .nv-i { width: 11px; height: 11px; }
.hp-input .hp-tk.ref .ix { font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
html.theme-dark .hp-input .hp-tk { --tk-bg: #252528; --tk-bd: rgba(255,255,255,.14); --tk-ref: rgba(255,255,255,.06); }

/* 素材库选择抽屉：teleport 到 #nv-layer，样式不能 scoped */
.hp-scrim { position: fixed; inset: 0; z-index: 70; background: var(--scrim); }
.hp-drawer { position: fixed; z-index: 71; top: 12px; right: 12px; bottom: 12px; width: 420px; max-width: calc(100vw - 24px); border-radius: 18px; background: var(--solid); box-shadow: var(--shadow-dialog); display: flex; flex-direction: column; color: var(--ink); font-family: var(--font-sans); }
.hp-drawer .hd { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; }
.hp-drawer h3 { margin: 0; flex: 1; font: 600 15px/1.3 var(--font-sans); }
.hp-drawer h3 small { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.hp-drawer .tools { display: flex; gap: 8px; align-items: center; padding: 0 16px 10px; }
.hp-drawer .hp-search { height: 32px; border-radius: 16px; background: var(--fill-1); display: flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ink-4); flex: 1; min-width: 0; }
.hp-drawer .hp-search .nv-i { width: 13px; height: 13px; }
.hp-drawer .hp-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 12px/1 var(--font-sans); box-shadow: none; }
.hp-drawer .hp-search:focus-within { background: var(--fill-2); }
.hp-seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill-1); flex-shrink: 0; }
.hp-seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); font: 500 12px/1 var(--font-sans); cursor: pointer; }
.hp-seg button.on { background: var(--solid); color: var(--ink); box-shadow: var(--shadow-float); }
.hp-drawer .body { flex: 1; overflow: auto; padding: 0 16px 16px; }
.hp-drawer .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hp-drawer .as { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--fill-1); cursor: pointer; }
.hp-drawer .as img, .hp-drawer .as video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hp-drawer .as:hover img, .hp-drawer .as:hover video { transform: scale(1.04); }
.hp-drawer .as .k { position: absolute; left: 6px; bottom: 6px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.4); display: flex; align-items: center; }
.hp-drawer .hp-empty { padding: 40px 8px; text-align: center; color: var(--ink-4); font-size: 12px; }
.hp-x { width: 30px; height: 30px; border: 0; border-radius: 15px; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.hp-x:hover { background: var(--fill-1); color: var(--ink); }
.hp-x .nv-i { width: 16px; height: 16px; }
.hp-fade-enter-active, .hp-fade-leave-active { transition: opacity .2s; }
.hp-fade-enter-from, .hp-fade-leave-to { opacity: 0; }
.hp-drawer-enter-active, .hp-drawer-leave-active { transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.hp-drawer-enter-from, .hp-drawer-leave-to { transform: translateX(calc(100% + 24px)); }
/* ───────── 首屏生图器：引擎 / 比例 / 张数 / 结果 ───────── */
.hp-chip .rb { display: block; border: 1.5px solid currentColor; border-radius: 2px; opacity: .55; flex: none; }
.hp-chip .rb + span { margin-left: 1px; }
.hp-chip.hp-engine .mn { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-chip.hp-engine .cd { width: 12px; height: 12px; color: var(--ink-4); flex: none; }
.hp-chip.hp-engine.open .cd { color: var(--ink-2); }
.hp-cost { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 2px; color: var(--ink-3); font: 500 12px/1 var(--font-sans); white-space: nowrap; }
.hp-cost .nv-i { width: 13px; height: 13px; color: var(--ink-4); flex: none; }
.hp-cost b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hp-gen { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 0; border-radius: 17px; background: var(--accent); color: var(--on-accent); font: 600 13px/1 var(--font-sans); cursor: pointer; flex: none; transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-instant) var(--ease-out); }
.hp-gen:hover { opacity: .9; }
.hp-gen:active { transform: scale(.97); }
.hp-gen:disabled { opacity: .32; cursor: default; transform: none; }
.hp-gen .nv-i { width: 15px; height: 15px; }
.hp-gen .hp-spin { width: 13px; height: 13px; border-width: 2px; }

.hp-pop.hp-engine-pop { left: 50px; width: 340px; }
/* 左上角模型选择下拉：贴着胶囊左对齐往下展开 */
.hp-pop.hp-engine-pop-top { left: 0; top: calc(100% + 8px); width: 320px; }
.hp-eplist { max-height: 306px; overflow: auto; overscroll-behavior: contain; }
.hp-ep .pr { margin-left: 6px; font: 500 11.5px/1 var(--font-sans); color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.hp-ep.cur { background: var(--hp-card-h); }
.hp-ep .chk { color: var(--ink); flex: none; }

.hp-chip em.k { font: 600 10.5px/1 var(--font-sans); font-style: normal; color: var(--ink-3); padding: 2px 4px; border-radius: 5px; background: var(--hp-card-h); letter-spacing: .01em; }
.hp-chip.open em.k { color: var(--ink); }
.hp-pop.hp-ratio-pop { left: 50px; width: 320px; }
.hp-ratios { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 2px 2px 4px; }
.hp-ratio { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 58px; padding: 6px 2px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); font: 500 11px/1 var(--font-sans); cursor: pointer; transition: background var(--duration-fast); }
.hp-ratio:hover { background: var(--hp-card-h); color: var(--ink-2); }
.hp-ratio.on { background: var(--hp-card-h); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-4); }
.hp-ratio i { display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .55; }
.hp-ratio.on i { opacity: 1; }
.hp-grp-k { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.hp-res-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 2px 2px 2px; }
.hp-res-b { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 46px; justify-content: center; border: 0; border-radius: 10px; background: var(--hp-card); color: var(--ink-3); cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); }
.hp-res-b:hover { background: var(--hp-card-h); color: var(--ink-2); }
.hp-res-b.on { background: var(--hp-card-h); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-4); }
.hp-res-b b { font: 600 13px/1 var(--font-sans); }
.hp-res-b small { font: 400 10.5px/1 var(--font-sans); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.hp-res-b.on small { color: var(--ink-3); }

.hp-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 780px; margin-top: 16px; }
.hp-ideas button { height: 30px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--hp-card); color: var(--ink-3); font: 500 12px/1 var(--font-sans); cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); }
.hp-ideas button:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-res { width: 100%; }
.hp-res-hd { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
.hp-res-st { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.hp-res-st .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.hp-res-st .dot.on { background: var(--accent); animation: hpPulse 1.3s ease-in-out infinite; }
.hp-res-st .dot.bad { background: #e5484d; }
@keyframes hpPulse { 50% { opacity: .22; } }
.hp-res-st b { font: 600 12.5px/1 var(--font-sans); color: var(--ink); flex: none; }
.hp-res-st small { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-res-ops { display: flex; align-items: center; gap: 4px; flex: none; }
.hp-res-ops button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--hp-card); color: var(--ink-2); font: 500 11.5px/1 var(--font-sans); cursor: pointer; transition: background var(--duration-fast); }
.hp-res-ops button:hover { background: var(--hp-card-h); color: var(--ink); }
.hp-res-ops button:disabled { opacity: .45; cursor: default; }
.hp-res-ops .nv-i { width: 13px; height: 13px; }
.hp-res-ops .meta { font-size: 11.5px; color: var(--ink-4); margin-right: 2px; }
.hp-res-ops button.icon { width: 28px; padding: 0; justify-content: center; }
.hp-res-err { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(229, 72, 77, .08); color: #c0393e; font-size: 12.5px; line-height: 1.5; }
.hp-res-err .nv-i { width: 15px; height: 15px; flex: none; }
.hp-res-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 244px)); }
.hp-rt { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--hp-card); aspect-ratio: var(--ar, 1 / 1); }
.hp-rt .pic { display: block; width: 100%; height: 100%; }
.hp-rt img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 只有一张时给大一点，看得清细节 */
.hp-res-grid:has(> .hp-rt:only-child) { grid-template-columns: minmax(0, min(380px, 100%)); }
.hp-rt .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: 11.5px; overflow: hidden; }
.hp-rt .ph em { position: relative; font-style: normal; }
.hp-rt .sh { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .5) 50%, transparent 68%); background-size: 220% 100%; animation: hpShim 1.5s linear infinite; }
/* 任务已结束但没有图（旧版丢图）：静态提示，不要再用加载动画骗人 */
.hp-rt .ph.off { border: 1px dashed currentColor; border-radius: 10px; opacity: .5; }
@keyframes hpShim { 0% { background-position: 150% 0; } 100% { background-position: -70% 0; } }
.hp-rt-ops { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity .16s var(--ease-out), transform .16s var(--ease-out); }
.hp-rt:hover .hp-rt-ops { opacity: 1; transform: none; }
.hp-rt-ops a, .hp-rt-ops button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 26px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font: 500 11px/1 var(--font-sans); text-decoration: none; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hp-rt-ops a:hover, .hp-rt-ops button:hover { background: rgba(0, 0, 0, .72); }
.hp-rt-ops .nv-i { width: 12px; height: 12px; }

@media (max-width: 560px) {
    /* 手机上也要能看到预估扣费：收小、靠左，别整块藏掉 */
    .hp-cost { height: 26px; margin-right: auto; font-size: 11px; }
    .hp-cost .nv-i { width: 12px; height: 12px; }
    /* 张数在窄屏也保留（只收掉「张」字），否则手机上没法改张数 */
    .hp-nchip .u { display: none; }
    .hp-pop.hp-count-pop { left: 8px; width: calc(100vw - 40px); }
    /* 窄屏：工具按钮一行，生成按钮整行放下 */
    .hp-row { flex-wrap: wrap; }
    .hp-left { width: 100%; }
    .hp-right { width: 100%; justify-content: flex-end; margin-left: 0; margin-top: 6px; }
    .hp-gen { flex: 1; justify-content: center; }
    .hp-left { gap: 4px; }
    .hp-chip { padding: 0 8px; }
    .hp-stage { padding: calc(var(--tbh) + 4px) 14px 28px; }
    .hp.docked .hp-stage { padding: 4px 14px 70px; }
    .hp-feed { padding: calc(var(--tbh) + 50px) 14px 0; }
    .hp-res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-top { left: 14px; top: calc(var(--tbh) + 8px); }
    .hp-mpill { height: 30px; max-width: calc(100vw - 92px); font-size: 12.5px; }
    .hp-mpill .mn { max-width: 150px; }
    .hp-pop.hp-engine-pop, .hp-pop.hp-ratio-pop { left: 8px !important; width: calc(100vw - 40px); }
    .hp-pop.hp-engine-pop-top { left: 0 !important; width: calc(100vw - 60px); }
    .hp-res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
