:root {
  --ink: #0d161b;
  --ink-deep: #081014;
  --ink-soft: #111f25;
  --panel: #14242b;
  --panel-2: #192b32;
  --line: rgba(239, 236, 225, 0.14);
  --line-strong: rgba(239, 236, 225, 0.28);
  --bone: #f2eee3;
  --bone-soft: #c8c7bd;
  --muted: #899aa0;
  --orange: #ff6547;
  --orange-soft: #ff8a70;
  --aqua: #65d8c1;
  --yellow: #f2cf66;
  --tier-1: #f0c85a;
  --tier-2: #ff865f;
  --tier-3: #62d9c4;
  --tier-4: #72a8ff;
  --tier-5: #9ba8ae;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  --header-h: 76px;
  --page-pad: clamp(18px, 3vw, 54px);
  --max: 1720px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  background: var(--ink);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--bone);
  background:
    radial-gradient(circle at 84% -10%, rgba(101, 216, 193, .08), transparent 34rem),
    var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

body.modal-open {
  overflow: hidden;
}

body.profile-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
[href] {
  cursor: pointer;
}

img,
svg {
  display: block;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

::selection {
  color: var(--ink-deep);
  background: var(--aqua);
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 11px 15px;
  color: var(--ink);
  background: var(--aqua);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 var(--page-pad);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 22, 27, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  background: var(--ink-soft);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-type {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.brand-type span {
  color: var(--orange);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.status-pulse,
.sync-mark i {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(101, 216, 193, .08);
}

.status-pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--aqua);
  border-radius: inherit;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { opacity: .7; transform: scale(.35); }
  70%, 100% { opacity: 0; transform: scale(1.25); }
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}

.text-link {
  color: var(--bone-soft);
  font-size: 13px;
  font-weight: 600;
  transition: color .2s ease;
}

.text-link:hover {
  color: var(--bone);
}

.button {
  --button-bg: var(--orange);
  --button-color: #111416;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 14px;
  padding: 0 22px;
  overflow: hidden;
  color: var(--button-color);
  border: 1px solid transparent;
  background: var(--button-bg);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform .25s var(--ease), background .2s ease, color .2s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.18);
  transform: translateX(-105%) skewX(-18deg);
  transition: transform .5s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button:hover::before {
  transform: translateX(105%) skewX(-18deg);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button--small {
  min-height: 42px;
  padding: 0 17px;
  font-size: 12px;
}

.button--ghost {
  --button-bg: transparent;
  --button-color: var(--bone);
  border-color: var(--line-strong);
}

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, .94fr);
  align-items: center;
  min-height: min(590px, calc(100svh - var(--header-h)));
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(54px, 6vw, 88px) var(--page-pad);
  isolation: isolate;
}

.intro-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .38;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(48px, 5.5vw, 84px) clamp(48px, 5.5vw, 84px);
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.intro::after {
  content: "";
  position: absolute;
  right: 7%;
  top: 12%;
  z-index: -1;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(101, 216, 193, .1);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(101, 216, 193, .018),
    0 0 0 120px rgba(101, 216, 193, .01);
}

.intro-copy {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding-right: clamp(16px, 4vw, 80px);
}

.eyebrow,
.micro-label {
  margin: 0 0 28px;
  color: var(--aqua);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  justify-content: space-between;
  max-width: 520px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.eyebrow span:last-child {
  color: var(--muted);
}

.intro h1,
.rules-heading h2,
.error-card h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.intro h1 {
  font-size: clamp(50px, 6vw, 92px);
}

.intro h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 238, 227, .75);
}

.intro-lead {
  max-width: 620px;
  margin: 34px 0 0;
  color: var(--bone-soft);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.intro-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  perspective: 1200px;
}

.scanner-card {
  position: relative;
  width: min(100%, 500px);
  min-height: 430px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(140deg, rgba(101, 216, 193, .08), transparent 40%),
    rgba(17, 31, 37, .9);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px));
  box-shadow: 0 40px 100px rgba(0,0,0,.24);
  transform: rotateY(-5deg) rotateX(2deg);
}

.scanner-card::before,
.scanner-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--orange);
}

