.profile-screen {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  overflow: visible;
  background: transparent;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px;
  background: var(--surface);
}
.profile-screen > .standalone-heading { margin-bottom: 18px; }
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  text-align: left;
}
.profile-photo {
  margin: 0;
}
.profile-avatar {
  display: block;
  width: 60px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: 50%;
  object-fit: cover;
  background: var(--input-surface);
}
.profile-avatar-default {
  display: grid;
  place-items: center;
  color: var(--navy);
}
.profile-avatar-default > .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.8;
}
.profile-identity h2 {
  max-width: 100%;
  color: var(--navy);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}
.profile-content {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 0 0 24px;
  background: transparent;
  flex: 1;
  align-content: start;
}
.profile-settings-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.profile-setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 13px 16px;
  border: 0;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease;
}
.profile-setting-row + .profile-setting-row {
  position: relative;
}
.profile-setting-row + .profile-setting-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--border);
}
.profile-row-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  flex: none;
  color: var(--navy);
  transition: color 180ms ease;
}
.profile-row-icon .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
}
.profile-row-copy {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.profile-row-copy strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}
.profile-row-chevron {
  display: flex;
  flex: none;
  color: var(--muted);
  transition:
    color 160ms ease,
    transform 160ms ease;
}
.profile-row-chevron .icon {
  width: 17px;
  height: 17px;
}
.profile-logout-form { display: flex; justify-content: center; padding-top: 4px; }
.profile-screen .profile-logout {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.profile-logout .icon { width: 18px; height: 18px; }
.profile-screen .standalone-back {
  cursor: pointer;
  transition: background-color 160ms ease;
}
.profile-screen :is(button, a):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -4px;
}
.profile-setting-row:focus-visible {
  background: var(--primary-soft);
}
.profile-setting-row:focus-visible .profile-row-chevron {
  color: var(--navy);
  transform: translateX(2px);
}
@media (hover: hover) {
  .profile-setting-row:hover {
    background: var(--primary-soft);
  }
  .profile-setting-row:hover .profile-row-icon {
    color: var(--navy);
  }
  .profile-setting-row:hover .profile-row-chevron {
    color: var(--navy);
    transform: translateX(3px);
  }
  .profile-screen .profile-logout:hover {
    background: var(--primary-soft);
    color: var(--primary);
  }
}
.profile-setting-row:active {
  background: var(--primary-soft);
}
.profile-setting-row:active .profile-row-chevron {
  color: var(--navy);
  transform: translateX(1px);
}
.profile-screen .profile-logout:active {
  background: var(--primary-soft);
  color: var(--primary);
}
.profile-dialog-intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.profile-metadata {
  margin: 0;
}
.profile-metadata > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.profile-metadata > div:first-child {
  padding-top: 0;
}
.profile-metadata > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.profile-metadata dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.profile-metadata dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .profile-hero {
    padding: 16px 18px;
  }
  .profile-identity {
    padding: 0;
  }
  .profile-identity h2 {
    font-size: 18px;
  }
  .profile-content {
    padding: 0 0 24px;
    gap: 14px;
  }
  .profile-setting-row {
    padding: 12px 15px;
    min-height: 58px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile-screen
    :is(
      .profile-setting-row,
      .profile-row-icon,
      .profile-row-chevron,
      .profile-logout,
      .standalone-back
    ) {
    transition: none;
  }
  .profile-setting-row:is(:hover, :focus-visible, :active)
    .profile-row-chevron {
    transform: none;
  }
}
