:root {
  --prs-color: #cec188;
  --prs-icon: url("/images/misc_icons/prs.png");
  --discord-icon: url("/images/social_icons/discord.png");
  --roblox-icon: url("/images/social_icons/roblox.png");
  --youtube-icon: url("/images/social_icons/youtube.png");
  --tiktok-icon: url("/images/social_icons/tiktok.png");
  --league-accent: var(--prs-color);
  --page-bg-image: url("/images/misc_icons/home_page_background.png?v=4138b978ddc1");
  --bg: #08090b;
  --surface: rgba(18, 20, 24, 0.86);
  --surface-strong: rgba(18, 20, 24, 0.97);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f8f4ea;
  --muted: #c8c3b7;
  --subtle: #969b9d;
  --danger: #ff5f6d;
  --discord: #5165f6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --content-max: 1360px;
  --wide-content-max: 1640px;
  --content-gutter: 1rem;
  --control-height: 36px;
  --control-height-small: 30px;
  --control-padding: 0.42rem 0.7rem;
  --panel-padding: 0.85rem;
  --section-space: 1.5rem;
  --stats-sticky-offset: 49px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image: var(--page-bg-image);
  background-position: center;
  background-size: cover;
  opacity: 0.34;
  filter: saturate(0.92) contrast(1.05);
}

body::after {
  z-index: -1;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(1px);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: var(--league-accent);
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
th,
.home-league-card-header strong,
.league-identity-lockup span,
.league-tool-card strong,
.stats-player-detail-copy a,
.stats-record-holder-name,
.stats-record-matchup-fallback,
.stats-submission-matchup,
.stats-submission-category-name,
.standings-matchup-title small,
.standings-matchup-title span,
.provcompare-player-copy a,
.provcompare-overall-card strong,
.provcompare-category-winner > span,
.rulebook-choice-copy > strong,
.page-loading-copy strong {
  text-transform: uppercase;
}

.ui-icon {
  --ui-icon-image: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-image: var(--ui-icon-image);
  mask-image: var(--ui-icon-image);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.ui-icon--about-the-league {
  --ui-icon-image: url("/images/navigation_icons/about-the-league.png");
}

.ui-icon--player-statistics {
  --ui-icon-image: url("/images/navigation_icons/player-statistics.png");
}

.ui-icon--stat-records {
  --ui-icon-image: url("/images/navigation_icons/stat-records.png");
}

.ui-icon--standings {
  --ui-icon-image: url("/images/navigation_icons/standings.png");
}

.ui-icon--rulebook {
  --ui-icon-image: url("/images/navigation_icons/rulebook.png");
}

.ui-icon--provcompare {
  --ui-icon-image: url("/images/navigation_icons/provcompare.png");
}

.ui-icon--arrow-right {
  --ui-icon-image: url("/images/navigation_icons/arrow-right.png");
}

.ui-icon--arrow-left {
  --ui-icon-image: url("/images/navigation_icons/arrow-left.png");
}

.ui-icon--arrow-right,
.ui-icon--arrow-left {
  -webkit-mask-size: 100% 133.333%;
  mask-size: 100% 133.333%;
}

/* Account-menu glyphs. These are inline SVG masks rather than PNGs so they sit
   in the same monochrome system as the navigation icons above and inherit
   currentColor, which is what lets the Log out item render its icon red. */
.ui-icon--my-profile {
  --ui-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12.6c2.9 0 5.2-2.4 5.2-5.3S14.9 2 12 2 6.8 4.4 6.8 7.3s2.3 5.3 5.2 5.3Zm0 2.1c-4.2 0-8.5 2.2-8.5 5v1.6c0 .4.3.7.7.7h15.6c.4 0 .7-.3.7-.7v-1.6c0-2.8-4.3-5-8.5-5Z'/%3E%3C/svg%3E");
}

.ui-icon--log-out {
  --ui-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M13.3 2H5.4C4.1 2 3 3.1 3 4.4v15.2C3 20.9 4.1 22 5.4 22h7.9c1.3 0 2.4-1.1 2.4-2.4v-2.3h-2.2v2.1c0 .3-.2.5-.5.5H5.7c-.3 0-.5-.2-.5-.5V4.6c0-.3.2-.5.5-.5h7.3c.3 0 .5.2.5.5v2.1h2.2V4.4C15.7 3.1 14.6 2 13.3 2Zm4.2 5.6-1.6 1.6 1.9 1.9h-8v2.2h8l-1.9 1.9 1.6 1.6 4.1-4.1a.8.8 0 0 0 0-1.1l-4.1-4Z'/%3E%3C/svg%3E");
}

.ui-icon--art-gallery {
  --ui-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M20.4 3H3.6C2.7 3 2 3.7 2 4.6v14.8c0 .9.7 1.6 1.6 1.6h16.8c.9 0 1.6-.7 1.6-1.6V4.6c0-.9-.7-1.6-1.6-1.6Zm-.4 15.6H4V5.4h16v13.2ZM8.3 8.1a1.7 1.7 0 1 1 0 3.4 1.7 1.7 0 0 1 0-3.4Zm-2.5 9 3.4-4.3 2.3 2.8 3.2-4.1 3.9 5.6H5.8Z'/%3E%3C/svg%3E");
}

.ui-icon--staff-dashboard {
  --ui-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2 3.6 4.9v6.4c0 5 3.6 9.7 8.4 10.7 4.8-1 8.4-5.7 8.4-10.7V4.9L12 2Zm0 5.1a2.4 2.4 0 1 1 0 4.8 2.4 2.4 0 0 1 0-4.8Zm0 10.9c-1.9 0-3.6-.9-4.6-2.4.1-1.5 3.1-2.4 4.6-2.4s4.5.9 4.6 2.4A5.5 5.5 0 0 1 12 18Z'/%3E%3C/svg%3E");
}

.ui-icon--media-panel {
  --ui-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a4 4 0 0 0-4 4v5.5a4 4 0 0 0 8 0V6a4 4 0 0 0-4-4Zm7 9.5a1.1 1.1 0 0 0-2.2 0 4.8 4.8 0 0 1-9.6 0 1.1 1.1 0 0 0-2.2 0 7 7 0 0 0 5.9 6.9v1.4H8.6a1.1 1.1 0 0 0 0 2.2h6.8a1.1 1.1 0 0 0 0-2.2h-2.3v-1.4A7 7 0 0 0 19 11.5Z'/%3E%3C/svg%3E");
}

.matchup-pair,
.matchup-team-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.matchup-pair {
  gap: 0.45rem;
}

.matchup-team-label {
  gap: 0.32rem;
}

.matchup-team-label img {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.matchup-team-label > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchup-pair-separator {
  flex: 0 0 auto;
}

.matchup-pair--record .matchup-team-label img {
  width: 34px;
  height: 34px;
}

.matchup-pair--heading .matchup-team-label img {
  width: 22px;
  height: 22px;
}

.matchup-pair--submission .matchup-team-label img {
  width: 20px;
  height: 20px;
}

:focus-visible {
  outline: 2px solid var(--league-accent);
  outline-offset: 3px;
}

.site-content {
  flex: 1 0 auto;
  width: 100%;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.4rem max(var(--content-gutter), calc((100vw - var(--content-max)) / 2 + var(--content-gutter)));
  border-bottom: 1px solid var(--border);
  background: rgba(9, 10, 12, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.logo-icon,
.footer-logo {
  display: inline-block;
  flex: 0 0 auto;
  background-image: var(--prs-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-text {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1 1 auto;
  margin-left: 0.35rem;
  min-width: 0;
}

.nav-home-link,
.dropbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.dropbtn {
  gap: 0.35rem;
}

.dropbtn::after {
  content: "\25BE";
  font-size: 0.72rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav-home-link:hover,
.dropbtn:hover,
.dropdown:focus-within > .dropbtn {
  background: var(--surface-soft);
  color: var(--text);
}

.league-nav-link.is-active {
  background: var(--surface-soft);
  box-shadow: inset 0 -2px 0 var(--league-selector-color, var(--league-accent));
  color: var(--text);
}

.dropdown.is-open > .dropbtn::after {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1001;
  min-width: 210px;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.dropdown.is-open > .dropdown-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 901px) and (hover: hover) {
  .dropdown:hover > .dropbtn::after {
    transform: rotate(180deg);
  }

  .dropdown:hover > .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.league-switcher-button {
  padding-right: 0.62rem;
  padding-left: 0.62rem;
  border: 1px solid var(--league-selector-color, var(--border-strong));
  background: transparent;
  box-shadow: none;
}

.league-switcher-button::after {
  content: "\25B4";
}

.league-switcher-button:hover,
.league-switcher:focus-within > .league-switcher-button {
  background: transparent;
}

.league-switcher-menu {
  min-width: 190px;
}

.league-nav-link sup {
  margin-left: 0.08rem;
  font-size: 0.58em;
}

.dropdown-content a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0.5rem 0.65rem 0.5rem 2.35rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: var(--surface-soft);
}

.dropdown-content a.league-option {
  color: var(--option-color, var(--text));
}

.dropdown-content a.league-option::before,
.dropdown-content a.social-option.discord::before,
.dropdown-content a.social-option.youtube::before,
.dropdown-content a.social-option.tiktok::before,
.dropdown-content a.social-option.roblox::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.72rem;
  width: 1.05rem;
  height: 1.05rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-50%);
}

.dropdown-content a.league-option::before {
  background-image: var(--option-icon);
}

.dropdown-content a.social-option.discord::before {
  background-image: var(--discord-icon);
}

.dropdown-content a.social-option.roblox::before {
  background-image: var(--roblox-icon);
}

.dropdown-content a.social-option.youtube::before {
  background-image: var(--youtube-icon);
}

.dropdown-content a.social-option.tiktok::before {
  background-image: var(--tiktok-icon);
}

/* Account items carry their glyph in the same gutter the league and social
   options use, so every dropdown in the navbar lines up on one edge. */
.dropdown-content a.account-option .ui-icon {
  position: absolute;
  top: 50%;
  left: 0.72rem;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
}

.social-option.discord {
  color: #8791ff;
}

.social-option.roblox {
  color: #c0cad2;
}

.social-option.youtube {
  color: #ff5a5a;
}

.social-option.tiktok {
  color: #ff6f96;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.discord-login-btn,
.logout-btn,
.return-home-btn,
.profile-link,
.join-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.discord-login-btn {
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--discord);
  color: #fff;
  white-space: nowrap;
}

.discord-login-btn:hover,
.discord-login-btn:focus-visible {
  background: #4052d5;
  color: #fff;
  transform: translateY(-1px);
}

.discord-button-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown .dropdown-content {
  right: 0;
  left: auto;
}

.user-dropbtn {
  max-width: 230px;
  padding-left: 0.45rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-icon {
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.45rem;
  object-fit: contain;
}

.nav-menu-panel {
  display: contents;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.nav-menu-toggle span,
.nav-menu-toggle span::before,
.nav-menu-toggle span::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-menu-toggle span {
  position: relative;
}

.nav-menu-toggle span::before,
.nav-menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-menu-toggle span::before {
  top: -5px;
}

.nav-menu-toggle span::after {
  top: 5px;
}

.navbar.is-open .nav-menu-toggle span {
  background: transparent;
}

.navbar.is-open .nav-menu-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar.is-open .nav-menu-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

.prs_color {
  color: var(--prs-color) !important;
}

.text-red {
  color: var(--danger) !important;
}

.hero-section {
  width: min(var(--content-max), calc(100% - (var(--content-gutter) * 2)));
  min-height: 200px;
  margin: 0 auto;
  padding: 1.75rem 0 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-hero {
  min-height: 220px;
}

.league-hero {
  min-height: 240px;
  padding-bottom: 1.25rem;
}

.hero-title {
  max-width: 960px;
  color: var(--league-accent);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 900;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-title span,
.stats-heading span {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
}

.hero-subtitle {
  max-width: 720px;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.game-link {
  color: var(--text);
  text-decoration-color: var(--league-accent);
  text-underline-offset: 0.25em;
}

.join-now-btn {
  margin-top: 1rem;
  border: 1px solid var(--league-accent);
  background: var(--league-accent);
  color: #090a0c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.join-now-btn:hover,
.join-now-btn:focus-visible,
.return-home-btn:hover,
.return-home-btn:focus-visible,
.profile-link:hover,
.profile-link:focus-visible {
  transform: translateY(-1px);
}

.discord-action-btn {
  gap: 0.45rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--discord);
  color: #fff;
}

.discord-action-btn:hover,
.discord-action-btn:focus-visible {
  background: #4052d5;
  color: #fff;
}

.section-container {
  width: min(var(--content-max), calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: var(--section-space) 0;
}

.section-heading {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  text-align: center;
}

.section-heading--compact {
  margin-bottom: 0.75rem;
  text-align: left;
}

.section-heading h2 {
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.15;
}

.section-eyebrow {
  color: var(--league-accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.widget-box,
.stats-widget,
.profile-panel,
.empty-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.widget-box {
  padding: var(--panel-padding);
}

.home-landing,
.league-home-shell {
  width: min(var(--content-max), calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: 1rem 0 0;
}

.home-hero-panel,
.league-landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.86);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.home-hero-copy,
.league-hero-copy {
  min-width: 0;
}

.home-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.home-brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
}

.home-hero-title,
.league-hero-copy h1 {
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.06;
  overflow-wrap: break-word;
}

.home-hero-text {
  margin-top: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.home-hero-actions,
.league-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.home-hero-actions .join-now-btn,
.league-hero-actions .join-now-btn {
  margin-top: 0;
}

.home-secondary-btn,
.league-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.home-secondary-btn:hover,
.home-secondary-btn:focus-visible,
.league-outline-btn:hover,
.league-outline-btn:focus-visible {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  transform: translateY(-1px);
}

.home-league-section {
  padding-top: 1rem;
}

.home-section-heading {
  text-align: left;
}

.home-league-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.home-league-card {
  position: relative;
  display: block;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.84);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.home-league-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent, var(--league-accent));
}

.home-league-card:hover,
.home-league-card:focus-visible {
  border-color: var(--card-accent, var(--league-accent));
  background: rgba(24, 27, 32, 0.94);
  transform: translateY(-2px);
}

.home-league-card-content {
  display: grid;
  gap: 0.4rem;
  min-height: 100%;
  padding: 0.7rem 0.7rem 0.7rem 0.85rem;
}

.home-league-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.home-league-card-header > span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.home-league-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.home-league-card-header strong {
  color: var(--card-accent, var(--league-accent));
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
}

.home-league-card-header small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-league-game {
  min-width: 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-league-cta {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 850;
}

.home-league-cta .ui-icon {
  width: 0.9rem;
  height: 0.68rem;
  color: var(--card-accent, var(--league-accent));
}

.league-identity-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  color: var(--league-accent);
  font-weight: 900;
}

.league-identity-lockup img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}

.league-hero-copy h1 {
  color: var(--text);
}

.league-game-context {
  display: inline-flex;
  margin-top: 0.5rem;
  color: var(--muted);
  font-weight: 800;
  text-decoration-color: var(--league-accent);
  text-underline-offset: 0.24em;
}

.league-dashboard-section {
  padding-top: 1rem;
}

.league-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.league-tool-card {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) 0.9rem;
  gap: 0.7rem;
  align-items: center;
  min-height: 78px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.84);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.league-tool-card:hover,
.league-tool-card:focus-visible {
  border-color: var(--league-accent);
  background: rgba(24, 27, 32, 0.94);
  transform: translateY(-1px);
}

.league-tool-card strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.league-tool-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.league-tool-icon {
  width: 2.35rem;
  height: 2.35rem;
  color: var(--league-accent);
}

.league-tool-arrow {
  width: 0.9rem;
  height: 0.68rem;
  color: var(--league-accent);
}

.league-tool-card small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
}

.league-tool-card sup {
  margin-left: 0.08rem;
  font-size: 0.62em;
  line-height: 1;
}

.stats-color-scope {
  color: var(--text);
}

.stats-widget {
  width: min(var(--wide-content-max), calc(100% - (var(--content-gutter) * 2)));
  max-width: none;
  margin: 0.85rem auto 1rem;
  padding: 0.8rem;
}

.stats-widget--wide {
  --wide-content-max: 1760px;
}

.stats-widget--profile {
  --wide-content-max: 1440px;
}

.league-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.65rem;
}

.league-page-actions--hero {
  width: min(var(--content-max), calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto 0.65rem;
}

.league-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.league-back-link .ui-icon {
  width: 0.86rem;
  height: 0.65rem;
  color: var(--league-accent);
}

.league-back-link:hover,
.league-back-link:focus-visible {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.095);
  transform: translateY(-1px);
}

.stats-heading {
  color: var(--league-accent);
  font-size: clamp(1.5rem, 2.7vw, 1.9rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
}

.stats-meta {
  margin: 0.3rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.category-tabs {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.category-tabs--section .category-tab {
  flex: 1 1 0;
  min-width: 12rem;
}

.category-tabs--stats {
  flex-wrap: wrap;
}

.category-tabs--stats .category-tab {
  flex: 1 1 8rem;
  min-width: 8rem;
}

.category-tab,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.category-tab:hover,
.category-tab:focus-visible,
.filter-button:hover,
.filter-button:focus-visible,
.category-tab.active,
.filter-button.active {
  border-color: var(--league-accent);
  background: var(--league-accent);
  color: #090a0c;
}

.stats-player-search {
  display: flex;
  justify-content: center;
  margin: 0.2rem 0 0.7rem;
}

.stats-scope-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
  gap: 0.5rem;
  margin: -0.1rem 0 0.85rem;
}

.stats-scope-field {
  display: grid;
  flex: 0 1 13rem;
  gap: 0.28rem;
  max-width: 14rem;
  min-width: 8.5rem;
}

.stats-playoffs-filter {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  min-height: 38px;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.68);
}

.stats-playoffs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.stats-playoffs-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--league-accent);
  cursor: pointer;
}

.stats-playoffs-help {
  display: inline-grid;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: help;
}

.stats-playoffs-help img {
  display: block;
  width: 100%;
  height: 100%;
}

.stats-playoffs-help:focus-visible {
  outline: 2px solid var(--league-accent);
  outline-offset: 2px;
}

.stats-playoffs-help-text {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  width: max-content;
  max-width: min(250px, calc(100vw - 24px));
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(9, 10, 13, 0.98);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.stats-playoffs-help:hover + .stats-playoffs-help-text,
.stats-playoffs-help:focus + .stats-playoffs-help-text {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.stats-player-search-field {
  display: grid;
  gap: 0.3rem;
  width: min(580px, 100%);
}

.stats-player-search-field label,
.stats-scope-field label,
.stats-player-label {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.stats-player-search-controls {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  min-width: 0;
}

.stats-player-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.stats-player-search-controls input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.68);
  color: var(--text);
  font: inherit;
  font-weight: 750;
  outline: none;
}

.stats-scope-field select {
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 1.75rem 0.42rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.68);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  outline: none;
}

.stats-player-search-controls input:focus,
.stats-scope-field select:focus {
  border-color: var(--league-accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.stats-player-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--league-accent);
  border-radius: 8px;
  background: var(--league-accent);
  color: #090a0c;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.1;
}

.stats-limit-note {
  margin: -0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.stats-empty-state {
  display: grid;
  gap: 0.7rem;
  max-width: 760px;
  margin: 0.4rem auto 0;
}

.stats-empty-state h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.15;
}

.stats-empty-state p {
  margin: 0;
}

.stats-empty-actions {
  display: flex;
  justify-content: center;
}

.stats-records-widget {
  --wide-content-max: 1080px;
}

.stats-records-filter {
  margin-bottom: 0.35rem;
}

.stats-records-filter .stats-scope-field {
  flex: 1 1 12rem;
  max-width: 18rem;
}

.stats-records-filter-note {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.stats-records-panel {
  display: grid;
  gap: 0.65rem;
}

.stats-records-summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 116px;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(28, 30, 35, 0.94), rgba(12, 14, 17, 0.88));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.stats-records-summary::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--league-accent);
}

.stats-records-summary > div {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.stats-records-summary h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--league-accent);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
}

.stats-records-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.stats-records-featured-avatar-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 8px;
}

.stats-records-featured-avatar {
  width: 76px;
  height: 76px;
  border: 2px solid var(--league-accent);
  border-radius: 8px;
  object-fit: cover;
}

.stats-records-holder-list {
  display: grid;
  gap: 0.5rem;
}

.stats-record-holder {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 27, 32, 0.9), rgba(11, 13, 16, 0.84));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.stats-record-holder-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.stats-record-holder-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  border: 1px solid var(--league-accent);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--league-accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.stats-record-holder-avatar-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 8px;
}

.stats-record-holder-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 900;
  object-fit: cover;
}

