/* The normal chat renderer and composer remain intact in a dedicated window. */
.detached-chat-window #app-shell { grid-template-columns:minmax(0,1fr)!important; grid-template-rows:32px minmax(0,1fr); }
.detached-chat-window #nav-sidebar,.detached-chat-window .chat-list-panel,.detached-chat-window .chat-sidebar,.detached-chat-window .chat-list-pane,.detached-chat-window #app-shell>section:not(#main-panel),.detached-chat-window [data-action="back-to-list"] { display:none!important; }
.detached-chat-window #main-panel { grid-column:1; grid-row:2; display:block!important; min-width:0; height:100%; }
.detached-chat-tools { grid-column:1; grid-row:1; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 14px; background:var(--surface); border-bottom:1px solid var(--line); color:var(--muted); font-size:11px; }
.detached-chat-tools a { color:var(--accent); text-decoration:none; }
.detached-chat-window .details-drawer,.detached-chat-window .copilot-drawer { top:32px; height:calc(100% - 32px); }
.detached-chat-blocked { max-width:520px; margin:12vh auto; padding:26px; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--text); }
.detached-chat-blocked h1 { font-size:21px; }
.detached-chat-disconnected #app-shell,.detached-chat-disconnected #login-screen { display:none!important; }
.detached-chat-blocked p { color:var(--muted); line-height:1.7; }
.detached-chat-blocked .button { display:inline-block; margin-top:14px; text-decoration:none; }
@media(max-width:760px) {
  .detached-chat-window #app-shell { width:100%; height:100dvh; }
  .detached-chat-window #main-panel { position:relative!important; inset:auto!important; transform:none!important; }
}
