.main-me-guest-card {
  box-sizing: border-box;
  margin: 24px 16px;
  padding: 24px 20px;
  border: 1px solid #e8ecf0;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.main-me-guest-title {
  margin: 0 0 8px;
  color: #111114;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.main-me-guest-sub {
  margin: 0 0 18px;
  color: #66756e;
  font-size: 14px;
  line-height: 1.45;
}

.main-me-guest-sign-in {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 16px;
  color: #fff;
  background: #111114;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Me main tab — cover photo, floating name card, Circle · Friends · Findable · My notes, Spotlight. */
.main-me-page.is-main-tab-findme-open {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.main-me-page.is-main-tab-findme-open [data-me-page="findme"].is-main-tab-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.main-me-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  /* clip, not hidden: hidden would make this the sticky container and stop the top bar sticking. */
  overflow-x: clip;
}

.main-me-scroll {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 8px 16px 16px;
}

.main-me-page .main-me-cover-layout {
  --me-topbar-h: calc(env(safe-area-inset-top, 0px) + 52px);
  padding: 0 0 16px;
}

/* Top bar: Scan · QR · Settings, bare white icons over the cover; solid white with the
   name once the cover has scrolled away. */
.main-me-page .main-me-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  box-sizing: border-box;
  height: var(--me-topbar-h);
  padding: env(safe-area-inset-top, 0px) 8px 0 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #fff;
  transition: background-color .2s, box-shadow .2s, color .2s;
}

.main-me-page .main-me-topbar.is-solid {
  color: #30343a;
  background: rgb(255 255 255 / .96);
  box-shadow: 0 1px 0 #f0f0f0;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.main-me-page .main-me-topbar-title {
  position: absolute;
  left: 20px;
  max-width: calc(100% - 190px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #171717;
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

.main-me-page .main-me-topbar.is-solid .main-me-topbar-title {
  opacity: 1;
}

.main-me-page .main-me-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-me-page .main-me-topbar-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.main-me-page .main-me-topbar-button svg {
  width: 24px;
  height: 24px;
}

.main-me-page .main-me-topbar:not(.is-solid) .main-me-topbar-button {
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / .45));
}

/* No cover photo: the default band is light, so the icons stay dark. */
.main-me-page .main-me-cover-layout:has(.main-me-cover:not(.has-cover)) .main-me-topbar {
  color: #30343a;
}

.main-me-page .main-me-cover-layout:has(.main-me-cover:not(.has-cover)) .main-me-topbar-button {
  filter: none;
}

.main-me-page .main-me-topbar-button:active,
.main-me-page .main-me-button:active,
.main-me-page .main-me-place:active {
  transform: scale(.95);
}

/* Cover: full width from the top, under the top bar. Pull down to open it fully. */
.main-me-page .main-me-cover {
  position: relative;
  height: 300px;
  margin-top: calc(-1 * var(--me-topbar-h));
  overflow: hidden;
  background:
    radial-gradient(120px 80px at 15% 30%, rgb(255 255 255 / .55), transparent 70%),
    linear-gradient(120deg, #f3e7d7 0%, #ede9f6 52%, #e1edf7 100%);
  transition: height .38s cubic-bezier(.2, .8, .2, 1);
}

.main-me-page .main-me-cover.is-dragging {
  transition: none;
}

.main-me-page .main-me-cover-layout.is-cover-open .main-me-cover {
  height: 520px;
}

.main-me-page .main-me-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.main-me-page .main-me-cover.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .32) 0, transparent 34%, transparent 62%, var(--page-background, #fff) 100%);
  pointer-events: none;
}

.main-me-page .main-me-cover-change {
  position: absolute;
  right: 16px;
  bottom: 146px;
  z-index: 1;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgb(0 0 0 / .38);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .25s, transform .25s;
  cursor: pointer;
}

.main-me-page .main-me-cover-change svg {
  width: 14px;
  height: 14px;
}

