.profile-page-body {
  min-height: 100vh;
  overflow-x: hidden;
}

.profile-page-main {
  padding-bottom: 44px;
  overflow-x: clip;
}

.profile-page-hero {
  padding: 12px 0 10px;
}

.profile-page-hero__inner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.profile-page-hero h1 {
  margin: 0;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.profile-page-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: #c5d8ff;
  font-size: 0.97rem;
  line-height: 1.45;
}

.profile-shell__inner {
  display: grid;
  gap: 14px;
}

.profile-loading,
.profile-error,
.profile-page {
  width: 100%;
}

.profile-loading,
.profile-error {
  padding: 24px;
  border: 1px solid rgba(151, 185, 255, 0.22);
  border-radius: 20px;
  background: rgba(10, 25, 63, 0.82);
  box-shadow: var(--shadow);
}

.profile-error__title {
  font-size: 1.08rem;
  font-weight: 800;
}

.profile-error__text {
  margin: 8px 0 0;
  color: #c6d6f6;
}

.profile-error__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.profile-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.profile-section {
  padding: 18px;
  border: 1px solid rgba(151, 185, 255, 0.22);
  border-radius: 20px;
  background: rgba(10, 25, 63, 0.84);
  box-shadow: 0 18px 48px rgba(1, 10, 31, 0.34);
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-section__head h2 {
  margin: 0;
  font-size: clamp(1.14rem, 2.3vw, 1.52rem);
  line-height: 1.1;
}

.profile-section__link,
.profile-inline-link {
  color: #8fe8ff;
  font-weight: 800;
}

.profile-summary-grid,
.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 100%;
}

.profile-surface,
.profile-action-block {
  min-height: 100%;
  padding: 16px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 16px;
  background: rgba(6, 19, 52, 0.72);
  box-sizing: border-box;
  max-width: 100%;
}

.profile-help-item {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 16px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 16px;
  background: rgba(6, 19, 52, 0.72);
  overflow: hidden;
  box-sizing: border-box;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(151, 185, 255, 0.26);
  background: linear-gradient(135deg, rgba(70, 111, 220, 0.95), rgba(40, 212, 200, 0.75));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
}

.profile-identity__copy h3 {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.4rem);
}

.profile-identity__copy p {
  margin: 4px 0 0;
  color: #d5e4ff;
  font-size: 0.95rem;
}

.profile-identity__meta {
  margin-top: 6px;
  color: #8fb1eb;
  font-size: 0.87rem;
  font-weight: 700;
}

.profile-stats-grid,
.profile-referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-surface--stats .profile-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-stat-tile {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 13, 38, 0.58);
}

.profile-stat-tile span {
  display: block;
  color: #aebad2;
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-stat-tile strong {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: clamp(1.55rem, 2.4vw, 1.92rem);
  line-height: 1;
}

.profile-summary-actions {
  margin-top: 12px;
}

.btn {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(112, 228, 240, 0.5);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(32, 108, 203, 0.2);
}

.btn--ghost {
  border-color: rgba(151, 185, 255, 0.24);
  background: rgba(7, 18, 45, 0.62);
  box-shadow: none;
}

.btn--danger {
  border-color: rgba(255, 110, 139, 0.5);
  background: linear-gradient(135deg, rgba(255, 110, 139, 0.95), rgba(255, 92, 92, 0.86));
  box-shadow: 0 12px 24px rgba(170, 28, 63, 0.24);
}

.profile-results-summary {
  color: #d1dfff;
  font-size: 0.92rem;
}

.profile-results-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(var(--results-count, 6), minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  max-width: 100%;
}

.profile-result-card {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-result-card__media {
  aspect-ratio: 1;
  border: 1px solid rgba(151, 185, 255, 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(4, 13, 38, 0.68);
}

.profile-result-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-result-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9cb7e5;
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-result-card__meta {
  color: #9db4db;
  font-size: 0.74rem;
}

.profile-result-card--cta {
  gap: 0;
}

.profile-result-card--cta .profile-result-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: linear-gradient(180deg, rgba(21, 48, 101, 0.9), rgba(8, 21, 55, 0.88));
  text-decoration: none;
}

.profile-result-card__cta-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.profile-result-card__cta-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(151, 185, 255, 0.26);
  background: rgba(255, 255, 255, 0.94);
  color: #03102b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
}

.profile-result-card__cta-label {
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
}

.profile-empty {
  margin-top: 10px;
  color: #9db4db;
}

.profile-referral-hint {
  margin-top: 10px;
  color: #c8d7f5;
  font-size: 0.91rem;
}

.profile-referral-tabs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 13, 38, 0.58);
}

