/* The arena deliberately owns its palette in both page themes. */
#tab-podiums .podiums-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
#tab-podiums { --arena-gold: #f5c963; --arena-silver: #d9e5f4; --arena-bronze: #dca67e; }
.arena-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 4px 0 18px; }
.arena-toolbar p { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .82rem; font-weight: 700; }
.arena-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--webster-gold); box-shadow: 0 0 0 4px #f5b70615; }
#arena-motion { display: inline-flex; align-items: center; gap: 9px; padding: 6px 10px 6px 13px; min-height: 36px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: .78rem; font-weight: 700; white-space: nowrap; border-radius: 20px; cursor: pointer; }
#arena-motion:hover { background: var(--surface-muted); }
#arena-motion:disabled { opacity: .7; cursor: default; }
.arena-motion-track { display: inline-flex; align-items: center; width: 32px; height: 18px; padding: 2px; border-radius: 20px; background: #6b7787; transition: background-color .2s ease; }
.arena-motion-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0005; transition: transform .2s ease; }
#arena-motion[aria-checked="true"] .arena-motion-track { background: #0872c5; }
#arena-motion[aria-checked="true"] .arena-motion-thumb { transform: translateX(14px); }
.arena-motion-state { min-width: 21px; text-align: left; }
@media (prefers-reduced-motion: reduce) { .arena-motion-track, .arena-motion-thumb { transition: none; } }
.arena-stage { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; border: 1px solid #2e4660; background: radial-gradient(ellipse at 50% 48%, #143556 0, #091b30 48%, #06111f 85%); color: #f5f7fc; box-shadow: 0 16px 32px #00000014; }
.arena-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .3; pointer-events: none; background-image: repeating-linear-gradient(90deg, transparent 0, transparent 79px, #92b8e908 80px); }
.arena-stage--students { background: radial-gradient(ellipse at 50% 48%, #17344d 0, #0b1d32 48%, #06111f 85%); }
.arena-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 26px 34px 0; position: relative; z-index: 2; }
.arena-heading h3 { margin: 0; color: #fff; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.025em; font-weight: 700; }
.arena-heading .stale-badge { font-size: .7rem; vertical-align: middle; color: #ffe5a9; background: #4b3920; }
.arena-message--visible { position: relative; z-index: 3; color: #dfc98d; font-size: .76rem; line-height: 1.5; padding: 0 34px; margin: 14px 0 12px; }
.arena-message--visible:empty { margin: 0; padding: 0; }
.arena-scene { position: relative; min-height: 330px; margin: 44px 30px 0; overflow: hidden; }
.arena-decor { position: absolute; inset: 0 -30px; pointer-events: none; overflow: hidden; }
.arena-orbit { position: absolute; width: 300px; height: 300px; top: 5px; left: calc(50% - 150px); border: 1px solid #deb45925; border-radius: 50%; box-shadow: 0 0 90px #e9bc3f08, inset 0 0 70px #edc45106; background: radial-gradient(circle, #f9d47408 0, transparent 65%); }
.arena-orbit::before, .arena-orbit::after { content: ""; position: absolute; border: 1px solid #a1c4ed0b; border-radius: 50%; inset: -26px; }
.arena-orbit::after { inset: 26px; border-style: dashed; border-color: #f7df9414; }
.arena-beam { position: absolute; top: -60px; left: 50%; margin-left: -140px; width: 280px; height: 460px; transform-origin: 50% 0; clip-path: polygon(47% 0, 53% 0, 85% 100%, 15% 100%); }
.arena-beam--leader { transform: rotate(0deg); opacity: .65; background: linear-gradient(180deg, #ffe3a548, #f5c96303); }
.arena-beam--silver { transform: rotate(0deg); opacity: .55; background: linear-gradient(180deg, #d8ebff40, #c2e2ff02); }
.arena-beam--bronze { transform: rotate(0deg); opacity: .48; background: linear-gradient(180deg, #efbd9738, #d99c7102); }
.arena-floor { position: absolute; height: 160px; width: 110%; left: -5%; bottom: -80px; border-radius: 50%; border-top: 1px solid #bbd7eb20; background: radial-gradient(ellipse at 50% 5%, #4a719f26, transparent 60%); transform: scaleY(.8); }
.arena-steps, .arena-competitors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 720px; margin: 0 auto; padding: 0 8px; }
.arena-steps { position: absolute; inset: auto 0 34px; align-items: end; perspective: 900px; }
.arena-rank-1 { grid-column: 2; --metal: var(--arena-gold); --step-height: 150px; }
.arena-rank-2 { grid-column: 1; --metal: var(--arena-silver); --step-height: 108px; }
.arena-rank-3 { grid-column: 3; --metal: var(--arena-bronze); --step-height: 76px; }
.arena-step { grid-row: 1; height: var(--step-height); position: relative; display: flex; align-items: center; justify-content: center; border: 1px solid #f5ce735e; border-bottom: 0; border-radius: 2px 2px 0 0; background: linear-gradient(110deg, #9d793b 0%, #d5b265 2%, #8f6a30 3%, #392b1b 30%, #654c27 65%, #9a7537 97%, #d1ae62 99%, #69471c 100%); box-shadow: inset 0 1px 0 #ffeec4, 0 24px 28px #0008; transform-origin: bottom; }
.arena-step::before { content: ""; position: absolute; height: 22px; left: -1px; right: -1px; top: -22px; transform-origin: bottom; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); background: linear-gradient(115deg, #87653b, #f5d685 48%, #af8543); border-bottom: 1px solid #ffe3a8; }
.arena-step::after { content: ""; position: absolute; height: 25px; left: 0; right: 0; bottom: -25px; opacity: .22; transform: scaleY(-1); background: linear-gradient(180deg, transparent, var(--metal)); mask-image: linear-gradient(90deg, transparent, #000, transparent); }
.arena-step.arena-rank-2 { border-color: #acc5e256; background: linear-gradient(110deg, #6a829d 0, #a5b8cd 2%, #4d617c 3%, #253348 30%, #435773 75%, #a3b7d1 99%, #4c617a 100%); }
.arena-step.arena-rank-2::before { background: linear-gradient(115deg, #4d6480, #c2d1e5 48%, #778eab); border-color: #d1e4fa; }
.arena-step.arena-rank-3 { border-color: #bf8e645e; background: linear-gradient(110deg, #8f6247 0, #c49473 2%, #725039 3%, #35261f 30%, #634631 75%, #bd8c6c 99%, #735136 100%); }
.arena-step.arena-rank-3::before { background: linear-gradient(115deg, #74503b, #d6ab88 48%, #956c4c); border-color: #d6a681; }
.arena-competitors { position: relative; min-height: 330px; list-style: none; align-items: end; z-index: 2; }
.arena-competitor { grid-row: 1; text-align: center; align-self: end; min-width: 0; padding: 0 0 calc(var(--step-height) + 72px); position: relative; display: flex; flex-direction: column; align-items: center; }
.arena-card { width: 100%; display: flex; flex-direction: column; align-items: center; border-radius: 8px; }
.arena-competitor.arena-rank-1 { z-index: 3; }
.arena-competitor.arena-rank-2 { z-index: 2; }
.arena-medal { position: relative; height: 71px; width: 62px; filter: drop-shadow(0 6px 10px #0007); }
.arena-medal-art { width: 62px; height: 71px; }
.arena-medal-rank { position: absolute; color: #594020; font-weight: 900; font-size: 17px; top: 27px; left: 0; right: 0; text-align: center; text-shadow: 0 1px #fff8; }
.arena-rank-1 .arena-medal { height: 96px; width: 84px; }
.arena-rank-1 .arena-medal-art { width: 84px; height: 96px; }
.arena-rank-1 .arena-medal-rank { font-size: 23px; top: 37px; }
.arena-rank-2 .arena-medal-art { filter: grayscale(1) brightness(1.1) sepia(.12) hue-rotate(165deg); }
.arena-rank-3 .arena-medal-art { filter: sepia(.5) saturate(1.4) hue-rotate(342deg) brightness(.83); }
.arena-rank-2 .arena-medal-rank { color: #3a465b; }
.arena-rank-3 .arena-medal-rank { color: #593b28; }
.arena-name { display: block; color: #f5f7ff; font-size: clamp(.92rem, 1.6vw, 1.22rem); line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; max-width: 100%; }
.arena-rank-1 .arena-name { color: #ffedbc; }
.arena-detail { display: block; color: #b6c7d9; font-size: .75rem; line-height: 1.4; margin-top: 6px; overflow-wrap: anywhere; max-width: 100%; }
.arena-detail:empty { display: none; }
.arena-score { display: block; width: fit-content; max-width: 100%; color: var(--metal); font-size: .94rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .015em; margin-top: 11px; padding: 6px 11px; background: #020d1a66; border: 1px solid #adc5e321; border-radius: 5px; }
.arena-score-number { display: block; font-size: 1.2rem; line-height: 1.15; }
.arena-score-unit { display: block; font-size: .64rem; line-height: 1.4; font-weight: 400; color: #b6c7d9; letter-spacing: .02em; }
.arena-empty { position: relative; padding: 90px 30px; text-align: center; line-height: 1.7; color: #bbccde; margin: 0; }
.arena-is-empty .arena-step { opacity: .18; }
.arena-unoccupied { opacity: .2; filter: grayscale(1); }
.arena-unoccupied .arena-medal { visibility: hidden; }
.arena-ghost { pointer-events: none; z-index: -1; }
.arena-dust { position: absolute; inset: 0; }
.arena-particle { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #f5d688; box-shadow: 0 0 6px #f5d68866; left: 13%; top: 65%; opacity: 0; animation: arena-drift 12s linear infinite; }
.arena-particle:nth-child(4n + 1) { left: 24%; top: 54%; animation-delay: -3s; animation-duration: 14s; }
.arena-particle:nth-child(4n + 2) { left: 73%; top: 60%; animation-delay: -7s; animation-duration: 17s; }
.arena-particle:nth-child(4n + 3) { left: 86%; top: 84%; animation-delay: -9s; animation-duration: 15s; }
.arena-particle:nth-child(5n) { left: 43%; top: 46%; animation-delay: -5s; }
.arena-particle:nth-child(5n + 1) { left: 59%; top: 74%; animation-delay: -11s; }
.arena-particle:nth-child(7n) { left: 35%; top: 35%; animation-delay: -6s; }
.arena-celebrating .arena-dust { animation: arena-sparkle 2.8s ease-out both; }
.arena-stage[data-presentation="change"] .arena-dust { animation-duration: 2s; }
.arena-paused .arena-particle, .arena-paused .arena-beam, .arena-paused .arena-dust { animation-play-state: paused; }
.arena-paused .arena-particle { opacity: 0; }
@keyframes arena-drift { 0%, 100% { opacity: 0; transform: translate(0, 15px); } 30% { opacity: .48; } 80% { opacity: .2; } 99% { transform: translate(18px, -90px); } }
@keyframes arena-sparkle { 0% { opacity: .2; transform: scale(.85); } 50% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@media (max-width: 760px) {
  .arena-heading { padding: 24px 22px 0; }
  .arena-scene { margin: 40px 16px 0; }
  .arena-steps, .arena-competitors { gap: 10px; padding: 0 4px; }
  .arena-score { padding: 5px 7px; font-size: .8rem; }
  .arena-message--visible { padding: 0 22px; }
}
@media (max-width: 480px) {
  #tab-podiums .podiums-grid { gap: 20px; }
  .arena-stage { border-radius: 12px; }
  .arena-heading { padding: 22px 16px 0; }
  .arena-scene { margin: 34px 8px 0; min-height: 300px; }
  .arena-competitors { min-height: 300px; }
  .arena-steps, .arena-competitors { gap: 7px; padding: 0 3px; }
  .arena-rank-1 { --step-height: 118px; }
  .arena-rank-2 { --step-height: 85px; }
  .arena-rank-3 { --step-height: 59px; }
  .arena-competitor { padding-bottom: calc(var(--step-height) + 72px); }
  .arena-name { font-size: .82rem; }
  .arena-detail { font-size: .65rem; }
  .arena-score { font-size: .71rem; padding: 5px 4px; letter-spacing: 0; }
  .arena-score-number { font-size: 1rem; }
  .arena-score-unit { font-size: .6rem; }
  .arena-medal { width: 44px; height: 50px; }
  .arena-medal-art { width: 44px; height: 50px; }
  .arena-medal-rank { font-size: 12px; top: 19px; }
  .arena-rank-1 .arena-medal { width: 62px; height: 71px; }
  .arena-rank-1 .arena-medal-art { width: 62px; height: 71px; }
  .arena-rank-1 .arena-medal-rank { font-size: 17px; top: 27px; }
  .arena-step::before { height: 15px; top: -15px; }
  .arena-orbit { width: 230px; height: 230px; left: calc(50% - 115px); top: 38px; }
  .arena-beam { width: 180px; height: 380px; margin-left: -90px; }
  .arena-particle:nth-child(n + 9) { display: none; }
  .arena-message--visible { padding: 0 16px; font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  #tab-podiums .arena-particle, #tab-podiums .arena-beam, #tab-podiums .arena-dust { animation: none; }
  #tab-podiums.animate__animated { animation: none; }
}
