@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Chakra+Petch:wght@400;500;600;700&display=swap");

:root {
  --bg-0: #090604;
  --bg-1: #1b120a;
  --panel: #17100c;
  --gold-1: #fff2bf;
  --gold-2: #ffd75a;
  --gold-3: #efb100;
  --amber: #ff8a00;
  --ember: #ff4e00;
  --cobalt: #3f7dff;
  --text: #fff7dd;
  --muted: #d6c89e;
  --line: rgba(255, 200, 72, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  color: var(--text);
  background:
    radial-gradient(80rem 40rem at 90% -10%, rgba(255, 182, 43, 0.2), transparent 70%),
    radial-gradient(42rem 24rem at -10% 20%, rgba(63, 125, 255, 0.18), transparent 72%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 210, 80, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 210, 80, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, #000 28%, transparent 90%);
  z-index: -1;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #271000;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 24px rgba(255, 180, 40, 0.35);
}

.brand-text {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.5rem;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--gold-2);
}

.hero {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.6rem;
  align-items: center;
}

.hero-copy {
  animation: slide-in 420ms ease-out both;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  color: var(--gold-2);
  font-size: 0.86rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.95;
  margin-top: 0.45rem;
}

h1 span {
  color: var(--gold-2);
  text-shadow: 0 0 20px rgba(255, 184, 34, 0.35);
}

.hero-text {
  color: var(--muted);
  line-height: 1.5;
  max-width: 58ch;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0 1rem;
  border-radius: 0.7rem;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary {
  color: #2a1400;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 24px rgba(255, 173, 29, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 185, 68, 0.08);
}

.btn-ghost:hover {
  border-color: rgba(255, 200, 70, 0.48);
}

.hero-art {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(20rem 16rem at 80% 10%, rgba(255, 122, 0, 0.2), transparent),
    radial-gradient(20rem 14rem at 15% 90%, rgba(63, 125, 255, 0.2), transparent),
    rgba(9, 6, 4, 0.65);
  animation: float-in 520ms ease-out both;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.stat-strip {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.stat-strip li {
  min-width: 8.5rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  background: rgba(21, 14, 10, 0.75);
}

.stat-strip strong {
  display: block;
  font-size: 1.2rem;
  color: var(--gold-2);
}

.stat-strip span {
  font-size: 0.82rem;
  color: var(--muted);
}

.section {
  margin-top: 3rem;
}

.section h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: var(--gold-1);
}

.steps,
.cards {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

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

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

.steps article,
.cards article {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(26, 18, 12, 0.8), rgba(15, 10, 7, 0.9));
}

.steps span {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 186, 55, 0.15);
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-weight: 700;
}

.steps h3,
.cards h3 {
  margin-top: 0.65rem;
  font-size: 1.5rem;
}

.steps p,
.cards p {
  margin-top: 0.35rem;
  line-height: 1.45;
  color: var(--muted);
}

code {
  font-family: "Chakra Petch", sans-serif;
  color: var(--gold-1);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.2rem 0 1.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.doc {
  width: min(880px, calc(100% - 2rem));
  margin: 2.25rem auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.2rem;
  background: rgba(18, 12, 8, 0.8);
}

.doc h1 {
  margin-bottom: 0.4rem;
}

.doc p,
.doc li {
  color: var(--muted);
  line-height: 1.55;
}

.doc a,
.doc a:link,
.doc a:visited,
.doc a:any-link {
  color: var(--gold-2) !important;
  -webkit-text-fill-color: var(--gold-2);
  text-decoration-color: rgba(255, 215, 90, 0.7);
  text-underline-offset: 0.15em;
}

.doc a:hover,
.doc a:focus-visible {
  color: var(--gold-1) !important;
  -webkit-text-fill-color: var(--gold-1);
  text-decoration-color: var(--gold-1);
}

.doc h2 {
  margin-top: 1.1rem;
  font-size: 2rem;
}

.doc ul {
  padding-left: 1.2rem;
}

.leaderboard-main {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  --mode-glow: rgba(255, 176, 44, 0.22);
  --mode-line: rgba(255, 184, 48, 0.38);
}

body.render-autopost {
  min-width: 1500px;
  overflow-x: auto;
}

body.render-autopost *,
body.render-autopost *::before,
body.render-autopost *::after {
  animation: none !important;
  transition: none !important;
}

body.render-autopost .site-header,
body.render-autopost .site-footer,
body.render-autopost .leaderboard-hero,
body.render-autopost .leaderboard-head,
body.render-autopost .leaderboard-stats,
body.render-autopost .podium,
body.render-autopost .refresh-meter,
body.render-autopost .board-head p:last-child,
body.render-autopost .board-actions,
body.render-autopost .live-pill {
  display: none !important;
}

body.render-autopost .leaderboard-main {
  width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 0;
}

body.render-autopost .leaderboard-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

body.render-autopost .leaderboard-status {
  font-size: 1rem;
}

body.render-autopost .board-head,
body.render-autopost .board-row {
  grid-template-columns: 0.8fr 2.4fr 1.35fr 1.25fr;
}

body.render-autopost .board-row.is-enter {
  opacity: 1;
}

body.render-autopost .board-wrap {
  margin-top: 0;
  border-radius: 1.15rem;
  padding: 0.8rem;
}

.leaderboard-main[data-mode="2v2"] {
  --mode-glow: rgba(74, 146, 255, 0.24);
  --mode-line: rgba(96, 165, 255, 0.42);
}

.leaderboard-main[data-mode="3v3"] {
  --mode-glow: rgba(255, 128, 54, 0.25);
  --mode-line: rgba(255, 145, 68, 0.42);
}

.leaderboard-main[data-mode="5v5"] {
  --mode-glow: rgba(255, 186, 54, 0.25);
  --mode-line: rgba(255, 204, 102, 0.45);
}

.leaderboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(36rem 20rem at 5% -10%, rgba(63, 125, 255, 0.2), transparent),
    radial-gradient(32rem 17rem at 105% 110%, var(--mode-glow), transparent),
    linear-gradient(180deg, rgba(18, 12, 8, 0.78), rgba(10, 7, 5, 0.88));
  overflow: hidden;
}

.leaderboard-hero::after {
  content: "";
  position: absolute;
  width: 16rem;
  height: 16rem;
  right: -5rem;
  top: -8rem;
  background: radial-gradient(circle, rgba(255, 220, 123, 0.35), rgba(255, 220, 123, 0));
  filter: blur(10px);
  pointer-events: none;
  animation: lb-orb 7s ease-in-out infinite;
}

.leaderboard-hero h1 {
  margin-top: 0.35rem;
  font-size: clamp(2.45rem, 5vw, 4.3rem);
}

.leaderboard-hero h1 span {
  color: var(--gold-2);
  text-shadow: 0 0 24px rgba(255, 183, 57, 0.34);
}

.leaderboard-hero-copy {
  animation: slide-in 360ms ease-out both;
}

.hero-meta {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.season-pill,
.live-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 82, 0.26);
  background: rgba(12, 8, 6, 0.52);
  padding: 0 0.8rem;
  color: var(--gold-1);
  font-weight: 600;
  backdrop-filter: blur(2px);
}

.live-pill {
  color: var(--text);
  border-color: rgba(93, 158, 255, 0.28);
}

.live-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  margin-right: 0.45rem;
  background: #68b0ff;
  box-shadow: 0 0 0 0 rgba(104, 176, 255, 0.7);
  animation: live-pulse 1.8s infinite;
}

