body[data-cgb-accounts-enabled="true"] #my-cgb-surface[hidden] {
  display: none !important;
}

body[data-command-surface="my-cgb"] #map-fallback.map-fallback--loading {
  display: none !important;
}

.venue-tray[data-my-cgb-open="true"] {
  overflow: hidden;
}

.venue-tray[data-my-cgb-open="true"] > :not(#my-cgb-surface) {
  display: none !important;
}

.my-cgb-surface {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--brand-surface);
  -webkit-overflow-scrolling: touch;
}

.my-cgb-surface .accounts-shell {
  width: 100%;
  max-height: none;
  min-height: 100%;
  align-content: start;
  overflow: visible;
  padding: 20px;
  border: 0;
  border-radius: 0;
  background: var(--brand-surface);
  box-shadow: none;
}

.my-cgb-surface .accounts-header {
  position: sticky;
  z-index: 2;
  top: 0;
  margin: -20px -20px 0;
  border-radius: 0;
}

.my-cgb-surface .accounts-close {
  display: none !important;
}

.my-cgb-surface .accounts-provider-actions,
.my-cgb-surface .accounts-email-form {
  display: none !important;
}

.my-cgb-surface .my-cgb-sign-in {
  justify-self: start;
  min-height: 44px;
}

.my-cgb-surface .my-cgb-profile-section .accounts-profile-form {
  display: none !important;
}

.my-cgb-edit-profile {
  flex: 0 0 auto;
}

.my-cgb-desktop-add {
  display: none;
}

.accounts-dialog--profile .accounts-signed-in > :not(.my-cgb-profile-section),
.accounts-dialog--profile .accounts-signed-out,
.accounts-dialog--profile .accounts-connections {
  display: none !important;
}

.accounts-dialog--profile .my-cgb-profile-section {
  display: grid !important;
  padding-top: 0;
  border-top: 0;
}

.accounts-dialog--profile .my-cgb-edit-profile {
  display: none;
}

.accounts-dialog--profile .accounts-profile-form {
  display: grid !important;
}

.accounts-dialog--auth .accounts-signed-in {
  display: none !important;
}

.accounts-dialog--auth .my-cgb-sign-in {
  display: none !important;
}

body[data-cgb-accounts-enabled="true"] #mobile-about-button .ui-icon {
  stroke-width: 1.9;
}

@media (max-width: 899px) {
  .my-cgb-surface {
    background: var(--cgb-warm-50, #f7f6f2);
  }

  .my-cgb-surface .accounts-shell {
    gap: 0;
    padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    background: transparent;
  }

  .my-cgb-surface .accounts-header {
    margin: 0;
    padding: 0 0 14px;
    color: var(--cgb-navy-950, #010133);
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .my-cgb-surface .accounts-header h2 {
    margin: 0;
    color: var(--cgb-navy-950, #010133);
    font-family: var(--font-display, serif);
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1;
    text-transform: none;
  }

  .my-cgb-surface .my-cgb-profile-view {
    padding-top: 20px;
  }

  .my-cgb-surface .my-cgb-about-view .about-support {
    margin-top: -12px;
  }

  body[data-cgb-accounts-enabled="true"] .opening-stat[hidden] {
    display: none !important;
  }
}

@media (min-width: 900px) {
  body[data-cgb-accounts-enabled="true"] .mobile-command-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 56px;
    min-height: 56px;
  }

  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-list-button,
  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-map-button,
  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-about-button {
    position: relative;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    color: rgba(255, 255, 255, .88) !important;
    background: transparent !important;
    font-family: var(--font-condensed, sans-serif);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .025em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
  }

  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-list-button:hover:not(:disabled),
  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-map-button:hover:not(:disabled),
  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > #mobile-about-button:hover:not(:disabled) {
    color: var(--cgb-white, #fff) !important;
    background: rgba(255, 255, 255, .08) !important;
  }

  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > .mobile-command:focus-visible {
    color: var(--cgb-white, #fff) !important;
    background: rgba(255, 255, 255, .08) !important;
    outline: 2px solid var(--cgb-gold-400, #fdb515);
    outline-offset: -2px;
  }

  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > .mobile-command[aria-current="page"] {
    color: var(--cgb-white, #fff) !important;
    background: transparent !important;
    font-weight: 800;
  }

  body[data-cgb-accounts-enabled="true"] .mobile-command-bar > .mobile-command[aria-current="page"]::after {
    content: '';
    position: absolute;
    right: 14px;
    bottom: 1px;
    left: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--cgb-gold-400, #fdb515);
  }

  body[data-cgb-accounts-enabled="true"] #mobile-list-button {
    grid-column: 1;
  }

  body[data-cgb-accounts-enabled="true"] #mobile-map-button {
    grid-column: 2;
    border-right: 0;
    border-radius: 0;
  }

  body[data-cgb-accounts-enabled="true"] #mobile-add-button {
    display: none !important;
  }

  body[data-cgb-accounts-enabled="true"] #mobile-about-button {
    grid-row: 1;
    grid-column: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  body[data-cgb-accounts-enabled="true"] #mobile-about-button > .ui-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }

  /* Desktop Locations: keep the navy Browse controls fixed; only the white
     venue results region owns vertical scrolling. */
  body[data-cgb-accounts-enabled="true"] #tray-list {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .tray-list__header {
    position: static;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list #location-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .tray-list__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: start;
    column-gap: 16px;
    padding-bottom: 8px !important;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .tray-list__heading {
    display: contents;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .tray-list__heading > h2 {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .tray-list__intro {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  body[data-cgb-accounts-enabled="true"] #tray-list .list-location-toggle {
    grid-row: 3;
    grid-column: 2;
    align-self: end;
    justify-self: end;
    margin-top: 12px;
  }

  body[data-cgb-accounts-enabled="true"] .my-cgb-desktop-add {
    grid-row: 3;
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: max-content;
    min-height: 34px;
    margin-top: 12px;
    padding: 7px 11px;
    color: var(--cgb-white, #fff);
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: var(--radius-sm, 8px);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-cgb-accounts-enabled="true"] .my-cgb-desktop-add:hover,
  body[data-cgb-accounts-enabled="true"] .my-cgb-desktop-add:focus-visible {
    background: rgba(255, 255, 255, .08);
    border-color: var(--cgb-gold-400, #fdb515);
  }

  .my-cgb-desktop-add__mark {
    color: var(--cgb-gold-400, #fdb515);
    font-size: 1rem;
    font-weight: 900;
    line-height: .8;
  }

  .venue-tray[data-my-cgb-open="true"] {
    height: calc(100dvh - var(--header-height) - var(--footer-height) - 74px);
    max-height: none;
    overflow: hidden;
  }

  .my-cgb-surface {
    overflow: hidden;
  }

  .my-cgb-surface .accounts-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: stretch;
    gap: 0;
    overflow: hidden;
    /* Preserve the accepted 20px shell inset above/beside the fixed chrome. */
    padding: 20px 20px 0;
  }

  .my-cgb-surface .accounts-header {
    position: static;
    background: var(--cgb-navy-950, #010133);
  }

  .my-cgb-surface .my-cgb-view-tabs {
    margin-left: 0;
    margin-right: 0;
  }

  .my-cgb-surface .my-cgb-profile-view,
  .my-cgb-surface .public-community-panel,
  .my-cgb-surface .my-cgb-about-view {
    min-height: 0;
    margin-right: -20px;
    padding-right: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: 10px;
    padding-bottom: 36px;
  }
}
