/* 窄电脑窗口保留标签并采用两行顶栏；只有手机设备使用单行当前日志信息。 */
.mobile-current-log{display:none!important}
body.mobile-resource-layout:not(.is-handheld-workspace){--workspace-header-height:96px}
body.mobile-resource-layout:not(.is-handheld-workspace) .topbar{height:96px;min-height:96px;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 10px}
body.mobile-resource-layout:not(.is-handheld-workspace) .topbar .status-strip{order:0;height:48px;min-height:48px;justify-content:space-between;width:100%;display:flex!important}
body.mobile-resource-layout:not(.is-handheld-workspace) .topbar .browser-tabs-wrap{order:1;display:block;height:48px;min-height:48px}
body.mobile-resource-layout:not(.is-handheld-workspace) .topbar .browser-tabs-shell{width:100%;height:48px;padding:0;border:0;background:transparent}
body.mobile-resource-layout:not(.is-handheld-workspace) .topbar .browser-tab{height:44px;min-height:44px}
body.mobile-resource-layout:not(.is-handheld-workspace) .layout>.main.panel-scroll-region{top:calc(96px + var(--mobile-visual-top,0px));height:calc(var(--mobile-visual-height,100dvh) - 96px)}
body.mobile-resource-layout:not(.is-handheld-workspace) .workspace-actions-menu{top:calc(100px + var(--mobile-visual-top,0px));max-height:calc(var(--mobile-visual-height,100dvh) - 108px)}
body.mobile-resource-layout:not(.is-handheld-workspace) #chatToolDrawer{top:calc(96px + var(--mobile-visual-top,0px));height:calc(var(--mobile-visual-height,100dvh) - 96px)}
body.mobile-resource-layout:not(.is-handheld-workspace) #workspaceResourceShortcut{min-width:76px;min-height:44px;white-space:nowrap;box-shadow:none}
/* 手机工作台交互：手机顶栏显示当前日志，保存和任务状态仍属于原工作台；电脑保留标签。 */
.desktop-add-symbol{display:inline}
.composer-selection-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--ui-line);background:var(--ui-surface);flex-shrink:0}
.composer-selection-footer [role="status"]{flex-basis:100%;font-size:12px;color:var(--ui-muted)}
.composer-selection-footer [role="status"]:empty{display:none}
.composer-selection-footer button{min-height:44px;box-shadow:none}
.composer-source-choice{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:60px;padding:0 6px;white-space:nowrap;cursor:pointer}
.composer-source-choice input{width:18px;height:18px;accent-color:var(--ui-primary)}
/* 手机顶栏只读呈现当前日志；按钮固定两侧，长名称只在中间省略，不能挤掉入口。 */
body.mobile-resource-layout.is-handheld-workspace{--workspace-header-height:56px}
body.mobile-resource-layout.is-handheld-workspace .topbar{height:56px;min-height:56px;display:flex;align-items:stretch;padding:0 8px}
body.mobile-resource-layout.is-handheld-workspace .topbar .status-strip{height:56px;min-height:56px;display:grid!important;flex:1 1 100%;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;gap:5px;width:100%}
body.mobile-resource-layout.is-handheld-workspace .topbar .browser-tabs-wrap{display:none}
body.mobile-resource-layout.is-handheld-workspace .topbar .mobile-current-log{display:flex!important;min-width:0;flex-direction:column;gap:1px;text-align:center;line-height:1.4;color:var(--ui-text)}
.mobile-current-log strong,.mobile-current-log span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-current-log strong{font-size:14px;font-weight:600}
.mobile-current-log span{font-size:10px;color:var(--ui-muted);font-variant-numeric:tabular-nums}
body.mobile-resource-layout.is-handheld-workspace .topbar #workspaceActionsToggle,body.mobile-resource-layout.is-handheld-workspace #workspaceResourceShortcut{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;width:64px;min-width:64px;height:44px;min-height:44px;padding:6px 4px;border:0;border-radius:10px;background:transparent;box-shadow:none;color:var(--ui-text);font-size:13px;white-space:nowrap;position:relative}
body.mobile-resource-layout.is-handheld-workspace .workspace-actions-toggle>span{display:inline}
body.mobile-resource-layout.is-handheld-workspace .layout>.main.panel-scroll-region,body.mobile-resource-layout.is-handheld-workspace.workspace-idle .layout>.main.panel-scroll-region{top:calc(56px + var(--mobile-visual-top,0px));height:calc(var(--mobile-visual-height,100dvh) - 56px)}
body.mobile-resource-layout.is-handheld-workspace .workspace-actions-menu{top:calc(56px + var(--mobile-visual-top,0px) + 4px);max-height:calc(var(--mobile-visual-height,100dvh) - 68px);overflow-y:auto}
body.mobile-resource-layout.is-handheld-workspace #chatToolDrawer{top:calc(56px + var(--mobile-visual-top,0px));height:calc(var(--mobile-visual-height,100dvh) - 56px)}
body.resource-page-open .resource-row-actions{display:inline-flex;width:58px;gap:0;flex-direction:column;font-size:11px;color:var(--ui-text)}
body.resource-page-open .resource-row-actions::before{margin:0;width:20px;height:20px;flex-basis:20px}
body.resource-page-open .explorer-record{padding-right:70px;cursor:pointer}
body.resource-page-open .resource-open-cue{color:var(--ui-primary-strong);font-size:12px}
body.resource-page-open .resource-page-header #mobileResourceClose{background:transparent!important;box-shadow:none!important;color:var(--ui-text);border:1px solid var(--ui-line);border-radius:10px}
@media(max-width:900px),(pointer:coarse) and (max-width:1400px){
  #chatAddBtn .desktop-add-symbol{display:none}
  #chatAddBtn,#chatVoiceBtn{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:44px;width:44px;height:48px;min-height:48px;padding:3px;line-height:1.2;font-size:11px;box-shadow:none}
  #chatAddBtn::before{margin:0;flex-basis:20px}
  #chatAddBtn .add-action-icon{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;flex-shrink:0}
  #chatVoiceBtn .mobile-only-label{font-size:11px;line-height:1.2}
  #chatVoiceBtn .mobile-only-label,#chatAddBtn .mobile-only-label{white-space:nowrap;width:auto;min-width:24px;text-align:center}
  #chatVoiceBtn svg{width:21px;height:21px}
  /* 横屏触屏也沿用手机模式切换；停止和等待图标只属于下方圆形录音按钮。 */
  #chatVoiceBtn .composer-stop-icon,#chatVoiceBtn .composer-wait-icon{display:none!important}
  .chat-composer.is-voice-mode #chatVoiceBtn .composer-keyboard-icon{display:block}
  .chat-composer.is-voice-mode #chatVoiceBtn .composer-microphone-icon{display:none}
  .chat-composer{gap:5px}
  .chat-composer-input{min-width:0}
  /* 空输入不预留说明行；上传、录音及错误提示仍由实际状态填入。 */
  .chat-composer-hint:empty{display:none}
  .chat-generate-mount #generateBtn{display:flex;flex-direction:column;gap:1px;width:48px;min-width:48px;height:48px;min-height:48px;padding:3px;font-size:11px;line-height:1.2}
  .chat-generate-mount #generateBtn svg{display:block;width:21px;height:21px}
  .chat-generate-mount #generateBtn .composer-send-label{display:inline;font-size:11px;line-height:1.2}
  .composer-source-chip{min-height:44px;max-width:100%;white-space:normal;text-align:left;font-size:12px}
  .generation-option-buttons{flex-wrap:wrap;gap:4px}
  .generation-option-buttons button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .generation-option-buttons button::before{width:18px;height:18px;flex-basis:18px}
  .generation-options-status{font-size:12px;line-height:1.4}
  .generation-options-status:empty{display:none}
  .generation-options-retry{min-height:44px;font-size:12px}
  .chat-complete-heading{align-items:flex-start;gap:8px;flex-wrap:wrap}
  
  
  .generation-template-table-wrap::before{content:'左右滑动查看完整表格';display:block;font-size:12px;color:var(--ui-muted);padding:4px 0 8px}
  .generation-complete .chat-work-item-picker-wrap [data-chat-work-item]{width:54px;min-width:54px;flex-basis:54px;flex-direction:column;gap:5px;font-size:11px}
  .generation-complete [data-chat-path]{background:var(--ui-surface);min-height:44px}
  .work-picker-option,.work-picker-path button,.work-picker-footer button{min-height:44px}
  .chat-save-status{font-size:12px;line-height:1.5}
}
/* 低高度下只保留必要提示；内容与输入区分配沿用现有可视高度计算，不能覆盖天气。 */
@media(max-height:420px) and (max-width:900px){
  .generation-template-table-wrap::before{padding:2px 0}
  .chat-composer-hint:empty{display:none}
}
/* 保留用户选定的微信式排列：语音在左，输入居中，资料及发送在右；窄屏不另排一行。 */
@media(max-width:900px),(pointer:coarse) and (max-width:1400px){
  .chat-composer{grid-template-columns:44px minmax(0,1fr) 44px;gap:5px}
  .chat-composer.has-send-content{grid-template-columns:44px minmax(0,1fr) 44px 44px}
  .chat-composer #chatVoiceBtn{grid-row:1;grid-column:1}
  .chat-composer #chatComposerMount{grid-row:1;grid-column:2;min-width:0}
  .chat-composer .chat-add-wrap{grid-row:1;grid-column:3}
  .chat-composer #chatGenerateMount{grid-row:1;grid-column:4;justify-self:end}
  .chat-generate-mount #generateBtn{width:44px;min-width:44px!important}
}

/* 未读圆点浮在按钮角落，不占短标签的横向空间。 */
body.mobile-resource-layout.is-handheld-workspace .workspace-actions-toggle.has-unread::after{position:absolute;right:2px;top:7px}
body.mobile-resource-layout.is-handheld-workspace #workspaceActionsToggle svg{flex-shrink:0}

/* 窄电脑入口同样保留短标签，操作含义不能仅靠菜单图标识别。 */
body.mobile-resource-layout:not(.is-handheld-workspace) #workspaceActionsToggle{width:auto;min-width:76px;gap:6px}
body.mobile-resource-layout:not(.is-handheld-workspace) .workspace-actions-toggle>span{display:inline;white-space:nowrap}
