.jh-ai-widget { position: fixed; right: 20px; bottom: 24px; z-index: 100; font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.jh-ai-widget *, .jh-ai-widget *::before, .jh-ai-widget *::after { box-sizing: border-box; }
.jh-ai-widget [hidden] { display: none !important; }
.jh-ai-widget button, .jh-ai-widget textarea { font: inherit; }
.jh-ai-widget button { cursor: pointer; }
.jh-ai-widget button:focus-visible, .jh-ai-widget a:focus-visible, .jh-ai-widget textarea:focus-visible { outline: 3px solid rgba(221,0,36,.34); outline-offset: 2px; }
.jh-ai-launcher { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 6px 18px 6px 7px; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; color: #fff; background: #d90027; box-shadow: 0 8px 24px rgba(164,0,34,.26); font-size: 14px; font-weight: 700; }
.jh-ai-launcher:hover { background: #b90021; }
.jh-ai-launcher-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); }
.jh-ai-launcher-icon svg { width: 21px; height: 21px; }
.jh-ai-panel { position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; width: 390px; height: min(610px,calc(100vh - 48px)); height: min(610px,calc(100dvh - 48px)); overflow: hidden; border: 1px solid #e9e9ed; border-radius: 20px; color: #25262b; background: #fff; box-shadow: 0 20px 60px rgba(23,24,32,.22); }
.jh-ai-header { display: flex; align-items: center; flex: none; gap: 10px; padding: 17px 16px; border-bottom: 1px solid #f1f0f1; background: #fff; }
.jh-ai-avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: #d90027; font-size: 18px; font-weight: 800; }
.jh-ai-heading { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.jh-ai-heading strong { color: #1c1d20; font-size: 16px; line-height: 1.1; }
.jh-ai-heading span { color: #85858e; font-size: 12px; line-height: 1.2; }
.jh-ai-header-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 7px; border: 0; border-radius: 9px; color: #7c7d87; background: transparent; }
.jh-ai-header-button:hover { color: #d90027; background: #fff1f3; }
.jh-ai-header-button:disabled { opacity: .4; cursor: not-allowed; }
.jh-ai-header-button svg { width: 19px; height: 19px; }
.jh-ai-content { flex: 1; min-height: 0; padding: 18px 16px; overflow-y: auto; overscroll-behavior: contain; background: #f8f8fa; }
.jh-ai-messages { display: flex; flex-direction: column; gap: 13px; }
.jh-ai-message { display: flex; align-items: flex-start; gap: 8px; }
.jh-ai-message.user { justify-content: flex-end; }
.jh-ai-message-avatar { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 9px; color: #d90027; background: #ffecef; font-size: 12px; font-weight: 700; }
.jh-ai-bubble { max-width: 84%; margin: 0; padding: 11px 13px; border: 1px solid #ececf0; border-radius: 4px 14px 14px 14px; color: #37383d; background: #fff; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.jh-ai-message.user .jh-ai-bubble { border-color: #d90027; border-radius: 14px 4px 14px 14px; color: #fff; background: #d90027; }
.jh-ai-message.notice .jh-ai-bubble { color: #8b5054; border-color: #f2dadd; background: #fff8f8; }
.jh-ai-questions { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 0 34px; }
.jh-ai-questions button { padding: 7px 10px; border: 1px solid #efdbde; border-radius: 15px; color: #ad2037; background: #fff; font-size: 12px; line-height: 1.4; }
.jh-ai-questions button:hover { border-color: #d90027; }
.jh-ai-bottom { flex: none; padding: 11px 14px 12px; border-top: 1px solid #f0eff1; background: #fff; }
.jh-ai-privacy { margin: 0 0 8px; color: #92929b; font-size: 11px; line-height: 1.45; }
.jh-ai-form { display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 11px; border: 1px solid #e4e4e8; border-radius: 12px; background: #fff; }
.jh-ai-form:focus-within { border-color: #df7485; }
.jh-ai-form textarea { display: block; flex: 1; min-width: 0; min-height: 36px; max-height: 104px; padding: 8px 0; border: 0; outline: 0; resize: none; color: #25262b; background: transparent; font-size: 14px; line-height: 1.45; }
.jh-ai-form textarea:focus-visible { outline: 0; }
.jh-ai-form textarea::placeholder { color: #aaaab2; }
.jh-ai-form button { flex: none; min-width: 58px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; color: #fff; background: #d90027; font-size: 13px; font-weight: 700; }
.jh-ai-form button:hover { background: #b90021; }
.jh-ai-form button:disabled { opacity: .5; cursor: wait; }
.jh-ai-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: #aaaab0; font-size: 11px; line-height: 1.3; }
.jh-ai-foot a { color: #ac4050; text-decoration: none; }
.jh-ai-foot a:hover { text-decoration: underline; }
.jh-ai-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 767px) {
  .jh-ai-widget { right: 14px; bottom: calc(90px + env(safe-area-inset-bottom,0px)); }
  .jh-ai-launcher { min-height: 44px; }
  .jh-ai-launcher-icon { width: 30px; height: 30px; }
  .jh-ai-panel { position: fixed; right: 10px; bottom: calc(87px + env(safe-area-inset-bottom,0px)); left: 10px; width: auto; height: min(600px,calc(100dvh - 108px - env(safe-area-inset-bottom,0px))); border-radius: 18px; }
  .jh-ai-form textarea { font-size: 16px; }
}
@media print { .jh-ai-widget { display: none !important; } }
