:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#e8edf3;background:#06080c;color-scheme:dark}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}.bar{height:52px;padding:0 18px;display:flex;align-items:center;gap:18px;background:#0d1219;border-bottom:1px solid #2a3442}.account-tools{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0}.bar strong{font-size:15px;white-space:nowrap}.library{color:#ffb4a8;text-decoration:none;min-height:48px;display:flex;align-items:center;white-space:nowrap}#sync{margin-left:auto;color:#a9b6c6;font-size:12px}button{min-height:48px;min-width:48px;border:0;border-radius:999px;padding:8px 16px;background:#ff5a4e;color:#2b0300;font:inherit;font-weight:650;cursor:pointer}button:disabled{opacity:.6;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #ffd9d3;outline-offset:3px}#game{display:block;width:100%;height:calc(100dvh - 52px);border:0;background:#06080c}#loading{position:absolute;top:52px;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center;background:#06080c;z-index:2}#loading h1{font-size:clamp(23px,4vw,34px);margin:0 0 8px}#loading p{color:#a9b6c6;line-height:1.5;margin:0 0 20px}#loading button{margin:6px}[hidden]{display:none!important}@media(max-width:620px){.bar{height:116px;padding:7px 12px;gap:4px 12px;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:48px 48px}.account-tools{grid-column:1 / -1;width:100%;margin-left:0}.bar strong{margin-right:0;min-width:0;white-space:normal;font-size:13px;line-height:1.2}#sync{order:3;margin-left:0;flex:1 1 30%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}#account{flex:none;order:5;min-height:48px;padding:5px 12px;font-size:12px}#game{height:calc(100dvh - 116px)}#loading{top:116px;padding:20px}}
/* While the game loads, a glimpse of the C-ramp behind the message. */
#loading{background:linear-gradient(rgba(6,8,12,.78),rgba(6,8,12,.9)),url('../../assets/roadster/poster.webp') center/cover no-repeat,#06080c}
/* The leaderboard (leaderboard.js): a Material 3 dialog over the game. */
button.tonal{background:#3a2522;color:#ffdad5}button.text{background:none;color:#ffb4a8;padding:8px 12px}button.icon{min-height:48px;width:48px;padding:0;background:none;color:#e8edf3;font-size:18px}
#leaderboard{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:20px 24px;border:0;border-radius:28px;background:#141a22;color:#e8edf3;box-shadow:0 8px 32px rgba(0,0,0,.5)}
#leaderboard::backdrop{background:rgba(0,0,0,.6)}
#leaderboard[open]{display:flex;flex-direction:column;gap:10px}
.board-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.board-head h2{margin:0;font-size:24px;font-weight:600}
.board-pick{display:flex;align-items:center;gap:10px;font-size:14px;color:#a9b6c6}
.board-pick select,#board-name{min-height:48px;padding:6px 12px;border:1px solid #5b6b80;border-radius:8px;background:#0d1219;color:#e8edf3;font:inherit;font-size:15px}
#board-status,#my-position,#board-account{margin:0;font-size:14px;color:#a9b6c6}#my-position{font-weight:650;color:#e8edf3}
.board-table{overflow:auto;min-height:120px;border-radius:16px;background:#0d1219;border:1px solid #2a3442}
.board-table table{width:100%;border-collapse:collapse;font-size:14px}
.board-table th{position:sticky;top:0;background:#1c2430;text-align:left;font-weight:650;padding:8px 10px;white-space:nowrap}
.board-table td{padding:8px 10px;border-top:1px solid #222b37;white-space:nowrap;font-variant-numeric:tabular-nums}.board-table td:nth-child(2){white-space:normal;word-break:break-word}
.board-table tr.own-score td{background:#3a2522;font-weight:650}
.board-account{display:grid;gap:8px;padding:12px 14px;border-radius:16px;background:#1c2430}
#board-name-label{display:flex;align-items:center;gap:10px;font-size:14px}#board-name{flex:1;min-width:0}
.board-actions{display:flex;flex-wrap:wrap;gap:8px}.board-actions:has(> :not([hidden])){min-height:40px}
.board-rules{margin:0;font-size:12px;line-height:1.45;color:#a9b6c6}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(max-width:620px){#boards{flex:none;order:4;min-height:48px;padding:5px 10px;font-size:14px}#boards .label{display:none}#leaderboard{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}.board-head h2{font-size:20px}.board-table th:nth-child(5),.board-table td:nth-child(5){display:none}}
/* Give the game its usable landscape height while retaining account controls. */
@media(max-height:500px) and (max-width:900px) and (orientation:landscape){
 .bar{height:52px;display:flex;padding:2px 10px;gap:8px;}
 .bar strong,#sync{display:none;}
 .account-tools{width:auto;margin-left:auto;gap:8px;}
 #game{height:calc(100dvh - 52px);}
 #loading{top:52px;}
}
