/* 人合讲师库工作区 v6，覆盖 LibreChat 实际使用的主题变量。 */
:root, .dark {
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-secondary-alt: #64748B;
  --text-tertiary: #94A3B8;
  --header-primary: #FFFFFF;
  --header-hover: #F1F5F9;
  --header-button-hover: #E0F2FE;
  --surface-primary: #FFFFFF;
  --surface-primary-alt: #F8FAFC;
  --surface-primary-contrast: #F1F5F9;
  --surface-secondary: #F8FAFC;
  --surface-secondary-alt: #F8FAFC;
  --surface-tertiary: #F1F5F9;
  --surface-tertiary-alt: #F1F5F9;
  --surface-hover: #F1F5F9;
  --surface-hover-alt: #E0F2FE;
  --surface-active: #E0F2FE;
  --surface-active-alt: #E0F2FE;
  --surface-dialog: #FFFFFF;
  --surface-submit: #0284C7;
  --surface-submit-hover: #0369A1;
  --surface-chat: #F1F5F9;
  --border-light: #E2E8F0;
  --border-medium: #E2E8F0;
  --border-medium-alt: #E2E8F0;
  --border-heavy: #CBD5E1;
  --border-xheavy: #94A3B8;
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 200 98% 39%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 204 94% 94%;
  --accent-foreground: 201 96% 32%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 199 89% 48%;
  color-scheme: light;
}
html, body, #root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif !important;
  background: #F8FAFC;
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #0284C7;
  outline-offset: 3px;
}
[data-renhe-hidden='true'] { display: none !important; }
.renhe-embedded [data-renhe-control-rail] { width: 44px; padding: 8px 4px; }
.renhe-embedded [data-renhe-control-rail] > :not(#close-sidebar-button) { display: none !important; }
.renhe-embedded [data-renhe-sidebar] button[aria-label='创建新对话'],
.renhe-embedded [data-renhe-sidebar] button[aria-label='New chat'] { display: none !important; }
.renhe-embedded { overflow: hidden; }
.renhe-embedded body { height: 100dvh; overflow: hidden; }
.renhe-embedded #root { position: fixed; inset: 0; height: 100dvh; min-height: 0; }
.renhe-embedded #root > div { height: 100%; min-height: 0; }
.renhe-embedded #root .h-screen { height: 100% !important; min-height: 0 !important; }
.renhe-embedded.renhe-chat-ready #root { top: 52px; height: calc(100dvh - 52px); }
.renhe-embedded.renhe-chat-ready #root > div { height: calc(100dvh - 52px) !important; }
.renhe-embedded #root .h-full { min-height: 0; }
.renhe-embedded #root aside, .renhe-embedded #root [data-renhe-sidebar] { display: none !important; }
.renhe-embedded #root > div > .relative.z-0 { z-index: auto; }
.renhe-embedded #root .max-w-full.flex-col[style*='transform'] { transform: none !important; }
.renhe-embedded #root .fixed:has(> button[aria-label='关闭侧边栏'].h-full.w-full),
.renhe-embedded #root .fixed:has(> button[aria-label='Close sidebar'].h-full.w-full) { display: none !important; }
.renhe-embedded #root footer, .renhe-embedded #root [role='contentinfo'] { display: none; }
.renhe-embedded #root main { min-width: 0; background: #F8FAFC; }
.renhe-embedded #root main button[aria-label='打开侧边栏'],
.renhe-embedded #root main button[aria-label='Open sidebar'] { display: none; }
.renhe-workbar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 24px; background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0; font-size: 13px;
}
.renhe-workbar-label, .renhe-workbar-actions { display: flex; align-items: center; gap: 10px; }
.renhe-workbar-label { font-weight: 600; white-space: nowrap; }
.renhe-workbar-label small { font-weight: 400; color: #64748B; font-size: 12px; margin-left: 6px; }
.renhe-spark { color: #0284C7; font-size: 20px; }
.renhe-workbar-actions button, .renhe-workbar-actions a {
  font: inherit; font-weight: 500; border: 1px solid #E2E8F0; border-radius: 6px;
  color: #334155; background: #FFFFFF; padding: 6px 12px; text-decoration: none; cursor: pointer;
}
.renhe-workbar-actions button:hover, .renhe-workbar-actions a:hover { background: #F1F5F9; }
.renhe-workbar-actions a { background: #E0F2FE; color: #0369A1; border-color: #E0F2FE; }
.renhe-embedded.renhe-history-open #root aside,
.renhe-embedded.renhe-history-open #root [data-renhe-sidebar] {
  display: flex !important; position: fixed; z-index: 60; left: 0; top: 52px; bottom: 0;
  height: calc(100dvh - 52px) !important; width: min(360px, 90vw) !important;
  min-width: 0 !important; max-width: min(360px, 90vw) !important; transform: none !important; background: #FFFFFF;
  box-shadow: 12px 0 36px rgba(15, 23, 42, .12);
}
.renhe-history-backdrop { display: none; }
.renhe-history-open .renhe-history-backdrop {
  display: block; position: fixed; inset: 52px 0 0; background: rgba(15, 23, 42, .22);
  border: 0; z-index: 50; cursor: default;
}
.renhe-embedded #prompt-textarea { font-size: 14px; line-height: 1.7; }
.renhe-embedded [role='dialog'] { border-radius: 14px; border-color: #E2E8F0; }
.renhe-embedded button[aria-label='Toggle theme'] { display: none; }
.renhe-embedded [data-renhe-login] form,
.renhe-embedded [data-renhe-login] > p,
.renhe-embedded [data-renhe-login] > div:has(> span) { display: none; }
.renhe-embedded [data-renhe-login] { border-radius: 14px; background: #FFFFFF; padding: 28px; border: 1px solid #E2E8F0; }
.renhe-embedded [data-renhe-login] h1 { color: #0F172A; font-size: 22px; margin-bottom: 20px; }
.renhe-embedded a[aria-label='讲师库平台统一账号登录'] { border: 0; border-radius: 6px; background: #0284C7; color: #FFFFFF; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 640px) {
  .renhe-workbar { padding: 0 12px; gap: 8px; }
  .renhe-workbar-label small { display: none; }
  .renhe-workbar-actions { gap: 6px; }
  .renhe-workbar-actions a, .renhe-workbar-actions button { padding: 6px 9px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .renhe-embedded * { scroll-behavior: auto !important; } }
.renhe-brand-logo { display: inline-flex; width: 52px; height: 52px; flex: none; margin-right: 8px; }
.renhe-brand-logo svg { display: block; width: 100%; height: 100%; }
[data-renhe-welcome-native-logo] { display: none !important; }
.renhe-welcome .split-parent { font-size: 26px !important; line-height: 1.4; }
.renhe-question-starters { width: min(100%, 768px); padding: 20px 16px 12px; margin: 0 auto; }
.renhe-starters-heading { font-size: 12px; font-weight: 500; color: #64748B; margin: 0 0 10px; }
.renhe-starters-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.renhe-question { display: grid; gap: 5px; text-align: left; border: 1px solid #E2E8F0; border-radius: 8px; padding: 12px 14px; min-height: 72px; background: #FFFFFF; cursor: pointer; }
.renhe-question strong { font-size: 13px; font-weight: 600; color: #0F172A; }
.renhe-question span { font-size: 12px; color: #64748B; overflow-wrap: anywhere; }
.renhe-question:hover { border-color: #7DD3FC; background: #F0F9FF; }
.renhe-question:nth-child(2):hover { border-color: #6EE7B7; background: #F0FDF4; }
.renhe-starters-hint { margin: 12px 0 0; font-size: 11px; color: #64748B; line-height: 1.6; }
@media(max-width:640px) {
  .renhe-brand-logo { width: 42px; height: 42px; margin: 0 0 8px; }
  .renhe-welcome .split-parent { font-size: 22px !important; }
  .renhe-question-starters { padding: 14px 12px 8px; }
  .renhe-starters-grid { gap: 8px; }
  .renhe-question { padding: 10px; min-height: 80px; }
}
