.site-nav .nav-links > .rules-header-tab.active {
  background: var(--bg-card-hover);
  color: #2563eb;
}

.rules-bottom-tab.active {
  color: #2563eb;
}

.rating-app-page {
  width: min(1100px, 100%);
  min-height: calc(100vh - var(--nav-height));
  margin: 0 auto;
  padding: calc(var(--nav-height) + 32px) 24px 56px;
}
.rating-app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 325px;
  align-items: start;
  gap: 28px;
}
.rating-app-main,
.rating-app-sidebar { min-width: 0; }
.rating-app-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  margin-top: 40px;
}
.rating-app-sidebar > .sidebar-legal-note { margin-top: 15px; text-align: left; }
.rating-app-sidebar .home-game-promo {
  position: relative;
  display: flex;
  min-height: 174px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 16px !important;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  transition: transform .14s ease, background .16s ease;
}
.rating-app-sidebar .home-game-promo:hover { background: #1d4ed8; color: #fff; }
.rating-app-sidebar .home-game-promo:active { transform: scale(.985); }
.rating-app-sidebar .home-game-promo-content {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 78%;
  flex-direction: column;
  align-items: flex-start;
}
.rating-app-sidebar .home-game-promo-label { margin-bottom: 4px; color: rgba(255,255,255,.7); font-size: .65rem; font-weight: 900; letter-spacing: 1px; }
.rating-app-sidebar .home-game-promo-title { margin-bottom: 6px; color: #fff; font-size: 1.18rem; line-height: 1.3; }
.rating-app-sidebar .home-game-promo-text { margin-bottom: 12px; color: rgba(255,255,255,.82); font-size: .72rem; line-height: 1.45; }
.rating-app-sidebar .home-game-promo-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 20px !important; background: rgba(0,0,0,.15); color: #fff; font-size: .7rem; font-weight: 800; }
.rating-app-sidebar .home-game-promo-icon {
  position: absolute;
  right: -12px;
  bottom: -14px;
  width: 122px;
  height: 122px;
  background: rgba(255,255,255,.16);
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 7h9a5.5 5.5 0 0 1 5.2 7.3l-1.4 4A2.5 2.5 0 0 1 16 19l-2-2h-4l-2 2a2.5 2.5 0 0 1-4.3-.7l-1.4-4A5.5 5.5 0 0 1 7.5 7ZM7 11v2H5v2h2v2h2v-2h2v-2H9v-2H7Zm9 2h2v-2h-2v2Zm-2 3h2v-2h-2v2Z'/%3E%3C/svg%3E");
  mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 7h9a5.5 5.5 0 0 1 5.2 7.3l-1.4 4A2.5 2.5 0 0 1 16 19l-2-2h-4l-2 2a2.5 2.5 0 0 1-4.3-.7l-1.4-4A5.5 5.5 0 0 1 7.5 7ZM7 11v2H5v2h2v2h2v-2h2v-2H9v-2H7Zm9 2h2v-2h-2v2Zm-2 3h2v-2h-2v2Z'/%3E%3C/svg%3E");
}

.rating-profile-card,
.rating-stats-card,
.rating-info-card,
.rating-details-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-normal) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.rating-profile-card {
  padding: 18px;
  margin-bottom: 16px;
  border-color: #2563eb !important;
}

.rating-profile-top {
  display: flex;
  align-items: center;
}

.rating-profile-avatar,
.rating-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50% !important;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}

.rating-profile-avatar {
  width: 48px;
  height: 48px;
  margin-right: 12px;
  font-size: 1.05rem;
}