.leaderboard-controls {
  border: 1px solid rgba(255, 205, 89, 0.18);
  border-radius: 0.95rem;
  padding: 0.85rem;
  background:
    radial-gradient(22rem 10rem at 100% 0%, rgba(255, 170, 38, 0.12), transparent),
    rgba(9, 6, 4, 0.62);
  backdrop-filter: blur(2px);
}

.control-block + .control-block {
  margin-top: 0.8rem;
}

.control-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(255, 205, 89, 0.24);
  border-radius: 0.78rem;
  background: rgba(8, 5, 4, 0.6);
}

.seg-btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 0.52rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  flex: 1;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease, transform 200ms ease, background 220ms ease;
}

.seg-btn:hover {
  color: var(--gold-1);
}

.seg-btn.is-active {
  color: #2d1700;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 8px 20px rgba(255, 179, 46, 0.24);
}

.field-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

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

.field {
  display: grid;
  gap: 0.28rem;
}

.field span {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  appearance: none;
  border: 1px solid rgba(255, 205, 89, 0.28);
  border-radius: 0.95rem;
  min-height: 2.55rem;
  padding: 0 0.65rem;
  font: inherit;
  color: var(--text);
  background-color: rgba(12, 8, 6, 0.72);
  outline: none;
}

.field select {
  padding-right: 2.7rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold-2) 50%),
    linear-gradient(135deg, var(--gold-2) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 205, 89, 0.35), rgba(255, 205, 89, 0.35));
  background-position:
    calc(100% - 1.05rem) calc(50% - 3px),
    calc(100% - 0.72rem) calc(50% - 3px),
    calc(100% - 2.2rem) 50%;
  background-size: 7px 7px, 7px 7px, 1px 62%;
  background-repeat: no-repeat;
}