.profile-referral-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aebad2;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-referral-tab.is-active {
  background: #3f7fe2;
  color: #fff;
}

.profile-referral-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-referral-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: stretch;
  max-width: 100%;
}

.profile-referral-link {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 13, 38, 0.58);
  color: #eff5ff;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
}

.profile-referral-action {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 13, 38, 0.58);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-referral-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-help-item h3,
.profile-action-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.profile-help-item p,
.profile-action-block p {
  margin: 0;
  color: #d2dff8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.profile-help-item--compact {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding-bottom: 16px;
  align-content: start;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.profile-help-item--compact > * {
  min-width: 0;
}

.profile-help-copy {
  max-width: 760px;
  min-width: 0;
}

.profile-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.profile-help-links--compact {
  margin-top: 0;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.profile-help-links--compact a {
  max-width: 100%;
}

.profile-inline-link--contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  word-break: break-word;
  max-width: 100%;
}

.profile-inline-link--contact span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-profile-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.public-profile-hero {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(151, 185, 255, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 188, 118, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(10, 31, 82, 0.96), rgba(7, 24, 66, 0.94));
  box-shadow: 0 24px 56px rgba(1, 10, 31, 0.34);
  overflow: hidden;
}

.public-profile-cover {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 124, 64, 0.94), rgba(255, 178, 142, 0.88));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  z-index: 0;
}

.public-profile-cover[data-gradient="sunset"] {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 230, 158, 0.28), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 123, 154, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(179, 80, 49, 0.94), rgba(231, 139, 97, 0.86) 48%, rgba(241, 189, 144, 0.84));
}

.public-profile-cover[data-gradient="lagoon"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(121, 255, 239, 0.22), transparent 30%),
    radial-gradient(circle at 86% 20%, rgba(118, 165, 255, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(17, 110, 137, 0.94), rgba(31, 117, 176, 0.88) 48%, rgba(38, 184, 188, 0.82));
}

.public-profile-cover[data-gradient="orchid"] {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 191, 232, 0.24), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(126, 219, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(75, 61, 151, 0.94), rgba(143, 76, 166, 0.88) 50%, rgba(199, 107, 151, 0.82));
}

.public-profile-cover[data-gradient="sage"] {
  background:
    radial-gradient(circle at 16% 18%, rgba(232, 246, 186, 0.22), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(130, 231, 210, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(52, 119, 108, 0.94), rgba(91, 142, 99, 0.88) 50%, rgba(159, 170, 97, 0.82));
}

.public-profile-cover[data-gradient="ember"] {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 211, 211, 0.24), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(255, 183, 92, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(141, 54, 92, 0.94), rgba(196, 84, 98, 0.88) 48%, rgba(225, 132, 76, 0.82));
}

.public-profile-cover[data-gradient="steel"] {
  background:
    radial-gradient(circle at 18% 16%, rgba(178, 221, 255, 0.22), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(203, 218, 255, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(40, 74, 130, 0.94), rgba(70, 111, 157, 0.9) 50%, rgba(98, 135, 148, 0.84));
}

.public-profile-cover[data-gradient^="custom-"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(124, 232, 255, 0.12), transparent 34%),
    linear-gradient(135deg, var(--public-profile-gradient-from, #1f6feb), var(--public-profile-gradient-to, #24c6dc));
}

.public-profile-cover.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 16, 43, 0.06), rgba(4, 16, 43, 0.32));
}

