:root {
  --bg-top: #403e71;
  --bg-mid: #2a294a;
  --bg-bottom: #131222;
  --background: #151426;
  --surface: rgba(27, 26, 50, 0.82);
  --surface-solid: #1b1a32;
  --surface-deep: #11111f;
  --surface-raised: #252348;
  --panel-glass: rgba(25, 24, 47, 0.74);
  --line: rgba(202, 202, 255, 0.14);
  --line-strong: rgba(154, 164, 255, 0.42);
  --text: #f7f6ff;
  --muted: #a9a7c5;
  --faint: #706e8e;
  --accent: #91a2ff;
  --accent-hot: #b47cff;
  --accent-cyan: #5be7ff;
  --accent-pink: #ff74d4;
  --danger: #ff808f;
  --success: #7fffd4;
  --shadow: 0 28px 90px rgba(5, 5, 18, 0.5);
  --shadow-tight: 0 15px 40px rgba(5, 5, 18, 0.38);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Manrope", Inter, system-ui, sans-serif;
  --mono: "Manrope", Inter, system-ui, sans-serif;
  --common: #d7dcdf;
  --uncommon: #55e39a;
  --rare: #5da3ff;
  --epic: #b07cff;
  --legendary: #ffd55d;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --cursor-x: 50vw;
  --cursor-y: 25vh;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--body);
  overflow-x: hidden;
}

body::selection {
  color: #11111f;
  background: var(--accent-cyan);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.world-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 43%, var(--bg-bottom) 100%);
}

.world-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(132, 151, 255, 0.2), transparent 25rem),
    radial-gradient(circle at 18% 28%, rgba(180, 124, 255, 0.13), transparent 30rem),
    radial-gradient(circle at 54% 86%, rgba(53, 197, 255, 0.08), transparent 28rem),
    linear-gradient(128deg, rgba(17, 16, 39, 0.06), rgba(9, 9, 23, 0.48));
  animation: ambientShift 14s ease-in-out infinite alternate;
}

.world-grid {
  position: absolute;
  inset: -12%;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(190, 192, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 192, 255, 0.12) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent 83%);
  transform: perspective(700px) rotateX(58deg) translateY(23%);
  transform-origin: center bottom;
  animation: gridDrift 20s linear infinite;
}

.world-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  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='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.light-beam {
  position: absolute;
  top: -25%;
  width: 20vw;
  height: 110vh;
  filter: blur(42px);
  opacity: 0.12;
  transform: rotate(18deg);
  transform-origin: top center;
}

.beam-one {
  left: 12%;
  background: linear-gradient(to bottom, rgba(150, 166, 255, 0.9), transparent 80%);
  animation: beamSweep 11s ease-in-out infinite alternate;
}

.beam-two {
  right: 4%;
  background: linear-gradient(to bottom, rgba(180, 124, 255, 0.8), transparent 80%);
  animation: beamSweep 14s ease-in-out infinite alternate-reverse;
}

.cursor-aura {
  position: absolute;
  width: 34rem;
  height: 34rem;
  left: calc(var(--cursor-x) - 17rem);
  top: calc(var(--cursor-y) - 17rem);
  border-radius: 50%;
  opacity: 0.12;
  background: radial-gradient(circle, rgba(117, 209, 255, 0.72), transparent 68%);
  filter: blur(28px);
  transition: left 90ms linear, top 90ms linear;
}

.site-header {
  position: relative;
  z-index: 20;
  width: min(1540px, calc(100% - 48px));
  min-height: 98px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(220, 220, 255, 0.1);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
  box-shadow: 0 0 18px rgba(91, 231, 255, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 52px;
  height: 58px;
  place-items: center;
  color: #10101e;
  background: linear-gradient(145deg, #d8dcff 0%, #93a3ff 48%, #706cff 100%);
  clip-path: polygon(0 0, 76% 0, 100% 22%, 100% 100%, 24% 100%, 0 78%);
  box-shadow: 0 0 36px rgba(145, 162, 255, 0.36);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(18, 17, 38, 0.28);
  clip-path: inherit;
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.69rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-indicator,
.connection-status {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(127, 255, 212, 0.8);
  animation: livePulse 1.8s ease-in-out infinite;
}

.connection-status {
  padding: 9px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(14, 13, 30, 0.38);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.connection-status.connected {
  color: var(--accent-cyan);
  border-color: rgba(91, 231, 255, 0.32);
}

.connection-status.error {
  color: var(--danger);
}

.page-shell {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  padding: 64px 0 88px;
}

.hero::before {
  content: "";
  position: absolute;
  left: -20vw;
  right: -20vw;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188, 193, 255, 0.22), transparent);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.kicker-index,
.eyebrow {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.13em;
}

.kicker-index {
  display: inline-grid;
  min-width: 34px;
  height: 24px;
  place-items: center;
  color: #10101e;
  background: var(--accent-cyan);
  font-size: 0.65rem;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.eyebrow {
  margin: 0 0 10px;
  color: #c2c9ff;
  font-size: 0.7rem;
}

.hero-kicker .eyebrow {
  margin: 0;
}

.hero h1,
.profile-header h1,
.leaderboard-detail-header h1 {
  font-family: var(--display);
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(4.4rem, 8.25vw, 8.8rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.04em;
  text-wrap: balance;
  filter: drop-shadow(0 20px 45px rgba(8, 7, 24, 0.24));
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-accent {
  margin-top: 0.08em;
  color: transparent;
  background: linear-gradient(96deg, #ffffff 0%, #bdc5ff 34%, #8fcfff 68%, #c98cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 50px rgba(145, 162, 255, 0.16);
}

.hero-copy {
  max-width: 680px;
  margin: 30px 0 30px;
  color: #c1bfd5;
  font-size: 1.02rem;
  line-height: 1.8;
}

.viewer-search {
  position: relative;
  display: flex;
  width: min(720px, 100%);
  min-height: 62px;
  align-items: stretch;
  border: 1px solid rgba(183, 191, 255, 0.38);
  background: rgba(17, 16, 39, 0.72);
  box-shadow: 0 18px 55px rgba(8, 7, 24, 0.38), inset 0 1px 0 rgba(255,255,255,0.06);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  backdrop-filter: blur(16px);
}

.viewer-search::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 28%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-hot), transparent);
  box-shadow: 0 0 16px rgba(91, 231, 255, 0.55);
}

.search-prefix {
  display: grid;
  width: 52px;
  place-items: center;
  color: var(--accent-cyan);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
}

.viewer-search input {
  flex: 1;
  min-width: 0;
  padding: 0 12px 0 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.viewer-search input::placeholder,
.small-search::placeholder,
.filters-panel input::placeholder {
  color: #777590;
}

.viewer-search button,
.secondary-button {
  position: relative;
  min-width: 168px;
  padding: 0 20px;
  color: #11101f;
  background: linear-gradient(135deg, #d5d9ff 0%, #91a2ff 52%, #8a7cff 100%);
  border: 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  overflow: hidden;
}

.viewer-search button::before,
.secondary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.52) 45%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 520ms ease;
}

.viewer-search button:hover::before,
.secondary-button:hover::before {
  transform: translateX(130%);
}

.viewer-search button span,
.viewer-search button b,
.secondary-button {
  position: relative;
  z-index: 1;
}

.viewer-search button b {
  margin-left: 12px;
  font-size: 1rem;
}

.message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.83rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.hero-stat {
  min-width: 155px;
  padding: 4px 22px 4px 0;
  margin-right: 22px;
  border-right: 1px solid rgba(211, 211, 255, 0.15);
}

.hero-stat:last-child {
  margin-right: 0;
  border-right: 0;
}

.hero-stat span {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero-stat small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-stat-live span {
  color: var(--accent-cyan);
}

.hero-arena {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.arena-halo {
  position: absolute;
  width: min(38vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(166, 174, 255, 0.25), transparent 58%),
    conic-gradient(from 80deg, transparent, rgba(91, 231, 255, 0.28), transparent 32%, rgba(180, 124, 255, 0.3), transparent 65%);
  filter: blur(4px);
  animation: haloTurn 18s linear infinite;
}

.arena-halo::before,
.arena-halo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(190, 194, 255, 0.17);
}

.arena-halo::before { inset: 12%; }
.arena-halo::after { inset: 26%; }

.arena-lines {
  position: absolute;
  width: 560px;
  height: 340px;
  border: 1px solid rgba(207, 208, 255, 0.11);
  transform: perspective(700px) rotateX(68deg) translateY(160px);
  background-image:
    linear-gradient(rgba(203,204,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203,204,255,0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  box-shadow: 0 0 70px rgba(92, 123, 255, 0.08) inset;
}

.card-stack {
  position: relative;
  width: 390px;
  height: 500px;
  perspective: 1300px;
  transform-style: preserve-3d;
}

.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 270px;
  height: 390px;
  padding: 24px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(210, 211, 255, 0.3);
  background: linear-gradient(150deg, rgba(61, 59, 111, 0.96), rgba(18, 17, 37, 0.98));
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  box-shadow: 0 35px 80px rgba(7, 6, 23, 0.62);
  transform-style: preserve-3d;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(218, 219, 255, 0.16);
  clip-path: inherit;
}

.hero-card-back {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0.72;
}

.hero-card-left {
  transform: translate(-72%, -48%) rotateZ(-12deg) rotateY(12deg);
  animation: cardFloatLeft 6.5s ease-in-out infinite;
}

.hero-card-right {
  transform: translate(-28%, -48%) rotateZ(12deg) rotateY(-12deg);
  animation: cardFloatRight 7.5s ease-in-out infinite;
}

.hero-card-back strong {
  font-family: var(--display);
  font-size: 6rem;
  line-height: 0.8;
  color: rgba(239, 239, 255, 0.18);
}

.hero-card-back small,
.hero-card-code {
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

.hero-card-back small {
  margin-top: 15px;
  color: #c2c0d9;
  font-size: 0.64rem;
}

.hero-card-code {
  position: absolute;
  top: 22px;
  left: 23px;
  color: var(--accent-cyan);
  font-size: 0.6rem;
}

.hero-card-front {
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(103, 101, 177, 0.92), rgba(29, 27, 61, 0.98) 45%, rgba(13, 13, 28, 0.99)),
    #1b1a32;
  border-color: rgba(205, 210, 255, 0.52);
  transform: translate(-50%, -50%) rotateY(-4deg) rotateX(3deg);
  animation: cardFloatFront 5.5s ease-in-out infinite;
  box-shadow:
    0 45px 100px rgba(4, 4, 17, 0.72),
    0 0 65px rgba(128, 145, 255, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.hero-card-front::after {
  content: "";
  position: absolute;
  inset: -60% -35%;
  background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,0.18) 49%, transparent 60%);
  transform: translateX(-65%) rotate(8deg);
  animation: cardShine 5.4s ease-in-out infinite;
}

.card-scanline {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(211,213,255,0.18) 6px);
}

.hero-card-season,
.hero-card-footer {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.hero-card-season {
  color: #d7d7ea;
}

.hero-card-emblem {
  position: relative;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 94px;
  place-items: center;
  margin: auto;
  color: #151426;
  background: linear-gradient(145deg, #ffffff, #91a2ff 65%, #b47cff);
  clip-path: polygon(0 0, 75% 0, 100% 22%, 100% 100%, 25% 100%, 0 78%);
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 900;
  box-shadow: 0 0 45px rgba(151, 165, 255, 0.35);
}

.hero-card-front > strong {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-size: 4.7rem;
  font-weight: 900;
  line-height: 0.72;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c5c3da;
}

.hero-card-footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(91,231,255,0.8);
}

.arena-leader {
  position: absolute;
  z-index: 8;
  right: -6px;
  bottom: 24px;
  min-width: 230px;
  padding: 13px 18px;
  border-left: 2px solid var(--accent-cyan);
  background: linear-gradient(90deg, rgba(17,16,39,0.9), rgba(17,16,39,0.36));
  box-shadow: -20px 18px 50px rgba(5,4,20,0.28);
  backdrop-filter: blur(12px);
}

.arena-leader span,
.arena-leader small {
  display: block;
  font-family: var(--mono);
}

.arena-leader span {
  color: var(--accent-cyan);
  font-size: 0.57rem;
  letter-spacing: 0.09em;
}

.arena-leader strong {
  display: block;
  margin: 4px 0 3px;
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.arena-leader small {
  color: var(--muted);
  font-size: 0.57rem;
}

.game-loop-rail {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  overflow: hidden;
  border-top: 1px solid rgba(199, 201, 255, 0.13);
  border-bottom: 1px solid rgba(199, 201, 255, 0.13);
  background: rgba(14, 13, 30, 0.55);
  transform: rotate(-1deg);
  backdrop-filter: blur(12px);
}

.game-loop-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 22px;
  padding: 12px 0;
  color: #d6d5e8;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  animation: marquee 28s linear infinite;
}

.game-loop-track i {
  color: var(--accent-cyan);
  font-size: 0.42rem;
  font-style: normal;
}

.section-frame,
.dashboard-panel,
.leaderboard-table-panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(40, 38, 77, 0.74), rgba(16, 15, 34, 0.86)),
    var(--panel-glass);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  backdrop-filter: blur(18px);
}

.section-frame::before,
.dashboard-panel::before,
.leaderboard-table-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28px;
  width: min(210px, 28%);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-hot), transparent);
  box-shadow: 0 0 16px rgba(91, 231, 255, 0.35);
}

.viewer-section,
.collection-section {
  margin: 100px 0;
  padding: clamp(24px, 4vw, 54px);
}

.section-number {
  position: absolute;
  top: 18px;
  right: 30px;
  color: rgba(224, 224, 255, 0.055);
  font-family: var(--display);
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 900;
  line-height: 0.8;
  pointer-events: none;
}

.section-heading,
.collection-heading,
.panel-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading,
.collection-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.collection-heading h2,
.panel-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.section-heading h2,
.collection-heading h2 {
  font-size: clamp(2.8rem, 5vw, 5.2rem);
}

.panel-heading h2 {
  font-size: clamp(2rem, 3.3vw, 3.4rem);
}

.small-search {
  width: min(310px, 100%);
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(11, 10, 27, 0.42);
  border: 1px solid var(--line);
  outline: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.small-search:focus,
.filters-panel input:focus,
.filters-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(145, 162, 255, 0.09), 0 0 24px rgba(91, 231, 255, 0.08);
}

.leaderboard-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.leaderboard-tabs,
.ownership-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  background: rgba(10, 9, 25, 0.42);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.leaderboard-tabs button,
.ownership-tabs button {
  min-height: 39px;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.leaderboard-tabs button:hover,
.ownership-tabs button:hover {
  color: var(--text);
}

.leaderboard-tabs button.active,
.ownership-tabs button.active {
  color: #10101e;
  background: linear-gradient(135deg, #d4d8ff, #91a2ff 62%, #a57cff);
  box-shadow: 0 0 24px rgba(145, 162, 255, 0.2);
}

.leaderboard-hint {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.viewer-list {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
  min-height: 170px;
}

.viewer-card,
.player-card,
.summary-card,
.rarity-stat,
.ranking-stat,
.dominant-insight,
.best-card,
.recent-pull {
  --local-tilt-x: 0deg;
  --local-tilt-y: 0deg;
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.viewer-card {
  position: relative;
  min-height: 190px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 3px 12px;
  padding: 20px;
  color: var(--text);
  text-align: left;
  overflow: hidden;
  border: 1px solid rgba(211, 212, 255, 0.13);
  background:
    linear-gradient(145deg, rgba(58, 56, 102, 0.32), rgba(13, 12, 31, 0.68));
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.viewer-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 42%;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
}

.viewer-card::after {
  content: "VIEWER";
  position: absolute;
  right: -8px;
  bottom: 6px;
  color: rgba(226, 225, 255, 0.035);
  font-family: var(--display);
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1;
}

.viewer-card:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-5px);
  border-color: rgba(142, 210, 255, 0.46);
  background: linear-gradient(145deg, rgba(72, 68, 128, 0.45), rgba(15, 14, 35, 0.78));
  box-shadow: 0 20px 45px rgba(5, 5, 20, 0.34), 0 0 28px rgba(91, 231, 255, 0.07);
}

.rank-badge {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  color: transparent;
  background: linear-gradient(145deg, #ffffff, #91a2ff);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
}

.viewer-card strong {
  position: relative;
  z-index: 2;
  grid-column: 1;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.viewer-card .username {
  position: relative;
  z-index: 2;
  grid-column: 1;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
}

.leaderboard-value {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 22px;
  font-family: var(--display);
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1;
}

.leaderboard-label,
.viewer-secondary {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: 0.67rem;
}

.leaderboard-label {
  grid-column: 1 / -1;
}

.viewer-secondary {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.57rem;
}

.loading-cards,
.empty-state,
.empty-compact,
.table-loading {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.loading-cards,
.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed rgba(207, 208, 255, 0.13);
  background: rgba(8, 7, 22, 0.2);
}

.profile-view,
.leaderboard-detail-view {
  padding: 36px 0 80px;
}

.back-button {
  min-height: 38px;
  padding: 0 14px 0 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.back-button:hover {
  color: var(--accent-cyan);
}

.profile-header {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 46px 0 54px;
  border-bottom: 1px solid rgba(206,207,255,0.14);
}

.profile-title-wrap {
  position: relative;
  z-index: 2;
}

.profile-watermark {
  position: absolute;
  z-index: -1;
  left: -10px;
  bottom: -4px;
  color: rgba(230, 230, 255, 0.038);
  font-family: var(--display);
  font-size: clamp(7rem, 18vw, 17rem);
  font-weight: 900;
  line-height: 0.65;
  pointer-events: none;
}

.profile-header h1 {
  margin: 0;
  font-size: clamp(4.5rem, 9vw, 9rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.035em;
}

.profile-handle {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.profile-actions {
  position: relative;
  z-index: 2;
  padding-bottom: 6px;
}

.secondary-button {
  min-width: 170px;
  min-height: 48px;
  color: #11101f;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 34px 0 24px;
}

.summary-card {
  position: relative;
  min-height: 145px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(57, 54, 102, 0.42), rgba(14, 13, 31, 0.65));
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
  opacity: 0.58;
}

.summary-card:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-3px);
  border-color: rgba(160, 169, 255, 0.35);
}

.summary-card .label {
  display: block;
  min-height: 31px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 0.95;
}

.summary-card small {
  display: block;
  margin-top: 9px;
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.45;
}

.profile-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel {
  padding: clamp(22px, 3vw, 38px);
}

.rarity-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.rarity-stat {
  position: relative;
  min-height: 135px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 32%, transparent);
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--rarity-color) 17%, transparent), transparent 8rem),
    rgba(8, 8, 23, 0.34);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}

.rarity-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--rarity-color), transparent 75%);
}

