diff --git a/src/views/site/styles/ai-advisor.css b/src/views/site/styles/ai-advisor.css index 765fe07..810da13 100644 --- a/src/views/site/styles/ai-advisor.css +++ b/src/views/site/styles/ai-advisor.css @@ -124,6 +124,8 @@ body.command-home { --ai-action-hover: #e25557; --ai-action-rgb: 245, 102, 104; --ai-accent-rgb: 245, 102, 104; + /* 内容列随视口伸缩(顶栏 / 舞台 / 页脚同源);超宽封顶防行过长 */ + --ai-content-max: min(1600px, calc(100vw - 40px)); /* 欢迎区飞机/标题:Mac/Win 共用流体尺寸,勿再按 max-height 砍半 */ --ai-plane-w: clamp(280px, min(40vw, 48vh), 448px); --ai-title-h: clamp(48px, min(5.5vw, 7vh), 64px); @@ -813,11 +815,20 @@ body.command-home #ai-advisor-shell { left: 0; right: 0; bottom: auto; - height: var(--ai-vv-height, 100%); + /* 优先 visualViewport;无 JS 时用动态视口高度,随屏高伸缩 */ + height: var(--ai-vv-height, 100dvh); + max-height: var(--ai-vv-height, 100dvh); z-index: 10; overflow: hidden; } +/* 首页欢迎态:内容高于视口时可滚,避免矮屏被裁切 */ +body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) { + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior: contain; +} + .ai-shell-bg { position: absolute; inset: 0; @@ -831,7 +842,7 @@ body.command-home #ai-advisor-shell { top: var(--ai-vv-offset-top, 0px); left: 0; width: 100%; - height: var(--ai-vv-height, 100%); + height: var(--ai-vv-height, 100dvh); z-index: 0; inset: auto; overflow: visible; @@ -843,7 +854,7 @@ body.command-home #ai-advisor-shell { top: calc(var(--ai-vv-offset-top, 0px) - 48px); left: -48px; width: calc(100vw + 96px); - height: calc(var(--ai-vv-height, 100%) + 96px); + height: calc(var(--ai-vv-height, 100dvh) + 96px); overflow: hidden; background: #eef1f4; } @@ -946,13 +957,21 @@ body.command-home #ai-advisor-shell { z-index: 1; display: flex; flex-direction: column; + width: 100%; height: 100%; + min-height: 0; max-width: var(--ai-content-max); margin: 0 auto; padding: calc(var(--ai-header-h) + 8px) 20px 0; box-sizing: border-box; } +/* 欢迎态随内容增高;会话态仍吃满 shell 高度做内部滚动 */ +body.command-home #ai-advisor-shell:not(:has(.ai-stage-tools)) .ai-advisor-layout { + height: auto; + min-height: 100%; +} + .ai-advisor-app { position: relative; display: flex;