.field select option {
  color: var(--gold-1);
  background: #1a120b;
}

.field select option:checked {
  color: #2c1700;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-3));
}

.field input::placeholder {
  color: rgba(214, 200, 158, 0.6);
}

.field input:focus,
.field select:focus {
  border-color: var(--mode-line);
  box-shadow: 0 0 0 3px rgba(255, 193, 81, 0.13);
}

.refresh-btn {
  width: 100%;
  margin-top: 0.8rem;
  min-height: 2.3rem;
}

.leaderboard-panel {
  position: relative;
  border: 1px solid rgba(255, 205, 89, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(32rem 14rem at 0% 100%, rgba(63, 125, 255, 0.15), transparent),
    radial-gradient(26rem 14rem at 100% 0%, var(--mode-glow), transparent),
    linear-gradient(180deg, rgba(17, 12, 8, 0.82), rgba(10, 7, 5, 0.92));
}

.leaderboard-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: end;
  flex-wrap: wrap;
}

.leaderboard-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.refresh-meter {
  width: min(18rem, 100%);
}

.refresh-meter p {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.79rem;
  text-align: right;
}

.refresh-track {
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 216, 127, 0.15);
  overflow: hidden;
}

.refresh-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-2), var(--amber));
  box-shadow: 0 0 20px rgba(255, 186, 74, 0.45);
  transition: width 220ms linear;
}

