/* GUARDEER PRIME r363 — narrow-phone terminal layout containment.
 * Keeps the two mobile command rows independent and horizontally scrollable.
 */
@media (max-width: 720px) {
  body.terminal-active .gp-mobile-quick-rail,
  body.gp-terminal-active .gp-mobile-quick-rail,
  body.terminal-active .gp-mobile-action-dock,
  body.gp-terminal-active .gp-mobile-action-dock {
    position: relative !important;
    inset: auto !important;
    z-index: 40 !important;
    display: flex !important;
    flex: 0 0 48px !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none !important;
    touch-action: pan-x;
  }

  body.terminal-active .gp-mobile-quick-rail::-webkit-scrollbar,
  body.gp-terminal-active .gp-mobile-quick-rail::-webkit-scrollbar,
  body.terminal-active .gp-mobile-action-dock::-webkit-scrollbar,
  body.gp-terminal-active .gp-mobile-action-dock::-webkit-scrollbar {
    display: none !important;
  }

  body.terminal-active .gp-mobile-quick-rail > button,
  body.terminal-active .gp-mobile-quick-rail > a,
  body.gp-terminal-active .gp-mobile-quick-rail > button,
  body.gp-terminal-active .gp-mobile-quick-rail > a,
  body.terminal-active .gp-mobile-action-dock > button,
  body.terminal-active .gp-mobile-action-dock > a,
  body.gp-terminal-active .gp-mobile-action-dock > button,
  body.gp-terminal-active .gp-mobile-action-dock > a {
    position: relative !important;
    inset: auto !important;
    z-index: 0 !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transform: none !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    font-size: 11px !important;
    line-height: 1 !important;
    scroll-snap-align: start;
  }

  body.terminal-active .gp-mobile-quick-rail > .gp-mobile-prime-tools-trigger,
  body.gp-terminal-active .gp-mobile-quick-rail > .gp-mobile-prime-tools-trigger,
  body.terminal-active .gp-mobile-action-dock > .gp-mobile-prime-tools-trigger,
  body.gp-terminal-active .gp-mobile-action-dock > .gp-mobile-prime-tools-trigger,
  body.terminal-active .gp-mobile-quick-rail > .gp-kairi-route-link,
  body.gp-terminal-active .gp-mobile-quick-rail > .gp-kairi-route-link {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  body.terminal-active .gp-mobile-quick-rail > * > span,
  body.gp-terminal-active .gp-mobile-quick-rail > * > span,
  body.terminal-active .gp-mobile-action-dock > * > span,
  body.gp-terminal-active .gp-mobile-action-dock > * > span {
    position: static !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    transform: none !important;
    line-height: 1 !important;
  }

  body.terminal-active .chart-container > .timeframes,
  body.gp-terminal-active .chart-container > .timeframes {
    position: relative !important;
    z-index: 30 !important;
    display: flex !important;
    flex: 0 0 48px !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 5px 6px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.terminal-active .timeframes__scroll,
  body.gp-terminal-active .timeframes__scroll {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.terminal-active .timeframes__scroll > .timeframe-btn,
  body.gp-terminal-active .timeframes__scroll > .timeframe-btn,
  body.terminal-active .timeframes__scroll > .timeframes__divider,
  body.gp-terminal-active .timeframes__scroll > .timeframes__divider {
    display: none !important;
  }

  body.terminal-active #timeframes-tools.gp-minimal-chart-toolbar,
  body.gp-terminal-active #timeframes-tools.gp-minimal-chart-toolbar,
  body.terminal-active #timeframes .timeframes__tools,
  body.gp-terminal-active #timeframes .timeframes__tools {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
  }

  body.terminal-active #timeframes-tools::-webkit-scrollbar,
  body.gp-terminal-active #timeframes-tools::-webkit-scrollbar {
    display: none !important;
  }

  body.terminal-active #timeframes-tools .tv-top-tool,
  body.gp-terminal-active #timeframes-tools .tv-top-tool {
    position: static !important;
    flex: 0 0 auto !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transform: none !important;
    white-space: nowrap !important;
  }

  body.terminal-active #timeframes-tools [data-tv-action="toggleFullscreenChart"],
  body.gp-terminal-active #timeframes-tools [data-tv-action="toggleFullscreenChart"] {
    position: static !important;
    inset: auto !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    margin-left: auto !important;
  }

  body.terminal-active #timeframe-select,
  body.gp-terminal-active #timeframe-select {
    position: static !important;
    display: block !important;
    flex: 0 0 78px !important;
    order: 2 !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 360px) {
  body.terminal-active .gp-mobile-quick-rail > button,
  body.terminal-active .gp-mobile-quick-rail > a,
  body.gp-terminal-active .gp-mobile-quick-rail > button,
  body.gp-terminal-active .gp-mobile-quick-rail > a,
  body.terminal-active .gp-mobile-action-dock > button,
  body.terminal-active .gp-mobile-action-dock > a,
  body.gp-terminal-active .gp-mobile-action-dock > button,
  body.gp-terminal-active .gp-mobile-action-dock > a {
    padding-inline: 9px !important;
    font-size: 10px !important;
  }

  body.terminal-active #timeframe-select,
  body.gp-terminal-active #timeframe-select {
    flex-basis: 70px !important;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
  }
}

