/* Full-viewport campus with live rankings anchored to the original artwork. */
html body.leaderboard-explorer { padding-top: 0 !important; }
body.leaderboard-explorer .lb-page { max-width: none; padding-top: 0; }
.lb-stage {
  --stage-accent: #507e72;
  --stage-height: max(100dvh, 600px);
  --stage-inset: clamp(24px, 2.8vw, 64px);
  position: relative;
  isolation: isolate;
  height: var(--stage-height);
  margin: 0 -40px 40px;
  overflow: hidden;
  background: #dcebed;
  /* Keep the viewport edges covered during the shared section-reveal effect. */
  opacity: 1 !important;
  transform: none !important;
}
.lb-stage[data-current-view=act] { --stage-accent: #527f95; }
.lb-stage[data-current-view=coupling] { --stage-accent: #557d7c; }
.lb-stage-visual, .lb-stage-world { position: absolute; inset: 0; }
/* Image, video, podiums and inscriptions share one cover-sized coordinate plane. */
.lb-stage-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, calc(var(--stage-height) * 1983 / 793));
  aspect-ratio: 1983 / 793;
  transform: translate(-50%, -50%);
}
.lb-stage-art, .lb-stage-motion-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.lb-stage-motion-video { visibility: hidden; pointer-events: none; }
.lb-stage[data-motion-ready=true] .lb-stage-motion-video { visibility: visible; }
.lb-stage[data-motion-ready=true] .lb-stage-art { visibility: hidden; }
.lb-stage-head {
  position: absolute;
  z-index: 5;
  top: 112px;
  left: var(--stage-inset);
  right: var(--stage-inset);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}
