.profile-person-link {
  position: relative;
  width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 15px;
  transition: background .18s ease, transform .18s ease;
}

.profile-person-link:hover {
  background: rgba(255,255,255,.68);
  transform: translateY(-1px);
}

.profile-person-content {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.profile-person-content > span:last-child:not(.profile-placeholder) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-person-chevron {
  margin-left: auto;
  color: #9ba4b0;
  font-size: 23px;
  font-weight: 500;
  transform: translateX(-2px);
}

.profile-person-link:hover .profile-person-chevron {
  color: #647dde;
}

.public-profile-view[hidden] {
  display: none !important;
}

.public-profile-view {
  position: absolute;
  inset: 0;
  z-index: 135;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6fa;
  overflow: hidden;
}

.public-profile-header {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(215,221,231,.9);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.public-profile-header-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-profile-header-copy {
  min-width: 0;
}

.public-profile-header-copy > span {
  display: block;
  margin-bottom: 4px;
  color: #6680d6;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1.25px;
}

.public-profile-header-copy h1 {
  max-width: min(52vw, 560px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202a37;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.25px;
}

.profile-mobile-menu {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
  color: #536171;
  background: #f7f8fb;
  font-size: 18px;
}

.profile-mobile-menu:hover,
.public-profile-back:hover {
  color: #4465bf;
  border-color: #d3dbeb;
  background: #f0f4ff;
}

.public-profile-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
  color: #566373;
  background: #f7f8fb;
  font-size: 27px;
  line-height: 1;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.public-profile-back:hover {
  transform: translateX(-1px);
}

.public-profile-copy-head {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  color: #5b6878;
  background: rgba(255,255,255,.92);
  font-size: 9px;
  font-weight: 850;
  box-shadow: 0 4px 14px rgba(38,50,68,.035);
  transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.public-profile-copy-head:hover,
.public-profile-copy-head.copied {
  color: #4a66c0;
  border-color: #d1d9ed;
  background: #f4f6ff;
  transform: translateY(-1px);
}

.public-profile-copy-head .ui-icon {
  width: 15px;
  height: 15px;
}

.public-profile-scroll {
  flex: 1;
  min-height: 0;
  padding: 22px 22px 38px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 88% 1%, rgba(100,126,213,.095), transparent 25%),
    radial-gradient(circle at 5% 86%, rgba(91,193,201,.07), transparent 24%),
    #f4f6fa;
}

.public-profile-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.profile-page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #dde3ec;
  border-radius: 28px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 52px rgba(37,51,72,.08);
}

.profile-page-cover {
  position: relative;
  height: 260px;
  padding: 0;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(255,255,255,.20), transparent 20%),
    radial-gradient(circle at 60% 82%, rgba(128,205,228,.20), transparent 31%),
    linear-gradient(120deg, #345a88 0%, #3b699d 34%, #4f7fb5 65%, #6c9ed1 100%);
}

.profile-page-cover::after {
  content: "";
  position: absolute;
  left: 35%;
  right: -7%;
  bottom: -74px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  transform: rotate(-4deg);
}

.profile-cover-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.profile-cover-orb-one {
  width: 270px;
  height: 270px;
  top: -166px;
  right: 4%;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.055);
}

.profile-cover-orb-two {
  width: 164px;
  height: 164px;
  top: 34px;
  right: 21%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
}

.profile-cover-orb-three {
  width: 230px;
  height: 230px;
  left: -92px;
  bottom: -126px;
  background: rgba(255,255,255,.055);
}

.profile-page-avatar-wrap {
  position: absolute;
  z-index: 5;
  left: 30px;
  bottom: -80px;
}

.profile-page-avatar {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border: 5px solid rgba(255,255,255,.98);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.95), rgba(255,255,255,.16) 37%, rgba(255,255,255,0) 38%),
    linear-gradient(145deg, #edf3fb, #dce6f4 58%, #edf6f8);
  box-shadow: 0 18px 38px rgba(27,43,65,.24);
}

.profile-page-avatar::after {
  content: "";
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: 8px;
  height: 13px;
  border-radius: 50%;
  background: rgba(43,61,80,.12);
  filter: blur(5px);
}

