/* Player profile, rankings and recovery page. */

.profile-head {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface)
}

.profile-cover {
  height: 180px;
  background-image: linear-gradient(0deg,var(--color-surface),transparent),url('/assets/community-hero.webp');
  background-size: cover;
  background-position: center 42%
}

.profile-cover-glow,.profile-av-ring::before,.profile-av-ring::after {
  display: none
}

.profile-body {
  padding: 0 32px 32px;
  display: flex;
  align-items: end;
  gap: 24px;
  position: relative;
  margin-top: -40px;
  flex-wrap: wrap
}

.profile-av {
  position: relative;
  flex-shrink: 0
}

.profile-av-img {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  object-fit: cover;
  border: 5px solid var(--color-surface);
  background: var(--color-surface-elevated)
}

.profile-av-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--color-surface);
  bottom: 8px;
  inset-inline-end: 8px
}

.profile-info {
  flex: 1;
  min-width: 0;
  padding-top: 48px
}

.profile-name {
  font-size: 30px;
  overflow-wrap: anywhere
}

.profile-un {
  font-size: 13px;
  font-family: var(--font-latin);
  color: var(--ts);
  direction: ltr;
  text-align: right;
  margin-top: 8px
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px
}

.profile-badges .role-chip {
  font-size: 11px
}

.profile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.profile-actions .btn {
  font-size: 13px;
  min-height: 44px;
  padding: 9px 14px
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-top: 24px
}

.stat-card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--color-surface)
}

.stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary-subtle);
  color: var(--p);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-size: 16px
}

.stat-num {
  font: 700 28px/1.25 var(--font-latin);
  color: var(--t);
  font-variant-numeric: tabular-nums
}

.stat-lbl {
  font-size: 13px;
  color: var(--ts);
  margin-top: 8px
}

.profile-section {
  margin-top: 64px
}

.profile-section .sec-h {
  margin-bottom: 24px
}

.profile-section .sec-title {
  font-size: 26px;
  margin-bottom: 8px
}

.profile-section .sec-desc {
  font-size: 15px
}

.own-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px
}

.own-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden
}

.own-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--color-surface-elevated)
}

.own-body {
  padding: 20px
}

.own-body h3 {
  font-size: 18px;
  margin-bottom: 12px
}

.own-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ts)
}

.own-qty {
  color: var(--p)
}

.own-badge {
  position: absolute;
  inset: 12px 12px auto auto;
  background: var(--color-glass);
  padding: 4px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 11px
}

.timeline {
  display: grid;
  gap: 16px;
  border-inline-start: 1px solid var(--color-border);
  padding-inline-start: 24px;
  margin-inline-start: 8px
}

.tl-item {
  position: relative
}

.tl-dot {
  position: absolute;
  inset: 24px auto auto -29px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--p)
}

[dir=rtl] .tl-dot {
  inset: 24px -29px auto auto
}

.tl-card {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md)
}

.tl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap
}

.tl-head>i {
  color: var(--p)
}

.tl-title {
  font-size: 15px;
  font-weight: 700
}

.tl-time {
  margin-inline-start: auto;
  font-size: 12px;
  color: var(--ts)
}

.tl-desc {
  font-size: 14px;
  margin-top: 12px
}

.auth-gate {
  max-width: 600px;
  margin: 40px auto;
  padding: 48px 40px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  text-align: center
}

.auth-gate-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--color-primary-subtle);
  color: var(--p);
  font-size: 28px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px
}

.auth-gate h1 {
  font-size: 28px;
  margin-bottom: 16px
}

.auth-gate p {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 28px
}

.profile-page-heading {
  margin-bottom: 32px
}

.profile-page-heading h1 {
  font-size: var(--text-xl)
}

.rankings-page .page-wrap {
  max-width: 960px
}

.rankings-page .sec-h {
  max-width: 640px
}

.rankings-page .lb-tabs {
  margin-bottom: 32px
}

.ranking-panel {
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  min-height: 360px
}

.ranking-panel .lb-pcard,.ranking-panel .lb-card {
  background: var(--color-background)
}

.ranking-panel .lb-pcard.p1 {
  background: var(--color-primary-subtle)
}

.ranking-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ts);
  display: flex;
  gap: 8px;
  align-items: center
}

.ranking-note i {
  color: var(--p)
}

.err {
  padding-block: 64px 80px;
  min-height: 70vh
}

.err-inner {
  width: min(calc(100% - var(--gutter)*2),900px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 48px
}

.err-num {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr;
  font: 900 clamp(120px,17vw,220px)/1 var(--font-latin);
  color: var(--p);
  opacity: .8;
  letter-spacing: -.08em
}

.err-num svg,.err-num .num-ring,.err-num .num-orb {
  display: none
}

.err-num::after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  z-index: -1
}

.err-card {
  background: transparent
}

.err-tag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--p);
  margin-bottom: 24px
}

.err-title {
  font-size: 32px;
  line-height: 1.45;
  margin-bottom: 20px
}

.err-desc {
  font-size: 16px;
  line-height: 1.9
}

.err-btns {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap
}

.err-glow,.err-orb,.orbit {
  display: none
}

@media(max-width:960px) {

  .profile-actions {
    width: 100%;
    padding-top: 12px
  }

  .profile-stats {
    gap: 12px
  }

  .own-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }

  .err-inner {
    gap: 32px
  }

  .err-title {
    font-size: 28px
  }
}

@media(max-width:600px) {

  .profile-cover {
    height: 140px
  }

  .profile-body {
    padding: 0 20px 24px;
    gap: 16px;
    margin-top: -32px;
    align-items: start
  }

  .profile-av-img {
    width: 80px;
    height: 80px;
    border-radius: 20px
  }

  .profile-info {
    padding-top: 36px
  }

  .profile-name {
    font-size: 23px
  }

  .profile-un {
    font-size: 11px
  }

  .profile-badges {
    margin-top: 12px
  }

  .profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px
  }

  .profile-actions .btn:first-child {
    grid-column: 1/-1
  }

  .profile-stats {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    margin-top: 16px
  }

  .stat-card {
    padding: 20px
  }

  .stat-ico {
    margin-bottom: 16px
  }

  .stat-num {
    font-size: 24px
  }

  .stat-lbl {
    font-size: 12px
  }

  .profile-section {
    margin-top: 40px
  }

  .own-grid {
    grid-template-columns: minmax(0,1fr)
  }

  .tl-card {
    padding: 20px
  }

  .tl-time {
    margin-inline-start: 0;
    flex-basis: 100%
  }

  .auth-gate {
    padding: 32px 24px;
    margin: 20px auto
  }

  .auth-gate h1 {
    font-size: 25px
  }

  .ranking-panel {
    padding: 16px 12px;
    border-radius: 20px;
    min-height: 300px
  }

  .rankings-page .lb-tabs {
    margin-bottom: 24px
  }

  .rankings-page .lb-tab {
    font-size: 14px
  }

  .ranking-note {
    font-size: 12px;
    align-items: start
  }

  .err {
    padding-block: 40px 64px
  }

  .err-inner {
    grid-template-columns: minmax(0,1fr);
    gap: 36px;
    text-align: center
  }

  .err-num {
    font-size: 128px
  }

  .err-num::after {
    width: 160px;
    height: 160px
  }

  .err-title {
    font-size: 27px
  }

  .err-tag {
    justify-content: center
  }

  .err-btns {
    flex-direction: column
  }

  .err-desc {
    font-size: 15px
  }

  .err-card {
    max-width: 440px;
    margin: auto
  }
}
