/* 首页上传提示采用设计稿深色气泡；长文案和窄屏自动增高，保留完整限制说明。 */
.jufa-home-page .as-tooltip__popper.jufa-home-upload-tooltip {
  width: 358.5px;
  max-width: calc(100vw - 16px);
  min-height: 64px;
  box-sizing: border-box;
  padding: 10px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: #333333;
  color: #FFFFFF;
  box-shadow: none;
  font: 400 14px/22px "Microsoft YaHei", sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}

/* 工具栏短说明沿用上传气泡视觉，尺寸随内容增长，长文案仅受视口宽度限制。 */
.jufa-home-page .as-tooltip__popper.jufa-home-toolbar-tooltip {
  width: max-content;
  min-height: 0;
}

.jufa-home-page .jufa-home-upload-tooltip[data-placement="top"] .as-tooltip__arrow,
.jufa-home-page .jufa-home-upload-tooltip[data-placement="top"] .as-tooltip__arrow:after {
  border-top-color: #333333;
}

.jufa-home-page .jufa-home-upload-tooltip[data-placement="bottom"] .as-tooltip__arrow,
.jufa-home-page .jufa-home-upload-tooltip[data-placement="bottom"] .as-tooltip__arrow:after {
  border-bottom-color: #333333;
}

:root {
  --home-header-height: 46px;
  --home-accent: #333;
  --home-accent-soft: rgba(227, 227, 227, .4);
  --home-bg: #fff;
  --home-sidebar: #f5f5f8;
  --home-text: #333;
  --home-muted: #999;
  --home-border: #e3e3e3;
}

html,
body.jufa-home-page {
  width: 100%;
  height: 100%;
  min-width: 0 !important;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  color: var(--home-text);
  background: var(--home-bg);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.jufa-home-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - var(--home-header-height));
  /* 按真实视口分配空间，短窗口不能被最小高度撑到屏幕外。 */
  min-height: 0;
  background: var(--home-bg);
}

.jufa-home-page--embedded .jufa-home-layout {
  height: 100vh;
  min-height: 0;
}

.jufa-home-sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 242px;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  padding: 8px 13px 16px 12px;
  /* 下级固定定位菜单需越过侧栏边界，避免 Safari 将其裁切；历史列表保留自身滚动。 */
  overflow: visible;
  border-right: 1px solid #e3e3e3;
  background: var(--home-sidebar);
  scrollbar-width: none;
}

