/**
 * 巨火国学 · AI 批论 / 智算
 * 冷静墨色国学运营风：清晰层级、明确费用、少装饰。
 */
:root {
  /* DeepSeek chat light UI: cool gray canvas + white chrome + single indigo accent.
     #1A1B1E is ink/text (and dark-mode surface), NOT the light header. */
  --jh-ai-ink: #1A1B1E;
  --jh-ai-ink-soft: #3A3B40;
  --jh-ai-muted: #6E6F74;
  --jh-ai-line: #E4E6EB;
  --jh-ai-line-strong: #D5D6DC;
  --jh-ai-surface: #FFFFFF;
  --jh-ai-surface-2: #F5F6F8;
  --jh-ai-bg: #F5F6F8;
  --jh-ai-accent: #4D6BFE;
  --jh-ai-accent-pressed: #3B57E0;
  --jh-ai-accent-soft: #EBEFFF;
  --jh-ai-accent-text: #FFFFFF;
  --jh-ai-cost: #3B57E0;
  --jh-ai-cost-heavy: #8b3d2f;
  --jh-ai-cost-heavy-bg: rgba(139, 61, 47, 0.1);
  --jh-ai-ok: #2f5d4a;
  --jh-ai-warn-bg: #f7f1ef;
  --jh-ai-radius: 12px;
  --jh-ai-radius-sm: 8px;
}

/* —— 独立页壳 —— */
html.juhuo-ai-pilun-html {
  background: var(--jh-ai-bg) !important;
}
body.juhuo-theme-ai-pilun.juhuo-shell {
  background:
    linear-gradient(180deg, #f4f6f9 0%, var(--jh-ai-bg) 42%, #e4e9ef 100%) !important;
  max-width: var(--juhuo-phone-width, 480px) !important;
  margin: 0 auto !important;
  min-height: 100dvh;
  color: var(--jh-ai-ink);
}
body.juhuo-theme-ai-pilun > header.juhuo-toolbar {
  background: #FFFFFF !important;
  color: var(--jh-ai-ink) !important;
  border-bottom: 1px solid var(--jh-ai-line);
  box-shadow: none !important;
}
body.juhuo-theme-ai-pilun .juhuo-toolbar h1 {
  color: var(--jh-ai-ink) !important;
  font-size: 17px !important;
  letter-spacing: 0.12em;
  font-weight: 650;
}
.juhuo-ai-pilun-root {
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/*
 * 工具页壳：html/body overflow:hidden，仅 .juhuo-body-pad 可滚。
 * AI 批论用 main.juhuo-ai-pilun-root，必须同样成为唯一竖向滚动根。
 */
body.juhuo-theme-ai-pilun.juhuo-shell > main.juhuo-ai-pilun-root,
body.juhuo-theme-ai-pilun.juhuo-shell > .juhuo-ai-pilun-root {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto;
}

/* 统一壳智算 Tab：交给外层 .juhuo-unified-main-scroll，勿再套一层固定高度 */
#tabPageAi .juhuo-ai-pilun-root,
.juhuo-ai-tab-full.juhuo-ai-pilun-root {
  flex: none !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* AI 表单内「地点 · 真太阳时」——与次卡/起盘块同级可见 */
.juhuo-ai-consult .juhuo-true-solar-box,
.juhuo-ai-consult .geobox.juhuo-true-solar-box {
  margin: 10px 0 4px;
  padding: 12px;
  border-radius: var(--jh-ai-radius);
  border: 1px solid var(--jh-ai-line-strong);
  background: var(--jh-ai-surface-2);
  box-sizing: border-box;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-subhead {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--jh-ai-muted);
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-label,
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-hint {
  font-size: 12px;
  font-weight: 650;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-consult .juhuo-true-solar-box select,
.juhuo-ai-consult .juhuo-true-solar-box input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: var(--jh-ai-radius-sm);
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  color: var(--jh-ai-ink);
  min-height: 42px;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--jh-ai-ink);
  cursor: pointer;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-hint-note {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--jh-ai-muted);
  line-height: 1.45;
}
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-geo-preview,
.juhuo-ai-consult .juhuo-true-solar-box .juhuo-mini-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--jh-ai-accent);
  font-weight: 600;
}

/* —— 加载 / 错误 —— */
.juhuo-ai-loading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 4px;
  color: var(--jh-ai-muted);
  font-size: 13px;
}
.juhuo-ai-loading-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(26, 35, 50, 0.08);
  overflow: hidden;
}
.juhuo-ai-loading-bar > i {
  display: block;
  width: 36%;
  height: 100%;
  background: var(--jh-ai-accent);
  border-radius: inherit;
  animation: juhuo-ai-load 1.1s ease-in-out infinite;
}
@keyframes juhuo-ai-load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.juhuo-ai-hub-maint {
  padding: 14px;
  border-radius: var(--jh-ai-radius);
  background: var(--jh-ai-warn-bg);
  border: 1px solid rgba(139, 61, 47, 0.18);
  color: var(--jh-ai-cost-heavy);
  font-size: 13px;
  line-height: 1.55;
}
.juhuo-ai-hub-maint p {
  margin: 0;
}
.juhuo-ai-retry-btn {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: var(--jh-ai-radius-sm);
  border: 1px solid var(--jh-ai-line-strong);
  background: #fff;
  color: var(--jh-ai-ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.juhuo-ai-retry-btn:active {
  background: var(--jh-ai-surface-2);
}
.juhuo-ai-hub-empty {
  padding: 16px;
  border-radius: var(--jh-ai-radius);
  background: var(--jh-ai-surface);
  border: 1px dashed var(--jh-ai-line-strong);
  color: var(--jh-ai-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* —— Hub —— */
.juhuo-ai-hub-head {
  margin-bottom: 14px;
}
.juhuo-ai-hub-head--premium {
  position: relative;
  margin: 0 0 16px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(107, 133, 255, 0.16), transparent 55%),
    linear-gradient(155deg, #1a1d28 0%, #242a3c 52%, #1c2233 100%);
  color: #f4f1ea;
  box-shadow: 0 12px 32px rgba(26, 29, 40, 0.18);
  isolation: isolate;
}
.juhuo-ai-hub-head-glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 140, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.juhuo-ai-hub-head--premium .juhuo-ai-hub-kicker,
.juhuo-ai-hub-head--premium h1,
.juhuo-ai-hub-head--premium .juhuo-ai-hub-lead,
.juhuo-ai-hub-head--premium .juhuo-ai-hub-head-meta {
  position: relative;
  z-index: 1;
}
.juhuo-ai-hub-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jh-ai-muted);
  font-weight: 650;
}
.juhuo-ai-hub-head--premium .juhuo-ai-hub-kicker {
  color: rgba(196, 181, 140, 0.92);
  letter-spacing: 0.22em;
  text-transform: none;
}
.juhuo-ai-hub-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--jh-ai-ink);
  letter-spacing: 0.08em;
  font-weight: 700;
}
.juhuo-ai-hub-head--premium h1 {
  color: #f7f4ec;
  font-size: 26px;
  letter-spacing: 0.16em;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}
