/* 首页「助理」浅色工作台（对齐本机 R74 灰白首页 + R80 指令直办）
 * 只在 body.gov-home-mode 下生效；其他业务页仍沿用 gov-red.css 深色主题。
 * 载入顺序：app.css → gov-red.css → home.css
 */

html.gov-home-mode,
html.gov-home-mode body {
  background: #f5f7fa !important;
  color: #1f2937;
  overflow: hidden;
}

body.gov-home-mode {
  background-image: none !important;
}

/* ------------------------------------------------------------ 主区域画布 */
.gov-home-mode .main {
  background-color: #f5f7fa !important;
  background-image:
    radial-gradient(900px 520px at 16% -4%, rgba(31, 60, 110, .055), transparent 62%),
    radial-gradient(760px 460px at 92% 90%, rgba(200, 16, 46, .045), transparent 66%),
    linear-gradient(rgba(23, 43, 77, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 43, 77, .04) 1px, transparent 1px),
    linear-gradient(160deg, #fafbfd 0%, #eef2f7 55%, #f8fafc 100%) !important;
  background-size: auto, auto, 64px 64px, 64px 64px, auto !important;
}

.gov-home-mode .topbar {
  position: static;
  z-index: 20;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 16px 26px 4px;
}

.gov-home-mode .topbar-title { display: none; }

.gov-home-mode .content {
  flex: 1;
  min-height: 0;
  max-width: none;
  padding: 0;
  display: flex;
  overflow-y: auto;
}

.gov-home-mode .top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 8px 4px 10px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(23, 43, 77, .06);
}

