.app-profile .account {
  width: 100%;
  margin: 0;
  padding: calc(12px + env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left));
}
.app-profile .account-layout { display: block; }
.app-profile .account-layout:not(.show-menu) .account-nav,
.app-profile .account-layout.show-menu .account-panel { display: none; }
.app-profile .account h1 {
  margin: 12px 0 24px;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: pretty;
}
.app-profile .account-panel > .app-back { margin-inline-start: -12px; }
.app-profile .account[data-confirming="email"] { padding-block-end: 16px; }
.app-profile [data-confirming="email"] :is(.account-layout, .account-panel) {
  display: flex;
  flex-direction: column;
}
.app-profile [data-confirming="email"] .account-layout { min-height: 100%; }
.app-profile [data-confirming="email"] .account-panel { flex: auto; }
.app-profile [data-confirming="email"] #heading {
  margin-block-start: auto;
  padding-block-start: 16px;
}
.app-profile [data-confirming="email"] #contact-step { margin-block-end: auto; }
.app-profile [data-confirming="email"] #code-caption { overflow-wrap: anywhere; }
.app-profile .account:is([data-state="sections"], [data-state="guest"]) {
  --profile-gutter-start: max(16px, env(safe-area-inset-left));
  --profile-gutter-end: max(16px, env(safe-area-inset-right));
  padding: 0 var(--profile-gutter-end) 24px var(--profile-gutter-start);
  background: var(--mk-color-bg-subtle);
}
.app-profile .account #profile-menu-heading {
  margin: 0 calc(-1 * var(--profile-gutter-end)) 0 calc(-1 * var(--profile-gutter-start));
  padding: calc(16px + env(safe-area-inset-top)) var(--profile-gutter-end) 16px var(--profile-gutter-start);
  border-radius: 0 0 var(--mk-radius-sheet) var(--mk-radius-sheet);
  background: var(--mk-color-bg-surface);
  font-size: 1.375rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.app-profile .app-profile-group { margin-block-start: 24px; }
.app-profile .app-profile-group h2 {
  margin: 0 0 8px;
  padding-inline: 2px;
  color: var(--mk-color-fg-secondary);
  font: 650 .875rem/1.4 var(--mk-font-body);
}
.app-profile .app-profile-group ul,
.app-profile .account-nav .app-profile-exit {
  border-radius: var(--mk-radius-sheet);
  background: var(--mk-color-bg-surface);
}
.app-profile .account-nav button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  font-size: .9375rem;
  font-weight: 550;
}
.app-profile .account-nav .app-profile-exit { margin-block-start: 24px; }
.app-profile .account-nav .app-profile-exit > span { text-box: trim-both cap alphabetic; }
.app-profile .account-nav button[data-target]::after { content: none; }
.app-profile .account-nav button > .app-icon { justify-self: center; width: 20px; height: 20px; opacity: .83; }
.app-profile .account-nav button > span { min-width: 0; overflow-wrap: anywhere; }
.app-profile .account-nav button > span + .app-icon { width: 16px; height: 16px; opacity: .65; }
.app-profile .account-nav li:first-child > button {
  border-radius: var(--mk-radius-sheet) var(--mk-radius-sheet) 0 0;
}
.app-profile .account-nav .app-profile-guest-login { font-weight: 650; }
.app-profile .account-nav button:disabled { color: var(--mk-color-fg-secondary); }
.app-profile .account-nav button:focus-visible {
  background: var(--mk-color-bg-plate);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.app-profile .account-nav button:active:enabled { background: var(--mk-color-bg-plate); }
.app-profile .account-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.app-profile .account-group legend { font-size: 1.25rem; }
.app-profile .account-status {
  padding: 12px 14px;
  border: 0;
  border-radius: var(--mk-radius-sheet);
  font-size: .9375rem;
}
.app-profile [data-state="saved"] .account-status { color: var(--mk-color-stock-in); }
.app-profile :is([data-state="error"], [data-state="save-error"], [data-state="contact-delivery"]) .account-status {
  color: var(--mk-color-error-fg);
  background: var(--mk-color-error-bg);
}
.app-profile :is(.account-form, .account-panel, .account-tools) > .account-primary { width: 100%; }
.app-profile .profile-management { margin-top: 24px; }
.app-profile .account-delete { color: var(--mk-color-error-fg); }
.app-profile #code-caption { margin: 0 0 20px; }
.app-profile #contact-form .account-tools { gap: 8px; }
.app-profile #contact-form :is(#cancel-code, #resend) { width: 100%; }
.app-profile #resend { text-align: center; }
.app-profile .account-window { border-radius: var(--mk-radius-sheet); }
.app-profile .account-window .account-tools > button { width: 100%; }