.main-me-page .main-me-cover-layout.is-cover-open .main-me-cover-change,
.main-me-page .main-me-cover:not(.has-cover) .main-me-cover-change {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.main-me-page .main-me-cover:not(.has-cover) .main-me-cover-change {
  background: rgb(255 255 255 / .7);
  color: #30343a;
}

.main-me-page .main-me-body {
  position: relative;
  z-index: 1;
  margin-top: -130px;
  padding: 0 16px;
}

/* Name card floats over the bottom of the cover. */
.main-me-page .main-me-live-name-card {
  margin: 0;
  padding: 0 20px 18px;
  border: 1px solid rgb(255 255 255 / .8);
  border-radius: 26px;
  background: rgb(255 255 255 / .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 12px 32px rgb(15 23 42 / .1);
  text-align: center;
}

/* Avatar and name both straddle the card's top edge. */
.main-me-page .main-me-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: -44px;
  text-align: left;
}

.main-me-page .main-me-avatar-wrap {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
}

.main-me-page .main-me-live-name-card .me-story-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-me-page .main-me-live-name-card .story-ring {
  box-sizing: border-box;
  width: 88px;
  height: 88px;
  margin: 0;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: #ececec;
  box-shadow: 0 6px 18px rgb(0 0 0 / .1);
}

.main-me-page .main-me-live-name-card .story-ring.empty {
  background: #e2e8f0;
}

.main-me-page .main-me-live-name-card .story-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.main-me-page .main-me-avatar-camera {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 2;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.main-me-page .main-me-avatar-camera-icon {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #18181b;
}

.main-me-page .main-me-avatar-camera-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}

.main-me-page .main-me-name-edit-hit {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
}

/* White tab behind only the part of the name above the card; it joins the card below.
   Right space matches the space between the avatar and the name. */
.main-me-page .main-me-name-tab {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: -2px;
  padding: 3px 24px 4px 12px;
}

.main-me-page .main-me-name-tab::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 14px; /* from the top of the name down to the card's top edge */
  border-radius: 14px 14px 0 0;
  background: rgb(255 255 255 / .94);
  box-shadow: 0 -4px 12px rgb(0 0 0 / .06);
}

.main-me-page .main-me-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #171717;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.4px;
}

