/* Scoped, light profile shell used only while an Item owner profile arrives. */
.sv-profile-hero-overlay {
  position: fixed;
  z-index: 2147483647;
  display: block;
  margin: 0;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
  background: #edf0f8;
  box-shadow: 0 16px 34px rgba(20, 29, 67, .24), 0 0 0 3px rgba(255, 255, 255, .48);
  transform-origin: top left;
  will-change: transform, opacity, border-radius;
}

html.sv-profile-hero-navigation-active,
html.sv-profile-hero-navigation-active body { overscroll-behavior: none; }

#page-wrapper[data-sevor-profile-hero-shell] {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(760px 470px at 96% -4%, rgba(106, 82, 255, .13), transparent 68%),
    radial-gradient(560px 360px at 3% 30%, rgba(0, 185, 217, .08), transparent 66%),
    #f8fafc;
}

.sv-profile-hero-shell {
  min-height: 100vh;
  min-height: 100svh;
  color: #172033;
}

/* The same box model as .public-profile-page in user.html. */
.sv-profile-hero-shell__page {
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 38px)
    max(0px, env(safe-area-inset-right, 0px))
    calc(clamp(46px, 7vw, 88px) + env(safe-area-inset-bottom, 0px))
    max(0px, env(safe-area-inset-left, 0px));
}
.sv-profile-hero-shell__page,
.sv-profile-hero-shell__page * { box-sizing: border-box; }

.sv-profile-hero-shell__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid rgba(74, 61, 165, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 6px 18px rgba(28, 33, 68, .06);
  color: #172033;
  font: 800 .91rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sv-profile-hero-shell__card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(245px, .76fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(25px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, .27);
  border-radius: clamp(26px, 4vw, 38px);
  background: linear-gradient(135deg, #5137dc 0%, #7657ff 51%, #09a8c5 118%);
  box-shadow: 0 24px 64px rgba(28, 33, 68, .11);
}

.sv-profile-hero-shell__card::before,
.sv-profile-hero-shell__card::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}
.sv-profile-hero-shell__card::before { right: -164px; bottom: -250px; width: 420px; height: 420px; background: rgba(255, 255, 255, .12); }
.sv-profile-hero-shell__card::after { top: -160px; left: 48%; width: 270px; height: 270px; border: 1px solid rgba(255, 255, 255, .24); }

.sv-profile-hero-shell__identity,
.sv-profile-hero-shell__snapshot { position: relative; min-width: 0; }
.sv-profile-hero-shell__kicker {
  display: flex;
  align-items: center;
  min-height: 1.14rem;
  margin: 0 0 15px;
}
.sv-profile-hero-shell__person { display: flex; align-items: center; gap: clamp(16px, 3vw, 25px); min-width: 0; }
.sv-profile-hero-shell__avatar {
  display: grid;
  flex: 0 0 auto;
  width: clamp(78px, 10vw, 112px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .66);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .12));
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .12), 0 16px 28px rgba(20, 12, 83, .25);
}
.sv-profile-hero-shell__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sv-profile-hero-shell__copy { display: grid; flex: 1 1 auto; align-content: start; gap: 12px; min-width: 0; }
.sv-profile-hero-shell__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sv-profile-hero-shell__share-status { display: block; min-height: 1.2em; margin: 9px 0 0; }
.sv-profile-hero-shell__snapshot {
  display: grid;
  gap: 11px;
  padding: clamp(17px, 3vw, 25px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 24px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sv-profile-hero-skeleton {
  display: block;
  height: .9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .44), rgba(255, 255, 255, .18));
  background-size: 240% 100%;
  animation: sv-profile-hero-shimmer 1.35s linear infinite;
}
.sv-profile-hero-skeleton--eyebrow { width: 34%; height: .72rem; }
.sv-profile-hero-skeleton--name { width: min(100%, 330px); height: clamp(2rem, 5vw, 4.25rem); }
.sv-profile-hero-skeleton--meta { width: 58%; height: 1.02rem; }
.sv-profile-hero-skeleton--meta-short { width: 42%; }
.sv-profile-hero-skeleton--button { width: 118px; height: 45px; }
.sv-profile-hero-skeleton--snapshot-title { width: 48%; height: 1rem; }
.sv-profile-hero-skeleton--snapshot-line { width: 88%; height: 1.35rem; }
.sv-profile-hero-skeleton--snapshot-line-short { width: 67%; }
.sv-profile-hero-skeleton--stat-label { width: 58%; height: .78rem; }
.sv-profile-hero-skeleton--stat-value { width: 34%; height: 2rem; margin-top: 9px; }
.sv-profile-hero-skeleton--stat-copy { width: 78%; height: .78rem; margin-top: 7px; }

