/* Approved four-level composition: platform → task rail → current task → content. */
.task-home-current-task { display: contents; }
@layer mobile-task {
@media (min-width: 761px) {
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面:not([hidden]) {
    top: calc(var(--lg-console-top-height, 56px) + 12px) !important;
    bottom: 48px !important;
    right: 22px !important;
    left: calc(var(--lg-console-sidebar-width, 220px) - 8px) !important;
    --task-rail-width: clamp(190px, 14vw, 230px);
    grid-template-columns: var(--task-rail-width) minmax(0, 1fr) !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > #IM窗口导航 {
    padding: 0 0 0 10px !important;
    background: #edf0f4 !important;
    border-radius: 8px 0 0 8px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .IM窗口导航标题 strong { font-size: 16px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM聊天窗口列表 .IM聊天窗口项 { min-height: 76px !important; padding-block: 16px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM聊天窗口列表 .IM聊天窗口项 strong { font-size: 15px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-process-view > header h2 { font-size: 24px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 :is(.task-process-heading, .task-process-view > header small) { font-size: 14px !important; line-height: 22px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .任务执行错误 { padding: 16px !important; font-size: 15px !important; line-height: 24px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 [data-task-after-sales] { font-size: 14px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-process-details > .task-process-notice { padding: 14px 16px !important; font-size: 14px !important; line-height: 22px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 :is(button, .任务操作状态) { font-size: 14px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 button { min-height: 44px !important; padding: 8px 20px !important; }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: #fff;
    border: 1px solid #e7ebf2;
    border-radius: 8px;
    overflow: hidden;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task > :is(.IM窗口, #IM任务面板) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task > .IM窗口:has(#IM消息区[data-task-detail-layout]) {
    overflow: visible !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task > #IM任务面板 {
    height: auto !important;
    margin: 76px 22px 116px 0 !important;
    padding: 20px !important;
    border: 1px solid #e8ecf2 !important;
    border-radius: 8px !important;
    background: #f6f7fa !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM任务面板 > header {
    flex-shrink: 0;
    padding: 0 0 16px !important;
    border: 0 !important;
    background: transparent !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM右侧内容预览 {
    background: transparent !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] {
    overflow: visible !important;
    background: transparent !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .task-detail-scroll {
    padding: 24px 22px calc(var(--task-detail-actions-height, 70px) + 48px) !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM任务消息 > .IM任务消息组.已选中 > :is(.task-process-view, .task-process-details, .task-home-storage) {
    margin: 0 0 20px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
    inset: auto calc(-100% + 22px) 20px 22px !important;
    min-height: 64px !important;
    padding: 18px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid #e0e6ef !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面:has(#IM表单:not([hidden])) #IM任务面板 {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
  }
}
  @media (max-width: 1100px) and (min-width: 761px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task { grid-template-columns: minmax(0, 1fr); }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task > #IM任务面板 { display: none !important; }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 { right: 22px !important; }
  }
}
/* Keep existing mobile view switching while the desktop grouping stays semantic. */
@layer mobile-task {
  @media (max-width: 760px) {
    html:root body[data-mobile-view][data-current-page="im"] #应用 #IM页面 > .task-home-current-task { display: contents !important; }
    html:root body[data-mobile-view][data-current-page="im"] #应用 #IM页面 > .task-home-current-task > :is(.IM窗口, #IM任务面板) {
      display: none !important;
      position: absolute !important;
      inset: 0 !important;
      width: 100% !important;
      height: 100% !important;
      min-width: 0 !important;
      min-height: 0 !important;
      max-height: none !important;
      margin: 0 !important;
      padding: 12px 12px calc(80px + env(safe-area-inset-bottom)) !important;
      border-radius: 0 !important;
      overflow: auto !important;
    }
    html:root body[data-current-page="im"]:is([data-mobile-view="detail"], [data-mobile-view="form"]) #应用 #IM页面 > .task-home-current-task > .IM窗口,
    html:root body[data-current-page="im"][data-mobile-view="preview"] #应用 #IM页面 > .task-home-current-task > #IM任务面板 { display: flex !important; }
  }
}

/* One spacing/radius vocabulary for the existing task surfaces and controls. */
@layer mobile-task {
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 {
    --task-ui-radius-panel: 8px;
    --task-ui-radius-item: 8px;
    --task-ui-radius-control: 8px;
    --task-ui-space: 16px;
    --task-progress-selected: #eef0f3;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 :is(.task-process-notice, .task-process-current, .task-status-read-error) {
    border-radius: var(--task-ui-radius-item) !important;
    overflow-wrap: anywhere;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 :is(#一键清空IM窗口, #新建IM窗口, .任务停止删除操作 button, #IM提交按钮, .IM飞书选择器按钮, .IM当前模板卡, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-radius: var(--task-ui-radius-control) !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 :is(.IM表单字段 select, .IM表单字段 input:not([type="checkbox"]):not([type="radio"]), .IM需求字段 textarea, .IM飞书选择器按钮) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding-inline: 12px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM窗口隐私说明 {
    padding: 12px 16px 16px !important;
    background: transparent !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .IM窗口导航标题 {
    padding-inline: 16px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM聊天窗口列表 .IM聊天窗口项 {
    padding-left: 16px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] .mobile-primary-entry {
    border-radius: 8px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] .mobile-recent-entry {
    border-radius: 8px !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-home-current-task > .IM窗口:has(#IM表单:not([hidden])) > #IM消息区 {
    display: none !important;
  }
  html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-row {
    padding-block: 12px !important;
    padding-left: var(--task-ui-space) !important;
    padding-right: var(--task-ui-space) !important;
  }
  @media (max-width: 1100px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-list {
      width: 100% !important;
      max-width: 100% !important;
      margin-right: 0 !important;
      padding: 12px 0 !important;
      border-radius: var(--task-ui-radius-item) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-row {
      padding-right: var(--task-ui-space) !important;
      border-radius: var(--task-ui-radius-item) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-row[data-preview-selected="true"] {
      background: var(--task-progress-selected) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-row::before,
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 .task-image-progress-row::after { content: none !important; }
  }
  @media (max-width: 760px) {
    html:root body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"][data-mobile-view] #应用 #IM页面 #IM任务消息 > .IM任务消息组 > :is(.task-process-view, .task-process-details, .task-home-storage) {
      box-sizing: border-box !important;
      min-width: 0 !important;
      padding: var(--task-ui-space) !important;
      border: 1px solid #e2e7ee !important;
      border-radius: var(--task-ui-radius-panel) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
      padding: 16px !important;
      gap: 12px !important;
      border-radius: var(--task-ui-radius-panel) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-mobile-view="detail"] #应用 #IM页面 > .task-home-current-task > .IM窗口:has(#IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"]) {
      padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] {
      align-items: center !important;
      gap: 12px !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] .任务操作状态 {
      flex: 1 1 0 !important;
      min-width: 0 !important;
      margin: 0 auto 0 0 !important;
      overflow-wrap: anywhere;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] button {
      flex: 0 0 auto !important;
      min-width: 0 !important;
      width: auto !important;
      margin: 0 !important;
      padding: 8px 12px !important;
      white-space: nowrap !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] > .主操作 {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 0 !important;
      background: var(--feishu-color-primary, #3370ff) !important;
      color: #fff !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] > button[hidden] { display: none !important; }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-mobile-view="preview"] #应用 #IM页面 > .task-home-current-task > #IM任务面板 {
      padding: 24px 24px calc(24px + env(safe-area-inset-bottom)) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-mobile-view="form"] #应用 #IM页面 > .task-home-current-task > .IM窗口:has(#IM表单:not([hidden])) {
      padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-mobile-view="preview"] #应用 #IM页面 #IM任务面板 > .mobile-preview-back {
      align-self: flex-start;
      margin: 0 0 16px !important;
      padding: 8px 12px !important;
      border-radius: var(--task-ui-radius-control) !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 :is(.任务执行说明, .任务执行错误) {
      padding: 12px 16px !important;
    }
  }
  @media (max-width: 600px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] > .主操作 {
      flex: 1 0 100% !important;
      width: 100% !important;
    }
  }
  @media (max-width: 380px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] {
      padding: 12px !important;
      gap: 8px !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] .任务操作状态 { font-size: 12px !important; }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > [data-mobile-task-actions="unified"] button {
      padding-inline: 8px !important;
      font-size: 13px !important;
    }
  }
  @media (min-width: 761px) and (max-width: 1100px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
      flex-wrap: nowrap !important;
      align-items: center !important;
      gap: 8px !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 .任务操作状态 {
      flex: 1 1 0 !important;
      min-width: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 button {
      flex: none !important;
      min-width: 0 !important;
      padding: 8px 12px !important;
      font-size: 13px !important;
      white-space: nowrap !important;
    }
  }
}

/* The task title and actions own both body columns; existing nodes keep their handlers. */
@layer mobile-task {
  @media (min-width: 1101px) {
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) {
      grid-template-areas: "heading heading" "progress preview" "actions actions";
      grid-template-rows: auto minmax(0, 1fr) auto;
      gap: 20px 22px;
      padding: 24px 22px 20px;
      box-sizing: border-box;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) > .IM窗口,
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout],
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .task-detail-scroll,
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] #IM任务消息,
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .IM任务消息组.已选中 {
      display: contents !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM任务消息 > .IM任务消息组.已选中 > .task-process-view {
      grid-area: heading;
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM任务消息 > .IM任务消息组.已选中 > .task-process-view > header {
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM任务消息 > .IM任务消息组.已选中 > .task-process-details {
      grid-area: progress;
      display: block !important;
      min-height: 0;
      margin: 0 !important;
      overflow: auto !important;
      scrollbar-width: thin;
      overscroll-behavior: contain;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) > #IM任务面板 {
      grid-area: preview;
      margin: 0 !important;
      height: auto !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
      grid-area: actions;
      position: relative !important;
      inset: auto !important;
      max-height: none !important;
      min-height: 0 !important;
      margin: 0 !important;
      padding: 16px 0 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-image-progress-list {
      box-sizing: border-box;
      width: 100% !important;
      max-width: 100% !important;
      margin-right: 0 !important;
    }
  }
}

.task-failure-info { display: none; }

/* Keep failure details below the progress and preview in the full desktop workbench. */
@layer mobile-task {
  @media (min-width: 1101px) {
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(#IM消息区[data-task-detail-layout] .task-process-feedback) {
      grid-template-columns: repeat(6, minmax(0, 1fr));
      grid-template-areas: "heading heading heading heading heading heading" "progress progress progress preview preview preview" "feedback feedback feedback feedback actions actions";
      grid-template-rows: auto minmax(0, 1fr) auto;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-view:has(.task-process-feedback),
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-view:has(.task-process-feedback) > .任务进度主体 {
      display: contents !important;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-view:has(.task-process-feedback) > header {
      grid-area: heading;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-feedback {
      grid-area: feedback;
      position: relative;
      min-width: 0;
      margin: 0 !important;
      padding: 16px 0 0 !important;
      background: transparent !important;
      border: 0 !important;
      border-top: 1px solid #e0e6ef !important;
      border-radius: 0 !important;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-feedback > .任务执行错误 { display: none !important; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info { display: block !important; position: relative; flex: none; min-width: 0; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info > summary { display: inline-flex; align-items: center; gap: 5px; color: #68758a; font-size: 13px; line-height: 20px; list-style: none; cursor: pointer; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info > summary::-webkit-details-marker { display: none; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info > summary span { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 600; line-height: 1; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info > summary:hover { color: #3564f5; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info > summary:focus-visible { outline: 2px solid #3564f5; outline-offset: 3px; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info-popover { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 30; box-sizing: border-box; width: min(440px, calc(100vw - 48px)); max-height: min(260px, 45vh); overflow: auto; padding: 12px 14px; border: 1px solid #dce3ec; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(31, 41, 55, .12); color: #657286; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info-popover strong { display: block; color: #344154; font-size: 13px; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-failure-info-popover p { margin: 6px 0 0; white-space: pre-wrap; }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 #IM消息区[data-task-detail-layout] .task-process-feedback::after {
      content: "";
      position: absolute;
      right: -22px;
      top: -1px;
      width: 22px;
      height: 1px;
      background: #e0e6ef;
      pointer-events: none;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(.task-process-feedback) #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
      flex-wrap: wrap !important;
    }
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(.task-process-feedback) #IM消息区[data-task-detail-layout] > .任务停止删除操作 button {
      min-width: 0 !important;
      padding-inline: 12px !important;
    }
  }
  @media (min-width: 1101px) and (max-width: 1300px) {
    html:root:not([data-client-mode="im-lite"]) body[data-lg-navigation-ready][data-current-page="im"][data-workbench="xhs"] #应用 #IM页面 > .task-home-current-task:has(.task-process-feedback) #IM消息区[data-task-detail-layout] > .任务停止删除操作 .任务操作状态 {
      flex-basis: 100%;
      margin-right: 0;
    }
  }
}

/* Keep the template upload's page preview accessible in the Codex side window. */
@layer mobile-task {
  @media (min-width: 761px) and (max-width: 1100px) {
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) {
      grid-template: "heading heading" auto "progress preview" minmax(0, 1fr) "actions actions" auto / minmax(0, 1fr) minmax(0, .85fr);
      gap: 12px;
      padding: 18px;
      box-sizing: border-box;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) > .IM窗口,
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout],
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout] :is(.task-detail-scroll, #IM任务消息, .IM任务消息组.已选中) {
      display: contents !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout] .task-process-view {
      grid-area: heading;
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout] .task-process-view > header {
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout] .task-process-details {
      grid-area: progress;
      min-width: 0;
      overflow: auto !important;
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 > .task-home-current-task:has(#IM消息区[data-task-detail-layout]) > #IM任务面板 {
      grid-area: preview;
      display: flex !important;
      height: auto !important;
      padding: 12px !important;
      margin: 0 !important;
    }
    html:root body[data-current-page="im"][data-workbench="xhs"][data-im-current-column="xhs_template_import"] #应用 #IM页面.IM含内容预览 #IM消息区[data-task-detail-layout] > .任务停止删除操作 {
      grid-area: actions;
      position: relative !important;
      inset: auto !important;
      min-height: 0 !important;
      margin: 0 !important;
      padding: 12px 0 0 !important;
    }
  }
}
