.profile-page,.profile-dialog {
  --paper:#FAF9F8;
  --ink:#2D2A26;
  --muted:#8B8580;
  --red:#C9475D;
  --line:#EAE5DF;
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:15px;
  line-height:1.5
}
:where(.profile-page,.profile-dialog) button {
  font:inherit;
  color:inherit;
  cursor:pointer
}
.profile-page button,.profile-page a,.profile-dialog button {
  -webkit-tap-highlight-color:transparent
}
.profile-page [hidden],.profile-dialog[hidden] {
  display:none!important
}
.icon-definitions {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}
.profile-icon {
  width:20px;
  height:20px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  color:var(--muted)
}
.profile-page {
  max-width:720px;
  margin:0 auto;
  padding:0 0 24px
}
.profile-photo {
  position:relative;
  aspect-ratio:1;
  background:#E7E2DD;
  border-radius:24px 24px 0 0;
  overflow:hidden
}
.profile-photo>img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover
}
.profile-photo:after {
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:10px;
  background:var(--paper);
  border-radius:24px 24px 0 0
}
.photo-error {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#655F59;
  background:#E7E2DD
}
.photo-thumbnails {
  position:absolute;
  bottom:24px;
  left:16px;
  right:16px;
  display:flex;
  gap:8px;
  overflow:auto;
  padding:4px
}
.photo-thumbnail {
  flex:none;
  width:46px;
  height:46px;
  padding:0;
  overflow:hidden;
  border-radius:10px;
  border:2px solid #fff;
  background:#E7E2DD
}
.photo-thumbnail[aria-pressed=true] {
  border-color:var(--red);
  box-shadow:0 0 0 2px white
}
.photo-thumbnail img {
  width:100%;
  height:100%;
  object-fit:cover
}
.public-profile-card {
  background:var(--paper);
  padding:20px;
  border-radius:22px
}
.profile-basic {
  padding-top:0;
  padding-bottom:16px;
  border-radius:0 0 24px 24px
}
.profile-identity {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 8px;
  padding-bottom:6px;
  border-bottom:1px solid var(--line)
}
.front-body .profile-page h1 {
  font-size:26px;
  font-weight:400;
  line-height:1.35;
  margin:0 8px 0 0;
  overflow-wrap:anywhere;
  max-width:100%
}
.trust-badge {
  display:block;
  border:0;
  padding:0;
  width:56px;
  height:56px;
  background:none;
  flex:none
}
.trust-badge img {
  display:block
}
.profile-section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
  padding-top:8px;
  margin-bottom:8px
}
.front-body .profile-page h2 {
  font-size:17px;
  line-height:1.5;
  font-weight:600;
  margin:0;
  display:flex;
  align-items:center;
  gap:10px
}
.profile-page h2 .profile-icon {
  color:#655F59
}
.profile-activity {
  font-size:12px;
  color:#655F59;
  border-radius:20px;
  background:#F0EDE8;
  padding:5px 9px
}
.profile-activity:before {
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:6px;
  border-radius:50%;
  background:#5D9275
}
.profile-fact {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:8px 0;
  overflow-wrap:anywhere
}
.profile-fact>.profile-icon {
  margin-top:2px
}
.profile-fact>div,.profile-fact>span {
  min-width:0
}
.profile-vip {
  display:inline-flex;
  vertical-align:middle;
  align-items:center;
  gap:5px;
  margin-left:8px;
  padding:5px 10px;
  background:#FFF0F3;
  border-radius:10px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.5px
}
.profile-personal {
  margin-top:12px
}
.profile-personal h2 {
  margin-bottom:8px
}
.profile-personal h3 {
  font-size:14px;
  font-weight:400;
  color:var(--muted);
  margin:20px 0 12px
}
.profile-interests {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.profile-interests span {
  padding:6px 12px;
  border-radius:12px;
  background:#F3EFEB;
  overflow-wrap:anywhere;
  max-width:100%
}
.profile-open-bar {
  position:fixed;
  z-index:3;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:720px;
  background:var(--paper);
  padding:12px max(20px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 20px #2D2A2608
}
.open-app,.dialog-close {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:12px 20px;
  border:0;
  border-radius:16px;
  background:var(--red);
  color:#fff;
  font-size:17px;
  font-weight:600;
  width:100%
}
.app-fallback {
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  justify-content:center;
  margin-top:8px;
  font-size:13px
}
.app-fallback a,.profile-open-bar noscript a {
  color:var(--red);
  text-decoration:underline
}
.profile-dialog {
  border:1px solid var(--line);
  border-radius:24px;
  width:calc(100% - 40px);
  max-width:340px;
  padding:24px;
  background:var(--paper);
  color:var(--ink);
  text-align:center;
  max-height:85dvh;
  overflow:auto
}
.profile-dialog::backdrop {
  background:#17141866
}
.profile-dialog>img {
  display:block;
  margin:0 auto 16px
}
.profile-dialog h2 {
  display:block;
  font-size:20px
}
.profile-dialog p {
  margin:14px 0 24px;
  font-size:15px;
  line-height:1.7
}
.profile-dialog .dialog-close {
  min-height:48px;
  font-size:16px
}
/* Keep tablet sizing based on width; a short desktop window must not become a phone column. */
.profile-details {
  min-width:0
}
@media(min-width:900px) {
  .profile-page {
    display:grid;
    grid-template-columns:minmax(0, .95fr) minmax(0, 1.05fr);
    align-items:start;
    gap:28px;
    max-width:1120px;
    padding:0 0 48px
  }
  .profile-photo {
    border-radius:24px
  }
  .profile-photo:after {
    display:none
  }
  .profile-basic {
    padding:24px;
    border-radius:24px
  }
  .profile-personal {
    padding:24px;
    margin-top:16px
  }
  .profile-open-bar {
    position:static;
    transform:none;
    max-width:none;
    margin-top:16px;
    padding:20px 24px;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:none
  }
}
@media(min-width:900px) and (min-height:650px) {
  .profile-photo {
    position:sticky;
    top:100px
  }
}
@media(prefers-reduced-motion:no-preference) {
  .profile-page button:active,.profile-page .open-app:active,.profile-dialog button:active {
    transform:scale(.98)
  }
}

/* Reuse the website shell and keep the fixed mobile action clear of its footer. */
.front-body.profile-detail-body .page-shell {
  max-width:1120px
}
@media(max-width:899px) {
  .front-body.profile-detail-body .site-footer {
    padding-bottom:calc(140px + env(safe-area-inset-bottom))
  }
}
