.home-live:is(.is-memory, .is-memorySummaryGenerating, .is-memorySummaryMenu, .is-memorySummaryAbout, .is-memorySummary, .is-about) {
  background: transparent;
  color: var(--heylth-label);
  font-family: var(--heylth-font-text);
  letter-spacing: var(--heylth-letter-spacing);
}

.profile-page {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.profile-page-sheet {
  --profile-page-nav-surface: 242, 242, 247;
  --profile-page-body-surface: var(--settings-page-surface);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

/* Large rounded background module shared by Memory, About and their deeper
   Profile descendants. It sits behind the existing controls, so geometry and
   interaction remain unchanged. */
.profile-page-sheet::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: var(--settings-nav-top);
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: var(--settings-nav-radius) var(--settings-nav-radius) 0 0;
  background: var(--profile-page-body-surface);
  pointer-events: none;
}

.profile-page-navigation {
  position: absolute;
  z-index: 4;
  top: var(--settings-nav-top);
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 20cqw 1fr 20cqw;
  place-items: center;
  height: var(--settings-nav-height);
  padding: 0;
  border-radius: var(--settings-nav-radius) var(--settings-nav-radius) 0 0;
  background: rgba(var(--profile-page-nav-surface), .94);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}

.profile-page-navigation h1 {
  grid-column: 2;
  margin: .5cqw 0 0;
  color: #000;
  font-size: var(--settings-nav-title-size);
  font-weight: var(--settings-nav-title-weight);
  line-height: var(--settings-nav-title-line-height);
  letter-spacing: 0em;
  text-align: center;
}

.profile-page-orb {
  appearance: none;
  position: absolute;
  top: var(--settings-nav-control-top);
  display: grid;
  place-items: center;
  width: var(--settings-nav-control-size);
  height: var(--settings-nav-control-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #050505;
  background: var(--settings-nav-control-surface);
  box-shadow: var(--settings-nav-control-shadow);
  transition: transform 110ms ease-out;
}

.profile-page-orb:active,
.profile-page-orb.is-pressed { transform: scale(.965); }

.profile-page-orb img { width: 6.4cqw; height: 6.4cqw; }
.profile-page-back { left: var(--settings-nav-side-inset); }
.profile-page-more { right: var(--settings-nav-side-inset); }
.profile-page-more img { width: 5.33cqw; height: 5.33cqw; }

/* Canonical native Save module for Memory, Personalization and any Profile
   descendant that commits an editable draft. This replaces route-specific
   Save styling; enabled and disabled states share the same capsule material. */
button.profile-save-control {
  appearance: none;
  position: absolute;
  z-index: 5;
  top: var(--settings-nav-control-top);
  right: var(--settings-nav-side-inset);
  display: grid;
  place-items: center;
  min-width: var(--profile-save-min-width);
  height: var(--settings-nav-control-size);
  padding: 0 var(--profile-save-inline-padding);
  border: 0;
  border-radius: 999px;
  color: var(--profile-save-enabled-color);
  background: var(--settings-nav-control-surface);
  box-shadow: var(--settings-nav-control-shadow);
  font-family: var(--heylth-font-text);
  font-size: var(--profile-save-font-size);
  font-weight: var(--profile-save-font-weight);
  line-height: 1;
  letter-spacing: 0em;
  font-optical-sizing: auto;
  white-space: nowrap;
  opacity: 1;
  cursor: pointer;
  transition: transform 110ms ease-out, color 150ms ease-out;
}

button.profile-save-control:disabled {
  color: var(--profile-save-disabled-color);
  opacity: 1;
  cursor: default;
}

button.profile-save-control:active:not(:disabled) { transform: scale(.965); }

.memory-settings-scroll,
.memory-summary-scroll {
  position: absolute;
  top: var(--settings-content-top);
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.memory-settings-scroll::-webkit-scrollbar,
.memory-summary-scroll::-webkit-scrollbar { display: none; }

.memory-setting-block { margin: 0 4.27cqw; }

.memory-setting-row {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--settings-row-height);
  padding: 0 4.27cqw;
  border: 0;
  border-radius: var(--settings-row-radius);
  color: #050505;
  background: #fff;
  text-align: left;
}

.memory-setting-row strong {
  font-size: var(--settings-row-font-size);
  font-weight: var(--settings-row-font-weight);
  line-height: var(--settings-row-line-height);
  letter-spacing: 0em;
}

.memory-setting-block > p {
  margin: 2.4cqw 4.27cqw 0;
  color: #636367;
  font-size: var(--settings-helper-font-size);
  font-weight: var(--settings-helper-font-weight);
  line-height: var(--settings-helper-line-height);
  letter-spacing: 0em;
}

.memory-setting-block > p button {
  appearance: none;
  display: inline;
  padding: 0;
  border: 0;
  color: var(--heylth-blue);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
}

.memory-summary-setting { margin-top: 6.9cqw; }

.memory-summary-setting .memory-setting-row { cursor: pointer; }

/* Home's generic button reset is intentionally weaker than this component
   contract. Both Memory rows must retain the Personalization card surface. */
.profile-page button.memory-setting-row { background: #fff; }

.memory-summary-setting .memory-setting-row > i {
  width: 2.13cqw;
  height: 2.13cqw;
  border-top: .65cqw solid #8e8e93;
  border-right: .65cqw solid #8e8e93;
  transform: rotate(45deg);
}

/* Reuse General's dc-switch + gs-switch geometry and states. Keep its off
   track visible inside Home's renderer; the enabled-state rules remain stronger. */
button.memory-switch { background: #c5c5c8; }

.memory-profile-form {
  display: grid;
  gap: 6.13cqw;
  margin: 5.6cqw 4.27cqw 16cqw;
}

.memory-profile-field { display: grid; gap: 2.67cqw; }

.memory-profile-field > span {
  padding-left: 4.27cqw;
  color: #8f8f94;
  font-size: var(--settings-section-font-size);
  font-weight: var(--settings-section-font-weight);
  line-height: 1;
  letter-spacing: 0em;
}

.memory-profile-field input {
  appearance: none;
  width: 100%;
  height: var(--settings-row-height);
  padding: 0 4.27cqw;
  border: 0;
  border-radius: var(--settings-row-radius);
  outline: none;
  color: #050505;
  background: #fff;
  font: var(--settings-row-font-weight) var(--settings-row-font-size)/1 var(--heylth-font-text);
  letter-spacing: 0em;
}

.memory-profile-field input::placeholder { color: #99999d; opacity: 1; }
.memory-profile-field input:focus-visible { box-shadow: inset 0 0 0 .53cqw var(--heylth-blue); }

.memory-summary-page .profile-page-sheet {
  --profile-page-nav-surface: 255, 255, 255;
  --profile-page-body-surface: #fff;
}

.memory-summary-navigation {
  grid-template-columns: 13.1cqw 1fr 13.1cqw;
}

.memory-summary-navigation > div {
  grid-column: 2;
  text-align: center;
}

.memory-summary-navigation h1 {
  font-size: var(--settings-nav-title-size);
  font-weight: var(--settings-nav-title-weight);
}

.memory-summary-navigation p {
  margin: 1.07cqw 0 0;
  color: #5f5f64;
  font-size: var(--settings-helper-font-size);
  font-weight: var(--settings-helper-font-weight);
  line-height: 1;
  letter-spacing: 0em;
}

.memory-summary-scroll {
  top: var(--settings-summary-content-top);
  padding: 0 5.33cqw 28cqw;
}

.memory-summary-skeleton {
  display: grid;
  gap: 2.13cqw;
  padding-top: 5.33cqw;
}

.memory-summary-skeleton i {
  display: block;
  width: var(--skeleton-width);
  height: 4.27cqw;
  border-radius: 1.6cqw;
  background: linear-gradient(100deg, #f0f0f2 15%, #fafafa 42%, #f0f0f2 72%);
  background-size: 210% 100%;
  animation: memory-live-shimmer 1.35s cubic-bezier(.4, 0, .2, 1) infinite;
}

.memory-summary-skeleton i.is-heading {
  height: 4.27cqw;
  margin-top: 4.27cqw;
}

.memory-summary-skeleton i:first-child { margin-top: 0; }

@keyframes memory-live-shimmer {
  from { background-position: 110% 0; }
  to { background-position: -110% 0; }
}

.memory-summary-copy-live {
  padding-top: 3.2cqw;
  color: #050505;
}

.memory-summary-copy-live h2 {
  margin: 0 0 3.47cqw;
  font-size: 4.53cqw;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0em;
}

.memory-summary-copy-live h2:not(:first-child) { margin-top: 8cqw; }

.memory-summary-copy-live p {
  margin: 0;
  font-size: 4.27cqw;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0em;
}

.memory-summary-composer {
  position: absolute;
  z-index: 5;
  right: 7.47cqw;
  bottom: 5.87cqw;
  left: 7.47cqw;
  display: grid;
  grid-template-columns: 1fr 10.67cqw;
  align-items: center;
  min-height: 14.93cqw;
  padding: 0 2.13cqw 0 4.27cqw;
  border: .21cqw solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 3.2cqw 9.6cqw rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(4.8cqw) saturate(160%);
  backdrop-filter: blur(4.8cqw) saturate(160%);
}

.memory-summary-composer input {
  appearance: none;
  min-width: 0;
  border: 0;
  outline: none;
  color: #050505;
  background: transparent;
  font: 500 4.27cqw/1 var(--heylth-font-text);
  letter-spacing: 0em;
}

.memory-summary-composer input::placeholder { color: #929297; opacity: 1; }

.memory-summary-composer button {
  appearance: none;
  position: relative;
  width: 10.67cqw;
  height: 10.67cqw;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #a4a4a7;
}

.memory-summary-composer button.is-enabled { background: #000; }

.memory-summary-composer button span::before {
  content: "";
  position: absolute;
  top: 2.67cqw;
  left: 50%;
  width: .8cqw;
  height: 5.33cqw;
  border-radius: 999px;
  background: #fff;
  transform: translateX(-50%);
}

.memory-summary-composer button span::after {
  content: "";
  position: absolute;
  top: 2.67cqw;
  left: 50%;
  width: 3.2cqw;
  height: 3.2cqw;
  border-top: .8cqw solid #fff;
  border-left: .8cqw solid #fff;
  transform: translateX(-50%) rotate(45deg);
}

.memory-menu-scrim,
.memory-about-scrim,
.profile-page-alert-scrim {
  appearance: none;
  position: absolute;
  z-index: 10;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.memory-summary-menu {
  position: absolute;
  z-index: 11;
  top: 16.53cqw;
  right: 4.27cqw;
  width: 66.67cqw;
  padding: 4.27cqw 7.47cqw;
  border: .21cqw solid var(--popup-material-border);
  border-radius: 8.53cqw;
  background: var(--popup-material-surface);
  box-shadow: var(--popup-material-shadow);
  -webkit-backdrop-filter: var(--popup-material-backdrop);
  backdrop-filter: var(--popup-material-backdrop);
  transform-origin: 100% 0;
  animation: memory-menu-in 220ms cubic-bezier(.2, .8, .2, 1) both;
}

.memory-summary-menu > button {
  appearance: none;
  display: grid;
  grid-template-columns: 8cqw 1fr;
  align-items: center;
  width: 100%;
  min-height: 10.67cqw;
  padding: 0;
  border: 0;
  color: #050505;
  background: transparent;
  text-align: left;
  font: 600 4.27cqw/1.15 var(--heylth-font-text);
  letter-spacing: 0em;
}

.memory-summary-menu > button img { width: 5.87cqw; height: 5.87cqw; }
.memory-summary-menu > button:disabled { color: #818186; opacity: .82; }
.memory-summary-menu > button:disabled img { opacity: .66; }

@keyframes memory-menu-in {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

.memory-summary-page.is-about-open .profile-page-sheet { filter: brightness(.84); }

.memory-about-scrim {
  background: rgba(0, 0, 0, .16);
}

.memory-about-sheet {
  position: absolute;
  z-index: 12;
  right: 2.13cqw;
  bottom: 2.67cqw;
  left: 2.13cqw;
  padding: 7.47cqw 4.27cqw 5.33cqw;
  border: .21cqw solid rgba(255, 255, 255, .88);
  border-radius: 9.6cqw;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -2.13cqw 8cqw rgba(0, 0, 0, .08);
  -webkit-backdrop-filter: blur(4.8cqw) saturate(160%);
  backdrop-filter: blur(4.8cqw) saturate(160%);
  text-align: center;
}

.memory-about-sheet h2 {
  margin: 0;
  font-size: 5.6cqw;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0em;
}

.memory-about-sheet p {
  margin: 3.2cqw 1.6cqw 7.2cqw;
  color: #66666b;
  font-size: 4.27cqw;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0em;
}

.memory-about-sheet > div { display: grid; grid-template-columns: 1fr 1fr; gap: 2.93cqw; }

.memory-about-sheet > div button {
  appearance: none;
  min-height: 14.13cqw;
  border: .27cqw solid #dedee1;
  border-radius: 999px;
  color: #050505;
  background: #fff;
  font: 700 5.07cqw/1 var(--heylth-font-text);
  letter-spacing: 0em;
}

.memory-about-sheet > div button:last-child { border-color: #050505; color: #fff; background: #050505; }

.about-page-live .profile-page-sheet { --profile-page-body-surface: var(--settings-page-surface); }

.about-navigation { grid-template-columns: 13.1cqw 1fr 13.1cqw; }
.about-navigation > span { grid-column: 3; }

.about-card {
  position: absolute;
  top: var(--settings-content-top);
  right: 4.27cqw;
  left: 4.27cqw;
  overflow: hidden;
  border-radius: var(--settings-row-radius);
  background: #fff;
}

.about-card > :is(button, a),
.about-card > div {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 9.07cqw 1fr;
  align-items: center;
  width: 100%;
  min-height: var(--settings-row-height);
  padding: 0 4.27cqw;
  border: 0;
  color: #050505;
  background: transparent;
  text-align: left;
}

.about-card > :is(button, a)::after {
  content: "";
  position: absolute;
  right: 4.27cqw;
  bottom: 0;
  left: 13.33cqw;
  height: .27cqw;
  background: #e4e4e7;
}

.about-card img { width: 5.07cqw; height: 5.07cqw; }

.about-card > :is(button, a) span,
.about-card > div > span {
  font-size: var(--settings-row-font-size);
  font-weight: var(--settings-row-font-weight);
  line-height: var(--settings-row-line-height);
  letter-spacing: 0em;
}

.about-card > div { min-height: var(--settings-row-height); }

.about-card > a {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.about-card > a:focus-visible {
  outline: .5cqw solid var(--heylth-blue, #0a84ff);
  outline-offset: -.5cqw;
}

.profile-page-alert-scrim {
  z-index: 20;
  background: rgba(0, 0, 0, .18);
}

.profile-page-alert {
  position: absolute;
  z-index: 21;
  top: 50%;
  left: 50%;
  width: 80cqw;
  overflow: hidden;
  border: .21cqw solid rgba(255, 255, 255, .82);
  border-radius: 7.47cqw;
  background: rgba(244, 244, 246, .92);
  box-shadow: 0 4cqw 12cqw rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(5.33cqw) saturate(160%);
  backdrop-filter: blur(5.33cqw) saturate(160%);
  text-align: center;
  transform: translate(-50%, -50%);
}

.profile-page-alert h2 { margin: 5.33cqw 5.33cqw 1.6cqw; font-size: 4.8cqw; font-weight: 700; }
.profile-page-alert p { margin: 0 6.4cqw 5.33cqw; color: #4f4f54; font-size: 3.73cqw; font-weight: 500; line-height: 1.32; }
.profile-page-alert button { appearance: none; width: 100%; min-height: 11.73cqw; border: 0; border-top: .27cqw solid rgba(60, 60, 67, .2); color: var(--heylth-blue); background: transparent; font: 600 4.27cqw/1 var(--heylth-font-text); }

@media (prefers-reduced-motion: reduce) {
  .memory-summary-skeleton i { animation: none; }
  .memory-summary-menu { animation: none; }
  button.profile-save-control,
  .profile-page button,
  .profile-page input { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .profile-page-orb,
  button.profile-save-control,
  .memory-summary-composer,
  .memory-summary-menu,
  .memory-about-sheet,
  .profile-page-alert {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fff;
  }
}