.scanner-card::before {
  top: 13px;
  left: 13px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.scanner-card::after {
  right: 13px;
  bottom: 13px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.scanner-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.scanner-rings {
  position: relative;
  display: grid;
  place-items: center;
  width: min(72vw, 290px);
  aspect-ratio: 1;
  margin: 40px auto 26px;
}

.scanner-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.scanner-rings span:nth-child(2) { inset: 16%; border-style: dashed; animation: spin 24s linear infinite; }
.scanner-rings span:nth-child(3) { inset: 33%; border-color: rgba(255,101,71,.5); }

.scanner-rings::before,
.scanner-rings::after {
  content: "";
  position: absolute;
  z-index: 2;
  background: var(--line-strong);
}

.scanner-rings::before { width: 118%; height: 1px; }
.scanner-rings::after { width: 1px; height: 118%; }

.scanner-rings svg {
  position: relative;
  z-index: 3;
  width: 62px;
  height: 62px;
  color: var(--bone);
  filter: drop-shadow(0 0 24px rgba(101,216,193,.22));
}

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

.scanner-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scanner-stats div {
  padding: 17px 12px;
  text-align: center;
}

.scanner-stats div + div {
  border-left: 1px solid var(--line);
}

.scanner-stats dt {
  min-height: 34px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.scanner-stats dd {
  margin: 5px 0 0;
  color: var(--bone);
  font-family: var(--display);
  font-size: 25px;
}

.visual-coordinate {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .15em;
}

.visual-coordinate--top { top: 0; right: 2%; }
.visual-coordinate--side { left: -28px; bottom: 14%; transform: rotate(-90deg); }

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-deep);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 50px;
  animation: marquee 32s linear infinite;
}

.ticker span {
  color: var(--bone-soft);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .18em;
}

.ticker i {
  width: 5px;
  height: 5px;
  margin: 0 28px;
  background: var(--orange);
  transform: rotate(45deg);
}

@keyframes marquee { to { transform: translateX(-50%); } }

.rating-section,
.rules-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 6vw, 96px) var(--page-pad);
}

.section-ruler {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .16em;
}

.section-ruler i {
  height: 1px;
  background: var(--line);
}

.rating-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(13, 22, 27, .9);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(0,0,0,.15);
}

.scope-switch {
  display: inline-flex;
  gap: 4px;
}

.scope-button {
  min-height: 44px;
  padding: 0 17px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: .2s ease;
}

.scope-button sup {
  margin-left: 4px;
  color: var(--orange-soft);
  font-size: 8px;
}

.scope-button:hover {
  color: var(--bone);
  background: rgba(242,238,227,.04);
}

.scope-button.is-active {
  color: var(--ink-deep);
  border-color: var(--bone);
  background: var(--bone);
}

