/* Account preference: local base styles also apply to Original. */
#section-account .ps-account-preference { display: grid; gap: 10px; margin-top: 18px; max-width: 420px; min-width: 0; }
#section-account .ps-account-preference > label { font-weight: 600; }
#section-account .ps-account-preference > select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #b8c5d2; border-radius: 6px; background: #fff; color: #172a34; font: inherit; }
#section-account .ps-account-preference-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#section-account #accountProfileStatus { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
#section-account #accountProfileStatus[data-state="error"] { color: #a81d35; }
#section-account #accountProfileStatus[data-state="success"] { color: #17633d; }
#section-account .ps-account-preference :is(select, button):focus-visible { outline: 2px solid #2d6ca9; outline-offset: 2px; }
#section-account .ps-account-preference :disabled { opacity: .6; cursor: not-allowed; }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account .ps-account-preference { color: var(--ps-text); }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account .ps-account-preference > select { background: var(--ps-bg-soft); color: var(--ps-text); border-color: var(--ps-line-strong); color-scheme: dark; }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account .ps-account-preference button { background: var(--ps-button-bg); color: var(--ps-button-text); border-color: var(--ps-button-border); box-shadow: var(--ps-button-shadow); }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account .ps-account-preference :focus-visible { outline-color: var(--ps-focus); }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account #accountProfileStatus[data-state="error"] { color: #fda4af; }
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account #accountProfileStatus[data-state="success"] { color: #86efac; }

/* Lot 6: only the visible My Account view in the authenticated HUB.
   The body/html canvas is conditional; shared classes retain their old styles
   everywhere else, including hidden Account content and detached renderers. */
html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]:has(#appContainer > main > #section-account:not(.hidden)),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) body:has(#appContainer > main > #section-account:not(.hidden)) {
  background: var(--ps-bg);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) {
  min-width: 0;
  max-width: 100%;
  background: var(--ps-bg);
  border-color: var(--ps-line);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection), 0 8px 24px #0003;
  color: var(--ps-text);
  font-family: var(--ps-font-ui);
  overflow-wrap: anywhere;
  overflow-anchor: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(h2, .account-panel-title, .admin-subcard-heading h3, .account-info-value) {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) > h2 {
  font-weight: 600;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(.account-panel, .admin-subcard) {
  min-width: 0;
  max-width: 100%;
  background: var(--ps-surface-soft);
  border-color: var(--ps-line);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-panel-header {
  background: var(--ps-surface-solid);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(.account-panel-icon, .admin-subcard-icon) {
  background: var(--ps-bg-soft);
  color: var(--ps-gold-light);
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .admin-subcard:hover {
  box-shadow: var(--ps-shell-reflection), 0 4px 12px #0002;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-info-item {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(.muted, .admin-subcard-title, .account-info-label) {
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-password-form input {
  min-width: 0;
  max-width: 100%;
  background: var(--ps-bg-soft);
  border-color: var(--ps-line-strong);
  color: var(--ps-text);
  font-family: var(--ps-font-ui);
  color-scheme: dark;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-password-form input::placeholder {
  color: var(--ps-muted);
  opacity: .75;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-password-form > .admin-form-actions > .btn-primary {
  max-width: 100%;
  background: var(--ps-button-bg);
  border-color: var(--ps-button-border);
  border-radius: 6px;
  color: var(--ps-button-text);
  font-family: var(--ps-font-ui);
  box-shadow: var(--ps-button-shadow);
  overflow-wrap: anywhere;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) .account-password-form > .admin-form-actions > .btn-primary:hover:not(:disabled) {
  background: var(--ps-button-hover);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(input, button):focus-visible {
  outline: 2px solid var(--ps-focus);
  outline-offset: 2px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) input:focus {
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(input, button):disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) #accountStatus[data-ps-account-state="error"] {
  color: #fda4af;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) #accountStatus[data-ps-account-state="success"] {
  color: #86efac;
}

@media (prefers-reduced-motion: reduce) {
  :where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-account:not(.hidden) :is(input, button, .admin-subcard) {
    transition: none;
  }
}
