/* House assistant widget: black + amber, matches the theme tokens with fallbacks. */
.htx-chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 9990; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; height: 52px; border-radius: 26px; border: 0; background: var(--accent, #F4A93C); color: var(--accent-ink, #0b0b0c); font: 600 14px/1 inherit; letter-spacing: .02em; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.2); transition: transform .15s ease, box-shadow .15s ease; }
.htx-chat-fab:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.2); }
.htx-chat-fab:focus-visible, .htx-chat button:focus-visible, .htx-chat a:focus-visible, .htx-chat input:focus-visible, .htx-chat-log:focus-visible { outline: 2px solid var(--accent, #F4A93C); outline-offset: 2px; }
.htx-chat-fab:focus-visible { outline-color: #fff; }
.htx-chat-open .htx-chat-fab { display: none; }
.htx-chat { position: fixed; right: 20px; bottom: 20px; z-index: 9991; width: 380px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #0d0d0f; color: var(--fg, #F3EFE6); border: 1px solid rgba(244,169,60,.35); box-shadow: 0 24px 60px rgba(0,0,0,.6); font-size: 15px; }
.htx-chat[hidden] { display: none; }
.htx-chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 16px 12px 18px; border-bottom: 1px solid var(--line, #26262a); background: linear-gradient(180deg, rgba(244,169,60,.08), transparent); }
.htx-chat-kicker { margin: 0 0 4px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent, #F4A93C); }
.htx-chat-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; line-height: 1.2; }
.htx-chat-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted, #9a958c); }
.htx-chat-close { background: transparent; border: 1px solid var(--line, #26262a); color: var(--fg, #F3EFE6); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.htx-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.htx-msg { max-width: 88%; padding: 10px 12px; line-height: 1.45; }
.htx-msg p { margin: 0; }
.htx-msg-bot { align-self: flex-start; background: #17171a; border: 1px solid var(--line, #26262a); }
.htx-msg-me { align-self: flex-end; background: var(--accent, #F4A93C); color: var(--accent-ink, #0b0b0c); }
.htx-msg-links { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.htx-msg-links a { color: var(--accent, #F4A93C); text-underline-offset: 3px; font-size: 14px; }
.htx-msg-links a::after { content: " →"; }
.htx-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.htx-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted, #9a958c); animation: htxdot 1s infinite ease-in-out; }
.htx-typing span:nth-child(2) { animation-delay: .15s; } .htx-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes htxdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.htx-chat-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.htx-chat-chips[hidden] { display: none; }
.htx-chip { background: transparent; color: var(--fg, #F3EFE6); border: 1px solid rgba(244,169,60,.45); border-radius: 16px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.htx-chip:hover { background: rgba(244,169,60,.12); }
.htx-chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line, #26262a); }
.htx-chat-form input { flex: 1; min-width: 0; background: #0a0a0b; color: var(--fg, #F3EFE6); border: 1px solid var(--line, #26262a); padding: 11px 12px; font: inherit; font-size: 16px; }
.htx-chat-send { width: 46px; flex: none; border: 0; background: var(--accent, #F4A93C); color: var(--accent-ink, #0b0b0c); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.htx-chat-foot { margin: 0; padding: 0 16px 12px; font-size: 12px; }
.htx-chat-foot a { color: var(--muted, #9a958c); text-underline-offset: 3px; }
.htx-chat-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
  .htx-chat-fab { right: 14px; bottom: 14px; height: 50px; padding: 0 15px; }
  .htx-chat-fab-label { font-size: 13px; }
  .htx-chat { right: 0; left: 0; bottom: 0; width: 100%; max-width: none; height: 88vh; height: 88dvh; border-left: 0; border-right: 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .htx-chat-fab, .htx-typing span { transition: none; animation: none; } }
@media print { .htx-chat-fab, .htx-chat { display: none !important; } }