.rarity-stat:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-3px);
  border-color: color-mix(in srgb, var(--rarity-color) 58%, transparent);
  box-shadow: 0 14px 28px rgba(6,5,20,0.25), 0 0 22px color-mix(in srgb, var(--rarity-color) 10%, transparent);
}

.rarity-name {
  display: block;
  color: var(--rarity-color);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

.rarity-stat strong {
  display: block;
  margin-top: 25px;
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 0.8;
}

.rarity-stat small {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.45;
}

.collection-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dominant-insight,
.position-insight {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(9, 8, 24, 0.28);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}

.dominant-insight {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dominant-insight:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-2px);
  border-color: rgba(145, 162, 255, 0.34);
}

.insight-label {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.dominant-insight strong {
  display: block;
  margin: 18px 0 6px;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.5vw, 2.5rem);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
}

.dominant-insight small {
  color: var(--muted);
  font-size: 0.63rem;
}

.position-insight {
  grid-column: 1 / -1;
  min-height: 245px;
}

.position-chart-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 17px;
}

.position-donut {
  position: relative;
  display: grid;
  width: 170px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--position-gradient);
  box-shadow: 0 22px 45px rgba(5,4,18,0.35), 0 0 25px rgba(145,162,255,0.09);
  animation: donutBreath 4s ease-in-out infinite;
}

.position-donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 59%;
  aspect-ratio: 1;
  border: 1px solid rgba(211, 211, 255, 0.13);
  border-radius: 50%;
  background: #17162c;
  box-shadow: inset 0 0 25px rgba(4,4,16,0.45);
}

.position-donut > span {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  gap: 2px;
  text-align: center;
}

.position-donut strong {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.position-donut small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.5rem;
  text-transform: uppercase;
}

.position-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.position-legend li {
  display: grid;
  grid-template-columns: 10px 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding-bottom: 7px;
  color: var(--muted);
  border-bottom: 1px solid rgba(207,208,255,0.07);
  font-size: 0.65rem;
}

.position-legend li strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.position-legend li > span:last-child {
  text-align: right;
}

.position-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--position-colour);
  box-shadow: 0 0 12px color-mix(in srgb, var(--position-colour) 60%, transparent);
}

.collection-insights-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 150px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  text-align: center;
}

.rankings-grid {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.ranking-stat {
  position: relative;
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 17px;
  color: var(--text);
  text-align: left;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(9, 8, 24, 0.32);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}

.ranking-stat::after {
  content: "↗";
  position: absolute;
  right: 15px;
  bottom: 12px;
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.ranking-stat:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateX(4px);
  border-color: rgba(91,231,255,0.35);
  background: linear-gradient(110deg, rgba(61,61,115,0.38), rgba(9,8,24,0.38));
}

.ranking-stat:focus-visible,
.viewer-card:focus-visible,
.player-card:focus-visible,
.leaderboard-tabs button:focus-visible,
.ownership-tabs button:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.ranking-label {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ranking-stat > strong {
  grid-column: 2;
  grid-row: 1 / 3;
  color: transparent;
  background: linear-gradient(145deg, #ffffff, #91a2ff);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.85;
}

.ranking-stat small {
  color: var(--muted);
  font-size: 0.63rem;
}

.ranking-open {
  align-self: end;
  margin-top: 17px;
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  margin-bottom: 14px;
}

.best-card,
.recent-pull {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 32%, transparent);
  background:
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--rarity-color) 18%, transparent), transparent 15rem),
    rgba(8, 7, 22, 0.33);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}

.best-card {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(155px, 0.4fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 26px;
  padding: 28px;
  overflow: hidden;
}

.best-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(255,255,255,0.018) 27px 28px);
}

.best-card:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-3px);
  box-shadow: 0 24px 60px rgba(5,4,18,0.36), 0 0 34px color-mix(in srgb, var(--rarity-color) 10%, transparent);
}

.best-card-rating {
  position: relative;
  z-index: 2;
  color: var(--rarity-color);
  font-family: var(--display);
  font-size: clamp(5rem, 8vw, 8.2rem);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.05em;
  text-shadow: 0 0 30px color-mix(in srgb, var(--rarity-color) 18%, transparent);
}

.best-card > div:last-child {
  position: relative;
  z-index: 2;
}

.best-card-rarity {
  color: var(--rarity-color);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

.best-card h3 {
  margin: 12px 0 7px;
  font-family: var(--display);
  font-size: clamp(2.3rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 0.84;
  text-transform: uppercase;
}

.best-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.card-count-badges,
.card-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-badge-stack {
  flex-direction: column;
  align-items: flex-start;
}

.owned-copy,
.global-packed-copy,
.quantity-badge,
.global-pack-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.owned-copy,
.quantity-badge {
  color: #11101f;
  background: var(--rarity-color);
}

.global-packed-copy,
.global-pack-badge {
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--rarity-color) 38%, transparent);
  background: rgba(5,5,18,0.34);
}

.recent-pulls {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.recent-pull {
  display: grid;
  grid-template-columns: 28px 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 13px 15px;
}

.recent-pull:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateX(3px);
  border-color: color-mix(in srgb, var(--rarity-color) 52%, transparent);
}