.public-profile-hero__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  min-height: 184px;
  padding: 0 12px;
}

.public-profile-hero__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  max-width: min(680px, 100%);
}

.public-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, rgba(205, 101, 34, 0.96), rgba(255, 167, 91, 0.92));
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.public-profile-avatar.has-image {
  color: transparent;
}

.public-profile-avatar span {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.public-profile-hero__copy {
  min-width: 0;
}

.public-profile-hero__copy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
}

.public-profile-hero__stats {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #d7e6ff;
  font-size: 0.98rem;
  font-weight: 400;
}

.public-profile-site {
  display: inline-block;
  max-width: 100%;
  margin-top: 7px;
  color: #eff6ff;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-profile-site[hidden] {
  display: none;
}

.public-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-profile-actions:not(.has-edit) {
  grid-template-columns: 1fr;
}

.public-profile-action {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.public-profile-action:hover,
.public-profile-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.public-profile-action--share {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 44%) padding-box,
    linear-gradient(135deg, #28e1ff 0%, #2c6aff 55%, #1f5be8 100%) border-box;
  border-color: rgba(93, 224, 255, 0.7);
  color: #f8fbff;
  box-shadow:
    inset 0 -2px 0 rgba(40, 225, 255, 0.34),
    0 14px 30px rgba(16, 67, 184, 0.42);
}

.public-profile-action--edit {
  background: rgba(11, 38, 105, 0.6);
  border-color: rgba(138, 180, 255, 0.4);
  color: #d9e9ff;
}

.modal-open {
  overflow: hidden;
}

.public-profile-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
}

.public-profile-editor-modal[hidden] {
  display: none;
}

.public-profile-editor-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 24, 0.72);
  backdrop-filter: blur(12px);
}

.public-profile-editor-modal__card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  margin: clamp(34px, 8vh, 90px) auto;
  overflow-y: auto;
  border: 1px solid rgba(151, 185, 255, 0.34);
  border-radius: 28px;
  background: rgba(17, 25, 43, 0.96);
  box-shadow: 0 30px 90px rgba(1, 7, 25, 0.52);
  padding: clamp(18px, 3vw, 26px);
  color: #f6f9ff;
}

.public-profile-editor-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.public-profile-editor-modal__head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1;
}

.public-profile-editor-modal__close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(151, 185, 255, 0.32);
  border-radius: 14px;
  background: rgba(7, 18, 45, 0.7);
  color: #ffffff;
  font-size: 1.7rem;
  cursor: pointer;
}

.public-profile-editor__form {
  display: grid;
  gap: 14px;
}

.public-profile-avatar-editor {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-bottom: 4px;
}

.public-profile-avatar-editor__preview {
  width: 88px;
  height: 88px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(205, 101, 34, 0.96), rgba(255, 167, 91, 0.92));
  background-position: center;
  background-size: cover;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  overflow: hidden;
}

.public-profile-avatar-editor__preview.has-image {
  color: transparent;
}

.public-profile-avatar-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-profile-avatar-editor__upload {
  position: relative;
  overflow: hidden;
}

.public-profile-avatar-editor__upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.public-profile-field {
  display: grid;
  gap: 8px;
  color: #dce9ff;
  font-size: 0.92rem;
  font-weight: 800;
}

.public-profile-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(151, 185, 255, 0.18);
  border-radius: 16px;
  background: rgba(7, 18, 45, 0.7);
  color: #fff;
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.public-profile-field input:focus {
  border-color: rgba(93, 224, 255, 0.62);
  box-shadow: 0 0 0 2px rgba(93, 224, 255, 0.16);
}