.stats-record-holder-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 0.25rem;
  min-width: 0;
}

.stats-record-holder-name {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.08;
  text-decoration-color: var(--league-accent);
  text-overflow: ellipsis;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}

.stats-record-holder-team {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.stats-record-holder-team img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  object-fit: contain;
}

.stats-record-holder-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-record-roblox-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.58rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.stats-record-roblox-link:hover,
.stats-record-roblox-link:focus-visible {
  border-color: var(--league-accent);
  color: var(--league-accent);
}

.stats-record-matchup {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.5);
}

.stats-record-matchup-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.matchup-pair--record {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.matchup-pair--record .matchup-pair-separator {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
}

.stats-record-matchup-line em {
  margin-left: auto;
  padding: 0.22rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.stats-record-matchup-fallback {
  color: var(--text);
  font-size: 0.9rem;
}

.stats-record-holder-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stats-record-holder-meta a {
  margin-left: auto;
  color: var(--league-accent);
  font-weight: 850;
  text-underline-offset: 0.18em;
}

.stats-records-more {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-align: center;
}

.stats-detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.1rem 0 0.7rem;
}

.stats-player-message {
  margin: 0 0 0.7rem;
}

.stats-player-view-tabs {
  margin: 0 0 0 auto;
}

.stats-player-view-tabs .category-tab {
  text-decoration: none;
}

.stats-submissions-note {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats-submission-ignored {
  color: var(--muted);
  font-size: 0.78em;
  font-style: italic;
}

.stats-submission-table-wrapper {
  margin: 0;
  overflow-x: auto;
}

.stats-submission-table {
  width: 100%;
}

.stats-table.stats-submission-table th,
.stats-table.stats-submission-table td {
  padding: 0.35rem 0.55rem;
  text-align: left;
}

/* The shared .stats-table header is sticky to the page nav offset, which is
   right for the long leaderboard but slides the header into the middle of
   these small per-category tables. Pin it to the top of its own table.
   !important guarantees this wins over the shared sticky rule and its
   responsive `top` overrides regardless of source order. */
.stats-table.stats-submission-table th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* Collapsible per-matchup submission list */
.stats-submission-list {
  display: grid;
  gap: 0.3rem;
}

.stats-submission-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.4);
  overflow: hidden;
}

