/* You region gate R01: compact account workspace, one scroll owner, clear state. */
body.member-mode #profile.profile-view.active {
  padding-top: 32px !important;
}
body.member-mode #profile .member-profile-page-header {
  margin-bottom: 22px !important;
}
body.member-mode #profile .profile-hero-web {
  grid-template-columns: 72px minmax(0, 1fr) 220px !important;
  gap: 20px !important;
  min-height: 0 !important;
  margin-inline: 0 !important;
  padding: 22px 24px !important;
}
body.member-mode #profile .profile-hero-web .profile-avatar {
  width: 72px !important;
  height: 72px !important;
}
body.member-mode #profile .member-you-account-hub {
  gap: 0 !important;
  margin: 18px 0 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--bm-color-line) !important;
  border-radius: var(--bm-radius-panel) !important;
  background: var(--bm-color-surface) !important;
}
body.member-mode #profile .member-you-v11-heading {
  margin: 0 !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--bm-color-line) !important;
}
body.member-mode #profile .member-you-v11-groups {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.member-mode #profile .member-you-v11-group {
  border: 0 !important;
  border-radius: 0 !important;
}
body.member-mode #profile .member-you-v11-group + .member-you-v11-group {
  border-left: 1px solid var(--bm-color-line) !important;
}
body.member-mode #profile .member-you-v11-group > header {
  padding: 16px 20px 14px !important;
}
body.member-mode #profile .member-you-v11-row {
  min-height: 76px !important;
  padding: 14px 20px !important;
}
body.member-mode #profile .member-you-v11-row b,
body.member-mode #profile .member-you-v11-row strong {
  font-size: 15px !important;
  line-height: 21px !important;
}
body.member-mode #profile .member-you-v11-row small {
  font-size: 13px !important;
  line-height: 19px !important;
}

