.public-profile {
  min-height: 100%;
  color: rgba(252, 252, 255, .96);
  font: inherit;
}

.public-profile__header {
  display: flex;
  align-items: center;
  min-height: 41px;
  cursor: grab;
  touch-action: none;
}

.public-profile__header--close { justify-content: flex-end; }
.conversation-lens--moving .public-profile__header { cursor: grabbing; }

.public-profile__back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  margin: 2px 0 5px;
  padding: 0 6px 0 1px;
  border: 0;
  color: rgba(247, 248, 255, .68);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.public-profile__back:hover,
.public-profile__back:focus-visible { color: #fff; }
.public-profile__back:focus-visible { outline: 1px solid rgba(255,255,255,.55); outline-offset: 2px; border-radius: 8px; }
.public-profile__back-glyph { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.public-profile__close {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin: 2px 0 5px auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(247, 248, 255, .54);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms cubic-bezier(.22, 1, .36, 1);
}
.public-profile__close:hover,
.public-profile__close:focus-visible {
  color: rgba(255, 255, 255, .94);
  background: rgba(255, 255, 255, .13);
  outline: 0;
}
.public-profile__close:active { transform: scale(.94); }
.public-profile__close-glyph { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; }

.public-profile__body { min-height: 360px; }
.public-profile__content { display: flex; flex-direction: column; gap: 25px; padding: 1px 1px 24px; }
.public-profile__top { display: flex; align-items: center; gap: 16px; padding: 5px 2px 2px; }
.public-profile__avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.26), 0 8px 24px rgba(0,0,0,.22);
}
.public-profile__avatar--initials { display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 20px; }
.public-profile__identity { min-width: 0; }
.public-profile__name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.public-profile__identity h2 { margin: 0 0 5px; font-size: 22px; line-height: 1.05; letter-spacing: -.025em; }
.public-profile__identity p { margin: 5px 0 0; color: rgba(247,248,255,.46); font-size: 11px; }
.public-profile__location { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 3px; color: rgba(247,248,255,.7); font-size: 12px; }
.public-profile__flag { width: 17px; height: 12px; flex: 0 0 auto; margin-bottom: 5px; border-radius: 2px; object-fit: cover; }
.public-profile__pin { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; opacity: .7; }

.public-profile__section { display: grid; gap: 11px; }
.public-profile__section h3 { margin: 0; color: rgba(252,252,255,.86); font-size: 12px; font-weight: 650; letter-spacing: .015em; }