.leaderboard-stats {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.stat-card {
  position: relative;
  border: 1px solid rgba(255, 205, 89, 0.25);
  border-radius: 0.85rem;
  padding: 0.82rem;
  background: rgba(13, 9, 6, 0.78);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: -70% auto -70% -40%;
  width: 45%;
  transform: rotate(18deg);
  background: linear-gradient(180deg, rgba(255, 230, 167, 0), rgba(255, 230, 167, 0.14), rgba(255, 230, 167, 0));
  pointer-events: none;
}

.stat-card h3 {
  font-size: 1rem;
  color: var(--muted);
}

.stat-card p {
  margin: 0.22rem 0 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  letter-spacing: 0.03em;
  color: var(--gold-1);
}

.podium {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.podium-card {
  border: 1px solid rgba(255, 205, 89, 0.2);
  border-radius: 0.9rem;
  padding: 0.92rem;
  background:
    radial-gradient(12rem 8rem at 20% -20%, rgba(255, 218, 130, 0.14), transparent),
    rgba(13, 9, 6, 0.78);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.podium-card:hover {
  transform: translateY(-3px);
  border-color: var(--mode-line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.podium-card.place-1 {
  border-color: var(--mode-line);
  background:
    radial-gradient(16rem 10rem at 50% -20%, rgba(255, 211, 112, 0.28), transparent),
    rgba(19, 13, 8, 0.88);
  transform: translateY(-0.38rem);
}

.podium-rank {
  margin: 0;
  color: var(--gold-2);
  font-weight: 700;
}

.podium-name {
  margin-top: 0.46rem;
  font-size: 1.7rem;
  line-height: 1;
}

.podium-tag {
  margin: 0.35rem 0 0;
  color: var(--muted);
  word-break: break-word;
}

.podium-elo {
  margin: 0.4rem 0 0;
  font-weight: 700;
  color: var(--gold-1);
}

.board-wrap {
  margin-top: 0.92rem;
  border: 1px solid rgba(255, 205, 89, 0.25);
  border-radius: 1rem;
  padding: 0.65rem;
  background:
    radial-gradient(22rem 14rem at 105% 0%, rgba(255, 178, 52, 0.16), transparent),
    radial-gradient(18rem 12rem at 0% 100%, rgba(63, 125, 255, 0.08), transparent),
    rgba(13, 9, 6, 0.82);
}

.board-head {
  display: grid;
  grid-template-columns: 0.8fr 2.25fr 1.25fr 1.25fr 1fr;
  gap: 0.8rem;
  align-items: center;
  min-height: 3rem;
  border: 1px solid rgba(255, 205, 89, 0.2);
  border-radius: 0.8rem;
  padding: 0 1rem;
  background: rgba(24, 16, 10, 0.78);
}

.board-head p {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.board-list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
}

.board-row {
  display: grid;
  grid-template-columns: 0.8fr 2.25fr 1.25fr 1.25fr 1fr;
  gap: 0.8rem;
  align-items: center;
  min-height: 5.6rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 205, 89, 0.2);
  border-radius: 0.95rem;
  background:
    radial-gradient(14rem 10rem at -10% 0%, rgba(255, 187, 74, 0.14), transparent),
    linear-gradient(180deg, rgba(26, 17, 11, 0.84), rgba(16, 10, 7, 0.92));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.board-row:hover {
  transform: translateY(-2px);
  border-color: var(--mode-line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.board-row.is-enter {
  opacity: 0;
  animation: row-in 320ms ease forwards;
  animation-delay: var(--row-delay, 0ms);
}

.board-row.is-top {
  border-color: rgba(255, 197, 89, 0.44);
}

.board-rank {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.02em;
  color: #f4f1df;
}

.board-rank.rank-1,
.board-rank.rank-2,
.board-rank.rank-3 {
  font-size: 2.2rem;
  letter-spacing: 0.035em;
  font-weight: 700;
  background-size: 280% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(18, 11, 8, 0.45);
  filter: saturate(1.2) contrast(1.12);
  animation: rank-shine 1.9s linear infinite;
}

.board-rank.rank-1 {
  background-image: linear-gradient(
    110deg,
    #fff9dc 0%,
    #ffe784 24%,
    #fff4bf 38%,
    #efb100 58%,
    #fff9db 82%,
    #ffd45a 100%
  );
  text-shadow:
    0 0 10px rgba(255, 217, 109, 0.55),
    0 0 24px rgba(255, 174, 38, 0.35);
}

.board-rank.rank-2 {
  background-image: linear-gradient(
    110deg,
    #ffffff 0%,
    #f0f4ff 24%,
    #ffffff 40%,
    #c7d0de 58%,
    #f3f6ff 82%,
    #d4dbe8 100%
  );
  text-shadow:
    0 0 10px rgba(238, 243, 255, 0.5),
    0 0 20px rgba(177, 190, 214, 0.32);
}

.board-rank.rank-3 {
  background-image: linear-gradient(
    110deg,
    #ffe0c3 0%,
    #efb382 24%,
    #ffd5ac 40%,
    #a86834 58%,
    #ffd5af 82%,
    #c2804a 100%
  );
  text-shadow:
    0 0 10px rgba(243, 186, 138, 0.46),
    0 0 20px rgba(182, 111, 55, 0.34);
}

.board-entity {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.board-entity-copy {
  min-width: 0;
}

.board-badge {
  flex: 0 0 4rem;
  width: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-badge img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.board-entity h4 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-entity p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-meta {
  display: grid;
  gap: 0.4rem;
}

.mode-chip,
.record-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 1.9rem;
  align-items: center;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-weight: 700;
}

.mode-chip {
  border: 1px solid rgba(255, 205, 89, 0.35);
  color: var(--gold-1);
  background: rgba(76, 52, 21, 0.42);
}

.record-chip {
  border: 1px solid rgba(255, 199, 102, 0.32);
  color: #ffdb8f;
  background: rgba(71, 49, 18, 0.42);
}

.board-score p {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  color: var(--gold-2);
  font-size: 2.1rem;
  letter-spacing: 0.02em;
}

.board-score span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.board-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

.row-action,
.row-icon {
  min-height: 2rem;
  border-radius: 0.58rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.row-action {
  border: 1px solid rgba(255, 217, 129, 0.75);
  color: #2c1700;
  padding: 0 0.65rem;
  background: linear-gradient(160deg, rgba(255, 241, 188, 0.95), rgba(239, 177, 0, 0.95));
  box-shadow: 0 8px 20px rgba(255, 174, 38, 0.22);
}

.row-icon {
  border: 1px solid rgba(255, 205, 89, 0.42);
  color: var(--gold-1);
  min-width: 3.1rem;
  padding: 0 0.55rem;
  background: rgba(54, 37, 15, 0.42);
}

.row-action:hover,
.row-icon:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.board-empty {
  border: 1px dashed rgba(255, 205, 89, 0.42);
  border-radius: 0.9rem;
  min-height: 4.2rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(20, 13, 9, 0.76);
}

.leaderboard-main.is-loading .leaderboard-panel {
  opacity: 0.8;
}

.leaderboard-main.is-loading .board-wrap {
  position: relative;
}

.leaderboard-main.is-loading .board-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 25%, rgba(255, 232, 168, 0.1) 50%, rgba(255, 255, 255, 0) 75%);
  transform: translateX(-120%);
  animation: shimmer 1.2s linear infinite;
  pointer-events: none;
}

.profile-empty[hidden],
.profile-loaded[hidden] {
  display: none !important;
}

.leaderboard-status[data-tone="error"] {
  color: #ffb7a4;
}

.leaderboard-status[data-tone="success"] {
  color: var(--gold-1);
}

.profile-lab {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.35rem;
}

.profile-lab-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.4rem;
  align-items: start;
}

.profile-lab-copy {
  animation: slide-in 420ms ease-out both;
}

.profile-lab-controls {
  animation: float-in 520ms ease-out both;
}

.profile-search-card,
.profile-shell,
.profile-hero-card,
.profile-section-card,
.profile-history-card,
.profile-mode-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(26, 18, 12, 0.84), rgba(15, 10, 7, 0.92));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.profile-search-card {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.profile-search-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.profile-search-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.profile-status-row {
  display: flex;
  align-items: center;
}

.profile-shell {
  padding: 1rem;
}

.profile-empty {
  min-height: 18rem;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.65rem;
  color: var(--muted);
}

.profile-empty h2 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: var(--gold-1);
}

.profile-loaded {
  display: grid;
  gap: 1rem;
}

.profile-hero-card {
  padding: 1rem;
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  align-items: center;
}

.profile-hero-card.no-media {
  grid-template-columns: 1fr;
}

.profile-hero-card.has-banner {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  align-items: center;
}

.profile-hero-media {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 207, 105, 0.26), transparent 58%),
    rgba(35, 22, 12, 0.88);
  border: 1px solid rgba(255, 214, 112, 0.22);
}

.profile-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.profile-hero-fallback {
  padding: 0.9rem;
  text-align: center;
  color: var(--gold-1);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.5rem;
}

.profile-hero-body {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.profile-hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.profile-hero-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.profile-hero-banner img {
  display: block;
  width: min(100%, 540px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22));
}

.profile-hero-meta,
.profile-history-meta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 219, 122, 0.28);
  background: rgba(255, 215, 90, 0.08);
  color: var(--gold-1);
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-pill-accent {
  color: #2a1400;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-3));
  border-color: rgba(255, 233, 170, 0.7);
}

.profile-summary-list,
.profile-line-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.profile-summary-list li,
.profile-line-list li {
  color: var(--muted);
  line-height: 1.45;
}

.profile-hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.profile-tab-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.profile-page-content {
  display: grid;
  gap: 1rem;
}

.profile-page-head {
  display: grid;
  gap: 0.3rem;
}

.profile-page-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-1);
}