.recent-number {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.recent-rating {
  color: var(--rarity-color);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.recent-player,
.recent-meta {
  display: grid;
  gap: 3px;
}

.recent-player strong {
  font-family: var(--display);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.recent-player small,
.recent-meta small,
.recent-meta strong {
  color: var(--muted);
  font-size: 0.58rem;
}

.recent-global-count {
  color: var(--rarity-color) !important;
  font-family: var(--mono);
  font-size: 0.52rem !important;
}

.recent-meta {
  text-align: right;
}

.recent-meta strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.empty-compact {
  display: grid;
  min-height: 230px;
  place-items: center;
}

.results-count {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.ownership-tabs {
  margin-bottom: 14px;
}

.filters-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 8, 24, 0.3);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.filters-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filters-panel label span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filters-panel input,
.filters-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  color: var(--text);
  background: #17162b;
  border: 1px solid rgba(207,208,255,0.12);
  outline: none;
}

.filters-panel select option {
  background: #17162b;
}

.wide-filter {
  grid-column: span 2;
}

.clear-button {
  align-self: end;
  min-height: 44px;
  color: var(--muted);
  background: rgba(14, 13, 31, 0.35);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.clear-button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 10px;
  min-height: 240px;
}

.player-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  padding: 19px;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 28%, rgba(255,255,255,0.08));
  background:
    radial-gradient(circle at 84% 5%, color-mix(in srgb, var(--rarity-color) 18%, transparent), transparent 11rem),
    linear-gradient(150deg, rgba(54, 51, 95, 0.38), rgba(10, 9, 25, 0.72));
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 42%, rgba(255,255,255,0.06) 50%, transparent 58%),
    repeating-linear-gradient(to bottom, transparent 0 7px, rgba(255,255,255,0.012) 8px);
  transform: translateX(-80%);
  transition: transform 600ms ease;
}

.player-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--rarity-color), transparent 72%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rarity-color) 25%, transparent);
}

.player-card:hover {
  transform: perspective(950px) rotateX(var(--local-tilt-x)) rotateY(var(--local-tilt-y)) translateY(-6px);
  border-color: color-mix(in srgb, var(--rarity-color) 55%, transparent);
  box-shadow: 0 22px 50px rgba(5,4,18,0.42), 0 0 28px color-mix(in srgb, var(--rarity-color) 8%, transparent);
}

.player-card:hover::before {
  transform: translateX(80%);
}

.player-card.missing {
  opacity: 0.46;
  filter: saturate(0.28);
}

.player-card.legacy::after {
  content: "LEGACY";
  position: absolute;
  z-index: 4;
  top: 17px;
  right: -32px;
  bottom: auto;
  left: auto;
  width: 120px;
  height: auto;
  padding: 4px 0;
  color: #11101f;
  background: #e8e8f4;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 0.49rem;
  font-weight: 600;
  text-align: center;
  transform: rotate(42deg);
}

.card-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rating-block {
  color: var(--rarity-color);
  font-family: var(--display);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.03em;
}

.position-block {
  padding: 5px 8px;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--rarity-color) 35%, transparent);
  background: rgba(5, 5, 18, 0.28);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.player-card h3 {
  position: relative;
  z-index: 2;
  margin: 52px 0 7px;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 0.87;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.card-season {
  position: relative;
  z-index: 2;
  color: var(--rarity-color);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  text-transform: uppercase;
}

.card-meta {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 0.65rem;
}

.card-meta span {
  padding-top: 6px;
  border-top: 1px solid rgba(207,208,255,0.07);
}

.card-meta b {
  color: #d5d3e6;
  font-family: var(--mono);
  font-size: 0.51rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
}

.pagination button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(17,16,39,0.52);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.pagination button:hover:not(:disabled) {
  color: #11101f;
  background: var(--accent);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

#pageIndicator {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.leaderboard-detail-header {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  padding: 44px 0 48px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-detail-header h1 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.035em;
}

.leaderboard-detail-copy {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.leaderboard-table-panel {
  margin-top: 30px;
  padding: clamp(20px, 3vw, 34px);
}

.full-leaderboard-tabs {
  margin-bottom: 18px;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(7,7,20,0.3);
}

.leaderboard-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(211,212,255,0.08);
  text-align: left;
  vertical-align: middle;
}

.leaderboard-table th {
  color: var(--muted);
  background: rgba(50,48,92,0.22);
  font-family: var(--mono);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.leaderboard-table tbody tr {
  transition: background 150ms ease;
}

.leaderboard-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(91,231,255,0.055), transparent);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table td {
  color: #d4d2e4;
  font-size: 0.73rem;
}

.leaderboard-table td strong,
.leaderboard-table td small {
  display: block;
}

.leaderboard-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.56rem;
}

.table-rank {
  width: 76px;
  color: var(--accent-cyan);
  font-family: var(--display);
  font-size: 1.7rem !important;
  font-weight: 900;
}

.metric-active {
  background: rgba(145,162,255,0.08);
  box-shadow: inset 0 2px 0 rgba(145,162,255,0.5);
}

.leaderboard-viewer-link {
  display: grid;
  gap: 2px;
  min-width: 155px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
}

.leaderboard-viewer-link strong {
  font-family: var(--display);
  font-size: 1rem;
  text-transform: uppercase;
}

.leaderboard-viewer-link small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.52rem;
}

.leaderboard-viewer-link:hover strong {
  color: var(--accent-cyan);
}

.table-loading {
  height: 190px;
  text-align: center !important;
}

footer {
  width: min(1540px, calc(100% - 48px));
  min-height: 110px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

footer > span:first-child {
  color: var(--text);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 800;
}

.footer-rule {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.7,.2,1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ambientShift {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

@keyframes gridDrift {
  to { background-position: 0 76px, 76px 0; }
}

@keyframes beamSweep {
  0% { transform: rotate(14deg) translateX(-8vw); opacity: 0.08; }
  100% { transform: rotate(22deg) translateX(8vw); opacity: 0.15; }
}

@keyframes livePulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.18); }
}

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

@keyframes cardFloatFront {
  0%, 100% { transform: translate(-50%, -50%) rotateY(-4deg) rotateX(3deg) translateY(0); }
  50% { transform: translate(-50%, -50%) rotateY(2deg) rotateX(-1deg) translateY(-10px); }
}

@keyframes cardFloatLeft {
  0%, 100% { transform: translate(-72%, -48%) rotateZ(-12deg) rotateY(12deg) translateY(0); }
  50% { transform: translate(-74%, -48%) rotateZ(-10deg) rotateY(8deg) translateY(7px); }
}

@keyframes cardFloatRight {
  0%, 100% { transform: translate(-28%, -48%) rotateZ(12deg) rotateY(-12deg) translateY(0); }
  50% { transform: translate(-26%, -48%) rotateZ(10deg) rotateY(-8deg) translateY(-7px); }
}

@keyframes cardShine {
  0%, 25% { transform: translateX(-70%) rotate(8deg); }
  55%, 100% { transform: translateX(70%) rotate(8deg); }
}

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

@keyframes donutBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@media (max-width: 1260px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 45px;
  }

  .hero h1 {
    font-size: clamp(4rem, 8vw, 7.3rem);
  }

  .card-stack {
    transform: scale(0.88);
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .profile-dashboard {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  }

  .rarity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header,
  .page-shell,
  footer {
    width: min(100% - 30px, 1540px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 70px;
  }

  .hero-content {
    max-width: 850px;
  }

  .hero-arena {
    min-height: 500px;
    margin-top: -20px;
  }

  .profile-dashboard,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .leaderboard-toolbar,
  .section-heading,
  .collection-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .leaderboard-hint {
    text-align: left;
  }

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

@media (max-width: 700px) {
  .site-header {
    min-height: 78px;
  }

  .brand-mark {
    width: 43px;
    height: 48px;
  }

  .brand-copy strong {
    font-size: 1.05rem;
  }

  .brand-copy small,
  .live-indicator {
    display: none;
  }

  .connection-status {
    padding: 7px 9px;
    font-size: 0.54rem;
  }

  .hero {
    padding: 50px 0 70px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 17vw, 6rem);
    line-height: 0.82;
  }

  .hero-line {
    white-space: normal;
  }

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

  .viewer-search {
    min-height: 57px;
  }

  .viewer-search button {
    min-width: 68px;
    padding: 0 17px;
  }

  .viewer-search button span {
    display: none;
  }

  .viewer-search button b {
    margin: 0;
    font-size: 1.2rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .hero-stat {
    min-width: 0;
    margin-right: 10px;
    padding-right: 10px;
  }

  .hero-stat span {
    font-size: 1.45rem;
  }

  .hero-stat small {
    font-size: 0.45rem;
  }

  .hero-arena {
    min-height: 420px;
  }

  .card-stack {
    transform: scale(0.72);
  }

  .arena-leader {
    right: 0;
    bottom: 10px;
  }

  .viewer-section,
  .collection-section {
    margin: 70px 0;
    padding: 24px 16px 28px;
  }

  .section-heading h2,
  .collection-heading h2 {
    font-size: 3.1rem;
  }

  .leaderboard-tabs,
  .ownership-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .leaderboard-tabs button,
  .ownership-tabs button {
    width: 100%;
  }

  .small-search {
    width: 100%;
  }

  .profile-header {
    min-height: 220px;
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-header h1,
  .leaderboard-detail-header h1 {
    font-size: clamp(4rem, 18vw, 6.5rem);
  }

  .profile-actions,
  .secondary-button {
    width: 100%;
  }

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

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

  .collection-insights {
    grid-template-columns: 1fr;
  }

  .position-insight {
    grid-column: auto;
  }

  .position-chart-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .position-legend {
    width: 100%;
  }

  .best-card {
    grid-template-columns: 1fr;
  }

  .recent-pull {
    grid-template-columns: 24px 62px minmax(0, 1fr);
  }

  .recent-meta {
    grid-column: 3;
    text-align: left;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

  .wide-filter {
    grid-column: auto;
  }

  footer {
    flex-wrap: wrap;
    padding: 24px 0;
  }
}

@media (max-width: 460px) {
  .hero h1 {
    font-size: 3.4rem;
  }

  .hero-arena {
    min-height: 350px;
  }

  .card-stack {
    transform: scale(0.58);
  }

  .arena-leader {
    min-width: 200px;
  }

  .summary-grid,
  .rarity-grid,
  .position-legend {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 125px;
  }

  .card-grid,
  .viewer-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .cursor-aura {
    display: none;
  }
}

/* Final v1.3 visual calibration */
body {
  background: transparent;
}

.world-bg {
  z-index: -2;
}

.hero-content {
  z-index: 6;
}

.hero-arena {
  z-index: 2;
}

.hero-line {
  width: 119%;
  transform: scaleX(0.84);
  transform-origin: left center;
}

.summary-card:nth-child(7) strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

@media (max-width: 1260px) {
  .hero-line {
    width: 122%;
    transform: scaleX(0.82);
  }
}

@media (max-width: 700px) {
  .hero-line {
    width: auto;
    transform: none;
  }
}

/* Keep the main promise on exactly two complete lines */
.hero h1 {
  font-size: clamp(4rem, 6.6vw, 7.2rem);
}

.hero-line {
  width: auto;
  transform: none;
}

@media (max-width: 1260px) {
  .hero-line {
    width: auto;
    transform: none;
  }
}

/* Wider editorial hero copy column so both promises remain complete */
.hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.55fr);
  gap: 30px;
}

.hero h1 {
  font-size: clamp(4rem, 6.3vw, 7rem);
  filter: none;
}

@media (max-width: 1260px) and (min-width: 981px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) 360px;
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 6.4vw, 5.5rem);
  }

  .card-stack {
    transform: scale(0.78);
  }
}

/* Responsive correction after the final desktop calibration */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content {
    width: 100%;
    max-width: none;
  }

  .hero-arena {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: clamp(2.9rem, 13vw, 3.35rem);
  }

  .hero-line {
    width: 133%;
    white-space: nowrap;
    transform: scaleX(0.75);
    transform-origin: left center;
  }

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

@media (max-width: 700px) {
  .hero h1 {
    width: 100%;
    font-size: clamp(3.15rem, 14.5vw, 3.55rem);
  }

  .hero-line {
    width: 100%;
    transform: scaleX(0.70);
  }
}