.gov-home-mode .top-right .status-pill {
  background: #fff;
  border-color: #e3e7ee;
  color: #55606f;
}
.gov-home-mode .top-right .status-pill i {
  background: #d9a227;
  box-shadow: 0 0 0 3px rgba(217, 162, 39, .16);
}
.gov-home-mode .top-right .clock {
  font-size: 11.5px;
  color: #667085;
  min-width: 118px;
  text-align: right;
}
.gov-home-mode .top-right .top-tools { display: flex; gap: 2px; }
.gov-home-mode .top-right .btn-ghost { color: #55606f; }
.gov-home-mode .top-right .btn-ghost:hover { background: #eef2f7; color: #a50f1b; }
.gov-home-mode .top-right .contrast-toggle { display: none; }
.gov-home-mode .top-right .user-chip { color: #414b5a; gap: 4px; }
.gov-home-mode .top-right .user-chip .avatar { display: none; }
.gov-home-mode .top-right .user-chip > div:nth-child(2) {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.gov-home-mode .top-right .user-chip > div > div:first-child { font-size: 12px; font-weight: 600; }
.gov-home-mode .top-right .user-chip .user-role { font-size: 10.5px; color: #8a94a3 !important; }
.gov-home-mode .top-right .user-chip .user-role::before { content: "（"; }
.gov-home-mode .top-right .user-chip .user-role::after { content: "）"; }
.gov-home-mode .top-right .user-chip .btn { display: none; }

.home-actions { display: flex; align-items: center; gap: 2px; }
.home-act {
  border: 0;
  background: transparent;
  color: #55606f;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.home-act:hover { background: #f1f4f8; color: #a50f1b; }
.home-act-count { font-size: 10.5px; color: #a50f1b; margin-left: 3px; }
.home-todo { color: #a50f1b; }
.home-todo-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #c8102e;
  color: #fff;
  font-size: 10.5px;
  line-height: 1.5;
}

/* ------------------------------------------------------------ 左侧栏（浅色） */
.gov-home-mode .shell { grid-template-columns: 232px 1fr; }
.gov-home-mode .sidebar {
  background-color: #f9fafc;
  background-image:
    radial-gradient(320px 220px at 50% -16%, rgba(31, 60, 110, .05), transparent 70%),
    linear-gradient(rgba(23, 43, 77, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 43, 77, .035) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcfe 0%, #f1f4f8 100%);
  background-size: auto, 32px 32px, 32px 32px, auto;
  border-right: 1px solid #e3e7ee;
  box-shadow: none;
  color: #414b5a;
  flex-direction: column;
  position: sticky;
  height: 100vh;
}
.gov-home-mode .brand { padding: 6px 8px 16px; gap: 10px; }
/* `.brand` 是侧栏品牌块样式（上下大内边距）；状态徽标同时带 `badge brand` 时
 * 不能被它撑成圆块——识图卡的“AI 识图”标签、回答卡的“相关度”标签都受影响。 */
.gov-home-mode .badge.brand { display: inline-flex; padding: 2px 8px; gap: 4px; }
.gov-home-mode .brand-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e7ee;
}
.gov-home-mode .brand-text b {
  color: #7c0a10;
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: .02em;
}
.gov-home-mode .brand-text span {
  color: #7a8494;
  letter-spacing: .08em;
  font-size: 10.5px;
}

.gov-home-mode .home-new {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  margin: 2px 0 14px;
  padding: 0 11px;
  border: 1px solid #e3e7ee;
  border-radius: 9px;
  background: #fff;
  color: #7c0a10;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(23, 43, 77, .04);
}
.gov-home-mode .home-new:hover { background: #f1f4f8; border-color: #d3d9e3; }
.gov-home-mode .home-new.is-current { background: #fff; border-color: #e3e7ee; }
.gov-home-mode .home-new .nav-ico { color: #c8102e; opacity: 1; }
.gov-home-mode .home-new-kbd {
  margin-left: auto;
  color: #9aa3b2;
  font-size: 10px;
  letter-spacing: 0;
}

.gov-home-mode .home-nav { display: flex; flex-direction: column; gap: 2px; }
.gov-home-mode .home-nav .nav-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: #414b5a;
  font-size: 13.5px;
  gap: 9px;
}
.gov-home-mode .home-nav .nav-item:hover { background: #e9edf3; color: #7c0a10; }
.gov-home-mode .home-nav .nav-item .nav-ico { color: #6b7789; opacity: 1; }
.gov-home-mode .home-nav .nav-item:hover .nav-ico { color: #c8102e; }

.gov-home-mode .nav-ico { opacity: 1; }

/* 更多（原生 details，点击外部无需额外脚本） */
.gov-home-mode .home-more { margin-top: 2px; }
.gov-home-mode .home-more-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #414b5a;
  font-size: 13.5px;
  cursor: pointer;
  list-style: none;
}
.gov-home-mode .home-more-toggle::-webkit-details-marker { display: none; }
.gov-home-mode .home-more-toggle:hover { background: #e9edf3; color: #7c0a10; }
.gov-home-mode .home-more-toggle .nav-ico { color: #6b7789; }
.gov-home-mode .home-more-hint { margin-left: auto; color: #9aa3b2; font-size: 10.5px; }
.gov-home-mode .home-more-menu {
  display: grid;
  gap: 2px;
  margin: 2px 0 6px 10px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(23, 43, 77, .10);
  max-height: 280px;
  overflow: auto;
}
.gov-home-mode .home-more-item {
  padding: 7px 9px;
  border-radius: 7px;
  color: #414b5a;
  font-size: 12.5px;
  text-decoration: none;
}
.gov-home-mode .home-more-item:hover { background: #eef2f7; color: #a50f1b; }

/* 任务 / 空间 */
.gov-home-mode .home-sec {
  margin-top: 16px;
  border-top: 1px solid #edf0f4;
  padding-top: 8px;
}
.gov-home-mode .home-sec-head {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7789;
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.gov-home-mode .home-sec-head:hover { background: #eef2f7; color: #7c0a10; }
.gov-home-mode .home-sec-title { display: flex; align-items: center; gap: 6px; }
.gov-home-mode .home-sec-count { color: #9aa3b2; font-size: 11.5px; }
.gov-home-mode .home-sec-head > .nav-ico {
  margin-left: auto;
  color: #9aa3b2;
  transition: transform .16s ease;
}
.gov-home-mode .home-sec.is-open .home-sec-head > .nav-ico { transform: rotate(180deg); }
.gov-home-mode .home-sec-list { padding: 2px 8px 6px 10px; }
.gov-home-mode .home-task {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.gov-home-mode .home-task:hover { background: #eef2f7; }
.gov-home-mode .home-task-intent {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #414b5a;
  font-size: 12.5px;
}
.gov-home-mode .home-task-meta { color: #8a94a3; font-size: 11px; }
.gov-home-mode .home-sec-empty { padding: 7px 8px; color: #9aa3b2; font-size: 12px; }
.gov-home-mode .home-sec-more {
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: #a50f1b;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.gov-home-mode .home-sec-more:hover { background: #eef2f7; border-radius: 7px; }
.gov-home-mode .home-space-note {
  padding: 4px 8px;
  color: #8a94a3;
  font-size: 11.5px;
  line-height: 1.7;
}
.gov-home-mode .home-space-link {
  display: inline-block;
  margin: 4px 8px;
  color: #a50f1b;
  font-size: 12px;
  text-decoration: none;
}

/* 底部账号 */
.gov-home-mode .sidebar-foot {
  margin-top: auto;
  padding: 10px 2px 2px;
  border-top: 1px solid #edf0f4;
  color: #8a94a3;
}
.gov-home-mode .home-account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px;
}
.gov-home-mode .home-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe3e0;
  color: #a50f1b;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.gov-home-mode .home-account-text { min-width: 0; }
.gov-home-mode .home-account-text b {
  display: block;
  color: #414b5a;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gov-home-mode .home-account-text span { color: #8a94a3; font-size: 10.5px; }
.gov-home-mode .home-logout {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a94a3;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.gov-home-mode .home-logout:hover { background: #e9edf3; color: #a50f1b; }

/* ------------------------------------------------------------ 首页主视觉 */
.gh-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 32px 44px;
}
.gh-hero {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gh-mascot {
  width: 128px;
  height: 94px;
  margin-bottom: 4px;
  filter: drop-shadow(0 10px 18px rgba(48, 0, 4, .16));
}
.gh-mascot svg { display: block; width: 100%; height: 100%; }
.gh-title {
  margin: 0;
  color: #5a0b12;
  font-family: var(--sans);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-align: center;
}

.gh-tabs {
  display: inline-flex;
  gap: 2px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 999px;
  background: #eaeef4;
  box-shadow: inset 0 0 0 1px rgba(200, 16, 46, .08), 0 8px 20px rgba(23, 43, 77, .06);
}
.gh-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #55606f;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.gh-tab .nav-ico { color: #6b7789; opacity: 1; }
.gh-tab:hover { background: rgba(200, 16, 46, .06); color: #a50f1b; }
.gh-tab.is-active {
  background: #fff;
  color: #b0121e;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(23, 43, 77, .12);
}
.gh-tab.is-active .nav-ico { color: #c8102e; }

.gh-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 900px;
  margin: 36px 0 14px;
}
.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1px solid rgba(200, 16, 46, .16);
  border-radius: 999px;
  background: #fff;
  color: #4f5a68;
  font-family: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(23, 43, 77, .04);
}
.gh-chip .nav-ico { color: #6b7789; opacity: 1; }
.gh-chip:hover {
  border-color: rgba(200, 16, 46, .34);
  background: #f5f7fa;
  color: #a50f1b;
}
.gh-chip:hover .nav-ico { color: #c8102e; }

.gh-composer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  min-height: 132px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  border: 1px solid #e3e7ee;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 18px 40px rgba(23, 43, 77, .10),
    0 1px 0 #fff inset;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gh-composer:hover { border-color: #d3d9e3; }
.gh-composer:focus-within {
  border-color: #c8102e;
  box-shadow:
    0 0 0 3px rgba(200, 16, 46, .12),
    0 18px 40px rgba(23, 43, 77, .10);
}
.gh-input {
  width: 100%;
  height: 87px;          /* 固定 3 行：输入多行时卡片不再变高/上跳 */
  min-height: 58px;
  max-height: 168px;
  padding: 2px 2px 8px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;      /* 超出 3 行在输入框内滚动 */
  background: transparent;
  color: #1f2937;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}
.gh-input::placeholder { color: #8a94a3; }
/* R124：快捷入口锁定的流程标记；点 × 取消锁定。 */
.gh-lock {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0 0 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: rgba(200, 16, 46, .08);
  color: #a50f1b;
  font-size: 12px;
  line-height: 1.4;
}
.gh-lock-label { white-space: nowrap; }
.gh-lock-clear {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a50f1b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.gh-lock-clear:hover { background: rgba(200, 16, 46, .14); }
/* R124：意图冲突澄清卡的选项按钮。 */
.gh-clarify {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0 40px;
}
.gh-clarify-opt {
  padding: 6px 14px;
  border: 1px solid rgba(200, 16, 46, .35);
  border-radius: 999px;
  background: #fffdf8;
  color: #a50f1b;
  font-size: 13px;
  cursor: pointer;
}
.gh-clarify-opt:hover { background: rgba(200, 16, 46, .08); border-color: #c8102e; }
/* 焦点指示由整张输入卡（.gh-composer:focus-within）承担；
   textarea 自身不再画 outline，避免输入卡里再出现一个内层边框。 */
.gh-input:focus,
.gh-input:focus-visible {
  outline: 0;
  outline-offset: 0;
}

.gh-composer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  min-height: 38px;
}
.gh-plus {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f6b7a;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.gh-plus:hover { background: #eef2f7; color: #c8102e; }
.gh-flex { flex: 1; }
.gh-send {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #c8102e;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(200, 16, 46, .22);
}
.gh-send:hover:not(:disabled) { background: #a50f1b; }
.gh-send:disabled {
  background: #c8102e;
  color: #fff;
  box-shadow: 0 6px 14px rgba(200, 16, 46, .14);
  opacity: .6;
  cursor: not-allowed;
}
.gh-send-dot {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gh-spin .8s linear infinite;
}
@keyframes gh-spin { to { transform: rotate(360deg); } }

.gh-files { display: flex; flex-wrap: wrap; gap: 6px; max-width: 480px; }
.gh-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 240px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #f1f4f8;
  color: #55606f;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-file button {
  border: 0;
  background: transparent;
  color: #8a94a3;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.gh-file button:hover { color: #c8102e; }
/* 输入框附件：文件名一行、类型/识别状态一行（对齐参考图的两行文件卡）。 */
.gh-file-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.gh-file-main .gh-file-name { font-size: 11.5px; color: #3d4757; }
.gh-file-state { font-size: 10px; color: #8a94a3; }
.gh-file.is-uploading .gh-file-state { color: #a50f1b; }

/* 试识别结果条：只出现在输入框内，不写对话。 */
.gh-recognize {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px dashed #d9e2ef;
  border-radius: 8px;
  background: #f7fafd;
  color: #55606f;
  font-size: 11.5px;
  line-height: 1.5;
}
.gh-recognize.ok { border-color: #cfe6d8; background: #f5fbf7; color: #2f6b46; }
.gh-recognize.warn { border-color: #f0d9a8; background: #fffbf0; color: #7a5a12; }
.gh-recognize.busy { border-color: #d6e4f5; background: #f7fbff; }
.gh-recognize-ico { display: inline-flex; flex: none; color: inherit; }
.gh-recognize-text {
  flex: 1;
  min-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-recognize-act {
  margin-left: 4px;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
}
.gh-recognize-act:hover { background: rgba(0, 0, 0, .05); }

.gh-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  margin: 10px auto 0;
  color: #667085;
  font-size: 12px;
}
.gh-meta-mode { display: flex; align-items: center; gap: 7px; }
.gh-meta-mode i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9a227;
  box-shadow: 0 0 0 3px rgba(217, 162, 39, .16);
}
.gh-version {
  padding: 2px 10px;
  border: 1px solid #e3e7ee;
  border-radius: 999px;
  background: #fff;
  color: #55606f;
  font-size: 11.5px;
}

.gh-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 800px;
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  background: #fff;
  color: #414b5a;
  font-size: 13px;
  line-height: 1.7;
}
.gh-notice.info { border-color: #d6e4f5; background: #f7fbff; }
.gh-notice.warn { border-color: #f0d9a8; background: #fffbf0; color: #7a5a12; }
.gh-notice-link { margin-left: auto; color: #a50f1b; font-size: 12px; }
.gh-notice-reset {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid #e3e7ee;
  border-radius: 999px;
  background: #fff;
  color: #a50f1b;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.gh-notice-reset:hover { border-color: #d3d9e3; background: #f5f7fa; }
.gh-notice-link + .gh-notice-reset { margin-left: 8px; }

.gh-history { display: flex; flex-direction: column; max-height: 58vh; overflow: auto; }
.gh-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.gh-history-row:hover { background: #f7f9fc; }
.gh-history-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.gh-history-main b { color: #414b5a; font-size: 13px; }
.gh-history-main span {
  color: #8a94a3;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-history-state { color: #8a94a3; font-size: 11.5px; white-space: nowrap; }
.gh-history-state.ok { color: #2e7d5b; }
.gh-history-main .gh-history-facts {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.gh-history-main .gh-history-facts .gh-history-key {
  padding: 0 6px;
  border-radius: 6px;
  background: #f2f4f8;
  color: #4d5665;
  font-variant-numeric: tabular-nums;
}
.gh-run-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: #667085; font-size: 12px; }
.gh-run-facts {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  color: #5d6675;
  font-size: 12px;
}
.gh-run-facts > span { min-width: 0; overflow-wrap: anywhere; }
.gh-run-facts .gh-run-key {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 7px;
  background: #f2f4f8;
  font-variant-numeric: tabular-nums;
}
.gh-run-instruction {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  background: #f7f9fc;
  color: #414b5a;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* 大字号模式跟随首页 */
html.gc-large.gov-home-mode .gh-title { font-size: 46px; }
html.gc-large.gov-home-mode .gh-input { font-size: 17px; }
html.gc-large.gov-home-mode .gh-chip,
html.gc-large.gov-home-mode .gh-tab,
html.gc-large.gov-home-mode .home-act,
html.gc-large.gov-home-mode .gh-version { font-size: 14px; }
html.gc-large.gov-home-mode .gh-chip .nav-ico,
html.gc-large.gov-home-mode .gh-tab .nav-ico { width: 17px; height: 17px; }

/* ------------------------------------------------------------ 窄屏兜底 */
@media (max-width: 900px) {
  .gov-home-mode .shell { grid-template-columns: 204px 1fr; }
  .gh-title { font-size: 32px; }
  .gh-chips { margin-top: 24px; }
  .gh-page { padding: 8px 20px 32px; }
  .gov-home-mode .top-right { gap: 4px; }
  .gov-home-mode .top-right .clock { min-width: 112px; font-size: 11px; }
  .home-act { padding: 5px 6px; }
}
@media (max-width: 760px) {
  .gov-home-mode .shell { display: block; }
  .gov-home-mode .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e3e7ee;
    flex-direction: column;
  }
  .gov-home-mode .content { display: block; }
  .gh-page { padding: 8px 16px 28px; }
  .gh-title { font-size: 28px; }
  .gh-mascot { width: 104px; height: 76px; }
  .gh-chips { gap: 6px; }
  .gov-home-mode .topbar { padding: 10px 14px 0; }
  .gov-home-mode .top-right { flex-wrap: wrap; border-radius: 16px; }
  .home-actions { order: 3; width: 100%; justify-content: flex-end; }
}

/* ------------------------------------------------------------ R83 AI 会话 */
/* 首页整屏固定：主区域自己滚动，输入框才能 sticky 在底部。 */
html.gov-home-mode .shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
html.gov-home-mode .main { min-height: 0; }

.gh-page {
  position: relative;
  align-self: flex-start;
  min-height: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
}
.gh-page:not(.is-chat) .gh-hero { margin: auto; }
.gh-page.is-chat {
  padding: 12px 32px 24px;
}
.gh-page.is-chat .gh-hero {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
  max-width: 900px;
  margin: 8px auto 0;
  padding: 10px 0 6px;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0) 0%, #f5f7fa 26%, #f5f7fa 100%);
}
.gh-page.is-chat .gh-mascot,
.gh-page.is-chat .gh-title,
.gh-page.is-chat .gh-tabs,
.gh-page.is-chat .gh-chips,
.gh-page.is-chat .gh-meta .gh-version { display: none; }
.gh-page.is-chat .gh-composer { min-height: 104px; }
.gh-page.is-chat .gh-input { min-height: 44px; }

.gh-thread {
  display: none;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 4px 2px 32px;
  flex-direction: column;
  gap: 20px;
  scroll-padding-bottom: 150px;
}
html.gc-large .gh-thread { padding-bottom: 56px; scroll-padding-bottom: 190px; }
.gh-page.is-chat .gh-thread { display: flex; }

.gh-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: gh-fade .18s ease;
}
@keyframes gh-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.gh-msg.user { justify-content: flex-end; }
/* R132：用户消息改成“缩略图 + 气泡”的纵列，宽度随会话栏走（不再固定 82%）。 */
.gh-msg-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  /* 宽度按会话列宽固定，缩略图不再被短气泡挤窄；气泡本身仍按内容收缩。 */
  width: min(680px, 100%);
  max-width: min(680px, 100%);
}
.gh-msg.user .gh-bubble {
  max-width: 100%;
  background: linear-gradient(135deg, #b0121e, #8d0d17);
  color: #fff;
  border: 0;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 8px 20px rgba(140, 12, 24, .18);
}
.gh-msg.user .gh-md { color: #fff; }
.gh-msg.user .gh-md a { color: #ffe0a3; }
.gh-msg.user .gh-md code { background: rgba(255, 255, 255, .18); color: #fff; }

/* 图片缩略图：单张最大 300px，多张两列排布；圆角边框留白随会话宽度自适应。 */
/* 图2 形式的小缩略图：统一 120×120 方块，最多两枚一行，多图自动换行。 */
.gh-msg-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}
.gh-msg-thumb {
  flex: none;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 1px solid rgba(176, 18, 30, .2);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(140, 12, 24, .12);
}
.gh-msg-thumb:hover, .gh-msg-thumb:focus-visible { border-color: #c8102e; outline: none; }
.gh-msg-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* 文件条现在排在气泡外（浅色背景），改用白底红字，避免白字看不见。 */
.gh-msg-stack .gh-msg-files { margin-top: 0; }
.gh-msg-stack .gh-msg-files .gh-file {
  background: #fff;
  color: #8d0d17;
  border: 1px solid #e3c3c8;
}

.gh-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
}
.gh-avatar.assistant {
  background: #fff;
  border: 1px solid rgba(176, 125, 26, .18);
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(17, 24, 39, .10);
}
.gh-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}
.gh-avatar.user {
  background: #fff;
  color: #8d0d17;
  border: 1px solid #e3c3c8;
  order: 2;
}

.gh-bubble {
  min-width: 0;
  padding: 11px 14px 9px;
  border: 1px solid #e3e7ee;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(23, 43, 77, .05);
}
.gh-msg.assistant .gh-bubble { max-width: min(720px, 92%); }
.gh-bubble.is-error { border-color: #f0c9c9; background: #fff6f6; }
.gh-bubble-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.gh-bubble-head b { color: #8d0d17; font-size: 12px; letter-spacing: .02em; }
.gh-bubble-time { color: #9aa3b2; font-size: 10.5px; }

.gh-md { color: #1f2937; font-size: var(--gc-chat-font, 14px); line-height: 1.78; word-break: break-word; }
html.gc-large { --gc-chat-font: 17px; }
html.gc-large .gh-md h3 { font-size: 18px; }
html.gc-large .gh-md h4 { font-size: 16.5px; }
html.gc-large .gh-md table { font-size: 14px; }
.gh-md > :first-child { margin-top: 0; }
.gh-md > :last-child { margin-bottom: 0; }
.gh-md p { margin: 8px 0; }
.gh-md h3, .gh-md h4, .gh-md h5 { margin: 14px 0 6px; color: #3b0a0f; font-size: 15px; }
.gh-md h4 { font-size: 14px; }
.gh-md ul, .gh-md ol { margin: 8px 0; padding-left: 22px; }
.gh-md li { margin: 3px 0; }
.gh-md code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f4f8;
  color: #8d0d17;
  font-family: var(--mono, ui-monospace, Consolas, monospace);
  font-size: 12.5px;
}
.gh-md pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #17181c;
  color: #e6edf3;
  overflow-x: auto;
}
.gh-md pre code { padding: 0; background: transparent; color: inherit; font-size: 12.5px; }
.gh-md a { color: #a50f1b; text-decoration: underline; text-underline-offset: 2px; }
/* R141：聊天里的宽表只在表格内部横向滚动，不把整页撑宽。
 * R148：模型回答里的 Markdown 表格也走同一套样式。 */
.gh-md-table-wrap { margin: 10px 0; max-width: 100%; overflow-x: auto; }
.gh-md table { border-collapse: collapse; margin: 10px 0; font-size: 12.5px; display: block; max-width: 100%; overflow-x: auto; }
.gh-md-table { width: 100%; margin: 0; display: table; overflow: visible; }
.gh-md th, .gh-md td { border: 1px solid #e3e7ee; padding: 5px 8px; text-align: left; white-space: normal; word-break: break-word; }
.gh-md th { background: #f5f7fa; white-space: nowrap; }
.gh-md-table td { white-space: nowrap; }
.gh-msg.user .gh-md th { background: rgba(255, 255, 255, .16); }
.gh-msg.user .gh-md th, .gh-msg.user .gh-md td { border-color: rgba(255, 255, 255, .28); }

.gh-reason { margin: 2px 0 8px; }
.gh-reason summary {
  color: #7a8494;
  font-size: 11.5px;
  cursor: pointer;
  list-style: none;
}
.gh-reason summary::-webkit-details-marker { display: none; }
.gh-reason summary::before { content: '▸ '; }
.gh-reason[open] summary::before { content: '▾ '; }
.gh-reason-body {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 2px solid #e3c3c8;
  background: #f8f9fb;
  color: #667085;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

.gh-typing { display: inline-flex; gap: 4px; padding: 7px 2px; }
.gh-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #c8102e; opacity: .35;
  animation: gh-blink 1.05s infinite;
}
.gh-typing i:nth-child(2) { animation-delay: .16s; }
.gh-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes gh-blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: .95; transform: translateY(-2px); } }

.gh-cites {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e8ecf2;
}
.gh-cites-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8a94a3;
  font-size: 11px;
}
.gh-cite {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 260px;
  padding: 3px 9px;
  border: 1px solid #e3e7ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #414b5a;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.gh-cite:hover { border-color: #e0a9b2; background: #fff; color: #8d0d17; }
.gh-cite-kind { color: #a50f1b; font-weight: 600; white-space: nowrap; }
.gh-cite-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gh-msg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 16px;
}
.gh-gen-state { color: #8a94a3; font-size: 11px; }
.gh-model { margin-left: auto; color: #9aa3b2; font-size: 10.5px; }
/* R127：对话正文就地编辑 */
.gh-edit { margin-top: 8px; }
.gh-edit-area {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border: 1px solid #d8c9ae;
  border-radius: 10px;
  background: #fffdf8;
  color: #2b3a42;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.9;
  resize: vertical;
  box-sizing: border-box;
}
.gh-edit-area:focus { outline: 2px solid rgba(176, 132, 66, .28); border-color: #b08442; }
.gh-edit-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gh-edit-hint { flex: 1; min-width: 180px; color: #7b6a50; font-size: 12px; }
.gh-mini {
  padding: 2px 7px;
  border: 1px solid #e3e7ee;
  border-radius: 6px;
  background: #fff;
  color: #667085;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.gh-mini:hover { border-color: #d3d9e3; background: #f5f7fa; color: #a50f1b; }
.gh-inline-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff2f2;
  color: #9f1d1d;
  font-size: 12.5px;
}

.gh-msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gh-msg-files .gh-file { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }

.gh-result {
  width: 100%;
  min-width: 0;
  max-width: min(760px, 100%);
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 43, 77, .07);
  overflow: hidden;
}
.gh-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #eef1f5;
  background: linear-gradient(180deg, #fbfcfd, #f6f8fb);
}
.gh-result-head b { color: #8d0d17; font-size: 13.5px; }
.gh-result-facts {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  padding: 10px 16px 0;
  color: #5d6675;
  font-size: 12px;
}
.gh-result-facts[hidden] { display: none; }
.gh-result-facts .gh-result-key {
  padding: 1px 7px;
  border-radius: 6px;
  background: #f2f4f8;
  font-variant-numeric: tabular-nums;
}
.gh-result-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: #e7f5ee;
  color: #1f7a4d;
  font-size: 11px;
}
.gh-result-tag.warn { background: #fff4e5; color: #a15c00; }
.gh-result-tag.fail { background: #fdecef; color: #a50f1b; }
.gh-result-tag.ok { background: #e7f5ee; color: #1f7a4d; }
.gh-artifact-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12.5px;
  color: #62766f;
}
.gh-artifact-edit .field { margin-bottom: 12px; }
.gh-artifact-edit .field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #62766f;
}
.gh-artifact-edit .input,
.gh-artifact-edit .textarea { width: 100%; box-sizing: border-box; }
/* 结果卡正文：与标题/底栏左右对齐；长内容在卡内滚动，不再贴边。
 * 注意：不能用 nth-child 定位——事实行（办理事项/归档键）是可选显示的，位置会变。 */
.gh-result-body {
  padding: 14px 16px;
  max-height: 520px;
  overflow: auto;
  overscroll-behavior: contain;
}
.gh-result-body > :first-child { margin-top: 0; }
.gh-result-body > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ R127 识图结果卡 */
/* 识图卡按会话可用宽度展开（会话栏 860 − 头像/间距 40 = 820），
 * 不再固定 760px 把“字段 + 置信度”挤在一起；内边距与标题/底栏对齐。
 * 正文不设 520px 滚动上限，避免“人工核对无误，入库”按钮被卡在滚动区底部。 */
.gh-result.is-ocr { max-width: min(820px, 100%); }
.gh-result.is-ocr .gh-result-head,
.gh-result.is-ocr .gh-result-facts { padding-left: 20px; padding-right: 20px; }
.gh-result.is-ocr .gh-result-body {
  padding: 16px 20px 18px;
  max-height: none;
  overflow: visible;
}
.gh-result.is-ocr .gh-result-foot { padding-left: 20px; padding-right: 20px; }

.ocr-note { margin-bottom: 16px; }
.ocr-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.ocr-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ocr-field-head { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.ocr-field-head > label { font-size: 12.5px; font-weight: 600; color: #414b5a; }
.ocr-tag { padding: 1px 7px; font-size: 10.5px; }
.ocr-field-head .ocr-conf-cap {
  width: 96px;
  margin-left: auto;
  text-align: center;
  font-size: 10.5px;
  color: #8a94a3;
  letter-spacing: .02em;
}
.ocr-field-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
}
.ocr-field-line > .input { width: 100%; min-width: 0; }
.ocr-conf .input { text-align: center; font-variant-numeric: tabular-nums; }
.ocr-field.is-low .ocr-field-line > .input,
.ocr-field.is-low .ocr-conf .input { border-color: #e0a9b2; background: #fffafa; }

.ocr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #eef1f5;
}
.ocr-hint { flex: 1 1 260px; min-width: 0; color: #62766f; font-size: 12px; line-height: 1.6; }
.ocr-confirm { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #eef1f5; }
.ocr-confirm label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #414b5a;
  font-size: 12.5px;
  cursor: pointer;
}
.ocr-submit { margin-top: 14px; }

@media (max-width: 720px) {
  .ocr-fields { grid-template-columns: 1fr; }
  .gh-result.is-ocr .gh-result-head,
  .gh-result.is-ocr .gh-result-facts,
  .gh-result.is-ocr .gh-result-body,
  .gh-result.is-ocr .gh-result-foot { padding-left: 16px; padding-right: 16px; }
}

/* 证明填写字段：两列自适应，窄屏单列，避免输入框被挤出卡片 */
.cert-fields {
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .cert-fields { grid-template-columns: 1fr; }
}

.gh-result-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #eef1f5;
  background: #fbfcfd;
}
.gh-result-time { margin-left: auto; color: #9aa3b2; font-size: 11px; }

.gh-stop-ico {
  width: 12px; height: 12px; border-radius: 3px; background: #fff;
}

.gh-think {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
  color: #7a8494;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}
.gh-think input { accent-color: #c8102e; width: 13px; height: 13px; margin: 0; }

.gh-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #55606f;
  font-size: 11.5px;
}
.gh-ai-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2e9d68;
  box-shadow: 0 0 0 3px rgba(46, 157, 104, .14);
}
.gh-ai-pill i.bad { background: #c8102e; box-shadow: 0 0 0 3px rgba(200, 16, 46, .14); }
.gh-ai-pill.is-bad { color: #9f1d1d; }

.gh-file-thumb {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}
/* 图片附件可点开预览：鼠标、触摸和键盘都能触发 */
.gh-file.is-previewable { cursor: zoom-in; }
.gh-file.is-previewable:hover { background: #e9eef5; }
.gh-file.is-previewable:focus-visible { outline: 2px solid #c8102e; outline-offset: 1px; }
.gh-image-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 10px;
  background: #f6f7f9;
}
.gh-image-preview {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  border-radius: 6px;
  object-fit: contain;
}
.gh-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .gh-page.is-chat { padding: 10px 20px 18px; }
  .gh-msg.assistant .gh-bubble { max-width: 96%; }
}
@media (max-width: 760px) {
  .gh-page.is-chat { padding: 8px 12px 14px; }
  /* R132：窄屏也按会话列宽铺满，缩略图单列，不再压到 88% 出现窄边。 */
  .gh-msg-stack { width: 100%; max-width: 100%; }
  .gh-msg.user .gh-bubble { max-width: 100%; }
  .gh-msg-thumb { width: 104px; height: 104px; }
  .gh-avatar { width: 26px; height: 26px; font-size: 11.5px; }
}

/* 结果卡里的按钮/文字沿用浅色卡片配色，避免深色主题按钮在卡里发花 */
.gh-result .btn,
.gh-result .btn-sm { background: #fff; border-color: #e3e7ee; color: #55606f; }
.gh-result .btn:hover { border-color: #d3d9e3; background: #f5f7fa; color: #a50f1b; }
.gh-result .btn-primary { background: #c8102e; border-color: #c8102e; color: #fff; }
.gh-result .btn-primary:hover { background: #a50f1b; border-color: #a50f1b; color: #fff; }
.gh-result .notice { background: #f8fafc; border-color: #e3e7ee; color: #414b5a; }

/* 启动页品牌图标：统一使用太秘图形标志 */
.boot-mark { background: #fff !important; overflow: hidden; }
.boot-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 14px;
}

/* ------------------------------------------------------------ 附件拖入 / 分析 */
.gh-composer { position: relative; }
.gh-composer.is-dragover {
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .12), 0 18px 40px rgba(23, 43, 77, .10);
}
.gh-composer.is-dragover::after {
  content: "松开导入图片 / 文件 / 文本 / 压缩包";
  position: absolute;
  inset: 6px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(200, 16, 46, .45);
  border-radius: 12px;
  background: rgba(255, 250, 249, .94);
  color: #a50f1b;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}
.gh-analyze {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #e3e7ee;
  border-radius: 999px;
  background: #fff;
  color: #a50f1b;
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.gh-analyze:hover { background: #f5f7fa; border-color: #d3d9e3; }
.gh-analyze:disabled { opacity: .55; cursor: not-allowed; }
.gh-analyze .nav-ico { width: 14px; height: 14px; color: #c8102e; }
.gh-file.is-uploading { opacity: .65; }
.gh-file-state { color: #b0121e; font-size: 10.5px; }

.gh-analysis {
  width: 100%;
  /* R132：按会话可用宽度展开（会话栏 860 − 头像/间距 40 = 820），不再固定 780 留一条空边。 */
  max-width: min(820px, 100%);
  padding: 18px 22px 20px;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 43, 77, .08);
}
.gh-analysis-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.gh-analysis-head b { color: #5a0b12; font-size: 14px; }
.gh-analysis-summary { color: #667085; font-size: 12.5px; }
.gh-analysis-files { display: grid; gap: 9px; margin-bottom: 12px; }
.gh-analysis-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  background: #fafbfd;
}
.gh-analysis-kind {
  flex: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef2f7;
  color: #55606f;
  font-size: 11px;
}
/* 图片文件给 44px 缩略图，和左侧气泡里的缩略图呼应；点开可看原图。 */
.gh-analysis-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
}
.gh-analysis-thumb:hover, .gh-analysis-thumb:focus-visible { border-color: #c8102e; outline: none; }
.gh-analysis-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.gh-analysis-file-main { min-width: 0; flex: 1; }
.gh-analysis-name {
  color: #414b5a;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-analysis-desc { margin-top: 2px; color: #667085; font-size: 12px; line-height: 1.6; }
.gh-analysis-note { margin-top: 2px; color: #8a94a3; font-size: 11.5px; line-height: 1.6; }
.gh-analysis-meta { flex: none; color: #8a94a3; font-size: 11px; white-space: nowrap; }
.gh-analysis-more { padding: 2px 4px; color: #8a94a3; font-size: 11.5px; }
button.gh-analysis-more {
  align-self: flex-start;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
}
button.gh-analysis-more:hover { color: #4b5563; }

.gh-analysis-table-box { margin: 12px 0; border: 1px solid #edf0f4; border-radius: 10px; overflow: hidden; }
.gh-analysis-table-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid #edf0f4;
  background: #fafbfd;
}
.gh-analysis-table-head b { color: #414b5a; font-size: 12.5px; }
.gh-analysis-table-head span { color: #8a94a3; font-size: 11.5px; }
.gh-analysis-table-head .btn { margin-left: auto; }
.gh-analysis-table-scroll { max-height: 300px; overflow: auto; }
/* R148：选择 50/200/1000 行后加高预览区，让“看全部”真正可见，而不只是数据换了。 */
.gh-analysis-table-box.is-expanded .gh-analysis-table-scroll { max-height: 520px; }
.gh-analysis-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.gh-analysis-table th,
.gh-analysis-table td {
  max-width: 240px;
  padding: 9px 12px;
  border-right: 1px solid #f4f6f8;
  border-bottom: 1px solid #edf0f4;
  color: #414b5a;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-analysis-table th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  color: #55606f;
  font-weight: 600;
}
/* R148：预览行数下拉 + 展开提示；默认 8 行，可切到 50/200/1000 行。 */
.gh-analysis-table-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px 10px;
  border-top: 1px solid #edf0f4;
  background: #fcfdff;
}
.gh-analysis-rows {
  height: 28px;
  padding: 0 26px 0 9px;
  border: 1px solid #dfe4ec;
  border-radius: 7px;
  background: #fff;
  color: #414b5a;
  font-size: 12px;
  cursor: pointer;
}
.gh-analysis-rows:disabled { color: #98a2b3; cursor: default; background: #f7f9fc; }
.gh-analysis-rows-note { color: #8a94a3; font-size: 11.5px; }
.gh-analysis-text { margin-top: 10px; padding-top: 8px; border-top: 1px solid #edf0f4; }
.gh-analysis-text summary { color: #a50f1b; font-size: 12px; cursor: pointer; }
.gh-analysis-text pre {
  max-height: 240px;
  margin: 8px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f7f9fc;
  color: #414b5a;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow: auto;
}
.gh-analysis-notes { margin-top: 8px; color: #8a94a3; font-size: 11.5px; line-height: 1.7; }
.gh-analysis-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #edf0f4;
  color: #8a94a3;
  font-size: 11px;
}

/* 文件包：只显示一个包条目，不铺开内部文件 */
.gh-file.is-package {
  background: #fff7f5;
  border: 1px solid #f1d9d3;
  color: #7c0a10;
}
.gh-file.is-package .nav-ico { color: #c8102e; }

/* ------------------------------------------------------------ R94 奶油白统一 */
html.gov-home-mode,
html.gov-home-mode body {
  background: #faf5ea !important;
  color: #2b211c;
}
.gov-home-mode .main {
  background-color: #faf5ea !important;
  background-image:
    radial-gradient(900px 520px at 16% -4%, rgba(217, 164, 65, .18), transparent 62%),
    radial-gradient(760px 460px at 92% 90%, rgba(200, 16, 46, .05), transparent 66%),
    linear-gradient(rgba(150, 110, 60, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 110, 60, .04) 1px, transparent 1px),
    linear-gradient(160deg, #fdf9f0 0%, #faf5ea 55%, #f7efdf 100%) !important;
  background-size: auto, auto, 64px 64px, 64px 64px, auto !important;
}

/* ------------------------------------------------------------ R96 输入区与页面背景统一 */
/* 会话态输入区原用蓝灰渐变（#f5f7fa）遮罩，在奶油白页面上形成明显色块；改为随页面奶油白淡出。 */
.gov-home-mode .gh-page.is-chat .gh-hero {
  background: linear-gradient(180deg, rgba(250, 245, 234, 0) 0%, rgba(250, 245, 234, .96) 24%, #faf5ea 100%) !important;
}
/* 输入卡阴影由蓝灰改为暖色，避免在奶油白底上发冷。 */
.gov-home-mode .gh-composer {
  box-shadow: 0 18px 40px rgba(90, 60, 25, .10), 0 1px 0 #fff inset !important;
}
.gov-home-mode .gh-composer:focus-within {
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .12), 0 18px 40px rgba(90, 60, 25, .10) !important;
}

/* ------------------------------------------------------------ R99 会话输入区吸底 + 提示条上移 */
/* 会话页撑满内容区：短对话时输入卡也贴在底部，不再紧跟最后一条消息浮在半空。 */
.gov-home-mode .gh-page.is-chat {
  align-self: stretch !important;
  min-height: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.gov-home-mode .gh-page.is-chat .gh-thread { flex: 1 1 auto; }
/* 提示条（“还缺…”“已复制”等）排到输入卡上方，出现/消失时输入卡不被顶起。 */
.gov-home-mode .gh-page.is-chat .gh-hero {
  display: flex;
  flex-direction: column;
}
.gov-home-mode .gh-page.is-chat .gh-hero > .gh-notice {
  order: -1;
  margin: 0 auto 8px;
}