.public-profile__history-card {
  padding: 14px 15px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background:
    radial-gradient(circle at 82% -35%, rgba(173,215,255,.09), transparent 47%),
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: inset 0 1px rgba(255,255,255,.075);
}
.public-profile__history-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; }
.public-profile__history-stat { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin: 0; color: rgba(247,248,255,.48); font-size: 10px; line-height: 1.2; }
.public-profile__history-stat i { position: relative; width: 7px; height: 7px; flex: 0 0 auto; border: 1px solid rgba(210,233,252,.4); border-radius: 50%; }
.public-profile__history-stat--here i { background: rgba(199,229,253,.54); box-shadow: 0 0 9px rgba(151,204,247,.16); }
.public-profile__history-stat--together { gap: 9px; }
.public-profile__history-stat--together i {
  width: 13px;
  height: 8px;
  border: 0;
  border-radius: 0;
}
.public-profile__history-stat--together i::before,
.public-profile__history-stat--together i::after {
  content: '';
  position: absolute;
  top: 1px;
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(210,233,252,.4);
  border-radius: 50%;
}
.public-profile__history-stat--together i::before {
  left: 1px;
  background: rgba(199,229,253,.34);
}
.public-profile__history-stat--together i::after {
  right: 1px;
  background: rgba(176,210,239,.14);
}
.public-profile__history-stat strong { color: rgba(250,252,255,.82); font: inherit; font-weight: 620; }
.public-profile__recent-presence {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.065);
}
.public-profile__recent-label,
.public-profile__earlier-days { color: rgba(247,248,255,.34); font-size: 8px; }
.public-profile__recent-days { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.public-profile__recent-days li { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.public-profile__recent-days li::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(207,232,255,.72);
  box-shadow: 0 0 8px rgba(151,204,247,.17);
}
.public-profile__recent-days time { overflow: hidden; color: rgba(247,250,255,.64); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.public-profile__earlier-days { white-space: nowrap; }
.public-profile__history-note { margin: 11px 0 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.065); color: rgba(247,248,255,.4); font-size: 9px; }
.public-profile__history-hidden { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; background: rgba(255,255,255,.035); }
.public-profile__history-hidden div { display: grid; gap: 3px; }
.public-profile__history-hidden strong { font-size: 11px; font-weight: 600; }
.public-profile__history-hidden span:not(.public-profile__history-orbit) { color: rgba(247,248,255,.43); font-size: 10px; }
.public-profile__history-orbit { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: inset 8px -5px 15px rgba(255,255,255,.05); }

.public-profile__links { display: grid; gap: 5px; }
.public-profile__link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 9px 5px 6px;
  border: 0;
  border-radius: 11px;
  color: inherit;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.public-profile__link:hover { background: rgba(255,255,255,.07); }
.public-profile__link:focus-visible { outline: 1px solid rgba(255,255,255,.5); outline-offset: 1px; }
.public-profile__link-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.055); font-size: 12px; font-weight: 650; }
.public-profile__link-mark svg { width: 15px; height: 15px; }
.public-profile__platform-glyph--filled { fill: currentColor; stroke: none; }
.public-profile__platform-glyph--outline { fill: none; stroke: currentColor; stroke-width: 1.55; }
.public-profile__link-copy { display: grid; min-width: 0; gap: 1px; }
.public-profile__link-copy strong { font-size: 11px; font-weight: 600; }
.public-profile__link-copy span { overflow: hidden; color: rgba(247,248,255,.44); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.public-profile__link-arrow { color: rgba(247,248,255,.28); font-size: 13px; }

.public-profile__message, .public-profile__retry {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  color: rgba(255,255,255,.9); background: rgba(255,255,255,.08); font: inherit; font-size: 12px; cursor: pointer;
}
/* The profile owns its own vertical rhythm. Some full-height hosts historically
   pushed Message to the bottom; keeping it in flow leaves any spare room after
   the profile's content instead of between Links and Message. */
.public-profile .public-profile__content > .public-profile__message { margin-top: 0; }
.public-profile__message:hover, .public-profile__retry:hover { background: rgba(255,255,255,.13); }
.public-profile__message-glyph { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; }

.public-profile__loading { display: grid; gap: 17px; padding: 7px 2px; }
.public-profile__loading > span { display: block; background: rgba(255,255,255,.055); animation: public-profile-pulse 1.5s ease-in-out infinite alternate; }
.public-profile__loading-face { width: 72px; height: 72px; border-radius: 50%; }
.public-profile__loading-line { width: 52%; height: 18px; border-radius: 7px; }
.public-profile__loading-calendar { height: 144px; border-radius: 15px; }
.public-profile__unavailable { display: grid; justify-items: start; gap: 6px; padding: 48px 5px; }
.public-profile__unavailable strong { font-size: 13px; }
.public-profile__unavailable span { color: rgba(247,248,255,.48); font-size: 11px; }
.public-profile__retry { margin-top: 8px; padding: 0 15px; }

@keyframes public-profile-pulse { to { background: rgba(255,255,255,.1); } }

@media (pointer: coarse) {
  .public-profile__header { cursor: default; }
  .public-profile__close {
    width: 44px;
    height: 44px;
    margin-top: -3px;
    margin-bottom: 3px;
    background: transparent;
    box-shadow: none;
  }
  .public-profile__close::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  }
  .public-profile__close-glyph { position: relative; z-index: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .public-profile__loading > span { animation: none; }
  .public-profile__close { transition-duration: 1ms; }
}
/* A profile met in the room, on its own glass — deliberately not the
   conversation window. It arrives centred over a quiet scrim so it reads as
   its own moment, unrelated to any chat kept open elsewhere. */
.room-profile__backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  /* A plain dim: a filtered backdrop over the transformed room is exactly the
     compositor trap the other scrims already record. */
  background: rgba(8, 6, 5, 0.34);
  /* Animate pigment, not ancestor opacity: opacity isolates the pane's backdrop. */
  animation: room-profile-scrim-in 180ms ease;
}

.room-profile__pane {
  display: flex;
  flex-direction: column;
  width: min(352px, calc(100vw - 32px));
  max-height: min(78vh, 620px);
  min-height: 0;
  border-radius: 26px;
  padding: 12px 22px 14px;
  color: rgba(252, 252, 255, 0.96);
  /* A reading surface, not chrome: pigment carries legibility, blur is depth. */
}

.room-profile__pane .public-profile {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* The body scrolls; the header — and the way out it holds — stays put. The
   header releases its row so the identity rises beside the close button
   rather than under an empty band; the top row keeps the corner clear. */
.room-profile__pane .public-profile__header--close {
  position: relative;
  z-index: 2;
  margin-bottom: -41px;
  flex: none;
  cursor: default;
  touch-action: auto;
}

.room-profile__pane .public-profile__top {
  padding-right: 36px;
}

.room-profile__pane .public-profile__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.room-profile__pane .public-profile__body::-webkit-scrollbar {
  width: 5px;
}

.room-profile__pane .public-profile__body::-webkit-scrollbar-track {
  margin-block: 14px;
}

.room-profile__pane .public-profile__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.room-profile__pane .public-profile__content {
  min-height: 100%;
  box-sizing: border-box;
}

.room-profile__pane .public-profile__message {
  margin-top: auto;
}

@keyframes room-profile-scrim-in {
  from { background-color: transparent; }
}

@keyframes room-profile-pane-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-profile__backdrop,
  .room-profile__pane {
    animation: none;
  }
}

.room-profile__backdrop[data-mobile-presented] {display:contents;}