.hero-content {
  min-width: 0;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .hero h1 {
    width: 143%;
    transform: scaleX(0.70);
    transform-origin: left center;
  }

  .hero-line {
    width: auto;
    transform: none;
    white-space: nowrap;
  }
}


/* v1.3.1 Chrome performance and hero polish */
:root {
  --shadow: 0 24px 65px rgba(5, 5, 18, 0.42);
  --shadow-tight: 0 12px 30px rgba(5, 5, 18, 0.30);
}

/* Static, composited background: visually rich without continuous full-screen repaints. */
.world-gradient,
.world-grid,
.arena-halo {
  animation: none !important;
}

.world-gradient {
  transform: none !important;
  background:
    radial-gradient(circle at 78% 8%, rgba(132, 151, 255, 0.17), transparent 25rem),
    radial-gradient(circle at 18% 28%, rgba(180, 124, 255, 0.10), transparent 30rem),
    linear-gradient(128deg, rgba(17, 16, 39, 0.03), rgba(9, 9, 23, 0.36));
}

.world-grid {
  opacity: 0.09;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72), transparent 78%);
}

.viewer-search,
.connection-status,
.section-frame,
.dashboard-panel,
.leaderboard-table-panel,
.game-loop-rail {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Vector goat-and-trophy identity */
.brand-mark {
  width: 58px;
  height: 62px;
  padding: 5px;
  color: #dfe3ff;
  background: linear-gradient(145deg, rgba(77, 74, 139, 0.95), rgba(22, 21, 46, 0.98));
  border: 1px solid rgba(181, 188, 255, 0.42);
  box-shadow: 0 0 28px rgba(145, 162, 255, 0.24);
}

.brand-mark::before {
  border-color: rgba(220, 224, 255, 0.14);
}

.goat-trophy-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-trophy {
  fill: currentColor;
  opacity: 0.95;
}

.logo-horn,
.logo-ear,
.logo-detail {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-horn {
  stroke-width: 7;
}

.logo-face {
  fill: #17162a;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linejoin: round;
}

.logo-detail {
  stroke-width: 4;
}

/* One purposeful floating card instead of a decorative stack. */
.hero-arena {
  min-height: 560px;
  overflow: visible;
}

.arena-halo {
  width: min(35vw, 470px);
  filter: none;
  opacity: 0.85;
  background:
    radial-gradient(circle, rgba(145, 162, 255, 0.18), transparent 58%),
    radial-gradient(circle at 30% 35%, rgba(91, 231, 255, 0.12), transparent 44%);
}

.arena-lines {
  width: min(92%, 560px);
  opacity: 0.68;
  box-shadow: inset 0 0 45px rgba(92, 123, 255, 0.05);
}

.hero-card.leader-card {
  position: relative;
  inset: auto;
  z-index: 4;
  width: min(340px, 82vw);
  height: 470px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(205, 210, 255, 0.46);
  background:
    linear-gradient(150deg, rgba(78, 75, 139, 0.98), rgba(28, 26, 59, 0.99) 46%, rgba(13, 13, 28, 1));
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  box-shadow: 0 34px 74px rgba(4, 4, 17, 0.58), 0 0 42px rgba(128, 145, 255, 0.13);
  transform: translate3d(0, 0, 0);
  animation: leaderCardFloat 6s ease-in-out infinite;
  will-change: transform;
}

.hero-card.leader-card::before {
  inset: 9px;
}

.hero-card.leader-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), transparent 28%),
    repeating-linear-gradient(to bottom, transparent 0 7px, rgba(216,218,255,0.035) 8px);
}

.leader-card-topline,
.leader-card-copy,
.hero-card-footer,
.hero-card-emblem {
  position: relative;
  z-index: 2;
}

.leader-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d9dcff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.leader-card-topline b {
  display: grid;
  width: 42px;
  height: 30px;
  place-items: center;
  color: #11101f;
  background: var(--accent-cyan);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  font-family: var(--display);
  font-size: 1rem;
}

.hero-card-emblem {
  width: 136px;
  height: 136px;
  margin: 2px auto 0;
  padding: 15px;
  color: #dfe3ff;
  background: radial-gradient(circle at 50% 35%, rgba(114, 129, 239, 0.28), rgba(15, 14, 31, 0.82) 72%);
  border: 1px solid rgba(181, 188, 255, 0.24);
  border-radius: 50%;
  box-shadow: inset 0 0 30px rgba(145, 162, 255, 0.10), 0 0 35px rgba(91, 231, 255, 0.08);
  clip-path: none;
}

.leader-card-copy span,
.leader-card-copy small {
  display: block;
  font-family: var(--mono);
}

.leader-card-copy span {
  margin-bottom: 7px;
  color: var(--accent-cyan);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.leader-card-copy strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(2.45rem, 4vw, 3.35rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.leader-card-copy small {
  margin-top: 9px;
  color: #b8b6cf;
  font-size: 0.62rem;
}

.hero-card-footer {
  font-size: 0.55rem;
}

/* Straight, continuous and truly full-width game loop ticker. */
.game-loop-rail {
  transform: none !important;
  background: rgba(13, 12, 29, 0.94);
}

.game-loop-track {
  display: flex;
  width: max-content;
  gap: 0;
  padding: 0;
  animation: marqueeFull 30s linear infinite;
  will-change: transform;
}

.game-loop-group {
  display: flex;
  flex: 0 0 max(100vw, 900px);
  width: max(100vw, 900px);
  min-height: 46px;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  padding: 0 28px;
}

.game-loop-group span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.game-loop-group i {
  flex: 0 0 auto;
  color: var(--accent-cyan);
  font-size: 0.42rem;
  font-style: normal;
}

/* Simple GPU-friendly hover movement; no pointer-tracked 3D calculations. */
.viewer-card,
.player-card,
.summary-card,
.rarity-stat,
.ranking-stat,
.dominant-insight,
.best-card,
.recent-pull {
  --local-tilt-x: 0deg !important;
  --local-tilt-y: 0deg !important;
  will-change: auto;
}

@media (hover: hover) and (pointer: fine) {
  .viewer-card:hover,
  .player-card:hover,
  .summary-card:hover,
  .rarity-stat:hover,
  .ranking-stat:hover,
  .dominant-insight:hover,
  .best-card:hover,
  .recent-pull:hover {
    transform: translateY(-3px) !important;
  }
}

@keyframes leaderCardFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -9px, 0); }
}

@keyframes marqueeFull {
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 980px) {
  .hero-card.leader-card {
    width: min(330px, 80vw);
    height: 450px;
  }
}

@media (max-width: 700px) {
  .brand-mark {
    width: 48px;
    height: 52px;
  }

  .hero-arena {
    min-height: 440px;
  }

  .hero-card.leader-card {
    width: min(310px, 82vw);
    height: 420px;
    padding: 24px;
  }

  .hero-card-emblem {
    width: 116px;
    height: 116px;
  }

  .game-loop-group {
    flex-basis: 820px;
    width: 820px;
    min-height: 42px;
    gap: 16px;
    padding: 0 18px;
  }
}

@media (max-width: 460px) {
  .hero-arena {
    min-height: 390px;
  }

  .hero-card.leader-card {
    width: min(286px, 86vw);
    height: 390px;
  }

  .leader-card-copy strong {
    font-size: 2.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card.leader-card,
  .game-loop-track {
    animation: none !important;
  }
}

/* v1.4 progression ------------------------------------------------------- */
.progression-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(360px, 1.7fr) minmax(240px, 0.9fr);
  gap: 1px;
  margin: 28px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(152, 166, 255, 0.24);
  background: rgba(9, 8, 25, 0.8);
  box-shadow: 0 26px 70px rgba(5, 4, 18, 0.3), 0 0 40px rgba(114, 125, 255, 0.05);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.progression-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(91, 231, 255, 0.035), transparent 35%),
    repeating-linear-gradient(90deg, transparent 0 69px, rgba(156, 164, 255, 0.025) 70px);
}

.progression-panel > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 24px 26px;
  background: linear-gradient(150deg, rgba(57, 54, 102, 0.44), rgba(14, 13, 31, 0.76));
}

.progression-panel > div + div {
  border-left: 1px solid rgba(197, 199, 255, 0.1);
}

.progression-level-block {
  display: grid;
  align-content: center;
  min-height: 180px;
}

