.chat-launcher { position: fixed; z-index: 25; right: max(24px, env(safe-area-inset-right)); bottom: calc(max(24px, env(safe-area-inset-bottom)) + var(--chat-offset, 0px)); display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px 22px; border: 1px solid #b65320; border-radius: 32px; background: var(--accent); color: #19232b; font-weight: 600; font-size: 14px; box-shadow: 0 4px 22px #63311230; }
.chat-launcher { animation: chat-beacon 4s ease-out infinite; }
.chat-launcher:hover { background: var(--accent-hover); }
.chat-launcher svg { width: 24px; height: 24px; }
.chat-launcher[aria-expanded=true] { visibility: hidden; }
@keyframes chat-beacon { 0%, 100% { box-shadow: 0 4px 22px #63311230, 0 0 0 3px #ee824815; } 50% { box-shadow: 0 4px 22px #63311230, 0 0 0 7px #ee82482b; } }
body.chat-open { overflow: hidden; }
.chat-dialog { position: fixed; inset: auto 24px 24px auto; margin: 0; padding: 0; width: min(420px, calc(100vw - 32px)); height: min(710px, calc(100dvh - 48px)); max-width: none; max-height: none; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: white; box-shadow: 0 24px 90px #102a3a40; overflow: hidden; }
.chat-dialog[open] { display: flex; flex-direction: column; }
.chat-dialog::backdrop { background: #10233238; }
.chat-header { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; padding: 20px 16px; background: var(--dark); color: white; }
.chat-header > div { flex: 1; min-width: 0; }
.chat-header h2 { font: 600 20px/1.2 var(--font); margin: 0 0 6px; }
.chat-header p { margin: 0; color: #d2dee7; font-size: 11px; line-height: 1.5; }
.chat-close { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #ffffff50; border-radius: 50%; background: transparent; color: white; font-size: 26px; line-height: 1; }
.chat-close:hover { background: #ffffff20; }
.chat-tabs { display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--line); padding: 0 16px; }
.chat-tabs button { flex: 1; min-height: 54px; background: none; color: var(--muted); border: 0; border-bottom: 3px solid transparent; font-size: 13px; font-weight: 500; padding: 10px 6px; }
.chat-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.chat-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px; scrollbar-width: thin; }
.chat-welcome { padding: 16px; border-radius: 2px 16px 16px 16px; background: var(--surface); color: var(--ink); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.chat-questions summary { font-size: 13px; min-height: 56px; padding: 12px 0; gap: 12px; }
.chat-questions summary > span { font-size: 22px; }
.chat-questions details > p { font-size: 13px; margin: 0 0 16px; padding: 14px; border-radius: 12px; background: var(--surface); }
.chat-request-action { width: 100%; font: 600 14px/1.4 var(--font); min-height: 50px; margin-top: 20px; padding: 12px 16px; }
.chat-manager { font-size: 12px; margin: 20px 0 0; text-align: center; }
.chat-manager a { display: flex; min-height: 44px; align-items: center; justify-content: center; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.chat-preview { font-size: 12px; background: #fff1e6; color: #724321; padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.chat-form .form-heading { margin-bottom: 20px; }
.chat-form .form-heading h3 { font: 600 21px/1.3 var(--font); margin-bottom: 8px; }
.chat-form .form-heading p { font-size: 13px; }
.chat-form label { margin-bottom: 18px; font-size: 13px; }
.chat-form .consent { font-size: 12px; line-height: 1.5; }
.chat-form .submit { width: 100%; font: 600 14px/1.4 var(--font); }
.chat-form input, .chat-form textarea, .chat-form select { border-radius: 8px; }
.chat-form .form-status { margin-bottom: 0; }
.chat-form .form-status:empty { display: none; }
@media (max-width: 600px) {
  .chat-launcher { right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--chat-offset, 0px)); min-height: 52px; padding: 12px 18px; }
  .chat-dialog { inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px; width: auto; height: min(720px, calc(100dvh - 24px)); }
  .chat-header { padding: 16px 12px; }
  .chat-header img { width: 36px; height: 36px; }
  .chat-scroll { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .chat-launcher { animation: none; } }