/* MOBILE DASHBOARD RAIL FIX 20260913 BEGIN */
/* prime-mobile-dashboard-layout-20260913-001
 * A desktop-width phone/tablet must reserve the drawing column. The earlier
 * gp-v258 resize lock has two body classes and otherwise beats the wide-touch
 * grid rule. Match that specificity here, for either pointer type, without
 * changing the <=920px phone layout or the >=1181px desktop layout.
 * Short windows scroll the terminal instead of clipping its drawing controls.
 */
@media (min-width: 921px) and (max-width: 1180px) {
  body.terminal-active.gp-dashboard-chart-mode #app,
  body.gp-terminal-active.gp-dashboard-chart-mode #app {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-template-rows: auto max-content minmax(440px, 1fr) !important;
    align-items: stretch !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 0 6px 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.terminal-active.gp-dashboard-chart-mode #app .header,
  body.gp-terminal-active.gp-dashboard-chart-mode #app .header {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    /* A legacy short-window rule permits wrapping inside a fixed 48px header.
       Keep utilities in the same row and let its real content reserve height. */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    height: auto !important;
    max-height: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.terminal-active.gp-dashboard-chart-mode #app .header__logo,
  body.gp-terminal-active.gp-dashboard-chart-mode #app .header__logo {
    /* Keep the logo; its existing ellipsis can shorten the brand text before
       the paid header's scrolling command strip collapses to zero width. */
    flex: 0 1 auto !important;
    min-width: 42px !important;
  }

  body.terminal-active.gp-dashboard-chart-mode #app .header__logo span,
  body.gp-terminal-active.gp-dashboard-chart-mode #app .header__logo span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-step44-header-nav,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-step44-header-nav {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex: 1 1 auto !important;
    min-width: 72px !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-step44-header-nav__btn,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-step44-header-nav__btn {
    flex: 0 0 auto !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-terminal-side,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-terminal-side {
    grid-column: 1 !important;
    grid-row: 2 / 4 !important;
    display: block !important;
    position: relative !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-terminal-side > nav,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-terminal-side > nav,
  body.terminal-active.gp-dashboard-chart-mode .gp-terminal-side > .gp-plan-card,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-terminal-side > .gp-plan-card,
  body.terminal-active.gp-dashboard-chart-mode .gp-mobile-quick-rail,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-mobile-quick-rail,
  body.terminal-active.gp-dashboard-chart-mode .gp-mobile-action-dock,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-mobile-action-dock,
  body.terminal-active.gp-dashboard-chart-mode .bottom-nav,
  body.gp-terminal-active.gp-dashboard-chart-mode .bottom-nav {
    display: none !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-terminal-side > .gp-draw-tv-rail.gp-step44-docked,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-terminal-side > .gp-draw-tv-rail.gp-step44-docked {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    right: auto !important;
    bottom: auto !important;
    box-sizing: border-box !important;
    width: 48px !important;
    max-width: 48px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    z-index: 360 !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-market-overview,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-market-overview {
    grid-column: 2 !important;
    grid-row: 2 !important;
    /* The selector card itself has a 258px minimum; a 132px track lets the
       following price card intercept its Gold button and instrument select. */
    grid-template-columns: minmax(258px, 1.6fr) repeat(6, minmax(132px, 1fr)) !important;
    grid-template-rows: minmax(min-content, auto) !important;
    /* A short-window 64px height clips the selector's final row. Reserve its
       intrinsic height while keeping the metric strip horizontally scrollable. */
    height: auto !important;
    min-height: min-content !important;
    max-height: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .gp-market-overview > .gp-overview-market--switch,
  body.gp-terminal-active.gp-dashboard-chart-mode .gp-market-overview > .gp-overview-market--switch {
    height: auto !important;
    min-height: min-content !important;
    max-height: none !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .main,
  body.gp-terminal-active.gp-dashboard-chart-mode .main {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .chart-container,
  body.gp-terminal-active.gp-dashboard-chart-mode .chart-container {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }

  body.terminal-active.gp-dashboard-chart-mode .chart-area,
  body.gp-terminal-active.gp-dashboard-chart-mode .chart-area,
  body.terminal-active.gp-dashboard-chart-mode #chart-area,
  body.gp-terminal-active.gp-dashboard-chart-mode #chart-area {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
  }
}
/* MOBILE DASHBOARD RAIL FIX 20260913 END */

/* MOBILE PROFILE LOGOUT 20260913 BEGIN */
/* Keep the existing Settings / Logout control reachable without the desktop
 * sidebar. Its original session checks, click handler and logout flow are used. */
@media (max-width: 980px) {
  #gp-profile-dialog.gp-profile-overlay {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)) !important;
    overflow: hidden !important;
  }

  #gp-profile-dialog .gp-profile-dashboard {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  #gp-profile-dialog .gp-profile-content {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    gap: 14px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 54px 14px 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #gp-profile-dialog .gp-profile-content > .gp-tab-panel {
    flex: 0 0 auto !important;
  }

  #gp-profile-dialog .gp-tab-panel[data-panel="settings"] {
    display: flex !important;
    flex-direction: column !important;
    order: -1 !important;
  }

  #gp-profile-dialog [data-panel="settings"] [data-action="logout"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 320px !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    white-space: normal !important;
  }

  #gp-profile-dialog .gp-profile-close {
    top: 8px !important;
    right: 8px !important;
    z-index: 5 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
}
/* MOBILE PROFILE LOGOUT 20260913 END */

/* MOBILE VISIT PROFILE 20260913 BEGIN */
/* Use the existing signed-in widget and original profile-open handler. The
 * phone header already reserves column 3 / row 2; hide only the small duplicate
 * avatar so the full Visit profile label fits next to Clean Chart. */
@media (max-width: 920px) {
  body.gp-user-signed-in.terminal-active #app .header,
  body.gp-user-signed-in.gp-terminal-active #app .header {
    /* Some tablet widths show Alerts as well as Fullscreen. Reserve the actual
     * utility width instead of allowing a 42px track to spill into the profile. */
    grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr) max-content !important;
    grid-template-rows: minmax(38px, auto) minmax(44px, auto) !important;
    height: auto !important;
    max-height: none !important;
  }

  body.gp-user-signed-in.terminal-active #app .header .header__controls,
  body.gp-user-signed-in.gp-terminal-active #app .header .header__controls {
    grid-column: 4 !important;
    grid-row: 2 !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
    width: max-content !important;
    min-width: 42px !important;
    max-width: none !important;
    justify-self: end !important;
  }

  body.gp-user-signed-in.terminal-active #app .header #gp-auth-widget.gp-auth-header-inline,
  body.gp-user-signed-in.gp-terminal-active #app .header #gp-auth-widget.gp-auth-header-inline {
    display: inline-flex !important;
    position: static !important;
    inset: auto !important;
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body.gp-user-signed-in #app .header #gp-auth-widget.gp-auth-header-inline .gp-auth-card,
  body.gp-user-signed-in #app .header #gp-auth-widget.gp-auth-header-inline .gp-auth-actions {
    display: flex !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.gp-user-signed-in #app .header #gp-auth-widget.gp-auth-header-inline .gp-profile-avatar {
    display: none !important;
  }

  body.gp-user-signed-in #app .header #gp-auth-widget.gp-auth-header-inline .gp-auth-profile-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  body.gp-user-signed-in #app .header #gp-auth-widget .gp-auth-profile-btn:focus-visible,
  #gp-profile-dialog [data-action="logout"]:focus-visible {
    outline: 2px solid #55f6bc !important;
    outline-offset: 2px !important;
  }
}

