/* One ranking layout for every maintained game (docs/ui_design_principles.md):
   back to the game top-left, title and rule, today / yesterday, the player's
   own place, the list, one solid action, then quiet links. */
*{box-sizing:border-box}
body{margin:0;background:#f5f9fb;color:#163943;font:16px/1.5 system-ui,-apple-system,"Noto Sans TC",sans-serif}
main.rank-page{display:flex;flex-direction:column;max-width:520px;min-height:100dvh;margin:auto;padding:12px 16px 16px}
.rank-page h1{margin:8px 0 0;font-size:24px;line-height:1.3}
.rank-rule{margin:4px 0 0;font-size:13px;color:#52727b}
.rank-controls{display:flex;gap:8px;align-items:center;margin-top:14px}
.rank-tabs{display:flex;flex:1;min-width:0;border:1px solid #abdfee;border-radius:12px;overflow:hidden;background:#fff}
.rank-tabs>*{flex:1;display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:0 8px;border:0;border-radius:0;background:#fff;color:#52727b;font:inherit;font-size:15px;font-weight:400;text-decoration:none;cursor:pointer}
.rank-tabs>[aria-pressed=true],.rank-tabs>[aria-current=page]{background:#dff3fa;color:#163943;font-weight:700}
.rank-select{min-height:44px;max-width:45%;padding:0 10px;border:1px solid #abdfee;border-radius:12px;background:#fff;color:#163943;font:inherit;font-size:14px}
.rank-chips{display:flex;gap:8px;margin-top:8px}
.rank-chips button{flex:1;min-height:40px;margin:0;padding:0 6px;border:1px solid #abdfee;border-radius:20px;background:#fff;color:#52727b;font:inherit;font-size:14px;font-weight:400;cursor:pointer}
.rank-chips button[aria-pressed=true]{border-color:#087f9c;color:#087f9c;font-weight:700}
.rank-own{margin-top:14px;padding:12px 14px;border-radius:12px;background:#dff3fa;font-size:15px;font-weight:700;overflow-wrap:anywhere}
.rank-own:empty{display:none}
.rank-list{list-style:none;margin:8px 0 0;padding:0}
.rank-list>li,.rank-list>.rank-row{display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 0;border-bottom:1px solid #d6edf4;font-size:15px}
.rank-list>li>:first-child,.rank-list>.rank-row>:first-child{flex:none;width:34px;font-weight:700}
.rank-list>li>:nth-child(2),.rank-list>.rank-row>:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.rank-list>li>:last-child,.rank-list>.rank-row>:last-child{flex:none;text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.rank-list small{display:block;font-size:12px;font-weight:400;color:#52727b}
.rank-list>li[data-own=true],.rank-list>.rank-own-row{margin:0 -10px;padding-left:10px;padding-right:10px;border-radius:12px;background:#eef8fc}
.rank-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;margin:4px 0 0;font-size:13px;color:#52727b}
.rank-meta-actions{display:inline-flex;gap:16px}
.rank-quiet{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:0;border:0;background:none;color:#52727b;font:inherit;font-size:13px;font-weight:400;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.rank-quiet:disabled{opacity:.45;cursor:default;text-decoration:none}
.rank-spacer{flex:1;min-height:12px}
.rank-primary{display:flex;align-items:center;justify-content:center;width:100%;min-height:58px;margin:0;padding:0 16px;border:0;border-radius:14px;background:#087f9c;color:#fff;font:inherit;font-size:17px;font-weight:700;text-align:center;text-decoration:none;cursor:pointer}
.rank-primary:disabled{opacity:.5;cursor:default}
.rank-primary[hidden],.rank-quiet[hidden],.rank-own[hidden]{display:none}
.rank-share-status{margin:6px 0 0;font-size:13px;color:#52727b;text-align:center;overflow-wrap:anywhere}
.rank-share-status:empty{display:none}
.rank-footer{display:flex;flex-wrap:wrap;justify-content:center;gap:0 20px;margin-top:6px}
.rank-page a:focus-visible,.rank-page button:focus-visible,.rank-page select:focus-visible,.rank-page input:focus-visible{outline:3px solid #087f9c;outline-offset:2px}
.rank-page .game-share-fallback,.rank-page .game-share-status{margin:6px 0 0;font-size:13px;color:#52727b;text-align:center;overflow-wrap:anywhere}