.profile-page-avatar .character-preview {
  position: relative;
  z-index: 2;
  width: auto;
  height: 150px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(41,58,76,.10));
}

.profile-page-body {
  position: relative;
  z-index: 4;
  min-height: 123px;
  padding: 20px 28px 14px 216px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: flex-start;
  gap: 18px 24px;
}

.profile-page-main {
  min-width: 0;
}

.profile-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.profile-page-main h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #1e2937;
  font-size: clamp(24px, 2.25vw, 30px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -.7px;
}

.profile-page-meta-row {
  margin-top: 9px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 9px;
  color: #687383;
}

.profile-page-meta-item {
  min-width: 0;
  max-width: 58%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5c6878;
  font-size: 11px;
}

.profile-page-meta-item .ui-icon {
  width: 14px;
  height: 14px;
  color: #6f89c2;
}

.profile-page-meta-item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 780;
}

.profile-page-meta-divider {
  color: #b0b7c1;
  font-size: 13px;
  line-height: 1;
}

.public-profile-presence {
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 0;
  color: #7a8592;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.public-profile-presence::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #aeb6c1;
}

.public-profile-presence.online {
  color: #2f9a4d;
  border-color: transparent;
  background: transparent;
}

.public-profile-presence.online::before {
  background: #4fc96b;
  box-shadow: 0 0 0 4px rgba(79,201,107,.10);
}

.profile-page-actions {
  justify-self: end;
  align-self: center;
}

