/* 小伴工作区：局部覆盖旧的全站按钮与网格样式。 */
.ai-page { padding: 24px 20px 60px !important; }
.ai-page .ai-layout-v2 {
  width: min(1120px, 100%) !important; height: calc(100dvh - 170px) !important;
  min-height: 450px !important; max-height: none !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  grid-template-areas: 'toolbar' 'chat'; gap: 16px !important;
}
.ai-page .ai-layout-v2.ai-tools-open {
  grid-template-columns: minmax(0, 1fr) 340px !important;
  grid-template-areas: 'toolbar toolbar' 'chat tools';
}
.ai-page .companion-toolbar { grid-area: toolbar; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 4px 4px; }
.ai-page .companion-heading { display: flex; align-items: center; gap: 12px; }
.ai-page .companion-orb { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #2b3936; color: #c5d9c6; font-size: 24px; }
.ai-page .companion-heading h2 { margin: 0; color: #eee8dd !important; font-size: 21px; text-shadow: none; }
.ai-page .companion-heading p { margin: 4px 0 0; color: #a5aaa7 !important; font-size: 12px; }
.ai-page .companion-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-page .companion-toolbar button,
.ai-page .ai-left-panel button {
  background: #20272d !important; color: #dcded6 !important; border: 1px solid #3c4549 !important;
  border-radius: 9px !important; padding: 9px 12px !important; box-shadow: none !important;
  backdrop-filter: none !important; text-shadow: none !important; transform: none !important;
  font: inherit; font-size: 13px !important; font-weight: 500 !important; min-height: 38px;
  transition: background .15s, border-color .15s !important;
}
.ai-page .companion-toolbar button:hover,
.ai-page .ai-left-panel button:hover { background: #303b40 !important; color: #fff9ec !important; border-color: #73877c !important; }
.ai-page .companion-toolbar button.is-selected { background: #33443e !important; color: #e0eddb !important; border-color: #789383 !important; }
.ai-page .companion-toolbar .companion-new { background: transparent !important; border-color: transparent !important; color: #c9b99b !important; }
.ai-page button:disabled { opacity: .45; cursor: not-allowed; }
.ai-page button:focus-visible, .ai-page a:focus-visible { outline: 2px solid #c5d9c6; outline-offset: 3px; }
.ai-page .ai-left-panel { grid-area: tools; min-width: 0 !important; padding: 18px !important; gap: 12px !important; background: #181e24 !important; border: 1px solid #323b3f !important; box-shadow: none !important; border-radius: 16px !important; }
.ai-page .companion-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.ai-page .companion-panel-heading h3 { color: #eee8dd !important; font-size: 16px; text-shadow: none; margin: 0; }
.ai-page .companion-panel-heading button { background: transparent !important; border: 0 !important; font-size: 22px !important; padding: 0 8px !important; }
.ai-page .ai-control-card { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
.ai-page .ai-control-card:empty { display: none; }
.ai-page .ai-control-note { margin: 0 0 12px; font-size: 12px !important; line-height: 1.75; color: #aeb8b4 !important; }
.ai-page .ai-control-card p, .ai-page .ai-report-evidence p { font-size: 13px; line-height: 1.75; }
.ai-page .ai-control-card small { color: #aeb8b4 !important; }
.ai-page .ai-date-range { gap: 10px; margin: 16px 0; }
.ai-page .ai-date-range input { padding: 7px 8px !important; background: #11181d !important; color: #e2e4db !important; border: 1px solid #46514f !important; border-radius: 8px !important; font-size: 13px; }
.ai-page .ai-include-chat { align-items: flex-start; line-height: 1.6; color: #bec7c3; }
.ai-page input[type='checkbox'] { accent-color: #8eaa99; width: 16px; height: 16px; }
.ai-page .ai-left-panel .ai-gen-btn { margin-top: 14px; width: 100%; text-align: center; background: #b8cbb8 !important; color: #1c2b23 !important; border: 0 !important; }
.ai-page .ai-left-panel .ai-gen-btn:hover { background: #ccddc8 !important; color: #1c2b23 !important; }
.ai-page .ai-right-panel { grid-area: chat; border-radius: 16px !important; box-shadow: none !important; background: #151b20 !important; }
.ai-page .ai-chat-header-bar { padding: 16px 22px !important; background: transparent !important; }
.ai-page .ai-chat-header-title { font-size: 13px !important; font-weight: 400 !important; color: #a7b4ac !important; }
.ai-page .chat-area { padding: 22px !important; }
.ai-page .message { font-size: 15px; line-height: 1.8; }
.ai-page .message.assistant { background: #20292a !important; border-color: #37403e !important; box-shadow: none !important; border-radius: 4px 16px 16px 16px !important; }
.ai-page .ai-chat-input-bar { padding: 14px !important; gap: 10px !important; }
.ai-page .ai-chat-input-bar input { border-radius: 12px !important; padding: 12px !important; font-size: 16px !important; }
.ai-page .ai-chat-input-bar .ai-send-btn { background: #c9b78e !important; color: #292416 !important; border: 0 !important; padding: 10px 18px !important; border-radius: 12px !important; box-shadow: none !important; transform: none !important; }
.ai-page .emotion-pattern-card { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; padding: 14px !important; }
.ai-page .pattern-body { flex: 0 0 auto !important; overflow: visible !important; }
.ai-page .pattern-body h2, .ai-page .pattern-body h3 { text-shadow: none !important; }
.ai-page .ai-report-evidence { padding: 0; }
.ai-page .companion-access-note { padding: 16px; background: #242e30; border: 1px solid #43534c; border-radius: 12px; color: #e3e8df; font-size: 14px; line-height: 1.75; }
.ai-page .companion-access-note p { color: #bac6bf !important; margin: 8px 0 14px; font-size: 13px; }
.ai-page .companion-access-note a, .api-down-banner a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
/* Original desktop workspace, including the service notice height. */
@media (min-width:768px) {
  #Store:has(.api-down-banner) .ai-layout-v2 { height:calc(100dvh - 220px) !important; }
}
/* Mobile workspace modes are laid out in responsive.css. */
.page-back-fab--ai { display: none !important; }