body:has(.member-you-v11-backdrop),
body.member-mode.member-you-v11-membership-open {
  overflow: hidden !important;
}
body.member-mode .member-you-v11-backdrop {
  align-items: center !important;
  overflow: hidden !important;
  overscroll-behavior: contain !important;
  padding: 20px !important;
}
body.member-mode .member-you-v11-modal {
  max-height: calc(100dvh - 40px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
}
body.member-mode .member-you-v11-modal .modal-close,
body.member-mode.member-you-v11-membership-open .upgrade-panel .close-upgrade {
  width: 44px !important;
  height: 44px !important;
  border: 1px solid var(--bm-color-line) !important;
  box-shadow: none !important;
  outline: 0 !important;
}
body.member-mode .member-you-v11-modal .modal-close:focus-visible,
body.member-mode.member-you-v11-membership-open .upgrade-panel .close-upgrade:focus-visible {
  outline: 3px solid rgba(10, 102, 255, .25) !important;
  outline-offset: 2px !important;
}
body.member-mode .member-you-v11-modal .eyebrow {
  font-size: 12px !important;
  line-height: 17px !important;
}
body.member-mode .member-you-v11-modal .modal-copy,
body.member-mode .member-you-v11-modal .you-settings-chooser-list small,
body.member-mode .member-you-v11-modal .credit-notice span {
  font-size: 14px !important;
  line-height: 21px !important;
}
body.member-mode .member-you-v11-modal--profile-editor .profile-save {
  position: static !important;
  min-height: 48px !important;
  margin-top: 20px !important;
}
body.member-mode .member-you-v11-modal--profile-editor .profile-editor-body {
  padding-bottom: 24px !important;
}
body.member-mode .member-you-v11-modal--chooser .you-settings-chooser-list button {
  grid-template-columns: minmax(0, 1fr) auto 20px !important;
  min-height: 82px !important;
}
body.member-mode .member-you-v11-modal--chooser .you-settings-chooser-list em {
  max-width: 18ch !important;
  color: var(--bm-color-action) !important;
  font: 700 13px / 18px var(--bm-font-sans) !important;
  font-style: normal !important;
  text-align: right !important;
}

body.member-mode .member-you-v11-modal--contact-card .contact-card-modal > header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 208px !important;
  align-items: start !important;
  gap: 28px !important;
}
body.member-mode .member-you-v11-modal--contact-card .contact-card-modal > header > div {
  min-width: 0 !important;
}
body.member-mode .member-you-v11-modal--contact-card .contact-qr-preview {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  align-self: start !important;
  transform: none !important;
}
body.member-mode .member-you-v11-modal--contact-card .contact-qr-preview .contact-qr-svg {
  position: static !important;
  flex: 0 0 auto !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

body.member-mode .member-you-v11-modal--notifications {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
}
body.member-mode .you-notification-workspace,
body.member-mode .you-notification-workspace form {
  display: grid !important;
  gap: 20px !important;
}
body.member-mode .you-notification-workspace .modal-copy {
  margin-bottom: 0 !important;
}
body.member-mode .notification-setting-list {
  overflow: hidden !important;
  border: 1px solid var(--bm-color-line) !important;
  border-radius: var(--bm-radius-panel) !important;
}
body.member-mode .notification-setting-row,
body.member-mode .notification-quiet-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 20px !important;
  min-height: 68px !important;
  padding: 13px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bm-color-line) !important;
  border-radius: 0 !important;
  background: var(--bm-color-surface) !important;
}
body.member-mode .notification-setting-row:last-child {
  border-bottom: 0 !important;
}
body.member-mode .notification-setting-row:last-child {
  min-height: 82px !important;
  padding-block: 16px !important;
}
body.member-mode .notification-setting-row > span,
body.member-mode .notification-quiet-row > span {
  display: grid !important;
  gap: 3px !important;
}
body.member-mode .notification-setting-row b,
body.member-mode .notification-quiet-row b {
  color: var(--bm-color-ink) !important;
  font: 700 15px / 21px var(--bm-font-sans) !important;
}
body.member-mode .notification-setting-row small,
body.member-mode .notification-quiet-row small {
  color: var(--bm-color-copy) !important;
  font: 400 13px / 19px var(--bm-font-sans) !important;
}
body.member-mode .notification-setting-row input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  accent-color: var(--bm-color-action) !important;
}
body.member-mode .notification-quiet-row {
  border: 1px solid var(--bm-color-line) !important;
  border-radius: var(--bm-radius-control) !important;
}
body.member-mode .notification-quiet-row input {
  width: 144px !important;
}
body.member-mode .you-notification-save {
  position: sticky !important;
  z-index: 2 !important;
  bottom: -44px !important;
  display: grid !important;
  gap: 8px !important;
  margin: 0 -44px -44px !important;
  padding: 14px 44px 22px !important;
  border-top: 1px solid var(--bm-color-line) !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 -10px 26px rgba(15, 23, 42, .05) !important;
}
body.member-mode .you-notification-save .form-status {
  margin: 0 !important;
  color: var(--bm-color-danger, #b42318) !important;
  font: 600 13px / 19px var(--bm-font-sans) !important;
}

body.member-mode .member-you-v11-modal--security .you-security-status > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
body.member-mode .member-you-v11-modal--security .you-security-footer .danger-button {
  flex: 0 0 auto !important;
  min-height: 44px !important;
  border: 1px solid rgba(180, 35, 24, .32) !important;
  background: #fff !important;
  color: #b42318 !important;
}

body.member-mode.member-you-v11-membership-open .upgrade-panel {
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  padding-bottom: 0 !important;
}
body.member-mode.member-you-v11-membership-open .upgrade-panel .plan-choice strong span {
  font-size: 13px !important;
  line-height: 19px !important;
  color: var(--bm-color-copy) !important;
  vertical-align: baseline !important;
}
body.member-mode.member-you-v11-membership-open .membership-purchase-footer {
  position: sticky !important;
  z-index: 3 !important;
  bottom: 0 !important;
  display: grid !important;
  gap: 10px !important;
  margin: 22px -44px 0 !important;
  padding: 16px 44px 22px !important;
  border-top: 1px solid var(--bm-color-line) !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 -10px 26px rgba(15, 23, 42, .06) !important;
}
body.member-mode.member-you-v11-membership-open .membership-purchase-footer #try-plus {
  min-height: 48px !important;
  margin: 0 !important;
}
body.member-mode.member-you-v11-membership-open .membership-purchase-footer #plus-disclosure {
  font-size: 14px !important;
  line-height: 19px !important;
  color: var(--bm-color-copy) !important;
}

body.member-mode .profile-photo-placeholder.has-photo {
  overflow: hidden !important;
  padding: 0 !important;
  background: var(--bm-color-surface-muted) !important;
}
body.member-mode .profile-photo-placeholder.has-photo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 30% !important;
}
body.member-mode.member-you-v11-membership-open .upgrade-panel > .plus-restore {
  min-height: 44px !important;
  margin: 12px auto 20px !important;
}