.public-profile-gradient-field {
  display: grid;
  gap: 10px;
}

.public-profile-gradient-field__title {
  color: #dce9ff;
  font-size: 0.92rem;
  font-weight: 800;
}

.public-profile-gradient-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.public-profile-gradient-option {
  min-height: 46px;
  border: 2px solid rgba(151, 185, 255, 0.24);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.public-profile-gradient-option[data-public-profile-gradient-option="sunset"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 230, 158, 0.42), transparent 35%),
    linear-gradient(135deg, #b35031, #e78b61 50%, #f1bd90);
}

.public-profile-gradient-option[data-public-profile-gradient-option="lagoon"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(121, 255, 239, 0.38), transparent 35%),
    linear-gradient(135deg, #116e89, #1f75b0 50%, #26b8bc);
}

.public-profile-gradient-option[data-public-profile-gradient-option="orchid"] {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 191, 232, 0.36), transparent 35%),
    linear-gradient(135deg, #4b3d97, #8f4ca6 50%, #c76b97);
}

.public-profile-gradient-option[data-public-profile-gradient-option="sage"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(232, 246, 186, 0.34), transparent 35%),
    linear-gradient(135deg, #34776c, #5b8e63 50%, #9faa61);
}

.public-profile-gradient-option[data-public-profile-gradient-option="ember"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 211, 211, 0.36), transparent 35%),
    linear-gradient(135deg, #8d365c, #c45462 50%, #e1844c);
}

.public-profile-gradient-option[data-public-profile-gradient-option="steel"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(178, 221, 255, 0.34), transparent 35%),
    linear-gradient(135deg, #284a82, #466f9d 50%, #628794);
}

.public-profile-gradient-option.is-active {
  border-color: rgba(96, 226, 255, 0.9);
  box-shadow:
    0 0 0 3px rgba(96, 226, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.public-profile-custom-gradient {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid rgba(151, 185, 255, 0.2);
  border-radius: 16px;
  background: rgba(7, 20, 51, 0.36);
}

.public-profile-custom-gradient.is-active {
  border-color: rgba(96, 226, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(96, 226, 255, 0.12);
}

.public-profile-custom-gradient span {
  color: #dce9ff;
  font-size: 0.9rem;
  font-weight: 800;
}

.public-profile-custom-gradient label {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(151, 185, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.public-profile-custom-gradient input {
  width: 56px;
  height: 56px;
  margin: -7px;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.public-profile-editor__actions {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.public-profile-save {
  min-height: 52px;
  min-width: 168px;
}

.public-profile-save:disabled {
  cursor: wait;
  opacity: 0.72;
}

.public-profile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.public-profile-post {
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  cursor: pointer;
  display: block;
  text-align: left;
}

.public-profile-post__card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 22px;
}

.public-profile-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.public-profile-post__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
}

.public-profile-post__favorite {
  position: absolute;
  right: 10px;
  top: 10px;
  bottom: auto;
  z-index: 2;
}

.public-profile-post__favorite.is-active {
  color: #ffffff;
}

.public-profile-post__model {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 2;
  min-width: 0;
  max-width: calc(100% - 24px);
  color: #fff;
  font-size: clamp(0.86rem, 1.15vw, 1.05rem);
  font-weight: 500;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.64);
}

.public-profile-post__author {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}

.public-profile-post__author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 22px;
  background: linear-gradient(135deg, rgba(205, 101, 34, 0.96), rgba(255, 167, 91, 0.92));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.public-profile-post__author-avatar span {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

.public-profile-post__author-avatar.has-image span {
  color: transparent;
}

.public-profile-post__author-login {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #dceaff;
  font-weight: 800;
}

.public-profile-empty {
  color: #a7bbdf;
}

.public-profile-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
}

.public-profile-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 27, 0.72);
  backdrop-filter: blur(8px);
}

.public-profile-preview-modal__card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 18px;
  border: 1px solid rgba(151, 185, 255, 0.22);
  border-radius: 20px;
  background: rgba(10, 25, 63, 0.96);
  display: grid;
  gap: 14px;
  overflow: auto;
}

.public-profile-preview-modal__close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.public-profile-preview-modal__media {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(4, 13, 38, 0.68);
}

.public-profile-preview-modal__media img {
  width: 100%;
  max-height: min(72vh, 860px);
  object-fit: contain;
}

.public-profile-preview-modal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-profile-preview-modal__meta h3 {
  margin: 0;
  font-size: 1.08rem;
}

.public-profile-preview-modal__meta p {
  margin: 6px 0 0;
  color: #c8d7f5;
  font-size: 0.92rem;
}

.profile-action-block .btn {
  margin-top: 14px;
}

.profile-action-block--danger {
  border-color: rgba(255, 110, 139, 0.26);
}

.profile-danger-confirm {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 110, 139, 0.22);
  border-radius: 14px;
  background: rgba(57, 15, 26, 0.45);
}