.stats-submission-item[open] {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.035);
}

.stats-submission-item--ignored {
  opacity: 0.72;
}

.stats-submission-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.6rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.16s ease;
}

.stats-submission-summary::-webkit-details-marker {
  display: none;
}

.stats-submission-summary:hover {
  background: rgba(255, 255, 255, 0.045);
}

.stats-submission-summary:focus-visible {
  outline: 2px solid var(--league-accent);
  outline-offset: -2px;
}

.stats-submission-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.stats-submission-item[open] .stats-submission-chevron {
  transform: rotate(45deg);
}

.stats-submission-summary-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.stats-submission-matchup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--text, #fff);
  font-weight: 600;
  line-height: 1.2;
}

.stats-submission-game-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.stats-submission-scope {
  color: var(--muted);
  font-size: 0.82rem;
}

.stats-submission-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.stats-submission-tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.stats-submission-tag--weight {
  border-color: var(--league-accent);
  color: var(--league-accent);
}

.stats-submission-body {
  display: grid;
  gap: 0.55rem;
  padding: 0.25rem 0.6rem 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-submission-category {
  display: grid;
  gap: 0.35rem;
}

.stats-submission-category-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stats-submission-category-name {
  color: var(--league-accent);
  font-weight: 700;
  font-size: 1.02rem;
}

.stats-submission-ignored-badge {
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .stats-submission-summary {
    gap: 0.5rem;
  }

  .stats-submission-tags {
    flex: 0 1 auto;
    justify-content: flex-end;
    width: auto;
    padding-left: 0;
  }

  .stats-submission-tag {
    padding: 0.16rem 0.4rem;
    font-size: 0.68rem;
  }
}

.stats-player-detail {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.stats-player-profile-panel,
.stats-player-results-header,
.stats-player-category,
.stats-player-empty-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 30, 35, 0.88), rgba(14, 16, 20, 0.82));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.stats-player-profile-panel {
  position: sticky;
  top: calc(var(--stats-sticky-offset, 64px) + 1rem);
  display: grid;
  gap: 0.75rem;
  overflow: hidden;
  padding: 0.8rem;
}

.stats-player-profile-panel::before {
  content: "";
  display: block;
  height: 4px;
  margin: -0.8rem -0.8rem 0;
  background: var(--league-accent);
}

.stats-player-profile-top {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-align: center;
}

.stats-player-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border: 2px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.stats-player-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.55rem;
  font-weight: 900;
}

.stats-player-detail-copy {
  display: grid;
  gap: 0.28rem;
  justify-items: center;
  min-width: 0;
  width: 100%;
}

.stats-player-detail-copy a {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.08;
  text-decoration-color: var(--league-accent);
  text-overflow: ellipsis;
  text-underline-offset: 0.22em;
  white-space: nowrap;
}

.stats-player-profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-player-profile-facts div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.stats-player-profile-facts span,
.stats-player-stat-item span,
.stats-player-category header > span,
.stats-player-results-header > span {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.stats-player-profile-facts strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-player-team-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.stats-player-team-card > div:last-child {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.stats-player-team-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-player-team-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.stats-player-team-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: contain;
}

.stats-player-team-logo--empty {
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.stats-player-category-nav {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.stats-player-category-nav > div {
  display: grid;
  gap: 0.4rem;
}

.stats-player-category-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  min-height: 36px;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.stats-player-category-nav a:hover,
.stats-player-category-nav a:focus-visible {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.stats-player-category-nav a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-player-category-nav a strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--league-accent);
  color: #090a0c;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.stats-player-results {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.stats-player-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem;
}

.stats-player-results-header h2 {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.1;
}

.stats-player-results-header > span {
  flex: 0 0 auto;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.stats-player-category-stack {
  display: grid;
  gap: 0.55rem;
}

.stats-player-category {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.6rem;
  scroll-margin-top: calc(var(--stats-sticky-offset, 64px) + 1rem);
}

.stats-player-category header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-player-category h3 {
  margin: 0.14rem 0 0;
  color: var(--league-accent);
  font-size: 1.22rem;
  line-height: 1.15;
}

.stats-player-category header > span {
  flex: 0 0 auto;
  color: var(--muted);
}

.stats-player-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.stats-player-stat-item {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 0.4rem;
  min-width: 0;
  min-height: 62px;
  padding: 0.48rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.54);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.stats-player-stat-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.stats-player-stat-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.stats-player-stat-value {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.stats-player-stat-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.05;
}

.stats-player-value-rank {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0.03rem;
  padding: 0.2rem 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.stats-player-empty-panel {
  padding: 0.75rem;
  color: var(--muted);
  font-weight: 750;
}

.stats-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.62);
}

.stats-leaderboard-table-wrapper {
  overflow: visible;
}

.stats-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.stats-table thead,
.standings-table thead {
  background: rgba(255, 255, 255, 0.075);
}

.stats-table tbody tr,
.standings-table tbody tr {
  background: rgba(255, 255, 255, 0.018);
  transition: background-color 0.16s ease;
}

.stats-table tbody tr:hover,
.standings-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.052);
}

.stats-table tbody tr.stats-player-row {
  cursor: pointer;
}

.stats-table tbody tr.stats-player-row:focus-visible {
  outline: 2px solid var(--league-accent);
  outline-offset: -2px;
}

.stats-table tbody tr.stats-loading-row td {
  color: var(--muted);
  padding: 1.1rem 0.75rem;
  text-align: center;
}

.stats-table th,
.stats-table td {
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.15;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-table th {
  position: sticky;
  top: calc(var(--stats-sticky-offset, 64px) - 1px);
  z-index: 20;
  background: rgba(18, 20, 24, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 22px rgba(0, 0, 0, 0.22);
  color: var(--league-accent);
  font-weight: 850;
  overflow: visible;
}

.stats-table th.sortable,
.sortable {
  cursor: pointer;
  user-select: none;
}

.stats-table th.sortable:hover,
.stats-table th.sortable:focus-visible,
.stats-table th.sortable.active {
  background: rgba(34, 36, 40, 0.98);
  outline: none;
}

.stats-table th.sortable .sort-arrow {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.86;
}

.th-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
}

.highlight-column {
  background: rgba(255, 255, 255, 0.055);
}

.stats-username-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stats-username-cell a {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  color: var(--league-accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-team-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: 24px;
  object-fit: contain;
}

/* Logo shown at reduced opacity when the player's team for that matchup was
   inferred (they weren't rostered to either side), not confirmed. */
.stats-team-logo--guess {
  opacity: 0.45;
}

/* Inferred-team logos are wrapped in a button so they explain themselves on
   hover (transient) or tap/click (pinned). */
.guess-logo {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  line-height: 0;
  cursor: help;
}

.guess-logo:focus-visible {
  outline: 2px solid var(--league-accent, #4c9ffe);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Shared, fixed-positioned explainer popover (one per page, moved by JS) so the
   table's overflow:auto wrapper cannot clip it. */
.guess-popover {
  position: fixed;
  z-index: 1000;
  max-width: 250px;
  padding: 10px 12px;
  background: #14161a;
  color: #e8eaed;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  line-height: 1.4;
}

.guess-popover[hidden] {
  display: none;
}

/* Hover/transient mode: no close button, and ignore the pointer so moving the
   mouse off the logo always auto-closes it. */
.guess-popover:not(.guess-popover--pinned) {
  pointer-events: none;
}

.guess-popover:not(.guess-popover--pinned) .guess-popover__close {
  display: none;
}

.guess-popover--pinned {
  padding-right: 28px;
}

.guess-popover__text {
  margin: 0;
}

.guess-popover__close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.guess-popover__close:hover,
.guess-popover__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.stats-table--compact .stats-username-cell,
.stats-table--ultra .stats-username-cell {
  gap: 4px;
}

.stats-table--compact .stats-team-logo,
.stats-table--ultra .stats-team-logo {
  max-width: 18px !important;
}

.stats-table th:nth-child(1),
.stats-table td:nth-child(1) {
  width: 3.9rem;
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2) {
  width: 16rem;
  text-align: left;
}

.stats-table th:nth-child(3),
.stats-table td:nth-child(3),
.stats-table th:last-child,
.stats-table td:last-child {
  width: 4.6rem;
}

.stats-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
.stats-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
  width: 5.4rem;
}

.stats-table--compact th,
.stats-table--compact td {
  padding: 0.32rem 0.2rem;
  font-size: 0.76rem;
}

.stats-table--ultra th,
.stats-table--ultra td {
  padding: 0.28rem 0.16rem;
  font-size: 0.75rem;
}

.stats-table--compact th:nth-child(2),
.stats-table--compact td:nth-child(2) {
  width: 13.5rem;
}

.stats-table--compact th:nth-child(3),
.stats-table--compact td:nth-child(3),
.stats-table--compact th:last-child,
.stats-table--compact td:last-child {
  width: 4.2rem;
}

.stats-table--compact th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
.stats-table--compact td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
  width: 4.55rem;
}

.stats-table--ultra th:nth-child(1),
.stats-table--ultra td:nth-child(1) {
  width: 3.5rem;
}

.stats-table--ultra th:nth-child(2),
.stats-table--ultra td:nth-child(2) {
  width: 12rem;
}

.stats-table--ultra th:nth-child(3),
.stats-table--ultra td:nth-child(3),
.stats-table--ultra th:last-child,
.stats-table--ultra td:last-child {
  width: 3.9rem;
}

.stats-table--ultra th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
.stats-table--ultra td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
  width: 4.15rem;
}

.page-loading-active {
  cursor: progress;
}

.page-loading-overlay {
  position: fixed;
  z-index: 4000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 9, 11, 0.74);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.page-loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.page-loading-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(360px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.page-loading-mark {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.11);
  border-top-color: var(--league-accent);
  border-radius: 50%;
  animation: page-loading-spin 0.82s linear infinite;
}

.page-loading-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.09);
  border-bottom-color: var(--league-accent);
  border-radius: 50%;
  animation: page-loading-spin 1.25s linear infinite reverse;
}

.page-loading-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.page-loading-copy strong {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.1;
}

.page-loading-copy span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.3;
}

@keyframes page-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loading-mark,
  .page-loading-mark::after {
    animation: none;
  }
}

.stats-tooltip {
  position: fixed;
  z-index: 2500;
  max-width: min(240px, calc(100vw - 24px));
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(13, 14, 17, 0.97);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.stats-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.standings-note {
  max-width: 1100px;
  margin: 0.65rem auto 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.5);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.38;
  text-align: center;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.standings-division-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: -0.2rem 0 0.7rem;
  padding-bottom: 0.15rem;
}

.standings-division-button {
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
}

.standings-view-filter {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: -0.1rem 0 0.7rem;
}

.standings-view-button {
  min-width: 8.5rem;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
}

.standings-view-panel {
  display: none;
}

.standings-view-panel.active {
  display: block;
}

.standings-section {
  display: none;
  margin-bottom: 0.8rem;
}

.standings-section.active {
  display: block;
}

.standings-section h2 {
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--league-accent);
  font-size: 1.12rem;
  text-align: center;
}

.playoff-bracket-actions {
  display: flex;
  justify-content: center;
  margin: -0.1rem 0 0.7rem;
}

.standings-division-stack {
  display: grid;
  gap: 0.7rem;
}

.standings-division-widget {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.standings-division-widget[hidden] {
  display: none;
}

.standings-division-widget h3 {
  color: var(--league-accent);
  font-size: 1.1rem;
  line-height: 1.15;
}

.standings-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
  gap: 0.65rem;
}

