.profile-page {
  display: grid;
  align-content: start;
  gap: 18px;
}

.profile-heading {
  margin-bottom: 0;
}

.profile-heading .page-kicker {
  margin: 0;
}

.profile-shell {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.profile-shell--empty {
  display: grid;
  place-items: center;
  width: min(760px, 100%);
  min-height: 360px;
  margin: 0 auto;
  padding: 24px;
}

.profile-empty-card {
  width: min(560px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-empty-card h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
}

.profile-empty-card > p:not(.dashboard-kicker) {
  max-width: 420px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-card-main {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(47, 199, 255, 0.16), transparent 44%),
    rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.profile-card-main > :not(.profile-achievement-backdrop) {
  position: relative;
  z-index: 2;
}

.profile-card-main--achievement::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 25, 38, 0.9) 0%, rgba(13, 25, 39, 0.7) 30%, rgba(11, 19, 31, 0.24) 58%, rgba(15, 21, 32, 0.78) 100%),
    linear-gradient(180deg, rgba(7, 12, 20, 0.12), rgba(7, 12, 20, 0.38));
  pointer-events: none;
}

.profile-achievement-backdrop {
  position: absolute;
  z-index: 0;
  top: 8%;
  right: 2.5%;
  display: block;
  width: 95%;
  height: 84%;
  object-fit: contain;
  object-position: right center;
  opacity: 0.72;
  filter: saturate(1.12) contrast(1.04);
  pointer-events: none;
  user-select: none;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.profile-identity {
  min-width: 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.profile-actions .dashboard-button {
  min-width: 138px;
}

.profile-nameplate {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 66px;
}

.profile-card-main h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.profile-nameplate h1 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-role-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-bottom: 8px;
}

.profile-role-line {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-card-main span {
  color: var(--muted);
  font-weight: 900;
}

.profile-account-ban {
  margin: 24px 24px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 91, 115, 0.38);
  border-left: 3px solid #ff5b73;
  border-radius: 8px;
  background: rgba(255, 91, 115, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.profile-account-ban .dashboard-kicker {
  margin: 0 0 4px;
  color: #ff8fa1;
}

.profile-account-ban h2,
.profile-account-ban p {
  margin: 0;
}

.profile-account-ban h2 {
  font-size: 22px;
}

.profile-account-ban p {
  min-width: 180px;
  color: var(--muted);
  text-align: right;
}

.profile-account-ban p span,
.profile-account-ban p strong {
  display: block;
}

.profile-account-ban p span {
  margin-bottom: 3px;
  font-size: 12px;
  text-transform: uppercase;
}

.profile-role-row .profile-presence {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-account-ban p strong {
  color: #fff;
  font-size: 16px;
}

.profile-private {
  padding: 34px;
}

.profile-private h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.profile-private p,
.profile-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-blocked {
  min-height: 220px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255, 77, 105, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.025);
}

.profile-blocked h2 {
  color: #ffb2bf;
}

.profile-admin-notice {
  margin: 24px 24px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 14px;
  color: #ffd166;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
}

.profile-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-disclosure {
  padding: 0;
  overflow: hidden;
}

.profile-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-disclosure-summary {
  align-items: center;
  margin: 0;
  padding: 22px;
  list-style: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.profile-disclosure-summary::-webkit-details-marker {
  display: none;
}

.profile-disclosure-summary::marker {
  content: "";
}

.profile-disclosure-label {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.profile-disclosure-label .dashboard-kicker {
  display: block;
  margin-bottom: 4px;
}

.profile-disclosure-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin: 0 4px 4px 2px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform 160ms ease, margin 160ms ease;
}

.profile-disclosure[open] > .profile-disclosure-summary,
.profile-disclosure.is-expanded > .profile-disclosure-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-disclosure[open] > .profile-disclosure-summary::after,
.profile-disclosure.is-expanded > .profile-disclosure-summary::after {
  margin-top: 5px;
  margin-bottom: 0;
  transform: rotate(225deg);
}

.profile-disclosure.is-disclosure-controlled:not(.is-expanded) > .profile-disclosure-summary {
  border-bottom: 0;
}

.profile-disclosure.is-disclosure-controlled:not(.is-expanded) > .profile-disclosure-summary::after {
  margin-top: 0;
  margin-bottom: 4px;
  transform: rotate(45deg);
}

.profile-disclosure-summary:hover,
.profile-disclosure-summary:focus-visible {
  background: rgba(47, 199, 255, 0.055);
  outline: none;
}

.profile-disclosure-summary:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(47, 199, 255, 0.32);
}

.profile-panel-head h2,
.profile-disclosure-title {
  display: block;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.profile-panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 34px;
  border: 1px solid rgba(47, 199, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(47, 199, 255, 0.1);
  font-weight: 900;
}

.profile-panel-count--text {
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  color: var(--cyan);
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.profile-panel--achievements .profile-disclosure-summary,
.profile-panel--subscriptions .profile-disclosure-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.profile-panel--achievements .profile-disclosure-label,
.profile-panel--subscriptions .profile-disclosure-label {
  margin-right: 0;
}

.profile-achievement-list {
  display: grid;
  gap: 12px;
  padding: 18px 22px 22px;
}

.profile-achievement-item {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-achievement-item.is-selected {
  border-color: rgba(47, 199, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(47, 199, 255, 0.09), transparent 62%),
    rgba(255, 255, 255, 0.04);
}

.profile-achievement-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 5 / 1;
  min-height: 58px;
}

.profile-achievement-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.profile-achievement-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.profile-achievement-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-achievement-title h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.profile-achievement-title span {
  padding: 5px 9px;
  border: 1px solid rgba(47, 199, 255, 0.3);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(47, 199, 255, 0.09);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.profile-achievement-copy p,
.profile-achievement-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.profile-disclosure > .profile-muted {
  padding: 18px 22px 22px;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
}

.profile-facts div {
  display: grid;
  gap: 5px;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.profile-presence__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #718096;
}

.profile-presence--online {
  color: #51e6ad !important;
}

.profile-presence--online .profile-presence__dot {
  background: #51e6ad;
  box-shadow: 0 0 0 4px rgba(81, 230, 173, 0.13), 0 0 16px rgba(81, 230, 173, 0.48);
}

.profile-presence--recently {
  color: var(--cyan) !important;
}

.profile-presence--recently .profile-presence__dot {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(47, 199, 255, 0.12);
}

.profile-subscriptions {
  margin: 0;
  padding: 18px 22px 22px;
}

.profile-subscription {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.profile-subscription .subscription-content {
  grid-template-columns: 1fr;
}

.profile-subscription .subscription-main p {
  grid-column: 1;
}

.profile-subscription .subscription-main h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

@media (max-width: 760px) {
  .profile-account-ban {
    margin: 18px 18px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .profile-account-ban p {
    min-width: 0;
    text-align: left;
  }

  .profile-card-main,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-card-main {
    justify-items: start;
  }

  .profile-card-main--achievement::after {
    background:
      linear-gradient(180deg, rgba(10, 22, 35, 0.28) 0%, rgba(10, 22, 35, 0.5) 34%, rgba(9, 18, 30, 0.94) 52%, rgba(9, 17, 29, 0.98) 100%),
      linear-gradient(90deg, rgba(10, 24, 38, 0.72), rgba(11, 19, 31, 0.2));
  }

  .profile-identity {
    width: 100%;
  }

  .profile-role-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .dashboard-button {
    width: 100%;
  }

  .profile-nameplate h1 {
    font-size: clamp(28px, 10vw, 46px);
  }

  .profile-achievement-backdrop {
    top: 12px;
    right: 2%;
    width: 84%;
    height: 122px;
    object-position: right center;
    opacity: 0.44;
  }

  .profile-shell--empty {
    min-height: 300px;
  }

  .profile-empty-card {
    padding: 24px;
  }

  .profile-panel,
  .profile-subscriptions,
  .profile-subscription,
  .profile-subscription .subscription-content,
  .profile-subscription .subscription-card__header {
    min-width: 0;
    max-width: 100%;
  }

  .profile-disclosure-summary {
    padding: 18px;
  }

  .profile-panel--achievements .profile-disclosure-summary,
  .profile-panel--subscriptions .profile-disclosure-summary {
    gap: 10px;
  }

  .profile-panel-count--text {
    font-size: 12px;
  }

  .profile-achievement-list,
  .profile-subscriptions,
  .profile-disclosure > .profile-muted {
    padding: 16px 18px 18px;
  }

  .profile-achievement-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .profile-subscription {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-disclosure-summary,
  .profile-disclosure-summary::after {
    transition: none;
  }
}
