/* V5 leaderboard controls and shared table styling. */
#view-leaderboard{display:block;margin:12px auto 0;padding:7px 12px;font-size:10px;background:transparent;color:#8fb8d1}
.leaderboard[hidden]{display:none}.leaderboard{margin-top:20px;padding:22px 28px;border:1px solid #29445e;background:#0a1727;color:#c4d8e8;max-width:760px;margin-inline:auto;scroll-margin-top:20px}.lb-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.lb-heading h2{font-size:23px;color:#7dd1ff;letter-spacing:2px;margin:6px 0}.lb-heading .eyebrow{font-size:10px;margin:0}.lb-close{font-size:10px;white-space:nowrap}.lb-status,.lb-error{font-size:12px;line-height:1.6}.lb-status{color:#88b5d1}.lb-error{color:#ffd188}.lb-form{padding:16px 0;border-top:1px solid #21394f}.lb-form h3{font-size:18px;color:#a5f7bd;margin:0 0 12px;animation:lb-appear .3s ease-out}.lb-form label{display:block;font-size:12px;margin-bottom:9px}.lb-form input{box-sizing:border-box;width:112px;padding:10px 12px;background:#07111f;border:1px solid #41b8ff;color:#e2f5ff;font:700 23px Consolas,monospace;letter-spacing:8px;text-transform:uppercase}.lb-form input:focus{outline:2px solid #f4ca65;outline-offset:2px}.lb-form button{margin-left:12px;vertical-align:top}.lb-form small{display:block;font-size:10px;color:#8fa6b9;margin-top:10px}.lb-table table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;font-size:15px}.lb-table th{text-align:left;font-size:10px;color:#769bb6;padding:9px 12px}.lb-table td{padding:8px 12px;border-top:1px solid #172e44}.lb-table th:last-child,.lb-table td:last-child{text-align:right}.lb-table td:first-child{color:#769bb6}.lb-current{background:#143750;color:#a5f7bd}.lb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@keyframes lb-appear{from{opacity:.4}to{opacity:1}}@media(prefers-reduced-motion:reduce){.lb-form h3{animation:none}}@media(max-width:800px){.leaderboard{padding:16px}.lb-heading h2{font-size:18px}#view-leaderboard{margin:7px auto 0;padding:5px;font-size:9px}.lb-table td{padding:7px 10px}}

/* Leaderboards live inside the fixed 16:9 game viewport. Container units keep
   the complete end panel proportional to the cabinet at every window size. */
.screen{container-type:inline-size}
.lb-dedicated{position:absolute;inset:0;z-index:2;max-width:none;margin:0;padding:4cqw 20cqw;border:0;background:#071426f5;display:flex;flex-direction:column;justify-content:center}
.lb-dedicated .lb-heading h2{font-size:2cqw;letter-spacing:.15cqw}
.lb-dedicated .lb-close{font-size:.9cqw;padding:1cqw}
.lb-dedicated .lb-status{font-size:1cqw;margin:1cqw 0}
.lb-dedicated .lb-table table{font-size:1.4cqw}
.lb-dedicated .lb-table th{font-size:.9cqw;padding:.7cqw 1cqw}
.lb-dedicated .lb-table td{padding:.7cqw 1cqw}
.gameover .end-panel{width:82%;font-size:1cqw}
.gameover .eyebrow{font-size:.85cqw;letter-spacing:.2cqw;margin:0}
.gameover h1{font-size:3.2cqw;letter-spacing:-.12cqw;margin:.5cqw 0}
.gameover .intro{font-size:1cqw;line-height:1.4;margin:.4cqw 0}
.gameover .final-results{grid-template-columns:repeat(5,1fr);gap:1cqw;font-size:.8cqw;margin:1cqw 0}
.gameover .final-results>div:nth-child(4){grid-column:auto}
.gameover .final-results strong{font-size:1.8cqw;margin-top:.3cqw}
.gameover .final-results small{font-size:.7cqw;margin-top:.2cqw}
.gameover .rank{font-size:.8cqw;margin:.7cqw 0}
.gameover .rank strong{font-size:1.6cqw;letter-spacing:.15cqw;margin-top:.25cqw}
.lb-end{width:70%;max-width:none;margin:.8cqw auto;padding:.7cqw 1.5cqw;border-color:#29445e;text-align:left}
.lb-end .lb-heading{justify-content:center;gap:0}
.lb-end .lb-heading h2{font-size:1.25cqw;letter-spacing:.15cqw;margin:0}
.lb-end .lb-status{font-size:.75cqw;line-height:1.4;text-align:center;margin:.35cqw 0}
.lb-end .lb-table table{font-size:1.05cqw}
.lb-end .lb-table th{font-size:.7cqw;padding:.3cqw .7cqw}
.lb-end .lb-table td{padding:.3cqw .7cqw}
.lb-end .lb-form{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:1cqw;padding:.6cqw 0 0;margin-top:.3cqw}
.lb-end .lb-form h3{font-size:1.05cqw;margin:0;grid-column:1;grid-row:1}
.lb-end .lb-form label{font-size:.7cqw;margin:.2cqw 0;grid-column:1;grid-row:2}
.lb-end .lb-form>div{grid-column:2;grid-row:1/3}
.lb-end .lb-form input{font-size:1.3cqw;letter-spacing:.4cqw;width:6cqw;padding:.45cqw .6cqw}
.lb-end button{font-size:.8cqw;padding:.65cqw;letter-spacing:.06cqw}
.lb-end .lb-form button{margin-left:.6cqw}
.lb-end .lb-form small{grid-column:1/3;font-size:.6cqw;margin-top:.3cqw}
.lb-end .lb-error{grid-column:1/3;font-size:.7cqw;line-height:1.3;margin:.25cqw 0 0;min-height:.9cqw}
.gameover .end-message{font-size:.8cqw;margin:.65cqw 0}
.gameover .primary{font-size:1.1cqw;min-width:22cqw;padding:.9cqw 2cqw;letter-spacing:.1cqw;box-shadow:0 .25cqw #167ab8}
.gameover .cta{font-size:.85cqw;margin-top:1cqw;letter-spacing:.07cqw;text-underline-offset:.3cqw}