.standings-group-widget {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

/* Matchups view: every group's pairings listed inline, each row linking to its
   own matchup detail page. */
.matchup-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 0.75rem;
}

.matchup-board-group {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.matchup-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.matchup-board-heading h4 {
  min-width: 0;
  color: var(--league-accent);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchup-board-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.matchup-board-item {
  display: grid;
  align-items: center;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.matchup-board-item:hover,
.matchup-board-item:focus-visible {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
  transform: translateY(-1px);
}

.matchup-board-side {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.matchup-board-side--home {
  justify-content: flex-end;
  text-align: right;
}

.matchup-board-side--away {
  justify-content: flex-start;
  text-align: left;
}

.matchup-board-logo {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
}

.matchup-board-logo--empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.matchup-board-name {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matchup-board-side--winner .matchup-board-name {
  color: var(--league-accent);
}

.matchup-board-seed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.3rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.matchup-board-middle {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  min-width: 0;
}

.matchup-board-vs {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.matchup-board-score {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.matchup-board-status {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.matchup-board-status--final {
  color: var(--league-accent);
}

/* A scheduled game shows its Eastern kickoff time, so it is real information
   rather than a state word and gets a little more room than the other states. */
.matchup-board-status--scheduled {
  color: var(--text);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
}

.matchup-board-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.standings-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.standings-group-widget h4 {
  min-width: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-matchups-toggle,
.standings-result-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.42rem 0.62rem;
  border: 1px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--league-accent);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.standings-matchups-toggle:hover,
.standings-matchups-toggle:focus-visible,
.standings-result-toggle:hover,
.standings-result-toggle:focus-visible {
  background: var(--league-accent);
  color: #090a0c;
  outline: none;
  transform: translateY(-1px);
}

.standings-matchup-panel[hidden],
.standings-result-panel[hidden] {
  display: none;
}

.standings-matchup-panel {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.1rem;
}

.standings-matchups-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.72);
}

.standings-matchups-hero-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.standings-matchups-hero-main span,
.standings-section-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.standings-matchups-hero-main h2,
.standings-detail-section h3 {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.15;
}

.standings-matchups-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(5.3rem, auto));
  gap: 0.45rem;
}

.standings-matchups-summary span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.standings-matchups-summary strong {
  color: var(--league-accent);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
}

.standings-matchups-dashboard {
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(0, 1.35fr);
  gap: 0.6rem;
  align-items: start;
  margin-top: 0.55rem;
}

.standings-detail-section,
.standings-matchup-list,
.standings-result-team-stack,
.standings-result-category-stack {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.standings-detail-section {
  align-content: start;
}

.standings-detail-section--standings {
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.45);
}

.standings-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.standings-section-heading div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.standings-section-heading small {
  color: var(--league-accent);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.standings-matchup-list--detail {
  gap: 0.5rem;
}

.standings-matchup-card {
  display: grid;
  gap: 0.48rem;
  padding: 0.58rem;
  border: 1px solid var(--border);
  border-left: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.62);
}

.standings-matchup-card--final,
.standings-matchup-card--bye {
  border-left-color: var(--league-accent);
}

.standings-matchup-card--scheduled {
  border-left-color: #7fb7ff;
}

.standings-matchup-card-header,
.standings-result-team-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.standings-matchup-title {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.standings-matchup-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.standings-matchup-title > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-matchup-state {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  min-width: 7rem;
  text-align: right;
}

.standings-matchup-state strong,
.standings-matchup-state time,
.standings-matchup-state > span:not(.standings-matchup-status) {
  max-width: 15rem;
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-matchup-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.standings-matchup-status--final,
.standings-matchup-status--bye {
  border-color: var(--league-accent);
  color: var(--league-accent);
}

.standings-matchup-status--scheduled {
  border-color: #7fb7ff;
  color: #b9d8ff;
}

.standings-matchup-scoreboard {
  display: grid;
  gap: 0.45rem;
}

.standings-matchup-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.standings-matchup-team.is-winner {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.06);
}

.standings-matchup-team-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.standings-matchup-team-main span:not(.standings-team-logo) {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-matchup-score {
  min-width: 2.8rem;
  color: var(--league-accent);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.standings-team-logo--empty {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.standings-matchup-note {
  padding-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.standings-matchup-actions {
  display: flex;
  justify-content: flex-start;
}

.standings-result-toggle {
  width: fit-content;
}

.standings-result-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.standings-result-team {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.standings-result-team-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.standings-result-team-heading h5 {
  min-width: 0;
  overflow: hidden;
  color: var(--league-accent);
  font-size: 0.98rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-result-team-heading > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.standings-result-category {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.standings-result-category h6 {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.1;
}

.standings-result-table-wrapper {
  max-width: 100%;
}

.standings-result-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.standings-result-table th,
.standings-result-table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.15;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-result-table th {
  color: var(--league-accent);
  font-weight: 850;
}

.standings-result-table th:first-child,
.standings-result-table td:first-child {
  width: 12rem;
  text-align: left;
}

.standings-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.standings-table--grouped {
  min-width: 0;
  table-layout: fixed;
}

.standings-table--grouped thead tr {
  height: auto;
}

.standings-table--grouped th {
  padding-top: 0.55rem;
  vertical-align: top;
}

.standings-table--grouped th .th-label {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  line-height: 1.15;
}

.standings-table--grouped th:nth-child(1),
.standings-table--grouped td:nth-child(1) {
  width: 30%;
}

.standings-table--grouped th:nth-child(2),
.standings-table--grouped td:nth-child(2) {
  width: 12%;
}

.standings-table--grouped th:nth-child(3),
.standings-table--grouped td:nth-child(3) {
  width: 15%;
}

.standings-table--grouped th:nth-child(4),
.standings-table--grouped td:nth-child(4) {
  width: 12%;
}

.standings-table--grouped th:nth-child(5),
.standings-table--grouped td:nth-child(5) {
  width: 12%;
}

.standings-table--grouped th:nth-child(6),
.standings-table--grouped td:nth-child(6) {
  width: 8%;
}

.standings-table--grouped th:nth-child(7),
.standings-table--grouped td:nth-child(7) {
  width: 11%;
}

.standings-table th,
.standings-table td {
  padding: 0.3rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-table th {
  color: var(--league-accent);
  font-weight: 850;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.standings-table th .th-label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.standings-table--grouped th,
.standings-table--grouped td {
  padding-right: 0.45rem;
  padding-left: 0.45rem;
}

.standings-table--grouped th .th-label {
  display: inline;
  min-height: 0;
}

.standings-table--grouped .sort-arrow {
  min-width: 0.65em;
  margin-left: 0.18rem;
}

.standings-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.standings-table th.sortable:hover,
.standings-table th.sortable:focus-visible,
.standings-table th.sortable.active {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.standings-table .sort-arrow {
  display: inline-block;
  min-width: 0.85em;
  margin-left: 0.3rem;
  font-size: 0.78rem;
  opacity: 0.86;
}

.standings-table th.sort-asc .sort-arrow::before {
  content: "\25B2";
}

.standings-table th.sort-desc .sort-arrow::before {
  content: "\25BC";
}

.standings-table td:first-child {
  color: var(--league-accent);
  font-weight: 850;
}

.standings-team-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.standings-team-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standings-team-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
}

.playoff-bracket-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 0.75rem 0.85rem 0.85rem;
}

.playoff-bracket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.7rem;
}

.playoff-bracket-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.55);
}

.playoff-zoom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.playoff-zoom-button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--league-accent);
}

.playoff-zoom-button--reset {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.playoff-zoom-level {
  min-width: 3.1em;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.playoff-bracket-hint {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 650;
}

.playoff-bracket {
  --bracket-row-height: 4.35rem;
  --bracket-gap: 1.7rem;
  overflow: auto;
  padding: 0.3rem var(--bracket-gap) 0.8rem 0.2rem;
  cursor: grab;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

.playoff-bracket.is-panning {
  cursor: grabbing;
  user-select: none;
}

.playoff-bracket-sizer {
  width: max-content;
  overflow: hidden;
}

.playoff-bracket-note {
  margin: 0 0 0.85rem;
  max-width: 960px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.playoff-bracket-rounds {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: var(--bracket-gap);
  min-width: max-content;
  transform-origin: 0 0;
}

.playoff-round {
  --bracket-line: rgba(237, 201, 107, 0.46);
  display: grid;
  grid-template-rows: 2.4rem auto;
  gap: 0.65rem;
  min-width: 280px;
}

.playoff-round h3 {
  min-height: 2.4rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--league-accent);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
}

.playoff-round--final h3 {
  border-color: var(--league-accent);
  background: rgba(255, 255, 255, 0.085);
}

.playoff-matchup-stack {
  display: grid;
  grid-template-rows: repeat(var(--bracket-grid-rows), var(--bracket-row-height));
  position: relative;
}

.playoff-matchup {
  position: relative;
  grid-row: var(--matchup-start) / span var(--matchup-span);
  align-self: center;
  border: 1px solid var(--border);
  border-left: 3px solid var(--league-accent);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(20, 22, 27, 0.9), rgba(8, 9, 11, 0.78));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.playoff-matchup:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
}

.playoff-matchup--projected {
  border-style: dashed;
  border-left-color: var(--muted);
  background: rgba(8, 9, 11, 0.5);
  box-shadow: none;
}

.playoff-matchup-tag {
  padding: 0.26rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--league-accent);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playoff-matchup-tag--projected {
  color: var(--subtle);
}

.playoff-matchup--has-next::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: calc(var(--bracket-gap) / 2);
  border-top: 2px solid var(--bracket-line);
  transform: translateY(-50%);
}

.playoff-matchup--draw-connector::before,
.playoff-matchup--draw-connector-up::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + (var(--bracket-gap) / 2));
  height: var(--connector-height);
  border-right: 2px solid var(--bracket-line);
  pointer-events: none;
}

.playoff-matchup--draw-connector-up::before {
  top: auto;
  bottom: 50%;
}

.playoff-connector-in {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--bracket-gap) / 2);
  width: calc(var(--bracket-gap) / 2);
  border-top: 2px solid var(--bracket-line);
  transform: translateY(-50%);
}

.playoff-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 40px;
  padding: 0.48rem 0.7rem;
  color: var(--text);
}

.playoff-team:last-child {
  border-radius: 0 0 10px 10px;
}

.playoff-team + .playoff-team {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.playoff-team--placeholder {
  color: var(--subtle);
}

.playoff-team--winner {
  background: rgba(255, 255, 255, 0.05);
  background: linear-gradient(90deg, color-mix(in srgb, var(--league-accent) 16%, transparent), transparent 70%);
}

.playoff-team--winner .playoff-team-name {
  color: var(--league-accent);
  font-weight: 850;
}

.playoff-team-main {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 0.5rem;
  min-width: 0;
}

.playoff-team-rank {
  flex: 0 0 auto;
  color: var(--league-accent);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.playoff-team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playoff-team-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
}

.playoff-team-logo--empty {
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.playoff-team-score {
  flex: 0 0 auto;
  color: var(--league-accent);
  font-weight: 900;
}

.standings-empty-state {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-align: center;
}

.provcompare-widget {
  display: grid;
  gap: 0.65rem;
  overflow: visible;
}

.provcompare-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(380px, 1.1fr);
  align-items: stretch;
  gap: 0.75rem;
  padding: clamp(0.8rem, 1.5vw, 1rem);
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025) 48%, rgba(0, 0, 0, 0.18)),
    rgba(8, 9, 11, 0.7);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.28);
}

.provcompare-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--league-accent);
}