.progression-overline {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progression-level-number {
  margin: 10px 0 4px;
  color: #f8f8ff;
  font-family: var(--display);
  font-size: clamp(4.2rem, 7vw, 6.8rem);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.045em;
  text-shadow: 0 0 30px rgba(145, 162, 255, 0.22);
}

.progression-title {
  color: #aeb9ff;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.progression-level-block small,
.next-reward-block small {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.progression-track-block {
  display: grid;
  align-content: center;
  min-height: 180px;
}

.progression-track-heading,
.progression-track-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.progression-track-heading span,
.progression-track-footer {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.progression-track-heading strong {
  display: block;
  margin-top: 7px;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  line-height: 1;
}

.progression-track-heading b {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.xp-track {
  position: relative;
  height: 18px;
  margin: 25px 0 13px;
  overflow: hidden;
  border: 1px solid rgba(176, 184, 255, 0.2);
  background: rgba(4, 4, 17, 0.58);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.xp-track::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 9.5%, rgba(255, 255, 255, 0.075) 10%);
}

.xp-track-fill {
  display: block;
  width: var(--xp-progress);
  height: 100%;
  background: linear-gradient(90deg, #5be7ff 0%, #91a2ff 42%, #b47cff 75%, #ff74d4 100%);
  box-shadow: 0 0 22px rgba(91, 231, 255, 0.38), 0 0 42px rgba(180, 124, 255, 0.2);
  transition: width 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.next-reward-block {
  display: grid;
  align-content: center;
  min-height: 180px;
  border-left-color: rgba(91, 231, 255, 0.16) !important;
  background:
    radial-gradient(circle at 92% 12%, rgba(91, 231, 255, 0.14), transparent 9rem),
    linear-gradient(150deg, rgba(47, 48, 94, 0.52), rgba(13, 12, 31, 0.82)) !important;
}

.next-reward-block strong {
  display: block;
  margin-top: 13px;
  color: #f8f8ff;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.5vw, 2.4rem);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

.next-reward-block p {
  margin: 9px 0 0;
  color: #aeb9ff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.next-reward-block.reward-complete strong {
  color: #ffdc75;
}

@media (max-width: 980px) {
  .progression-panel {
    grid-template-columns: 0.72fr 1.28fr;
  }

  .next-reward-block {
    grid-column: 1 / -1;
    min-height: 130px;
    border-top: 1px solid rgba(197, 199, 255, 0.1);
    border-left: 0 !important;
  }
}

@media (max-width: 700px) {
  .progression-panel {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .progression-panel > div {
    min-height: auto;
    padding: 22px;
  }

  .progression-panel > div + div,
  .next-reward-block {
    grid-column: auto;
    border-top: 1px solid rgba(197, 199, 255, 0.1);
    border-left: 0 !important;
  }

  .progression-level-block {
    grid-template-columns: auto 1fr;
    column-gap: 18px;
    align-items: center;
  }

  .progression-level-block .progression-overline,
  .progression-level-block small {
    grid-column: 2;
  }

  .progression-level-number {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin: 0;
    font-size: 5rem;
  }

  .progression-title {
    grid-column: 2;
  }

  .progression-track-heading {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xp-track-fill {
    transition: none;
  }
}


/* v1.4.2 — progression balance, profile readability and leader-card flip */
.profile-header h1 {
  max-width: min(100%, 1120px);
  padding: 0.04em 0 0.12em;
  overflow: visible;
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.profile-header h1.profile-name-long {
  font-size: clamp(3.2rem, 6.7vw, 6.8rem);
  letter-spacing: 0.012em;
}

.profile-header h1.profile-name-very-long {
  font-size: clamp(2.65rem, 5.5vw, 5.7rem);
  line-height: 0.98;
}

.best-card {
  grid-template-columns: minmax(122px, 172px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: stretch;
  min-height: 300px;
}

.best-card-rating-block {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 22px 16px;
  overflow: hidden;
  border-right: 1px solid color-mix(in srgb, var(--rarity-color) 42%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rarity-color) 10%, transparent), transparent);
}

.best-card-rating-icon {
  margin-bottom: 7px;
  font-size: 1.05rem;
  filter: saturate(0.9);
}

.best-card-rating {
  display: block;
  max-width: 100%;
  color: var(--rarity-color);
  font-family: var(--display);
  font-size: clamp(4.4rem, 6.2vw, 6.5rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 28px color-mix(in srgb, var(--rarity-color) 18%, transparent);
}

.best-card-details {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.best-card h3 {
  max-width: 100%;
  margin: 12px 0 8px;
  font-size: clamp(2rem, 3.35vw, 3.35rem);
  line-height: 0.94;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.hero-card.leader-card {
  padding: 0;
  overflow: visible;
  cursor: pointer;
  background: transparent;
  border: 0;
  box-shadow: none;
  clip-path: none;
  perspective: 1200px;
  outline: none;
}

.hero-card.leader-card::before,
.hero-card.leader-card::after {
  display: none;
}

.hero-card.leader-card:focus-visible {
  filter: drop-shadow(0 0 0.55rem rgba(91, 231, 255, 0.62));
}

.leader-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(.2,.72,.2,1);
}

.hero-card.leader-card.is-flipped .leader-card-inner {
  transform: rotateY(180deg);
}

.leader-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(205, 210, 255, 0.46);
  background:
    linear-gradient(150deg, rgba(78, 75, 139, 0.98), rgba(28, 26, 59, 0.99) 46%, rgba(13, 13, 28, 1));
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  box-shadow: 0 34px 74px rgba(4, 4, 17, 0.58), 0 0 42px rgba(128, 145, 255, 0.13);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.leader-card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), transparent 28%),
    repeating-linear-gradient(to bottom, transparent 0 7px, rgba(216,218,255,0.035) 8px);
}

.leader-card-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 74% 18%, rgba(91, 231, 255, 0.13), transparent 36%),
    linear-gradient(150deg, rgba(57, 55, 110, 0.99), rgba(20, 19, 46, 0.99) 52%, rgba(10, 10, 24, 1));
}

.leader-card-front > *,
.leader-card-back > * {
  position: relative;
  z-index: 2;
}

.leader-flip-hint {
  display: block;
  color: rgba(210, 214, 255, 0.72);
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.09em;
  text-align: center;
}

.leader-back-heading span,
.leader-back-heading strong {
  display: block;
}

.leader-back-heading span {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.leader-back-heading strong {
  margin-top: 6px;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 0.95;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.leader-top-cards {
  display: grid;
  gap: 8px;
}

.leader-top-card {
  display: grid;
  grid-template-columns: 28px 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--rarity-color, #91a2ff) 34%, transparent);
  background: rgba(8, 8, 23, 0.43);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.leader-top-card.loading,
.leader-top-card.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  text-align: center;
}

.leader-top-rank {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.55rem;
}

.leader-top-card > strong {
  color: var(--rarity-color, #91a2ff);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.leader-top-card b,
.leader-top-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-top-card b {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.leader-top-card small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.48rem;
}

.leader-pack-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(190, 195, 255, 0.2);
}

.leader-pack-total span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
}

.leader-pack-total strong {
  color: var(--accent-cyan);
  font-family: var(--display);
  font-size: 2.35rem;
  line-height: 0.8;
}

@media (max-width: 700px) {
  .profile-header h1,
  .profile-header h1.profile-name-long,
  .profile-header h1.profile-name-very-long {
    font-size: clamp(2.45rem, 13vw, 4.5rem);
    line-height: 0.98;
  }

  .best-card {
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .best-card-rating-block {
    padding: 16px 8px;
  }

  .best-card-rating {
    font-size: clamp(3.4rem, 17vw, 4.7rem);
  }

  .best-card h3 {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leader-card-inner {
    transition: none;
  }
}

/* v1.5 — Engagement & crest identity */
.goat-crest-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(91, 231, 255, 0.18));
}

.brand-mark .goat-crest-logo {
  width: 38px;
  height: 38px;
}

.hero-card-emblem .goat-crest-logo {
  width: 78%;
  height: 78%;
  margin: 11% auto;
}

.leader-card-back .leader-card-topline b {
  min-width: 44px;
  text-align: center;
  font-size: 1.35rem;
}

.leader-back-heading strong {
  max-width: 100%;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.home-engagement {
  position: relative;
  padding-top: 36px;
  padding-bottom: 54px;
}

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

.engagement-feature {
  position: relative;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(145, 162, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(75, 77, 138, 0.26), rgba(11, 12, 33, 0.78));
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  overflow: hidden;
}

.engagement-feature::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(91, 231, 255, 0.16);
  transform: rotate(35deg);
}

.engagement-feature > span {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.engagement-feature h3 {
  margin: 24px 0 9px;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.engagement-feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.engagement-dashboard {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) repeat(2, minmax(280px, 1fr));
  gap: 15px;
}

.daily-reward-panel,
.mission-panel {
  border: 1px solid rgba(145, 162, 255, 0.22);
  background: linear-gradient(150deg, rgba(51, 52, 98, 0.72), rgba(10, 11, 31, 0.92));
  padding: 22px;
  min-width: 0;
}

.daily-reward-panel {
  display: grid;
  align-content: start;
  gap: 17px;
  position: relative;
  overflow: hidden;
}

.daily-reward-panel.available {
  border-color: rgba(91, 231, 255, 0.68);
  box-shadow: inset 0 0 34px rgba(91, 231, 255, 0.08);
}

.daily-reward-panel.claimed {
  border-color: rgba(85, 227, 154, 0.45);
}

.engagement-kicker,
.mission-panel-heading span,
.mission-panel-heading b {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  color: var(--accent-cyan);
}

.daily-reward-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 112px;
  border: 1px solid rgba(91, 231, 255, 0.6);
  background: linear-gradient(145deg, rgba(91, 231, 255, 0.15), rgba(140, 124, 255, 0.16));
  font-family: var(--display);
  font-size: 3.8rem;
  clip-path: polygon(0 0, 82% 0, 100% 14%, 100% 100%, 0 100%);
}

.daily-reward-panel h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.daily-reward-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.daily-pack-balance {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3px 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(145, 162, 255, 0.2);
}

.daily-pack-balance span,
.daily-pack-balance small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.09em;
}

.daily-pack-balance strong {
  grid-row: span 2;
  color: var(--accent-cyan);
  font-family: var(--display);
  font-size: 3rem;
  line-height: 0.8;
}

.mission-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mission-panel-heading b {
  color: var(--muted);
  font-weight: 500;
}

.mission-list {
  display: grid;
  gap: 9px;
}

.mission-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-left: 2px solid rgba(145, 162, 255, 0.35);
  background: rgba(5, 7, 24, 0.52);
}

.mission-item.complete,
.mission-item.claimed {
  border-left-color: var(--accent-cyan);
}

.mission-item.claimed {
  opacity: 0.76;
}

.mission-status {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(91, 231, 255, 0.38);
  color: var(--accent-cyan);
  font-family: var(--display);
}

.mission-copy,
.mission-reward {
  min-width: 0;
}

.mission-copy strong,
.mission-copy small,
.mission-reward b,
.mission-reward small {
  display: block;
}

.mission-copy strong {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.mission-copy small,
.mission-reward small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.mission-reward {
  text-align: right;
  white-space: nowrap;
}

.mission-reward b {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.mission-progress {
  height: 3px;
  margin-top: 8px;
  background: rgba(145, 162, 255, 0.13);
  overflow: hidden;
}

.mission-progress span {
  display: block;
  width: var(--mission-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
}

.mission-set-reward {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(145, 162, 255, 0.28);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.mission-set-reward.complete {
  border-color: rgba(85, 227, 154, 0.55);
  color: #55e39a;
}

.milestone-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.milestone-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 12px;
  padding: 16px;
  border: 1px solid rgba(145, 162, 255, 0.19);
  background: rgba(10, 11, 31, 0.72);
}

.milestone-card.complete {
  border-color: rgba(91, 231, 255, 0.5);
  background: linear-gradient(145deg, rgba(91, 231, 255, 0.08), rgba(10, 11, 31, 0.78));
}

.milestone-target {
  color: var(--accent-cyan);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.85;
}

.milestone-card strong,
.milestone-card small {
  display: block;
}

.milestone-card strong {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.milestone-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.milestone-card .mission-progress {
  grid-column: 1 / -1;
  margin: 0;
}

.milestone-card > b {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.53rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.achievement-badge {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(145, 162, 255, 0.18);
  background: rgba(8, 9, 27, 0.72);
}

.achievement-badge.unlocked {
  border-color: color-mix(in srgb, var(--badge-color), transparent 45%);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--badge-color), transparent 91%);
}

.achievement-badge.locked {
  filter: grayscale(0.82);
  opacity: 0.48;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--badge-color);
  color: var(--badge-color);
  font-family: var(--display);
  font-size: 1.3rem;
  clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%);
}

.achievement-badge strong,
.achievement-badge small {
  display: block;
}

.achievement-badge strong {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.achievement-badge small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.4;
}

.achievement-badge > span {
  grid-column: 1 / -1;
  color: var(--badge-color);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
}

@media (max-width: 1100px) {
  .engagement-feature-grid,
  .milestone-track,
  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .engagement-dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .daily-reward-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .engagement-feature-grid,
  .engagement-dashboard,
  .milestone-track,
  .badge-grid {
    grid-template-columns: 1fr;
  }

  .daily-reward-panel {
    grid-column: auto;
  }

  .mission-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .mission-reward {
    grid-column: 2;
    text-align: left;
  }
}

/* THE G.O.A.T 2.0 — generated-player additions */
.generated-best-card .best-card-rating-block small,
.rating-block small,
.recent-rating small {
  display: block;
  margin-top: .15rem;
  color: #63e4ff;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
}
.player-physical {
  margin-top: .8rem;
  color: rgba(239,241,255,.72);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .035em;
}
.mini-main-stats,
.generated-main-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: .42rem;
  margin-top: 1rem;
}
.mini-main-stats span,
.generated-main-stat {
  min-width: 0;
  padding: .55rem .3rem;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 38%, transparent);
  background: rgba(7,7,24,.48);
  text-align: center;
}
.mini-main-stats span b,
.generated-main-stat span {
  display: block;
  color: rgba(237,239,255,.58);
  font: 600 .62rem/1 var(--mono);
  letter-spacing: .08em;
}
.mini-main-stats span,
.generated-main-stat strong {
  color: #fff;
  font-size: 1rem;
}
.generated-player-card {
  overflow: visible;
}
.generated-player-card .rating-block {
  font-size: 2.8rem;
  line-height: .88;
}
.generated-player-card .card-meta {
  min-height: 8.2rem;
}
.side-stat-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .45rem;
  margin-top: .75rem;
}
.side-stat-row span {
  padding: .55rem;
  border: 1px solid rgba(117,132,231,.25);
  background: rgba(12,12,35,.52);
  color: rgba(235,237,255,.62);
  text-align: center;
  font: 600 .68rem/1 var(--mono);
}
.side-stat-row b { color: #fff; margin-left: .25rem; }
.player-details {
  margin-top: .75rem;
  border-top: 1px solid rgba(126,134,209,.22);
  padding-top: .65rem;
}
.player-details summary {
  cursor: pointer;
  color: #63e4ff;
  font: 600 .68rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.player-details ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .25rem .8rem;
  margin: .8rem 0 0;
  padding: 0;
  list-style: none;
}
.player-details li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  color: rgba(234,236,255,.58);
  font-size: .72rem;
}
.player-details li b { color: #fff; }
@media (max-width: 760px) {
  .mini-main-stats,.generated-main-grid { grid-template-columns: repeat(3,1fr); }
  .player-details ul { grid-template-columns: 1fr; }
}

/* v2.1 — generated portraits, age model and full player profiles -------- */
.return-loop .section-heading,
.engagement-section .collection-heading,
.achievement-section .collection-heading {
  padding-top: 14px;
  padding-left: clamp(18px, 2.2vw, 34px);
}

.leader-back-heading strong {
  max-width: 100%;
  font-size: clamp(1.15rem, 2.2vw, 1.72rem);
  line-height: 1;
  white-space: normal;
  text-overflow: clip;
  text-wrap: balance;
}

.leader-top-label {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.47rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(91, 231, 255, 0.58);
}

.leader-top-card {
  width: 100%;
  grid-template-columns: 24px 10px 48px minmax(0, 1fr);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.leader-top-card:hover,
.leader-top-card:focus-visible {
  border-color: var(--rarity-color, var(--accent-cyan));
  background: color-mix(in srgb, var(--rarity-color, var(--accent-cyan)) 9%, rgba(8,8,23,.72));
  outline: none;
}

.leader-rarity-dot,
.card-rarity-dot,
.player-profile-rarity i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rarity-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--rarity-color) 78%, transparent);
}

.profile-header h1 {
  font-size: clamp(4.2rem, 9vw, 9rem);
}

.profile-handle {
  color: rgba(244, 245, 255, .82);
  font-size: .78rem;
}

.generated-player-card,
.generated-best-card,
.recent-pull {
  appearance: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.generated-player-card {
  display: grid;
  grid-template-rows: 245px 1fr;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 46%, rgba(255,255,255,.08));
  background:
    radial-gradient(circle at 76% 2%, color-mix(in srgb, var(--rarity-color) 19%, transparent), transparent 36%),
    linear-gradient(155deg, color-mix(in srgb, var(--rarity-color) 8%, #27264d), #101021 55%, #090914);
}

.generated-card-portrait {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--rarity-color) 38%, transparent);
  background: color-mix(in srgb, var(--rarity-color) 13%, #121222);
}

.generated-card-portrait::after,
.best-player-portrait::after,
.player-profile-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,20,.88), transparent);
}

.generated-card-portrait img,
.best-player-portrait img,
.player-profile-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.generated-card-content {
  min-width: 0;
  padding: 18px;
}

.generated-player-card .card-topline {
  margin-top: -52px;
  position: relative;
  z-index: 2;
}

.generated-player-card .rating-block,
.generated-player-card .position-block {
  color: #fff;
  text-shadow: 0 2px 15px rgba(0,0,0,.75);
}

.generated-player-card .card-season {
  display: flex;
  align-items: center;
  gap: 7px;
}

.generated-player-card .card-meta {
  min-height: 0;
  grid-template-columns: 1fr 1fr;
}

.open-player-profile {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.generated-player-card:hover,
.generated-player-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--rarity-color);
  box-shadow: 0 24px 54px rgba(4,4,15,.48), 0 0 28px color-mix(in srgb, var(--rarity-color) 17%, transparent);
  outline: none;
}

