/* Account records and rankings use bounded dialogs with scrolling lists. */
#record-screen { display:flex; align-items:center; justify-content:center; overflow:hidden; color:#edf1f6; }
#record-screen .record-dialog { display:flex; flex-direction:column; width:min(880px,100%); max-height:100%; min-height:0; min-width:0; overflow:hidden; border:1px solid #526077; border-top:2px solid #d6c18f; border-radius:18px; background:linear-gradient(135deg,#1b283b,#121d2d 75%); box-shadow:0 28px 90px #0009; }
#record-screen .record-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 24px 16px; border-bottom:1px solid #304057; flex-shrink:0; }
#record-screen h2 { font-size:24px; margin:0; }
#record-screen .record-header p { font-size:12px; color:#a7b5c9; margin:5px 0 0; overflow-wrap:anywhere; }
#record-screen button { background:#192638; border:1px solid #35445a; border-radius:8px; color:#edf1f6; min-height:36px; }
#record-screen .record-close { width:38px; height:38px; padding:0; font-size:25px; flex-shrink:0; }
#record-screen .record-body { flex:0 1 auto; min-height:0; padding:18px 24px; overscroll-behavior:contain; }
#record-screen .record-sum { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px 24px; padding:16px 18px; border-color:#35445a; background:#0f1928; border-radius:10px; color:#a7b5c9; }
#record-screen .record-sum span { min-width:0; }
#record-screen .record-sum small { display:block; font-size:11px; margin-bottom:5px; }
#record-screen .record-sum b { color:#d6c18f; font-size:20px; }
#record-screen .record-body h3 { margin:20px 0 8px; font-size:12px; color:#a7b5c9; }
#record-screen .record-list { gap:0; }
#record-screen .record-row { grid-template-columns:minmax(0,1fr) 90px 48px 90px; padding:12px 0; border:0; border-bottom:1px solid #304057; border-radius:0; background:transparent; gap:12px; }
#record-screen .rr-name { white-space:normal; overflow-wrap:anywhere; line-height:1.6; }
#record-screen .rr-rate { color:#d6c18f; }
#record-screen .rr-bar i { background:linear-gradient(90deg,#897344,#d6c18f); }
#record-screen .record-footer { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 24px; border-top:1px solid #304057; flex-shrink:0; background:#111c2b; }
#record-screen .record-footer p { color:#a7b5c9; font-size:11px; line-height:1.7; margin:0; min-width:0; }
#record-screen #btn-record-reset { color:#efa5ae; font-size:12px; padding:6px 12px; flex-shrink:0; }
#record-screen button:focus-visible { outline:2px solid #d6c18f; outline-offset:2px; }
#modal-shell:has(.leaderboard-dialog) { width:720px; }
.leaderboard-dialog #lb-season { color:#a7b5c9; font-size:12px; margin:5px 0 0; }
.leaderboard-dialog .lb-tabs { display:flex; gap:8px; padding:0 24px 16px; flex-shrink:0; }
#modal-box .leaderboard-dialog .lb-tabs button { flex:1; min-width:0; padding:10px; min-height:38px; background:#0f1928; border:1px solid #35445a; border-radius:8px; color:#edf1f6; font-weight:bold; }
#modal-box .leaderboard-dialog .lb-tabs button[aria-pressed=true] { border-color:#d6c18f; color:#d6c18f; background:#d6c18f12; }
.leaderboard-dialog .lb-tabs small { font-size:11px; font-weight:normal; margin-left:5px; }
.lb-content { min-height:0; overflow:auto; padding:0 24px 20px; overscroll-behavior:contain; }
.lb-row { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:12px; padding:13px 8px; border-top:1px solid #304057; font-size:13px; }
.lb-row.is-me { background:#d6c18f0c; box-shadow:inset 2px 0 #d6c18f; }
.lb-position { color:#d6c18f; text-align:center; font-weight:bold; }
.lb-player { min-width:0; }
.lb-player strong { display:block; overflow-wrap:anywhere; }
.lb-player>span { display:flex; align-items:center; gap:4px; color:#a7b5c9; font-size:11px; margin-top:5px; }
.lb-score { text-align:right; white-space:nowrap; }
.lb-score b { display:block; color:#edf1f6; }
.lb-score small { color:#a7b5c9; font-size:11px; font-weight:normal; }
.lb-empty { margin:12px 0; padding:12px 0; font-size:13px; color:#a7b5c9; line-height:1.7; }
@media(max-width:680px) {
  #record-screen { padding:12px 14px calc(var(--legal-h,90px) + 12px); }
  #record-screen .record-header { padding:14px 16px; }
  #record-screen h2 { font-size:21px; }
  #record-screen .record-body { padding:14px 16px; }
  #record-screen .record-sum { gap:10px; padding:12px; }
  #record-screen .record-sum b { font-size:16px; }
  #record-screen .record-row { grid-template-columns:minmax(0,1fr) 70px 40px; gap:8px; font-size:12px; }
  #record-screen .rr-bar { display:none; }
  #record-screen .record-footer { padding:12px 16px; gap:10px; }
  #record-screen .record-footer p { font-size:10px; }
  #record-screen #btn-record-reset { padding:5px 8px; font-size:11px; }
  .leaderboard-dialog .lb-tabs { padding:0 16px 12px; }
  .lb-content { padding:0 16px 16px; }
  .lb-row { gap:8px; grid-template-columns:24px minmax(0,1fr) auto; padding:11px 4px; font-size:12px; }
}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px) {
  #record-screen { padding:8px 24px calc(var(--legal-h,0px) + 8px); }
  #record-screen .record-header { padding:8px 16px; }
  #record-screen h2 { font-size:19px; }
  #record-screen .record-header p { margin-top:2px; font-size:10px; }
  #record-screen .record-close { height:32px; min-height:32px; width:32px; }
  #record-screen .record-body { padding:10px 16px; }
  #record-screen .record-sum { padding:8px 12px; margin-bottom:8px; }
  #record-screen .record-sum b { font-size:16px; }
  #record-screen .record-body h3 { margin-top:10px; }
  #record-screen .record-row { padding:7px 0; font-size:11px; }
  #record-screen .record-footer { padding:8px 16px; }
  #record-screen .record-footer p { font-size:10px; }
  .leaderboard-dialog .lb-tabs { padding:0 16px 8px; }
  #modal-box .leaderboard-dialog .lb-tabs button { padding:6px; min-height:32px; }
  .lb-content { padding:0 16px 12px; }
  .lb-row { padding:7px 4px; font-size:12px; }
}