.jufa-home-sidebar-toggle {
  position: absolute;
  /* 取消 Safari 原生按钮绘制，显式居中箭头并避开侧栏覆盖边界。 */
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  /* 位于侧栏背景之上、菜单容器(z-index:2)之下；跟随实际侧栏宽度，不依赖固定left。 */
  z-index: 1;
  top: calc(50vh - var(--home-header-height) - 33px);
  right: -18px;
  width: 16px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.jufa-home-sidebar-toggle > svg {
  display: block;
  flex: 0 0 8px;
  width: 8px;
  height: 28px;
  overflow: visible;
}

.jufa-home-sidebar-toggle path { fill: none; stroke: #D6DAE1; stroke-width: 4px; stroke-linecap: round; }

.jufa-home-sidebar.is-collapsed {
  flex-basis: 62px;
  padding-right: 13px;
}

.jufa-home-sidebar-toggle.is-collapsed > svg { transform: scaleX(-1); }

.jufa-home-sidebar.is-collapsed > .jufa-home-new-task,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge[data-home-knowledge] {
  justify-content: center;
  width: 36px;
  padding: 8px;
}

.jufa-home-sidebar.is-collapsed .jufa-home-new-task > span,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__label,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__icon:last-child,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge__label { display: none; }

.jufa-home-sidebar.is-collapsed > .jufa-home-new-task > .jufa-home-menu__icon,
.jufa-home-sidebar.is-collapsed .jufa-home-menu > .jufa-home-menu__item > .jufa-home-menu__control > .jufa-home-menu__icon,
.jufa-home-sidebar.is-collapsed .jufa-home-knowledge__icon[aria-hidden="true"] { margin-right: 0; }

.jufa-home-sidebar.is-collapsed .jufa-home-sidebar-divider { width: 36px; }

.jufa-home-sidebar::-webkit-scrollbar {
  display: none;
}

.jufa-home-new-task,
.jufa-home-menu__control {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.jufa-home-new-task {
  color: #333;
  background: rgba(227, 227, 227, .4);
  font-weight: 400;
}

.jufa-home-new-task:hover,
.jufa-home-new-task.is-active,
.jufa-home-menu__control:hover,
.jufa-home-menu__control:focus,
.jufa-home-menu__control:focus-visible {
  color: #333;
  background: rgba(227, 227, 227, .4);
  outline: 0;
  text-decoration: none;
}

.jufa-home-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  color: currentColor;
  font-size: 18px;
  line-height: 20px;
}

.jufa-home-menu__icon--image {
  padding: 0;
  object-fit: contain;
}

.jufa-home-menu-wrap {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-height: 0;
  margin-top: 10px;
  /* 上下各留出 10px 固定空隙，滚动菜单不紧贴新建任务和历史区分隔线。 */
  margin-bottom: 10px;
  /* 菜单优先让出历史所需空间；下级菜单由原生顶层浮层避免滚动裁切。 */
  overflow-x: hidden;
  overflow-y: auto;
  /* 菜单溢出时显示浅灰滑块，高度随可见区域与内容比例自适应。 */
  scrollbar-width: thin;
  scrollbar-color: #E3E3E3 transparent;
}

.jufa-home-menu-wrap::-webkit-scrollbar {
  /* 覆盖聚法AI公共样式对所有滚动条设置的 display:none。 */
  display: block;
  width: 6px;
}

.jufa-home-menu-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.jufa-home-menu-wrap::-webkit-scrollbar-thumb {
  border-radius: 1px;
  background: #E3E3E3;
}

/* 支持伪元素的浏览器使用精确6px宽度，其他浏览器保留上方原生细滚动条。 */
@supports selector(::-webkit-scrollbar) {
  .jufa-home-menu-wrap {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}

.jufa-home-menu,
.jufa-home-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jufa-home-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jufa-home-menu__item {
  position: relative;
  margin: 0;
}

.jufa-home-menu__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 一级组合文字各自可点击，展开箭头独立，保持原菜单行的尺寸和层级定位。 */
.jufa-home-menu__segment {
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
}
/* 鼠标点击不显示浏览器默认焦点框；悬浮蓝字无下划线，键盘焦点单独保留。 */
body.jufa-home-page .jufa-home-menu__segment:focus { outline: none; text-decoration: none; }
body.jufa-home-page .jufa-home-menu__segment:hover,
body.jufa-home-page .jufa-home-menu__segment:focus-visible { color: #0a5de7; text-decoration: none; }
.jufa-home-menu__segment[aria-disabled="true"] { opacity: .5; cursor: default; text-decoration: none; }
.jufa-home-menu__expand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 20px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
}
.jufa-home-menu__expand > .jufa-home-menu__icon { margin: 0; font-size: 16px; }
body.jufa-home-page .jufa-home-menu__segment:focus-visible,
.jufa-home-menu__expand:focus-visible { outline: 2px solid #0a5de7; outline-offset: 1px; }
.jufa-home-sidebar.is-collapsed .jufa-home-menu__expand { display: none; }

/* 仅调整可用一级菜单文字，保留图标、二级菜单及禁用状态原色。 */
.jufa-home-menu > .jufa-home-menu__item:not(.is-disabled) > .jufa-home-menu__control > .jufa-home-menu__label {
  color: #666666;
}

.jufa-home-menu__control > .jufa-home-menu__icon:last-child {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0 0 0 8px;
  color: #666;
  font-size: 16px;
  line-height: 16px;
}

.jufa-home-submenu {
  position: fixed;
  top: var(--home-submenu-top, 0px);
  left: var(--home-submenu-left);
  display: none;
  flex-direction: column;
  gap: 6px;
  width: var(--home-submenu-width);
  max-height: var(--home-submenu-max-height, calc(100vh - 32px));
  box-sizing: border-box;
  padding: 4px;
  overflow-x: visible;
  overflow-y: auto;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

/* 原生 popover 默认居中，沿用已有固定定位坐标和菜单宽度。 */
.jufa-home-submenu[popover] { margin: 0; right: auto; bottom: auto; }

.jufa-home-submenu .jufa-home-menu__control {
  padding: 8px;
  color: #666;
}

/* 仅由统一交互状态控制浮层，避免已点击叶子的焦点或悬停重新撑开旧分支。 */
.jufa-home-menu__item.is-submenu-open > .jufa-home-submenu {
  display: flex;
}

.jufa-home-menu__item.is-disabled .jufa-home-menu__control {
  color: #b4b7c1;
  cursor: not-allowed;
}

.jufa-home-sidebar__empty,
.jufa-home-history__empty {
  margin: 12px 8px;
  color: #a0a4b0;
  font-size: 12px;
}

.jufa-home-sidebar-footer {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  /* 两组各136px、用户入口46px及分隔线/间距31px；上方菜单可独立滚动。 */
  min-height: 349px;
}

/* 双十一活动位位于历史列表与用户卡片之间。 */
.jufa-home-sidebar-footer--double11 { min-height: 431px; }
.jufa-home-double11-banner {
  position: relative;
  flex: 0 0 72px;
  width: 216px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.jufa-home-double11-banner__bg { display: block; width: 216px; height: 72px; }
.jufa-home-double11-banner__button { position: absolute; right: 8px; bottom: 9px; width: 69px; height: 24px; animation: homeDouble11ButtonBreath 1.6s ease-in-out infinite; }
.jufa-home-double11-banner ~ .jufa-home-user .jufa-home-upgrade { display: none; }
.jufa-home-sidebar.is-collapsed .jufa-home-double11-banner { display: none; }
.jufa-home-sidebar.is-collapsed .jufa-home-sidebar-footer--double11 { min-height: 349px; }
@keyframes homeDouble11ButtonBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.jufa-home-sidebar-divider {
  display: block;
  flex: 0 0 1px;
  width: 216px;
  height: 1px;
  background: #e3e3e3;
}

/* 新建任务下方分隔线按设计图位于 36px 按钮后的第 46px，并保持首个菜单原有纵向位置。 */
.jufa-home-sidebar-divider--new-task {
  margin-top: 10px;
}

.jufa-home-knowledge {
  display: flex;
  align-items: center;
  flex: 0 0 36px;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: #666;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-decoration: none;
}

.jufa-home-knowledge:hover,
.jufa-home-knowledge:focus,
.jufa-home-knowledge:focus-visible {
  color: #666;
  background: rgba(227, 227, 227, .4);
  outline: 0;
  text-decoration: none;
}

/* 覆盖旧Bootstrap普通焦点；仅键盘导航保留蓝色提示，不用blur破坏焦点。 */
body.jufa-home-page .jufa-home-menu__control:focus-visible,
body.jufa-home-page .jufa-home-knowledge:focus-visible {
  outline: 2px solid #076cf1;
  outline-offset: -2px;
}

.jufa-home-knowledge__icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.jufa-home-knowledge__label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jufa-home-history {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
  width: 216px;
  height: auto;
  min-height: 0;
}

.jufa-home-history[hidden] { display: none; }

/* 两个标题和至少两条记录保留可用高度，较长菜单在上方独立滚动。 */
.jufa-home-sidebar:not(.is-collapsed) .jufa-home-history { min-height: 136px; }

/* 收藏按内容占高，长列表内部滚动；其余空间交给最近提问。 */
.jufa-home-sidebar:not(.is-collapsed) .jufa-home-history[data-home-history-section="favorite"] {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 40%;
}

.jufa-home-history[data-home-history-section="favorite"] .jufa-home-history__list {
  flex-basis: auto;
}

.jufa-home-history[data-home-history-section="favorite"] .jufa-home-history__search {
  display: none;
}

.jufa-home-sidebar:not(.is-collapsed) .jufa-home-history.is-list-collapsed {
  flex: 0 0 auto;
  min-height: 28px;
}

.jufa-home-history-compact {
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 35px;
  height: 28px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  color: #666;
  background: rgba(227, 227, 227, .6);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 11px;
  cursor: pointer;
}

.jufa-home-history-compact:not([hidden]) { display: flex; }
.jufa-home-history-compact > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 20px;
  border-radius: 4px;
  background: #fff;
}

.jufa-home-history__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 216px;
  min-height: 28px;
}

.jufa-home-history__header[hidden] { display: none; }

.jufa-home-history__tabs {
  display: flex;
  flex-direction: column;
  flex: 0 0 216px;
  gap: 2px;
  width: 216px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.jufa-home-history__tabs[hidden] {
  display: flex !important;
  visibility: hidden;
}

.jufa-home-history__tab {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 0 0 28px;
  width: 216px;
  height: 28px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  color: #999;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 11px;
  cursor: pointer;
}

.jufa-home-history__tab.is-active {
  color: #999;
  background: transparent;
  font-weight: 400;
}
.jufa-home-history__tab[hidden] { display: none !important; }
.jufa-home-history__list[hidden] { display: none !important; }
.jufa-home-history__tab > i { display: inline-block; width: 16px; height: 16px; font-size: 16px; line-height: 16px; }
.jufa-home-history__tab.is-active > i { transform: rotate(90deg); }

.jufa-home-history__tab:focus-visible {
  outline: 1px solid #999;
  outline-offset: -1px;
}

.jufa-home-history__search {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-right: 0;
  color: #040000;
  transition: width .3s ease, flex-basis .3s ease;
}

.jufa-home-history__search.is-expanded {
  bottom: 0;
  justify-content: flex-start;
  flex: 0 0 200px;
  gap: 6px;
  width: 200px;
  height: 28px;
  box-sizing: border-box;
  margin-right: 0;
  padding: 0 6px;
  border: 1px solid #e8eaf2;
  border-radius: 8px;
  background: #fff;
}

.jufa-home-history__search.is-expanded:focus-within {
  border-color: #076cf1;
}

.jufa-home-history__search-trigger,
.jufa-home-history__search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.jufa-home-history__search-trigger img {
  display: block;
  width: 16px;
  height: 16px;
}

.jufa-home-history__search-trigger:focus-visible,
.jufa-home-history__search-clear:focus-visible {
  border-radius: 2px;
  outline: 1px solid #076cf1;
  outline-offset: 1px;
}

.jufa-home-history__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #333;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 24px;
}

.jufa-home-history__search-input::placeholder {
  color: #999;
}

.jufa-home-history__search-input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.jufa-home-history__search-clear {
  color: #999;
}

.jufa-home-history__search-clear .iconfont {
  font-size: 12px;
  line-height: 16px;
}

.jufa-home-history__search [hidden] {
  display: none !important;
}

.jufa-home-history__list {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 2px;
  width: 216px;
  height: auto;
  min-height: 0;
  overflow-y: auto;
}

.jufa-home-history__item {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  gap: 6px;
  width: 216px;
  height: 32px;
  box-sizing: border-box;
  /* 右侧沿用侧栏外层留白，避免与行内8px叠加。 */
  padding: 8px 0 8px 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

/* 分页状态在历史滚动区内，不挤占固定批量操作栏。 */
.jufa-home-history__page-status {
  flex: 0 0 32px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font: 12px/20px "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.jufa-home-history__page-status:disabled {
  color: #999;
  cursor: default;
}

.jufa-home-history__page-status:focus-visible {
  outline: 1px solid #005fff;
  outline-offset: -2px;
}

.jufa-home-history__page-status[hidden] {
  display: none;
}

.jufa-home-history__item:hover,
.jufa-home-history__item:focus-visible {
  color: #333;
  background: rgba(227, 227, 227, .4);
  outline: 0;
}

.jufa-home-history__title {
  color: #777777;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jufa-home-history__open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 18px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.jufa-home-history__open:focus-visible {
  outline: 1px solid #999;
  outline-offset: 2px;
}

.jufa-home-history__select {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history.is-batch .jufa-home-history__select {
  display: inline-flex;
}

.jufa-home-history__item.is-selected .jufa-home-history__select {
  border-color: #333;
  background: #333;
}

.jufa-home-history__item.is-selected .jufa-home-history__select > span {
  width: 8px;
  height: 4px;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.jufa-home-history__more {
  /* 覆盖末尾而不参与排版，避免悬停或键盘聚焦时文字再次截断。 */
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #333;
  padding: 0;
  border: 0;
  background: var(--home-sidebar, #f5f5f7);
  opacity: 0;
  pointer-events: none;
}

.jufa-home-history__item:hover .jufa-home-history__more {
  background: linear-gradient(rgba(227, 227, 227, .4), rgba(227, 227, 227, .4)), var(--home-sidebar, #f5f5f7);
}

.jufa-home-history__item:hover .jufa-home-history__more,
.jufa-home-history__item:focus-within .jufa-home-history__more {
  display: inline-flex;
  opacity: 1;
  pointer-events: auto;
}

.jufa-home-history.is-batch .jufa-home-history__more {
  display: none;
}

.jufa-home-history__more .iconfont {
  font-size: 16px;
  line-height: 16px;
}

/* 历史三点弹层采用 MasterGo「首页/文件回显/本地上传」的自适应菜单。 */
.jufa-home-history__menu {
  position: fixed;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 120px;
  height: auto;
  box-sizing: border-box;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e3e3e3, 0 4px 12px rgba(0, 0, 0, .1);
}

.jufa-home-history__menu[hidden] {
  display: none;
}

.jufa-home-history__menu-item {
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  gap: 6px;
  width: 112px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 17px;
  text-align: left;
  cursor: pointer;
}

.jufa-home-history__menu-item:hover,
.jufa-home-history__menu-item:focus-visible {
  background: rgba(227, 227, 227, .4);
  outline: 0;
}

.jufa-home-history__menu-item .iconfont {
  flex: 0 0 16px;
  font-size: 16px;
}

.jufa-home-history__menu-item.is-danger {
  color: #e03333;
}

.jufa-home-history__menu-item.is-danger:hover,
.jufa-home-history__menu-item.is-danger:focus-visible {
  color: #e03333;
  background: #fdeffe;
}

/* 历史批量操作区采用 MasterGo 图层 634:16594 的尺寸、间距和按钮状态。 */
.jufa-home-history__batch {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  width: 216px;
  height: 74px;
  box-sizing: border-box;
  background: var(--home-sidebar);
}

.jufa-home-history__batch[hidden] {
  display: none;
}

/* 批量模式为底部操作区弹性预留 74px，保证不同视口下最后一条记录都可滚动到操作区上方。 */
.jufa-home-history.is-batch .jufa-home-history__list {
  height: auto;
  margin-bottom: 74px;
}

.jufa-home-history__select-all {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 32px;
  gap: 6px;
  width: 200px;
  height: 32px;
  padding: 0;
  border: 0;
  color: #333;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}

.jufa-home-history__check {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  background: #fff;
}

.jufa-home-history__select-all.is-checked .jufa-home-history__check,
.jufa-home-history__select-all.is-half .jufa-home-history__check {
  border-color: #333;
  background: #333;
}

.jufa-home-history__select-all.is-checked .jufa-home-history__check::after {
  display: block;
  width: 8px;
  height: 4px;
  margin: 3px auto 0;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  content: "";
  transform: rotate(-45deg);
}

.jufa-home-history__select-all.is-half .jufa-home-history__check::after {
  display: block;
  width: 8px;
  height: 2px;
  margin: 5px auto 0;
  background: #fff;
  content: "";
}

.jufa-home-history__batch-actions {
  display: flex;
  gap: 10px;
  width: 200px;
}

.jufa-home-history__batch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 95px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #e03333;
  border-radius: 6px;
  color: #e03333;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.jufa-home-history__batch-action:not(:disabled):hover {
  background: #fdeffe;
}

.jufa-home-history__batch-action:not(:disabled):focus-visible {
  background: #fdeffe;
  outline: 0;
}

.jufa-home-history__batch-action:disabled {
  color: #999;
  border-color: #e3e3e3;
  background: #fff;
  cursor: default;
}

.jufa-home-history__batch-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 95px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  color: #333;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.jufa-home-history__batch-cancel:focus-visible {
  outline: 1px solid #999;
  outline-offset: 1px;
}

.jufa-home-history__batch-action .iconfont,
.jufa-home-history__batch-cancel .iconfont {
  flex: 0 0 16px;
  font-size: 16px;
  line-height: 16px;
}

.jufa-home-history__rename-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
}

.jufa-home-history__rename-mask[hidden] {
  display: none;
}

.jufa-home-history__rename-dialog {
  width: 360px;
  box-sizing: border-box;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.jufa-home-history__rename-dialog h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.jufa-home-history__rename-dialog input {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  outline: 0;
}

.jufa-home-history__rename-dialog input:focus {
  border-color: #0a5de7;
}

.jufa-home-history__rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.jufa-home-history__rename-actions button {
  min-width: 64px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history__rename-actions button:last-child {
  border-color: #0a5de7;
  color: #fff;
  background: #0a5de7;
}

/* 单条与批量删除共用确认弹窗，所有关闭路径都在确认前保持零删除请求。 */
.jufa-home-history__delete-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
}

.jufa-home-history__delete-mask[hidden] {
  display: none;
}

.jufa-home-history__delete-dialog {
  width: 360px;
  box-sizing: border-box;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.jufa-home-history__delete-dialog h3 {
  margin: 0 0 12px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.jufa-home-history__delete-dialog p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 22px;
}

.jufa-home-history__delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.jufa-home-history__delete-actions button {
  min-width: 64px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  color: #333;
  background: #fff;
  cursor: pointer;
}

.jufa-home-history__delete-actions button.is-danger {
  border-color: #e03333;
  color: #fff;
  background: #e03333;
}

.jufa-home-history__delete-actions button:disabled {
  opacity: .55;
  cursor: default;
}

.jufa-home-workspace {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--home-bg);
  box-sizing: border-box;
  border: 1px solid var(--home-border);
  border-bottom: 0;
  border-right: 0;
  border-radius: 20px 0 0 0;
}

/* 首页拖拽提示仅覆盖右侧可见区，不影响侧栏、顶部导航及普通输入点击。 */
.jufa-home-workspace > .jufa-ai-drag-upload-mask {
  bottom: auto;
  padding: 24px;
  overflow-anchor: none;
}

@media (max-width: 600px) {
  .jufa-home-workspace > .jufa-ai-drag-upload-mask .jufa-ai-drag-upload-mask__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
  }

  .jufa-home-workspace > .jufa-ai-drag-upload-mask .jufa-ai-drag-upload-mask__title {
    font-size: 16px;
  }
}

/* 桌面版入口严格采用 MasterGo 634:16231 的 117×36 画布与 20px 官方导出图标。 */
.jufa-home-desktop-download {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 8;
  display: flex;
  width: 117px;
  height: 36px;
  padding: 0 10px 0 11px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  border: 1px solid #e3e3e3;
  border-radius: 20px;
  color: #9e9e9e;
  background: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
}

.jufa-home-desktop-download:hover,
.jufa-home-desktop-download:focus-visible {
  border-color: #0a5de7;
  color: #0a5de7;
  outline: 0;
}

.jufa-home-desktop-download img {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.jufa-home-page--embedded .jufa-home-desktop-download {
  display: none !important;
}

.jufa-home-page--embedded .jufa-home-workspace {
  width: 100%;
  border: 0;
  border-radius: 0;
}

/* 普通首页取消顶部描边，背景从header下沿开始，保留左侧分隔线与圆角。 */
.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-workspace {
  border-top: 0;
}

/* MasterGo 436:007312：装饰只在普通首页出现，原生地图和渐变随工作区滚动，不拦截控件。 */
.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-workspace::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 325px;
  border-radius: inherit;
  pointer-events: none;
  background-image: url(/static/Public/images/new_home/home-ai-map-3x.png), linear-gradient(180deg, #034dec -5%, #034decbc 6%, #034dec6d 25%, #034dec27 43%, #034dec00 70%);
  background-position: center top;
  background-size: 1199px 324px, 100% 324px;
  background-repeat: no-repeat;
}

/* 平台顶面白边与452px侧面等宽，窄屏同步缩放；中心比工作区中心向左7px。 */
.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-workspace::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 175.08px;
  left: calc(50% - 7px);
  width: min(469px, 100%);
  height: 100.61px;
  transform: translateX(-50%);
  pointer-events: none;
  background-image: url(/static/Public/images/new_home/home-ai-platform-top-3x.png), linear-gradient(180deg, #ccdef96e 3%, #f0f6ff00 49%);
  background-position: center top, center 14.08px;
  background-size: 96.375% 14.09px, 96.375% 86.53px;
  background-repeat: no-repeat;
}

/* 会话加载、问答及错误状态不绘制首页装饰；返回input状态自动恢复。 */
.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-workspace[data-assistant-state]:not([data-assistant-state="input"])::before,
.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-workspace[data-assistant-state]:not([data-assistant-state="input"])::after {
  display: none;
}

.jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-hero {
  z-index: 1;
  padding-top: 122px;
}

/* 桌面标题按原图449px起点对齐；窄屏仍由原布局居中。 */
@media (min-width: 1101px) {
  .jufa-home-page:not(.jufa-home-page--embedded) .jufa-home-slogan {
    transform: translateX(-17px);
  }
}

.jufa-home-slogan__comma {
  letter-spacing: -12px;
}

.jufa-home-hero {
  position: relative;
  left: 4px;
  width: min(774px, calc(100% - 72px));
  margin: 0 auto;
  padding: 110px 0 50px;
}

.jufa-home-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 76px;
  color: #333;
  font-family: "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0;
  text-align: center;
}

.jufa-home-slogan__logo {
  display: block;
  width: 36px;
  height: 35px;
  object-fit: contain;
}

.jufa-home-slogan__accent {
  color: inherit;
}

/* 复用旧问答页的 gloss 扫光，新首页周期从 3 秒延长为 6 秒。 */
.jufa-home-slogan .jufa-home-slogan__text {
  animation-duration: 6s;
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  height: auto;
  line-height: inherit;
  letter-spacing: inherit;
  padding-left: 0;
}

.jufa-home-mode-scroller {
  position: relative;
  width: 100%;
  height: 32px;
  margin-bottom: 12px;
  overflow: hidden;
}

.jufa-home-mode-list {
  width: 100%;
  height: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* 箭头20px加8px间距；仅为有后续内容的方向预留栏位，首尾标签贴齐对应边缘。 */
.jufa-home-mode-scroller.has-overflow .jufa-home-mode-list {
  width: calc(100% - var(--home-mode-prev-space, 0px) - var(--home-mode-next-space, 0px));
  margin: 0 var(--home-mode-next-space, 0px) 0 var(--home-mode-prev-space, 0px);
}

/* 两端分别控制，边界连点保护由脚本负责，不保留不可用箭头的空白。 */
.jufa-home-mode-scroller.has-scroll-prev {
  --home-mode-prev-space: 28px;
}

.jufa-home-mode-scroller.has-scroll-next {
  --home-mode-next-space: 28px;
}

/* 仅首页采用设计稿的中性选中底色和蓝色纯勾，不覆盖公共模型组件。 */
body.jufa-home-page .model-dropdown-menu li.active {
  color: #333;
  background: #f5f5f7;
  border-radius: 4px;
}

body.jufa-home-page .model-dropdown-menu li.active::after {
  content: "";
  box-sizing: border-box;
  width: 7px;
  height: 12px;
  top: 50%;
  right: 12px;
  border: solid #0561ff;
  border-width: 0 2px 2px 0;
  background: transparent;
  border-radius: 0;
  transform: translateY(-65%) rotate(45deg);
}

.jufa-home-mode-track {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  /* 轨道只占实际标签宽度，隐藏入口后不以多余空白触发滚动箭头。 */
  width: max-content;
  height: 32px;
}

.jufa-home-mode-list::-webkit-scrollbar {
  display: none;
}

/* 横向任务入口采用 MasterGo 87×32 渐变和 20×20 源图标按钮，边界状态由脚本控制。 */
.jufa-home-mode-scroll-control {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 115px;
  height: 32px;
  pointer-events: none;
  cursor: pointer;
}

.jufa-home-mode-scroll-control[hidden] {
  display: none;
}

.jufa-home-mode-scroll-control::before {
  position: absolute;
  top: 0;
  width: 87px;
  height: 32px;
  content: "";
  z-index: 1;
  pointer-events: auto;
}

.jufa-home-mode-scroll-control::after {
  position: absolute;
  top: 0;
  z-index: 1;
  width: 28px;
  height: 32px;
  background: #fff;
  content: "";
  pointer-events: auto;
}

/* 边界保留箭头与实色栏位，但移除渐变命中区，让首尾标签完整可读、可点。 */
.jufa-home-mode-scroll-control.is-disabled::before {
  visibility: hidden;
  pointer-events: none;
}

.jufa-home-mode-scroll-control--prev {
  left: 0;
}

.jufa-home-mode-scroll-control--prev::before {
  right: 0;
  background: linear-gradient(90deg, #fff 26%, rgba(255, 255, 255, 0) 100%);
}

.jufa-home-mode-scroll-control--prev::after {
  left: 0;
}

.jufa-home-mode-scroll-control--next {
  right: 0;
}

.jufa-home-mode-scroll-control--next::before {
  left: 0;
  background: linear-gradient(270deg, #fff 26%, rgba(255, 255, 255, 0) 100%);
}

.jufa-home-mode-scroll-control--next::after {
  right: 0;
}

.jufa-home-mode-scroll-control > button {
  position: absolute;
  top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 50%;
  background: #f5f5f8;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.jufa-home-mode-scroll-control > button:disabled {
  opacity: .45;
  cursor: default;
}

.jufa-home-mode-scroll-control--prev > button {
  left: 0;
}

.jufa-home-mode-scroll-control--next > button {
  right: 0;
}

.jufa-home-mode-scroll-control > button > img {
  display: block;
  width: 10px;
  height: 10px;
}

.jufa-home-mode-scroll-control--prev > button > img {
  transform: rotate(180deg);
}

.jufa-home-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  color: #333;
  background: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .16s ease;
}

.jufa-home-mode__icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
}

.jufa-home-mode:hover,
.jufa-home-mode.is-active {
  border-color: #0a5de7;
  color: #0a5de7;
  background: rgba(10, 93, 231, .06);
}

/* 按任务类型保留 MasterGo 设计宽度，隐藏或调整标签顺序时不套用其他任务的宽度。 */
.jufa-home-mode[data-home-question-type="doc_generate"] { width: 91px; }
.jufa-home-mode[data-home-question-type="law_QA"] { width: 91px; }
.jufa-home-mode[data-home-question-type="element_generation"] { width: 104px; }
.jufa-home-mode[data-home-question-type="contract_review"] { width: 91px; }
.jufa-home-mode[data-home-question-type="case_analysis"] { width: 91px; }
.jufa-home-mode[data-home-question-type="case_search"] { width: 91px; }
.jufa-home-mode[data-home-question-type="timeline_generate"] { width: 104px; }
.jufa-home-mode[data-home-question-type="ai_free_marking"] { width: 91px; }
.jufa-home-mode[data-home-question-type="bank_flow_analysis"] { width: 117px; }

.jufa-home-question-box {
  container-type: inline-size;
}

.jufa-home-question-box .chat-input-wrapper {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.jufa-home-question-box .chat-input-container {
  width: 100%;
  /* 保留默认高度，以正文自然高度撑开外框，底部留出工具栏和点击间隙。 */
  height: auto;
  min-height: 134px;
  padding-bottom: 51px;
  box-sizing: border-box;
  border: 2px solid rgba(227, 227, 227, .6);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 13px rgba(0, 0, 0, .01);
}

/* 输入框由首页轻量入口带正文跳转后聚焦时，用蓝色外框明确落点。 */
.jufa-home-question-box .chat-input-container:focus-within {
  border-color: #6b9de8;
  box-shadow: 0 0 0 3px rgba(10, 93, 231, .09);
}

/* 上传文件回显严格采用 MasterGo 图层 331:36564；状态类由脚本同步以兼容客户端旧内核。 */
body.jufa-home-page .jufa-home-question-box .chat-input-container.has-home-attachments {
  height: auto;
  min-height: 210px;
}

body.jufa-home-page .jufa-home-question-box .chat-input-container.has-home-attachments .chat-input-area {
  /* 附件仍固定在顶部，正文参与文档流以便长内容撑高容器。 */
  position: relative;
  margin-top: 75px;
  min-height: 48px;
}

/* 未上传时不让空附件占位重复增加输入框高度。 */
body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper:not(.chat-upload-wrapper--active) {
  display: none;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper.chat-upload-wrapper--active {
  position: absolute;
  top: 5px;
  right: 16px;
  left: 10px;
  z-index: 4;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper.chat-upload-wrapper--active::after {
  position: absolute;
  right: -6px;
  bottom: 0;
  left: 0;
  height: 1px;
  background: #ededed;
  content: "";
}

/* 多附件前后控件采用 MasterGo 634:16305 的 22×46 实际参数，并以不透明底色遮住边缘内容。 */
.jufa-home-attachment-scroll {
  position: absolute;
  top: 5px;
  z-index: 7;
  display: flex;
  width: 22px;
  height: 46px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  background: #f5f5f8;
  cursor: pointer;
}

.jufa-home-attachment-scroll[hidden] {
  display: none !important;
}

.jufa-home-attachment-scroll--prev {
  left: 0;
}

.jufa-home-attachment-scroll--next {
  right: 0;
}

.jufa-home-attachment-scroll img {
  display: block;
  width: 10px;
  height: 10px;
}

.jufa-home-attachment-scroll--prev img {
  transform: rotate(180deg);
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__inner {
  width: 100%;
  height: 51px;
  padding-top: 5px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__file-list {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: visible;
}

body.jufa-home-page .jufa-home-question-box .chat-upload-wrapper__inner::-webkit-scrollbar {
  display: none;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-type="file"],
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-type="img"] {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  max-width: 180px;
  height: 46px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background-color: #fff;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item:hover {
  background-color: #f5f5f8;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img {
  position: absolute;
  top: 9px;
  left: 11px;
  width: 23px;
  min-width: 23px;
  height: 28px;
  border-radius: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 23px 28px;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-generic.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img {
  background-image: none;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_img img {
  width: 23px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="doc"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="docx"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="wps"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-word.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="pdf"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-pdf.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="xls"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="xlsx"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-excel.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="txt"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="md"] .file_icon,
body.jufa-home-page .jufa-home-question-box .attachment-file__item[data-ft="markdown"] .file_icon {
  background-image: url("/static/Public/images/new_home/home-file-generic.svg");
}

body.jufa-home-page .jufa-home-question-box .attachment-file__info {
  position: absolute;
  top: 7px;
  left: 40px;
  display: flex;
  width: 108px;
  max-width: none;
  height: 33px;
  margin: 0;
  justify-content: flex-start;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__title {
  width: 108px;
  height: 17px;
  color: #333;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__desc {
  display: flex;
  width: 108px;
  height: 16px;
  margin: 0;
  align-items: center;
  column-gap: 2px;
  overflow: hidden;
  color: #999;
  font-family: "Source Han Sans", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="doc"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="docx"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="wps"] .attachment-file__desc::before {
  content: "WORD";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="pdf"] .attachment-file__desc::before {
  content: "PDF";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="xls"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="xlsx"] .attachment-file__desc::before {
  content: "EXCEL";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="txt"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="md"] .attachment-file__desc::before,
body.jufa-home-page .jufa-home-question-box .attachment-file__item.is-finish[data-ft="markdown"] .attachment-file__desc::before {
  content: "FILE";
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del {
  position: absolute;
  top: -5px;
  right: -6px;
  z-index: 2;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: url("/static/Public/images/new_home/home-file-remove.svg") center / 16px 16px no-repeat;
  opacity: 0;
  color: transparent;
  cursor: pointer;
  transition: opacity .15s ease;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item:hover .file_del,
body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del:focus-visible {
  opacity: 1;
}

body.jufa-home-page .jufa-home-question-box .attachment-file__item .file_del i {
  display: none;
}

.jufa-home-question-box .chat-input-area {
  min-height: 64px;
}

/* 首页输入底栏：左侧附件、知识库、技能，右侧脱敏、润色、发送按8px间距排列。 */
.jufa-home-question-box .chat-input-tool {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  width: auto;
  height: 32px;
  padding: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.jufa-home-question-box .left-tools-wrapper {
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  flex-wrap: nowrap;
  gap: 8px;
  row-gap: 0;
}

.jufa-home-question-box .left-tools-wrapper > .online-search,
.jufa-home-question-box .left-tools-wrapper > .follow-questions,
.jufa-home-question-box .left-tools-wrapper > .relate-project,
.jufa-home-question-box .left-tools-wrapper > .recently-questions,
.jufa-home-question-box .left-tools-wrapper > .timeline-cost-wrapper {
  display: none !important;
}

.jufa-home-question-box .model-select {
  /* 新建任务会由公共组件内联显示原入口；首页模型统一从技能弹窗选择。 */
  display: none !important;
  align-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 32px;
}

.jufa-home-question-box .model-select .ai-btn.model-trigger {
  width: 48px;
  height: 32px;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  color: #333;
  background: transparent;
}

.jufa-home-question-box .left-tools-wrapper > .model-select > span,
.jufa-home-question-box .left-tools-wrapper > .knowledge-base > span {
  margin-right: 0;
}

.jufa-home-question-box .model-select .ai-btn__image,
.jufa-home-question-box .model-select .ai-btn__image img {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.jufa-home-question-box .model-select .ai-btn__image img {
  display: block;
  opacity: 1;
  object-fit: contain;
}

.jufa-home-question-box .model-select .icon-xiala1 {
  width: 10px;
  height: 10px;
  background: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat;
  font-size: 0;
  line-height: 0;
  transform: rotate(90deg);
}

.jufa-home-question-box .knowledge-base {
  display: flex;
  align-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 32px;
}

.jufa-home-question-box .knowledge-base .ai-btn.knowledge-trigger {
  justify-content: flex-start;
  width: 48px;
  height: 32px;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  color: #999;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.jufa-home-question-box .knowledge-base .ai-btn.knowledge-trigger:hover {
  border-color: transparent;
  color: #999;
  background: #f5f5f8;
}

.jufa-home-question-box .knowledge-base .ai-btn__text {
  display: none;
}

/* 图标仅替代可见文字，名称与已选数量由原组件同步到aria-label/title。 */
.jufa-home-question-box .knowledge-trigger::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: url("/static/Public/images/new_home/home-knowledge-trigger.png?v=20260924_04") center / contain no-repeat;
}

.jufa-home-question-box .knowledge-base .ai-btn__text em {
  margin-left: 0;
  color: #0a5de7;
}

.jufa-home-question-box .knowledge-base .icon-xiala1 {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  background: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat;
  color: #666;
  font-size: 0;
  line-height: 0;
  transform: rotate(90deg);
}

/* 知识库弹层严格覆盖为 MasterGo 634:16737；仅命中新首页追加到 body 的直属弹层。 */
body.jufa-home-page > .knowledge-dropdown-menu {
  width: 206px !important;
  min-width: 206px !important;
  max-width: 206px !important;
  height: 280px !important;
  min-height: 280px !important;
  max-height: 280px !important;
  padding: 8px !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  border: 1px solid #e3e3e3;
  border-radius: 6px !important;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1) !important;
  scrollbar-color: #e3e3e3 transparent;
  scrollbar-width: thin;
}

body.jufa-home-page > .knowledge-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu::-webkit-scrollbar-thumb {
  border-radius: 1px;
  background: #e3e3e3;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-container {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 264px;
  padding: 0 !important;
  box-sizing: border-box;
  flex-direction: column;
  gap: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title {
  display: flex;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 18px;
  margin: 0 !important;
  padding: 0 0 0 7px;
  box-sizing: border-box;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 4px;
  color: #999;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
}

/* 上传和更多同时出现时禁止单个控件拆字，空间不足则整项换行并撑开标题高度。 */
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title > * {
  flex-shrink: 0;
  white-space: nowrap;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-title-more {
  margin-left: auto;
  font-size: 11px;
  line-height: 18px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-list-title-count {
  color: #999;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-baseline {
  display: none;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list.knowledge-self {
  display: flex;
  width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0 !important;
  overflow: visible;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list.knowledge-self li {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  margin: 0 !important;
  padding: 0 4px !important;
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: 0 !important;
  border-radius: 4px;
  color: #333 !important;
  background: transparent !important;
  font-size: 13px;
  line-height: 17px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li:hover {
  background: #f5f5f8 !important;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: row;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li > div > span {
  overflow: hidden;
  color: #333;
  font-size: 13px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.jufa-home-page > .knowledge-dropdown-menu em.checkbox,
body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox {
  position: static;
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 0 !important;
  border-radius: 0;
  background: url("/static/Public/images/new_home/home-knowledge-book.svg") center / 20px 20px no-repeat !important;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked em.checkbox {
  background-image: url("/static/Public/images/new_home/home-knowledge-book-active.svg") !important;
}

body.jufa-home-page > .knowledge-dropdown-menu em.checkbox::before {
  display: none;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-base-list li.checked::after {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: url("/static/Public/images/new_home/home-knowledge-check.svg") center / 16px 16px no-repeat;
  content: "";
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-upload {
  display: flex;
  height: 18px;
  margin: 0 0 0 auto;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: 0;
  color: #0a5de7;
  background: transparent;
  font-size: 11px;
  line-height: 15px;
}

body.jufa-home-page > .knowledge-dropdown-menu .knowledge-upload i {
  width: 12px;
  height: 12px;
  margin: 0;
  background: url("/static/Public/images/new_home/home-knowledge-upload.svg") center / 12px 12px no-repeat;
  font-size: 0;
}

.jufa-home-question-box .right-tools-wrapper {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.jufa-home-question-box .right-tools-wrapper > :last-child {
  margin-left: 0;
}

/* 首页不显示清空按钮；保留发送旁的润色入口位置。 */
body.jufa-home-page .jufa-home-question-box #clearInputBtn {
  display: none !important;
}

/* 三种新接入模式沿用公共上传控件实际宽度，不能继续受首页图标栏的64px固定宽约束。 */
body.jufa-home-page[data-home-mode="timeline_generate"] .jufa-home-question-box .right-tools-wrapper,
body.jufa-home-page[data-home-mode="ai_free_marking"] .jufa-home-question-box .right-tools-wrapper,
body.jufa-home-page[data-home-mode="bank_flow_analysis"] .jufa-home-question-box .right-tools-wrapper {
  flex: 0 0 auto;
  width: auto;
}

/* 默认不显示底色，悬浮时由下方 hover 规则显示浅灰底；保留上传尺寸与限制。 */
.jufa-home-question-box #fileUploadBtn,
body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn {
  display: inline-flex;
  flex: 0 0 92px;
  width: 92px;
  height: 32px;
  box-sizing: border-box;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  align-items: center;
  gap: 4px;
  color: #666;
}

.jufa-home-question-box #fileUploadBtn .jufa-home-upload-label { display: inline; margin: 0; font: 400 14px/16px "Microsoft YaHei", sans-serif; white-space: nowrap; }

.jufa-home-question-box #fileUploadBtn .tool-btn__icon,
.jufa-home-question-box #fileUploadBtn .tool-btn__icon > img,
body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn .tool-btn__icon,
body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn .tool-btn__icon > img {
  display: block;
  width: 16px;
  height: 16px;
}

body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn .tool-btn__icon::before,
body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn .tool-btn__icon::after {
  content: none;
  display: none;
}

.jufa-home-question-box .jufa-home-toolbar-button {
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 8px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  color: #999;
  background: transparent;
  font: 400 14px/24px "Microsoft YaHei", sans-serif;
  white-space: nowrap;
}

/* 请求中禁用重复润色，脱敏开关按aria-checked单独控制视觉状态。 */
.jufa-home-question-box .jufa-home-toolbar-button:disabled { opacity: 1; cursor: default; }
.jufa-home-question-box .jufa-home-skill-trigger { width: 100px; min-width: 100px; max-width: 170px; cursor: pointer; }
.jufa-home-question-box .jufa-home-skill-trigger.has-skill-selection { width: auto; }
.jufa-home-question-box .jufa-home-skill-control { display: inline-flex; flex: 0 0 auto; align-items: center; height: 32px; margin: 0; border-radius: 12px; }
.jufa-home-question-box .jufa-home-skill-control.has-skill-selection { min-width: 112px; background: rgba(10, 93, 231, .06); }
.jufa-home-question-box .jufa-home-skill-trigger.has-skill-selection { flex: 1; min-width: 0; padding-right: 0; color: #0a5de7; }
/* 选中标签复用当前技能图标，字体和位图图标均以设计蓝色呈现。 */
.jufa-home-question-box .jufa-home-skill-icon { flex: 0 0 16px; width: 16px; height: 16px; font-size: 16px; line-height: 16px; color: inherit; }
.jufa-home-question-box .has-skill-selection .jufa-home-toolbar-chevron { display: none; }
.jufa-home-question-box .jufa-home-skill-clear { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 32px; padding: 0 8px 0 6px; border: 0; border-radius: 0 12px 12px 0; color: #0a5de7; background: transparent; font: 22px/1 Arial, sans-serif; cursor: pointer; }
.jufa-home-question-box .jufa-home-skill-clear > span { margin: 0; }
.jufa-home-question-box .jufa-home-skill-clear[hidden] { display: none; }
.jufa-home-question-box .jufa-home-skill-clear:hover { background: transparent; }
.jufa-home-question-box .jufa-home-skill-clear:focus-visible { outline: 2px solid #0a5de7; outline-offset: -2px; }
/* 文书技能在原位置切换悬停态：图标换成左侧关闭，不新增上方浮条。 */
.jufa-home-question-box .jufa-home-skill-control.is-document-skill { position: relative; min-width: 108px; }
.jufa-home-question-box .is-document-skill .jufa-home-skill-trigger { padding: 0 8px; gap: 6px; font-size: 14px; font-weight: 400; }
.jufa-home-question-box .is-document-skill .jufa-home-toolbar-chevron { display: inline-block; flex: 0 0 auto; background: currentColor; -webkit-mask: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat; mask: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat; }
.jufa-home-question-box .is-document-skill:hover,
.jufa-home-question-box .is-document-skill:focus-within { gap: 6px; }
.jufa-home-question-box .is-document-skill:hover .jufa-home-skill-trigger,
.jufa-home-question-box .is-document-skill:focus-within .jufa-home-skill-trigger { padding-left: 0; }
.jufa-home-question-box .is-document-skill:hover .jufa-home-skill-clear[hidden],
.jufa-home-question-box .is-document-skill:focus-within .jufa-home-skill-clear[hidden] { display: inline-flex; flex: 0 0 16px; width: 16px; height: 16px; margin-left: 8px; padding: 0; border-radius: 0; background: url("/static/Public/images/new_home/home-document-close@3x.png") center / 14px 14px no-repeat; }
/* MasterGo 257:58648原图3倍PNG，14px图标在原命中区域居中，避免字体乘号改变轮廓。 */
.jufa-home-question-box .is-document-skill .jufa-home-skill-clear > span { display: none; }
.jufa-home-question-box .is-document-skill:hover .jufa-home-skill-trigger::before,
.jufa-home-question-box .is-document-skill:focus-within .jufa-home-skill-trigger::before,
.jufa-home-question-box .is-document-skill:hover .jufa-home-skill-icon,
.jufa-home-question-box .is-document-skill:focus-within .jufa-home-skill-icon { display: none; }
.jufa-home-question-box .left-tools-wrapper .jufa-home-skill-trigger > span { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; }
/* 默认短文案按平台字体实际宽度撑开，避免Safari或较大字号下被flex收缩裁切。 */
.jufa-home-question-box .jufa-home-skill-trigger:not(.has-skill-selection) { width: auto; max-width: none; }
.jufa-home-question-box .left-tools-wrapper .jufa-home-skill-trigger:not(.has-skill-selection) > span { flex: 0 0 auto; overflow: visible; text-overflow: clip; }
.jufa-home-question-box .jufa-home-skill-trigger:hover,
.jufa-home-question-box .jufa-home-skill-trigger[aria-expanded="true"] { background: #f5f5f7; }
/* 已选技能由外层统一提供6%蓝底，悬停/展开不叠加局部灰底。 */
.jufa-home-question-box .jufa-home-skill-trigger.has-skill-selection:hover,
.jufa-home-question-box .jufa-home-skill-trigger.has-skill-selection[aria-expanded="true"] { background: transparent; }
.jufa-home-question-box .jufa-home-skill-trigger:focus-visible { outline: 2px solid #0561ff; outline-offset: 1px; }

/* MasterGo 54:72085/54:71188：206px技能及模型折叠面板，实际项目数决定高度。 */
body.jufa-home-page > .jufa-home-skill-menu {
  position: fixed;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 206px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  scrollbar-width: thin;
  scrollbar-color: #e3e3e3 transparent;
}
body.jufa-home-page > .jufa-home-skill-menu[hidden] { display: none; }
/* 上传入口浮窗：设计稿206×66，内描边不额外占用8px内边距。 */
body.jufa-home-page .jufa-home-upload-menu {
  position: fixed;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 206px;
  max-width: calc(100vw - 16px);
  padding: 8px;
  gap: 4px;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e3e3e3, 0 4px 12px rgba(0, 0, 0, .1);
  color: #333;
  font-family: inherit;
}
body.jufa-home-page .jufa-home-upload-menu[hidden] { display: none; }
body.jufa-home-page .jufa-home-upload-menu-title {
  padding: 0 6px;
  color: #999;
  font-size: 12px;
  line-height: 18px;
}
body.jufa-home-page .jufa-home-upload-menu-action {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
  cursor: pointer;
}
body.jufa-home-page .jufa-home-upload-menu-action:hover,
body.jufa-home-page .jufa-home-upload-menu-action:focus-visible { background: #f5f5f7; }
body.jufa-home-page .jufa-home-upload-menu-action:focus-visible { outline: 2px solid #0066ff; outline-offset: -2px; }
body.jufa-home-page .jufa-home-upload-menu-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }

.jufa-home-skill-menu::-webkit-scrollbar { width: 4px; }
.jufa-home-skill-menu::-webkit-scrollbar-thumb { border-radius: 2px; background: #e3e3e3; }
.jufa-home-skill-options, .jufa-home-skill-models { display: flex; flex-direction: column; flex: 0 0 auto; gap: 4px; }
.jufa-home-skill-models[hidden] { display: none; }
.jufa-home-skill-heading, .jufa-home-model-toggle { padding: 0 6px; color: #999; font: 400 12px/18px "Microsoft YaHei", sans-serif; }
.jufa-home-skill-heading { flex: 0 0 18px; }
.jufa-home-model-toggle { display: flex; align-items: center; gap: 6px; flex: 0 0 22px; min-height: 22px; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.jufa-home-model-toggle i { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); }
.jufa-home-model-toggle[aria-expanded="true"] i { transform: rotate(45deg); }
.jufa-home-model-toggle:focus-visible, .jufa-home-model-option:focus-visible { outline: 1px solid #0a5de7; outline-offset: -1px; }
.jufa-home-model-option { display: flex; align-items: center; flex: 0 0 28px; min-height: 28px; gap: 6px; width: 100%; padding: 0 4px; border: 0; border-radius: 4px; background: transparent; color: #333; text-align: left; font: 400 13px/20px "Microsoft YaHei", sans-serif; cursor: pointer; }
.jufa-home-model-option img { width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }
.jufa-home-model-option span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jufa-home-model-option:disabled { opacity: .5; cursor: not-allowed; }
.jufa-home-model-option:hover, .jufa-home-model-option[aria-checked="true"] { background: #f5f5f7; }
.jufa-home-model-option[aria-checked="true"]::after { content: ""; flex: 0 0 10px; width: 10px; height: 6px; margin: -3px 1px 0 0; border-left: 2px solid #0a5de7; border-bottom: 2px solid #0a5de7; transform: rotate(-45deg); }
.jufa-home-skill-option {
  display: flex;
  flex: 0 0 28px;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  color: #333;
  background: transparent;
  font: 400 13px/20px "Microsoft YaHei", sans-serif;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.jufa-home-skill-option > :first-child { width: 16px; height: 16px; flex: 0 0 16px; font-size: 16px; line-height: 16px; }
.jufa-home-skill-option > span { min-width: 0; }
.jufa-home-skill-option:hover { background: #f5f5f7; }
.jufa-home-skill-option:focus-visible { outline: 1px solid #0561ff; outline-offset: -1px; background: #f5f5f7; }
.jufa-home-question-box .jufa-home-desensitize { width: 102px; cursor: pointer; }
.jufa-home-question-box .jufa-home-desensitize:hover { background: #f5f5f7; }
.jufa-home-question-box .jufa-home-desensitize:focus-visible { outline: 2px solid #0561ff; outline-offset: 1px; }
.jufa-home-question-box .jufa-home-polish { width: 96px; padding: 0 4px; gap: 6px; }
.jufa-home-question-box .jufa-home-polish img { width: 16px; height: 16px; flex: 0 0 16px; }
.jufa-home-question-box .jufa-home-polish:not(:disabled) { cursor: pointer; }
.jufa-home-question-box .jufa-home-polish:not(:disabled):hover { background: #f5f5f7; color: #0561ff; }
.jufa-home-question-box .jufa-home-polish:focus-visible { outline: 2px solid #0561ff; outline-offset: 1px; }
.jufa-home-question-box .jufa-home-polish[aria-busy="true"] { cursor: wait; }
.jufa-home-polish-spinner { display: none; width: 14px; height: 14px; flex: 0 0 14px; box-sizing: border-box; border: 2px solid rgba(10, 93, 231, .25); border-right-color: #0a5de7; border-bottom-color: #0a5de7; border-radius: 50%; }
.jufa-home-polish[aria-busy="true"] .jufa-home-polish-spinner { display: block; animation: home-polish-spin .8s linear infinite; }
@keyframes home-polish-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jufa-home-polish[aria-busy="true"] .jufa-home-polish-spinner { animation: none; } }
.jufa-home-question-box .jufa-home-toolbar-chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: url("/static/Public/images/new_home/home-mode-chevron.svg") center / 10px 10px no-repeat;
  transform: rotate(90deg);
}
.jufa-home-question-box .jufa-home-switch {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 14px;
  flex: 0 0 24px;
  border-radius: 7px;
  background: #ccc;
}
.jufa-home-question-box .jufa-home-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}
/* 只表达开关选择，不代表已执行脱敏处理。 */
.jufa-home-question-box .jufa-home-desensitize[aria-checked="true"] .jufa-home-switch { background: #0561ff; }
.jufa-home-question-box .jufa-home-desensitize[aria-checked="true"] .jufa-home-switch::before { transform: translateX(10px); }
.jufa-home-question-box #fileUploadBtn:hover,
body.jufa-home-page .jufa-home-question-box .chat-input-marking-mode #fileUploadBtn:hover,
.jufa-home-question-box .model-select .ai-btn.model-trigger:hover,
.jufa-home-question-box .knowledge-base .ai-btn.knowledge-trigger:hover { background: #f5f5f7; }

body.jufa-home-page .model-dropdown-menu .jufa-home-auto-model-option { list-style: none; }
/* 外层li沿用普通模型行间距，禁用按钮仅承载语义，避免重复内边距挤偏图标。 */
body.jufa-home-page .model-dropdown-menu .jufa-home-auto-model-option button {
  display: flex;
  width: 100%;
  min-height: 36px;
  padding: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  white-space: nowrap;
  text-align: left;
  cursor: default;
}
/* 首页模型列表统一16px图标，包含Auto，保持原图比例及行内对齐。 */
body.jufa-home-page .model-dropdown-menu li img { width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }

/* 按输入框实际宽度换行；底栏进入正常流，避免覆盖长输入和附件。 */
@container (max-width: 600px) {
  .jufa-home-question-box .chat-input-container { padding-bottom: 0; }
  .jufa-home-question-box .chat-input-tool {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
    margin: 16px 4px 10px;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .jufa-home-question-box .left-tools-wrapper { display: contents; }
  .jufa-home-question-box .placeholder-tools-wrapper { display: none; }
  .jufa-home-question-box .right-tools-wrapper { margin-left: auto; }
}

/* 旧版Safari/Chromium没有容器查询；600px输入区加侧栏/留白约900px，窄屏沿用相同换行规则。 */
@supports not (container-type: inline-size) {
  @media (max-width: 900px) {
    .jufa-home-question-box .chat-input-container { padding-bottom: 0; }
    .jufa-home-question-box .chat-input-tool {
      position: relative;
      left: auto;
      right: auto;
      bottom: auto;
      height: auto;
      margin: 16px 4px 10px;
      flex-wrap: wrap;
      row-gap: 4px;
    }
    .jufa-home-question-box .left-tools-wrapper { display: contents; }
    .jufa-home-question-box .placeholder-tools-wrapper { display: none; }
    .jufa-home-question-box .right-tools-wrapper { margin-left: auto; }
  }
}

.jufa-home-question-box #createContentBtn {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
}

/* 仅替换发送字形为设计稿向上箭头，保留原按钮状态与点击监听。 */
.jufa-home-question-box #createContentBtn .icon-send {
  display: block;
  width: 16px;
  height: 18px;
  background: url("/static/Public/images/new_home/home-send-arrow.svg") center / 14.5px 16.5px no-repeat;
  font-size: 0;
}
.jufa-home-question-box #createContentBtn .icon-send::before { content: none; }

.jufa-home-question-box #createContentBtn.is-disabled {
  background: rgba(3, 81, 236, .3);
}

/* 仅首页不可发送按钮悬浮时展示提示，沿用现有禁用状态，不影响点击和布局。 */
.jufa-home-question-box #createContentBtn.is-disabled:hover::before {
  content: "输入需求后，即可发送";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  z-index: 10;
  box-sizing: border-box;
  /* 按文案宽度留白，避免短提示仍占用固定宽度。 */
  width: max-content;
  padding: 0 8px;
  height: 34px;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 34px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.jufa-home-question-box #createContentBtn.is-disabled:hover::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 5px);
  z-index: 10;
  border-top: 5px solid #333;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  pointer-events: none;
}

/* 窄屏将气泡向左收进视口，三角继续对准发送按钮，宽屏仍居中展示。 */
@media (max-width: 1200px) {
  .jufa-home-question-box #createContentBtn.is-disabled:hover::before {
    right: 0;
    left: auto;
    transform: none;
  }
}

.jufa-home-question-box .chat-input-textarea {
  min-height: 48px;
  color: #333846;
  font-size: 15px;
  line-height: 24px;
}

/* 标签只占首行：浮动绕排让后续正文回到左侧，行高与32px标签一致以免占两行。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor.chat-input-type-tag {
  display: block;
  line-height: 32px;
}

/* 默认高度不变；模板首行32px、后续7行各24px，上限200px约显示8行，超出内部滚动。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor {
  min-height: 64px;
  max-height: 200px;
}

.jufa-home-question-box .chat-input-type-label.jufa-home-input-type-label {
  /* 正文块覆盖整行宽度，标签需保持在其上方才能点击关闭。 */
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
  height: 32px;
  margin: 0 10px 0 0;
  padding: 0 10px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 5px;
  float: left;
  /* MasterGo 964:006933：灰色描边与6%蓝色填充分别设置，不使用整体透明度。 */
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  color: #0a5de7;
  background: rgba(10, 93, 231, .06);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

/* MasterGo257:75370：源模板图20px、标签26px/R4/左右8px/间距6px；不替换返回图片。 */
.jufa-home-question-box .chat-input-type-label[data-home-document-template] { min-width: 0; max-width: calc(100% - 12px); height: 26px; padding: 0 8px; gap: 6px; border: 0; border-radius: 4px; background: rgba(10,93,231,.08); color: #333; font-size: 13px; line-height: 14px; }
.jufa-home-question-box .chat-input-type-label[data-home-document-template] .jufa-home-input-type-icon { flex: 0 0 20px; width: 20px; height: 20px; object-fit: contain; }
.jufa-home-question-box .chat-input-type-label[data-home-document-template] .jufa-home-input-type-text { flex: 1 1 auto; min-width: 0; height: 14px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jufa-home-question-box .chat-input-type-label[data-home-document-template] .jufa-home-input-type-close img { filter: brightness(0) invert(.2); }

/* MasterGo 257:57537：输入框下的四列模板浮层；宽度和剩余视口高度由模板管理器定位。 */
.jufa-home-page #chatInputPanel { box-sizing: border-box; z-index: 115; padding: 12px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); font: 400 14px/20px "Microsoft YaHei", sans-serif; animation: none; }
.jufa-home-page #chatInputPanel.hide { display: none; }
.jufa-home-page #chatInputPanel .chat-input-panel-container { min-height: 0; width: 100%; }
.jufa-home-page #chatInputPanel .input-panel-create { min-height: 0; min-width: 0; gap: 10px; }
.jufa-home-page #chatInputPanel .input-panel-create-header { flex: 0 0 auto; flex-wrap: nowrap; gap: 12px; align-items: center; }
.jufa-home-page #chatInputPanel .input-panel-create-tab { min-width: 0; padding: 0; margin: 0; gap: 24px; }
.jufa-home-page #chatInputPanel .input-panel-create-tab-item { margin: 0; padding: 0 0 4px; height: 26px; font-size: 14px; color: #666; }
.jufa-home-page #chatInputPanel .input-panel-create-tab-item-selected { color: #0a5de7; }
.jufa-home-page #chatInputPanel .input-panel-create-tab-item-selected:after { height: 2px; background: #0a5de7; }
.jufa-home-page #chatInputPanel .input-panel-create-search { flex: 0 0 184px; margin: 0; }
.jufa-home-page #chatInputPanel .input-panel-create-search input { border-radius: 4px; font: 400 12px/26px "Microsoft YaHei", sans-serif; }
.jufa-home-page #chatInputPanel .input-panel-create-content { flex: 1; min-height: 0; padding: 0; overflow-y: auto; }
.jufa-home-page #chatInputPanel .input-panel-create-content-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px 12px; padding: 0; }
.jufa-home-page #chatInputPanel .input-panel-create-item { width: auto; max-width: none; min-width: 0; flex: none; margin: 0; padding: 0; border: 0; border-radius: 4px; }
.jufa-home-page #chatInputPanel .input-panel-create-item-content { padding: 0; gap: 6px; border-radius: 4px; }
/* 首页模板不展示“最近”角标，保留接口的最近使用排序和旧页面表现。 */
.jufa-home-page #chatInputPanel .input-panel-create-item.is-useful .input-panel-create-item-content::after { content: none; }
.jufa-home-page #chatInputPanel .input-panel-create-item-img { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border-radius: 0; }
.jufa-home-page #chatInputPanel .input-panel-create-item-text { min-width: 0; height: 24px; line-height: 24px; }
.jufa-home-page #chatInputPanel .input-panel-create-item-title { display: block; font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 我的模板删除按钮放在项内，避免旧负偏移被滚动区裁切，并为长名称保留点击空间。 */
.jufa-home-page #chatInputPanel .input-panel-create-item[data-item-type="my_doc"] .input-panel-create-item-content { min-height: 24px; padding-right: 24px; }
.jufa-home-page #chatInputPanel .input-panel-create-item[data-item-type="my_doc"] .delete-template-btn { top: 50%; right: 2px; transform: translateY(-50%); }
.jufa-home-page #chatInputPanel .input-panel-create-item[data-item-type="my_doc"]:focus-within .delete-template-btn { opacity: 1; }
.jufa-home-page #chatInputPanel .secondary-tabs-wrapper { grid-column: 1 / -1; }
.jufa-home-page #chatInputPanel .secondary-content-wrapper { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px 12px; }
.jufa-home-page #chatInputPanel .empty-content { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .jufa-home-page #chatInputPanel .input-panel-create-header { flex-wrap: wrap; gap: 8px; }
  .jufa-home-page #chatInputPanel .input-panel-create-tab { flex: 1 0 100%; gap: 18px; }
  .jufa-home-page #chatInputPanel .input-panel-create-search { flex: 1 0 100%; }
  .jufa-home-page #chatInputPanel .input-panel-create-content-list,
  .jufa-home-page #chatInputPanel .secondary-content-wrapper { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* MasterGo257:45231：要素式736×338浮层，执行长标题整行，目录图标沿用接口字体图标。 */
.jufa-home-page #chatElementaryPanel { box-sizing: border-box; z-index: 115; padding: 12px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); font: 400 13px/14px "Microsoft YaHei", sans-serif; animation: none; }
.jufa-home-page #chatElementaryPanel.hide { display: none; }
.jufa-home-page #chatElementaryPanel .chat-elementary-panel-container { min-height: 0; width: 100%; }

body.home-elementary-modal-open { overflow: hidden; }
.home-elementary-dialog {
  position: fixed;
  width: calc(100vw - 32px);
  max-width: 680px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3ebf7;
  border-radius: 18px;
  color: #172741;
  background: #fff;
  box-shadow: 0 28px 88px rgba(24, 41, 78, .24);
}
.home-elementary-dialog[open] { display: flex; flex-direction: column; }
.home-elementary-dialog::backdrop {
  background: rgba(33, 50, 80, .38);
  backdrop-filter: blur(4px);
}
.home-elementary-fallback {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 50, 80, .38);
  backdrop-filter: blur(4px);
}
.home-elementary-fallback .home-elementary-dialog { position: relative; }
.home-elementary-heading { position: relative; padding: 24px 52px 16px 28px; }
.home-elementary-heading h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; line-height: 1.35; }
.home-elementary-heading p { margin: 0; color: #526680; font-size: 13px; }
.home-elementary-dialog button { cursor: pointer; }
.home-elementary-dialog button:disabled { cursor: default; }
.home-elementary-dialog :focus-visible { outline: 2px solid #285de1; outline-offset: 2px; }
.home-elementary-close {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  color: #506785;
  background: transparent;
  font-size: 25px;
  line-height: 1;
}
.home-elementary-close:hover { background: #edf3fc; }
.home-elementary-dialog .home-elementary-close:focus { outline: none; box-shadow: none; }
.home-elementary-dialog .home-elementary-close:focus-visible { background: #edf3fc; }
.home-elementary-body { overflow: auto; overscroll-behavior: contain; padding: 4px 28px 23px; }
.home-elementary-body label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.home-elementary-body label small { float: right; margin-left: 8px; font-size: 12px; font-weight: 400; color: #526680; }
.home-elementary-template-trigger, .home-elementary-body textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cddbef;
  border-radius: 9px;
  color: #172741;
  font: inherit;
  font-size: 14px;
}
.home-elementary-selector { position: relative; z-index: 2; }
.home-elementary-template-trigger { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; background: #fff; text-align: left; }
.home-elementary-template-trigger #home-elementary-template-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-elementary-template-trigger:disabled { color: #7c8eab; }
.home-elementary-template-icon:empty { display: none; }
.home-elementary-chevron { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; color: #8a9fbd; }
.home-elementary-chevron svg { display: block; width: 16px; height: 16px; }
.home-elementary-template-trigger[aria-expanded="true"] .home-elementary-chevron { transform: rotate(180deg); }
.home-elementary-template-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; display: flex; flex-direction: column; box-sizing: border-box; padding: 12px; border: 1px solid #dce5f5; border-radius: 12px; background: #fff; box-shadow: 0 14px 30px rgba(35, 60, 104, .14); }
.home-elementary-template-panel[hidden] { display: none; }
.home-elementary-template-search { display: flex; align-items: center; gap: 8px; flex: none; min-height: 40px; margin-bottom: 10px; padding: 0 12px; border: 1px solid #e0e8f6; border-radius: 8px; color: #90a6c8; background: #f5f7fb; }
.home-elementary-template-search input { width: 100%; min-width: 0; height: 38px; padding: 0; border: 0; outline: none; background: transparent; font-size: 12px; color: #334e76; }
.home-elementary-dialog .home-elementary-template-search input:focus { outline: none; box-shadow: none; }
.home-elementary-template-columns { display: flex; flex: 1; min-height: 0; gap: 12px; }
.home-elementary-template-categories { flex: 0 0 124px; overflow-y: auto; padding-right: 9px; border-right: 1px solid #e7edf7; }
.home-elementary-template-categories button { display: block; width: 100%; margin: 0 0 2px; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: #566b8e; font-size: 12px; text-align: left; }
.home-elementary-template-categories button[aria-pressed="true"] { background: #edf2ff; color: #3365ef; font-weight: 600; }
.home-elementary-template-content { flex: 1; min-width: 0; overflow-y: auto; padding-right: 3px; }
.home-elementary-template-row { display: flex; align-items: center; min-height: 45px; margin-bottom: 7px; margin-left: calc(var(--template-depth) * 12px); border: 1px solid #e0e8f5; border-radius: 8px; }
.home-elementary-template-row.is-selected { background: #f0f5ff; border-color: #a9c0ff; }
.home-elementary-template-choice { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 43px; padding: 9px 11px; border: 0; border-radius: 7px; color: #425d86; background: transparent; text-align: left; font-size: 12px; }
.home-elementary-template-choice > span:not(.item-icon):not(.home-elementary-chevron) { min-width: 0; overflow-wrap: anywhere; }
.home-elementary-template-choice[aria-expanded="true"] > .home-elementary-chevron { transform: rotate(180deg); }
.home-elementary-template-download { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 8px; border: 0; background: transparent; color: #557fca; font-size: 11px; white-space: nowrap; }
.home-elementary-template-download .iconfont { font-size: 12px; }
.home-elementary-template-empty { margin: 20px 8px; font-size: 13px; color: #6f829d; }
.home-elementary-dialog .item-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 3px; color: #fff; }
.home-elementary-dialog .item-icon .iconfont { font-size: 15px; }
.home-elementary-file-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 22px; color: #9bb1cf; font-size: 18px; line-height: 1; }
.home-elementary-folder-icon { font-size: 18px; color: #88a9de; }
.home-elementary-selecting .home-elementary-modes,
.home-elementary-selecting .home-elementary-text,
.home-elementary-selecting .home-elementary-files { visibility: hidden; }
.home-elementary-body textarea { display: block; min-height: 192px; padding: 13px; background: #f8faff; resize: vertical; }
.home-elementary-body textarea::placeholder { color: #647891; }
.home-elementary-dialog textarea:focus-visible { outline-color: #a9c2f7; }
.home-elementary-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.home-elementary-modes button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid #d5e1f1;
  border-radius: 10px;
  text-align: left;
  color: #344d6f;
  background: #fff;
}
.home-elementary-modes button[aria-checked="true"] { border-color: #5e83ff; background: #f5f8ff; color: #3265ff; }
.home-elementary-mode-icon { flex: none; font-size: 21px; color: #93a7c6; }
.home-elementary-modes button[aria-checked="true"] .home-elementary-mode-icon { color: #4a78ff; }
.home-elementary-mode-check { margin-left: auto; font-size: 14px; visibility: hidden; }
.home-elementary-modes button[aria-checked="true"] .home-elementary-mode-check { visibility: visible; }
.home-elementary-modes strong, .home-elementary-modes small, .home-elementary-upload small { display: block; }
.home-elementary-modes small, .home-elementary-upload small { color: #526680; font-size: 12px; margin-top: 3px; }
.home-elementary-files input[type="file"][hidden] { display: none; }
.home-elementary-upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 204px;
  box-sizing: border-box;
  border: 1px dashed #b0c5ff;
  border-radius: 10px;
  background: #fafcff;
}
.home-elementary-upload {
  width: 100%;
  min-height: 202px;
  padding: 12px;
  border: 0;
  border-radius: 9px;
  color: #2751bd;
  background: transparent;
}
.home-elementary-upload-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; color: #5887ff; background: #edf3ff; }
.home-elementary-upload-icon .iconfont { font-size: 25px; }
.home-elementary-upload strong { font-size: 13px; font-weight: 400; color: #597ba8; }
.home-elementary-upload small { margin-top: 10px; font-size: 11px; }
.home-elementary-files.has-files .home-elementary-upload-zone { padding: 28px 20px 24px; background: #fff; }
.home-elementary-files.has-files .home-elementary-upload { width: auto; min-height: 0; margin-top: 12px; padding: 3px 8px; }
.home-elementary-files.has-files .home-elementary-upload-icon,
.home-elementary-files.has-files .home-elementary-upload small { display: none; }
.home-elementary-files.has-files .home-elementary-upload strong { color: #3269e8; }
.home-elementary-upload:disabled { cursor: default; }
.home-elementary-files.has-files .home-elementary-upload:disabled strong { color: #8a98ac; }
.home-elementary-file-list { width: 100%; }
.home-elementary-file-list:empty { display: none; }
.home-elementary-file-list .attachment-file__item {
  position: static; display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: none; height: auto; margin: 0; padding: 0; box-sizing: border-box;
  background: transparent !important; animation: none;
}
.home-elementary-file-list .attachment-file__item .file_icon,
.home-elementary-file-list .attachment-file__item .file_img { flex: none; width: 38px; height: 38px; margin-bottom: 12px; }
.home-elementary-file-list .attachment-file__item .file_img img { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; }
.home-elementary-file-list .attachment-file__info {
  flex: none; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center;
  justify-content: center; column-gap: 6px; width: 100%; max-width: 100%; min-width: 0; margin: 0; text-align: center;
}
.home-elementary-file-list .attachment-file__title { width: auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; color: #263b59; }
.home-elementary-file-list .attachment-file__desc { display: contents; }
.home-elementary-file-list .attachment-file__size { color: #8a95a5; font-size: 13px; white-space: nowrap; }
.home-elementary-file-list .attachment-file__status { order: 2; flex-basis: 100%; justify-content: center; margin-top: 8px; line-height: 18px; }
.home-elementary-file-list [data-elementary-retry-file] { order: 3; margin-top: 4px; }
.home-elementary-file-list .is-finish .attachment-file__status { display: none !important; }
.home-elementary-file-list .file_del { top: 8px; right: 8px; width: 22px; height: 22px; justify-content: center; border: 0; background: #e9effc; color: #2c4770; }
.home-elementary-catalog-retry, [data-elementary-retry-file] {
  padding: 2px 4px;
  border: 0;
  background: none;
  color: #254fb8;
  text-decoration: underline;
}
.home-elementary-error { margin: 12px 0 0; color: #9b3039; font-size: 13px; overflow-wrap: anywhere; }
.home-elementary-footer { display: flex; justify-content: flex-end; padding: 16px 28px; border-top: 1px solid #eaf0f9; background: #fcfdff; }
.home-elementary-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 114px; min-height: 38px; padding: 0 17px; border: 0; border-radius: 7px; background: #4b78ff; color: #fff; font-size: 13px; font-weight: 400; }
.home-elementary-submit:disabled { background: #c5d4ff; color: #fff; }
@media (max-width: 480px) {
  .home-elementary-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .home-elementary-heading { padding-left: 16px; }
  .home-elementary-body, .home-elementary-footer { padding-left: 16px; padding-right: 16px; }
  .home-elementary-modes { gap: 8px; }
  .home-elementary-modes button { gap: 6px; padding-inline: 8px; }
  .home-elementary-body textarea { min-height: 150px; }
  .home-elementary-template-categories { flex-basis: 82px; padding-right: 5px; }
  .home-elementary-template-columns { gap: 7px; }
  .home-elementary-template-panel { padding: 9px; }
  .home-elementary-template-row { flex-wrap: wrap; }
  .home-elementary-template-choice { padding: 7px; }
  .home-elementary-template-download { margin-left: auto; }
  .home-elementary-upload-zone { min-height: 180px; }
  .home-elementary-upload { min-height: 178px; }
}
.jufa-home-page #chatElementaryPanel .elementary-panel-create { min-height: 0; min-width: 0; gap: 10px; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-header { flex: 0 0 auto; flex-wrap: nowrap; gap: 12px; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-tab { flex: 1; min-width: 0; margin: 0; padding: 0; gap: 12px; overflow-x: auto; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-tab-item { flex: 0 0 auto; margin: 0; padding: 0 0 4px; height: 26px; color: #666; font-size: 14px; line-height: 22px; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-tab-item-selected { color: #0a5de7; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-tab-item-selected:after { height: 2px; background: #0a5de7; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-search { flex: 0 0 160px; margin: 0; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-search input { width: 100%; height: 26px; border-radius: 4px; font: 400 12px/26px "Microsoft YaHei", sans-serif; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content { flex: 1; min-height: 0; margin: 0; padding: 0 12px 0 0; overflow-y: auto; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-list { --home-elementary-columns: 4; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px 12px; align-content: start; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-list.is-execution-category { --home-elementary-columns: 1; grid-template-columns: minmax(0,1fr); }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-item { width: auto; max-width: none; min-width: 0; min-height: 20px; height: auto; margin: 0; padding: 0; border: 0; border-radius: 4px; gap: 6px; transition: none; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-item.is-selected { background: rgba(10,93,231,.06); }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-item.is-execution-item { grid-column: 1 / -1; }
/* 单项尾行使用剩余整行宽度，避免只有第一列显示文字而其余位置空白。 */
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-item.is-single-row-item { grid-column: 1 / -1; }
.jufa-home-page #chatElementaryPanel .elementary-panel-create-content-item .item-text { line-height: 14px; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.jufa-home-page #chatElementaryPanel .is-execution-item .item-text { white-space: normal; overflow-wrap: anywhere; overflow: visible; line-height: 20px; }
.jufa-home-page #chatElementaryPanel .is-single-row-item .item-text { white-space: normal; overflow-wrap: anywhere; overflow: visible; line-height: 20px; }
.jufa-home-page #chatElementaryPanel .elementary-panel-empty { grid-column: 1 / -1; }
.jufa-home-page #chatElementaryPanel .item-icon,
.jufa-home-page .jufa-home-elementary-files .item-icon,
.jufa-home-question-box [data-home-elementary-template] .item-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border-radius: 3px; color: #fff; }
.jufa-home-page #chatElementaryPanel .item-icon i,
.jufa-home-page .jufa-home-elementary-files .item-icon i,
.jufa-home-question-box [data-home-elementary-template] .item-icon i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 12px; width: 12px; height: 12px; font-size: 12px; line-height: 12px; }
.jufa-home-page .item-icon.is-blue { background: #3874f6; }
.jufa-home-page .item-icon.is-orange { background: #f9843f; }
.jufa-home-page .item-icon.is-cyan { background: #47c5ee; }
.jufa-home-page .item-icon.is-green { background: #3cbe72; }
.jufa-home-page .item-icon.is-red { background: #f46363; }
.jufa-home-question-box .chat-input-type-label[data-home-elementary-template] { min-width: 0; max-width: calc(100% - 12px); height: 26px; padding: 0 8px; gap: 6px; border: 0; border-radius: 4px; background: rgba(10,93,231,.08); color: #333; font-size: 13px; line-height: 14px; }
.jufa-home-question-box [data-home-elementary-template] .jufa-home-input-type-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jufa-home-question-box [data-home-elementary-template] .jufa-home-input-type-close img { filter: brightness(0) invert(.2); }
.jufa-home-page .jufa-home-elementary-files { width: min(520px,calc(100vw - 32px)); max-height: calc(100vh - 80px); }
.jufa-home-page .jufa-home-elementary-files .ai-dialog__body { max-height: calc(100vh - 160px); overflow-y: auto; }
.jufa-home-elementary-file-list { display: flex; flex-direction: column; gap: 8px; }
.jufa-home-elementary-file { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; text-align: left; font: 400 13px/20px "Microsoft YaHei", sans-serif; color: #333; }
.jufa-home-elementary-file:hover,
.jufa-home-elementary-file:focus-visible { border-color: #0a5de7; background: rgba(10,93,231,.06); }
.jufa-home-elementary-file > span:last-child { min-width: 0; overflow-wrap: anywhere; }
/* MasterGo257:58457：截断名称的完整文本提示，26px单行高度、深灰底白字，不显示原生title。 */
.jufa-home-page .jufa-home-template-name-tooltip { position: fixed; z-index: 130; display: flex; align-items: center; box-sizing: border-box; width: max-content; min-height: 26px; max-width: calc(100vw - 16px); padding: 3px 6px; border: 0; border-radius: 4px; background: #333; color: #fff; font: 400 13px/20px "Microsoft YaHei", sans-serif; overflow-wrap: anywhere; pointer-events: none; }
.jufa-home-page .jufa-home-template-name-tooltip[hidden] { display: none; }
@media (max-width: 600px) {
  .jufa-home-page #chatElementaryPanel .elementary-panel-create-header { flex-wrap: wrap; gap: 8px; }
  .jufa-home-page #chatElementaryPanel .elementary-panel-create-tab { flex: 1 0 100%; }
  .jufa-home-page #chatElementaryPanel .elementary-panel-create-search { flex: 1 0 100%; }
  .jufa-home-page #chatElementaryPanel .elementary-panel-create-content-list { --home-elementary-columns: 2; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .jufa-home-page #chatElementaryPanel .elementary-panel-create-content-list.is-execution-category { grid-template-columns: minmax(0,1fr); }
}

.jufa-home-input-type-icon,
.jufa-home-input-type-close,
.jufa-home-input-type-close img {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.jufa-home-input-type-icon,
.jufa-home-input-type-close img {
  display: block;
}

.jufa-home-input-type-text {
  flex: 0 0 auto;
  width: auto;
  height: 16px;
  line-height: 16px;
  white-space: nowrap;
}

/* 原始3倍PNG仅提供透明轮廓，直接填充设计蓝色；不依赖Safari的颜色滤镜合成。 */
@supports ((mask-image: none) or (-webkit-mask-image: none)) {
  .jufa-home-mode.is-active.has-home-icon-mask > img.jufa-home-mode__icon,
  .jufa-home-input-type-label.has-home-icon-mask > img.jufa-home-input-type-icon,
  .jufa-home-skill-trigger.has-home-icon-mask > img.jufa-home-skill-icon { display: none; }
  .jufa-home-mode.is-active.has-home-icon-mask::before,
  .jufa-home-input-type-label.has-home-icon-mask::before,
  .jufa-home-skill-trigger.has-home-icon-mask::before {
    content: "";
    display: block;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-color: #0a5de7;
    -webkit-mask: var(--home-skill-image) center / contain no-repeat;
    mask: var(--home-skill-image) center / contain no-repeat;
  }
  .jufa-home-skill-trigger.has-home-icon-mask::before { flex-basis: 16px; width: 16px; height: 16px; }
}

/* 输入标签使用顶部相同图标字体，保持与关闭按钮同行对齐。 */
.jufa-home-question-box i.jufa-home-input-type-icon {
  font-size: 14px;
  line-height: 14px;
  font-style: normal;
  text-align: center;
}

.jufa-home-input-type-close {
  display: inline-flex;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.jufa-home-input-type-close:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(10, 93, 231, .35);
  outline-offset: 1px;
}

.jufa-home-input-type-close img {
  pointer-events: none;
}

/* 正文不建立独立排版上下文，允许文本绕过首行标签；空值仍沿用公共占位布局。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor .chat-input-editor-content {
  display: block;
  width: auto;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
  /* 模板提示对齐与约8行上限依赖24px正文，首行单独容纳32px技能标签。 */
  line-height: 24px;
}

.jufa-home-question-box .chat-input-ai .chat-input-editor.chat-input-type-tag .chat-input-editor-content::first-line {
  line-height: 32px;
}

.jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-editor-content::before {
  right: 0;
  width: auto;
  height: auto;
  white-space: nowrap;
  word-break: normal;
}

/* 空值提示按24px行高与前方标签居中：普通标签32px、所选模板标签26px；不改正文及光标行高。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor.chat-input-type-tag.editor-placeholder .chat-input-editor-content::before {
  padding-top: 4px;
}

.jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-type-label[data-home-document-template] ~ .chat-input-editor-content::before,
.jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-type-label[data-home-elementary-template] ~ .chat-input-editor-content::before {
  padding-top: 1px;
}

/* 默认与法律研究提示较长，窄屏允许完整换行；其他技能提示保持原有布局。 */
.jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder:not(.chat-input-type-tag) .chat-input-editor-content::before,
body[data-home-mode="law_QA"] .jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-editor-content::before {
  white-space: normal;
}

/* 浮动提示保留长文案高度，负外边距释放行内宽度，避免空光标排在提示之后。 */
body[data-home-mode="law_QA"] .jufa-home-question-box .chat-input-ai .chat-input-editor.editor-placeholder .chat-input-editor-content::before {
  position: static;
  display: block;
  float: left;
  width: 100%;
  margin-right: -100%;
}

.jufa-home-question-box .chat-fn-tabs {
  display: none !important;
}

.jufa-home-examples {
  width: 782px;
  margin-top: 34px;
}

/* 技能说明独立于原示例标题；长说明按可用宽度自然换行。 */
.jufa-home-skill-description {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-family: "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.jufa-home-skill-description__title {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  color: rgba(51, 51, 51, 0.9);
  white-space: nowrap;
}

.jufa-home-skill-description__body {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 24px;
  color: #999999;
  overflow-wrap: anywhere;
}

.jufa-home-skill-description[hidden],
.jufa-home-examples__default[hidden],
.jufa-home-examples__dynamic[hidden] {
  display: none !important;
}

/* 默认八卡采用182×140的紧凑样式，示例预加载和悬停/点击仍沿用原入口。 */
.jufa-home-default-examples__title {
  display: none;
}

.jufa-home-default-examples__grid {
  display: grid;
  grid-template-columns: repeat(4, 182px);
  justify-content: center;
  gap: 10px 16px;
}

.jufa-home-default-example {
  position: relative;
  display: block;
  width: 182px;
  height: 140px;
  min-width: 0;
  min-height: 140px;
  box-sizing: border-box;
  padding: 12px 14px 0;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background: #fff;
  color: #353a49;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.jufa-home-default-example:hover,
.jufa-home-default-example:focus-visible,
.jufa-home-default-example.is-active {
  border-color: #cfd5ff;
  box-shadow: 0 8px 22px rgba(50, 62, 136, .09);
  outline: 0;
  transform: translateY(-1px);
}

.jufa-home-default-example strong {
  display: block;
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 1;
  margin: 0;
  color: #333;
  font: 400 13px/20px "Microsoft YaHei", sans-serif;
}

.jufa-home-default-example > span:not(.jufa-home-default-example__preview) {
  display: block;
  overflow: hidden;
  color: #9296a2;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jufa-home-default-example__preview {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 107px;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.jufa-home-default-example__preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

/* 原生设计插图按卡片内部180×107区域导出，随窄屏卡片等比收缩。 */
.jufa-home-default-example__preview > img {
  width: 100%;
  height: 100%;
}

/* 法律研究复用设计稿原生3倍PNG图层，按180×107配图区坐标等比排列。 */
.jufa-home-law-research-art {
  position: relative;
  display: block;
  width: 100%;
  max-width: 180px;
  aspect-ratio: 180 / 107;
}
.jufa-home-law-research-art > img {
  position: absolute;
  max-width: none;
  max-height: none;
}
.jufa-home-law-research-art .jufa-home-law-research-art__question {
  /* 原生导出含阴影留白：左15px、上11px，显示尺寸178×118。 */
  left: .5556%;
  top: 0;
  width: 98.8889%;
}
.jufa-home-law-research-art .jufa-home-law-research-art__scales {
  left: 63.8889%;
  top: 60.7477%;
  width: 23.3333%;
}
.jufa-home-law-research-art .jufa-home-law-research-art__caption {
  /* 胶囊同样保留导出阴影，按3倍原图325×158定位，避免文字被缩小。 */
  left: 12.7833%;
  top: 40.1869%;
  width: 60.1852%;
}

.jufa-home-default-example__view-sample {
  position: absolute;
  display: block;
  bottom: 8px;
  left: 50%;
  width: 88px;
  max-width: none;
  height: 30px;
  max-height: none;
  background: url('/static/Public/images/new_home/home-example-view-sample.svg') center / 88px 30px no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

/* 保留原胶囊背景和文字，仅在原鼠标区域覆盖用户提供的透明 GIF。 */
.jufa-home-default-example__view-sample .jufa-home-default-example__pointer {
  position: absolute;
  left: 12px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: #333;
}

/* 仅首页福利官活动弹窗：去除 Bootstrap 内边距，避免固定宽度内层挤出关闭按钮。 */
body.jufa-home-page .siyu_dialog .jufa_fuliguan_box > .jufa_siyu_box {
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .jufa-home-default-example__view-sample .jufa-home-default-example__pointer {
    display: none;
  }
}

.jufa-home-default-example:hover .jufa-home-default-example__view-sample,
.jufa-home-default-example:focus-visible .jufa-home-default-example__view-sample {
  opacity: 1;
}

.jufa-home-examples__heading {
  display: flex;
  align-items: center;
  height: 24px;
  margin-bottom: 16px;
}

.jufa-home-examples__bulb.iconfont {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  color: #06f;
  font-size: 18px;
  line-height: 18px;
}

.jufa-home-examples__title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #333;
  font-size: 12px;
  font-weight: 400;
  line-height: 24px;
}

/* 主标题与辅助说明分别设样式，避免通用 span 规则覆盖标题层级。 */
.jufa-home-examples__title-main {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}

.jufa-home-examples__caption {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.jufa-home-examples__grid {
  display: grid;
  grid-template-columns: repeat(2, 385px);
  gap: 14px 12px;
}

.jufa-home-example {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 385px;
  height: 84px;
  box-sizing: border-box;
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(245, 245, 248, .7);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

/* 示例可能渲染为链接：去除鼠标焦点的公共黑框，键盘仍保留下方原有蓝色边框。 */
body.jufa-home-page .jufa-home-example:focus,
body.jufa-home-page .jufa-home-default-example:focus {
  outline: 0;
  text-decoration: none;
}

.jufa-home-example:hover,
.jufa-home-example:focus-visible {
  border-color: #315efb;
  background: #fff;
  outline: 0;
}

.jufa-home-example__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 18px;
  padding: 0 4px;
  overflow: hidden;
  border-radius: 4px;
  color: #315efb;
  background: #e8edff;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

/* 动态示例按展示顺序区分两种设计色，保持标签原有尺寸和排版。 */
.jufa-home-example__type--green {
  color: #2CA79C;
  background: rgba(44, 167, 156, .10);
}

.jufa-home-example__type--blue {
  color: #0A5DE7;
  background: rgba(10, 93, 231, .08);
}

.jufa-home-example__content {
  display: -webkit-box;
  flex: 1 1 auto;
  overflow: hidden;
  color: #666;
  font-size: 14px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: clip;
  white-space: normal;
}

.jufa-home-examples__empty {
  margin: 26px 0 0;
  color: #999;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 1100px) {
  .jufa-home-hero { left: 0; width: min(760px, calc(100% - 48px)); padding-top: 54px; }
  .jufa-home-mode-list { width: 100%; }
  .jufa-home-examples { width: 100%; }
  .jufa-home-examples__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .jufa-home-example { width: 100%; }
  .jufa-home-default-examples__grid { grid-template-columns: repeat(2, 182px); justify-content: space-around; gap: 10px 12px; }
}

@media (max-width: 760px) {
  .jufa-home-layout { height: calc(100dvh - var(--home-header-height)); min-height: 0; }
  .jufa-home-page--embedded .jufa-home-layout { height: 100dvh; }
  .jufa-home-sidebar { display: none; }
  .jufa-home-sidebar-toggle { display: none; }
  .jufa-home-hero { left: 0; width: calc(100% - 28px); padding-top: 42px; }
  .jufa-home-slogan { font-size: 28px; }
  .jufa-home-mode-list { justify-content: flex-start; }
  .jufa-home-examples__heading { align-items: flex-start; height: auto; }
}

/* 两列卡片随可用宽度收缩，避免窄屏右列超出内容区。 */
@media (max-width: 420px) {
  .jufa-home-default-examples__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jufa-home-default-example { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .jufa-home-new-task,
  .jufa-home-menu__control,
  .jufa-home-mode { transition: none; }
}

/* 首页内容区与公共头部的灰色背景衔接。 */
.jufa-home-page .jufa-home-layout { background: var(--home-sidebar); }
.jufa-home-page .jufa-home-sidebar { border-right: 0; }

/* MasterGo 首页/多状态：248px 浮窗，228×52px 会员卡；邀请行隐藏后自然减高34px。 */
.jufa-home-user { position: relative; z-index: 30; flex: 0 0 auto; margin-top: auto; width: 216px; font-family: "Microsoft YaHei", sans-serif; }
.jufa-home-user [hidden] { display: none !important; }
.jufa-home-user button { font-family: inherit; cursor: pointer; }
.jufa-home-user button:focus-visible { outline: 2px solid #0a5de7; outline-offset: 2px; }
.jufa-home-upgrade { position: absolute; left: 0; bottom: 62px; width: 216px; height: 62px; box-sizing: border-box; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #e3e3e3,0 2px 10px rgba(0,0,0,.05); color: #333; }
.jufa-home-upgrade__title { position: absolute; left: 12px; top: 13px; font-size: 14px; font-weight: 700; line-height: 18px; }
.jufa-home-upgrade__description { position: absolute; left: 12px; top: 35px; font-size: 12px; font-weight: 400; line-height: 16px; color: #9e9e9e; }
.jufa-home-upgrade__action { position: absolute; left: 132px; top: 17px; width: 72px; height: 28px; padding: 0; border: 0; border-radius: 10px; background: #333; color: #fff; font-size: 12px; line-height: 28px; }
.jufa-home-upgrade__close { position: absolute; top: 3px; left: 198px; display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: transparent; color: #ccc; }
.jufa-home-upgrade__close svg { width: 12px; height: 12px; }
.jufa-home-sidebar.is-collapsed .jufa-home-upgrade { display: none; }
.jufa-home-user-trigger { display: flex; align-items: center; gap: 8px; width: 216px; height: 46px; padding: 6px 8px; border: 0; border-radius: 6px; background: rgba(227,227,227,.4); text-align: left; }
.jufa-home-user-trigger__identity { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.jufa-home-user-trigger__name, .jufa-home-user-name { overflow: hidden; color: #333; font-size: 12px; font-weight: 400; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.jufa-home-user-trigger__level { color: #999; font-family: 'Microsoft YaHei', sans-serif; font-size: 12px; font-weight: 400; line-height: 16px; }
/* 四种身份分别按设计字号和图文位置显示，沿用既有思源/微软雅黑回退，不加载专属字库。 */
.jufa-home-user-trigger__level--badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 2px; box-sizing: border-box; width: 40px; height: 16px; padding: 0 2px; border-radius: 4px; background: linear-gradient(91deg, #fae29d 0%, #ffd6a7 31%); color: #533604; font-family: 'Source Han Sans', 'Microsoft YaHei', sans-serif; font-size: 10px; font-weight: 700; line-height: 14px; letter-spacing: 0; white-space: nowrap; }
.jufa-home-user-trigger__level--badge img { display: block; flex: 0 0 12px; width: 12px; height: 12px; }
.jufa-home-user-trigger__level--badge > span { display: block; }
.jufa-home-user-trigger__level--regular { width: 48px; padding: 0 4px; background: rgba(153, 153, 153, .2); color: #333; font-weight: 500; }
.jufa-home-user-trigger__level--svip { gap: 1px; }
.jufa-home-user-trigger__level--database { gap: 1px; width: 58px; padding-right: 3px; font-size: 8px; line-height: 12px; }
.jufa-home-user-trigger__identity { padding-right: 22px; }
.jufa-home-user-message { position: absolute; bottom: 8px; right: 4px; width: 28px; height: 30px; padding: 0; border: 0; background: transparent; color: #999; }
.jufa-home-user-message .iconfont { font-size: 18px; }
.jufa-home-user-avatar { display: block; flex: 0 0 28px; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; }
.jufa-home-user-avatar .zUserPhoto, .jufa-home-user-avatar img, .jufa-home-user-avatar .zUserPhoto img, .jufa-home-user-avatar .zUserPhoto div { width: 28px; height: 28px; margin: 0; border-radius: 50%; line-height: 28px; }
.jufa-home-user-avatar img { object-fit: contain; }
/* 不覆盖公共头像的显隐：图片有效时保留图片，加载失败才显示姓名。 */
.jufa-home-user-panel { position: absolute; left: 0; bottom: 62px; z-index: 1000; display: flex; flex-direction: column; gap: 9px; width: 248px; box-sizing: border-box; padding: 10px; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #e3e3e3, 0 2px 10px rgba(0,0,0,.05); }
.jufa-home-user-panel__top { display: flex; align-items: center; gap: 8px; height: 28px; }
.jufa-home-user-panel__identity { min-width: 0; }
.jufa-home-user-vip { position: relative; isolation: isolate; flex: 0 0 52px; width: 228px; height: 52px; overflow: hidden; border-radius: 6px; background: linear-gradient(165deg,#80affb 1%,#2949a6 24%,#152770 76%); color: #fff; }
.jufa-home-user-vip::before, .jufa-home-user-vip::after { content: ""; position: absolute; z-index: -1; width: 72.25px; height: 27px; border-radius: 50%; transform: rotate(14.17deg); filter: blur(31px); }
.jufa-home-user-vip::before { left: -23.71px; top: 26.45px; background: #2fa0fc; }
.jufa-home-user-vip::after { left: 187.61px; top: -17px; background: #2f6cfc; }
.jufa-home-user-vip__decoration { position: absolute; z-index: -1; left: 62.5px; top: -45px; width: 91.32px; height: 91.63px; transform: rotate(61.47deg); opacity: .5; background: url('/static/Public/images/new_home/home-user-vip-decoration.png') center / 100% 100%; }
.jufa-home-user-vip__name { position: absolute; left: 10px; top: 8px; max-width: 128px; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 17px; white-space: nowrap; text-overflow: ellipsis; }
.jufa-home-user-vip__date { position: absolute; left: 10px; top: 28px; width: 84px; overflow: hidden; font-family: 'Microsoft YaHei', sans-serif; font-size: 11px; font-weight: 400; line-height: 15px; white-space: nowrap; text-overflow: ellipsis; }
.jufa-home-user-vip__more { position: absolute; left: 106px; top: 28px; display: flex; align-items: flex-start; padding: 0; border: 0; background: transparent; color: #fff; font-family: 'Microsoft YaHei', sans-serif; font-size: 11px; font-weight: 400; line-height: 15px; }
.jufa-home-user-vip__more svg { flex: 0 0 12px; width: 12px; height: 12px; margin-top: 2px; }
.jufa-home-user-vip__more[aria-expanded="true"] svg { transform: rotate(90deg); }
.jufa-home-user-vip.is-nonmember .jufa-home-user-vip__date { width: 123px; opacity: .7; }
.jufa-home-user-vip.is-expanded { flex-basis: auto; height: auto; box-sizing: border-box; padding: 64px 0 10px; background: linear-gradient(151deg,#80affb -1%,#2949a6 21%,#152770 78%); }
.jufa-home-user-vip__frame { display: none; }
.jufa-home-user-vip.is-expanded .jufa-home-user-vip__frame { display: block; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.jufa-home-user-vip__frame::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(180deg,#fff -11%,rgba(255,255,255,0) 100%); -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.jufa-home-user-vip__frame::after { content: ""; position: absolute; left: 10px; top: 53px; width: 208px; height: 1px; opacity: .5; background: linear-gradient(270deg,rgba(255,255,255,0) 0%,#4c80fa 49%,rgba(255,255,255,0) 100%); }
.jufa-home-user-vip__details { position: relative; max-height: 57px; margin: 0 5px 0 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #aeb9e0 transparent; font-size: 11px; font-weight: 400; line-height: 15px; }
.jufa-home-user-vip__details p { display: grid; grid-template-columns: 66px minmax(0,1fr); column-gap: 4px; margin: 0 0 6px; color: #fff; font-size: inherit; font-weight: 400; line-height: inherit; }
.jufa-home-user-vip__details p:last-child { margin-bottom: 0; }
.jufa-home-user-vip__member-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jufa-home-user-vip__member-date { overflow-wrap: anywhere; }
.jufa-home-user-vip__details::-webkit-scrollbar { width: 3px; }
.jufa-home-user-vip__details::-webkit-scrollbar-track { background: transparent; }
.jufa-home-user-vip__details::-webkit-scrollbar-thumb { border-radius: 3px; background: #aeb9e0; }
@supports selector(::-webkit-scrollbar) {
  .jufa-home-user-vip__details { scrollbar-width: auto; scrollbar-color: auto; }
}
.jufa-home-user-vip__renew { position: absolute; left: 146px; top: 13px; width: 72px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.6); border-radius: 12px; background: linear-gradient(94deg,#ced7f1 8%,#f4f6fc 64%,#ced7f1 98%); color: #152770; font-size: 12px; line-height: 24px; }
.jufa-home-user-menu { display: flex; flex-direction: column; gap: 4px; }
.jufa-home-user-menu__item, .jufa-home-user-menu__download, .jufa-home-user-logout { display: flex; align-items: center; gap: 4px; width: 228px; height: 30px; padding: 0 6px; box-sizing: border-box; border: 0; border-radius: 4px; background: transparent; color: #333; font-size: 13px; font-weight: 400; line-height: 17px; text-align: left; }
.jufa-home-user-menu__item:hover, .jufa-home-user-menu__download:hover, .jufa-home-user-logout:hover { background: rgba(227,227,227,.4); }
.jufa-home-user-menu i, .jufa-home-user-logout i { flex: 0 0 16px; width: 16px; height: 16px; font-size: 16px; line-height: 16px; color: #666; }
.jufa-home-user-menu__arrow { display: block; flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; }
.jufa-home-user-menu__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; }
.jufa-home-user-menu__icon img { display: block; flex: none; }
.jufa-home-user-logout { margin-top: -5px; }
/* MasterGo 368:004932：392×181三列，固定状态行使手机与桌面内容保持同一基线。 */
.jufa-home-user-download-layer { position: absolute; left: calc(100% + 15px); bottom: 10px; z-index: 1001; display: flex; width: 392px; max-width: calc(100vw - 16px); height: 181px; overflow-x: auto; overflow-y: hidden; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #e3e3e3, 0 2px 10px rgba(0,0,0,.05); }
.jufa-home-user-download-layer::after { content: none; }
.jufa-home-user-download-layer .header_download_popover { position: relative; display: block; top: auto; left: auto; right: auto; flex: 0 0 130px; width: 130px; height: 181px; margin: 0; padding: 0; border-radius: 0; background: transparent; transform: none; box-shadow: none; }
.jufa-home-user-download-layer .header_phone_download_popover { flex-basis: 132px; width: 132px; }
.jufa-home-user-download-layer .header_purpose_download_popover.has-detected-system { width: 130px; }
.jufa-home-user-download-layer .header_purpose_download_popover::before { content: ""; position: absolute; left: 0; top: 45px; width: 1px; height: 70px; background: #ededed; pointer-events: none; }
.jufa-home-user-download-layer .header_download_popover .down_box_title { top: 14px; left: 0; width: 100%; font-size: 12px; line-height: 18px; }
.jufa-home-user-download-layer .header_download_title_icon { width: 16px; height: 16px; }
.jufa-home-user-download-layer .header_phone_download_content .header_phone_download_visual { top: 58px; left: 29px; width: 85px; height: 80px; }
.jufa-home-user-download-layer .header_app_phone_frame { display: block; left: -11px; width: 107px; height: 101px; }
/* 手机外框与真实二维码分层，左下角继承公共头二维码资源，避免合成图残留旧码。 */
.jufa-home-user-download-layer .header_phone_download_popover .webchatImg { left: 10.5px; top: 15.5px; width: 64px; height: 64px; }
.jufa-home-user-download-layer .header_phone_download_content > p { top: 149px; left: 12px; width: 110px; height: 18px; color: #000; font: 10px/17.38px "Microsoft YaHei", sans-serif; }
.jufa-home-user-download-layer .header_purpose_download_popover .pc_download_default > .pc_box { top: 76px; left: 0; width: 100%; justify-content: center; }
.jufa-home-user-download-layer .header_purpose_download_popover[data-download-kind="plugin"] .purpose_download_item > span:not(.download_platform_label) { display: none; }
.jufa-home-user-download-layer .header_purpose_download_popover.has-detected-system[data-download-kind="plugin"] .purpose_download_item > .download_platform_label { display: block; margin: 7px 0 16px; font-size: 11px; line-height: 16px; }
.jufa-home-user-download-layer.has-unknown-system .header_purpose_download_popover { flex-basis: 288px; width: 288px; }
.jufa-home-user-download-layer.has-unknown-system .header_purpose_download_popover .pc_download_default > .pc_box { justify-content: space-around; }
.jufa-home-user-download-layer.has-unknown-system .header_purpose_download_popover[data-download-kind="plugin"] .purpose_download_item > span:not(.download_platform_label) { display: block; }
.jufa-home-sidebar.is-collapsed .jufa-home-user { width: 36px; margin-top: auto; }
.jufa-home-sidebar.is-collapsed .jufa-home-user-trigger { width: 36px; padding: 4px; }
.jufa-home-sidebar.is-collapsed .jufa-home-user-trigger__identity { display: none; }
.jufa-home-sidebar.is-collapsed .jufa-home-user-message { display: none; }