.profile-page-footnote {
  margin: 0;
  color: var(--muted);
}

.profile-section-grid,
.profile-mode-grid,
.profile-history-grid {
  display: grid;
  gap: 1rem;
}

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

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

.profile-section-card,
.profile-mode-card,
.profile-history-card {
  padding: 1rem;
}

.profile-section-title,
.profile-mode-card h3,
.profile-history-card h3 {
  font-size: 1.45rem;
  color: var(--gold-1);
}

.profile-item-list {
  display: grid;
  gap: 0.75rem;
}

.profile-item-card {
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 213, 106, 0.18);
  background: rgba(255, 206, 96, 0.04);
}

.profile-item-head,
.profile-history-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.profile-item-head h4 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.profile-item-tag {
  color: var(--gold-2);
  font-size: 0.92rem;
  font-weight: 600;
}

.profile-history-pairing {
  margin: 0.8rem 0;
  color: var(--text);
  line-height: 1.5;
}

.profile-history-kicker {
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-empty-copy {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-lab.is-loading .profile-loaded {
  opacity: 0.82;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

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

  .field-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-controls .field-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-head {
    align-items: flex-start;
  }

  .refresh-meter p {
    text-align: left;
  }

  .board-head {
    display: none;
  }

  .board-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .board-entity {
    gap: 0.8rem;
  }

  .board-badge {
    flex-basis: 3.4rem;
    width: 3.4rem;
  }

  .board-actions {
    justify-content: flex-start;
  }

  .board-entity h4 {
    font-size: 1.7rem;
  }

  .leaderboard-stats {
    grid-template-columns: 1fr;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .podium-card.place-1 {
    transform: translateY(0);
  }

  .profile-lab-hero,
  .profile-section-grid,
  .profile-mode-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero-media {
    max-width: 11rem;
  }
}

@media (max-width: 760px) {
  .profile-hero-card,
  .profile-hero-card.has-banner {
    grid-template-columns: 1fr;
  }

  .profile-hero-banner {
    display: none;
  }
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(104, 176, 255, 0.72);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(104, 176, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(104, 176, 255, 0);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(120%);
  }
}

@keyframes lb-orb {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(16px);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rank-shine {
  from {
    background-position: 0% center;
  }
  to {
    background-position: 280% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .live-dot,
  .leaderboard-hero::after,
  .leaderboard-main.is-loading .board-wrap::after,
  .board-row.is-enter,
  .board-rank.rank-1,
  .board-rank.rank-2,
  .board-rank.rank-3 {
    animation: none !important;
  }

  .board-row:hover,
  .podium-card:hover,
  .podium-card.place-1 {
    transform: none;
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