.best-card {
  grid-template-columns: minmax(150px, 210px) minmax(105px, 145px) minmax(0, 1fr);
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 42%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--rarity-color) 10%, #27264d), #0d0d1d);
}

.best-player-portrait {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-right: 1px solid color-mix(in srgb, var(--rarity-color) 36%, transparent);
}

.best-card-rating-block {
  border-right: 1px solid color-mix(in srgb, var(--rarity-color) 36%, transparent);
}

.best-card-details {
  padding: 26px 26px 26px 0;
}

.best-card:hover,
.best-card:focus-visible {
  border-color: var(--rarity-color);
  outline: none;
}

.recent-pull {
  grid-template-columns: 62px 30px 72px minmax(0,1fr) auto;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 26%, transparent);
}

.recent-player-portrait {
  width: 58px;
  height: 70px;
  object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.recent-pull:hover,
.recent-pull:focus-visible {
  border-color: var(--rarity-color);
  outline: none;
}

body.modal-open {
  overflow: hidden;
}

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.player-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 5, 16, .84);
  backdrop-filter: blur(10px);
}

.player-profile-sheet {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(900px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(182, 188, 255, .34);
  background: linear-gradient(145deg, #292752, #111020 58%, #090914);
  box-shadow: 0 42px 120px rgba(0,0,0,.7);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

.player-modal-close {
  position: sticky;
  top: 14px;
  z-index: 5;
  float: right;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px 0;
  color: #fff;
  border: 1px solid rgba(210,214,255,.25);
  background: rgba(8,8,24,.76);
  font-size: 1.8rem;
  line-height: 1;
}

.player-modal-content {
  clear: both;
}

.player-modal-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
  font-family: var(--mono);
}

.player-profile-hero {
  display: grid;
  grid-template-columns: minmax(300px, 42%) minmax(0, 1fr);
  min-height: 470px;
  border-bottom: 1px solid color-mix(in srgb, var(--rarity-color) 40%, transparent);
  background:
    radial-gradient(circle at 22% 20%, color-mix(in srgb, var(--rarity-color) 25%, transparent), transparent 40%),
    linear-gradient(135deg, color-mix(in srgb, var(--rarity-color) 8%, #353366), #121121 65%);
}

.player-profile-portrait {
  position: relative;
  min-height: 470px;
  overflow: hidden;
}

.player-profile-identity {
  align-self: center;
  min-width: 0;
  padding: clamp(34px, 5vw, 70px);
}

.player-profile-rarity {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--rarity-color);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.player-profile-rating {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 20px;
}

.player-profile-rating strong {
  color: var(--rarity-color);
  font-family: var(--display);
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 900;
  line-height: .72;
  text-shadow: 0 0 36px color-mix(in srgb, var(--rarity-color) 24%, transparent);
}

.player-profile-rating span {
  padding: 7px 11px;
  color: #0b0b18;
  background: var(--rarity-color);
  font-family: var(--mono);
  font-weight: 800;
}

.player-profile-identity h2 {
  margin: 24px 0 6px;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .88;
  text-transform: uppercase;
  text-wrap: balance;
}

.player-profile-identity > p {
  color: var(--muted);
  font-size: .9rem;
}

.player-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  margin-top: 28px;
}

.player-profile-facts span {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 28%, transparent);
  background: rgba(7,7,23,.46);
  color: #fff;
  font-family: var(--mono);
  font-size: .82rem;
}

.player-profile-facts b {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .57rem;
  letter-spacing: .09em;
}

.player-owner-line {
  margin-top: 20px;
  color: rgba(239,241,255,.7);
  font-size: .8rem;
}

.player-attributes-panel {
  padding: clamp(28px, 4vw, 55px);
}

.player-attributes-heading span {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .12em;
}

.player-attributes-heading h3 {
  margin: 7px 0 28px;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: .9;
  text-transform: uppercase;
}

.player-attribute-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 28px 34px;
}

.player-attribute-group {
  min-width: 0;
}

.attribute-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.25rem;
}

.attribute-heading b {
  padding: 4px 8px;
  color: #090914;
  background: var(--rarity-color);
  font-family: var(--mono);
  font-size: .8rem;
}

.attribute-track {
  height: 7px;
  margin: 7px 0 14px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.attribute-track span {
  display: block;
  width: var(--attribute-value);
  height: 100%;
  background: linear-gradient(90deg, var(--rarity-color), color-mix(in srgb, var(--rarity-color) 50%, #fff));
  box-shadow: 0 0 16px color-mix(in srgb, var(--rarity-color) 45%, transparent);
}

.player-attribute-group ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-attribute-group li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(235,237,255,.58);
  font-size: .78rem;
}

.player-attribute-group li b {
  color: #fff;
}

@media (max-width: 980px) {
  .best-card { grid-template-columns: 170px 120px minmax(0,1fr); }
  .player-profile-hero { grid-template-columns: 40% minmax(0,1fr); }
  .player-profile-facts { grid-template-columns: repeat(3,1fr); }
  .player-attribute-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .return-loop .section-heading,
  .engagement-section .collection-heading,
  .achievement-section .collection-heading { padding-left: 12px; padding-top: 10px; }
  .leader-card-face { padding: 22px; }
  .leader-back-heading strong { font-size: 1.2rem; }
  .leader-top-card { grid-template-columns: 20px 8px 38px minmax(0,1fr); min-height: 58px; padding: 8px; }
  .leader-top-card small { font-size: .48rem; }
  .generated-player-card { grid-template-rows: 220px 1fr; }
  .best-card { grid-template-columns: 1fr; }
  .best-player-portrait { min-height: 300px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--rarity-color) 36%, transparent); }
  .best-card-rating-block { min-height: 150px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--rarity-color) 36%, transparent); }
  .best-card-details { padding: 24px; }
  .recent-pull { grid-template-columns: 54px 24px 58px minmax(0,1fr); }
  .recent-meta { grid-column: 4; }
  .player-modal { padding: 8px; }
  .player-profile-sheet { max-height: calc(100vh - 16px); }
  .player-profile-hero { grid-template-columns: 1fr; }
  .player-profile-portrait { min-height: 390px; }
  .player-profile-identity { padding: 28px 22px 36px; }
  .player-profile-facts { grid-template-columns: repeat(2,1fr); }
  .player-attribute-grid { grid-template-columns: 1fr; }
}

/* v2.1.1 — Professional player-card and profile repair ------------------ */

/* The artwork is now only artwork; all card data is placed by HTML. */
.footballer-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 72%, rgba(255,255,255,.18));
  background: #101122;
  box-shadow:
    0 22px 52px rgba(2,3,14,.52),
    0 0 28px color-mix(in srgb, var(--rarity-color) 16%, transparent);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}
.footballer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--rarity-color) 52%, transparent);
  clip-path: inherit;
}
.footballer-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 46%;
  background: linear-gradient(to top, rgba(5,6,18,.98) 8%, rgba(5,6,18,.82) 45%, transparent);
  pointer-events: none;
}
.footballer-card-glow {
  position: absolute;
  z-index: 0;
  width: 78%;
  aspect-ratio: 1;
  top: -14%;
  right: -20%;
  border-radius: 50%;
  background: var(--rarity-color);
  opacity: .18;
  filter: blur(35px);
}
.footballer-card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.footballer-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.footballer-card-rating {
  position: absolute;
  z-index: 4;
  top: 8%;
  left: 7%;
  display: grid;
  justify-items: center;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0,0,0,.7);
}
.footballer-card-rating strong {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 900;
  color: #fff;
}
.footballer-card-rating span {
  margin-top: 3px;
  padding: 4px 7px;
  color: #080915;
  background: var(--rarity-color);
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 900;
}
.footballer-card-potential {
  position: absolute;
  z-index: 4;
  top: 8%;
  right: 7%;
  padding: 6px 8px;
  color: var(--rarity-color);
  border: 1px solid color-mix(in srgb, var(--rarity-color) 50%, transparent);
  background: rgba(6,7,20,.7);
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.footballer-card-name {
  position: absolute;
  z-index: 4;
  left: 8%;
  right: 8%;
  bottom: 12%;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2.85rem);
  font-weight: 900;
  line-height: .9;
  text-align: left;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 4px 22px rgba(0,0,0,.9);
}
.footballer-card-footer {
  position: absolute;
  z-index: 4;
  left: 8%;
  right: 8%;
  bottom: 4.8%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(244,246,255,.76);
  font-family: var(--mono);
  font-size: .53rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footballer-card-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rarity-color);
  box-shadow: 0 0 9px var(--rarity-color);
}

/* Homepage flip-card back: three compact, contained player rows. */
.leader-card-back {
  overflow: hidden;
}
.leader-back-heading {
  margin: 4px 0 2px;
}
.leader-back-heading strong {
  display: block;
  max-height: 2.1em;
  overflow: hidden;
  font-size: clamp(1.05rem, 2vw, 1.55rem) !important;
  line-height: 1.03;
  text-overflow: ellipsis;
}
.leader-top-label {
  display: block;
  margin: 2px 0 5px;
  font-size: .43rem !important;
}
.leader-top-cards {
  display: grid;
  gap: 7px;
  min-height: 0;
}
.leader-top-card {
  display: grid !important;
  grid-template-columns: 24px 8px 42px minmax(0,1fr) !important;
  align-items: center;
  min-height: 56px !important;
  padding: 7px 9px !important;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 34%, rgba(255,255,255,.06));
  background: linear-gradient(100deg, color-mix(in srgb, var(--rarity-color) 8%, #111225), rgba(7,8,22,.94));
}
.leader-top-card > span,
.leader-top-card > b,
.leader-top-card div { min-width: 0; }
.leader-top-card > b {
  font-size: 1.08rem !important;
  color: var(--rarity-color);
}
.leader-top-card div strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--display);
  font-size: .78rem !important;
  line-height: 1;
}
.leader-top-card div small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .45rem !important;
}
.leader-pack-total {
  margin-top: 7px !important;
  padding-top: 8px !important;
}
.leader-flip-hint { bottom: 9px !important; }

