/* Chat fit (H54): rules for the assistant window on the Hub page only (the widget itself is untouched).
   1) the window never covers the header; 2) the arrow button and the blue corner work at EVERY window height
   (the widget only styles them for windows taller than 680px); 3) page content steps aside when the chat opens.
   --xh-head-b / --xh-chat-w are measured once per open by hub-chatfit.mjs, never while the window is dragged. */
@media (min-width:769px){
  .xh-main,.xhh,.xg{transition:padding-right .45s cubic-bezier(.2,.8,.2,1)}
  html.xenyra-chat-open .xenyra-root.xenyra-open:not(.xenyra-root--panel-manual){top:calc(var(--xh-head-b,68px) + 10px);bottom:12px;height:auto;max-height:none}
  html.xenyra-chat-open .xenyra-root.xenyra-open.xenyra-root--panel-manual{top:auto;bottom:12px;width:var(--x-panel-manual-width,min(440px,calc(100vw - 24px)));height:var(--x-panel-manual-height,calc(100dvh - var(--xh-head-b,68px) - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--xh-head-b,68px) - 24px)}
  html.xenyra-chat-open .xenyra-root.xenyra-open.xenyra-root--wide:not(.xenyra-root--panel-manual){width:min(760px,calc(100vw - 96px))}
}
@media (min-width:900px){
  html.xenyra-chat-open body .xh-main{grid-template-columns:minmax(0,1fr)}
  html.xenyra-chat-open body .xh-stage{grid-column:1;grid-row:auto}
  html.xenyra-chat-open body .xh-hero h1{font-size:clamp(36px,4.2vw,60px)}
  html.xenyra-chat-open body .xh-main,html.xenyra-chat-open body .xhh,html.xenyra-chat-open body .xg{padding-right:calc(var(--xh-chat-w,0px) + 28px)}
}
@media (prefers-reduced-motion:reduce){.xh-main,.xhh,.xg{transition:none}}
