/* One global account entry, anchored outside all business modules. */
.account-area {
  position: fixed; left: max(24px,env(safe-area-inset-left)); right: auto;
  top: auto; bottom: max(8px,env(safe-area-inset-bottom)); z-index: 30;
}
.home-account-slot { display: inline-flex; }
.account-button {
  width: 32px; max-width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 4px; border: 1px solid #b7d3f32e; border-radius: 9px;
  color: #c9d9ed; background: linear-gradient(135deg,#1d2e45c9,#101b2cc9);
  box-shadow: inset 0 1px #d9eaff0d,0 3px 12px #02081420; backdrop-filter: blur(18px);
}
.account-button:hover,.account-button[aria-expanded=true] { border-color: #a8c9ff67; box-shadow: inset 0 1px #d9eaff18,0 4px 16px #02081440; background: #243750e6; }
.account-sigil { display: grid; place-items: center; position: relative; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; background: radial-gradient(at 15% 10%,#7c9ae0,#47538e 65%,#283d60); border: 1px solid #b1cbff45; color: #f3f5ff; font: 500 11px/1 "Segoe UI",sans-serif; box-shadow: inset 0 1px #fff2; }
.is-authenticated .account-sigil::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 5px; height: 5px; border: 2px solid #17243a; border-radius: 50%; background: #81c8b3; }
.account-trigger-label { display: none; }
.account-button .account-chevron { display: none; }
.workspace-tools { display: flex; align-items: center; gap: 12px; }
.in-space .workspace { top: 24px; max-height: calc(100dvh - 68px); }
.bottom-bar { left: 76px; right: 24px; bottom: 8px; }
.preview-menu { position: fixed; right: auto; width: min(238px,calc(100vw - 24px)); padding: 8px; border-radius: 13px; overflow: auto; overscroll-behavior: contain; background: linear-gradient(140deg,#1c2d45fa,#0c192bfa); border-color: #a5c7f43b; box-shadow: 0 20px 60px #0008,inset 0 1px #d6e9ff12; }
.preview-menu .menu-title { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 13px 12px 15px; font-size: 13px; overflow-wrap: anywhere; }
.preview-menu .menu-title small { display: inline-block; margin: 0; padding: 3px 6px; color: #9fbced; border: 1px solid #91b5ec29; background: #769de718; border-radius: 5px; font-size: 9px; }
.preview-menu > button,.preview-menu > a { min-height: 38px; padding: 10px 12px; font-size: 11px; }
.preview-menu #logout { margin-top: 6px; border-top: 1px solid #9ebde921; border-radius: 0 0 7px 7px; color: #c7a6b0; }
.preview-menu #logout:hover { background: #c7747e13; color: #f7bcc4; }
.account-button:focus-visible { outline: 2px solid #b7d2ff; outline-offset: 3px; }
@media(max-width:560px) {
  .in-space .workspace { top: 12px; max-height: calc(100dvh - 52px); }
  .account-area { left: max(14px,env(safe-area-inset-left)); bottom: max(6px,env(safe-area-inset-bottom)); }
  .account-trigger-label { max-width: 85px; }
  .workspace-tools { gap: 8px; }
  .bottom-bar { left: 80px; right: 12px; bottom: 6px; justify-content: flex-end; }
  .bottom-bar > span { display: none; }
}

/* Hide the account entry while GEO is open; restore it on the home page. */
#cockpit.in-space:has(#workspace[data-mode="geo"]) > .account-area {
  display: none;
}