.scope-button.is-active sup {
  color: var(--ink-deep);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(120px, 260px) auto;
  align-items: center;
  min-height: 44px;
  gap: 11px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.search-box svg {
  width: 17px;
  height: 17px;
}

.search-box input {
  min-width: 0;
  color: var(--bone);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box kbd {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: var(--ink-soft);
  font-family: var(--body);
  font-size: 10px;
}

.rating-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(250px, 310px);
  align-items: start;
  gap: 22px;
}

.mode-rail,
.leaderboard,
.kit-dossier {
  border: 1px solid var(--line);
  background: rgba(17, 31, 37, .55);
}

.mode-rail,
.kit-dossier {
  position: sticky;
  top: calc(var(--header-h) + 92px);
  max-height: calc(100vh - var(--header-h) - 110px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.rail-head {
  display: flex;
  justify-content: space-between;
  padding: 18px 16px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mode-nav {
  display: grid;
  padding: 7px;
}

.mode-button {
  --mode-color: var(--aqua);
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  padding: 7px 10px;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid rgba(239,236,225,.07);
  background: transparent;
  text-align: left;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.mode-button:hover {
  color: var(--bone);
  background: rgba(242,238,227,.04);
  transform: translateX(3px);
}

.mode-button.is-active {
  color: var(--bone);
  background: color-mix(in srgb, var(--mode-color) 11%, transparent);
}

.mode-button.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--mode-color);
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--mode-color);
  border: 1px solid color-mix(in srgb, var(--mode-color) 30%, transparent);
}

.mode-icon svg {
  width: 17px;
  height: 17px;
}

.mode-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-code {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.rail-foot {
  padding: 20px 16px;
  color: var(--muted);
}

.rail-foot p {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.rail-cross {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
}

.rail-cross::before,
.rail-cross::after {
  content: "";
  position: absolute;
  background: var(--orange);
}

.rail-cross::before { left: 7px; width: 1px; height: 15px; }
.rail-cross::after { top: 7px; width: 15px; height: 1px; }

.leaderboard {
  min-width: 0;
  overflow: hidden;
}

.leaderboard-head {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(22px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}

.leaderboard-head .micro-label {
  margin-bottom: 12px;
}

.leaderboard-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(25px, 2.4vw, 40px);
  font-weight: 600;
  letter-spacing: -.045em;
}

.leaderboard-head p:last-child {
  max-width: 570px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.leaderboard-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sync-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sync-mark i {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    rgba(8,16,20,.36);
  background-size: 42px 42px;
}

.podium-card {
  --podium-accent: var(--bone-soft);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 255px;
  overflow: hidden;
  padding: 17px;
  color: var(--bone);
  border: 1px solid var(--line);
  background: rgba(20,36,43,.96);
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  transition: transform .3s var(--ease), border-color .2s ease, background .2s ease;
}

.podium-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background: linear-gradient(145deg, var(--podium-accent), transparent 56%);
  pointer-events: none;
}

.podium-card:hover {
  z-index: 2;
  border-color: color-mix(in srgb, var(--podium-accent) 55%, var(--line));
  background: var(--panel-2);
  transform: translateY(-5px);
}

.podium-card[data-rank="1"] {
  --podium-accent: var(--yellow);
  min-height: 300px;
  border-color: rgba(242,207,102,.34);
}

.podium-card[data-rank="2"] { --podium-accent: #aabac1; }
.podium-card[data-rank="3"] { --podium-accent: #d88957; }

@media (min-width: 721px) {
  .podium-card {
    min-height: 0;
    height: 300px;
  }

  .podium-card[data-rank="1"] {
    min-height: 0;
    height: 350px;
  }

  .podium-card[data-rank="1"] .podium-skin {
    width: clamp(80px, 8vw, 116px);
    height: clamp(108px, 10.8vw, 150px);
  }

  .podium-card:not([data-rank="1"]) .mini-tier:nth-child(n + 4) {
    display: none;
  }
}

.podium-rank {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: var(--podium-accent);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .1em;
}

.podium-rank strong {
  color: var(--podium-accent);
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1;
}

.podium-player {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
  padding: 14px 0;
}

.podium-skin,
.player-avatar,
.profile-avatar {
  image-rendering: pixelated;
}

.podium-skin {
  align-self: center;
  width: clamp(66px, 7vw, 104px);
  height: clamp(88px, 9.4vw, 138px);
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.35));
  transition: transform .35s var(--ease);
}

.podium-card:hover .podium-skin {
  transform: translateY(-3px) scale(1.04);
}

.podium-points {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.podium-points strong {
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(22px, 2.5vw, 36px);
  letter-spacing: -.04em;
}

.podium-foot {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.podium-name {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tier-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.mini-tier,
.tier-badge {
  --tier-color: var(--tier-5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tier-color);
  border: 1px solid color-mix(in srgb, var(--tier-color) 35%, transparent);
  background: color-mix(in srgb, var(--tier-color) 8%, transparent);
  font-family: var(--display);
  font-size: 7px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
}

.mini-tier { min-height: 20px; padding: 0 6px; }
.tier-badge { min-width: 49px; min-height: 27px; padding: 0 9px; font-size: 9px; }
.tier-badge[data-tier^="HT1"], .tier-badge[data-tier^="LT1"], .mini-tier[data-tier^="HT1"], .mini-tier[data-tier^="LT1"] { --tier-color: var(--tier-1); }
.tier-badge[data-tier^="HT2"], .tier-badge[data-tier^="LT2"], .mini-tier[data-tier^="HT2"], .mini-tier[data-tier^="LT2"] { --tier-color: var(--tier-2); }
.tier-badge[data-tier^="HT3"], .tier-badge[data-tier^="LT3"], .mini-tier[data-tier^="HT3"], .mini-tier[data-tier^="LT3"] { --tier-color: var(--tier-3); }
.tier-badge[data-tier^="HT4"], .tier-badge[data-tier^="LT4"], .mini-tier[data-tier^="HT4"], .mini-tier[data-tier^="LT4"] { --tier-color: var(--tier-4); }

.table-head,
.player-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) minmax(130px, .9fr) 70px 38px;
  align-items: center;
  gap: 14px;
}

.table-head {
  padding: 13px clamp(18px, 2.4vw, 30px);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.table-head span:nth-child(3) { text-align: right; }

.leaderboard-rows {
  display: grid;
}

.player-row {
  width: 100%;
  min-height: 76px;
  padding: 10px clamp(18px, 2.4vw, 30px);
  color: var(--bone);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: background .2s ease, transform .25s var(--ease);
}

.player-row:hover {
  background: rgba(101,216,193,.045);
}

.player-row:hover .row-arrow {
  color: var(--orange);
  transform: translateX(4px);
}

.player-cell {
  display: grid;
  grid-template-columns: 32px 46px minmax(0,1fr);
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.row-rank {
  color: var(--muted);
  font-family: var(--display);
  font-size: 10px;
}

.player-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--ink-deep);
}

.player-identity {
  min-width: 0;
}

.player-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-subline {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.best-result {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.best-result span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-points {
  text-align: right;
  font-family: var(--display);
  font-size: 16px;
}

.row-arrow {
  justify-self: end;
  color: var(--muted);
  transition: .2s var(--ease);
}

.row-arrow svg {
  width: 18px;
  height: 18px;
}

.empty-state {
  padding: clamp(50px, 8vw, 100px) 24px;
  text-align: center;
}

.empty-index {
  display: block;
  color: rgba(242,238,227,.07);
  font-family: var(--display);
  font-size: clamp(70px, 11vw, 150px);
  line-height: .8;
}

.empty-state h3 {
  margin: -8px 0 10px;
  font-family: var(--display);
  font-size: 19px;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 13px;
}

.kit-dossier {
  min-height: 390px;
}

.dossier-loading {
  padding: 24px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Dynamic kit dossier */
.kit-dossier__header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 21px 20px;
  border-bottom: 1px solid var(--line);
}

.kit-dossier__icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--kit-accent, var(--aqua));
  border: 1px solid color-mix(in srgb, var(--kit-accent, var(--aqua)) 38%, transparent);
  background: color-mix(in srgb, var(--kit-accent, var(--aqua)) 7%, transparent);
}

.kit-dossier__icon-svg {
  width: 23px;
  height: 23px;
}

.kit-dossier__heading {
  min-width: 0;
}

.kit-dossier__eyebrow {
  display: block;
  overflow: hidden;
  color: var(--kit-accent, var(--aqua));
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.kit-dossier__title {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.kit-dossier__description,
.kit-dossier__note {
  margin: 0;
  padding: 17px 20px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.kit-dossier__stats {
  display: grid;
  margin: 0;
  padding: 0 20px;
}

.definition {
  display: flex;
  justify-content: space-between;
  gap: 13px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.definition__term {
  color: var(--muted);
  font-size: 9px;
}

.definition__value {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.kit-dossier__focus {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.kit-dossier__subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kit-dossier__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kit-dossier__tag {
  padding: 5px 7px;
  color: var(--bone-soft);
  border: 1px solid var(--line);
  background: var(--ink-deep);
  font-size: 8px;
}

.kit-dossier__note {
  border-bottom: 0;
  color: var(--bone-soft);
  font-size: 9px;
}

.dossier-head {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.dossier-number {
  position: absolute;
  right: -4px;
  top: -15px;
  color: rgba(242,238,227,.05);
  font-family: var(--display);
  font-size: 76px;
  line-height: 1;
}

.dossier-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 25px;
  color: var(--mode-color, var(--aqua));
  border: 1px solid color-mix(in srgb, var(--mode-color, var(--aqua)) 42%, transparent);
  background: color-mix(in srgb, var(--mode-color, var(--aqua)) 7%, transparent);
}

.dossier-icon svg { width: 25px; height: 25px; }

.dossier-type {
  color: var(--mode-color, var(--aqua));
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dossier-head h3 {
  margin: 8px 0 7px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.dossier-head p,
.dossier-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dossier-body {
  padding: 20px 22px;
}

.dossier-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 20px;
}

.loadout-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: var(--mode-color, var(--aqua));
  border: 1px solid var(--line);
  background: var(--ink-deep);
}

.loadout-slot svg { width: 19px; height: 19px; }

.dossier-facts {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.dossier-facts div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.dossier-facts dt {
  color: var(--muted);
  font-size: 10px;
}

.dossier-facts dd {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.rules-section {
  border-top: 1px solid var(--line);
}

.rules-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  column-gap: clamp(40px, 8vw, 150px);
  align-items: end;
  margin-bottom: 50px;
}

.rules-heading .micro-label {
  grid-column: 1 / -1;
  margin-bottom: 18px;
}

.rules-heading h2 {
  font-size: clamp(42px, 5.5vw, 86px);
}

.rules-heading > p:last-child {
  max-width: 520px;
  margin: 0 0 7px;
  color: var(--bone-soft);
  font-size: clamp(15px, 1.35vw, 19px);
}

.score-scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  border: 1px solid var(--line);
}

.score-item {
  position: relative;
  min-width: 0;
  min-height: 146px;
  padding: 16px 12px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(17,31,37,.64);
}

.score-item:last-child { border-right: 0; }

.score-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--tier-color);
}

.score-item span,
.score-item small {
  display: block;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.score-item strong {
  display: block;
  margin-top: 22px;
  color: var(--tier-color);
  font-family: var(--display);
  font-size: clamp(23px, 2vw, 33px);
  line-height: 1;
}

.score-item small { margin-top: 6px; font-family: var(--body); font-size: 9px; }
.score-item--1, .score-item--1l { --tier-color: var(--tier-1); }
.score-item--2, .score-item--2l { --tier-color: var(--tier-2); }
.score-item--3, .score-item--3l { --tier-color: var(--tier-3); }
.score-item--4, .score-item--4l { --tier-color: var(--tier-4); }
.score-item--5, .score-item--5l { --tier-color: var(--tier-5); }
.score-item[class$="l"] { opacity: .72; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-grid article {
  padding: clamp(25px, 3vw, 44px);
}

.method-grid article + article { border-left: 1px solid var(--line); }

.method-grid article > span {
  color: var(--orange);
  font-family: var(--display);
  font-size: 9px;
}

.method-grid h3 {
  margin: 32px 0 9px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  padding: 0 var(--page-pad) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--ink-deep);
}

.footer-main,
.footer-base {
  display: grid;
  max-width: var(--max);
  margin: 0 auto;
}

.footer-main {
  grid-template-columns: 1fr minmax(260px, 480px) 1fr;
  align-items: center;
  gap: 30px;
  min-height: 180px;
}

.brand--footer .brand-mark { width: 42px; height: 42px; }

.footer-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-cta svg { color: var(--orange); }

.footer-base {
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.footer-base a { justify-self: end; }

.mobile-dock {
  display: none;
}

.profile-dialog {
  width: min(1060px, calc(100vw - 32px));
  max-width: none;
  max-height: min(860px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: visible;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  background: var(--ink-soft);
  box-shadow: 0 40px 120px rgba(0,0,0,.64);
}

.profile-dialog[open] {
  animation: dialog-in .35s var(--ease) both;
}

.profile-dialog::backdrop {
  background: rgba(2, 8, 10, .76);
  backdrop-filter: blur(8px);
  animation: fade-in .25s ease both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
}

@keyframes fade-in { from { opacity: 0; } }

.profile-shell {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
  overflow: hidden;
}

.profile-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  color: var(--muted);
  border-right: 1px solid var(--line);
  background: var(--ink-deep);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .16em;
  writing-mode: vertical-rl;
  grid-row: 1 / 3;
}

.profile-rail i {
  width: 1px;
  flex: 1;
  background: var(--line);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  background: rgba(13,22,27,.88);
  transition: color .2s ease, background .2s ease, transform .25s var(--ease);
}

.icon-button:hover {
  color: var(--orange);
  background: var(--ink-deep);
  transform: rotate(3deg);
}

.profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.profile-close svg { width: 20px; height: 20px; }

.profile-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-toolbar {
  position: relative;
  z-index: 4;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 11px 70px 11px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(13,22,27,.94);
}

.profile-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 620px;
}

/* Dynamic player profile */
.profile-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  min-height: 590px;
}

.profile-identity {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: min(794px, calc(100dvh - 98px));
  padding: 28px 24px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--ink-deep);
  background-size: 32px 32px;
}

.profile-identity__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--aqua);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-identity__name {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.profile-skin {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 275px;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(20,36,43,.78);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.profile-skin::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 16px;
  height: 15px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  filter: blur(8px);
}

.profile-skin__image {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 255px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 17px 24px rgba(0,0,0,.42));
}

.profile-skin__fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.profile-skin.has-image .profile-skin__fallback {
  opacity: 0;
}

.player-avatar--large {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  background: var(--ink-deep);
}

.player-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.player-avatar__fallback {
  font-family: var(--display);
  font-size: 22px;
}

.player-avatar.has-image .player-avatar__fallback {
  display: none;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  margin: auto 0 0;
  border: 1px solid var(--line);
}

.profile-metric {
  min-width: 0;
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-metric:nth-child(even) { border-right: 0; }
.profile-metric:nth-last-child(-n+2) { border-bottom: 0; }

.profile-metric__label {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.profile-metric__value {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 14px;
}

.profile-metric--emphasis .profile-metric__value {
  color: var(--yellow);
  font-size: 20px;
}

.profile-ledger {
  min-width: 0;
  padding: clamp(24px, 3vw, 42px);
}

.profile-tier-section + .profile-tier-section {
  margin-top: 30px;
}

.profile-tier-section__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-tier-section__heading::after {
  content: "";
  order: 2;
  flex: 1;
  height: 1px;
  background: var(--line);
}

.profile-tier-section__title {
  margin: 0;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-tier-section__count {
  order: 3;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
}

.profile-tier-section__note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.profile-tier-card {
  --kit-accent: var(--aqua);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 59px;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(8,16,20,.42);
}

.profile-tier-card__heading {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.profile-tier-card__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--kit-accent);
  border: 1px solid color-mix(in srgb, var(--kit-accent) 28%, transparent);
  background: color-mix(in srgb, var(--kit-accent) 6%, transparent);
}

.profile-tier-card__icon-svg { width: 17px; height: 17px; }

.profile-tier-card__name {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tier-card__value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.profile-tier-card__points {
  color: var(--muted);
  font-size: 7px;
}

.profile-history__placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 35px;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.profile-history__mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

.profile-history__mark-icon { width: 26px; height: 26px; }

.profile-history__title {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 16px;
}

.profile-history__text {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.profile-history__item {
  padding: 15px;
  border: 1px solid var(--line);
}

.profile-history__item + .profile-history__item { margin-top: 7px; }
.profile-history__heading,
.profile-history__change { display: flex; justify-content: space-between; gap: 15px; }
.profile-history__date,
.profile-history__divider { color: var(--muted); font-size: 9px; }
.profile-history__change { margin-top: 10px; }

.profile-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--ink-deep);
  background-size: 32px 32px;
}

.profile-position {
  color: var(--aqua);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.profile-skin-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  margin: 22px 0;
  border: 1px solid var(--line);
  background: rgba(20,36,43,.62);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.profile-skin-stage::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  filter: blur(8px);
}

.profile-avatar {
  position: relative;
  z-index: 2;
  width: 126px;
  height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.38));
}

.profile-aside h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.profile-caption {
  margin: 5px 0 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: auto 0 0;
  border: 1px solid var(--line);
}

.profile-stats div {
  padding: 13px;
}

.profile-stats div + div { border-left: 1px solid var(--line); }

.profile-stats dt {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 20px;
}

.profile-main {
  min-width: 0;
  padding: clamp(26px, 4vw, 50px);
}

.profile-main-head {
  padding-right: 50px;
}

.profile-kicker {
  margin: 0 0 9px;
  color: var(--orange);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.profile-main-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -.045em;
}

.profile-main-head p:last-child {
  max-width: 600px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 27px 0 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.profile-tabs {
  display: inline-flex;
  gap: 5px;
}

.profile-tab,
.profile-copy {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  transition: .2s ease;
}

.profile-tab:hover,
.profile-copy:hover { color: var(--bone); border-color: var(--line-strong); }

.profile-tab.is-active {
  color: var(--ink-deep);
  background: var(--bone);
}

.profile-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-copy svg { width: 14px; height: 14px; }

.profile-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 23px 0 11px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.profile-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.profile-tier-card {
  --mode-color: var(--aqua);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 11px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(8,16,20,.42);
}

.profile-tier-card.is-empty { opacity: .42; }

.profile-tier-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--mode-color);
  border: 1px solid color-mix(in srgb, var(--mode-color) 25%, transparent);
  background: color-mix(in srgb, var(--mode-color) 6%, transparent);
}

.profile-tier-icon svg { width: 19px; height: 19px; }

.profile-tier-name {
  min-width: 0;
}

.profile-tier-name strong,
.profile-tier-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tier-name strong { font-size: 11px; }
.profile-tier-name span { color: var(--muted); font-size: 8px; }

.history-empty {
  min-height: 270px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.history-empty svg {
  width: 36px;
  height: 36px;
  margin: 0 auto 18px;
  color: var(--muted);
}

.history-empty h4 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 14px;
}

.history-empty p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 250;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 16px;
  color: var(--ink-deep);
  background: var(--aqua);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: .28s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 20px;
}

.error-card {
  width: min(680px, 100%);
  padding: clamp(30px, 7vw, 80px);
  border: 1px solid var(--line-strong);
  background: var(--ink-soft);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.error-code {
  color: var(--orange);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: .14em;
}

.error-card h1 {
  margin-top: 30px;
  font-size: clamp(36px, 7vw, 70px);
}

.error-card p {
  margin: 20px 0 28px;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .rating-layout {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  .kit-dossier {
    position: static;
    grid-column: 2;
    display: block;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .dossier-head { border-right: 0; border-bottom: 1px solid var(--line); }

  .score-scale { grid-template-columns: repeat(5, 1fr); }
  .score-item:nth-child(5) { border-right: 0; }
  .score-item:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }

  .site-header { grid-template-columns: 1fr auto; }
  .header-status { display: none; }
  .text-link { display: none; }

  .intro {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 84px;
  }

  .intro-copy { padding-right: 0; }
  .intro h1 { max-width: 800px; }
  .intro::after { right: -28%; top: 40%; width: 90vw; }
  .intro-visual { min-height: 480px; margin-top: 55px; }
  .scanner-card { min-height: 450px; transform: rotateY(-3deg); }

  .rating-toolbar { top: calc(var(--header-h) + 8px); }

  .rating-layout { grid-template-columns: 1fr; }

  .mode-rail {
    position: static;
    max-height: none;
    overflow: hidden;
  }

  .rail-head,
  .rail-foot { display: none; }

  .mode-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .mode-nav::-webkit-scrollbar { display: none; }

  .mode-button {
    grid-template-columns: 29px auto;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 6px 11px 6px 7px;
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .mode-button.is-active::before { display: none; }
  .mode-button:hover { transform: none; }
  .mode-code { display: none; }
  .mode-icon { width: 28px; height: 28px; }

  .kit-dossier {
    grid-column: 1;
  }

  .rules-heading { grid-template-columns: 1fr; }
  .rules-heading > p:last-child { margin-top: 26px; }

  .footer-main { grid-template-columns: 1fr auto; }
  .footer-main p { grid-column: 1 / -1; grid-row: 2; text-align: left; padding-bottom: 25px; }
}

@media (max-width: 720px) {
  :root { --header-h: 62px; --page-pad: 16px; }

  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-header { min-height: var(--header-h); }
  .brand-mark { width: 31px; height: 31px; }
  .brand-type { font-size: 14px; }
  .header-actions .button { min-height: 38px; padding: 0 13px; }
  .header-actions .button svg { display: none; }

  .intro {
    padding-top: 68px;
    padding-bottom: 70px;
  }

  .eyebrow { margin-bottom: 22px; }
  .intro h1 { font-size: clamp(44px, 13.8vw, 72px); letter-spacing: -.07em; }
  .intro-lead { margin-top: 25px; font-size: 15px; }
  .intro-actions { margin-top: 28px; }
  .intro-actions .button { flex: 1 1 170px; }
  .intro-visual { min-height: 400px; margin-top: 42px; }
  .scanner-card { min-height: 390px; padding: 20px; transform: none; }
  .scanner-rings { width: min(66vw, 240px); margin-top: 32px; }
  .scanner-stats div { padding: 12px 6px; }
  .scanner-stats dt { font-size: 8px; }
  .scanner-stats dd { font-size: 19px; }
  .visual-coordinate--side { display: none; }

  .intro-visual {
    min-height: 190px;
    margin-top: 34px;
  }

  .scanner-card {
    min-height: 0;
    padding: 17px;
  }

  .scanner-rings {
    display: none;
  }

  .scanner-stats {
    margin-top: 34px;
  }

  .rating-section,
  .rules-section { padding-top: 68px; padding-bottom: 75px; }

  .rating-toolbar {
    top: calc(var(--header-h) + 6px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 7px;
  }

  .scope-switch { display: grid; grid-template-columns: repeat(2, 1fr); }
  .scope-button { min-height: 40px; }
  .search-box {
    grid-template-columns: auto 1fr;
    border-top: 1px solid var(--line);
    border-left: 0;
    min-height: 42px;
  }
  .search-box kbd { display: none; }

  .leaderboard-head {
    display: block;
    padding: 22px 18px;
  }

  .leaderboard-head h2 { font-size: 26px; }
  .leaderboard-meta { flex-direction: row; margin-top: 19px; }

  .podium {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 7px;
    padding: 12px;
  }

  .podium-card { min-height: 190px; padding: 13px; }
  .podium-card[data-rank="1"] {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 240px;
  }
  .podium-card[data-rank="2"] { grid-column: 1; grid-row: 2; }
  .podium-card[data-rank="3"] { grid-column: 2; grid-row: 2; }
  .podium-card[data-rank="2"],
  .podium-card[data-rank="3"] { min-height: 202px; }
  .podium-card[data-rank="1"] .podium-player { justify-content: space-around; }
  .podium-card[data-rank="1"] .podium-skin { width: 92px; height: 124px; }
  .podium-card[data-rank="2"] .podium-skin,
  .podium-card[data-rank="3"] .podium-skin { width: 53px; height: 74px; }
  .podium-card[data-rank="2"] .podium-points strong,
  .podium-card[data-rank="3"] .podium-points strong { font-size: 20px; }
  .podium-name { font-size: 11px; }
  .tier-strip { display: none; }

  .table-head { display: none; }
  .player-row {
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 9px;
    min-height: 70px;
    padding: 9px 13px;
  }
  .player-cell { grid-template-columns: 27px 42px minmax(0,1fr); gap: 8px; }
  .row-rank { font-size: 9px; }
  .player-avatar { width: 40px; height: 40px; }
  .best-result { display: none; }
  .row-points { font-size: 14px; }
  .row-arrow svg { width: 15px; height: 15px; }

  .kit-dossier {
    display: block;
  }
  .dossier-head { border-right: 0; border-bottom: 1px solid var(--line); }

  .rules-heading h2 { font-size: clamp(38px, 12vw, 58px); }
  .score-scale { grid-template-columns: repeat(2, 1fr); }
  .score-item { min-height: 100px; }
  .score-item:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .score-item:nth-child(even) { border-right: 0; }
  .score-item:nth-last-child(-n+2) { border-bottom: 0; }
  .score-item strong { margin-top: 14px; }

  .method-grid { grid-template-columns: 1fr; }
  .method-grid article + article { border-top: 1px solid var(--line); border-left: 0; }
  .method-grid h3 { margin-top: 20px; }

  .footer-main { grid-template-columns: 1fr; padding: 34px 0; }
  .footer-main p { grid-column: 1; grid-row: auto; padding: 0; }
  .footer-cta { justify-self: start; }
  .footer-base { grid-template-columns: 1fr; gap: 7px; }
  .footer-base a { justify-self: start; }

  .mobile-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(9px + env(safe-area-inset-bottom));
    z-index: 48;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 58px;
    border: 1px solid var(--line-strong);
    background: rgba(8,16,20,.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0,0,0,.34);
  }

  .mobile-dock a,
  .mobile-dock button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    border: 0;
    background: transparent;
    font-size: 8px;
    font-weight: 700;
  }

  .mobile-dock > * + * { border-left: 1px solid var(--line); }
  .mobile-dock svg { width: 18px; height: 18px; color: var(--bone); }

  .profile-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
  }
  .profile-shell { display: block; height: 100dvh; }
  .profile-rail { display: none; }
  .profile-toolbar {
    position: absolute;
    inset: 0 0 auto 0;
    min-height: 64px;
    padding: 10px 64px 10px 10px;
  }
  .profile-content { height: 100dvh; padding-top: 64px; }
  .profile-grid { display: block; min-height: 100%; }
  .profile-layout { display: block; min-height: 100%; }
  .profile-identity { position: relative; min-height: 500px; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-skin { min-height: 250px; }
  .profile-skin__image { height: 230px; }
  .profile-ledger { padding: 25px 16px 100px; }
  .profile-aside { min-height: 510px; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-skin-stage { min-height: 260px; }
  .profile-avatar { height: 220px; }
  .profile-main { padding: 26px 18px 100px; }
  .profile-actions { align-items: stretch; }
  .profile-tabs { flex: 1; }
  .profile-tab { flex: 1; padding: 0 10px; }
  .profile-copy { width: 40px; padding: 0; justify-content: center; }
  .profile-copy span { display: none; }
  .profile-tier-grid { grid-template-columns: 1fr; }

  .toast { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .header-actions .button { padding: 0 10px; font-size: 10px; }
  .intro h1 { font-size: 42px; }
  .intro-actions { display: grid; }
  .intro-actions .button { width: 100%; }
  .scanner-card { min-height: 360px; }
  .scanner-rings { width: 210px; }
  .scanner-stats dt { min-height: 30px; }
  .podium-card[data-rank="2"], .podium-card[data-rank="3"] { padding: 10px; }
  .podium-rank strong { font-size: 23px; }
  .podium-points { font-size: 7px; }
  .podium-card[data-rank="2"] .podium-skin,
  .podium-card[data-rank="3"] .podium-skin { width: 44px; }
  .player-subline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header,
  .ticker,
  .rating-toolbar,
  .mode-rail,
  .kit-dossier,
  .mobile-dock,
  .site-footer { display: none !important; }
  body { color: #111; background: #fff; }
  body::before { display: none; }
  .intro { min-height: 0; color: #111; }
  .intro-visual { display: none; }
  .rating-layout { display: block; }
  .leaderboard { border-color: #aaa; background: #fff; }
  .podium-card, .player-row { color: #111; border-color: #bbb; background: #fff; }
}
