/* MiniMike: centered identity, soft conversation bubbles, native-sized controls. */
body.aurora-hub.pw-product[data-view="chat"]{--mm-bubble:var(--panel);--mm-user:var(--nt-bubble,var(--pw-elevated));--mm-user-ink:var(--nt-bubble-ink,var(--ink));background:var(--bg)}
body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel{background:linear-gradient(180deg,transparent 72%,var(--nt-wash-a),var(--nt-wash-b))!important}
.mm-top-controls{display:none}
.mm-nav-button{display:none}
body.aurora-hub .ap-presence>div:has(>h1){position:relative!important;align-self:center;width:max-content!important;max-width:100%;text-align:center;margin-top:-13px;z-index:2;pointer-events:none}
body.aurora-hub .ap-presence h1{display:table;margin:0 auto;padding:8px 15px;border-radius:22px;background:linear-gradient(160deg,color-mix(in srgb,var(--panel) 90%,var(--accent)),var(--panel));border:1px solid color-mix(in srgb,var(--ink) 13%,transparent);box-shadow:0 3px 12px #0002;font-size:15px;line-height:20px;letter-spacing:-.2px;color:var(--ink)}
body.aurora-hub .ap-presence #chat-state{margin-top:4px;font-size:10px}
body.aurora-hub.pw-product[data-view="chat"] .ap-presence .pw-chat-top-actions{display:none}
body.aurora-hub.pw-product #chat-messages .chat-message-assistant.cmn-message{background:var(--mm-bubble);border:0;border-radius:24px;padding:14px 18px!important;width:fit-content;max-width:94%;box-shadow:none}
body.aurora-hub.pw-product #chat-messages .cmn-message.chat-message-user{background:var(--mm-user)!important;color:var(--mm-user-ink)!important;border:0;border-radius:25px;padding:13px 18px!important;max-width:85%;box-shadow:none}
body.aurora-hub.pw-product #chat-messages .chat-message-user .pw-message-body{color:inherit}
body.aurora-hub .pw-chat-tabs button>svg{width:20px;height:20px}
body.aurora-hub.pw-product[data-view="chat"] .pw-message-compose{background:transparent!important;box-shadow:none!important}
body.aurora-hub.pw-product[data-view="chat"] :is(.pw-phone-composer-shell,.pw-composer-shell){background:linear-gradient(140deg,var(--mm-bubble),color-mix(in srgb,var(--mm-bubble) 85%,var(--mm-user)));border:1px solid color-mix(in srgb,var(--ink) 23%,transparent);box-shadow:inset 0 1px 2px #fff1,0 3px 12px #0002}
@media(max-width:650px){
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-workspace{position:relative;grid-template-rows:minmax(0,1fr) auto;padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));gap:8px}
 body.aurora-hub.pw-product[data-view="chat"] :is(.pw-chat-panel,.pw-conversations-panel){grid-row:1;grid-column:1}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel>.pw-chat-top.ap-presence{height:142px;min-height:142px;padding:6px 52px 0}
 body.aurora-hub .ap-presence>.ap-avatar{width:92px;height:92px;flex-basis:92px;border-color:#ffffff22}
 body.aurora-hub .ap-presence h1{font-size:14px;line-height:18px;padding:7px 13px}
 body.aurora-hub .ap-presence #chat-state{max-width:220px;margin-top:3px;font-size:9px;line-height:12px}
 .mm-top-controls{position:absolute;top:calc(env(safe-area-inset-top) + 12px);left:18px;right:18px;display:flex;justify-content:space-between;pointer-events:none;z-index:5}
 .mm-top-controls .mm-nav-button{pointer-events:auto;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid #ffffff20;background:linear-gradient(145deg,var(--mm-bubble),var(--panel));box-shadow:inset 0 1px 1px #fff1,0 3px 10px #0002;color:var(--ink);padding:10px}
 .mm-nav-button svg{width:24px;height:24px}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar{grid-row:2;grid-column:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;min-height:58px;padding:4px;margin:0 5px;border:1px solid color-mix(in srgb,var(--ink) 15%,transparent);border-radius:32px;background:linear-gradient(150deg,var(--mm-bubble),color-mix(in srgb,var(--mm-bubble) 94%,var(--accent)));box-shadow:inset 0 1px 2px #fff1,0 5px 20px #0003}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabs{display:contents}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar :is(.pw-chat-tabs button,.mm-nav-button){position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:48px;min-height:48px;padding:3px;margin:0;border:0;border-radius:28px;color:var(--ink);background:transparent;transition:background 200ms ease,transform 180ms cubic-bezier(.2,.8,.2,1)}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar button[aria-selected="true"]{background:color-mix(in srgb,var(--panel) 70%,#000);box-shadow:0 1px 2px #fff1}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar button::after{display:none}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar :is(#new-chat,#pw-phone-menu,#pw-phone-jobs,#hub-concierge-open){display:none!important}
 body.aurora-hub .pw-chat-tabbar button>svg{width:24px;height:24px}
 .mm-top-controls .mm-nav-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body.aurora-hub .pw-chat-tabbar .mm-nav-label{font-size:8px;line-height:10px;font-weight:500;white-space:nowrap}
 body.aurora-hub .pw-chat-tabbar #mm-more .mm-nav-label{font-size:0}body.aurora-hub .pw-chat-tabbar #mm-more .mm-nav-label::after{content:'More';font-size:8px}
 body.aurora-hub .pw-chat-tabbar small{position:absolute;right:8px;top:1px;font-size:8px;line-height:12px;background:var(--panel);padding:0 3px;border-radius:8px}
 .mm-nav-button:active,.pw-chat-tabs button:active{transform:scale(.94)}
 .mm-nav-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
 body.aurora-hub .mm-history .pw-conversations-panel{padding-top:64px}
 body.aurora-hub.pw-product[data-view="chat"] #chat-messages{padding:9px 4px 12px}
 body.aurora-hub.pw-product #chat-messages .cmn-message{margin-bottom:12px!important;font-size:15px;line-height:1.5}
 body.aurora-hub.pw-product #chat-messages .chat-message-assistant.cmn-message{padding:13px 15px!important;border-radius:22px;max-width:96%}
 body.aurora-hub.pw-product #chat-messages .cmn-message.chat-message-user{max-width:85%;padding:11px 15px!important}
 body.aurora-hub.pw-product[data-view="chat"] .pw-message-compose{padding:0!important}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-welcome{padding:10px 3px 16px;align-items:flex-start;text-align:left}
 body.aurora-hub .pw-chat-welcome h2{font-size:23px;margin:0 0 7px}
 body.aurora-hub .pw-chat-welcome>p{font-size:13px}
 body.aurora-hub .cs-model-choice{width:100%;margin:13px 0}
 body.aurora-hub .cs-model{min-height:48px;border-radius:16px;background:var(--mm-bubble);padding:7px 9px}
 body.aurora-hub .cs-model strong{font-size:13px}.cs-model-note{display:none}
 body.aurora-hub .cs-model-state{font-size:10px}
 body.aurora-hub .pw-starters{gap:7px;width:100%}
 body.aurora-hub .pw-starters button{min-height:44px;border-radius:16px;background:var(--mm-bubble);font-size:11px;padding:10px}
}
@media(max-width:650px) and (max-height:540px){
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel>.pw-chat-top.ap-presence{height:102px;min-height:102px;padding-top:2px}
 body.aurora-hub .ap-presence>.ap-avatar{width:60px;height:60px;flex-basis:60px}
 body.aurora-hub .ap-presence h1{font-size:12px;padding:4px 10px}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar{min-height:45px;padding:2px}
 body.aurora-hub.pw-product[data-view="chat"] .pw-chat-tabbar :is(.pw-chat-tabs button,.mm-nav-button){height:40px;min-height:40px}
 body.aurora-hub .pw-chat-tabbar .mm-nav-label{display:none}
}

@media(min-width:651px){body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel>.pw-chat-top.ap-presence{height:174px;min-height:174px}}

/* Keyboard layout is driven by visualViewport and editor focus, not layout-height queries. */
@media(max-width:650px){
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .pw-chat-workspace{grid-template-rows:minmax(0,1fr);gap:0;padding-bottom:4px}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] :is(.pw-chat-tabbar,#pw-chat-metrics,.pw-chat-shortcuts){display:none!important}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .pw-chat-panel>.pw-chat-top.ap-presence{height:89px;min-height:89px;padding:2px 52px 0}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .ap-presence>.ap-avatar{width:60px;height:60px;flex-basis:60px}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .ap-presence h1{font-size:12px;line-height:17px;padding:4px 10px}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .ap-presence #chat-state{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%)}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .mm-top-controls{top:calc(env(safe-area-inset-top) + 7px)}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] #chat-messages{padding-top:4px;padding-bottom:8px}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .pw-message-compose{margin-bottom:0!important}
 body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] #assistant-form .pw-phone-composer-shell #assistant-prompt{max-height:88px}
}

/* Installed iOS windows have system status-bar effects absent from Safari tabs.
   Reserve a narrow opaque gutter beyond the OS safe area; never scale/blur the avatar. */
@supports (-webkit-touch-callout:none){
 @media(display-mode:standalone) and (max-width:650px){
  body.aurora-hub.pw-product[data-view="chat"] .pw-chat-workspace{padding-top:calc(env(safe-area-inset-top,0px) + 16px)}
  body.aurora-hub.pw-product[data-view="chat"] .mm-top-controls{top:calc(env(safe-area-inset-top,0px) + 28px)}
  body.aurora-hub.pw-product[data-view="chat"][data-pw-composing="true"] .mm-top-controls{top:calc(env(safe-area-inset-top,0px) + 23px)}
  body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel>.pw-chat-top.ap-presence{background:var(--bg,#090909);isolation:isolate}
  :root:not([data-theme="light"]) body.aurora-hub.pw-product[data-view="chat"] .pw-chat-panel>.pw-chat-top.ap-presence{background:var(--bg)}
 }
}