.provcompare-hero-copy {
  display: grid;
  align-content: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.35rem 0.15rem;
  text-align: left;
}

.provcompare-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--league-accent);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-title {
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 950;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.provcompare-title sup {
  margin-left: 0.12rem;
  color: var(--muted);
  font-size: 0.28em;
  line-height: 1;
  vertical-align: super;
}

.provcompare-subtitle {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.45;
}

.provcompare-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 420px;
  margin-top: 0.2rem;
}

.provcompare-hero-stats div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.provcompare-hero-stats span {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-hero-stats strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-hero-tools {
  display: grid;
  align-content: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.58);
}

.provcompare-section-tabs {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-bottom: 0;
}

.provcompare-search {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  border: 0;
}

.provcompare-field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.provcompare-field label {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-input-wrap {
  position: relative;
}

.provcompare-field input {
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  font-weight: 750;
  outline: none;
}

.provcompare-field input:focus {
  border-color: var(--league-accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.provcompare-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--league-accent);
  border-radius: 8px;
  background: var(--league-accent);
  color: #090a0c;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.1;
  transition: transform 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
  width: 100%;
}

.provcompare-submit:hover,
.provcompare-submit:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.provcompare-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

.provcompare-suggestions.is-open {
  display: grid;
  gap: 0.2rem;
}

.provcompare-suggestion {
  display: grid;
  gap: 0.12rem;
  width: 100%;
  min-height: 38px;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  text-align: left;
}

.provcompare-suggestion-name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-suggestion small {
  min-width: 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-suggestion:hover,
.provcompare-suggestion.is-active {
  background: rgba(255, 255, 255, 0.085);
  color: var(--league-accent);
}

.provcompare-message {
  margin-top: 0;
  margin-bottom: 0;
}

.provcompare-matchup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 9, 11, 0.42);
}

.provcompare-player-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  min-height: 128px;
  padding: 0.62rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025) 42%, rgba(0, 0, 0, 0.2)),
    linear-gradient(180deg, rgba(28, 30, 35, 0.9), rgba(12, 14, 18, 0.84));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.provcompare-player-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--league-accent);
}

.provcompare-player-card--right::before {
  right: 0;
  left: auto;
}

.provcompare-player-card.is-empty {
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.035);
}

.provcompare-side-label {
  color: var(--league-accent);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-versus {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.3rem;
  width: 72px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(8, 9, 11, 0.78);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.provcompare-versus span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--league-accent);
  border-radius: 50%;
  color: var(--league-accent);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
}

.provcompare-versus strong {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-legacy-summary {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(8, 9, 11, 0.6);
}

.provcompare-overall-card {
  display: grid;
  align-content: center;
  gap: 0.34rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.provcompare-summary-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.provcompare-overall-card strong {
  color: var(--league-accent);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.08;
}

.provcompare-overall-card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.provcompare-overall-card small {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 750;
}

.provcompare-score-record,
.provcompare-category-winners {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: center;
}

.provcompare-score-record span,
.provcompare-category-winner,
.provcompare-winner-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.provcompare-score-record span {
  padding: 0.38rem 0.58rem;
}

.provcompare-category-winner {
  gap: 0.4rem;
  padding: 0.42rem 0.58rem;
}

.provcompare-category-winner > span,
.provcompare-category-winner small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.provcompare-category-winner strong {
  color: var(--league-accent);
}

.provcompare-player-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.provcompare-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 2px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  object-fit: cover;
}

.provcompare-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.55rem;
  font-weight: 900;
}

