.profile-route #top,
.profile-route [data-cms-slot="before_footer"] { display: none; }
.profile-page {
  --profile-accent: #c5acff;
  width: min(1200px, calc(100% - 48px));
  min-height: 58vh;
  margin: 32px auto 72px;
}
:root[data-theme="light"] .profile-page { --profile-accent: #632da1; }
.profile-page [hidden] { display: none !important; }
.profile-page h1 { margin: 0 0 20px; font-size: clamp(25px, 4vw, 34px); }
.profile-hero, .profile-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}
.profile-cover {
  position: relative;
  min-height: 142px;
  height: clamp(142px, 21vw, 258px);
  background:
    radial-gradient(ellipse at 15% 120%, #ee82b5 0%, transparent 53%),
    radial-gradient(ellipse at 90% 3%, #8e61d7 0%, transparent 55%),
    linear-gradient(125deg, #422070, #6040a0 60%, #27377c);
}
.profile-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-image-button {
  position: absolute;
  color: #38214e;
  background: #f4e8ff;
  border: 1px solid #e6d5f7;
  box-shadow: 0 4px 16px #1c102e45;
}
.profile-image-button:hover { background: #fff; color: #38214e; }
.profile-image-button svg.i { width: 17px; height: 17px; }
.profile-cover .profile-image-button { top: 12px; right: 12px; }
.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 22px 18px;
}
.profile-portrait { position: relative; flex: none; margin-top: -60px; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: clamp(86px, 13vw, 132px);
  aspect-ratio: 1;
  border: 4px solid var(--surface);
  border-radius: 50%;
  overflow: hidden;
  background: #7042a3;
  color: #fff;
  font-size: clamp(30px, 6vw, 55px);
  font-weight: 800;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-portrait button { bottom: 0; right: 0; width: 38px; height: 38px; border-radius: 50%; }
.profile-identity-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.profile-identity h2 { margin: 0 0 4px; font-size: clamp(19px, 4vw, 27px); }
.profile-identity-meta, .profile-wallet, .profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.profile-identity-meta { color: var(--muted); font-size: 14px; }
.profile-role { color: var(--profile-accent); font-weight: 750; }
.profile-identity p { margin: 5px 0 0; font-size: 13px; }
.profile-header-actions { display: grid; gap: 8px; justify-items: end; }
.profile-header-actions .btn svg.i { width: 16px; height: 16px; }
.profile-wallet { font-weight: 750; }
.profile-wallet svg.i { width: 20px; height: 20px; color: var(--profile-accent); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-top: 16px; }
.profile-panel:first-child, .profile-section { padding: 16px 18px; overflow-wrap: anywhere; }
.profile-panel h2 { margin: 0; font-size: 17px; }
.profile-panel p { margin: 10px 0 0; }
#profileBio { white-space: pre-wrap; }
#profileJoined { font-size: 13px; }
.profile-edit-buttons { display: grid; gap: 8px; margin: 16px 0; }
.profile-social-title { margin: 18px 0 0; font-size: 15px; }
.profile-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 13px; }
.profile-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.profile-social-link:hover { border-color: var(--purple); }
.profile-social-fields, .profile-social-legacy { display: grid; gap: 12px; }
#myProfileForm .profile-social-field { display: grid; gap: 4px; color: var(--ink); font-weight: 650; }
.profile-social-control { position: relative; display: block; }
.profile-social-control input { width: 100%; font-weight: 400; }
.profile-social-control .profile-social-icon {
  position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); pointer-events: none;
}
.profile-social-control .profile-social-icon + input { padding-inline-start: 36px; }
.profile-social-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; font-weight: 850; line-height: 1; }
.profile-social-icon svg.i { width: 17px; height: 17px; }
.profile-social-icon.social-facebook { background: #4267b2; border-radius: 50%; color: white; }
.profile-social-icon.social-line { color: #20874b; }
.profile-social-icon.social-instagram { color: #c04c85; }
.profile-social-icon.social-youtube { color: #df4444; }
.profile-social-legacy { min-width: 0; margin: 4px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.profile-social-legacy legend { padding-inline: 5px; color: var(--muted); font-size: 13px; }
.profile-sections { display: flex; padding: 0 12px; border-bottom: 1px solid var(--line); }
.profile-sections button {
  padding: 12px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.profile-sections button[aria-pressed="true"] { color: var(--profile-accent); border-bottom-color: currentColor; }
.profile-work-kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface2);
}
.profile-work-kinds button {
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.profile-work-kinds button[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--profile-accent);
  font-weight: 750;
}
.profile-work-status { display: grid; min-height: 186px; place-content: center; justify-items: center; color: var(--muted); }
.profile-work-status svg.i { width: 34px; height: 34px; }
.profile-work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.profile-work-grid:not(:empty) { margin-top: 14px; }
.profile-work-grid .row-card { display: block; color: var(--ink); text-decoration: none; }
.profile-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin: 0 0 15px; }
.profile-facts dt { color: var(--muted); font-size: 13px; }
.profile-facts dd { margin: 4px 0 0; font-weight: 700; }
#myProfileForm h2 { margin: 0; }
#myProfileForm textarea { resize: vertical; }
#myProfileForm [hidden] { display: none !important; }
#myProfileForm p { margin: 6px 0 0; }
#settingsDialog.profile-security-mode > :is(.eyeline, h2:not(#profileSecurityTitle), .theme-options, #themeNow) { display: none; }

@media (max-width: 640px) {
  .profile-page { width: calc(100% - 24px); margin-top: 20px; }
  .profile-identity { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .profile-portrait { margin-top: -34px; }
  .profile-header-actions { flex-basis: 100%; justify-items: start; }
  .profile-sections { padding: 0 6px; }
  .profile-sections button { padding-inline: 9px; }
  .profile-layout { grid-template-columns: 1fr; }
}
