/* ranking por nível */
.rankbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 2.5px solid #0b0910;
  border-radius: 14px;
  padding: 7px 12px;
  background: #f5c030;
  color: #0b0910;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 3px 3px 0 #0b0910;
  text-align: left;
}
.rankbar::after {
  content: "";
  position: absolute;
  inset: -9px 0;
}
.rankbar:active {
  transform: scale(0.97);
  filter: brightness(0.88);
}
.rankbar .rk1 {
  font-family: var(--f-marker);
  font-size: 18px;
  color: #a30d20;
}
.rankbar b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rankbar .rk2 {
  font-size: 12px;
}
.rankhome {
  flex: 0 1 auto;
  min-width: 0;
  box-sizing: border-box;
  width: auto;
  height: 40px;
  gap: 5px;
  border-width: 1px;
  box-shadow: none;
  border-radius: 99px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.rankhome::after {
  inset: -7px -3px;
}
@supports (overflow: clip) {
  .rankhome {
    overflow-x: clip;
    overflow-y: visible;
  }
}
.rankhome b {
  display: none;
}
.topbar:has(.chestc.on) .rankhome .rk2 {
  display: none;
}
@media (max-width: 374px) {
  .rankhome .rk2 {
    display: none;
  }
  .topbar:has(.chestc.on) .rankhome {
    display: none;
  }
}
.sheet.full .in:has(.rk-screen) {
  overflow: hidden;
  padding-bottom: calc(10px + var(--sab));
}
.rk-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}
.rk-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.rk-title {
  flex: 1;
  min-width: 0;
}
.rk-title h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1;
}
.rk-title .muted {
  font-size: 12.5px;
  font-weight: 800;
  margin-top: 2px;
}
.rk-refresh {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid #0b0910;
  background: #f5c030;
  color: #0b0910;
  display: grid;
  place-items: center;
  box-shadow: 2px 2px 0 #0b0910;
  flex: none;
}
.rk-refresh::after {
  content: "";
  position: absolute;
  inset: -6.5px;
}
.rk-head .close::after {
  inset: -4px;
}
.rk-refresh:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #0b0910;
}
.rk-refresh svg {
  width: 22px;
  height: 22px;
}
.rk-refresh.spin svg {
  animation: rkspin 0.8s linear infinite;
}
@keyframes rkspin {
  to {
    transform: rotate(360deg);
  }
}
.rk-head .close {
  width: 44px;
  height: 44px;
}
.rk-invites {
  flex: none;
  border: 2.5px solid #0b0910;
  border-radius: 16px;
  background: #f5c030;
  color: #0b0910;
  box-shadow: 3px 3px 0 #0b0910;
  padding: 8px 12px;
}
.rk-invites-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.rk-invites-head b {
  font-family: var(--f-display);
  font-size: 16px;
}
.rk-invites-none {
  font-size: 12.5px;
  font-weight: 800;
  opacity: 0.7;
  margin-left: auto;
}
.rk-badge {
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #e0243a;
  color: #fff;
  border: 2px solid #0b0910;
  font-weight: 900;
  font-size: 13px;
  display: grid;
  place-items: center;
  padding: 0 6px;
}
.rk-invites-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  max-height: 118px;
  overflow-y: auto;
}
.rk-invite {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff4c8;
  border: 2px solid #0b0910;
  border-radius: 12px;
  padding: 4px 6px 4px 10px;
}
.rk-invite-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.rk-invite-who b {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-invite-who small {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.7;
}
.rk-seg {
  flex: none;
}
.rk-seg button {
  min-height: 44px;
  font-size: 14px;
}
.rk-banner {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
  text-align: center;
  margin-top: -4px;
}
.rk-banner-offline {
  color: #0b0910;
  background: #ffd2d8;
  border: 2px solid #0b0910;
  border-radius: 12px;
  padding: 6px 10px;
  margin-top: 0;
  box-shadow: 2px 2px 0 #0b0910;
}
.rk-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 3px;
  scrollbar-width: none;
}
.rk-scroll::-webkit-scrollbar {
  display: none;
}
.rk-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 8px;
  border-radius: 16px;
  background: var(--surf);
  border: 1.5px solid var(--line);
  flex: none;
}
.rk-row.rk-has-actions {
  grid-template-columns: 30px 44px minmax(0, 1fr) auto;
}
.rk-pos {
  font-family: var(--f-marker);
  font-size: 19px;
  text-align: center;
  color: var(--ink2);
  line-height: 1;
}
.rk-pos-dock {
  font-size: 15px;
}
.rk-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surf2);
  border: 2px solid #0b0910;
  overflow: hidden;
  display: block;
}
.rk-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rk-avatar.rank-frame {
  overflow: visible;
  border-color: var(--rank-color-deep);
}
.rk-avatar.rank-frame > svg {
  border-radius: 50%;
  clip-path: circle(50%);
}
.rk-avatar .rank-badge {
  right: -5px;
  bottom: -5px;
}
.rk-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rank-color);
}
.rk-group .rank-insignia {
  width: 18px;
  height: 18px;
}
.rk-group::after {
  content: "";
  flex: 1;
  border-top: 2px solid var(--rank-color);
  opacity: 0.45;
}
.rk-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.rk-who b {
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-who small {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.rk-level {
  font-family: var(--f-marker);
  font-size: 14px;
  background: #f5c030;
  color: #0b0910;
  border: 2px solid #0b0910;
  border-radius: 10px;
  padding: 2px 8px;
  box-shadow: 2px 2px 0 #0b0910;
  white-space: nowrap;
}
.rk-medal-1 {
  background: linear-gradient(90deg, rgba(245, 192, 48, 0.28), var(--surf) 70%);
  border-color: #f5c030;
}
.rk-medal-2 {
  background: linear-gradient(90deg, rgba(201, 209, 220, 0.24), var(--surf) 70%);
  border-color: #c9d1dc;
}
.rk-medal-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.28), var(--surf) 70%);
  border-color: #cd7f32;
}
.rk-medal-1 .rk-pos,
.rk-medal-2 .rk-pos,
.rk-medal-3 .rk-pos {
  width: 30px;
  height: 30px;
  line-height: 25px;
  border-radius: 50%;
  border: 2.5px solid #0b0910;
  color: #0b0910;
  font-size: 17px;
  box-shadow: 2px 2px 0 #0b0910;
}
.rk-medal-1 .rk-pos {
  background: #f5c030;
}
.rk-medal-2 .rk-pos {
  background: #dde3ec;
}
.rk-medal-3 .rk-pos {
  background: #d98c4a;
}
.rk-mine {
  box-shadow: 0 0 0 2.5px #e0243a;
  background-color: #2a1420;
}
.rk-mine.rk-medal-1,
.rk-mine.rk-medal-2,
.rk-mine.rk-medal-3 {
  background-color: #2a1420;
}
.rk-moving {
  z-index: 2;
}
.rk-flash {
  animation: rkflash 1.3s ease-out 2;
}
@keyframes rkflash {
  0% {
    box-shadow:
      0 0 0 2.5px #e0243a,
      0 0 0 rgba(245, 192, 48, 0);
  }
  45% {
    box-shadow:
      0 0 0 3px #f5c030,
      0 0 26px rgba(245, 192, 48, 0.95);
  }
  100% {
    box-shadow:
      0 0 0 2.5px #e0243a,
      0 0 0 rgba(245, 192, 48, 0);
  }
}
.rk-btn {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  border: 2.5px solid #0b0910;
  border-radius: 12px;
  padding: 0 12px;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  box-shadow: 2px 2px 0 #0b0910;
  white-space: nowrap;
}
.rk-btn::after {
  content: "";
  position: absolute;
  inset: -6.5px -2.5px;
}
.rk-invite .rk-btn::after {
  inset: -8.5px -2.5px;
}
.rk-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #0b0910;
}
.rk-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rk-btn-invite {
  background: var(--accent);
}
.rk-btn-pending {
  background: var(--surf2);
  color: var(--ink);
}
.rk-btn-accept {
  background: var(--green);
  color: #0b0910;
}
.rk-btn-reject {
  background: var(--surf2);
  color: var(--ink);
}
.rk-invite .rk-btn {
  min-height: 40px;
  padding: 0 10px;
}
.rk-actions {
  grid-column: 1/-1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.rk-actions .rk-btn {
  flex: 1;
}
.rk-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 900;
  font-size: 12px;
  color: var(--ink2);
}
.rk-tag svg {
  width: 16px;
  height: 16px;
}
.rk-tag-friend {
  color: var(--green);
}
.rk-tag-me {
  color: #ff8fa0;
}
.rk-dock {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 4px 0 6px;
  background: linear-gradient(180deg, rgba(18, 13, 24, 0), var(--soft) 22%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}
.rk-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rk-divider::before,
.rk-divider::after {
  content: "";
  flex: 1;
  border-top: 2px dashed var(--line);
}
.rk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 36px 20px;
  border-radius: 20px;
  border: 2px dashed var(--line);
  margin-top: 6px;
}
.rk-empty b {
  font-family: var(--f-display);
  font-size: 19px;
}
.rk-empty span {
  color: var(--ink2);
  font-size: 13.5px;
  font-weight: 700;
}
.rk-skel .rk-pos,
.rk-skel .rk-avatar,
.rk-skel .rk-who b,
.rk-skel .rk-who small {
  background: var(--surf2);
  border-radius: 8px;
  animation: rkpulse 1.1s ease-in-out infinite;
}
.rk-skel .rk-pos {
  height: 20px;
}
.rk-skel .rk-avatar {
  border-color: var(--surf2);
}
.rk-skel .rk-who b {
  display: block;
  height: 14px;
  width: 60%;
}
.rk-skel .rk-who small {
  display: block;
  height: 10px;
  width: 35%;
  margin-top: 5px;
}
@keyframes rkpulse {
  50% {
    opacity: 0.45;
  }
}
.rk-scroll > .rk-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}
.rk-more {
  padding: 12px;
  text-align: center;
}