.lb-stage h1 {
  margin: 0 0 6px;
  color: #203f4f;
  font-size: clamp(36px, 3.4vw, 88px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.lb-stage-head p { margin: 0; color: #3e606c; font-size: clamp(15px, 1.3vw, 21px); line-height: 1.5; }
.lb-stage-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: auto; }
.lb-stage-head .lb-stage-metric {
  padding: 2px 9px;
  border-radius: 6px;
  background: #fafcf3b3;
  color: #3e606c;
  font-size: 12px;
  white-space: nowrap;
}
.lb-stage-tabs {
  --tab-index: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 3px;
  border: 1px solid #b3c8bfe6;
  border-radius: 12px;
  background: #f9faf0d9;
  box-shadow: inset 0 1px 0 #ffffffe6, 0 3px 12px #294e5910;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lb-stage[data-current-view=act] .lb-stage-tabs { --tab-index: 1; }
.lb-stage[data-current-view=coupling] .lb-stage-tabs { --tab-index: 2; }
.lb-stage-tabs::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 9px;
  background: var(--stage-accent);
  box-shadow: inset 0 1px 0 #ffffff30, 0 1px 3px #23494b20;
  transform: translateX(calc(var(--tab-index) * 100%));
  transition: transform .28s cubic-bezier(.22,.68,.16,1), background .2s;
}
.lb-stage-tabs button {
  min-width: 100px;
  min-height: 40px;
  margin: 0;
  padding: 8px 20px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #365965;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  transition: color .2s;
}
.lb-stage-tabs button[aria-pressed=true] { color: #fff; }
.lb-stage-tabs button:focus-visible { outline-offset: 0; }
.lb-stage-caption {
  position: absolute;
  z-index: 2;
  top: max(88px, calc(var(--stage-height) * .38 - clamp(150px, 6.5vw, 210px)));
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 9px;
  border: 1px solid #ffffff59;
  border-radius: 6px;
  background: #f6f8eeb3;
  color: #426571;
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}
.lb-stage-caption strong { color: var(--stage-accent); }
.lb-podium-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* Suite stations: a light tag per dimension in the style of the stage cards, joined by a thin leader
   to a small marker on the shoulder pivot of the arm that illustrates it. */
.lb-stations { position: absolute; inset: 0; z-index: 2; pointer-events: none; container-type: size; }
.lb-stage .lb-station {
  --station-accent: #49796b;
  --pin: 50%;
  position: absolute;
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 6px 12px 7px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 10px;
  transform: translate(calc(-1 * var(--pin)), calc(-100% - var(--lead)));
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 4px 16px #2946531f;
  color: #2b4757;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .15s, box-shadow .15s;
}
.lb-stage .lb-station::before {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(var(--pin) - .5px);
  width: 1px;
  height: var(--lead);
  background: var(--station-accent);
  opacity: .75;
}
.lb-stage .lb-station::after {
  content: "";
  position: absolute;
  top: calc(100% + var(--lead));
  left: var(--pin);
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  background: var(--station-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--station-accent) 40%, transparent);
  animation: lb-station-marker 3.2s ease-out infinite;
}
.lb-stage .lb-station--start { --pin: 22px; }
.lb-stage .lb-station--end { --pin: calc(100% - 14px); }
/* Side tags sit left of their marker on a horizontal leader. */
.lb-stage .lb-station--side { transform: translate(calc(-100% - var(--lead)), -50%); }
.lb-stage .lb-station.lb-station--side::before { top: calc(50% - .5px); left: 100%; width: var(--lead); height: 1px; }
.lb-stage .lb-station.lb-station--side::after { top: 50%; left: calc(100% + var(--lead)); }
.lb-station-index { color: #506c7b; font-size: clamp(9px, .55vw, 11px); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.lb-station strong { display: inline-flex; align-items: center; gap: 6px; color: #1f3a4b; font-size: clamp(15px, 1vw, 20px); font-weight: 700; }
.lb-station strong::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--station-accent); }
.lb-station-gist { color: #506c7b; font-size: clamp(11px, .68vw, 13px); }
.lb-station:hover { background: rgba(255, 255, 255, .95); box-shadow: 0 6px 20px #29465333; }
.lb-station:focus-visible { outline: 2px solid var(--station-accent); outline-offset: 2px; }
.lb-stage .lb-station--act { --station-accent: #446f86; }
.lb-stage .lb-station--act::after { animation-delay: 1s; }
.lb-stage .lb-station--mind2act { --station-accent: #91793d; }
.lb-stage .lb-station--mind2act::after { animation-delay: 2s; }
.lb-station[data-clipped] { visibility: hidden; }
@keyframes lb-station-marker {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--station-accent) 40%, transparent); }
  60%, 100% { box-shadow: 0 0 0 9px transparent; }
}
.lb-stage .lb-podium-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: clamp(142px, 9vw, 220px);
  padding: 5px 4px;
  border: 0;
  border-radius: 10px;
  transform: translate(-50%, -100%);
  background: transparent;
  color: #172c3a;
  text-shadow: 0 1px 6px #fff, 0 1px 3px #fff;
  font-size: clamp(15px, 1.05vw, 26px);
  line-height: 1.35;
  pointer-events: auto;
  transition: background .15s;
}
.lb-podium-label:hover { background: #fafcf2c9; }
.lb-podium-label strong { font-size: clamp(19px, 1.35vw, 32px); font-weight: 700; }
.lb-podium-rank-2 { left: 41.8%; top: 43%; }
.lb-podium-rank-1 { left: 50%; top: 38%; }
.lb-podium-rank-3 { left: 58.2%; top: 46%; }
.lb-podium-avatar {
  display: grid;
  place-items: center;
  width: clamp(32px, 2vw, 48px);
  height: clamp(32px, 2vw, 48px);
  margin-bottom: 4px;
  border: 1px solid #a5bdb7;
  border-radius: 50%;
  background: #f8f9f0;
}
.lb-podium-avatar img { width: 72%; height: 72%; object-fit: contain; }
.lb-podium-avatar [hidden] { display: none !important; }
.lb-podium-monogram { color: #3c6572; font-size: 13px; font-weight: 600; }
.lb-stage-stations { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.lb-stage-stations button {
  position: absolute;
  top: 67.5%;
  left: 24.5%;
  min-width: 80px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  background: transparent;
  color: #49676b;
  font-size: clamp(16px, 1.4vw, 29px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: .025em;
  text-shadow: 0 1px 1px #fff9, -.4px -.7px .5px #203e4538;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.lb-stage-stations button:nth-child(2) { left: 76%; top: 68%; }
.lb-stage-stations button:nth-child(3) { left: 50%; top: 89%; }
.lb-stage-stations button span { display: block; }
.lb-stage-stations button:nth-child(1) span { transform: translateY(-.7em) skewY(-3deg); }
.lb-stage-stations button:nth-child(2) span { transform: translateY(-.35em) skewY(4deg); }
.lb-stage-stations button[aria-pressed=true], .lb-stage-stations button:hover { color: #315b60; }
.lb-stage-footer {
  position: absolute;
  z-index: 6;
  bottom: 22px;
  left: var(--stage-inset);
  right: var(--stage-inset);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}
.lb-stage-full, .lb-stage-motion-toggle, .lb-stage-footer p {
  border: 1px solid #ffffffb3;
  border-radius: 999px;
  background: #fafcf2d9;
  box-shadow: 0 2px 8px #203f4f0a;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #315f72;
}
.lb-stage-full, .lb-stage-motion-toggle { pointer-events: auto; min-height: 40px; padding: 8px 16px; font-size: 13px; line-height: 1.5; white-space: nowrap; }
.lb-stage-full { text-decoration: none; }
.lb-stage-full:hover, .lb-stage-motion-toggle:hover { background: #fafcf2; }
.lb-stage-footer p { margin: 0 0 0 auto; padding: 7px 12px; color: #365965; font-size: 11px; line-height: 1.5; }
.lb-stage .lb-stage-motion-toggle { font-size: 11px; padding-inline: 12px; }
.lb-stage-motion-toggle[hidden] { display: none !important; }
.lb-stage-motion-toggle:disabled { cursor: default; color: #526c74; }
.lb-page > .lb-results { max-width: 1520px; margin-inline: auto; }
@media (max-width: 1200px) { .lb-stage { margin-inline: -28px; } }
@media (max-width: 1100px) {
  .lb-stage-stations button:nth-child(-n+2) { visibility: hidden; }
}
@media (max-width: 1040px) {
  .lb-stage-head { top: 88px; }
  .lb-stage h1 { font-size: 36px; }
}
@media (max-width: 760px) {
  .lb-stations { display: none; }
  .lb-stage {
    --stage-height: max(100dvh, 640px);
    --stage-inset: 20px;
    margin-inline: -20px;
  }
  /* Extend the sky above the scene on narrow screens; retain all three podiums. */
  .lb-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../media/images/leaderboard-lunar-campus-v2.webp') center top / auto 2400px no-repeat;
  }
  .lb-stage-scene {
    top: auto;
    bottom: 0;
    width: calc((var(--stage-height) - 180px) * 1983 / 793);
    transform: translateX(-50%);
    mask-image: linear-gradient(transparent, #000 80px);
    -webkit-mask-image: linear-gradient(transparent, #000 80px);
  }
  .lb-stage-head { display: block; top: 88px; }
  .lb-stage h1 { font-size: clamp(30px, 7vw, 36px); }
  .lb-stage-head p { font-size: 14px; }
  .lb-stage-controls { align-items: flex-end; gap: 5px; margin-top: 14px; }
  .lb-stage-head .lb-stage-metric { order: 1; padding: 0; background: transparent; font-size: 10px; }
  .lb-stage-tabs { width: min(100%, 340px); }
  .lb-stage-tabs button { min-width: 0; min-height: 40px; padding: 7px 13px; font-size: 13px; }
  .lb-stage-caption { top: calc(180px + (var(--stage-height) - 180px) * .13); font-size: 13px; }
  .lb-stage .lb-podium-label { width: 104px; padding-inline: 2px; font-size: 12px; }
  .lb-podium-label strong { font-size: 16px; }
  .lb-podium-avatar { width: 28px; height: 28px; margin-bottom: 2px; }
  .lb-podium-avatar img { width: 21px; height: 21px; }
  .lb-podium-rank-2 { left: max(41.8%, calc(50% - 50vw + 56px)); }
  .lb-podium-rank-3 { left: min(58.2%, calc(50% + 50vw - 56px)); }
  .lb-stage-stations button { min-width: 48px; padding: 6px; font-size: 14px; }
  .lb-stage-footer { bottom: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .lb-stage-full { justify-self: start; }
  .lb-stage-motion-toggle { grid-column: 2; grid-row: 1; font-size: 10px; padding-inline: 10px; }
  .lb-stage-footer p { grid-column: 1 / -1; grid-row: 2; justify-self: start; max-width: 100%; margin: 0; padding: 5px 9px; font-size: 10px; }
}
@media (min-width: 761px) and (max-height: 700px) {
  .lb-stage-head { top: 96px; }
  .lb-stage h1 { font-size: 36px; }
  .lb-stage .lb-podium-label { font-size: 13px; }
  .lb-podium-label strong { font-size: 17px; }
  .lb-podium-avatar { width: 28px; height: 28px; }
  .lb-stage-footer { bottom: 14px; }
}
@media (min-width: 761px) and (min-aspect-ratio: 5/2) {
  .lb-stage-caption { top: 88px; font-size: 13px; }
  .lb-stage .lb-podium-label { font-size: 13px; }
  .lb-podium-label strong { font-size: 17px; }
  .lb-podium-avatar { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-stage *, .lb-stage-tabs::before, .lb-station::before, .lb-station::after { animation: none !important; transition: none !important; }
  .lb-stage[data-motion-ready=true] .lb-stage-motion-video { visibility: hidden; }
  .lb-stage[data-motion-ready=true] .lb-stage-art { visibility: visible; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .lb-stage-tabs, .lb-stage-caption, .lb-stage-full, .lb-stage-motion-toggle, .lb-stage-footer p { background: #fafcf5; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .lb-stage .lb-station { background: #fafcf5; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
