/* StudioHub Assistant: compact operational layout, same brand tokens and accessibility. */
.assistant-layout{display:grid;grid-template-columns:minmax(240px,.78fr) minmax(0,1.3fr);gap:18px;align-items:start}
.assistant-overview,.assistant-chat{background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-radius-lg);padding:21px;min-width:0;box-shadow:0 4px 24px rgba(5,5,10,.035)}
.assistant-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.assistant-heading h2,.assistant-chat-head h2{font-size:17px;font-weight:750;line-height:1.3;margin:0;color:var(--ds-ink)}
.assistant-heading p,.assistant-chat-head p{font-size:12px;color:var(--ds-muted);margin:4px 0 0}
.assistant-glow{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--ds-accent-soft);color:var(--ds-accent);flex-shrink:0}
.assistant-glow svg{height:20px;width:20px}
.assistant-priority{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 16px;align-items:center;text-align:left;gap:10px;padding:11px 5px;background:transparent;color:var(--ds-ink);border:0;border-bottom:1px solid var(--ds-line);cursor:pointer}
.assistant-priority>svg{width:16px;height:16px;color:var(--ds-muted)}
.assistant-priority strong{font-size:12px;font-weight:750;display:block}
.assistant-priority small{font-size:11px;color:var(--ds-secondary);overflow-wrap:anywhere;display:block;margin-top:4px}
.assistant-priority-count{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--ds-accent-soft);color:var(--ds-accent);font-variant-numeric:tabular-nums;font-weight:800}
.assistant-priority:hover,.assistant-priority:focus-visible{background:var(--ds-raised);outline-offset:2px}
.assistant-metrics{display:flex;gap:7px;flex-wrap:wrap;padding:16px 0}
.assistant-metrics span{border:1px solid var(--ds-line);padding:6px 8px;border-radius:9px;font-size:11px;color:var(--ds-secondary)}
.assistant-latest{border-top:1px solid var(--ds-line);padding-top:13px}
.assistant-latest h3{font-size:12px;margin:0 0 9px;color:var(--ds-secondary)}
.assistant-latest p{margin:0 0 9px;font-size:12px;line-height:1.5;color:var(--ds-secondary);overflow-wrap:anywhere;display:flex;gap:8px;align-items:flex-start}
.assistant-latest svg{width:14px;height:14px;flex-shrink:0;margin-top:2px}
.assistant-chat{display:flex;flex-direction:column;gap:15px}
.assistant-chat-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.assistant-chat-head h2{display:flex;align-items:center;gap:7px}
.assistant-chat-head h2 svg{height:18px;width:18px;color:var(--ds-accent)}
.assistant-messages{display:flex;flex-direction:column;gap:12px;min-height:190px;max-height:min(48dvh,510px);overflow-y:auto;padding:14px 6px;overscroll-behavior:contain}
.assistant-message{border-radius:13px;padding:12px 14px;max-width:90%;background:var(--ds-raised);border:1px solid var(--ds-line)}
.assistant-message.is-user{align-self:flex-end;background:var(--ds-accent-soft)}
.assistant-message.is-reply{align-self:flex-start}
.assistant-message small{color:var(--ds-secondary);font-weight:750;font-size:10px}
.assistant-message p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:13px}
.assistant-empty,.assistant-thinking{font-size:12px;color:var(--ds-muted);line-height:1.5;margin:8px 0}
.assistant-prompts{display:flex;gap:7px;flex-wrap:wrap}
.assistant-prompt{border:1px solid var(--ds-line);border-radius:10px;background:transparent;color:var(--ds-secondary);font-size:11px;font-weight:700;min-height:37px;padding:8px 11px;cursor:pointer}
.assistant-prompt:hover,.assistant-prompt:focus-visible{border-color:var(--ds-accent);outline-offset:2px}
#assistantForm{display:flex;flex-direction:column;gap:12px}
#assistantQuestion{width:100%;resize:vertical;min-height:77px;max-height:160px;background:var(--ds-field);color:var(--ds-ink);border:1px solid var(--ds-line-strong);border-radius:12px;font:inherit;font-size:13px;line-height:1.5;padding:12px}
#assistantQuestion:focus-visible{outline:2px solid var(--ds-accent);outline-offset:2px}
.assistant-consent{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.5;color:var(--ds-secondary);cursor:pointer}
.assistant-consent input{width:17px;height:17px;flex-shrink:0;accent-color:var(--ds-accent)}
.assistant-compose-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
.assistant-compose-foot p{font-size:10.5px;line-height:1.45;color:var(--ds-muted);margin:0;max-width:46ch}
.assistant-compose-foot button{min-height:43px;display:flex;align-items:center;gap:7px;flex:none}
.assistant-compose-foot svg{width:15px;height:15px}
@media(max-width:900px){.assistant-layout{grid-template-columns:minmax(0,1fr)}.assistant-overview,.assistant-chat{padding:16px}}
@media(max-width:600px){.assistant-layout{gap:13px}.assistant-messages{min-height:140px;max-height:36dvh}.assistant-chat-head{gap:6px}.assistant-message{max-width:96%}.assistant-compose-foot{flex-wrap:wrap}.assistant-compose-foot button{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.assistant-chat *{scroll-behavior:auto!important}}

/* Four mobile destinations for client: Home, Assistant, Content, Notifications. */
@media(max-width:700px){.bottom-dock{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Companion: one unobtrusive launcher above the mobile dock, a proper
   bottom sheet on phones, and a right-hand panel on larger screens. */
#assistantCompanionRoot{position:relative;z-index:1100}
.assistant-quick-launcher{
 position:fixed;right:clamp(16px,2vw,26px);bottom:24px;z-index:1101;
 display:inline-flex;align-items:center;justify-content:center;gap:9px;
 min-width:100px;min-height:48px;padding:10px 17px;
 border:1px solid rgba(255,255,255,.2);border-radius:999px;
 background:var(--ds-accent);color:var(--ds-accent-on);
 box-shadow:0 9px 30px rgba(35,18,77,.23);cursor:pointer;
 font-size:13px;font-weight:800;line-height:1;letter-spacing:0;
}
.assistant-quick-launcher svg{width:18px;height:18px;flex:none}
.assistant-quick-launcher:hover{filter:brightness(1.08)}
.assistant-quick-launcher:focus-visible,.assistant-icon-button:focus-visible{outline:3px solid var(--ds-accent);outline-offset:3px}
.assistant-quick-launcher[hidden]{display:none}
.assistant-quick-backdrop{position:fixed;inset:0;z-index:1102;background:rgba(6,8,20,.48);border:0;cursor:default}
.assistant-quick-panel{
 position:fixed;right:clamp(16px,2vw,26px);bottom:24px;z-index:1103;
 width:min(424px,calc(100vw - 32px));max-height:min(700px,calc(100dvh - 48px));
 display:flex;flex-direction:column;min-height:0;
 background:var(--ds-surface);color:var(--ds-ink);border:1px solid var(--ds-line-strong);
 border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.33);overflow:hidden;
}
.assistant-quick-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--ds-line);flex:none}
.assistant-quick-head>div:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.assistant-quick-head strong{display:flex;gap:8px;align-items:center;font-size:14px}
.assistant-quick-head strong svg{width:16px;height:16px;color:var(--ds-accent)}
.assistant-quick-head small{color:var(--ds-secondary);font-size:11px}
.assistant-quick-head-actions{display:flex;gap:5px;align-items:center;flex:none}
.assistant-icon-button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--ds-line);border-radius:10px;background:transparent;color:var(--ds-ink);cursor:pointer;font-size:23px}
.assistant-icon-button svg{width:17px;height:17px}
.assistant-quick-body{display:flex;flex-direction:column;gap:11px;min-height:0;overflow:auto;padding:12px 15px max(13px,env(safe-area-inset-bottom));overscroll-behavior:contain}
.assistant-quick-body .assistant-messages{flex:1 1 auto;min-height:100px;max-height:none;padding:7px 2px;overflow:auto}
.assistant-quick-body .assistant-prompts{flex:none;gap:6px}
.assistant-quick-body .assistant-prompt{padding:7px 9px;font-size:11px}
.assistant-quick-body #assistantQuickForm{display:flex;flex-direction:column;gap:9px;flex:none}
#assistantQuickQuestion{font:inherit;font-size:16px;line-height:1.4;width:100%;min-height:57px;max-height:105px;padding:10px 12px;border:1px solid var(--ds-line-strong);border-radius:11px;background:var(--ds-field);color:var(--ds-ink);resize:vertical}
#assistantQuickQuestion:focus-visible{outline:2px solid var(--ds-accent);outline-offset:2px}
.assistant-quick-body .assistant-consent{font-size:10.5px}
.assistant-quick-body .assistant-compose-foot{display:flex;gap:7px;align-items:center}
.assistant-quick-body .assistant-compose-foot p{font-size:10px;line-height:1.3}
.assistant-quick-body .assistant-compose-foot button{min-height:44px;min-width:72px}
/* The bottom navigation remains active through 800px; the AI launcher must clear it. */
@media(max-width:800px){
 .assistant-quick-launcher{right:14px;bottom:calc(82px + env(safe-area-inset-bottom))}
}
@media(max-width:700px){
 .assistant-quick-launcher{min-height:46px;padding:10px 13px;min-width:0}
 .assistant-quick-panel{inset:auto 0 auto 0;bottom:max(0px,calc(100dvh - var(--studio-vv-height,100dvh) - var(--studio-vv-top,0px)));width:100%;max-height:min(86dvh,calc(var(--studio-vv-height,100dvh) - 12px),780px);border-radius:18px 18px 0 0;border-bottom:0;box-shadow:0 -15px 50px rgba(0,0,0,.28)}
 .assistant-quick-body{padding:11px 14px max(16px,env(safe-area-inset-bottom))}
 .assistant-quick-body .assistant-messages{min-height:75px;max-height:none}
 .assistant-quick-body .assistant-prompts{max-height:83px;overflow:auto}
 .assistant-quick-body .assistant-prompt{min-height:38px}
}
@media(max-width:375px){
 .assistant-quick-launcher span{display:none}
 .assistant-quick-launcher{width:48px;height:48px;border-radius:50%;padding:0}
 .assistant-quick-body .assistant-compose-foot p{max-width:22ch}
 .assistant-quick-body .assistant-consent{font-size:10px}
}
body:has(.modalshade) .assistant-quick-launcher,
body:has(.command-shade) .assistant-quick-launcher,
body:has(.sidebar.open) .assistant-quick-launcher{visibility:hidden;pointer-events:none}
@media(prefers-reduced-motion:reduce){.assistant-quick-launcher{transition:none}}
