:root{
  --bg:#0b1118;
  --bg-top:#0e151e;
  --panel:#111923;
  --panel-2:#151e29;
  --panel-3:#1a2634;
  --line:#1c2834;
  --line-2:#263443;
  --text:#edf3f8;
  --muted:#77889b;
  --muted-2:#5d6e81;
  --shadow:0 20px 55px rgba(0,0,0,.34);
  --gold:#f2c94c;
  --silver:#d2d8df;
  --bronze:#c98349;
}

*{box-sizing:border-box}
html,body{min-height:100%;background:var(--bg)}
body{
  margin:0;
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:
    radial-gradient(900px 380px at 50% -130px,rgba(92,121,149,.11),transparent 70%),
    linear-gradient(180deg,#0d141c 0%,#0a1017 100%);
}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
button{color:inherit}
.hidden{display:none!important}

.site-shell{width:min(1085px,calc(100vw - 30px));margin:0 auto;padding:25px 0 55px}

/* Header — deliberately compact like the supplied reference screenshot. */
.navbar{
  height:51px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 12px 0 14px;
  border:1px solid #1a2632;
  border-radius:12px;
  background:linear-gradient(180deg,#111923 0%,#101720 100%);
  box-shadow:0 8px 24px rgba(0,0,0,.2);
}
.brand{width:205px;display:flex;align-items:center;flex:0 0 205px}
.brand-logo{width:100px;height:33px;object-fit:contain;object-position:left center;filter:drop-shadow(0 3px 5px rgba(0,0,0,.3))}
.main-nav{height:100%;display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0}
.nav-link{
  height:33px;display:flex;align-items:center;gap:7px;padding:7px 9px;border-radius:8px;
  color:#68778a;font-size:13px;font-weight:700;white-space:nowrap;transition:.15s ease;
}
.nav-link:hover{color:#dfe7ef;background:rgba(255,255,255,.035)}
.nav-link.active{color:#dfe7ef}
.nav-icon{font-size:17px;line-height:1;color:currentColor}
.caret{font-size:15px;color:#7c8ca0;margin-left:-2px}
.search-wrap{position:relative;width:182px;flex:0 0 182px}
.search-box{height:33px;display:flex;align-items:center;gap:7px;padding:0 7px;border:1px solid #1d2936;border-radius:11px;background:#1a2430}
.search-symbol{font-size:18px;line-height:1;color:#77879a;transform:rotate(-20deg)}
#playerSearch{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#e3eaf1;font-size:12px}
#playerSearch::placeholder{color:#69798c}
.shortcut{width:21px;height:21px;display:grid;place-items:center;border-radius:6px;background:#222c38;color:#8b98a8;font-size:11px;font-weight:800}
.search-menu{position:absolute;z-index:100;left:0;right:0;top:40px;overflow:hidden;border:1px solid #263341;border-radius:10px;background:#141e28;box-shadow:0 18px 45px rgba(0,0,0,.4)}
.search-result{width:100%;display:flex;justify-content:space-between;gap:12px;padding:10px 11px;border:0;background:transparent;text-align:left;cursor:pointer}
.search-result:hover{background:#1a2733}
.search-result span{font-size:12px;font-weight:800}.search-result small{font-size:10px;color:var(--muted)}
.search-none{padding:11px;color:var(--muted);font-size:11px}

main{margin-top:42px}

/* Gamemode strip — icon and label are always rendered, including Overall. */
.mode-tabs{
  height:48px;display:flex;align-items:stretch;overflow-x:auto;scrollbar-width:none;
  border-bottom:1px solid #1f2a36;
}
.mode-tabs::-webkit-scrollbar{display:none}
.mode-tab{
  position:relative;min-width:98px;height:48px;flex:1 0 98px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:#627184;border:1px solid transparent;border-bottom-color:#1f2a36;border-radius:9px 9px 0 0;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.mode-tab:hover{color:#cfd9e2;background:rgba(255,255,255,.014)}
.mode-tab.selected{color:#eef4f8;border-color:#202d3a;border-bottom-color:#d3dbe3;background:linear-gradient(180deg,#151f2b 0%,#111923 100%)}
.mode-icon{width:22px;height:22px;display:grid;place-items:center}
.mode-icon img{display:block;width:21px;height:21px;object-fit:contain}
.emoji-icon{font-size:19px;line-height:1;filter:saturate(.9)}
.mode-label{font-size:11px;line-height:1;font-weight:800;letter-spacing:-.01em;white-space:nowrap}

.subbar{height:56px;display:flex;align-items:center;justify-content:flex-end;gap:17px;padding:0 14px;border:1px solid #1f2b37;border-top:0;border-radius:0 0 12px 12px;background:#121a23}
.info-pill{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 10px;border:1px solid #293747;border-radius:8px;background:#202b38;font-size:11px;font-weight:800;cursor:pointer}
.info-pill:hover{background:#253342}
.info-icon{width:15px;height:15px;display:grid;place-items:center;border:1px solid #b8c4d0;border-radius:50%;font-size:10px;color:#e8edf2}
.server-meta{display:flex;align-items:center;gap:9px}
.server-copy{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05}
.server-label{font-size:9px;font-weight:900;color:#76879a;letter-spacing:.04em}
.server-copy strong{font-size:12px;color:#dce5ed;margin-top:2px}
.server-status{width:20px;height:20px;display:grid;place-items:center;border-radius:6px;background:#1d3855;color:#64a8ff;font-size:8px}

.info-popover{position:fixed;z-index:120;top:135px;right:max(24px,calc((100vw - 1085px)/2 + 124px));width:250px;padding:13px;border:1px solid #263442;border-radius:11px;background:#121b24;box-shadow:0 20px 55px rgba(0,0,0,.45)}
.info-popover strong{font-size:13px}.info-popover p{margin:7px 0 10px;color:var(--muted);font-size:11px;line-height:1.5}.info-row{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid #202b36;color:#afbdca;font-size:11px}.info-row code{color:#d9e3ec}

.page-alert{margin-top:13px;padding:11px 12px;border:1px solid #57363a;border-radius:9px;background:#241719;color:#e4b9bb;font-size:11px}

/* Overall board: this mirrors the original Ryneth layout, including mode icons in each player row. */
.card{border:1px solid #1c2834;border-radius:12px;background:#121a23;box-shadow:0 16px 38px rgba(0,0,0,.15);overflow:hidden}
.table-head,.row{display:grid;grid-template-columns:84px 1.4fr 130px 1.1fr;align-items:center}
.table-head{min-height:43px;padding:0 14px;border-bottom:1px solid #1e2a36;background:#151e28}
.th{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:#738399}
.table-body{display:flex;flex-direction:column}
.row{min-height:73px;padding:12px 14px;border-bottom:1px solid #192530;background:#111923;cursor:pointer;outline:none;transition:background .14s ease,transform .14s ease}
.row:last-child{border-bottom:0}
.row:hover{background:#17222d}
.row:focus-visible{box-shadow:inset 0 0 0 2px rgba(117,157,197,.45)}
.rank-badge{width:58px;height:44px;display:grid;place-items:center;border-radius:12px;border:1px solid #2a3948;background:linear-gradient(180deg,#203040 0%,#1a2632 100%);font-size:16px;font-weight:900;color:#e6edf3}
.rank-1{background:linear-gradient(180deg,#554722 0%,#463a1b 100%);border-color:#6a5826;color:#f2d171}
.rank-2{background:linear-gradient(180deg,#454e59 0%,#39414b 100%);color:#dbe1e7}
.rank-3{background:linear-gradient(180deg,#4d3526 0%,#402a20 100%);color:#d99a60}
.player{display:flex;align-items:center;gap:12px;min-width:0}
.avatar{width:42px;height:42px;overflow:hidden;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(255,255,255,.09);border-radius:7px;background:#26313d}
.avatar img{display:block;width:100%;height:100%;object-fit:cover;image-rendering:auto}
.player-meta{min-width:0}.player-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:850;letter-spacing:-.01em}.player-sub{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#718297;font-size:10px;font-weight:700}
.region-pill{display:inline-flex;align-items:center;justify-content:center;min-width:42px;width:max-content;padding:6px 9px;border:1px solid #2a3b4d;border-radius:8px;background:#182431;color:#9db2c7;font-size:10px;font-weight:900;letter-spacing:.04em}
.col-tiers{min-width:0}.tiers{display:flex;align-items:flex-start;gap:10px;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#415166 transparent;touch-action:pan-x}.tiers::-webkit-scrollbar{height:4px}.tiers::-webkit-scrollbar-track{background:transparent}.tiers::-webkit-scrollbar-thumb{background:#415166;border-radius:999px}
.tier-slot{width:46px;display:flex;flex-direction:column;align-items:center;gap:4px;flex:0 0 46px}.tier-icon{width:40px;height:40px;display:grid;place-items:center}.tier-icon img{display:block;width:32px;height:32px;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.28))}.tier-chip{min-width:42px;height:18px;display:grid;place-items:center;padding:0 6px;border-radius:5px;border:1px solid rgba(255,255,255,.07);font-size:9px;font-weight:900;line-height:1;color:#dfe7ef;background:#26313d}.tier-chip.t1{background:#4d411b;color:#f0ce6b}.tier-chip.t2{background:#3c4550;color:#d6dce3}.tier-chip.t3{background:#4a3022;color:#d89a61}.tier-chip.t4,.tier-chip.t5{background:#2a3540;color:#bdc8d3}.tier-chip.ht{box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}.tier-chip.lt{filter:brightness(.78)}
.tier-slot.overall .tier-icon{font-size:24px}.overall-none{padding-top:17px;color:#55667a;font-size:10px;font-weight:800}
.table-footer{display:flex;align-items:center;gap:10px;padding:12px 14px;border-top:1px solid #1a2530;background:#121a23}
.btn{height:32px;padding:0 12px;border:1px solid #2b3a49;border-radius:8px;background:#1b2733;color:#cbd5de;font-size:11px;font-weight:800;cursor:pointer}.btn:hover{background:#22313f}.muted{color:#627389;font-size:10px}
.empty-overall{padding:42px 18px;text-align:center;color:#5d6d80;font-size:11px}

/* Gamemode tier board */
.tierboard{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid #1c2834;border-radius:12px;overflow:hidden;background:#121a23}
.tier-column{min-width:0;border-right:1px solid #1f2c39}.tier-column:last-child{border-right:0}
.tier-head{height:47px;display:flex;align-items:center;justify-content:center;gap:6px;border-bottom:1px solid rgba(0,0,0,.24);font-size:18px;font-weight:900;letter-spacing:-.02em}
.tier-head.gold{background:linear-gradient(180deg,#54461f,#483918);color:#f0cd67}.tier-head.silver{background:linear-gradient(180deg,#3d4652,#343c47);color:#d1d8df}.tier-head.bronze{background:linear-gradient(180deg,#4e3223,#41291f);color:#d18b53}.tier-head.gray{background:linear-gradient(180deg,#1b2530,#19222c);color:#b9c4d0}.head-icon{font-size:20px;line-height:1}
.tier-body{min-height:152px;padding:1px 0 5px;background:#151e28}.tier-entries{display:flex;flex-direction:column}.tier-player{width:100%;height:30px;display:grid;grid-template-columns:24px minmax(0,1fr) 20px 18px;align-items:center;gap:5px;padding:0 6px 0 5px;border:0;border-bottom:1px solid #0b1117;text-align:left;cursor:pointer;transition:.12s ease}.tier-player.ht{background:linear-gradient(90deg,#707b87 0%,#626d79 100%);color:#f0f4f7}.tier-player.lt{background:linear-gradient(90deg,#242b34 0%,#1c2229 100%);color:#edf2f6}.tier-player:hover{filter:brightness(1.07);transform:translateX(1px)}.tier-player .player-avatar{width:22px;height:22px;min-width:22px;min-height:22px;border-radius:3px;overflow:hidden;display:block;position:relative;background:#26313d;border:1px solid rgba(255,255,255,.08)}.tier-player .player-avatar img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:cover;object-position:center 18%;overflow:hidden}.tier-player .player-name{font-size:12px}.tier-player .player-location{font-size:8px;color:rgba(236,243,248,.72);font-weight:900;text-align:right}.row-chevron{font-size:13px;color:#8299b0;transform:rotate(45deg);text-align:center}.empty-tier{height:54px;display:grid;place-items:center;color:#586a7d;font-size:10px;font-weight:800;text-transform:lowercase}.board-caption{padding:9px 1px;color:#607085;font-size:10px}
.loading-board .skeleton-block{height:47px;border-radius:0}.skeleton-stack{height:190px;background:linear-gradient(90deg,#151e28 25%,#1b2733 38%,#151e28 55%);background-size:300% 100%;animation:shimmer 1.2s infinite}

.modal-backdrop{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px;background:rgba(2,5,8,.72);backdrop-filter:blur(7px)}
.modal-card{position:relative;width:min(720px,100%);max-height:min(85vh,760px);overflow:auto;padding:20px;border:1px solid #293743;border-radius:15px;background:#121b25;box-shadow:0 28px 80px rgba(0,0,0,.52)}
.modal-close{position:absolute;right:12px;top:11px;width:30px;height:30px;border:0;border-radius:8px;background:#1a2631;color:#a9b6c4;font-size:20px;cursor:pointer}.modal-close:hover{background:#22303c}
.profile-hero{display:flex;align-items:center;gap:15px;padding:5px 4px 18px;border-bottom:1px solid #202c37}.profile-skin{width:82px;height:82px;display:grid;place-items:center;overflow:hidden;border:1px solid #293744;border-radius:9px;background:#1a2430}.profile-skin img{width:100%;height:100%;object-fit:cover}.profile-rank{font-size:10px;font-weight:800;color:#8da0b3}.profile-hero h2{margin:2px 0 4px;font-size:23px}.profile-meta{font-size:11px;color:#718196}.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:14px}.profile-mode{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:10px;border:1px solid #202c38;border-radius:9px;background:#151f29}.profile-mode-name{font-size:11px;font-weight:800}.profile-current{font-size:12px;color:#d9e1e9}.profile-current.unranked{color:#5e6d7e}.profile-mode small{grid-column:1/-1;color:#637388;font-size:9px}.profile-error{display:flex;flex-direction:column;gap:7px;padding:28px 8px}.profile-error strong{font-size:13px}.profile-error span{font-size:11px;color:#7a899c}.profile-loading{display:flex;flex-direction:column;gap:11px}.avatar-xl{width:82px;height:82px;border-radius:10px}.skeleton-line{height:16px;width:52%;border-radius:7px;background:linear-gradient(90deg,#1a2430 25%,#22303d 38%,#1a2430 55%);background-size:300% 100%;animation:shimmer 1.2s infinite}.skeleton-line.short{width:32%}.skeleton-panel{height:190px;border-radius:10px;background:linear-gradient(90deg,#1a2430 25%,#22303d 38%,#1a2430 55%);background-size:300% 100%;animation:shimmer 1.2s infinite}.skeleton-block{background:linear-gradient(90deg,#1a2430 25%,#22303d 38%,#1a2430 55%);background-size:300% 100%;animation:shimmer 1.2s infinite}
@keyframes shimmer{to{background-position:-300% 0}}
.footer{display:flex;justify-content:center;gap:9px;margin-top:13px;color:#526276;font-size:10px}.footer a{color:#74859a}.footer-dot{color:#2e3b4b}

@media (max-width:900px){
  .site-shell{width:calc(100vw - 20px);padding-top:14px}.brand{width:140px;flex-basis:140px}.brand-logo{width:92px}.main-nav{gap:3px}.nav-link{padding:7px 7px;font-size:11px}.search-wrap{width:165px;flex-basis:165px}.mode-tab{min-width:91px;flex-basis:91px}
}

/* Phone layout: keep the original desktop structure, but make every section fit the viewport. */
@media (max-width:720px){
  .site-shell{width:calc(100vw - 16px);padding:9px 0 34px}
  .navbar{height:52px;min-height:52px;display:flex;flex-wrap:nowrap;gap:8px;padding:6px 8px;border-radius:11px}
  .brand{width:72px;flex:0 0 72px;min-width:72px}
  .brand-logo{width:64px;height:34px}
  .main-nav{order:0;display:flex;flex:0 0 auto;width:auto;height:36px;border:0;padding:0;gap:2px}
  .nav-link{height:32px;padding:6px 7px;font-size:10px;gap:4px}
  .nav-link span:not(.nav-icon):not(.caret){display:none}
  .nav-icon{font-size:15px}
  .search-wrap{width:auto;flex:1;min-width:0}
  .search-box{height:36px;border-radius:10px;padding:0 7px}
  #playerSearch{font-size:12px}
  .shortcut{display:none}

  main{margin-top:18px}
  .mode-tabs{height:84px;align-items:stretch;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:0 1px;border-bottom:1px solid #1f2a36}
  .mode-tab{height:84px;min-width:82px;flex:0 0 82px;scroll-snap-align:start;border-radius:10px 10px 0 0;gap:5px}
  .mode-icon{width:30px;height:30px}.mode-icon img{width:28px;height:28px}.emoji-icon{font-size:24px}.mode-label{font-size:11px}
  .mode-tab.selected{background:linear-gradient(180deg,#17222e 0%,#111923 100%);border-bottom-color:#d5dde5}

  .subbar{height:58px;padding:0 10px;gap:12px;border-radius:0 0 12px 12px}
  .info-pill{height:38px;padding:0 11px;font-size:11px}
  .server-meta{gap:7px}.server-copy strong{font-size:11px}.server-label{font-size:8px}.server-status{width:22px;height:22px}

  .card{border-radius:12px}
  .table-head{display:none}
  .row{grid-template-columns:52px minmax(0,1fr) 142px;column-gap:8px;min-height:76px;padding:10px 8px}
  .rank-badge{width:52px;height:52px;border-radius:12px;font-size:17px}
  .player{gap:9px;min-width:0}
  .avatar{width:42px;height:42px}
  .player-name{font-size:14px}.player-sub{font-size:9px;margin-top:3px}
  .col-region{display:none}
  .col-tiers{width:142px;min-width:0;overflow:hidden}.col-tiers .tiers{width:100%;padding-bottom:3px;overscroll-behavior-x:contain}
  .tiers{gap:3px;overflow-x:auto;overflow-y:hidden;justify-content:flex-start;scrollbar-width:thin;scrollbar-color:#415166 transparent;-webkit-overflow-scrolling:touch;touch-action:pan-x}.tiers::-webkit-scrollbar{height:3px}.tiers::-webkit-scrollbar-thumb{background:#415166;border-radius:999px}
  .tier-slot{width:34px;flex-basis:34px;gap:2px}
  .tier-icon{width:30px;height:30px}.tier-icon img{width:25px;height:25px}.tier-chip{min-width:32px;height:17px;padding:0 4px;font-size:8px}
  .overall-none{display:none}
  .table-footer{padding:10px}.btn{height:30px}

  /* Gamemode pages stay as five real columns and become a swipeable board on phones. */
  .tierboard{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;border-radius:12px;scrollbar-width:thin}
  .tier-column{width:78vw;min-width:78vw;flex:0 0 78vw;border-right:1px solid #1f2c39;scroll-snap-align:start}
  .tier-column:last-child{border-right:0}
  .tier-head{height:47px;font-size:17px}
  .tier-body{min-height:170px}
  .tier-player{height:34px;grid-template-columns:26px minmax(0,1fr) 22px 15px;padding:0 7px 0 6px;gap:5px}
  .tier-player .player-avatar{width:24px;height:24px;min-width:24px;min-height:24px}
  .tier-player .player-avatar img{width:100%;height:100%;object-fit:cover;object-position:50% 12%;transform:scale(.88);transform-origin:center top}
  .tier-player .player-name{font-size:11px}
  .tier-player .player-location{font-size:7px}.row-chevron{font-size:11px}
  .empty-tier{height:64px}
  .footer{margin-top:10px;font-size:9px}
  .info-popover{top:125px;right:8px;width:min(250px,calc(100vw - 24px))}
}

@media (max-width:430px){
  .site-shell{width:calc(100vw - 12px)}
  .brand{width:58px;flex-basis:58px;min-width:58px}.brand-logo{width:54px}
  .main-nav{gap:0}.nav-link{padding:6px 5px}.nav-icon{font-size:14px}
  .search-box{height:35px}.search-symbol{font-size:16px}
  .mode-tab{min-width:78px;flex-basis:78px}
  .subbar{gap:8px}.info-pill{padding:0 9px}.server-copy strong{font-size:10px}
  .row{grid-template-columns:48px minmax(0,1fr) 122px;column-gap:6px;padding-left:6px;padding-right:6px}
  .rank-badge{width:48px;height:50px}.avatar{width:40px;height:40px}.player{gap:7px}.player-name{font-size:13px}.player-sub{font-size:8px}
  .col-tiers{width:122px}.col-tiers .tiers{width:100%;padding-bottom:3px}.tier-slot{width:31px;flex-basis:31px}.tier-icon{width:27px;height:27px}.tier-icon img{width:23px;height:23px}.tier-chip{min-width:29px;font-size:7px;padding:0 3px}
  .tier-column{width:84vw;min-width:84vw}
}