.provcompare-player-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.provcompare-player-label {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.provcompare-player-copy a,
.provcompare-player-empty {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-player-copy a {
  text-decoration-color: var(--league-accent);
  text-underline-offset: 0.22em;
}

.provcompare-team-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 38px;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.provcompare-team-row > span:not(.provcompare-team-logo) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-team-row strong {
  margin-left: auto;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.provcompare-team-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 5px;
  object-fit: contain;
}

.provcompare-team-logo--empty {
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.provcompare-category-stack {
  display: grid;
  gap: 0.7rem;
}

.provcompare-category {
  display: grid;
  gap: 0.65rem;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(12, 14, 18, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.provcompare-category-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.provcompare-category h2 {
  color: var(--league-accent);
  font-size: 1.2rem;
  line-height: 1.15;
}

.provcompare-winner-badge {
  flex: 0 1 auto;
  justify-content: center;
  max-width: 100%;
  padding: 0.34rem 0.58rem;
  color: var(--league-accent);
  line-height: 1.1;
  text-align: center;
}

.provcompare-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.5rem;
}

.provcompare-metric {
  position: relative;
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.52rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(8, 9, 11, 0.56);
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.provcompare-metric:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.provcompare-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.provcompare-metric.is-left-leading::before {
  background: var(--league-accent);
}

.provcompare-metric.is-right-leading::before {
  right: 0;
  left: auto;
  background: var(--league-accent);
}

.provcompare-metric.is-left-leading,
.provcompare-metric.is-right-leading {
  border-color: rgba(255, 255, 255, 0.14);
}

.provcompare-metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.provcompare-metric-heading span {
  min-width: 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.provcompare-metric-heading strong {
  flex: 0 0 auto;
  padding: 0.22rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.provcompare-metric.is-left-leading .provcompare-metric-heading strong,
.provcompare-metric.is-right-leading .provcompare-metric-heading strong {
  color: var(--league-accent);
}

.provcompare-metric-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.provcompare-metric-values div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.provcompare-metric-values div:last-child {
  text-align: right;
}

.provcompare-metric-values span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provcompare-metric-values strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.02;
}

.provcompare-empty-state {
  margin-top: 0;
}

.rulebook-page-shell {
  width: min(1080px, calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: 1rem 0 1.35rem;
}

.rulebook-chooser-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border: 1px solid var(--border);
  border-top: 3px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.9);
  box-shadow: var(--shadow);
}

.rulebook-chooser-hero h1 {
  margin: 0.2rem 0 0.45rem;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.rulebook-chooser-hero p:last-child {
  max-width: 740px;
  color: var(--muted);
  line-height: 1.5;
}

.rulebook-hero-logo {
  width: clamp(64px, 9vw, 104px);
  height: clamp(64px, 9vw, 104px);
  object-fit: contain;
}

.rulebook-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.rulebook-choice-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 220px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.9);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.rulebook-choice-card:hover,
.rulebook-choice-card:focus-visible {
  border-color: var(--league-accent);
  background: rgba(24, 27, 32, 0.96);
  transform: translateY(-2px);
}

.rulebook-choice-logo {
  display: grid;
  place-items: center;
  width: 96px;
  height: 112px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.rulebook-choice-logo img {
  width: 76px;
  height: 88px;
  object-fit: contain;
}

.rulebook-choice-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.rulebook-choice-copy > strong {
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.15;
}

.rulebook-choice-description {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rulebook-choice-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin-top: 0.2rem;
  color: var(--league-accent);
  font-size: 0.84rem;
  font-weight: 850;
}

.rulebook-choice-action .ui-icon {
  width: 0.88rem;
  height: 0.66rem;
}

.rulebook-document-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: min(1080px, calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--league-accent);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.9);
}

.rulebook-document-heading > img {
  width: 74px;
  height: 88px;
  object-fit: contain;
}

.rulebook-document-heading .hero-title {
  margin: 0.15rem 0 0.35rem;
  text-align: left;
}

.rulebook-document-heading > div > p:last-child {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.5;
}

.rules-container {
  width: min(1080px, calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto 1.2rem;
}

.rules-hero {
  min-height: 0;
  padding: 1.15rem 0 0.9rem;
}

.rules-hero .hero-title {
  font-size: clamp(2rem, 3vw, 2.55rem);
}

/* About the League page */
.about-phase-chip {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--league-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.about-hero-actions {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.about-section {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.about-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-copy p + p {
  margin-top: 0.7rem;
}

.about-copy strong {
  color: var(--text);
}

.about-steps {
  display: grid;
  gap: 0.6rem;
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: about-step;
}

.about-steps li {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem 0.75rem 3.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  counter-increment: about-step;
}

.about-steps li::before {
  content: counter(about-step);
  position: absolute;
  top: 50%;
  left: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--league-accent);
  font-size: 0.85rem;
  font-weight: 900;
  transform: translateY(-50%);
}

.about-steps li strong {
  color: var(--text);
  font-size: 0.92rem;
}

.about-steps li span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.about-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  max-width: 860px;
  margin-bottom: 0.9rem;
}

.about-fact-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.about-fact-card strong {
  color: var(--league-accent);
  font-size: 1.55rem;
  line-height: 1.1;
}

.about-fact-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: start;
  max-width: 860px;
}

.about-points-table {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
}

.about-points-table th,
.about-points-table td {
  padding: 0.5rem 0.9rem;
  font-size: 0.86rem;
  text-align: left;
}

.about-points-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--league-accent);
}

.about-points-table tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.about-points-table td:last-child {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.about-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  max-width: 960px;
}

.about-glossary-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--league-accent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.about-glossary-item strong {
  color: var(--league-accent);
  font-size: 0.9rem;
}

.about-glossary-item span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .about-split {
    grid-template-columns: 1fr;
  }

  .about-points-table {
    width: 100%;
  }
}

.dropdown-wrapper {
  width: 100%;
  margin-bottom: 0.35rem;
}

.rulebook-section-heading {
  width: 100%;
  font-size: inherit;
  line-height: inherit;
}

.collapsible {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid var(--league-accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--league-accent);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  transition: background-color 0.18s ease, border-radius 0.18s ease, border-color 0.18s ease;
}

.collapsible::after {
  content: "\25BE";
  position: absolute;
  right: 1rem;
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.collapsible:hover,
.collapsible:focus-visible {
  background: rgba(255, 255, 255, 0.075);
}

.collapsible.active {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.collapsible.active::after {
  transform: rotate(180deg);
}

.content {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--league-accent);
  border-bottom: 1px solid var(--league-accent);
  border-left: 1px solid var(--league-accent);
  border-radius: 0 0 8px 8px;
  background: rgba(8, 9, 11, 0.8);
  opacity: 0;
  transform: scaleY(0.98);
  transform-origin: top;
  transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
}

.content.open {
  max-height: 1000px;
  opacity: 1;
  transform: scaleY(1);
}

.rule {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.38;
}

.rule:first-child {
  border-top: 0;
}

.rule strong {
  color: var(--league-accent);
  font-weight: 850;
}

.profile-container {
  display: flex;
  justify-content: center;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0;
}

.profile-panel {
  width: 100%;
  padding: 0.9rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-header > div {
  min-width: 0;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  object-fit: cover;
}

.profile-header h2 {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.profile-header p,
.muted {
  color: var(--subtle);
}

.profile-divider {
  height: 1px;
  margin: 0.65rem 0;
  border: 0;
  background: var(--border);
}

.profile-details {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-details strong {
  color: var(--text);
}

.profile-empty {
  margin-top: 1.25rem;
  color: var(--muted);
}

.profile-link {
  width: fit-content;
  border: 1px solid var(--league-accent);
  background: var(--league-accent);
  color: #090a0c;
}

.past-accounts {
  display: grid;
  gap: 0.4rem;
}

.past-accounts ul {
  padding-left: 1.1rem;
  color: var(--muted);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 99px);
  min-height: calc(100svh - 99px);
  width: min(620px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
}

.empty-card {
  width: 100%;
  padding: 1.35rem;
}

.empty-card h1 {
  margin: 0.2rem 0 0.7rem;
  color: var(--text);
  font-size: 2.1rem;
  line-height: 1.05;
}

.empty-card p {
  color: var(--muted);
}

.return-home-btn {
  margin-top: 0.9rem;
  border: 1px solid var(--league-accent);
  background: var(--league-accent);
  color: #090a0c;
}

.footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(9, 10, 12, 0.82);
  backdrop-filter: blur(18px);
  color: var(--subtle);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  width: min(var(--content-max), calc(100% - (var(--content-gutter) * 2)));
  min-height: 50px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  width: 22px;
  height: 22px;
}

.footer-separator {
  color: var(--subtle);
  opacity: 0.6;
}

.footer-link {
  color: var(--subtle);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--league-accent);
  border-bottom-color: var(--league-accent);
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.65s ease-out forwards;
}

.fade-in-delayed {
  opacity: 0;
  animation: fadeIn 0.65s ease-out 0.18s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 769px) {
  .standings-note {
    margin-top: 0.45rem;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.7rem;
  }

  .filter-buttons {
    margin-bottom: 0.65rem;
  }

  .standings-section h2 {
    margin-bottom: 0.45rem;
    padding-bottom: 0.3rem;
    font-size: 1rem;
  }

  .stats-player-profile-panel {
    gap: 0.6rem;
    padding: 0.7rem;
  }

  .stats-player-profile-panel::before {
    margin: -0.7rem -0.7rem 0;
  }

  .stats-player-profile-top {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 0.6rem;
    text-align: left;
  }

  .stats-player-detail-copy {
    justify-items: start;
  }

  .stats-submission-summary-main {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.6rem;
  }

  .stats-submission-scope {
    white-space: nowrap;
  }

  .provcompare-search {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .provcompare-submit {
    grid-column: auto;
    width: auto;
  }

  .past-accounts ul {
    columns: 2;
    column-gap: 2rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --content-max: 1440px;
    --wide-content-max: 1760px;
    --content-gutter: 1.5rem;
  }

  .navbar {
    gap: 0.9rem;
  }

  .league-tool-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .standings-matchup-list--detail {
    grid-template-columns: repeat(2, minmax(330px, 1fr));
  }

  .standings-matchup-card:has(.standings-result-panel:not([hidden])) {
    grid-column: 1 / -1;
  }

  .playoff-bracket-rounds {
    grid-auto-columns: minmax(300px, 1fr);
  }

  .playoff-round {
    min-width: 300px;
  }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1560px;
    --wide-content-max: 1880px;
    --content-gutter: 2rem;
  }

  .playoff-bracket-rounds {
    grid-auto-columns: minmax(320px, 1fr);
  }

  .playoff-round {
    min-width: 320px;
  }
}

@media (max-width: 1280px) {
  .navbar--league {
    gap: 0.45rem;
  }

  .navbar--league .logo-text {
    display: none;
  }

  .navbar--league .nav-links {
    gap: 0.16rem;
    margin-left: 0;
  }

  .navbar--league .nav-home-link,
  .navbar--league .dropbtn,
  .navbar--league .discord-login-btn {
    padding-right: 0.52rem;
    padding-left: 0.52rem;
    font-size: 0.84rem;
  }

  .navbar--league .user-dropbtn {
    max-width: 155px;
  }
}

/* The league navbar carries a link per league feature, so each one added
   narrows the width its single row still fits in. This is a second tightening
   step below the 1280px one above, scoped to league pages because only they
   carry the full link set. */
@media (max-width: 1150px) {
  .navbar--league {
    gap: 0.3rem;
  }

  .navbar--league .nav-links {
    gap: 0.1rem;
  }

  .navbar--league .nav-home-link,
  .navbar--league .dropbtn,
  .navbar--league .discord-login-btn {
    padding-right: 0.38rem;
    padding-left: 0.38rem;
    font-size: 0.79rem;
  }

  .navbar--league .user-dropbtn {
    max-width: 120px;
  }
}

@media (max-width: 1100px) {
  .stats-widget,
  .stats-widget--wide {
    width: calc(100% - (var(--content-gutter) * 2));
  }

  .stats-player-detail {
    grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
  }

  .stats-table th:nth-child(2),
  .stats-table td:nth-child(2) {
    width: 12.5rem;
  }

  .stats-table--compact th:nth-child(2),
  .stats-table--compact td:nth-child(2),
  .stats-table--ultra th:nth-child(2),
  .stats-table--ultra td:nth-child(2) {
    width: 11rem;
  }
}

@media (max-width: 900px) {
  :root {
    --content-gutter: 0.75rem;
    --stats-sticky-offset: 53px;
  }

  .navbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem max(var(--content-gutter), calc((100vw - var(--content-max)) / 2 + var(--content-gutter)));
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-menu-panel {
    position: absolute;
    top: calc(100% + 1px);
    right: 0.5rem;
    left: 0.5rem;
    display: none;
    gap: 0.5rem;
    max-height: calc(100vh - 4.25rem);
    max-height: calc(100dvh - 4.25rem);
    overflow-y: auto;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .navbar.is-open .nav-menu-panel {
    display: grid;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0.35rem;
    width: 100%;
    margin-left: 0;
  }

  .navbar--league .league-switcher {
    grid-column: 1 / -1;
  }

  .navbar--league .logo-text {
    display: inline;
  }

  .navbar--league .nav-links {
    gap: 0.35rem;
  }

  .nav-home-link,
  .dropbtn {
    justify-content: space-between;
    width: 100%;
    min-height: 36px;
    padding: 0.42rem 0.6rem;
  }

  .dropdown-content {
    position: static;
    display: none;
    min-width: 0;
    margin-top: 0.3rem;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .dropdown:hover > .dropdown-content,
  .dropdown:focus-within > .dropdown-content {
    display: none;
  }

  .dropdown.is-open > .dropdown-content {
    display: block;
  }

  .league-switcher-menu {
    width: 100%;
  }

  .auth-status {
    width: 100%;
    justify-content: stretch;
    margin-left: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .auth-status > *,
  .discord-login-btn,
  .user-dropdown,
  .user-dropbtn {
    width: 100%;
  }

  .user-dropbtn {
    max-width: none;
    justify-content: flex-start;
  }

  .home-hero-title,
  .league-hero-copy h1 {
    font-size: 2rem;
  }

  .provcompare-hero {
    grid-template-columns: 1fr;
  }

  .empty-state {
    min-height: calc(100vh - 103px);
    min-height: calc(100svh - 103px);
  }
}

@media (max-width: 768px) {
  :root {
    --content-gutter: 0.6rem;
    --control-height: 38px;
    --control-padding: 0.48rem 0.68rem;
    --panel-padding: 0.75rem;
    --section-space: 1.25rem;
  }

  .navbar {
    padding: 0.5rem 0.65rem;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  .logo-text {
    max-width: min(13rem, 60vw);
    font-size: 0.9rem;
    white-space: normal;
  }

  .section-heading h2 {
    font-size: 1.45rem;
  }

  .home-brand-logo {
    width: 52px;
    height: 52px;
  }

  .nav-menu-panel {
    right: 0.4rem;
    left: 0.4rem;
  }

  .hero-section {
    min-height: 0;
    padding: 1.35rem 0 0.85rem;
  }

  .home-hero,
  .league-hero {
    min-height: 0;
  }

  .hero-title {
    font-size: clamp(1.7rem, 8vw, 2.15rem);
  }

  .rules-hero .hero-title {
    font-size: clamp(1.7rem, 8vw, 2.15rem);
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .home-landing,
  .league-home-shell {
    width: calc(100% - (var(--content-gutter) * 2));
    max-width: calc(100% - (var(--content-gutter) * 2));
    padding-top: 0.7rem;
  }

  .home-hero-panel,
  .league-landing {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.75rem;
  }

  .home-hero-copy,
  .league-hero-copy {
    width: 100%;
    max-width: none;
  }

  .home-hero-title,
  .league-hero-copy h1 {
    font-size: clamp(1.55rem, 6.5vw, 1.85rem);
  }

  .home-hero-text {
    max-width: none;
    font-size: 0.9rem;
  }

  .home-hero-actions,
  .league-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .league-hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-secondary-btn,
  .league-outline-btn,
  .join-now-btn {
    width: 100%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    font-size: 0.82rem;
  }

  .home-league-section,
  .league-dashboard-section {
    padding-top: 1rem;
  }

  .home-league-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
    gap: 0.55rem;
  }

  .league-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .home-league-card {
    min-height: 116px;
  }

  .home-league-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .home-league-card strong {
    max-width: none;
    font-size: 1.02rem;
  }

  .home-league-card-content {
    gap: 0.4rem;
    padding: 0.65rem 0.65rem 0.65rem 0.8rem;
  }

  .home-league-logo {
    width: 34px;
    height: 34px;
  }

  .home-league-cta {
    font-size: 0.82rem;
  }

  .league-tool-card {
    grid-template-columns: 2.15rem minmax(0, 1fr) 0.8rem;
    gap: 0.55rem;
    min-height: 84px;
    padding: 0.7rem;
  }

  .league-tool-icon {
    width: 2.15rem;
    height: 2.15rem;
  }

  .league-tool-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .home-tool-panel {
    min-height: auto;
  }

  .section-container {
    width: calc(100% - (var(--content-gutter) * 2));
    max-width: calc(100% - (var(--content-gutter) * 2));
    padding: var(--section-space) 0;
  }

  .stats-widget,
  .stats-widget--wide {
    width: calc(100% - 0.8rem);
    margin: 0.7rem auto 1rem;
    padding: 0.7rem;
  }

  .stats-heading {
    font-size: clamp(1.45rem, 6vw, 1.75rem);
  }

  .category-tabs {
    justify-content: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .category-tabs--section .category-tab {
    flex: 1 1 0;
    min-width: 7rem;
  }

  .category-tabs--stats {
    flex-wrap: nowrap;
  }

  .category-tabs--stats .category-tab,
  .category-tab,
  .filter-button {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
  }

  .league-page-actions,
  .league-page-actions--hero {
    width: auto;
  }

  .league-back-link {
    width: auto;
    justify-content: flex-start;
  }

  .rulebook-choice-grid {
    grid-template-columns: 1fr;
  }

  .rulebook-choice-card {
    min-height: 190px;
  }

  .rulebook-document-heading {
    align-items: start;
  }

  .stats-player-search-controls {
    flex-direction: row;
  }

  .stats-scope-filter {
    align-items: end;
    flex-direction: row;
    justify-content: stretch;
    gap: 0.4rem;
  }

  .stats-scope-field {
    flex: 1 1 7.25rem;
    max-width: none;
    min-width: 7.25rem;
  }

  .stats-playoffs-filter {
    flex: 1 1 100%;
    justify-content: center;
  }

  .stats-records-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-records-filter .stats-scope-field {
    min-width: 0;
    max-width: none;
  }

  .stats-records-filter .stats-player-search-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .stats-records-summary {
    min-height: 102px;
    padding: 0.75rem 0.8rem 0.75rem 0.95rem;
  }

  .stats-records-featured-avatar {
    width: 62px;
    height: 62px;
  }

  .stats-record-holder {
    padding: 0.65rem;
  }

  .stats-record-holder-main {
    gap: 0.55rem;
  }

  .stats-record-holder-avatar {
    width: 46px;
    height: 46px;
  }

  .stats-player-search-button {
    width: auto;
    flex: 0 0 auto;
  }

  .stats-player-search-controls input,
  .stats-scope-field select,
  .stats-player-search-button {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .stats-player-detail {
    grid-template-columns: 1fr;
  }

  .stats-player-profile-panel {
    position: static;
    padding: 0.7rem;
  }

  .stats-player-profile-panel::before {
    margin: -0.7rem -0.7rem 0;
  }

  .stats-player-profile-top {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .stats-player-avatar {
    width: 64px;
    height: 64px;
  }

  .stats-player-detail-copy {
    justify-items: start;
  }

  .stats-player-detail-copy a {
    font-size: 1.18rem;
  }

  .stats-player-category-nav > div {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }

  .stats-player-results-header,
  .stats-player-category header {
    align-items: flex-end;
    flex-direction: row;
    gap: 0.55rem;
  }

  .stats-player-category {
    padding: 0.65rem;
  }

  .stats-player-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .stats-player-stat-item {
    min-height: 72px;
    padding: 0.55rem;
  }

  .stats-player-stat-item strong {
    font-size: 1.08rem;
  }

  .provcompare-hero {
    padding: 0.7rem;
  }

  .provcompare-hero-copy {
    justify-items: center;
    text-align: center;
  }

  .provcompare-hero-stats {
    width: 100%;
    max-width: none;
  }

  .provcompare-hero-tools {
    padding: 0.6rem;
  }

  .provcompare-title {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
  }

  .provcompare-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .provcompare-matchup {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    gap: 0.35rem;
    padding: 0.45rem;
  }

  .provcompare-versus {
    width: 34px;
    min-height: 0;
    padding: 0.2rem;
  }

  .provcompare-versus span {
    width: 30px;
    height: 30px;
    border-width: 1px;
    font-size: 0.72rem;
  }

  .provcompare-versus strong {
    display: none;
  }

  .provcompare-player-card {
    min-height: 150px;
    gap: 0.55rem;
    padding: 0.6rem;
  }

  .provcompare-player-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .provcompare-avatar {
    width: 54px;
    height: 54px;
  }

  .provcompare-player-copy a,
  .provcompare-player-empty {
    font-size: 0.98rem;
  }

  .provcompare-legacy-summary {
    grid-template-columns: 1fr;
    padding: 0.65rem;
  }

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

  .provcompare-overall-card strong {
    font-size: 1.18rem;
  }

  .provcompare-category-heading {
    align-items: flex-end;
    flex-direction: row;
    gap: 0.45rem;
  }

  .provcompare-winner-badge {
    width: auto;
  }

  .provcompare-category {
    padding: 0.65rem;
  }

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

  .provcompare-metric-values strong {
    font-size: 1.08rem;
  }

  .stats-leaderboard-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
  }

  .stats-table {
    min-width: 620px;
  }

  .stats-leaderboard-table-wrapper .stats-table th {
    top: 0;
  }

  .stats-table--compact {
    min-width: 580px;
  }

  .stats-table--ultra {
    min-width: 540px;
  }

  .stats-table th,
  .stats-table td {
    padding: 0.34rem 0.18rem;
    font-size: 0.71rem;
  }

  .stats-table--compact th,
  .stats-table--compact td {
    padding: 0.31rem 0.16rem;
    font-size: 0.68rem;
  }

  .stats-table--ultra th,
  .stats-table--ultra td {
    padding: 0.28rem 0.14rem;
    font-size: 0.64rem;
  }

  .stats-table th:nth-child(1),
  .stats-table td:nth-child(1) {
    width: 3.1rem;
  }

  .stats-table th:nth-child(2),
  .stats-table td:nth-child(2) {
    width: 8.8rem;
  }

  .stats-table th:nth-child(3),
  .stats-table td:nth-child(3),
  .stats-table th:last-child,
  .stats-table td:last-child {
    width: 3.3rem;
  }

  .stats-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
  .stats-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
    width: 3.5rem;
  }

  .stats-table--compact th:nth-child(2),
  .stats-table--compact td:nth-child(2),
  .stats-table--ultra th:nth-child(2),
  .stats-table--ultra td:nth-child(2) {
    width: 7.8rem;
  }

  .stats-table--compact th:nth-child(3),
  .stats-table--compact td:nth-child(3),
  .stats-table--compact th:last-child,
  .stats-table--compact td:last-child,
  .stats-table--ultra th:nth-child(3),
  .stats-table--ultra td:nth-child(3),
  .stats-table--ultra th:last-child,
  .stats-table--ultra td:last-child {
    width: 3rem;
  }

  .stats-table--compact th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
  .stats-table--compact td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
  .stats-table--ultra th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
  .stats-table--ultra td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
    width: 3.1rem;
  }

  .standings-table {
    min-width: 760px;
  }

  .standings-table--grouped {
    min-width: 0;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.62rem 0.45rem;
    font-size: 0.82rem;
  }

  .standings-team-logo {
    width: 24px;
    height: 24px;
  }

  .standings-division-widget {
    padding: 0.65rem;
  }

  .filter-buttons,
  .standings-division-filter {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .standings-view-filter {
    align-items: stretch;
    flex-direction: row;
  }

  .standings-view-button {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .matchup-board {
    grid-template-columns: 1fr;
  }

  .matchup-board-group {
    padding: 0.65rem 0.7rem;
  }

  .matchup-board-item {
    gap: 0.35rem;
    padding: 0.45rem 0.5rem;
  }

  .matchup-board-logo {
    width: 20px;
    height: 20px;
  }

  .matchup-board-name {
    font-size: 0.76rem;
  }

  .matchup-board-seed {
    font-size: 0.58rem;
  }

  .standings-group-grid {
    grid-template-columns: 1fr;
  }

  .standings-group-heading {
    align-items: center;
    flex-direction: row;
  }

  .standings-matchups-hero,
  .standings-matchups-dashboard {
    grid-template-columns: 1fr;
  }

  .standings-matchups-hero {
    padding: 0.65rem;
  }

  .standings-matchups-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .standings-matchup-team {
    padding: 0.5rem 0.6rem;
  }

  .standings-detail-section--standings,
  .standings-matchup-card,
  .standings-result-panel,
  .standings-result-team {
    padding: 0.6rem;
  }

  .standings-section-heading {
    align-items: end;
    flex-direction: row;
  }

  .standings-matchup-state {
    justify-items: end;
    min-width: 0;
    text-align: right;
  }

  .standings-matchup-state strong,
  .standings-matchup-state time,
  .standings-matchup-state > span:not(.standings-matchup-status) {
    max-width: 100%;
  }

  .standings-matchups-toggle,
  .standings-result-toggle {
    width: fit-content;
  }

  .standings-matchup-actions {
    display: flex;
  }

  .standings-result-table {
    min-width: 480px;
  }

  .playoff-bracket {
    --bracket-row-height: 4.15rem;
    --bracket-gap: 1.4rem;
  }

  .playoff-bracket-shell {
    padding: 0.55rem 0.6rem 0.65rem;
  }

  .playoff-bracket-rounds {
    grid-auto-columns: minmax(245px, 1fr);
  }

  .playoff-round {
    min-width: 245px;
  }

  .playoff-round h3 {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
  }

  .playoff-team {
    min-height: 38px;
    padding: 0.48rem 0.65rem;
  }

  .playoff-team-logo {
    width: 24px;
    height: 24px;
  }

  .rules-container,
  .profile-container,
  .empty-state {
    width: calc(100% - 1rem);
  }

  .collapsible {
    min-height: 44px;
    padding: 0.58rem 2.2rem 0.58rem 0.7rem;
    font-size: 0.86rem;
  }

  .profile-container {
    padding: 1rem 0;
  }

  .profile-panel,
  .empty-card {
    padding: 0.85rem;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
  }

  .empty-state {
    min-height: calc(100vh - 105px);
    min-height: calc(100svh - 105px);
  }

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

  .footer-content {
    min-height: 52px;
    flex-direction: row;
    gap: 0.45rem;
    padding: 0.55rem 0;
    font-size: 0.78rem;
  }

  .footer-logo {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 600px) {
  .league-tool-grid {
    grid-template-columns: 1fr;
  }

  .stats-records-filter {
    grid-template-columns: 1fr;
  }

  .stats-records-filter .stats-player-search-button {
    grid-column: auto;
  }

  .stats-record-holder-main {
    align-items: center;
    flex-wrap: wrap;
  }

  .stats-record-holder-copy {
    min-width: min(11rem, calc(100% - 8rem));
  }

  .stats-record-roblox-link {
    width: 100%;
  }

  .stats-record-holder-meta a {
    width: 100%;
    margin-left: 0;
  }

  .rulebook-chooser-hero {
    grid-template-columns: 1fr;
  }

  .rulebook-choice-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 0;
    padding: 0.8rem;
  }

  .rulebook-choice-logo {
    width: 72px;
    height: 90px;
  }

  .rulebook-choice-logo img {
    width: 58px;
    height: 70px;
  }

  .rulebook-document-heading {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .rulebook-document-heading > img {
    width: 56px;
    height: 68px;
  }
}

@media (max-width: 430px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .rules-hero .hero-title {
    font-size: 1.75rem;
  }

  .home-hero-title,
  .league-hero-copy h1 {
    font-size: 1.6rem;
  }

  .logo-text {
    max-width: 11.5rem;
  }

  .stats-records-summary {
    gap: 0.6rem;
  }

  .stats-records-featured-avatar {
    width: 52px;
    height: 52px;
  }

  .stats-record-matchup-line {
    flex-wrap: wrap;
  }

  .stats-record-matchup-line em {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

}

@media (max-width: 340px) {
  .logo-text {
    max-width: 9.5rem;
  }

  .home-title-row {
    gap: 0.55rem;
  }

  .home-brand-logo {
    width: 44px;
    height: 44px;
  }

  .provcompare-matchup {
    grid-template-columns: 1fr;
  }

  .provcompare-versus {
    width: 100%;
    min-height: 34px;
  }

  .provcompare-player-identity {
    align-items: center;
    flex-direction: row;
  }
}

@media (min-width: 769px) and (max-height: 820px) {
  :root {
    --section-space: 1.15rem;
  }

  .home-landing,
  .league-home-shell {
    padding-top: 0.65rem;
  }

  .home-hero-panel,
  .league-landing {
    padding: 0.65rem;
  }

  .hero-section {
    min-height: 150px;
    padding-top: 1.1rem;
    padding-bottom: 0.7rem;
  }

  .rules-hero {
    min-height: 0;
    padding-top: 0.8rem;
    padding-bottom: 0.6rem;
  }

  .stats-widget {
    margin-top: 0.55rem;
    margin-bottom: 0.75rem;
    padding: 0.7rem;
  }

  .league-dashboard-section {
    padding-top: 0.75rem;
  }

}

@media (max-height: 600px) {
  .hero-section {
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 0.7rem;
  }

  .rules-hero {
    padding-top: 0.7rem;
    padding-bottom: 0.5rem;
  }

  .home-landing,
  .league-home-shell {
    padding-top: 0.6rem;
  }

  .stats-widget {
    margin-top: 0.6rem;
    margin-bottom: 0.8rem;
  }

}

/* Staff dashboard */
.staff-shell {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 1.75rem var(--content-gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: var(--section-space);
}

.staff-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.staff-back-link:hover {
  color: var(--text);
}

.staff-header h1 {
  margin: 0 0 0.35rem;
  color: var(--league-accent);
}

.staff-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.staff-league-grid,
.staff-tool-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.staff-league-card {
  --card-accent: var(--prs-color);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.staff-league-card:hover,
.staff-league-card:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.staff-league-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.staff-league-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.staff-league-name {
  font-weight: 800;
  text-transform: uppercase;
}

.staff-league-meta,
.staff-tool-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.staff-league-card .ui-icon {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--card-accent);
}

.staff-tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.staff-tool-name {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
}

.staff-tool-status {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-tool-card--pending {
  opacity: 0.82;
}

.staff-notice,
.staff-empty {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.88rem;
}

.staff-notice {
  border-left: 3px solid var(--league-accent);
  color: var(--text);
}

.staff-link {
  color: var(--league-accent);
  text-decoration: none;
  font-weight: 700;
}

.staff-link:hover {
  text-decoration: underline;
}

.staff-panel {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.staff-panel-title {
  margin: 0;
  font-size: 1rem;
  color: var(--league-accent);
}

.staff-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.85rem;
  border: 0;
  padding: 0;
}

.staff-field > span {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.staff-field small {
  color: var(--subtle);
  font-size: 0.76rem;
}

.staff-field input[type="text"],
.staff-field input[type="url"],
.staff-field input[type="file"],
.staff-field select,
.staff-field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.staff-field textarea {
  resize: vertical;
}

.staff-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.staff-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.staff-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.staff-button:hover {
  background: var(--surface-strong);
  border-color: var(--league-accent);
}

.staff-button--primary {
  border-color: var(--league-accent);
  color: var(--league-accent);
}

.staff-button--danger {
  border-color: var(--danger);
  color: var(--danger);
}

.staff-button--quiet {
  min-height: var(--control-height-small);
  font-size: 0.76rem;
}

.staff-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.staff-review {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--league-accent);
  border-radius: 9px;
  background: var(--surface-soft);
}

.staff-review h3 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
}

.staff-review dl {
  margin: 0 0 0.6rem;
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 0.35rem 0.8rem;
}

.staff-review dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-review dd {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.staff-review-note {
  margin: 0 0 0.7rem;
  color: var(--subtle);
  font-size: 0.78rem;
}

.staff-submission {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.staff-submission:first-of-type {
  border-top: 0;
}

.staff-submission-title {
  font-weight: 800;
  color: var(--text);
}

.staff-tag-line {
  color: var(--league-accent);
  font-size: 0.78rem;
  word-break: break-word;
}

.staff-video {
  width: 100%;
  max-height: 460px;
  border-radius: 9px;
  background: #000;
}

.staff-copy-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.staff-copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-copy-field pre {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ---------------------------------------------------------------------------
   Art Gallery

   The public page renders all three sections at once and switches between them
   in the browser, so the hidden panels are ordinary `[hidden]` elements; their
   images are lazy so nothing downloads until a section is actually opened.
   --------------------------------------------------------------------------- */

.art-gallery-section {
  padding-bottom: var(--section-space);
}

.art-gallery-shell {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.art-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.art-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: var(--control-height);
  padding: var(--control-padding);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.art-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.art-tab.is-active {
  border-color: var(--league-accent);
  background: var(--surface-soft);
  color: var(--league-accent);
}

.art-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55em;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
}

.art-tab.is-active .art-tab-count {
  color: var(--league-accent);
}

.art-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.art-panel[hidden] {
  display: none;
}

.art-panel-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.art-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.art-card:hover {
  border-color: var(--league-accent);
  transform: translateY(-2px);
}

.art-card-frame {
  position: relative;
  display: block;
  /* A neutral ground behind transparent PNGs and letterboxed art, so a banner
     and a portrait player card can sit in the same grid without either being
     cropped. */
  background: var(--bg);
  line-height: 0;
}

.art-card-frame img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
}

.art-card-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--league-accent);
  color: #10110f;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.art-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 0.95rem;
}

.art-card-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.art-card-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.art-card-meta {
  margin: 0;
  color: var(--subtle);
  font-size: 0.76rem;
}

.art-empty {
  margin: 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Art Gallery Manager (staff dashboard) */

.staff-art-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.staff-art-row:first-of-type {
  border-top: 0;
  padding-top: 0.2rem;
}

.staff-art-thumb {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  line-height: 0;
}

.staff-art-thumb img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
}

.staff-art-form {
  min-width: 0;
}

.staff-art-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.staff-art-name {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.staff-art-badge {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--league-accent);
  color: #10110f;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .art-grid {
    grid-template-columns: 1fr;
  }

  .art-card-frame img {
    height: 200px;
  }

  .staff-art-row {
    grid-template-columns: 1fr;
  }

  .staff-art-thumb img {
    height: 180px;
  }
}

/* Segmented source picker and file control (Art Gallery Manager).

   The native file input renders unstyled and cannot be themed, so it is kept
   in the DOM for behaviour and accessibility but visually replaced: the whole
   control is a `<label>`, so a click anywhere on the button or the filename
   still opens the picker, and `:focus-within` reproduces the focus ring the
   hidden input would otherwise carry. */

.staff-segmented {
  display: inline-flex;
  /* The field around it is a column flex container, which would otherwise
     stretch this to the full form width instead of hugging its two options. */
  align-self: flex-start;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.staff-segmented-option {
  display: inline-flex;
}

.staff-segmented-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.staff-segmented-option > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-small);
  padding: 0.3rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.staff-segmented-option > span:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.staff-segmented-option input:checked + span {
  border-color: var(--league-accent);
  background: var(--surface-soft);
  color: var(--league-accent);
}

.staff-segmented-option input:focus-visible + span {
  outline: 2px solid var(--league-accent);
  outline-offset: 2px;
}

.staff-file-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.staff-file-input:hover {
  border-color: var(--border-strong);
}

.staff-file-input:focus-within {
  outline: 2px solid var(--league-accent);
  outline-offset: 2px;
  border-color: var(--league-accent);
}

/* Kept in the layout rather than `display: none` so it stays focusable, and so
   the browser can still point its validation message at the right control. */
.staff-field .staff-file-input input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
}

.staff-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-small);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.staff-file-input:hover .staff-file-button {
  border-color: var(--league-accent);
  color: var(--league-accent);
}

.staff-file-name {
  min-width: 0;
  flex: 1 1 8rem;
  color: var(--subtle);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-file-name.is-chosen {
  color: var(--text);
  font-weight: 700;
}

/* `.staff-field` sets `display: flex`, which beats the browser's own rule for
   `[hidden]`, so a source panel switched away from has to be hidden explicitly. */
.staff-field[data-art-source-panel][hidden],
.staff-field[data-rebrand-source-panel][hidden] {
  display: none;
}

/* Team rebrand request form.

   Reached from Discord rather than from site navigation, so it is deliberately
   narrow and single-purpose. It reuses the shared `staff-*` form primitives
   (fields, segmented picker, file control, buttons) because those are the
   site's form controls rather than anything staff-specific; only the layout,
   the colour picker and the before/after preview are new here. */

.rebrand-shell {
  width: min(1080px, calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: 0 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rebrand-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.rebrand-form-panel .staff-field:last-of-type {
  margin-bottom: 0.35rem;
}

.rebrand-preview-panel {
  position: sticky;
  top: calc(var(--stats-sticky-offset) + 0.75rem);
}

.rebrand-error {
  border-left-color: var(--danger);
}

.rebrand-counter {
  float: right;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.rebrand-field-error {
  color: var(--danger) !important;
  font-weight: 700;
}

.rebrand-disclaimer {
  margin: 0.25rem 0 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--league-accent);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Colour picker */

.rebrand-colour-auto {
  margin-bottom: 0.15rem;
}

.rebrand-colour-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.18s ease;
}

.rebrand-colour-controls.is-disabled {
  opacity: 0.45;
}

/* The native swatch is a small unstyled button in every browser, so it is
   sized and framed to sit level with the hex field beside it. */
.rebrand-colour-controls input[type="color"] {
  width: 52px;
  height: var(--control-height);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
}

.rebrand-colour-controls input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.rebrand-colour-controls input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

.rebrand-colour-controls input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 4px;
}

.staff-field .rebrand-colour-controls input[type="text"] {
  width: 8.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rebrand-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

/* Same reason as the source panels above: an explicit `display` outranks the
   browser's own handling of `[hidden]`. */
.rebrand-swatches[hidden] {
  display: none;
}

.rebrand-swatches-label {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rebrand-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rebrand-swatch,
.rebrand-swatch-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--swatch, var(--league-accent));
}

.rebrand-swatch {
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.rebrand-swatch:hover,
.rebrand-swatch:focus-visible {
  border-color: var(--text);
  transform: translateY(-1px);
}

.rebrand-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: -1px;
  margin-right: 0.15rem;
}

/* Before / after preview */

.rebrand-preview-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.rebrand-preview-arrow {
  width: 1.1rem;
  height: 0.85rem;
  color: var(--subtle);
}

.rebrand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0.6rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand, var(--league-accent));
  border-radius: 9px;
  background: var(--surface-soft);
  text-align: center;
  transition: border-color 0.18s ease;
}

.rebrand-card-tag {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rebrand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand, var(--league-accent)) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand, var(--league-accent)) 55%, transparent);
}

.rebrand-card-logo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.rebrand-card-initial {
  color: var(--brand, var(--league-accent));
  font-size: 1.6rem;
  font-weight: 900;
}

.rebrand-card-placeholder {
  padding: 0 0.4rem;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
}

.rebrand-card-name {
  color: var(--brand, var(--league-accent));
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rebrand-card-hex {
  color: var(--subtle);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.rebrand-preview-note {
  margin: 0;
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.5;
}

.rebrand-checklist {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Locked and submitted states */

.rebrand-message {
  max-width: 720px;
  margin: 0 auto;
}

.rebrand-message-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.rebrand-message-text--quiet {
  color: var(--subtle);
  font-size: 0.82rem;
}

.rebrand-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--league-accent);
  border-radius: 9px;
  background: var(--surface-soft);
}

.rebrand-summary-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.rebrand-summary-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.rebrand-summary-name {
  color: var(--league-accent);
  font-weight: 900;
  text-transform: uppercase;
}

.rebrand-summary-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .rebrand-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rebrand-preview-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 480px) {
  .rebrand-preview-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .rebrand-preview-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* Media Panel
   Reuses the staff-panel form system, because it is the same kind of page: a
   signed-in member editing records that belong to them. Only the pieces the
   media panel introduces live here - the league badge on a channel card, the
   member list, and the in-flight change notice. */

.media-panel-league-badge {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--league-accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.media-panel-card .staff-league-name {
  text-transform: none;
}

.media-panel-card .media-panel-league-badge {
  color: var(--card-accent);
}

.media-panel-pending {
  border-left: 3px solid var(--league-accent);
}

.media-panel-pending-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 0.9rem;
}

.media-panel-pending-list li + li {
  margin-top: 0.25rem;
}

/* Emoji and name sit side by side, because together they are one value: the
   channel name Discord ends up with. */
.media-panel-identity {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 1fr);
  gap: 0.85rem;
}

.media-panel-count {
  margin-left: 0.4rem;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.media-panel-members {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.media-panel-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.media-panel-member--owner {
  border-left: 3px solid var(--league-accent);
}

.media-panel-member-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.media-panel-member-role {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.media-panel-member form {
  flex: 0 0 auto;
  margin: 0;
}

.media-panel-add {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 620px) {
  .media-panel-identity {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The Commissioner's channel list is every media channel in the organisation,
   so it gets a filter field and cards that name their owner. */
.media-panel-filter {
  max-width: 22rem;
  margin-bottom: 0;
}

.media-panel-filter input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.media-panel-staff-notice {
  border-left-color: var(--danger);
}

/* `.staff-league-card` sets `display: flex`, which beats the browser's own
   rule for [hidden], so a filtered-out card has to be hidden explicitly. */
.staff-league-card[hidden] {
  display: none;
}
