/* Bizarre Tales account center: focused pages and accessible header menus */
.header-popover { position: relative; }
.header-social .header-control {
  position: relative;
  min-width: 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 17%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 36%, transparent);
  color: color-mix(in srgb, var(--ink) 60%, var(--muted));
  cursor: pointer;
}
.header-social .header-control:hover,
.header-social .header-control:focus-visible,
.header-social .header-control[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}
.header-social .header-control:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.header-social .header-control svg { width: 1rem; height: 1rem; fill: currentColor; }
.header-account-trigger img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.header-popover-panel[hidden] { display: none !important; }
.header-social .header-popover-panel a {
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.header-social .header-account-menu > a { width: 100%; justify-content: flex-start; }
.header-social .header-notification-list > a { justify-content: stretch; }
.header-social .header-notifications-all { width: 100%; justify-content: center; }
.header-popover-panel {
  position: absolute;
  top: calc(100% + .65rem);
  right: 0;
  z-index: 10020;
  width: min(20rem, calc(100vw - 1rem));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, var(--accent) 6%);
  isolation: isolate;
  opacity: 1;
  backdrop-filter: none;
  color: var(--ink);
  box-shadow: 0 20px 55px rgba(0,0,0,.58);
}
.header-account-popover .header-popover-panel { right: -2.6rem; width: min(17rem, calc(100vw - 1rem)); }
.header-account-identity { display: grid; gap: .18rem; padding: .9rem; border-bottom: 1px solid var(--line); }
.header-account-identity strong { color: var(--paper); font-family: var(--serif); font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
.header-account-identity span { color: var(--dim); font-size: .68rem; overflow-wrap: anywhere; }
.header-account-menu > a,
.header-account-menu form button,
.header-notifications-all {
  width: 100%;
  min-height: 2.85rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .85rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}
.header-account-menu > a svg { width: 1rem; height: 1rem; flex: 0 0 auto; fill: var(--teal); }
.header-account-menu form { margin: 0; }
.header-account-menu form button { border-bottom: 0; color: var(--muted); }
.header-account-menu > a:hover,
.header-account-menu > a:focus-visible,
.header-account-menu form button:hover,
.header-account-menu form button:focus-visible,
.header-notifications-all:hover,
.header-notifications-all:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--paper); outline: 0; }
.header-notifications-menu { width: min(23rem, calc(100vw - 1rem)); }
.header-notifications-menu > header { min-height: 3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem; border-bottom: 1px solid var(--line-strong); }
.header-notifications-menu > header strong { color: var(--paper); font-family: var(--serif); font-size: 1rem; font-weight: 500; }
.header-notifications-menu > header span { color: var(--teal); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.header-notification-list { max-height: min(22rem, 55vh); overflow-y: auto; }
.header-notification-list > a { position: relative; min-height: 3.65rem; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .7rem; padding: .7rem .85rem .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.header-notification-list > a.is-unread::before { content: ""; position: absolute; left: .38rem; top: 50%; width: .34rem; height: .34rem; border-radius: 50%; background: var(--teal); transform: translateY(-50%); }
.header-notification-list > a span { color: var(--paper); font-size: .72rem; font-weight: 700; line-height: 1.35; }
.header-notification-list > a time { color: var(--dim); font-size: .6rem; white-space: nowrap; }
.header-notification-list > a:hover,
.header-notification-list > a:focus-visible { background: color-mix(in srgb, var(--accent) 8%, transparent); outline: 0; }
.header-notification-list > p { margin: 0; padding: 1.2rem .9rem; color: var(--dim); font-size: .75rem; text-align: center; }
.header-notifications-all { justify-content: center; border-bottom: 0; color: var(--teal); font-size: .7rem; letter-spacing: .04em; }
.header-notification-badge { position: absolute; top: -.38rem; right: -.42rem; min-width: 1.25rem; height: 1.25rem; display: grid; place-items: center; padding: 0 .25rem; border: 2px solid var(--black); border-radius: 999px; background: var(--teal); color: var(--black); font-size: .56rem; font-weight: 900; line-height: 1; }
.drawer-account-access { display: grid; grid-template-columns: 1fr; gap: .45rem; }

.account-center-shell { min-height: calc(100svh - 4.5rem); background: var(--void); color: var(--ink); }
.account-center-inner { max-width: 72rem; }
.account-center-header { display: grid; grid-template-columns: 4.4rem minmax(0,1fr); align-items: center; gap: .85rem; padding: .65rem 0 1.1rem; border-bottom: 1px solid var(--line-strong); }
.account-center-header-simple { grid-template-columns: minmax(0,1fr); padding-top: .85rem; }
.account-center-heading { min-width: 0; }
.account-center-heading h1 { margin: 0; color: var(--paper); font-family: var(--serif); font-size: clamp(2.35rem, 12vw, 4.6rem); font-weight: 450; letter-spacing: -.045em; line-height: .95; }
.account-center-heading p { max-width: 46rem; margin: .55rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.account-center-header .account-avatar-frame { width: 4.4rem; }
.account-center-header-action { grid-column: 1 / -1; width: 100%; }
.account-profile-identity { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 0 .1rem; }
.account-profile-identity > div { min-width: 0; display: grid; gap: .15rem; }
.account-profile-identity strong { color: var(--paper); font-family: var(--serif); font-size: 1.12rem; font-weight: 500; overflow-wrap: anywhere; }
.account-profile-identity span:not(.account-verified-badge) { color: var(--dim); font-size: .7rem; overflow-wrap: anywhere; }
.account-center-section { margin-top: 1.25rem; padding: 1.1rem 0 0; border-top: 1px solid var(--line-strong); }
.account-center-section > header { margin-bottom: 1rem; }
.account-center-section > header h2,
.account-center-section > div > h2,
.account-center-section > h2 { margin: 0; color: var(--paper); font-family: var(--serif); font-size: clamp(1.45rem, 7vw, 2.15rem); font-weight: 450; line-height: 1.05; }
.account-center-section > header p,
.account-center-section > div > p,
.account-center-section > p { max-width: 48rem; margin: .45rem 0 0; color: var(--dim); font-size: .76rem; line-height: 1.55; }
.account-center-section .account-form { max-width: 52rem; }
.account-center-section .account-form > .button { width: 100%; }
.account-center-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; padding: 1rem 0 0; }
.account-center-actions .button { min-width: 0; min-height: 3rem; gap: .45rem; padding-inline: .6rem; }
.account-center-actions svg { width: 1rem; height: 1rem; flex: 0 0 auto; fill: currentColor; }
.account-network-search { margin-top: 1rem; padding: .9rem; border: 1px solid var(--line); background: var(--black); }
.account-network-search > label { display: block; margin-bottom: .45rem; color: var(--paper); font-size: .76rem; font-weight: 800; }
.account-network-search > div { display: grid; grid-template-columns: minmax(0,1fr) 3rem; }
.account-network-search input { min-width: 0; height: 3rem; padding: 0 .8rem; border: 1px solid var(--line-strong); border-right: 0; border-radius: 0; background: var(--void); color: var(--paper); font: inherit; }
.account-network-search button { display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--panel); color: var(--teal); cursor: pointer; }
.account-network-search button svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.account-network-search input:focus,
.account-network-search button:focus-visible { border-color: var(--teal); outline: 1px solid var(--teal); outline-offset: 1px; }
.account-network-search > p { margin: .45rem 0 0; color: var(--dim); font-size: .66rem; }
.account-network-person { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; border: 1px solid var(--line); background: var(--black); }
.account-network-person > a { min-width: 0; min-height: 3.5rem; display: flex; align-items: center; gap: .6rem; padding: .65rem; color: var(--paper); text-decoration: none; }
.account-network-person > a > svg { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: var(--teal); }
.account-network-person > a span { min-width: 0; display: grid; gap: .12rem; }
.account-network-person > a strong { overflow-wrap: anywhere; font-size: .78rem; }
.account-network-person > a small { color: var(--dim); font-size: .6rem; }
.account-network-person form { padding-right: .5rem; }
.account-network-person form button { min-height: 2.5rem; padding: .45rem .55rem; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: .62rem; text-decoration: underline; text-underline-offset: .2em; }
.account-network-person form button:hover,
.account-network-person form button:focus-visible { color: var(--paper); }
.account-outgoing-requests { margin-top: 1rem; }
.account-outgoing-requests h3 { margin: 0 0 .45rem; color: var(--paper); font-size: .82rem; }
.account-outgoing-requests a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; text-decoration: none; }
.account-outgoing-requests small { color: var(--dim); text-transform: uppercase; }
.account-owner-claim form { display: grid; gap: .55rem; max-width: 34rem; }
.account-owner-claim label { color: var(--muted); font-size: .7rem; }
.account-owner-claim input { min-height: 3rem; padding: .65rem .75rem; border: 1px solid var(--line); background: var(--black); color: var(--paper); }