.profile-danger-confirm__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .profile-summary-grid,
  .profile-actions-grid {
    grid-template-columns: 1fr;
  }

  .public-profile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .profile-page-main,
  .profile-shell,
  .profile-page-hero__inner,
  .profile-page-hero__copy,
  .profile-shell__inner,
  .profile-page,
  .profile-section,
  .profile-summary-grid,
  .profile-actions-grid,
  .profile-surface,
  .profile-help-item,
  .profile-action-block {
    min-width: 0;
  }

  .profile-page-nav {
    display: none;
  }

  .profile-page-topbar__cta {
    margin-left: auto;
  }

  .profile-section {
    padding: 16px;
    border-radius: 18px;
    overflow: hidden;
  }

  .profile-surface,
  .profile-help-item,
  .profile-action-block {
    padding: 14px;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-referral-row,
  .profile-referral-stats,
  .profile-surface--stats .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-page,
  .profile-section,
  .profile-summary-grid,
  .profile-results-grid,
  .profile-referral-row,
  .profile-actions-grid,
  .profile-surface,
  .profile-help-item,
  .profile-action-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .profile-stat-tile {
    min-height: auto;
  }

  .profile-results-grid {
    width: 100%;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(148px, 58vw);
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .public-profile-hero__body {
    grid-template-columns: 1fr;
    align-items: center;
    min-height: 170px;
    padding: 0 14px;
  }

  .public-profile-hero__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .public-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .public-profile-preview-modal__meta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .profile-page-lead {
    font-size: 0.9rem;
  }

  .profile-error__actions,
  .profile-danger-confirm__actions,
  .profile-help-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-results-grid {
    grid-auto-columns: minmax(142px, 72vw);
  }

  .profile-help-item--compact {
    padding-bottom: 14px;
  }

  .public-profile-hero {
    padding: 14px;
  }

  .public-profile-cover {
    top: 14px;
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .public-profile-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.2rem;
  }

  .public-profile-hero__body {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 156px;
    padding: 0 18px;
  }

  .public-profile-hero__identity {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
  }

  .public-profile-hero__copy {
    padding-bottom: 0;
  }

  .public-profile-hero__stats {
    gap: 8px 12px;
    font-size: 0.9rem;
  }

  .public-profile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .public-profile-action {
    min-height: 48px;
    padding: 12px 10px;
    gap: 8px;
    font-size: 0.92rem;
  }

  .public-profile-editor-modal__card {
    margin: 14px auto;
    padding: 18px;
  }

  .public-profile-avatar-editor {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .public-profile-avatar-editor__actions {
    justify-content: center;
  }

  .public-profile-gradient-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .public-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .public-profile-post__card {
    border-radius: 18px;
  }

  .public-profile-post__model {
    font-size: 0.82rem;
    bottom: 10px;
  }

  .btn,
  .profile-referral-action {
    width: 100%;
  }
}
