/* One set of module shortcuts on every workspace, using the existing palette. */
.bb-module-switcher {display:flex;gap:3px;align-items:center;order:1;}
.bb-module-switcher button {display:flex;align-items:center;gap:6px;min-height:36px;padding:6px 9px;background:transparent;color:var(--text);border:1px solid transparent;border-radius:7px;font-size:12px;}
.bb-module-switcher svg {width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.bb-module-switcher button[aria-current=page],.bb-tool-mobile button[aria-current=page] {color:var(--accent);background:var(--subtle);border-color:var(--line);font-weight:650;}
#bb-workspace-chrome .bb-module-switcher button[aria-current=page] {color:var(--accent);background:var(--subtle);border-color:var(--line);font-weight:650;}
.bb-help-launch {order:2;}
#bb-workspace-chrome .bb-chrome-left>.bb-help-launch {width:auto;padding:6px 12px;flex-shrink:0;}
#bb-stock-views {display:none;}
#bb-navigation-notice {position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:250;width:min(440px,calc(100% - 32px));padding:14px 18px;border-radius:10px;background:var(--text,#17231b);color:var(--surface,#fff);box-shadow:0 5px 20px #0004;font-size:14px;line-height:1.5;}
#bb-navigation-notice[hidden] {display:none;}
.bb-phone .bb-module-switcher {display:none;}
.bb-phone #bb-stock-views {display:flex;gap:4px;padding:4px;background:var(--subtle);border:1px solid var(--line);border-radius:10px;margin:0 0 12px;}
.bb-phone #bb-stock-views button {flex:1;min-height:44px;font-size:14px;background:transparent;border:1px solid transparent;border-radius:7px;color:var(--text);}
.bb-phone #bb-stock-views button[aria-current=page] {background:var(--surface);border-color:var(--line);font-weight:650;}
html[data-device=phone] .stat-card strong {white-space:nowrap;overflow-wrap:normal;flex-shrink:0;}
@media(max-width:360px){html[data-device=phone] .stat-card>div{display:flex;flex-direction:column;align-items:flex-start;gap:6px;}}
@media(min-width:721px) and (max-width:1250px){.bb-module-switcher button{padding:6px;}.bb-module-switcher svg{display:none;}.bb-module-switcher{gap:0;}.bb-help-launch{font-size:11px;padding:6px;}}
@media(min-width:721px) and (max-width:900px){
  #bb-workspace-chrome .bb-chrome-left>strong,#bb-workspace-chrome .bb-chrome-operator>span:last-child {display:none;}
  #bb-workspace-chrome .bb-chrome-left,#bb-workspace-chrome .bb-chrome-right {gap:8px;}
  #bb-workspace-chrome .bb-chrome-company {max-width:180px;min-width:120px;}
  #bb-workspace-chrome .bb-chrome-operator {padding-left:8px;}
  #bb-workspace-chrome .bb-chrome-connection {padding-left:8px;}
}
html[data-keyboard-open=true].bb-phone :is(#bb-phone-nav,.bb-tool-mobile) {visibility:hidden;pointer-events:none;}
html[data-keyboard-open=true].bb-phone .shell {height:100dvh;}

/* Stock's phone frame is shared literally by every workspace. */
#bb-mobile-header {display:none;}
html[data-device=phone] {
  --bb-mobile-top:calc(74px + env(safe-area-inset-top,0px));
  --bb-mobile-bottom:calc(69px + env(safe-area-inset-bottom,0px));
  --bb-mobile-host-offset:0px;
}
html[data-device=phone].desktop-host {--bb-mobile-host-offset:42px;}
html.bb-mobile-frame[data-device=phone] #bb-mobile-header {
  box-sizing:border-box;display:flex;position:fixed;top:var(--bb-mobile-host-offset);left:0;right:0;z-index:40;
  height:var(--bb-mobile-top);align-items:center;justify-content:space-between;gap:8px;
  padding:calc(10px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 10px max(16px,env(safe-area-inset-left,0px));
  background:var(--chrome);color:var(--text);border:0;border-bottom:1px solid var(--line);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:20px;
}
#bb-mobile-header[hidden] {display:none!important;}
#bb-mobile-header * {box-sizing:border-box;}
#bb-mobile-header .bb-mobile-company {
  appearance:none;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;
  flex:1;min-width:0;max-width:65%;min-height:44px;margin:0;padding:4px 9px;
  border:0;border-radius:9px;background:transparent;color:var(--text);box-shadow:none;text-align:left;
  font:inherit;cursor:pointer;
}
#bb-mobile-header .bb-mobile-company>span {font-size:11px;line-height:15px;font-weight:400;color:var(--muted);}
#bb-mobile-header .bb-mobile-company>strong {font-size:14px;line-height:20px;font-weight:650;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#bb-mobile-header .bb-mobile-connection {flex:0 0 auto;text-align:right;margin:0;padding:0;border:0;line-height:16px;}
#bb-mobile-header .bb-mobile-connection>span {display:block;font-size:11px;font-weight:400;color:var(--muted);}
#bb-mobile-header .bb-mobile-connection>strong {display:block;font-size:11px;font-weight:650;color:var(--success,var(--accent));letter-spacing:.02em;}
#bb-mobile-header .bb-mobile-connection>strong::before {content:'●';font-size:7px;margin-right:4px;vertical-align:1px;}
#bb-mobile-header .bb-mobile-connection[data-unavailable=true]>strong {color:var(--warning);}
#bb-mobile-header button:focus-visible {outline:2px solid var(--focus,var(--accent));outline-offset:2px;}
#bb-mobile-header .bb-mobile-history {display:flex;flex:0 0 auto;gap:2px;}
#bb-mobile-header .bb-mobile-history button {appearance:none;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);box-shadow:none;cursor:pointer;}
#bb-mobile-header .bb-mobile-history button:disabled {opacity:.35;cursor:default;}
#bb-mobile-header .bb-mobile-history svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
@media(max-width:380px){#bb-mobile-header .bb-mobile-connection>span{display:none;}#bb-mobile-header .bb-mobile-connection>strong{font-size:10px;}#bb-mobile-header .bb-mobile-company{padding-left:0;}html.bb-mobile-frame[data-device=phone] #bb-mobile-header{gap:6px;padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px));}}
html.bb-mobile-frame[data-device=phone] :is(.shell>.topbar,#bb-workspace-chrome) {display:none;}
html.bb-mobile-frame[data-device=phone] #app {box-sizing:border-box;padding-top:calc(var(--bb-mobile-top) + var(--bb-mobile-host-offset));height:100dvh;}
html.bb-mobile-frame[data-device=phone] .shell,html.bb-mobile-frame[data-device=phone] .shell.collapsed {
  grid-template-rows:minmax(0,1fr)!important;height:calc(100dvh - var(--bb-mobile-top) - var(--bb-mobile-bottom) - var(--bb-mobile-host-offset));
}
html.bb-mobile-frame[data-device=phone] .shell>.workspace {grid-row:1;}
html.bb-mobile-frame[data-device=phone] body.bb-tool-workspace {padding-top:calc(var(--bb-mobile-top) + var(--bb-mobile-host-offset));padding-bottom:var(--bb-mobile-bottom);}
html.bb-mobile-frame[data-device=phone] {scroll-padding-top:calc(var(--bb-mobile-top) + 12px);scroll-padding-bottom:calc(var(--bb-mobile-bottom) + 12px);}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav {
  box-sizing:border-box;display:grid;position:fixed;inset:auto 0 0;z-index:30;
  grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;height:var(--bb-mobile-bottom);
  padding:6px max(10px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));
  margin:0;border:0;border-top:1px solid var(--line);background:var(--chrome);box-shadow:none;
  font:400 14px/21px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav>button {
  box-sizing:border-box;appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  width:100%;height:56px;min-height:56px;min-width:0;margin:0;padding:6px 2px;
  border:0;border-radius:12px;background:transparent;color:var(--muted);box-shadow:none;
  font:400 11px/16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:center;letter-spacing:normal;text-transform:none;
}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav>button>span {font:inherit;white-space:nowrap;}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav>button>svg {
  box-sizing:border-box;display:block;flex:0 0 21px;width:21px;height:21px;margin:0;padding:0;
  fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;
}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav>button[aria-current=page] {font-weight:650;color:var(--accent);background:var(--subtle);}
html[data-device=phone] :is(#bb-phone-nav,.bb-tool-mobile).bb-mobile-nav>button:focus-visible {outline:2px solid var(--focus,var(--accent));outline-offset:-2px;}
html[data-device=phone] :is(#bb-phone-more,#bb-tool-menu).bb-workspace-menu {padding:0;width:calc(100vw - 20px);max-width:600px;max-height:calc(100dvh - 24px);border:1px solid var(--line);border-radius:18px;color:var(--text);background:var(--surface);}
html[data-device=phone] .bb-workspace-menu>header {display:flex;align-items:center;justify-content:space-between;padding:18px;gap:12px;border-bottom:1px solid var(--line);}
html[data-device=phone] .bb-workspace-menu>header h2 {font-size:22px;line-height:1.2;margin:0;}
html[data-device=phone] .bb-workspace-menu>header button {position:static;min-height:44px;margin:0;padding:8px 12px;}
html[data-device=phone] .bb-workspace-menu>.bb-phone-menu {padding:14px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;max-height:65dvh;overflow:auto;}
html[data-device=phone] .bb-workspace-menu .bb-phone-menu :is(button,a) {min-height:60px;text-align:left;border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--text);padding:12px;font-size:14px;}
html[data-device=phone] .bb-tool-menu-links {display:grid;gap:12px;}
html[data-device=phone] .bb-tool-menu-links :is(section,details) {margin:0;}
html[data-device=phone] .bb-tool-menu-links a {margin:8px 0 0;}
html[data-device=phone] .bb-tool-menu-links .bb-tool-brand {display:none;}
html.bb-mobile-frame[data-keyboard-open=true].bb-phone .shell {height:calc(100dvh - var(--bb-mobile-top) - var(--bb-mobile-host-offset));}
/* WebKit can expose the native session option's intrinsic width at large text sizes. */
html[data-device=phone] #cash-app .cash-toolbar>label {min-width:0;max-width:100%;overflow:hidden;}
html[data-device=phone] #cash-app .cash-toolbar>label>select {width:100%;min-width:0;max-width:100%;text-overflow:ellipsis;}
html[data-device=phone] #cash-app .cash-toolbar>label>select:focus-visible {outline-offset:-3px;}