.achievement-progress { margin-top: 1rem; padding: .9rem; border: 1px solid var(--line); background: var(--black); }
.achievement-progress > div { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; }
.achievement-progress strong { color: var(--paper); font-size: .8rem; }
.achievement-progress span { color: var(--dim); font-size: .68rem; }
.achievement-progress progress { width: 100%; height: .55rem; display: block; border: 0; background: var(--panel); accent-color: var(--teal); }
.achievement-progress progress::-webkit-progress-bar { background: var(--panel); }
.achievement-progress progress::-webkit-progress-value { background: var(--teal); }
.achievement-progress progress::-moz-progress-bar { background: var(--teal); }
.achievement-catalog { display: grid; gap: .6rem; margin-top: 1rem; }
.achievement-catalog-card { min-width: 0; display: grid; grid-template-columns: 2.6rem minmax(0,1fr); gap: .7rem; padding: .85rem; border: 1px solid var(--line); background: var(--black); }
.achievement-catalog-icon { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border: 1px solid var(--line); color: var(--dim); }
.achievement-catalog-icon svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.achievement-catalog-card.is-unlocked { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.achievement-catalog-card.is-unlocked .achievement-catalog-icon { border-color: var(--teal); color: var(--teal); }
.achievement-catalog-title { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; }
.achievement-catalog-title h2 { margin: 0; color: var(--paper); font-family: var(--serif); font-size: 1rem; font-weight: 500; }
.achievement-catalog-title span { color: var(--dim); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.achievement-catalog-card.is-unlocked .achievement-catalog-title span { color: var(--teal); }
.achievement-catalog-card p { margin: .3rem 0 0; color: var(--dim); font-size: .7rem; line-height: 1.45; }
.achievement-catalog-card time { display: block; margin-top: .45rem; color: var(--muted); font-size: .6rem; }

.account-preferences-row,
.account-danger-zone { display: grid; gap: .8rem; align-items: center; }
.account-settings-grid { display: grid; gap: 0; }
.account-provider-row { max-width: 52rem; }
.account-provider-row > .button { justify-self: start; }
.account-danger-zone .account-logout-form { margin: 0; text-align: left; }

.account-notifications-section { padding-top: 1rem; }
.account-notifications-section > header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.account-notifications-section > header p { flex: 0 0 auto; margin: 0; }
.account-notifications-page-list { border-top: 1px solid var(--line); }
.account-notifications-page-list > a { min-height: 4.6rem; display: grid; grid-template-columns: 2rem minmax(0,1fr) 1.1rem; align-items: center; gap: .7rem; padding: .75rem .15rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.account-notifications-page-list > a:hover,
.account-notifications-page-list > a:focus-visible { background: color-mix(in srgb, var(--accent) 6%, transparent); outline: 0; }
.account-notification-icon { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--line); color: var(--teal); }
.account-notification-icon svg,
.account-notification-arrow svg { width: 1rem; height: 1rem; fill: currentColor; }
.account-notification-copy { min-width: 0; display: grid; gap: .14rem; }
.account-notification-copy small { color: var(--teal); font-size: .56rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.account-notification-copy strong { color: var(--paper); font-size: .76rem; line-height: 1.35; }
.account-notification-copy time { color: var(--dim); font-size: .6rem; }
.account-notification-arrow { color: var(--dim); }
.account-notifications-empty { padding: 2.5rem .5rem; text-align: center; }
.account-notifications-empty h3 { margin: 0; color: var(--paper); font-family: var(--serif); font-weight: 500; }
.account-notifications-empty p { margin: .4rem 0 0; color: var(--dim); font-size: .72rem; }
.account-center-moderation .moderation-section { padding: 1.1rem 0 0; background: transparent; }
.account-center-moderation .moderation-section > header h2 { font-size: clamp(1.45rem, 7vw, 2.15rem); }

html[data-mode="1999"] .header-social .header-control,
html[data-mode="1999"] .header-popover-panel {
  border: 2px outset var(--1999-border) !important;
  border-radius: 0 !important;
  background: var(--1999-surface) !important;
  color: var(--1999-link) !important;
  box-shadow: 3px 3px 0 #000 !important;
}
html[data-mode="1999"] .header-popover-panel :where(a,button) { color: var(--1999-link) !important; text-decoration: underline !important; }
html[data-mode="1999"] .header-account-identity,
html[data-mode="1999"] .header-notifications-menu > header,
html[data-mode="1999"] .header-notification-list > a { border-color: var(--1999-border) !important; }
html[data-mode="1999"] .header-account-identity strong,
html[data-mode="1999"] .header-notifications-menu > header strong,
html[data-mode="1999"] .header-notification-list > a span { color: var(--1999-ink) !important; }
html[data-mode="1999"] .account-center-shell { background: var(--1999-bg) !important; color: var(--1999-ink) !important; }
html[data-mode="1999"] .account-center-header,
html[data-mode="1999"] .account-center-section { border-color: var(--1999-border) !important; }
html[data-mode="1999"] :where(.account-network-search,.account-network-person,.achievement-progress,.achievement-catalog-card,.account-notification-icon) { border: 2px outset var(--1999-border) !important; background: var(--1999-surface) !important; color: var(--1999-ink) !important; box-shadow: none !important; }
html[data-mode="1999"] :where(.account-center-heading h1,.account-center-section h2,.account-profile-identity strong,.achievement-catalog-title h2,.account-notification-copy strong) { color: var(--1999-ink) !important; }
html[data-mode="1999"] :where(.account-center-heading p,.account-center-section p,.achievement-catalog-card p,.account-notification-copy time) { color: var(--1999-muted) !important; }
html[data-mode="1999"] .achievement-progress progress::-webkit-progress-value { background: var(--1999-accent); }
html[data-mode="1999"] .achievement-progress progress::-moz-progress-bar { background: var(--1999-accent); }

@media (min-width: 42.5rem) {
  .account-center-header { grid-template-columns: 5.5rem minmax(0,1fr) auto; gap: 1.1rem; }
  .account-center-header-simple { grid-template-columns: minmax(0,1fr); }
  .account-center-header .account-avatar-frame { width: 5.5rem; }
  .account-center-header-action { grid-column: auto; width: auto; }
  .account-center-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .account-center-section .account-form > .button { width: auto; }
  .account-preferences-row,
  .account-danger-zone { grid-template-columns: minmax(0,1fr) auto; }
  .account-preferences-row .button,
  .account-danger-zone .button { width: auto; }
  .achievement-catalog { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-notifications-page-list > a { padding-inline: .75rem; }
}
@media (min-width: 60rem) {
  .account-center-header { grid-template-columns: 6.5rem minmax(0,1fr) auto; padding-block: 1rem 1.35rem; }
  .account-center-header-simple { grid-template-columns: minmax(0,1fr); }
  .account-center-header .account-avatar-frame { width: 6.5rem; }
  .account-center-section { margin-top: 1.75rem; padding-top: 1.4rem; }
  .account-settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
  .account-settings-grid .account-center-section { min-width: 0; }
  .achievement-catalog { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 30rem) {
  .header-social { gap: .25rem; }
  .header-social .header-control,
  .header-social > a { min-width: 2.15rem; width: 2.15rem; height: 2.15rem; }
  .header-account-popover .header-popover-panel { right: -2.4rem; }
  .account-center-inner { width: min(100% - .9rem, var(--max)); }
  .account-center-heading h1 { font-size: clamp(2.25rem, 13vw, 3.25rem); }
  .account-center-actions { grid-template-columns: 1fr; }
  .account-center-actions .button { justify-content: flex-start; padding-inline: .85rem; }
  .account-profile-identity { align-items: flex-start; }
  .account-verified-badge { flex: 0 0 auto; }
  .account-collection-grid { gap: .45rem; }
  .achievement-catalog-card { grid-template-columns: 2.25rem minmax(0,1fr); padding: .7rem; }
  .achievement-catalog-icon { width: 2.25rem; height: 2.25rem; }
  .achievement-catalog-title { display: grid; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .header-popover-panel { scroll-behavior: auto; }
}
/* v2: reliable mobile control rail, opaque menus, profile palettes, and integrated security */
.header-account-popover .header-popover-panel { right: 0; }
.header-notifications-popover .header-popover-panel { right: -2.6rem; }

.account-profile-palette { display: grid; gap: .65rem; margin: 0; padding: 0; border: 0; }
.account-profile-palette legend { margin: 0 0 .15rem; padding: 0; color: var(--paper); font-size: .78rem; font-weight: 800; }
.account-profile-palette > p { margin: 0; color: var(--dim); font-size: .68rem; line-height: 1.5; }
.account-profile-palette-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.account-profile-palette-option { position: relative; min-width: 0; display: grid; grid-template-columns: 2.65rem minmax(0,1fr); align-items: center; gap: .65rem; min-height: 3.75rem; padding: .55rem; border: 1px solid var(--line); background: var(--black); color: var(--muted); cursor: pointer; }
.account-profile-palette-option:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--paper); }
.account-profile-palette-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--paper); }
.account-profile-palette-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-profile-palette-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.account-profile-palette-swatch { position: relative; width: 2.65rem; height: 2.65rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--profile-swatch-ink) 42%, transparent); background: var(--profile-swatch-bg); }
.account-profile-palette-swatch::before { content: ""; position: absolute; inset: .45rem; border: 1px solid var(--profile-swatch-ink); }
.account-profile-palette-swatch::after { content: ""; position: absolute; right: .28rem; bottom: .28rem; width: .7rem; height: .7rem; background: var(--profile-swatch-accent); }
.account-profile-palette-option strong { min-width: 0; overflow-wrap: anywhere; font-size: .7rem; line-height: 1.25; }
.account-security-grid { display: grid; gap: 1.25rem; }
.account-security-grid > section { min-width: 0; }
.account-security-methods { display: grid; gap: .8rem; }
.account-security-methods .account-provider-row { max-width: none; }