/* Best player: actual card on the left, clean information on the right. */
.best-card-panel,
.recent-panel { min-width: 0; }
.best-player-showcase {
  display: grid;
  grid-template-columns: minmax(190px, 245px) minmax(0,1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  width: 100%;
  min-height: 390px;
  padding: clamp(18px, 2vw, 28px);
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 38%, rgba(255,255,255,.08));
  background:
    radial-gradient(circle at 9% 12%, color-mix(in srgb, var(--rarity-color) 14%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(37,36,73,.88), rgba(10,11,28,.96));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.best-player-showcase:hover,
.best-player-showcase:focus-visible {
  border-color: var(--rarity-color);
  outline: none;
  box-shadow: 0 20px 55px rgba(3,4,16,.4), 0 0 28px color-mix(in srgb, var(--rarity-color) 14%, transparent);
}
.best-footballer-card { max-width: 245px; justify-self: center; }
.best-player-copy { min-width: 0; padding-right: 8px; }
.best-player-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rarity-color);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.best-player-kicker i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rarity-color); box-shadow: 0 0 12px var(--rarity-color);
}
.best-player-copy h3 {
  margin: 14px 0 6px;
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 4.1rem);
  line-height: .88;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: keep-all;
}
.best-player-copy > p { color: var(--muted); font-size: .82rem; }
.best-player-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.best-player-facts span {
  padding: 7px 9px;
  border: 1px solid rgba(183,189,255,.16);
  background: rgba(4,5,17,.38);
  font-family: var(--mono);
  font-size: .58rem;
}
.best-player-stats,
.squad-main-stats {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 5px;
  margin-top: 18px;
}
.best-player-stats span,
.squad-main-stats span {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 3px;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 25%, rgba(255,255,255,.06));
  background: rgba(4,5,18,.38);
  font-family: var(--mono);
  font-size: .62rem;
}
.best-player-stats b,
.squad-main-stats b { color: var(--rarity-color); font-size: .48rem; }

/* Recent pulls are compact rows with no wasted empty height. */
.recent-pulls { display: grid; gap: 10px; }
.recent-pull-v2 {
  display: grid;
  grid-template-columns: 34px 58px 62px minmax(0,1fr) auto 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 92px;
  padding: 9px 13px;
  overflow: hidden;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 32%, rgba(255,255,255,.06));
  background: linear-gradient(100deg, color-mix(in srgb, var(--rarity-color) 8%, #25244a), rgba(9,10,27,.96) 58%);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
.recent-pull-v2:hover,
.recent-pull-v2:focus-visible { border-color: var(--rarity-color); outline: none; }
.recent-rank { color: rgba(235,238,255,.48); font-family: var(--mono); font-size: .68rem; }
.recent-art {
  display: block;
  width: 58px;
  height: 70px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 46%, transparent);
  background: #101122;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}
.recent-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-score { display: grid; line-height: 1; }
.recent-score strong { color: var(--rarity-color); font-family: var(--display); font-size: 2.1rem; }
.recent-score small { color: var(--accent-cyan); font-family: var(--mono); font-size: .5rem; }
.recent-identity { min-width: 0; display: grid; gap: 5px; }
.recent-identity strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--display);
  font-size: 1.18rem;
  text-transform: uppercase;
}
.recent-identity small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .62rem; }
.recent-identity i { width: 7px; height: 7px; border-radius: 50%; background: var(--rarity-color); }
.recent-pack { display: grid; justify-items: end; gap: 4px; min-width: 82px; }
.recent-pack strong { font-family: var(--mono); font-size: .57rem; }
.recent-pack small { color: var(--muted); font-size: .55rem; }
.recent-arrow { color: var(--accent-cyan); font-size: 1rem; }

/* Generated squad uses consistent compact collectible cards. */
.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(245px,1fr));
  gap: clamp(18px, 2vw, 28px);
}
.squad-player-tile {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  width: 100%;
  padding: 14px;
  color: inherit;
  border: 1px solid rgba(177,183,255,.13);
  background: linear-gradient(150deg, rgba(35,34,68,.76), rgba(7,8,22,.93));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.squad-player-tile:hover,
.squad-player-tile:focus-visible { border-color: var(--rarity-color); transform: translateY(-4px); outline: none; }
.squad-footballer-card { max-width: 260px; justify-self: center; }
.squad-player-info { min-width: 0; }
.squad-player-info > div:first-child { display: grid; gap: 3px; }
.squad-player-info > div:first-child strong { font-size: .84rem; }
.squad-player-info > div:first-child small { color: var(--muted); font-size: .62rem; }
.squad-main-stats { margin-top: 12px; }

/* Full player profile: one-screen dashboard, no giant portrait. */
.player-modal { padding: 18px; }
.player-modal-backdrop { backdrop-filter: blur(5px); }
.player-profile-sheet {
  width: min(1420px, calc(100vw - 36px));
  height: min(860px, calc(100vh - 36px));
  max-height: none;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-color, #7b77ff) 34%, rgba(255,255,255,.12));
  background:
    radial-gradient(circle at 78% 9%, rgba(94,86,193,.2), transparent 34%),
    linear-gradient(145deg, #202044, #0c0d1e 58%, #070812);
}
.player-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  float: none;
  margin: 0;
  border-radius: 0;
}
.player-modal-content { height: 100%; overflow: auto; }
.player-profile-v2 { min-height: 100%; padding: 22px 26px 26px; }
.player-profile-header-v2 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 54px 16px 0;
  border-bottom: 1px solid rgba(184,190,255,.14);
}
.player-profile-header-v2 h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: .88;
  text-transform: uppercase;
}
.player-profile-header-v2 p { margin: 6px 0 0; color: var(--muted); font-size: .72rem; }
.player-profile-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.player-profile-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--rarity-color) 35%, rgba(255,255,255,.08));
  background: rgba(4,5,17,.5);
  font-family: var(--mono);
  font-size: .57rem;
  text-transform: uppercase;
}
.player-profile-badges i { width: 7px; height: 7px; border-radius: 50%; background: var(--rarity-color); box-shadow: 0 0 10px var(--rarity-color); }
.player-profile-dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0,1fr);
  gap: 28px;
  padding-top: 22px;
}
.player-profile-side { min-width: 0; }
.profile-footballer-card { width: 250px; max-width: 100%; margin-inline: auto; }
.profile-fact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 14px;
}
.profile-fact-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(177,184,255,.13);
  background: rgba(5,6,19,.42);
  color: #fff;
  font-family: var(--mono);
  font-size: .62rem;
}
.profile-fact-list b { color: var(--muted); font-size: .5rem; text-transform: uppercase; }
.player-profile-data { min-width: 0; }
.profile-rating-strip {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.profile-rating-strip > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(178,185,255,.14);
  background: rgba(5,6,19,.46);
}
.profile-rating-strip span { display: block; color: var(--muted); font-family: var(--mono); font-size: .5rem; text-transform: uppercase; }
.profile-rating-strip strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.3vw, 2.4rem);
  line-height: .9;
}
.profile-rating-strip > div:nth-child(-n+3) strong { color: var(--rarity-color); }
.profile-data-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 235px;
  gap: 22px;
  align-items: stretch;
}
.player-profile-v2 .player-attribute-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px 22px;
}
.player-profile-v2 .player-attribute-group {
  padding: 13px;
  border: 1px solid rgba(179,186,255,.12);
  background: rgba(5,6,19,.33);
}
.player-profile-v2 .attribute-heading { font-size: 1rem; }
.player-profile-v2 .attribute-track { height: 6px; margin: 7px 0 10px; }
.player-profile-v2 .player-attribute-group ul { gap: 5px; }
.player-profile-v2 .player-attribute-group li { font-size: .64rem; }
.radar-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 16px 10px;
  border: 1px solid rgba(180,187,255,.12);
  background: rgba(4,5,17,.38);
}
.radar-panel > span { color: var(--accent-cyan); font-family: var(--mono); font-size: .54rem; letter-spacing: .12em; }
.radar-panel > small { color: var(--muted); font-size: .54rem; }
.player-radar { width: 205px; max-width: 100%; height: auto; overflow: visible; }
.player-radar line { stroke: rgba(221,225,255,.15); stroke-width: 1; }
.player-radar .radar-outer { fill: rgba(255,255,255,.025); stroke: rgba(221,225,255,.25); stroke-width: 1.2; }
.player-radar .radar-value { fill: color-mix(in srgb, var(--rarity-color) 32%, transparent); stroke: var(--rarity-color); stroke-width: 2; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rarity-color) 35%, transparent)); }
.player-radar text { fill: rgba(240,242,255,.78); font-family: var(--mono); font-size: 7px; font-weight: 700; }
.player-radar text tspan:last-child { fill: var(--rarity-color); }