.juhuo-ai-hub-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--jh-ai-muted);
}
.juhuo-ai-hub-head--premium .juhuo-ai-hub-lead {
  color: rgba(228, 231, 240, 0.78);
  max-width: 26em;
}
.juhuo-ai-hub-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.juhuo-ai-hub-head-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: rgba(247, 244, 236, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.juhuo-empty-inline {
  margin: 0 !important;
  font-size: 12px !important;
  color: var(--jh-ai-muted) !important;
  font-weight: 600 !important;
}

.juhuo-ai-hub-buy {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--jh-ai-line);
  border-radius: var(--jh-ai-radius);
  background: var(--jh-ai-surface);
}
.juhuo-ai-hub-buy.is-compact {
  margin: 0 0 12px;
  padding: 8px 10px;
}
.juhuo-ai-hub-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.juhuo-ai-hub-buy-lab {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--jh-ai-muted);
}
.juhuo-ai-hub-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--jh-ai-radius-sm);
  background: var(--jh-ai-accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
}
.juhuo-ai-hub-buy-btn:hover {
  filter: brightness(1.05);
}

.juhuo-ai-hub-card {
  background: var(--jh-ai-surface);
  border: 1px solid var(--jh-ai-line);
  border-radius: var(--jh-ai-radius);
  padding: 14px;
  margin-bottom: 16px;
}
.juhuo-ai-hub-card--syn {
  background:
    linear-gradient(160deg, #f8fafc 0%, #eef2f6 100%);
  border-color: var(--jh-ai-line-strong);
}
.juhuo-ai-hub-card--syn-compact {
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.juhuo-ai-hub-card--syn-compact .juhuo-ai-hub-card-top {
  flex: 1 1 auto;
  min-width: 0;
}
.juhuo-ai-hub-card--syn-compact .juhuo-ai-hub-go {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  margin: 0;
}
.juhuo-ai-hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.juhuo-ai-hub-card-top h2 {
  margin: 0;
  font-size: 17px;
  color: var(--jh-ai-ink);
  letter-spacing: 0.04em;
}
.juhuo-ai-hub-card--syn-compact .juhuo-ai-hub-card-top h2 {
  font-size: 15px;
}
.juhuo-ai-hub-cost {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--jh-ai-cost);
  background: var(--jh-ai-accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}
.juhuo-ai-hub-cost.is-heavy {
  color: var(--jh-ai-cost-heavy);
  background: var(--jh-ai-cost-heavy-bg);
}
.juhuo-ai-hub-desc {
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-hub-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--jh-ai-radius-sm);
  background: var(--jh-ai-accent);
  color: var(--jh-ai-accent-text) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.juhuo-ai-hub-go:active {
  opacity: 0.92;
}
.juhuo-ai-hub-off {
  margin: 0;
  font-size: 13px;
  color: var(--jh-ai-muted);
  font-weight: 600;
}

.juhuo-ai-hub-section {
  margin-bottom: 8px;
}
.juhuo-ai-hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.juhuo-ai-hub-section h2 {
  margin: 0;
  font-size: 15px;
  color: var(--jh-ai-ink);
  letter-spacing: 0.06em;
}
.juhuo-ai-hub-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--jh-ai-muted);
  line-height: 1.45;
}
.juhuo-ai-hub-section-head h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.juhuo-ai-hub-count {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--jh-ai-muted);
}
.juhuo-ai-hub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.juhuo-ai-hub-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--jh-ai-line-strong);
  background: #fff;
  color: var(--jh-ai-ink) !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.juhuo-ai-hub-chip.is-featured {
  border-color: rgba(77, 107, 254, 0.35);
  background: var(--jh-ai-accent-soft);
  color: #2a3f9e !important;
}
.juhuo-ai-hub-chip.is-qimen {
  border-color: rgba(139, 61, 47, 0.4);
  background: rgba(139, 61, 47, 0.1);
  color: #8b3d2f !important;
  box-shadow: inset 0 0 0 1px rgba(139, 61, 47, 0.12);
}
.juhuo-ai-hub-chip:active {
  opacity: 0.88;
}
.juhuo-ai-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.juhuo-ai-hub-grid--dense .juhuo-ai-hub-item {
  min-height: 64px;
  padding: 8px 8px 7px;
  gap: 2px;
}
.juhuo-ai-hub-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--jh-ai-radius-sm);
  background: var(--jh-ai-surface);
  border: 1px solid var(--jh-ai-line);
  text-decoration: none !important;
  color: inherit !important;
  min-height: 92px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.juhuo-ai-hub-item:active {
  background: var(--jh-ai-surface-2);
  border-color: var(--jh-ai-line-strong);
}
.juhuo-ai-hub-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.juhuo-ai-hub-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--jh-ai-ink);
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.juhuo-ai-hub-grid--dense .juhuo-ai-hub-item-title {
  font-size: 12px;
}
.juhuo-ai-hub-item-meta {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--jh-ai-cost);
  font-weight: 700;
  background: rgba(61, 90, 108, 0.08);
  padding: 2px 5px;
  border-radius: 3px;
}
.juhuo-ai-hub-item-desc {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--jh-ai-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.juhuo-ai-hub-grid--dense .juhuo-ai-hub-item-desc {
  -webkit-line-clamp: 1;
  font-size: 10px;
}
.juhuo-ai-hub-item.is-ziwei {
  border-color: rgba(44, 62, 80, 0.22);
  background: linear-gradient(165deg, #fbfcfd 0%, #eef3f7 100%);
}
.juhuo-ai-hub-item.is-featured {
  border-color: rgba(77, 107, 254, 0.28);
}
.juhuo-ai-hub-item.is-qimen {
  border-color: rgba(139, 61, 47, 0.45);
  background: linear-gradient(165deg, #fffaf8 0%, #f7ebe7 100%);
}
.juhuo-ai-hub-item.is-qimen .juhuo-ai-hub-item-title {
  color: #8b3d2f;
}
.juhuo-ai-hub-foot {
  margin: 16px 0 0;
  font-size: 11px;
  color: var(--jh-ai-muted);
  line-height: 1.5;
}
.juhuo-ai-hub-foot code {
  font-size: 10px;
  background: rgba(26, 35, 50, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

/* —— 咨询表单 —— */
.juhuo-ai-consult h1 {
  margin: 6px 0 4px;
  font-size: 20px;
  color: var(--jh-ai-ink);
  letter-spacing: 0.04em;
}
.juhuo-ai-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--jh-ai-muted);
  line-height: 1.5;
}
.juhuo-ai-lead strong {
  color: var(--jh-ai-ink-soft);
  font-weight: 700;
}
.juhuo-ai-lead--warn strong {
  color: var(--jh-ai-cost-heavy);
}
.juhuo-ai-back {
  display: inline-block;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--jh-ai-cost) !important;
  text-decoration: none !important;
  font-weight: 600;
}
.juhuo-ai-block {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--jh-ai-radius);
  background: var(--jh-ai-surface);
  border: 1px solid var(--jh-ai-line);
}
.juhuo-ai-block-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--jh-ai-muted);
}
.juhuo-ai-card-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.juhuo-ai-card-lab {
  font-size: 12px;
  color: var(--jh-ai-muted);
  font-weight: 600;
}
.juhuo-ai-card-inp {
  flex: 1 1 140px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: var(--jh-ai-radius-sm);
  font-size: 13px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: #fff;
  color: var(--jh-ai-ink);
}
.juhuo-ai-card-btn {
  border: none;
  background: var(--jh-ai-accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--jh-ai-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.juhuo-ai-card-remain {
  font-size: 12px;
  color: var(--jh-ai-ink-soft);
  font-weight: 600;
}
.juhuo-ai-card-buy {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.juhuo-ai-card-buy a {
  font-size: 12px;
  color: var(--jh-ai-cost) !important;
  font-weight: 600;
}
.juhuo-ai-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--jh-ai-ink);
}
.juhuo-ai-field:last-child {
  margin-bottom: 0;
}
.juhuo-ai-field span {
  font-weight: 650;
  font-size: 12px;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-field .juhuo-ai-req {
  color: var(--jh-ai-cost-heavy);
  font-weight: 700;
  margin-left: 2px;
}
.juhuo-ai-field textarea,
.juhuo-ai-field select,
.juhuo-ai-field input[type="datetime-local"],
.juhuo-ai-field input[type="date"],
.juhuo-ai-field input[type="month"],
.juhuo-ai-field input[type="number"],
.juhuo-ai-flow-field select,
.juhuo-ai-flow-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: var(--jh-ai-radius-sm);
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  color: var(--jh-ai-ink);
  resize: vertical;
}

/* 时间层级 chips（对齐紫微流运层级，肤色用本页 indigo） */
.juhuo-ai-flow-levels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.juhuo-ai-level-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.juhuo-ai-level-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.juhuo-ai-level-chip span {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--jh-ai-ink-soft);
  background: var(--jh-ai-surface-2);
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.juhuo-ai-level-chip:hover span {
  border-color: rgba(77, 107, 254, 0.35);
  color: var(--jh-ai-ink);
}
.juhuo-ai-level-chip input:checked + span {
  color: var(--jh-ai-accent);
  background: var(--jh-ai-accent-soft);
  border-color: rgba(77, 107, 254, 0.35);
  font-weight: 650;
}
.juhuo-ai-level-chip input:focus-visible + span {
  outline: 2px solid rgba(77, 107, 254, 0.35);
  outline-offset: 2px;
}
.juhuo-ai-flow-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 10px;
  background: var(--jh-ai-surface-2);
  border: 1px solid var(--jh-ai-line);
  border-radius: 10px;
}
.juhuo-ai-flow-selectors[hidden] {
  display: none !important;
}
.juhuo-ai-flow-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
  flex: 1 1 140px;
}
.juhuo-ai-flow-field[hidden] {
  display: none !important;
}
.juhuo-ai-flow-field label {
  font-size: 11px;
  font-weight: 650;
  color: var(--jh-ai-muted);
}
.juhuo-ai-flow-field select,
.juhuo-ai-flow-field input {
  padding: 8px 10px;
  font-size: 13px;
}
.juhuo-ai-flow-summary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--jh-ai-accent);
  font-weight: 600;
}
.juhuo-ai-time-level-field {
  margin-top: 4px;
  scroll-margin-top: 72px;
}
.juhuo-ai-time-level-field > .juhuo-ai-time-level-label {
  display: block;
  font-weight: 650;
  font-size: 12px;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-time-level-field > .juhuo-ai-cast-note {
  margin: 2px 0 0;
}
.juhuo-ai-field .juhuo-ai-level-chip span {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--jh-ai-ink-soft);
  background: var(--jh-ai-surface-2);
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: 8px;
  white-space: nowrap;
}
.juhuo-ai-cast-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--jh-ai-muted);
}