.sv-profile-hero-shell__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: clamp(18px, 3vw, 28px) 0;
}
.sv-profile-hero-shell__stats article,
.sv-profile-hero-shell__error {
  min-width: 0;
  padding: clamp(15px, 2.4vw, 22px);
  border: 1px solid rgba(74, 61, 165, .14);
  border-radius: 20px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 32px rgba(28, 33, 68, .07);
}
.sv-profile-hero-shell__stats article { display: grid; align-content: start; }
.sv-profile-hero-shell__stats .sv-profile-hero-skeleton,
.sv-profile-hero-shell__error .sv-profile-hero-skeleton { background: linear-gradient(90deg, rgba(120, 128, 162, .12), rgba(233, 237, 249, .85), rgba(120, 128, 162, .12)); background-size: 240% 100%; }
.sv-profile-hero-shell__error { display: grid; gap: 15px; max-width: 760px; margin-top: 22px; color: #343049; }
.sv-profile-hero-shell__error-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sv-profile-hero-shell__error button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 13px; font-weight: 800; }
.sv-profile-hero-shell__error button:first-child { color: #fff; background: linear-gradient(118deg, #7a40d4, #2e63de 55%, #05a1c2); }
.sv-profile-hero-shell__error button:last-child { color: #39324f; background: #edf0f7; }

/* The shell and the real profile avatar stay behind the one floating copy
   until handoff.  This prevents two copies appearing during the 310ms move. */
:is([data-sevor-profile-hero-target], [data-sevor-profile-hero-shell-target]).sv-profile-hero-target-awaiting { opacity: 0; }

/* On iPhone/iPad WebKit the real shell avatar performs the flight.  It stays
   in document layout (rather than a body-fixed clone), so Safari cannot
   recompute it against an old browser viewport above the Back button. */
.sv-profile-hero-shell__avatar.sv-profile-hero-target-reveal {
  will-change: opacity, transform;
  transform-origin: top left;
}
.sv-profile-hero-shell__card.sv-profile-hero-shell__card-flight {
  overflow: visible;
}

/* Keep the real purple card painted during handoff.  Hiding the whole card
   here was the visible blink between the shell and public profile. */
[data-sevor-profile-detail][data-sevor-profile-entering] :is(.public-profile-hero, .public-profile-stats, .public-profile-tabs, .public-profile-panel) {
  animation: none !important;
}

@keyframes sv-profile-hero-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -140% 0; }
}

@media (max-width: 760px) {
  .sv-profile-hero-shell__page { padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  .sv-profile-hero-shell__card { grid-template-columns: 1fr; gap: 21px; }
  .sv-profile-hero-shell__snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-profile-hero-shell__snapshot .sv-profile-hero-skeleton--snapshot-title { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .sv-profile-hero-shell__person { align-items: flex-start; }
  .sv-profile-hero-skeleton--name { height: clamp(1.84rem, 9vw, 2.45rem); }
  .sv-profile-hero-shell__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-profile-hero-shell__stats article:last-child { grid-column: 1 / -1; }
  .sv-profile-hero-shell__snapshot { grid-template-columns: 1fr; }
  .sv-profile-hero-shell__snapshot .sv-profile-hero-skeleton--snapshot-title { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-profile-hero-overlay,
  .sv-profile-hero-skeleton,
  [data-sevor-profile-detail][data-sevor-profile-entering] :is(.public-profile-hero, .public-profile-stats, .public-profile-tabs, .public-profile-panel) {
    animation: none !important;
    transition: none !important;
  }
}