.rating-profile-identity {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.rating-eyebrow,
.rating-profile-position span {
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rating-profile-identity strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-profile-identity > span {
  color: #2563eb;
  font-size: 0.72rem;
}

.rating-profile-position {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  margin-left: 12px;
  gap: 3px;
}

.rating-profile-position strong {
  color: #d97706;
  font-size: 1.35rem;
  font-weight: 900;
}

.rating-profile-points {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.rating-sparkle {
  color: #d97706;
  font-size: 1rem;
}

.rating-nearby-section {
  margin-bottom: 16px;
}

.rating-section-heading,
.rating-top-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rating-section-heading h2,
.rating-top-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.rating-section-heading p,
.rating-top-heading p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.rating-locate-icon,
.rating-ribbon-icon,
.rating-details-icon {
  display: block;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.rating-locate-icon {
  width: 20px;
  height: 20px;
  color: #2563eb;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2h2v2.1A8 8 0 0 1 19.9 11H22v2h-2.1A8 8 0 0 1 13 19.9V22h-2v-2.1A8 8 0 0 1 4.1 13H2v-2h2.1A8 8 0 0 1 11 4.1V2Zm1 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm0 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 2h2v2.1A8 8 0 0 1 19.9 11H22v2h-2.1A8 8 0 0 1 13 19.9V22h-2v-2.1A8 8 0 0 1 4.1 13H2v-2h2.1A8 8 0 0 1 11 4.1V2Zm1 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm0 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
}

.rating-rows,
.rating-top-list {
  display: grid;
  gap: 8px;
}

.rating-user-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 9px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border-normal);
  border-radius: 12px !important;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.rating-user-row:hover {
  border-color: #2563eb;
  background: var(--bg-card-hover);
}

.rating-user-row:active {
  transform: scale(0.99);
}

.rating-user-row.is-current {
  border-color: #2563eb;
  background: var(--bg-card-hover);
}

.rating-rank {
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
}

.rating-rank.is-top {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 50% !important;
  color: #fff;
}

.rating-rank.rank-1 { background: #d97706; }
.rating-rank.rank-2 { background: #64748b; }
.rating-rank.rank-3 { background: #b45309; }

.rating-user-avatar {
  width: 34px;
  height: 34px;
  margin-left: 9px;
  background: var(--bg-card-hover);
  color: #2563eb;
  font-size: 0.78rem;
}

.rating-user-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  margin-left: 10px;
}

.rating-user-copy strong {
  overflow: hidden;
  color: #2563eb;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-user-copy strong em {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 8px !important;
  background: #2563eb;
  color: #fff;
  font-size: 0.5rem;
  font-style: normal;
  vertical-align: middle;
}

.rating-user-copy small {
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.rating-user-points {
  margin-left: 12px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.rating-stats-card {
  padding: 18px;
  margin-bottom: 16px;
}

.rating-stats-card h1 {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.rating-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.rating-stats-grid > div {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.rating-stats-grid strong {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 900;
}

.rating-stats-grid strong.is-blue {
  color: #2563eb;
}

.rating-stats-grid span {
  color: var(--text-secondary);
  font-size: 0.62rem;
}

.rating-details-toggle {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 9px 13px;
  margin-bottom: 16px;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  text-align: left;
}

.rating-details-toggle:focus-visible,
.rating-load-more:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.rating-details-toggle[aria-expanded="true"] {
  border-color: #2563eb !important;
}

.rating-details-icon {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px !important;
  background: var(--bg-card-hover);
  -webkit-mask-image: none;
  mask-image: none;
}

.rating-details-icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  display: block;
  background-color: #2563eb;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v3h3v2c0 3.1-1.7 5.1-4.6 5.9A6 6 0 0 1 13 17.9V20h4v2H7v-2h4v-2.1a6 6 0 0 1-4.4-4C3.7 13.1 2 11.1 2 8V6h3V3Zm0 5H4c0 1.5.5 2.5 1.6 3.2A11 11 0 0 1 5 8Zm14 0a11 11 0 0 1-.6 3.2C19.5 10.5 20 9.5 20 8h-1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v3h3v2c0 3.1-1.7 5.1-4.6 5.9A6 6 0 0 1 13 17.9V20h4v2H7v-2h4v-2.1a6 6 0 0 1-4.4-4C3.7 13.1 2 11.1 2 8V6h3V3Zm0 5H4c0 1.5.5 2.5 1.6 3.2A11 11 0 0 1 5 8Zm14 0a11 11 0 0 1-.6 3.2C19.5 10.5 20 9.5 20 8h-1Z'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.rating-details-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  margin-left: 10px;
}

.rating-details-copy strong {
  font-size: 0.82rem;
}

.rating-details-copy small {
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.rating-details-chevron {
  width: 9px;
  height: 9px;
  margin: 0 6px 4px 12px;
  border-right: 2px solid #2563eb;
  border-bottom: 2px solid #2563eb;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.rating-details-toggle[aria-expanded="true"] .rating-details-chevron {
  margin-bottom: -4px;
  transform: rotate(225deg);
}

.rating-details-panel[hidden],
.rating-top-row[hidden] {
  display: none;
}

.rating-info-card {
  padding: 18px;
  margin-bottom: 16px;
}

.rating-info-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2563eb;
  border-radius: 50% !important;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 900;
}

.rating-ribbon-icon {
  width: 21px;
  height: 21px;
  color: #d97706;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7V22l4-2 4 2v-7.3A7 7 0 0 0 12 2Zm0 3 1.1 2.2 2.4.4-1.7 1.7.4 2.4-2.2-1.1-2.2 1.1.4-2.4-1.7-1.7 2.4-.4L12 5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7V22l4-2 4 2v-7.3A7 7 0 0 0 12 2Zm0 3 1.1 2.2 2.4.4-1.7 1.7.4 2.4-2.2-1.1-2.2 1.1.4-2.4-1.7-1.7 2.4-.4L12 5Z'/%3E%3C/svg%3E");
}

.rating-rules-list,
.rating-level-list {
  display: grid;
}

.rating-rule-row,
.rating-level-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
}

.rating-rule-points {
  min-width: 38px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px !important;
  background: color-mix(in srgb, #10b981 14%, var(--bg-card));
  color: #059669;
  font-size: 0.68rem;
  font-weight: 900;
}

.rating-rule-row > span:last-child,
.rating-level-row > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.rating-rule-row strong,
.rating-level-row strong {
  color: var(--text-primary);
  font-size: 0.72rem;
}

.rating-rule-row small,
.rating-level-row small {
  color: var(--text-secondary);
  font-size: 0.65rem;
  line-height: 1.4;
}

.rating-level-row {
  align-items: center;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 10px !important;
}

.rating-level-row.is-current {
  background: color-mix(in srgb, #10b981 12%, var(--bg-card));
}

.rating-level-number {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 800;
}

.rating-level-check {
  color: #059669;
  font-weight: 900;
}

.rating-top-heading {
  margin: 2px 2px 12px;
}

.rating-top-heading > span {
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 800;
}

.rating-empty {
  padding: 28px 16px;
  color: var(--text-secondary);
  text-align: center;
}

.rating-load-more {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  border: 1px solid var(--border-normal) !important;
  border-radius: 12px !important;
  background: var(--bg-card);
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 680px) {
  .rating-app-page {
    width: 100%;
    padding: calc(var(--nav-height) + 16px) 14px 48px;
  }

  .rating-user-points {
    font-size: 0.68rem;
  }

  .rating-user-avatar {
    display: none;
  }
}

@media (max-width: 900px) {
  .rating-app-layout { grid-template-columns: 1fr; }
  .rating-app-sidebar { position: static; margin-top: 0; }
}

@media (max-width: 420px) {
  .rating-profile-card,
  .rating-stats-card,
  .rating-info-card {
    padding: 14px;
  }

  .rating-stats-grid strong {
    font-size: 0.95rem;
  }

  .rating-stats-grid span {
    font-size: 0.56rem;
  }
}
