.arena { --navy: #182952; --muted: #586683; --progress: 0; min-height: 100vh; box-sizing: border-box; padding: clamp(20px,3vw,54px); background: #f2f1fb; color: var(--navy); font: 16px/1.45 system-ui, sans-serif; }
body:has(> .arena) { margin: 0; }
.arena:fullscreen { overflow: auto; }
.arena *, .arena *::before, .arena *::after { box-sizing: border-box; }
.arena h1,.arena h2,.arena h3,.arena p { margin: 0; }
.arena-head,.arena-stage-meta,.arena-standings-title,.arena-scan-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.arena h1 { font-size:clamp(30px,4.5vw,82px); line-height:1.15; letter-spacing:-.04em; margin:.12em 0 .48em; }
.arena .arena-event-label,.arena-standings-title span { color:var(--muted); font-weight:650; }
.arena-head button { border:1px solid #c7c6dc; background:#fff; padding:.6em 1.3em; border-radius:2em; color:var(--navy); cursor:pointer; }
.arena-grid { display:grid; grid-template-columns:minmax(0, 2.15fr) minmax(240px,1fr); gap:clamp(12px,1.8vw,30px); }
.arena-race-stage,.arena-scan-card,.arena-prizes { background:white; border-radius:20px; padding:clamp(16px,1.6vw,32px); }
.arena-stage-meta strong { color:#6141bc; font-size:clamp(22px,2.6vw,46px); font-variant-numeric:tabular-nums; }
.arena-stage-meta { min-height:3rem; }
.arena-race-scene { position:relative; isolation:isolate; height:clamp(140px,24vh,310px); border-radius:14px; margin:12px 0 22px; overflow:hidden; background:linear-gradient(#bedafb 0%,#eee8ff 68%,#e5d6ff); }
.arena-scene-sky,.arena-scene-ground { position:absolute; inset:0; pointer-events:none; }
.arena-scene-sky { background:radial-gradient(ellipse at 12% 20%,white 0 4%,transparent 4.5%),radial-gradient(ellipse at 77% 25%,#fffbef 0 6%,transparent 6.5%); }
.arena-scene-ground { top:76%; background: repeating-linear-gradient(100deg,#686caa 0 24px,#7b7eb9 24px 26px); border-top:5px solid white; }
.arena-race-scene :is(.arena-runner,.arena-finish,.arena-track-brand,.arena-milk-cup,.arena-milk-can,.arena-seedling,.arena-watering-can) { display:none; position:absolute; }
.arena-race-scene[data-theme=cow] :is(.arena-runner,.arena-finish,.arena-track-brand),.arena-race-scene[data-theme=cup] .arena-milk-cup,.arena-race-scene[data-theme=can] .arena-milk-can,.arena-race-scene[data-theme=sprout] :is(.arena-seedling,.arena-watering-can) { display:block; }
.arena-runner { font-size:clamp(48px,7vw,110px); left:calc(5% + var(--progress)*66%); bottom:15%; transition:left .7s linear; transform:scaleX(-1); }
.arena-running .arena-runner { animation:arena-gallop .28s infinite alternate; }
@keyframes arena-gallop { to { transform: translateY(-9px) scaleX(-1) rotate(-3deg); } }
.arena-finish { top:24%; bottom:20%; right:6%; width:4px; background:#313851; }
.arena-finish::before { content:""; position:absolute; top:0; right:0; width:48px; height:28px; background:repeating-conic-gradient(white 0 25%,#33405b 0 50%) 0 0 / 14px 14px; }
.arena-track-brand { bottom:1%; left:5%; height:16%; }
.arena-finish img { position:absolute; top:35%; right:5px; width:55px; }
.arena-track-brand img,.arena-milk-cup img,.arena-watering-can img,.arena-can-body img { height:100%; width:100%; object-fit:contain; }
.arena-milk-cup { height:77%; width:clamp(76px,10vw,148px); left:50%; bottom:9%; transform:translateX(-50%); overflow:hidden; border:5px solid white; border-radius:6px 6px 28px 28px; background:#abcad886; box-shadow:0 6px 15px #424a6026; }
.arena-milk { position:absolute; bottom:0; width:100%; height:calc(8% + var(--progress)*92%); background:#fff8df; border-top:5px solid white; transition:height .6s; }
.arena-milk-cup img { position:absolute; inset:20% 15%; width:70%; height:60%; }
.arena-milk-can { bottom:11%; left:50%; height:60%; width:clamp(84px,9vw,134px); transform:translateX(-50%); }
.arena-can-body,.arena-lid { position:absolute; width:100%; border-radius:16% / 8%; }
.arena-can-body { inset:0; background:linear-gradient(90deg,#6865ae,#a49bdf 42%,#7772bb); border-block:6px solid #e9ddbc; overflow:hidden; }
.arena-lid { height:12%; background:#faf4dc; top:calc(-3% - var(--progress)*19%); transform:rotate(calc(var(--progress)*-14deg)); transition:.7s; }
.arena-sparkles { position:absolute; bottom:calc(95% + var(--progress)*14%); color:#85611f; font-size:clamp(17px,2.1vw,38px); white-space:nowrap; opacity:calc(.3 + var(--progress)); }
.arena-running .arena-sparkles { animation:arena-glow .7s infinite alternate; }
@keyframes arena-glow { to { transform:translateY(-8px); opacity:.5; } }
.arena-seedling { left:39%; bottom:10%; font-size:clamp(76px,11vw,160px); line-height:1; transform:scale(calc(.45 + var(--progress)*.55)); transform-origin:bottom; transition:transform .7s; }
.arena-watering-can { width:60px; height:43px; background:#6d84ac; top:22%; left:58%; border-radius:5px 5px 14px 14px; transform:rotate(-18deg); }
.arena-watering-can::before { content:""; position:absolute; left:-24px; width:29px; height:12px; background:#6d84ac; transform:rotate(22deg); }
.arena-watering-can::after { content:""; position:absolute; right:-14px; width:20px; height:25px; border:5px solid #6d84ac; border-radius:50%; }
.arena-running .arena-watering-can { animation:arena-pour .9s infinite alternate; }
@keyframes arena-pour { to { transform:rotate(-32deg); } }
.arena aside { display:flex; flex-direction:column; gap:16px; min-width:0; }
.arena-scan-card { justify-content:flex-start; background:#e1dbff; }
.arena-join-code { width:clamp(90px,9vw,170px); aspect-ratio:1; object-fit:contain; background:white; border-radius:12px; padding:5px; }
.arena h2 { font-size:clamp(20px,2vw,34px); }
.arena h3 { font-size:clamp(18px,1.6vw,28px); }
.arena ol,.arena ul { list-style:none; padding:0; margin:10px 0 0; overflow-y:auto; }
.arena-standings { max-height:40vh; }
.arena-prizes ul { max-height:47vh; }
.arena li { display:grid; align-items:center; gap:8px; padding:.5em 0; border-bottom:1px solid #e7e7f0; overflow-wrap:anywhere; }
.arena-standings li { grid-template-columns:2em minmax(4em,1fr) 1.6fr auto; font-size:clamp(16px,1.45vw,28px); }
.arena-standings li span:first-child { font-weight:750; color:#6856a7; }
.arena-standings li span:last-child { white-space:nowrap; }
.arena-prizes li { grid-template-columns:auto 1fr; }
.arena-prizes li span:first-child { color:#71542b; background:#fcf1d4; border-radius:5px; padding:2px 7px; }
.arena-prizes li span:nth-child(3) { grid-column:2; font-size:.9em; color:var(--muted); }
.arena li:has(span:only-child) { display:block; color:var(--muted); }
.arena [hidden] { display:none!important; }
.arena [role=status] { color:#815624; margin-top:10px; }
@media(max-width:720px){ .arena-grid { grid-template-columns:1fr; } .arena h1 { font-size:32px; } }

.arena .arena-challenger { bottom:27%; font-size:clamp(36px,5.3vw,84px); left:calc(2% + var(--progress)*65%); filter:saturate(.65); animation-delay:-.15s; }
.arena-scan-card button { margin-top:8px; padding:.4em .8em; color:#33418b; background:white; border:1px solid #c8c1e9; border-radius:6px; cursor:pointer; }

.arena-milk-can::before { content:""; position:absolute; bottom:93%; left:12%; width:75%; height:calc(5% + var(--progress)*24%); background:#fff9df; border-radius:45% 65% 20% 20%; transition:height .6s; }
.arena-running .arena-watering-can::before { box-shadow:-8px 14px 0 -4px #6fbcdd,-15px 24px 0 -4px #95cfe8; }
@media(min-width:721px) {
  .arena { height:100vh; display:flex; flex-direction:column; }
  .arena-grid { flex:1; min-height:0; }
  .arena-race-stage,.arena-prizes { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
  .arena-race-scene { flex-shrink:0; }
  .arena-grid aside { min-height:0; }
  .arena-prizes { flex:1; }
  .arena .arena-standings,.arena .arena-prizes ul { min-height:0; max-height:none; overflow:auto; scrollbar-width:thin; }
}