@media (max-width: 360px) {
  body.gp-user-signed-in #app .header #gp-auth-widget.gp-auth-header-inline .gp-auth-profile-btn {
    padding-inline: 4px !important;
    font-size: 11px !important;
  }
}
/* MOBILE VISIT PROFILE 20260913 END */

/* MOBILE HEADER ACTIONS 20260930 BEGIN
 * The originals remain mounted for native auth / Clean Chart handlers. Hide
 * the header copies only after their quick-rail shortcuts are ready. */
@media (max-width: 920px) {
  body.gp-mobile-profile-rail-ready.terminal-active #app .header,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header {
    display: grid !important;
    grid-template-columns: 38px minmax(0, max-content) minmax(0, 1fr) max-content !important;
    grid-template-rows: 44px !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 5px 8px !important;
  }

  body.gp-mobile-profile-rail-ready.terminal-active #app .header #gp-auth-widget.gp-auth-header-inline,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header #gp-auth-widget.gp-auth-header-inline,
  body.gp-mobile-profile-rail-ready.terminal-active #app .header #gp-clean-chart-head-btn,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header #gp-clean-chart-head-btn {
    display: none !important;
  }

  body.gp-mobile-profile-rail-ready.terminal-active #app .header .header__logo,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header .header__logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px !important;
    min-width: 0 !important;
    max-width: 38px !important;
    margin: 0 !important;
  }

  body.gp-mobile-profile-rail-ready.terminal-active #app .header #exchange-selector,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header #exchange-selector {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.gp-mobile-profile-rail-ready.terminal-active #app .header #symbol-selector,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header #symbol-selector {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.gp-mobile-profile-rail-ready.terminal-active #app .header .header__controls,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header .header__controls {
    grid-column: 4 !important;
    grid-row: 1 !important;
    align-self: center !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* External charts use their own symbol label, not the hidden native market. */
  body.gp-mobile-profile-rail-ready.terminal-active #app .header .gp-integrated-header-symbol,
  body.gp-mobile-profile-rail-ready.gp-terminal-active #app .header .gp-integrated-header-symbol {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.terminal-active #app .gp-mobile-profile-shortcut,
  body.gp-terminal-active #app .gp-mobile-profile-shortcut {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    color: #04232b !important;
    background: linear-gradient(105deg, #08c9ed, #00e3a2) !important;
    border: 1px solid #10d9bf !important;
    font-weight: 800 !important;
  }

  body.terminal-active #app .gp-mobile-profile-shortcut:focus-visible,
  body.gp-terminal-active #app .gp-mobile-profile-shortcut:focus-visible {
    outline: 2px solid #d8fff4 !important;
    outline-offset: -3px !important;
  }
}

/* Rail button rules use !important; honor signed-out hidden state explicitly. */
body #app .gp-mobile-profile-shortcut[hidden] {
  display: none !important;
}
/* MOBILE HEADER ACTIONS 20260930 END */