@media (max-width: 820px) {
  body.member-mode #profile.profile-view.active {
    padding: 22px 16px 112px !important;
  }
  body.member-mode #profile .profile-hero-web {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    margin: 0 !important;
    padding: 18px !important;
  }
  body.member-mode #profile .member-profile-visibility-snapshot {
    grid-column: 1 / -1 !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--bm-color-line) !important;
  }
  body.member-mode #profile .member-you-v11-heading {
    padding: 18px !important;
  }
  body.member-mode #profile .member-you-v11-groups {
    grid-template-columns: 1fr !important;
  }
  body.member-mode #profile .member-you-v11-group + .member-you-v11-group {
    border-top: 1px solid var(--bm-color-line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 620px) {
  body.member-mode .member-you-v11-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  body.member-mode .member-you-v11-modal {
    min-height: 0 !important;
    max-height: calc(100dvh - 10px) !important;
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom)) !important;
    scrollbar-gutter: auto !important;
  }
  body.member-mode .member-you-v11-modal--chooser .you-settings-chooser-list button {
    grid-template-columns: minmax(0, 1fr) 18px !important;
  }
  body.member-mode .member-you-v11-modal--chooser .you-settings-chooser-list em {
    grid-column: 1 !important;
    max-width: none !important;
    text-align: left !important;
  }
  body.member-mode .member-you-v11-modal--contact-card .contact-card-modal > header {
    grid-template-columns: 1fr !important;
  }
  body.member-mode .member-you-v11-modal--contact-card .contact-qr-preview {
    width: 176px !important;
    min-height: 176px !important;
    margin-inline: auto !important;
  }
  body.member-mode .member-you-v11-modal--contact-card .contact-qr-preview .contact-qr-svg {
    width: 152px !important;
    height: 152px !important;
  }
  body.member-mode .notification-setting-row,
  body.member-mode .notification-quiet-row {
    min-height: 64px !important;
    padding: 12px 14px !important;
  }
  body.member-mode .notification-setting-row:last-child {
    min-height: 82px !important;
    padding-block: 12px !important;
  }
  body.member-mode .notification-quiet-row {
    grid-template-columns: 1fr !important;
  }
  body.member-mode .notification-quiet-row input {
    width: 100% !important;
  }
  body.member-mode .you-notification-save {
    bottom: calc(-28px - env(safe-area-inset-bottom)) !important;
    margin: 0 -20px calc(-28px - env(safe-area-inset-bottom)) !important;
    padding: 12px 20px calc(18px + env(safe-area-inset-bottom)) !important;
  }
  body.member-mode .member-you-v11-modal--security .you-security-footer {
    align-items: stretch !important;
  }
  body.member-mode.member-you-v11-membership-open .membership-purchase-footer {
    margin-inline: -20px !important;
    padding: 14px 20px calc(18px + env(safe-area-inset-bottom)) !important;
  }
  body.member-mode.member-you-v11-membership-open .membership-purchase-footer #plus-disclosure {
    max-width: 32ch !important;
    margin-inline: auto !important;
    text-align: center !important;
  }
}

/* R02 notification surface: one scroll owner, with a non-overlapping action rail. */
body.member-mode .member-you-v11-modal--notifications {
  overflow: hidden !important;
  display: block !important;
}
body.member-mode .member-you-v11-modal--notifications .you-notification-workspace {
  min-height: 0 !important;
  max-height: calc(100dvh - 96px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 16px !important;
}
body.member-mode .member-you-v11-modal--notifications #notification-preferences-form {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 0 !important;
  overflow: hidden !important;
}
body.member-mode .member-you-v11-modal--notifications .you-notification-scroll {
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 20px !important;
  padding: 0 2px 18px 0 !important;
}
body.member-mode .member-you-v11-modal--notifications .notification-setting-list,
body.member-mode .member-you-v11-modal--notifications .notification-quiet-row,
body.member-mode .member-you-v11-modal--notifications .credit-notice {
  flex: 0 0 auto !important;
}
body.member-mode .member-you-v11-modal--notifications .you-notification-save {
  position: static !important;
  z-index: auto !important;
  margin: 0 -44px 0 !important;
  padding: 14px 44px 16px !important;
  border-top: 1px solid var(--bm-color-line) !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 -10px 26px rgba(15, 23, 42, .05) !important;
}
body.member-mode .member-you-v11-modal .modal-close:focus:not(:focus-visible),
body.member-mode.member-you-v11-membership-open .upgrade-panel .close-upgrade:focus:not(:focus-visible) {
  outline: 0 !important;
  box-shadow: none !important;
}
@media (max-width: 620px) {
  body.member-mode .member-you-v11-modal--notifications .you-notification-workspace {
    max-height: calc(100dvh - 76px) !important;
  }
  body.member-mode .member-you-v11-modal--notifications .you-notification-save {
    margin: 0 -20px 0 !important;
    padding: 12px 20px max(18px, env(safe-area-inset-bottom)) !important;
  }
}
