#helpAssistant { position: fixed; z-index: 25; right: max(24px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: inherit; color: var(--ink, #162338); }
#helpAssistant [hidden] { display: none !important; }
#helpAssistant button, #helpAssistant textarea { font: inherit; }
#helpAssistant input { font: inherit; }
#helpAssistant button:focus-visible, #helpAssistant a:focus-visible, #helpAssistant textarea:focus-visible { outline: 3px solid #89b3ff; outline-offset: 3px; }
#helpAssistant input:focus-visible, #helpAssistant summary:focus-visible { outline: 3px solid #89b3ff; outline-offset: 3px; }
.help-launcher { display: grid; place-items: center; flex-shrink: 0; width: 84px; height: 70px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: grab; appearance: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.help-ai-mark { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; background: transparent; }
.help-whale { display: block; width: 40px; height: 34px; object-fit: contain; transition: transform .2s ease; }
.help-launcher .help-whale { width: 84px; height: 70px; filter: drop-shadow(0 5px 6px #245ed22e); pointer-events: none; -webkit-user-drag: none; }
.help-launcher:hover .help-whale { transform: translateY(-2px) rotate(-5deg); }
.help-dragging .help-launcher { cursor: grabbing; }
.help-dragging .help-launcher .help-whale { transform: none; transition: none; }
.help-dialog { position: fixed; box-sizing: border-box; width: min(400px, calc(100vw - 32px)); height: 590px; max-height: calc(100dvh - 120px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: #fff; border: 1px solid #dce7fa; border-radius: 20px; box-shadow: 0 18px 60px #183b6f26; }
.help-header { padding: 18px 18px 15px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #e8eef8; background: linear-gradient(115deg, #f0f5ff, #fff); }
.help-heading { flex: 1; min-width: 0; }
.help-heading h2 { margin: 0; font-size: 16px; line-height: 1.4; color: #1e3763; }
.help-heading p { margin: 3px 0 0; font-size: 12px; color: #657997; }
.help-icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #536988; font-size: 22px !important; }
.help-icon-button:hover { background: #eaf1ff; }
.help-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 18px; min-height: 0; scrollbar-width: thin; }
.help-welcome { margin: 0 0 14px; font-size: 16px; line-height: 1.65; }
.help-quick-title { color: #667c9b; font-size: 12px; margin: 0 0 8px; }
.help-quick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.help-quick-list button { border: 1px solid #e0e9fa; border-radius: 10px; background: #f7faff; color: #2b528b; text-align: left; font-size: 14px !important; line-height: 1.5; padding: 10px; }
.help-quick-list button:hover { border-color: #98baf5; background: #eef5ff; }
.help-library { margin: 0 0 18px; border: 1px solid #e0e9fa; border-radius: 12px; background: #fbfcff; }
.help-library summary { padding: 12px; cursor: pointer; color: #2b528b; font-size: 14px; font-weight: 600; }
.help-library-body { padding: 0 10px 10px; }
#helpSearch { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #d8e4f7; border-radius: 9px; padding: 10px; color: #162338; background: #fff; font-size: 16px; }
.help-categories { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.help-categories button { padding: 6px 9px; border: 1px solid #dce6f6; border-radius: 16px; background: #fff; color: #526b8e; font-size: 12px !important; }
.help-categories button[aria-pressed="true"] { background: #e9f1ff; border-color: #a9c6fa; color: #245ed2; }
.help-library-list { display: grid; gap: 4px; }
.help-library-list button { padding: 9px 7px; text-align: left; overflow-wrap: anywhere; border: 0; border-radius: 7px; background: transparent; color: #2b528b; font-size: 13px !important; line-height: 1.5; }
.help-library-list button:hover { background: #edf4ff; }
.help-library-empty { margin: 10px 3px; color: #657997; font-size: 13px; line-height: 1.6; }
.help-message { margin: 0 0 15px; max-width: 100%; }
.help-message-label { color: #6a7e9b; font-size: 12px; margin-bottom: 5px; }
.help-message-text { border-radius: 12px; padding: 12px 13px; background: #f4f7fd; font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-message.user .help-message-label { text-align: right; }
.help-message.user .help-message-text { background: #eaf2ff; margin-left: 25px; color: #254876; }
.help-message-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.help-message-links button, .help-message-links a { border: 1px solid #dce6f6; border-radius: 8px; background: white; padding: 6px 9px; font-size: 13px !important; color: #2860ad; text-decoration: none; }
.help-composer { border-top: 1px solid #e8eef8; padding: 12px 16px 14px; background: #fff; }
.help-input-row { display: flex; align-items: flex-end; gap: 8px; }
.help-input-row textarea { flex: 1; min-width: 0; width: 100%; min-height: 46px; max-height: 100px; resize: vertical; border: 1px solid #d8e4f7; border-radius: 11px; padding: 11px; font-size: 16px !important; line-height: 1.5; color: #162338; background: #fbfcff; }
.help-send { border: 0; border-radius: 10px; padding: 12px 13px; min-height: 46px; background: #3478f6; color: white; font-size: 14px !important; white-space: nowrap; }
#helpAssistant button:disabled { cursor: wait; opacity: .55; }
.help-privacy { color: #6d7b90; font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.help-status { font-size: 13px; color: #365c93; margin: 8px 0 0; min-height: 0; }
body.help-assistant-ready .toast { bottom: 108px; z-index: 30; }
body.help-assistant-open .toast { right: auto; left: 20px; max-width: min(420px, calc(100vw - 40px)); }
@media (max-width: 680px) { #helpAssistant { right: max(10px, env(safe-area-inset-right)); } .help-launcher { width: 48px; height: 42px; } .help-launcher .help-whale { width: 48px; height: 40px; } }
@media (max-width: 520px) { #helpAssistant { bottom: max(16px, env(safe-area-inset-bottom)); } .help-dialog { max-height: calc(100dvh - 114px); } }
@media (max-height: 450px) { .help-dialog { height: calc(100dvh - 120px); } .help-privacy { display: none; } }
@media print { #helpAssistant { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .help-whale { transition: none; } .help-launcher:hover .help-whale { transform: none; } }
