/* Arena themes, completed-run results, replay controls and calendar leagues. */
.theme-picker{display:flex;justify-content:center;gap:10px;margin:16px auto 0}
.theme-picker button{display:grid;gap:5px;justify-items:center;min-width:92px;padding:7px 10px;border:1px solid #ffffff20;background:#12180f;color:#a7b39d;border-radius:14px;cursor:pointer;touch-action:manipulation;font:12px Arial}
.theme-picker button img{display:block;width:56px;height:56px;border-radius:50%;pointer-events:none}
.theme-picker button[aria-pressed=true]{border-color:var(--lime);color:var(--lime);background:#202b17}
.theme-picker button:focus-visible{outline:2px solid white;outline-offset:3px}
.mode-options{justify-content:center;margin-top:12px}.mode-options #arenaMode{flex:0 1 235px;min-height:48px;padding:9px 18px}
.map-quality-note{color:#a6b09e;font:12px/1.5 Arial;margin:10px 0 0}
#openRankings{position:absolute;top:calc(var(--safe-top,0px) + 22px);right:calc(var(--safe-right,0px) + 22px);display:flex;align-items:center;gap:9px;min-height:44px;padding:8px 13px;border:1px solid #ffffff24;border-radius:12px;background:#151b13;color:#c6f66b;font:13px Arial;cursor:pointer;touch-action:manipulation}
#result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
#modal{z-index:200}
#result strong{font-size:27px}#result span{font:11px Arial;color:#aeb5a8;display:block;margin-top:5px}
#hud{padding:9px 13px;border:1px solid #a0ad9030;border-radius:13px;background:#111a10db}#hud span{color:#bac8b0}#hud #rank{color:#f0f5e9}
#watchReplay{display:block;margin:0 auto 14px;padding:11px 16px;border:1px solid #c6f66b50;border-radius:12px;color:#c6f66b;background:#1c2517;font:13px Arial;cursor:pointer;touch-action:manipulation}
#watchReplay.hidden,#replayControls.hidden{display:none!important}
#replayControls{position:absolute;z-index:150;left:50%;bottom:calc(var(--safe-bottom,0px) + 18px);transform:translateX(-50%);width:min(380px,80vw);padding:12px 15px;background:#101710ed;border:1px solid #a0ad9040;border-radius:16px;color:#e8f0dc;box-shadow:0 8px 30px #0003}
.replay-heading{display:flex;gap:10px;align-items:center;justify-content:space-between;font:12px Arial}
#closeReplay{border:0;border-radius:8px;background:#28391c;color:#c6f66b;padding:10px;min-height:40px;font:12px Arial;cursor:pointer;touch-action:manipulation}
#replayProgress{display:block;width:100%;height:5px;margin-top:8px;accent-color:#c6f66b}
#rankingsPanel{position:fixed;z-index:15000;inset:0;display:grid;place-items:center;padding:calc(var(--safe-top,0px) + 16px) calc(var(--safe-right,0px) + 16px) calc(var(--safe-bottom,0px) + 16px) calc(var(--safe-left,0px) + 16px);background:#0009;font-family:Arial,sans-serif;color:#e5eadf;touch-action:pan-y}
#rankingsPanel[hidden]{display:none!important}
.rankings-card{display:flex;flex-direction:column;width:min(620px,100%);height:min(600px,calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 32px));min-height:0;padding:22px;border:1px solid #66745870;border-radius:20px;background:#121a11;box-shadow:0 24px 90px #0008}
.rankings-heading,.league-tabs,.league-footer,#yourLeague,#leagueStatus{flex-shrink:0}
.rankings-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.rankings-heading h2{font-size:23px;margin:0}
.league-tabs{display:flex;gap:7px;margin:17px 0 12px}.league-tabs button{flex:1;padding:12px 5px;min-height:44px;color:#a7b59d;border:1px solid #ffffff20;background:#1c2518;border-radius:9px;cursor:pointer;touch-action:manipulation}
.league-tabs button[aria-selected=true]{color:#c6f66b;border-color:#c6f66b;background:#28341b}
#yourLeague{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;font-size:13px}
.league-badge{display:inline-block;white-space:nowrap;border:1px solid currentColor;border-radius:8px;padding:5px 8px;font-size:10px;letter-spacing:.3px;background:#ffffff07}
.league-badge:before{content:'◆';margin-right:5px}.bronze{color:#d5a474}.silver{color:#d3dde0}.gold{color:#f5d471}.diamond{color:#91dbe9}
.league-table-wrap{overflow:auto;margin-top:12px;min-height:40px;touch-action:pan-y}
#leagueStandings{display:flex;flex-direction:column;min-height:0;flex:1}.league-table-wrap{min-height:0;flex:1}
.league-table-wrap table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;font-size:12px}
.league-table-wrap th{position:sticky;top:0;background:#121a11;color:#8a9b80;font-size:10px;font-weight:normal;padding:9px 5px}
.league-table-wrap th:first-child{width:46px}.league-table-wrap th:nth-child(2){width:30%}.league-table-wrap th:last-child{width:90px}
.league-table-wrap td{border-top:1px solid #ffffff10;padding:10px 5px;overflow-wrap:anywhere}.your-standing{background:#28351e}
#leagueStatus{font-size:13px;line-height:1.5;color:#b0bda6;margin:12px 0 0}#leagueStatus:empty{display:none}
.league-footer{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-top:14px;color:#84967b;font-size:11px;line-height:1.5}
#refreshRankings{min-height:44px;padding:9px 13px;background:#25341c;border:1px solid #687d52;border-radius:10px;color:#c6f66b;cursor:pointer;touch-action:manipulation}
@media(orientation:landscape) and (max-height:600px){
 .theme-picker{gap:7px;margin-top:8px}.theme-picker button{min-width:74px;padding:5px 8px;gap:3px;font-size:11px}.theme-picker button img{width:38px;height:38px}
 .mode-options{margin-top:5px}.mode-options #arenaMode{min-height:44px;padding:5px 12px;font-size:12px}.mode-options #arenaMode svg{width:24px;height:24px}
 #welcome .arena-logo{font-size:43px;line-height:.9;margin-bottom:8px}#welcome .arena-logo small{font-size:13px;letter-spacing:8px}
 #welcome #joinMessage{margin:5px 0;min-height:0;font-size:11px}
 #openRankings{top:calc(var(--safe-top,0px) + 14px);right:calc(var(--safe-right,0px) + 14px);font-size:11px;padding:6px 10px}
 #result{margin:12px 0}#result strong{font-size:23px}#watchReplay{margin-bottom:9px;padding:9px 14px}
 .modal-card{max-height:calc(100dvh - 24px);overflow:auto;padding:18px 24px}.modal-card h2{font-size:25px;margin:8px 0}.modal-card p{font-size:12px;margin:8px 0}.modal-card .eyebrow{font-size:10px}.modal-card .play-btn{min-height:43px;padding:10px 20px}.modal-card .text-btn{padding:9px}
 #replayControls{bottom:calc(var(--safe-bottom,0px) + 10px);padding:9px 12px}
 .rankings-card{padding:13px}.rankings-heading h2{font-size:19px}.league-tabs{margin:8px 0}.league-footer{margin-top:8px}.league-table-wrap{margin-top:5px}.league-table-wrap td{padding:7px 4px}
}
@media(max-width:620px){.league-table-wrap th:first-child{width:35px}.league-table-wrap th:nth-child(2){width:25%}.league-table-wrap th:last-child{width:74px}.league-badge{padding:5px;font-size:9px}.league-footer{font-size:10px}}