/* 所问主题多选（对齐紫微业务类型 chips） */
.juhuo-ai-biz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.juhuo-ai-biz-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.juhuo-ai-biz-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.juhuo-ai-field .juhuo-ai-biz-chip span,
.juhuo-ai-biz-chip span {
  display: inline-block;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--jh-ai-ink-soft);
  background: var(--jh-ai-surface-2);
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.juhuo-ai-biz-chip:hover span {
  border-color: rgba(77, 107, 254, 0.35);
  color: var(--jh-ai-ink);
}
.juhuo-ai-biz-chip input:checked + span {
  color: var(--jh-ai-accent);
  background: var(--jh-ai-accent-soft);
  border-color: rgba(77, 107, 254, 0.35);
  font-weight: 650;
}
.juhuo-ai-biz-chip input:focus-visible + span {
  outline: 2px solid rgba(77, 107, 254, 0.35);
  outline-offset: 2px;
}
.juhuo-ai-field > span + .juhuo-ai-biz-chips {
  margin-top: 6px;
}
.juhuo-ai-advanced {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--jh-ai-radius);
  background: var(--jh-ai-surface-2);
  border: 1px dashed var(--jh-ai-line-strong);
}
.juhuo-ai-advanced > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--jh-ai-muted);
  list-style: none;
}
.juhuo-ai-advanced > summary::-webkit-details-marker {
  display: none;
}
.juhuo-ai-advanced[open] > summary {
  margin-bottom: 10px;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-advanced .juhuo-ai-field {
  margin-top: 8px;
}
a.juhuo-ai-submit {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}
.juhuo-ai-field textarea:focus,
.juhuo-ai-field select:focus,
.juhuo-ai-card-inp:focus {
  outline: none;
  border-color: rgba(77, 107, 254, 0.55);
  box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.12);
}
.juhuo-ai-submit {
  width: 100%;
  border: none;
  background: var(--jh-ai-accent);
  color: var(--jh-ai-accent-text);
  padding: 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-top: 2px;
  box-shadow: none;
}
.juhuo-ai-submit:active:not(:disabled) {
  background: var(--jh-ai-accent-pressed);
}
.juhuo-ai-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}
.juhuo-ai-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--jh-ai-muted);
  min-height: 1.2em;
  line-height: 1.45;
}
.juhuo-ai-status.is-error {
  color: var(--jh-ai-cost-heavy);
}
.juhuo-ai-status.is-ok {
  color: var(--jh-ai-ok);
}
/* 旧单块答案区：不再套白卡片，随页宽展开 */
.juhuo-ai-answer {
  margin-top: 14px;
  padding: 4px 0 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--jh-ai-ink);
  word-break: break-word;
  max-height: none;
  overflow: visible;
}
.juhuo-ai-answer h2,
.juhuo-ai-answer h3,
.juhuo-ai-answer h4 {
  margin: 12px 0 6px;
  color: var(--jh-ai-ink);
}
.juhuo-ai-app-link {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.5;
}
.juhuo-ai-app-link a {
  color: var(--jh-ai-cost) !important;
  font-weight: 650;
  text-decoration: none !important;
}
.juhuo-ai-syn-charts {
  margin-top: 4px;
}
.juhuo-ai-syn-charts .juhuo-ai-block-title {
  margin-bottom: 10px;
}