html[data-mode="1999"] .account-profile-palette-option { border: 2px outset var(--1999-border) !important; background: var(--1999-surface) !important; color: var(--1999-ink) !important; box-shadow: none !important; }
html[data-mode="1999"] .account-profile-palette-option:has(input:checked) { border: 2px inset var(--1999-accent) !important; }

.account-profile-palette-picker { display: grid; grid-template-columns: minmax(0,1fr) 3rem; align-items: stretch; gap: .55rem; }
.account-profile-palette-picker select { min-width: 0; min-height: 3rem; padding: .65rem 2.35rem .65rem .75rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--black); color: var(--paper); font: inherit; }
.account-profile-palette-picker select:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.account-profile-palette-picker .account-profile-palette-swatch { width: 3rem; height: 3rem; }
.account-security-panel { min-width: 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.account-security-panel > header { margin-bottom: .8rem; }
.account-security-panel h3 { margin: 0; color: var(--paper); font-family: var(--serif); font-size: 1.12rem; font-weight: 500; }
.account-security-panel p { margin: .35rem 0 0; color: var(--dim); font-size: .7rem; line-height: 1.5; }
.account-security-methods { margin-top: 1.25rem; }
.account-security-signout { display: grid; gap: .8rem; align-items: center; }
.account-security-signout .account-logout-form { margin: 0; }
html[data-mode="1999"] .account-profile-palette-picker select { border: 2px inset var(--1999-border) !important; background: var(--1999-surface) !important; color: var(--1999-ink) !important; }
html[data-mode="1999"] .account-security-panel { border-color: var(--1999-border) !important; }
html[data-mode="1999"] .account-security-panel h3 { color: var(--1999-ink) !important; }
@media (min-width: 42.5rem) { .account-security-signout { grid-template-columns: minmax(0,1fr) auto; } }
@media (min-width: 42.5rem) {
  .account-profile-palette-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 60rem) {
  .account-profile-palette-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .account-security-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
}
@media (max-width: 47.5rem) {
  .site-header,
  .site-header .top-header,
  .site-header .top-header > .header-inner,
  .site-header .header-social,
  html[data-mode="1999"] .site-header,
  html[data-mode="1999"] .site-header .top-header,
  html[data-mode="1999"] .site-header .top-header > .header-inner,
  html[data-mode="1999"] .site-header .header-social { overflow: visible !important; }
  .site-header .top-header > .header-inner,
  html[data-mode="1999"] .site-header .top-header > .header-inner {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .45rem !important;
    min-height: 3.55rem !important;
  }
  .site-header .brand,
  html[data-mode="1999"] .site-header .brand {
    order: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0;
  }
  .site-header .brand-text { min-width: 0; }
  .site-header .main-nav { display: none !important; }
  .site-header .header-social,
  html[data-mode="1999"] .site-header .header-social {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: .35rem !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  .site-header .header-social > a[aria-label="Contact"] { display: none !important; }
  .site-header .header-social .header-control {
    min-width: 2.25rem !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    touch-action: manipulation;
  }
  .site-header .header-popover-panel,
  html[data-mode="1999"] .site-header .header-popover-panel {
    position: fixed !important;
    top: var(--header-popover-top,4rem) !important;
    right: .5rem !important;
    left: .5rem !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--header-popover-top,4rem) - .5rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 10050 !important;
  }
  .site-header .header-notification-list { max-height: min(24rem,calc(100dvh - var(--header-popover-top,4rem) - 7rem)); }
}
@media (max-width: 25rem) {
  .site-header .logo-sub { display: none; }
  .site-header .header-social .header-control { min-width: 2.15rem !important; width: 2.15rem !important; height: 2.15rem !important; }
  .account-profile-palette-grid { grid-template-columns: 1fr; }
}