.main-me-page .main-me-tagline {
  margin-top: 9px;
  padding-left: 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.main-me-page .main-me-tagline:empty,
.main-me-page .main-me-motto:empty {
  display: none;
}

.main-me-page .main-me-motto {
  margin: 14px auto 0;
  max-width: 290px;
  overflow-wrap: break-word;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

/* One quiet stats line. */
.main-me-page .main-me-live-name-card .main-me-stats {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  color: #717171;
  font-size: 13px;
}

.main-me-page .main-me-stat {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.main-me-page .main-me-stat strong {
  margin-right: 2px;
  color: #171717;
  font-size: 15px;
  font-weight: 750;
}

.main-me-page .main-me-stat-dot {
  color: #c4c9d0;
}

.main-me-page .main-me-live-name-card .me-profile-stat-display {
  cursor: default;
}

/* Tags: one row you can swipe; small outlined labels, not buttons. */
.main-me-page .main-me-tags {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-me-page .main-me-tags:has(.main-me-tags-scroll:empty) {
  justify-content: center;
}

.main-me-page .main-me-tags-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.main-me-page .main-me-tags-scroll:empty {
  display: none;
}

.main-me-page .main-me-tags-scroll::-webkit-scrollbar {
  display: none;
}

.main-me-page .main-me-tags-scroll .tag {
  flex: none;
  height: 26px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #e7e9ed;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  background: none;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.main-me-page .main-me-tags-add {
  flex: none;
  height: 26px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Edit profile, then Share · Add friends: one shape, one row. */
.main-me-page .main-me-buttons {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr repeat(2, 38px);
  gap: 8px;
}

.main-me-page .main-me-button {
  position: relative;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #f2f3f5;
  color: #171717;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.main-me-page .main-me-button svg {
  width: 18px;
  height: 18px;
}

.main-me-page .main-me-button.is-primary {
  min-width: 0;
  padding: 0 12px;
  background: #171717;
  color: #fff;
  white-space: nowrap;
}

.main-me-page .main-me-button.is-primary svg {
  width: 17px;
  height: 17px;
}


/* Circle · Friends · Findable · My notes: cards like the Circle row on Chats. */
.main-me-page .main-me-places {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.main-me-page .main-me-place {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px #ecebe6, 0 2px 8px rgb(0 0 0 / .04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.main-me-page .main-me-place > svg:last-child {
  flex: none;
  width: 18px;
  height: 18px;
  color: #b0b1aa;
}

.main-me-page .main-me-place-mark,
.main-me-page .main-me-place-mark svg {
  flex: none;
  display: block;
  width: 40px;
  height: 40px;
}

.main-me-page .main-me-place-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.main-me-page .main-me-place-copy strong {
  font-size: 15.5px;
  font-weight: 600;
}

.main-me-page .main-me-place-copy small {
  overflow: hidden;
  color: #6c6d67;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-me-page .main-me-place-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e11d48;
}

.main-me-page .main-me-place-dot[hidden] {
  display: none;
}

/* Findable off: the same mark in grey. */
/* Friends: up to three friends' faces, stacked. */
.main-me-page .main-me-place-faces {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
}

.main-me-page .main-me-place-faces .main-me-place-face {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--circle-avatar, #4b7966) center / cover;
  font-size: 10px;
  font-weight: 800;
}

.main-me-page .main-me-place-faces .main-me-place-face:nth-child(1) { left: 0; top: 2px; }
.main-me-page .main-me-place-faces .main-me-place-face:nth-child(2) { right: 0; top: 2px; }
.main-me-page .main-me-place-faces .main-me-place-face:nth-child(3) { left: 8px; bottom: 0; }

.main-me-page .main-me-place-faces.is-empty::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #f2f3f5;
}

.main-me-page .main-me-spotlight-head {
  margin: 18px 2px 10px;
  color: #171717;
  font-size: 15px;
  font-weight: 700;
}

/* The cover is already at the top of the page. */
.main-me-page .main-me-spotlight-panel .profile-cover-wrap {
  display: none;
}

/* With no cover above it, the bio card doesn't tuck up (it would cover the Spotlight heading). */
.main-me-page .main-me-spotlight-panel .profile-hero .profile-bio-card {
  margin-top: 0 !important;
}

.main-me-page .main-me-lab-title {
  margin: 22px 4px 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 650;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-live-name-card,
html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-name-tab::before {
  background: rgb(23 23 23 / .94);
  border-color: #262626;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-name,
html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-stat strong,
html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-topbar-title {
  color: #f4f4f5;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-motto {
  color: #d4d4d8;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-button:not(.is-primary),
html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-place {
  background: #27272a;
  color: #f4f4f5;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-button.is-primary {
  background: #f4f4f5;
  color: #171717;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-topbar.is-solid {
  background: rgb(9 9 11 / .96);
  box-shadow: 0 1px 0 #262626;
  color: #f4f4f5;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-avatar-camera-icon {
  border-color: #171717;
  background: #e4e4e7;
  color: #18181b;
}

/* Lab rows (lab accounts only). */
.main-me-page ul.main-me-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-me-page .main-me-list-item {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-me-page .main-me-list-item::marker {
  content: "";
}

.main-me-page .main-me-row {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 23px 16px;
  border: 1px solid #e8ecf0;
  border-radius: 21px;
  background: #fff;
  color: #18181b;
  text-align: left;
  font: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.main-me-page button.main-me-row {
  cursor: pointer;
}

.main-me-page .main-me-row-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #555e68;
  background: #f4f5f7;
  display: grid;
  place-items: center;
}

.main-me-page .main-me-row-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.main-me-page .main-me-row-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-me-page .main-me-row-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.main-me-page .main-me-row-sub {
  font-size: 13px;
  font-weight: 500;
  color: #71717a;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.main-me-page .main-me-row-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: #a1a1aa;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-row {
  background: #272825;
  color: #f1f1ea;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-row-sub,
html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-row-icon {
  color: #a8aaa0;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-row-icon {
  background: #3f423c;
}

html:is(.is-dark, [data-profile-theme="dark"]) .main-me-page .main-me-row-chevron {
  color: #7a7d76;
}

@media (min-width: 621px) {
  html.is-desktop-board .main-me-scroll {
    max-width: 430px;
    margin: 0 auto;
  }
}

/* No tags yet: no empty row on the name card (Likes and + Add are off for now). */
.main-me-tags:not(:has(.main-me-tags-scroll > *)) { display: none; }

/* The cover with weight: opening and closing ease in fast and settle slowly with no bounce
   (cubic-bezier(.16, 1, .3, 1)); letting go mid-pull springs back the same way, a little quicker.
   While pulling, the photo stretches and the name card lags behind it (me-page.js). */
.main-me-page .main-me-cover { transition: height .5s cubic-bezier(.16, 1, .3, 1); }
.main-me-page .main-me-cover-img { transform-origin: 50% 0; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.main-me-page .main-me-body { transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.main-me-page .main-me-cover.is-dragging,
.main-me-page .main-me-cover.is-dragging .main-me-cover-img,
.main-me-page .main-me-cover-layout.is-pulling .main-me-body { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .main-me-page .main-me-cover { transition: height .2s ease-out; }
  .main-me-page .main-me-cover-img, .main-me-page .main-me-body { transition: none; transform: none !important; }
}