/* —— 统一壳「智算」Tab —— */
.juhuo-ai-tab-hub {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.juhuo-ai-tab-syn {
  display: block;
  padding: 14px;
  border-radius: var(--jh-ai-radius);
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid var(--jh-ai-line-strong);
  text-decoration: none !important;
  color: inherit !important;
}
.juhuo-ai-tab-syn strong {
  display: block;
  font-size: 16px;
  color: var(--jh-ai-ink);
  letter-spacing: 0.04em;
}
.juhuo-ai-tab-syn .cost {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--jh-ai-cost-heavy);
  background: var(--jh-ai-cost-heavy-bg);
  padding: 2px 7px;
  border-radius: 3px;
}
.juhuo-ai-tab-syn .desc {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--jh-ai-muted);
}
.juhuo-ai-tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.juhuo-ai-tab-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 10px;
  border-radius: var(--jh-ai-radius-sm);
  background: #fff;
  border: 1px solid var(--jh-ai-line);
  text-decoration: none !important;
  color: inherit !important;
  min-height: 48px;
  box-sizing: border-box;
}
.juhuo-ai-tab-item:active {
  background: var(--jh-ai-surface-2);
}
.juhuo-ai-tab-item .t {
  font-size: 13px;
  font-weight: 700;
  color: var(--jh-ai-ink);
}
.juhuo-ai-tab-item .c {
  font-size: 11px;
  font-weight: 700;
  color: var(--jh-ai-cost);
  white-space: nowrap;
  background: rgba(61, 90, 108, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
}
.juhuo-ai-tab-item.is-ziwei {
  border-color: rgba(44, 62, 80, 0.22);
  grid-column: 1 / -1;
}
.juhuo-ai-tab-section-label {
  margin: 2px 0 -2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--jh-ai-muted);
}
.juhuo-ai-tab-more {
  display: block;
  text-align: center;
  padding: 11px;
  font-size: 13px;
  font-weight: 650;
  color: var(--jh-ai-cost) !important;
  text-decoration: none !important;
  border: 1px solid var(--jh-ai-line);
  border-radius: var(--jh-ai-radius-sm);
  background: #fff;
}
.juhuo-ai-tab-more:active {
  background: var(--jh-ai-surface-2);
}