.profile-action {
  min-height: 43px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 9px;
  font-weight: 850;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.profile-action .ui-icon {
  width: 15px;
  height: 15px;
}

.profile-action-primary {
  color: #fff;
  border-color: rgba(35,80,127,.08);
  background: linear-gradient(135deg, #365f90, #4279b2 56%, #2d608e);
  box-shadow: 0 10px 22px rgba(50,94,141,.20);
}

.profile-action-primary:hover,
.profile-action-primary.copied {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(50,94,141,.26);
}

.profile-page-tabs {
  min-height: 70px;
  padding: 10px 28px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfe;
}

.profile-page-tab {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #718090;
  background: transparent;
  font-size: 11px;
  font-weight: 820;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.profile-page-tab .ui-icon {
  width: 17px;
  height: 17px;
}

.profile-page-tab:hover {
  color: #4969b9;
  background: #f2f5fd;
}

.profile-page-tab.active {
  color: #355b96;
  border-color: #d9e2f2;
  background: #edf3fc;
  box-shadow: 0 4px 12px rgba(57,84,122,.05);
}

.profile-page-columns {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0,1.72fr) minmax(270px,.78fr);
  gap: 18px;
  align-items: start;
}

.profile-main-column,
.profile-side-column {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.profile-side-column {
  position: sticky;
  top: 0;
}

.profile-panel,
.profile-side-card {
  min-width: 0;
  border: 1px solid #dfe5ee;
  border-radius: 23px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 30px rgba(40,54,75,.05);
}

.profile-panel {
  padding: 21px;
  scroll-margin-top: 18px;
}

.profile-side-card {
  padding: 19px;
}

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-panel-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-panel-title > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 13px;
  color: #5474b2;
  background: linear-gradient(145deg, #eff5ff, #e8f0fb);
  box-shadow: inset 0 0 0 1px rgba(214,225,240,.8);
}

.profile-panel-title .ui-icon {
  width: 18px;
  height: 18px;
}

.profile-panel-head small,
.profile-panel-title small {
  display: block;
  margin-bottom: 3px;
  color: #9aa4b0;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
}

.profile-panel-head h3,
.profile-side-title {
  margin: 0;
  color: #263342;
  font-weight: 900;
}

.profile-panel-head h3 {
  font-size: 15px;
}

.profile-side-title {
  font-size: 13px;
}

.profile-empty-state {
  min-height: 190px;
  margin-top: 17px;
  padding: 18px;
  display: grid;
  grid-template-columns: 185px minmax(0,1fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 19px;
  background:
    radial-gradient(circle at 12% 18%, rgba(99,133,190,.08), transparent 35%),
    linear-gradient(145deg, #fafcff, #f7f9fc);
}

.profile-empty-visual {
  position: relative;
  height: 150px;
}

.profile-empty-tile {
  position: absolute;
  width: 84px;
  height: 98px;
  border: 1px solid rgba(210,220,234,.9);
  border-radius: 17px;
  background: linear-gradient(145deg, #e7eef8, #f5f8fc);
  box-shadow: 0 12px 24px rgba(49,69,95,.07);
}

.profile-empty-tile:nth-child(2) {
  left: 77px;
  top: 13px;
  transform: rotate(8deg);
}

.profile-empty-tile:nth-child(3) {
  left: 31px;
  top: 42px;
  transform: rotate(-8deg);
}

.profile-empty-tile-main {
  z-index: 3;
  left: 53px;
  top: 25px;
  display: grid;
  place-items: center;
  color: #5d7fb9;
  background: linear-gradient(145deg, #dce8f7, #f1f6fc);
  transform: rotate(1deg);
}

.profile-empty-tile-main .ui-icon {
  width: 26px;
  height: 26px;
}

.profile-empty-copy {
  min-width: 0;
}

.profile-empty-copy > b {
  display: block;
  color: #3a4857;
  font-size: 14px;
  font-weight: 850;
}

.profile-empty-copy p,
.profile-panel-note {
  margin: 7px 0 0;
  color: #8792a0;
  font-size: 11px;
  line-height: 1.6;
}

.profile-gifts-empty {
  min-height: 140px;
  margin-top: 17px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 22px;
  border: 1px solid #e5eaf1;
  border-radius: 19px;
  background: linear-gradient(145deg, #fcfdff, #f8f9fc);
}

.profile-gifts-wrap {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  gap: 8px;
}

.profile-gift-token {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e8f3;
  border-radius: 17px;
  color: #5879ae;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.9), transparent 34%),
    linear-gradient(145deg, #edf4ff, #e5edf8);
}

.profile-gift-token:nth-child(2) {
  color: #b08c42;
  background: linear-gradient(145deg, #fff8e9, #f7efd9);
}

.profile-gift-token:nth-child(3) {
  color: #ad6479;
  background: linear-gradient(145deg, #fff0f4, #f7e8ed);
}

.profile-gift-token:nth-child(4) {
  color: #7668b5;
  background: linear-gradient(145deg, #f4efff, #ebe8f8);
}

.profile-gift-token .ui-icon {
  width: 22px;
  height: 22px;
}

.profile-about-card {
  min-height: 112px;
  margin-top: 17px;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: start;
  gap: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 19px;
  background: #fafbfd;
}

.profile-about-card > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #667ed1;
  background: #edf1ff;
}

.profile-about-card .ui-icon {
  width: 19px;
  height: 19px;
}

.profile-about {
  margin: 0;
  color: #72808f;
  font-size: 12px;
  line-height: 1.7;
}

.profile-info-list {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.profile-info-row {
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fafbfd;
}

.profile-info-row > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #6680bc;
  background: #edf3fc;
}

.profile-info-row .ui-icon {
  width: 15px;
  height: 15px;
}

.profile-info-row > div {
  min-width: 0;
}

.profile-info-row small,
.profile-info-row b {
  display: block;
}

.profile-info-row small {
  color: #99a3ae;
  font-size: 8px;
}

.profile-info-row b {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #43505f;
  font-size: 10px;
  font-weight: 820;
}

.profile-activity-state {
  margin-top: 13px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 16px;
  background: #fafbfd;
}

.profile-activity-state > i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #aeb5bf;
  box-shadow: 0 0 0 5px rgba(174,181,191,.12);
}

.profile-activity-state > i.online {
  background: #4fc96b;
  box-shadow: 0 0 0 5px rgba(79,201,107,.12);
}

.profile-activity-state div {
  min-width: 0;
}

.profile-activity-state b {
  color: #3d4a58;
  font-size: 11px;
}

.profile-activity-state p {
  margin: 4px 0 0;
  color: #919ba7;
  font-size: 9px;
  line-height: 1.5;
}

.profile-direct-link {
  min-height: 62px;
  margin-top: 13px;
  padding: 9px 9px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #e7ebf0;
  border-radius: 15px;
  background: #fafbfd;
}

.profile-direct-link > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #6079ce;
  background: #edf1ff;
}

.profile-direct-link .ui-icon {
  width: 16px;
  height: 16px;
}

.profile-direct-link div {
  min-width: 0;
}

.profile-direct-link small,
.profile-direct-link b {
  display: block;
}

.profile-direct-link small {
  color: #a0a8b3;
  font-size: 8px;
}

.profile-direct-link b {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4d5a69;
  font-size: 9px;
}

.profile-direct-link button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid #dfe5f5;
  border-radius: 10px;
  color: #6077ca;
  background: #f0f3ff;
  font-size: 8px;
  font-weight: 900;
}

.profile-direct-link button:hover,
.profile-direct-link button.copied {
  color: #4e67bd;
  background: #e7ecff;
}

.profile-side-card .public-profile-world {
  width: 100%;
  min-height: 68px;
  margin-top: 13px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) auto 17px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e7ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff, #f7f9fc);
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.profile-side-card .public-profile-world:hover {
  border-color: #ced8e8;
  background: #f5f8fd;
  transform: translateY(-1px);
}

.profile-side-card .public-profile-world > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #66d3ad, #45b98f);
  box-shadow: 0 0 0 5px rgba(83,196,155,.11);
}

.profile-side-card .public-profile-world div {
  min-width: 0;
}

.profile-side-card .public-profile-world small,
.profile-side-card .public-profile-world b {
  display: block;
}

.profile-side-card .public-profile-world small {
  color: #9aa4b0;
  font-size: 8px;
}

.profile-side-card .public-profile-world b {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #364352;
  font-size: 9px;
  font-weight: 850;
}

.profile-side-card .public-profile-world em {
  font-style: normal;
  color: #6078cc;
  font-size: 8px;
  font-weight: 900;
}

.profile-side-card .public-profile-world .ui-icon {
  width: 15px;
  height: 15px;
  color: #8997a8;
}

@media (max-width: 1024px) {
  .public-profile-view {
    position: fixed;
    inset: 0;
    z-index: 160;
  }

  .profile-mobile-menu {
    display: grid;
  }

  .public-profile-header {
    min-height: 70px;
    padding: max(9px, env(safe-area-inset-top)) 12px 9px;
  }

  .public-profile-scroll {
    padding: 16px 12px calc(28px + env(safe-area-inset-bottom));
  }

  .profile-page-columns {
    grid-template-columns: 1fr;
  }

  .profile-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 780px) {
  .public-profile-header-copy h1 {
    font-size: 18px;
  }

  .profile-page-hero {
    border-radius: 23px;
  }

  .profile-page-cover {
    height: 220px;
    padding: 18px;
  }

  .profile-page-avatar-wrap {
    left: 20px;
    bottom: -64px;
  }

  .profile-page-avatar {
    width: 132px;
    height: 132px;
    border-width: 4px;
    border-radius: 50%;
  }

  .profile-page-avatar .character-preview {
    height: 124px;
  }

  .profile-page-body {
    min-height: 118px;
    padding: 18px 16px 14px 172px;
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .profile-page-actions {
    justify-self: start;
  }

  .profile-page-main h2 {
    font-size: 26px;
  }

  .profile-page-tabs {
    min-height: 64px;
    padding: 8px 16px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .profile-page-tabs::-webkit-scrollbar {
    display: none;
  }

  .profile-page-tab {
    flex: 0 0 auto;
  }

  .profile-panel,
  .profile-side-card {
    border-radius: 20px;
  }

  .profile-panel {
    padding: 18px;
  }

  .profile-side-card {
    padding: 17px;
  }

  .profile-empty-state {
    grid-template-columns: 150px minmax(0,1fr);
    gap: 18px;
  }

  .profile-empty-visual {
    transform: scale(.86);
    transform-origin: left center;
  }

  .profile-side-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .public-profile-header {
    gap: 8px;
  }

  .public-profile-header-left {
    gap: 8px;
  }

  .public-profile-header-copy > span {
    display: none;
  }

  .public-profile-header-copy h1 {
    max-width: 36vw;
    font-size: 16px;
  }

  .public-profile-copy-head {
    width: 38px;
    padding: 0;
  }

  .public-profile-copy-head span {
    display: none;
  }

  .profile-page-cover {
    height: 190px;
  }

  .profile-page-avatar-wrap {
    left: 50%;
    bottom: -63px;
    transform: translateX(-50%);
  }

  .profile-page-avatar {
    width: 126px;
    height: 126px;
  }

  .profile-page-avatar .character-preview {
    height: 118px;
  }

  .profile-page-body {
    min-height: 0;
    padding: 72px 14px 16px;
    text-align: center;
  }

  .profile-name-row,
  .profile-page-meta-row {
    justify-content: center;
  }

  .profile-page-main h2 {
    font-size: 24px;
  }

  .profile-page-actions {
    width: 100%;
    justify-self: stretch;
  }

  .profile-action {
    width: 100%;
  }

  .profile-page-tabs {
    padding: 9px 10px 11px;
    justify-content: flex-start;
  }

  .profile-page-tab {
    flex: 1 0 auto;
    padding: 0 11px;
  }

  .profile-page-columns {
    margin-top: 12px;
    gap: 12px;
  }

  .profile-main-column,
  .profile-side-column {
    gap: 12px;
  }

  .profile-panel {
    padding: 16px;
  }

  .profile-side-card {
    padding: 15px;
  }

  .profile-empty-state {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
    text-align: center;
  }

  .profile-empty-visual {
    width: 170px;
    height: 122px;
    margin: 0 auto;
    transform: scale(.78);
    transform-origin: center center;
  }

  .profile-gifts-empty {
    grid-template-columns: 1fr;
    gap: 13px;
    text-align: center;
  }

  .profile-gifts-wrap {
    margin: 0 auto;
  }

  .profile-about-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-direct-link {
    grid-template-columns: 34px minmax(0,1fr);
  }

  .profile-direct-link button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-side-card .public-profile-world {
    grid-template-columns: 10px minmax(0,1fr) 16px;
  }

  .profile-side-card .public-profile-world em {
    display: none;
  }
}

@media (max-width: 380px) {
  .public-profile-header-copy {
    display: none;
  }

  .profile-page-cover {
    height: 178px;
    padding: 14px;
  }

  .profile-page-main h2 {
    font-size: 23px;
  }

  .profile-page-meta-row {
    gap: 7px;
  }

  .profile-page-tab {
    min-width: 104px;
  }
}

#people .location-person-link {
  width: 31px;
  height: 31px;
  margin-left: -7px;
  display: block;
  flex: 0 0 31px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform .15s ease;
}

#people .location-person-link:first-child {
  margin-left: 0;
}

#people .location-person-link:hover {
  position: relative;
  z-index: 3;
  transform: translateY(-2px);
}

/* v163: square profile gift collection */
.profile-gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 17px;
}
.profile-gifts-grid:empty { display:none; }
.profile-gift-card {
  min-width: 0;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
  background: linear-gradient(145deg,#fff,#f8f9fc);
  box-shadow: 0 5px 18px rgba(34,43,67,.06);
}
.profile-gift-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px 12px 46px;
  overflow: hidden;
  background: linear-gradient(145deg,#fff7fb,#f6f1ff);
}
.profile-gift-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.profile-gift-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-width: 0;
  padding: 18px 10px 9px;
  background: linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.94) 42%,#fff 100%);
}
.profile-gift-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a95a3;
  font-size: 9px;
  line-height: 1.25;
}
.profile-gift-copy small.clickable { cursor:pointer; }
.profile-gift-copy small.clickable:hover { color:#667ed1; }
.profile-gift-visual.missing { color:#a7b0bc;background:#f3f5f7; }
.profile-gift-visual.missing svg { width:34px;height:34px;display:block; }
@media (max-width: 640px) {
  .profile-gifts-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap:8px; }
  .profile-gift-card { border-radius:14px; }
  .profile-gift-visual { padding: 8px 8px 38px; }
  .profile-gift-copy { padding: 14px 7px 7px; }
  .profile-gift-copy small { font-size:8px; }
}
@media (max-width: 360px) {
  .profile-gifts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.profile-gifts-empty[hidden] { display:none !important; }