@media (max-width: 1180px) {
  .best-player-showcase { grid-template-columns: 210px minmax(0,1fr); }
  .player-profile-dashboard { grid-template-columns: 245px minmax(0,1fr); gap: 20px; }
  .profile-data-grid { grid-template-columns: 1fr; }
  .radar-panel { display: none; }
  .player-profile-v2 .player-attribute-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .leader-top-card { min-height: 52px !important; grid-template-columns: 20px 7px 36px minmax(0,1fr) !important; }
  .leader-top-card div strong { font-size: .7rem !important; }
  .best-player-showcase { grid-template-columns: 1fr; }
  .best-footballer-card { width: min(240px, 78vw); }
  .best-player-copy { padding: 0 4px 4px; }
  .recent-pull-v2 { grid-template-columns: 24px 50px 52px minmax(0,1fr) 18px; gap: 8px; min-height: 80px; padding: 7px 9px; }
  .recent-art { width: 50px; height: 62px; }
  .recent-pack { display: none; }
  .recent-score strong { font-size: 1.7rem; }
  .recent-identity strong { font-size: 1rem; }
  .card-grid { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
  .player-modal { padding: 6px; }
  .player-profile-sheet { width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .player-profile-v2 { padding: 18px 14px 24px; }
  .player-profile-header-v2 { display: grid; padding-right: 42px; align-items: start; }
  .player-profile-badges { justify-content: flex-start; }
  .player-profile-dashboard { grid-template-columns: 1fr; }
  .profile-footballer-card { width: min(245px,78vw); }
  .profile-fact-list { max-width: 480px; margin-inline: auto; }
  .profile-rating-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .player-profile-v2 .player-attribute-grid { grid-template-columns: 1fr; }
}

/* Small final refinements. */
.leader-card-copy strong {
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 3.2vw, 3.7rem);
  line-height: .88;
}
.player-profile-sheet {
  height: auto;
  min-height: min(610px, calc(100vh - 36px));
  max-height: calc(100vh - 36px);
}
@media (max-width: 760px) {
  .player-profile-sheet { min-height: calc(100vh - 12px); max-height: calc(100vh - 12px); }
}


/* v2.1.2 — readable typography and metadata cleanup --------------------- */
:root { --mono: "Manrope", Inter, system-ui, sans-serif; }
.hero-content { padding-top: clamp(16px, 2vw, 28px); }
.profile-handle {
  font-family: var(--body);
  font-size: clamp(.82rem, 1vw, .98rem);
  font-weight: 600;
  letter-spacing: .01em;
}
.eyebrow,
.label,
.progression-overline,
.insight-label,
.ranking-label,
.engagement-kicker,
.panel-heading span,
.collection-toolbar label,
.player-profile-badges span,
.profile-rating-strip span,
.radar-panel > span,
.footballer-card-footer,
.footballer-card-potential,
.recent-pack strong,
.recent-score small,
.open-player-profile {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: .045em;
}
.summary-card .label,
.summary-card small,
.rarity-stat small,
.ranking-stat small,
.dominant-insight small,
.position-legend,
.squad-player-info small,
.best-player-copy p,
.best-player-facts,
.recent-identity small,
.recent-pack small {
  font-family: var(--body);
  line-height: 1.45;
}
.player-profile-badges span { font-size: .66rem; }
.profile-fact-list span { font-family: var(--body); font-size: .74rem; }
.profile-fact-list b { font-family: var(--body); font-size: .59rem; letter-spacing: .035em; }
.profile-rating-strip span { font-size: .62rem; letter-spacing: .035em; }
.player-profile-header-v2 p { font-size: .82rem; line-height: 1.5; }
.player-profile-v2 .player-attribute-group li {
  font-family: var(--body);
  font-size: .76rem;
  line-height: 1.35;
}
.player-profile-v2 .attribute-heading b { font-family: var(--body); font-size: .82rem; }
.recent-identity small { font-size: .7rem; }
.recent-pack strong { font-size: .64rem; }
.recent-pack small { font-size: .62rem; }
.recent-rank { font-family: var(--body); font-weight: 700; font-size: .72rem; }
.radar-panel > span, .radar-panel > small { font-family: var(--body); font-size: .62rem; }
.player-radar text { font-family: var(--body); font-size: 8px; }
@media (max-width: 760px) {
  .player-profile-v2 .player-attribute-group li { font-size: .8rem; }
  .profile-handle { font-size: .82rem; }
}

/* v2.2 — club navigation, scouting ranges and professional cards -------- */
.profile-nav-row {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  margin: 0 0 24px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(196, 201, 255, .14);
  background: linear-gradient(180deg, rgba(21,20,38,.96), rgba(21,20,38,.86));
  backdrop-filter: blur(10px);
}
.profile-nav-row .back-button { margin: 0; flex: 0 0 auto; }
.profile-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.profile-tabs button {
  position: relative;
  min-height: 40px;
  padding: 9px 18px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--body);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.profile-tabs button:hover,
.profile-tabs button:focus-visible { color: #fff; border-color: rgba(145,162,255,.28); outline: none; }
.profile-tabs button.active {
  color: #fff;
  border-color: rgba(91,231,255,.4);
  background: linear-gradient(135deg, rgba(91,231,255,.11), rgba(145,162,255,.13));
  box-shadow: inset 0 -2px 0 var(--accent-cyan), 0 0 18px rgba(91,231,255,.08);
}
.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; animation: profilePanelIn .22s ease-out both; }
@keyframes profilePanelIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.overview-best-player { margin: 24px 0 0; }
.overview-best-player .best-card-panel { width: 100%; }
.squad-recent-section { margin: 0 0 24px; }
#profileSquadPanel .collection-section,
#profileObjectivesPanel .engagement-section,
#profileLegacyPanel .achievement-section { margin-top: 0; }

.country-inline,
.card-country {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.country-flag {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 1.05em;
  line-height: 1;
}

/* One coherent card surface: artwork, identity and all main stats. */
.footballer-card {
  aspect-ratio: 3 / 4.35;
  min-height: 0;
  border-width: 1px;
}
.footballer-card::after { height: 58%; background: linear-gradient(to top, rgba(5,6,18,.99) 6%, rgba(5,6,18,.93) 48%, rgba(5,6,18,.18) 88%, transparent); }
.footballer-card-art img { object-position: center 18%; }
.footballer-card-rating {
  top: 6.5%;
  left: 7%;
  justify-items: start;
}
.footballer-card-rating strong { font-size: clamp(2.45rem, 4.6vw, 4.4rem); }
.footballer-card-rating small {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-family: var(--body);
  font-size: clamp(.48rem, .72vw, .64rem);
  font-weight: 800;
  letter-spacing: .035em;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.footballer-card-position {
  position: absolute;
  z-index: 5;
  top: 7%;
  right: 7%;
  min-width: 42px;
  padding: 7px 9px;
  color: #070815;
  background: var(--rarity-color);
  font-family: var(--display);
  font-size: clamp(.85rem, 1.5vw, 1.2rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 18px color-mix(in srgb, var(--rarity-color) 34%, transparent);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}
.footballer-card-identity {
  position: absolute;
  z-index: 5;
  left: 8%;
  right: 8%;
  bottom: 22.5%;
  min-width: 0;
}
.footballer-card-name {
  position: static;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(1.36rem, 2.55vw, 2.55rem);
  line-height: .9;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.footballer-card-name.name-long { font-size: clamp(1.12rem, 2.15vw, 2.05rem); line-height: .94; }
.footballer-card-name.name-very-long { font-size: clamp(.98rem, 1.85vw, 1.72rem); line-height: .98; }
.card-country {
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: rgba(242,244,255,.84);
  font-family: var(--body);
  font-size: clamp(.54rem, .82vw, .7rem);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.footballer-card-stats {
  position: absolute;
  z-index: 5;
  left: 7%;
  right: 7%;
  bottom: 7.2%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 3px;
}
.card-main-stat {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  padding: 5px 1px;
  border-top: 2px solid var(--stat-color);
  background: rgba(5,6,18,.68);
  font-family: var(--body);
  line-height: 1;
}
.card-main-stat b { color: rgba(235,238,255,.62); font-size: clamp(.38rem,.55vw,.5rem); }
.card-main-stat strong { color: #fff; font-size: clamp(.63rem,.9vw,.82rem); }
.stat-high { --stat-color: #72f5a0; }
.stat-medium { --stat-color: #f1c94a; }
.stat-low { --stat-color: #ff5e6d; }
.footballer-card-footer {
  bottom: 2.1%;
  justify-content: center;
  color: rgba(242,244,255,.68);
  font-size: clamp(.42rem,.58vw,.52rem);
}
.footballer-card-potential { display: none; }

/* Keep outer squad tiles concise because the card now contains the stats. */
.squad-player-tile { grid-template-columns: minmax(190px, 250px) minmax(0,1fr); }
.squad-player-info { align-content: center; }
.squad-main-stats { display: none; }

/* Attribute colour thresholds: green 70+, yellow 50–69, red below 50. */
.player-attribute-group .attribute-heading b { color: var(--stat-color) !important; }
.player-attribute-group .attribute-track span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--stat-color) 76%, white 6%), var(--stat-color)) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--stat-color) 25%, transparent);
}
.player-attribute-group.stat-low { border-color: rgba(255,94,109,.22); }
.player-attribute-group.stat-medium { border-color: rgba(241,201,74,.22); }
.player-attribute-group.stat-high { border-color: rgba(114,245,160,.18); }
.profile-fact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.profile-fact-grid span { min-height: 45px; }

/* Clear visual completion language. */
.mission-item.complete {
  border-color: rgba(87, 235, 144, .56) !important;
  box-shadow: inset 0 0 24px rgba(87,235,144,.07), 0 0 18px rgba(87,235,144,.05);
}
.mission-item.complete .mission-status {
  color: #07130c;
  background: #57eb90;
  border-color: #57eb90;
  font-size: 1rem;
  font-weight: 900;
}
.mission-item.complete .mission-reward small { color: #70f1a1; font-weight: 800; }
.mission-set-reward.complete { border-color: rgba(87,235,144,.62) !important; box-shadow: inset 0 0 24px rgba(87,235,144,.08); }
.milestone-card.complete,
.achievement-badge.unlocked {
  border-color: rgba(87,235,144,.72) !important;
  box-shadow: inset 0 0 28px rgba(87,235,144,.08), 0 0 18px rgba(87,235,144,.06) !important;
}
.milestone-card.complete::after,
.achievement-badge.unlocked::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #07130c;
  border-radius: 50%;
  background: #57eb90;
  font-size: .75rem;
  font-weight: 900;
}
.milestone-card,
.achievement-badge { position: relative; }

@media (max-width: 900px) {
  .profile-nav-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 0 12px; }
  .profile-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .profile-tabs button { flex: 0 0 auto; padding-inline: 14px; }
  .squad-player-tile { grid-template-columns: 1fr; }
  .squad-footballer-card { width: min(260px, 80vw); }
}
@media (max-width: 560px) {
  .footballer-card-stats { gap: 2px; left: 5.5%; right: 5.5%; }
  .card-main-stat { padding: 4px 0; }
  .profile-fact-grid { grid-template-columns: 1fr 1fr; }
}

/* v2.2.2 — squad card polish and profile navigation cleanup ----------- */

/* Give the second hero line a little more breathing room so descenders
   never touch the clipping edge in Chrome at any zoom level. */
.hero h1 { padding-bottom: .10em; }
.hero-accent {
  position: relative;
  top: -.045em;
  margin-top: .035em;
  padding-bottom: .045em;
}

/* Keep the page itself transparent. Only the menu receives a restrained,
   rounded translucent surface. */
.profile-nav-row {
  min-height: 62px;
  margin-bottom: 24px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.profile-tabs {
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(183, 190, 255, .16);
  border-radius: 15px;
  background: rgba(27, 27, 59, .44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.profile-tabs button {
  min-height: 38px;
  padding: 8px 17px;
  border-radius: 10px;
}
.profile-tabs button.active {
  border-color: rgba(91,231,255,.33);
  background: linear-gradient(135deg, rgba(91,231,255,.12), rgba(145,162,255,.14));
  box-shadow: inset 0 0 0 1px rgba(91,231,255,.05), 0 0 18px rgba(91,231,255,.06);
}
.manager-label { color: var(--accent-cyan); font-weight: 800; }
.country-flag { display: none !important; }
.country-inline,
.card-country { gap: 0; }

/* The latest-activity heading was too close to the frame edge. */
.squad-recent-section .collection-heading {
  padding: 13px 0 3px 18px;
}

/* Standalone collectible cards: no secondary information panel beneath. */
.squad-player-tile {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  place-items: center;
  gap: 0;
  padding: 12px;
  border-radius: 14px;
}
.squad-player-info,
.squad-main-stats,
.squad-player-tile .open-player-profile { display: none !important; }
.squad-footballer-card { width: min(100%, 260px); max-width: 260px; }

/* Keep the rating and scouting range together on one line. */
.footballer-card-rating {
  min-width: 82px;
  align-items: start;
}
.footballer-card-rating small {
  width: max-content;
  max-width: none;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  background: rgba(5,6,18,.72);
  white-space: nowrap;
  line-height: 1;
}

/* Cards use surnames only, so the identity stays strong and readable. */
.footballer-card-name {
  -webkit-line-clamp: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: .96;
}
.footballer-card-name.name-long { font-size: clamp(1.12rem, 2.05vw, 1.95rem); }
.footballer-card-name.name-very-long { font-size: clamp(.96rem, 1.75vw, 1.58rem); }

/* Stat labels remain readable; values become black text on a rounded
   threshold-colour chip: green 70+, yellow 50–69, red below 50. */
.card-main-stat {
  gap: 4px;
  padding: 4px 1px;
  border-top: 0;
  background: rgba(5,6,18,.44);
}
.card-main-stat b {
  color: rgba(238,240,255,.80);
  font-weight: 800;
}
.card-main-stat strong {
  min-width: 27px;
  padding: 4px 5px 3px;
  color: #080914;
  border-radius: 7px;
  background: var(--stat-color);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 10px color-mix(in srgb, var(--stat-color) 16%, transparent);
}

/* Physical data and playstyle stay inside the opened player profile. */
.best-player-facts,
.best-player-stats { display: none !important; }
.best-player-copy > p { margin-top: 8px; }

/* Side-profile scores use the same rating thresholds. */
.profile-fact-list em.profile-score {
  color: var(--stat-color);
  font-family: var(--body);
  font-style: normal;
  font-weight: 900;
}
.profile-fact-list em.profile-score.stat-high { --stat-color: #72f5a0; }
.profile-fact-list em.profile-score.stat-medium { --stat-color: #f1c94a; }
.profile-fact-list em.profile-score.stat-low { --stat-color: #ff5e6d; }

@media (max-width: 900px) {
  .profile-tabs { border-radius: 13px; }
  .squad-recent-section .collection-heading { padding-left: 10px; }
}