@media (min-width: 420px) {
  .juhuo-ai-hub-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 340px) {
  .juhuo-ai-hub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— 多会话 ☰ / 抽屉（对齐紫微 AI UX） —— */
body.juhuo-theme-ai-pilun > header.juhuo-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.juhuo-theme-ai-pilun > header.juhuo-toolbar #btnAiThreads,
body.juhuo-theme-ai-pilun > header.juhuo-toolbar .juhuo-ai-header-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  min-width: 40px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(77, 107, 254, 0.18);
  background: var(--jh-ai-accent-soft);
  color: var(--jh-ai-accent);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
body.juhuo-theme-ai-pilun > header.juhuo-toolbar #btnAiThreads:hover,
body.juhuo-theme-ai-pilun > header.juhuo-toolbar #btnAiThreads.is-open {
  background: #dde4ff;
  border-color: rgba(77, 107, 254, 0.35);
}
body.juhuo-theme-ai-pilun > header.juhuo-toolbar h1 {
  flex: 1 1 auto;
  min-width: 0;
}

/* 会话壳随内容增高，交给外层页面滚动；避免 flex 视口套出内层小框 */
.juhuo-ai-consult.juhuo-ai-chat-app {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: visible;
}
.juhuo-ai-chat-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: auto;
  overflow: visible;
}
.juhuo-ai-chat-workspace.juhuo-ai-sidebar-open {
  min-height: min(72vh, 560px);
}
.juhuo-ai-chat-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: auto;
  overflow: visible;
}
.juhuo-ai-form-slot {
  padding: 0 2px;
}
.juhuo-ai-form-details {
  margin: 10px 0 4px;
  border: 1px solid var(--jh-ai-line);
  border-radius: 12px;
  background: var(--jh-ai-surface);
  padding: 0 10px 8px;
}
.juhuo-ai-form-summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jh-ai-ink-soft);
  letter-spacing: 0.02em;
  user-select: none;
}
.juhuo-ai-form-summary::-webkit-details-marker {
  display: none;
}
.juhuo-ai-form-details[open] .juhuo-ai-form-summary {
  border-bottom: 1px solid var(--jh-ai-line);
  margin-bottom: 8px;
}
.juhuo-ai-hub-grid--primary {
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .juhuo-ai-hub-grid--primary {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.juhuo-ai-hub-item.is-primary {
  min-height: 96px;
  padding: 14px 14px 12px;
}
.juhuo-ai-hub-item.is-primary .juhuo-ai-hub-item-title {
  font-size: 15px;
}
.juhuo-ai-hub-item.is-primary .juhuo-ai-hub-item-desc {
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}
.juhuo-ai-hub-more {
  margin-top: 10px;
  border: 1px dashed var(--jh-ai-line);
  border-radius: 12px;
  padding: 4px 10px 10px;
  background: rgba(255, 255, 255, 0.55);
}
.juhuo-ai-hub-more > summary {
  cursor: pointer;
  padding: 10px 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-msg-assistant .juhuo-ai-msg-body p {
  margin: 0 0 0.85em;
}
.juhuo-ai-msg-assistant .juhuo-ai-msg-body p:last-child {
  margin-bottom: 0;
}
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h2,
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h3,
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h4 {
  margin: 1.15em 0 0.45em;
  line-height: 1.35;
  font-weight: 750;
  color: var(--jh-ai-ink);
}
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h2:first-child,
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h3:first-child,
.juhuo-ai-msg-assistant .juhuo-ai-msg-body h4:first-child {
  margin-top: 0;
}
.juhuo-ai-chrome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 4px 10px;
  border-bottom: 1px solid var(--jh-ai-line);
  min-height: 44px;
  position: relative;
  z-index: 25;
  box-sizing: border-box;
}
.juhuo-ai-chrome-spacer {
  flex: 1 1 auto;
  min-width: 0;
}
.juhuo-ai-chrome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.juhuo-ai-hamburger {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--jh-ai-line-strong);
  background: #fff;
  color: var(--jh-ai-ink-soft);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}
.juhuo-ai-hamburger:hover,
.juhuo-ai-hamburger.is-open {
  background: var(--jh-ai-surface-2);
  border-color: rgba(44, 62, 80, 0.35);
}
.juhuo-ai-chrome-new,
.juhuo-ai-sidebar-new {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--jh-ai-line-strong);
  background: #fff !important;
  background-image: none !important;
  color: var(--jh-ai-ink-soft) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 600;
}
.juhuo-ai-sidebar-new {
  width: 100%;
  min-height: 36px;
  background: var(--jh-ai-accent) !important;
  border-color: var(--jh-ai-accent) !important;
  color: #fff !important;
}
.juhuo-ai-sidebar-new:active {
  background: var(--jh-ai-accent-pressed) !important;
}
.juhuo-ai-chat-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  width: min(82vw, 280px);
  height: 100%;
  min-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--jh-ai-line-strong);
  border-radius: 12px;
  background: #f8f9fb;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, opacity 0.18s ease;
  overflow: hidden;
  z-index: 20;
}
.juhuo-ai-chat-sidebar.juhuo-ai-sidebar-collapsed {
  transform: translateX(-105%);
  pointer-events: none;
  box-shadow: none;
}
.juhuo-ai-sidebar-head {
  display: flex;
  padding: 12px 12px 8px;
  box-sizing: border-box;
}
.juhuo-ai-sidebar-section {
  padding: 4px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.02em;
}
.juhuo-ai-thread-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px;
}
.juhuo-ai-thread-item {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 2px;
  border-radius: 8px;
  background: transparent !important;
  background-image: none !important;
  color: var(--jh-ai-ink) !important;
  box-shadow: none !important;
  font-size: 12px;
  min-height: 42px;
  box-sizing: border-box;
  overflow: hidden;
}
.juhuo-ai-thread-item:hover {
  background: #F5F6F8 !important;
}
.juhuo-ai-thread-item.active {
  background: var(--jh-ai-accent-soft) !important;
}
.juhuo-ai-thread-main {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 8px 6px 8px 10px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  color: inherit !important;
  box-shadow: none !important;
  font: inherit;
  display: block;
}
.juhuo-ai-thread-del {
  flex: 0 0 auto;
  width: 32px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
}
.juhuo-ai-thread-item:hover .juhuo-ai-thread-del,
.juhuo-ai-thread-item:focus-within .juhuo-ai-thread-del {
  opacity: 0.75;
}
.juhuo-ai-thread-del:hover {
  opacity: 1 !important;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.65);
}
.juhuo-ai-thread-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.juhuo-ai-thread-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.65;
}
.juhuo-ai-sidebar-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 0;
  padding: 0;
  border-radius: 12px;
}
.juhuo-ai-chat-workspace.juhuo-ai-sidebar-open .juhuo-ai-sidebar-backdrop {
  display: block;
  opacity: 1;
}
.juhuo-ai-msg-stage {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.juhuo-ai-msg-stage.is-empty {
  min-height: 160px;
}
.juhuo-ai-msg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px 8px;
  flex-shrink: 0;
}
.juhuo-ai-tool-btn,
.juhuo-ai-tool-danger {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--jh-ai-line-strong);
  background: #fff;
  color: var(--jh-ai-ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.juhuo-ai-tool-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.28);
}
/* 消息列表随内容增高，由外层页面滚动；禁止嵌套小滚动框 / 白卡片视口 */
.juhuo-ai-messages {
  flex: 0 0 auto;
  overflow: visible;
  padding: 2px 0 20px;
  min-height: 0;
  max-height: none;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.juhuo-ai-msg-stage.is-empty .juhuo-ai-messages {
  min-height: 140px;
}
.juhuo-ai-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
  color: var(--jh-ai-muted);
}
.juhuo-ai-chat-empty-glyph {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(44, 62, 80, 0.12), rgba(44, 62, 80, 0.04));
  border: 1px solid var(--jh-ai-line);
  margin-bottom: 4px;
}
.juhuo-ai-chat-empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--jh-ai-ink-soft);
}
.juhuo-ai-chat-empty-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  max-width: 260px;
}
/* 对话气泡：批论长文铺满主栏，不套白圆角小框 */
.juhuo-ai-msg {
  margin: 0 0 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  max-height: none;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.juhuo-ai-msg-user {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--jh-ai-surface-2);
  border: 0;
}
.juhuo-ai-msg-assistant {
  padding: 2px 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.juhuo-ai-msg-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--jh-ai-ink);
  word-break: break-word;
  white-space: pre-wrap;
  max-height: none;
  overflow: visible;
}
.juhuo-ai-msg-assistant .juhuo-ai-msg-body {
  font-size: 15px;
  line-height: 1.78;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.juhuo-ai-msg-article {
  white-space: normal;
}
.juhuo-ai-msg-article h2,
.juhuo-ai-msg-article h3,
.juhuo-ai-msg-article h4 {
  margin: 12px 0 6px;
  color: var(--jh-ai-ink);
}
.juhuo-ai-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--jh-ai-muted);
}
.juhuo-ai-msg-copy {
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--jh-ai-line-strong) !important;
  background: #fff !important;
  background-image: none !important;
  color: var(--jh-ai-ink-soft) !important;
  box-shadow: none !important;
  font-size: 11px;
  font-weight: 600;
}
.juhuo-ai-msg-copy:active {
  background: var(--jh-ai-accent-soft) !important;
  color: var(--jh-ai-accent) !important;
  border-color: rgba(77, 107, 254, 0.35) !important;
}
.juhuo-ai-cleanup-tip {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--jh-ai-cost-heavy);
  line-height: 1.4;
}
.juhuo-ai-leave-banner {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(61, 90, 108, 0.08);
  border: 1px solid rgba(61, 90, 108, 0.18);
  color: var(--jh-ai-cost);
  font-size: 12px;
  line-height: 1.45;
}
.juhuo-ai-status.juhuo-ai-status-bg {
  color: var(--jh-ai-cost);
}
.juhuo-ai-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%) translateY(8px);
  z-index: 9999;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(26, 35, 50, 0.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.juhuo-ai-copy-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.juhuo-ai-copy-toast-error {
  background: rgba(139, 61, 47, 0.95);
}
.juhuo-ai-clear-tip-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.juhuo-ai-clear-tip-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.juhuo-ai-clear-tip-panel {
  position: relative;
  width: min(92vw, 320px);
  padding: 18px 16px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
}
.juhuo-ai-clear-tip-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--jh-ai-ink);
}
.juhuo-ai-clear-tip-ok {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--jh-ai-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* 统一壳智算 Tab：同样不套视口小框，随主栏滚动 */
#tabPageAi .juhuo-ai-consult.juhuo-ai-chat-app,
.juhuo-ai-tab-full .juhuo-ai-consult.juhuo-ai-chat-app {
  min-height: 0;
  overflow: visible;
}
#tabPageAi .juhuo-ai-messages,
#tabPageAi .juhuo-ai-msg,
#tabPageAi .juhuo-ai-msg-body,
.juhuo-ai-tab-full .juhuo-ai-messages,
.juhuo-ai-tab-full .juhuo-ai-msg,
.juhuo-ai-tab-full .juhuo-ai-msg-body {
  max-height: none !important;
  overflow: visible !important;
}
