/* 顶部天气与成稿阅读层；天气详情脱离文档流，不改变对话滚动位置。 */
#chatWorkspace .chat-head{display:block;overflow:visible;container-type:normal;max-height:none;padding:12px 24px 8px;background:var(--ui-page)}
#chatWorkspace .chat-head-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;margin:0 auto;width:min(1050px,100%)}
#chatWorkspace .chat-head-row h2{font-size:18px}#chatWorkspace .chat-eyebrow{font-size:10px}
#chatWorkspace #weatherScene{position:relative;display:block;width:auto;min-height:0;height:44px;margin:0;padding:0;border:0;border-radius:0;overflow:visible;background:none;box-shadow:none;color:var(--ui-text);grid-column:auto}
#weatherScene::after{display:none}#weatherScene .weather-compact{height:44px;min-height:44px;display:flex;gap:6px;align-items:center;padding:0 10px;border:1px solid var(--ui-line);border-radius:12px;background:transparent;color:var(--ui-text);box-shadow:none}
#weatherScene #weatherVisual{display:flex;position:relative;width:40px;min-width:40px;height:36px;gap:0;overflow:hidden}#weatherScene #weatherVisual.is-composite{width:72px;min-width:72px}
#weatherScene .weather-visual-slot{display:block;position:relative;width:36px;min-width:36px;height:34px;overflow:hidden}#weatherScene .weather-visual-unit{position:absolute;left:0;top:0;transform:scale(.44);transform-origin:top left;width:82px;height:72px}#weatherScene .weather-transition-separator{display:none}#weatherCompactTemp{font-size:17px;font-weight:600;white-space:nowrap}
#weatherScene .weather-cloud{background:#a7bbd0;box-shadow:12px -9px 0 -2px #a7bbd0,25px -4px 0 -5px #a7bbd0}#weatherScene .weather-unknown-mark{color:var(--ui-muted)}
#weatherScene .weather-popover{position:absolute;right:0;top:100%;z-index:40;width:320px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 160px);overflow:auto;padding:22px;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-surface);box-shadow:0 16px 44px #0002;color:var(--ui-text);opacity:0;visibility:hidden;transform:translateY(-6px) scale(.98);transform-origin:top right;transition:visibility 0s .28s}
#weatherScene.weather-open .weather-popover{opacity:1;visibility:visible;transform:none;transition:none}#weatherScene .weather-popover::before{content:'';position:fixed;height:8px;top:-8px;left:0;right:0}
#weatherScene .weather-copy{display:grid;grid-template-columns:1fr;gap:8px;text-align:left}#weatherScene .weather-copy strong{display:block;font-size:32px;line-height:1.2;color:var(--ui-text)}#weatherScene .weather-copy span,#weatherScene .weather-copy p{display:block;color:var(--ui-muted);font-size:13px;margin:0;white-space:normal}#weatherScene .weather-side,#weatherScene .weather-details{display:grid;gap:8px;margin:14px 0 0;padding:0;color:var(--ui-muted);font-size:12px;border:0}#weatherSceneMobileCondition{display:none!important}
/* 成稿内层以标题和细线区分；正文、变化和过程采用一致的底色。 */
.chat-bubble .generation-complete,.chat-bubble .generation-section,.chat-bubble .generation-note,.chat-bubble .generation-gx-record,.chat-bubble .generation-gx-meta,.chat-bubble .chat-generation-delta,.chat-bubble .chat-process,.chat-bubble .chat-process-summary,.chat-bubble .chat-delta-details{background:transparent!important;box-shadow:none!important;border-radius:0;color:var(--ui-text)}
.chat-bubble .generation-complete{border:0;margin:16px 0}.chat-bubble .generation-section{padding:16px 0;border:0;border-top:1px solid var(--ui-line)}.chat-bubble .generation-note{padding:0;line-height:1.8}.chat-bubble .chat-delta-details{border-top:1px solid var(--ui-line);padding:12px 0}.chat-delta-details>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--ui-muted);min-height:32px;line-height:32px}.chat-bubble .chat-complete-heading{padding:8px 0;gap:10px}.chat-bubble .generation-template-table th{background:var(--ui-surface-soft)}
@media(max-width:900px),(pointer:coarse){#chatWorkspace .chat-head{padding:8px 12px}#chatWorkspace .chat-head-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}#chatWorkspace .chat-head-row>div:first-child{display:none}#chatWorkspace .chat-date-control{grid-column:1;grid-row:1;min-height:44px;align-self:center;padding:0;display:flex;gap:8px;align-items:center;justify-content:flex-start}#chatWorkspace .chat-date-control>label{position:static;display:block;font-size:11px}#chatWorkspace #weatherScene{grid-column:2;grid-row:1}#chatWorkspace #chatDateMount .log-date-trigger{min-height:44px;height:44px;padding:6px 10px}#weatherScene .weather-popover{max-height:calc(100dvh - 140px)}}
@media(prefers-reduced-motion:reduce){#weatherScene *{animation:none!important;transition:none!important}}

/* 只有空白对话时居中提示；消息出现后恢复正常文档流，手机仍保留输入栏避让空间。 */
#conversationStream:has(> .chat-empty:only-child){display:grid;place-items:center}
#conversationStream>.chat-empty:only-child{width:100%;min-height:0}

/* 狭小内容区及浏览器缩放时标题最多占两行，避免挤没成稿与驻留操作栏。 */
#chatWorkspace .chat-head-row>div:first-child{min-width:0}#chatWorkspace .chat-head-row h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}

/* 以实际内容宽度适配放大与侧栏，不让桌面视口断点把日期和标题挤成竖排。 */
#chatWorkspace{grid-template-columns:minmax(0,1fr)}#chatWorkspace .chat-head{container-type:inline-size;container-name:chat-header}#chatWorkspace .chat-eyebrow{white-space:nowrap}
@container chat-header (max-width:650px){#chatWorkspace .chat-head-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}#chatWorkspace .chat-head-row>div:first-child{display:none}#chatWorkspace .chat-date-control{grid-column:1;grid-row:1;min-width:0}#chatWorkspace #weatherScene{grid-column:2;grid-row:1}#chatWorkspace .chat-date-control>label{display:none}}
