#rank-gallery-dialog{width:min(1060px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:20px;overflow:auto;background:#fff1d8;color:#173d38;border:4px solid #182a20;border-radius:24px 16px 28px 18px;box-shadow:0 7px 0 #d78926,0 20px 80px #0009}
#rank-gallery-dialog::backdrop{background:#071b17cb}
.rank-gallery-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
#rank-gallery-title{font:400 clamp(23px,3vw,32px)/1.2 var(--font-display);margin:0 0 6px;color:#173d38}
#rank-gallery-description{font-size:13px;margin:0;font-weight:800;color:#605539}
#rank-gallery-close{flex:none;width:46px;height:46px;border:3px solid #182a20;border-radius:12px 8px;background:#ffbf47;color:#182a20;font-size:28px;cursor:pointer;box-shadow:0 3px 0 #b96a1c}
.rank-level-step{display:grid;grid-template-columns:1fr auto;gap:9px 18px;border:2px solid #47652b;border-radius:12px 8px;padding:12px 16px;margin-bottom:18px;background:#e9efcf}
.rank-level-route{display:flex;align-items:center;gap:8px;font:400 22px/1.2 var(--font-display)}
.rank-level-route img{width:36px;height:36px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 0 #182a2020)}
.rank-level-route img[hidden]{display:none}
#rank-gallery-arrow{color:#7a843b}
#rank-gallery-goal{margin:0;font-size:12px;font-weight:900;align-self:center}
#rank-gallery-progress{grid-column:1/-1;width:100%;height:10px}
#rank-gallery-xp{grid-column:1/-1;text-align:right;margin:0;font-size:11px;color:#49603d;font-weight:800}
.rank-gallery-body{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:18px;align-items:stretch}
#rank-gallery-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#rank-gallery-dialog .rank-gallery-card{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px 5px;border:2px solid #b99458;border-radius:13px 8px 15px 9px;background:#f3e5cf;color:#173d38;box-shadow:0 3px 0 #c6ad83;cursor:pointer}
#rank-gallery-dialog .rank-gallery-card[data-status=owned],#rank-gallery-dialog .rank-gallery-card[data-status=current]{background:#e8efcf;border-color:#63833c;box-shadow:0 3px 0 #a2b77d}
#rank-gallery-dialog .rank-gallery-card[aria-pressed=true]{outline:3px solid #f19a23;outline-offset:2px}
.rank-gallery-card img{width:88px;height:88px;max-width:100%;object-fit:contain;filter:drop-shadow(0 3px 0 #182a2020)}
.rank-gallery-card strong{font:400 15px/1.2 var(--font-display);text-align:center}
.rank-gallery-card small{font-size:10px;font-weight:800;color:#655333}
.rank-card-status{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border-radius:6px;font-size:10px;font-weight:900;background:#ffdaa0;color:#6d420e}
[data-status=owned]>.rank-card-status,[data-status=current]>.rank-card-status{background:#c9dfa0;color:#284922}
#rank-gallery-preview{padding:18px 14px;border:3px solid #b78329;border-radius:18px 10px 22px 12px;text-align:center;background:#254936;color:#fff1d8;box-shadow:0 5px 0 #d78926;display:flex;flex-direction:column;align-items:center;justify-content:center}
#rank-gallery-preview[data-status=owned],#rank-gallery-preview[data-status=current]{border-color:#548637}
.rank-status{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:2px solid #50762f;border-radius:8px;padding:6px 11px;margin:0 0 12px;background:#d6ecaf;color:#284922;font-size:13px;font-weight:900}
.rank-status svg{display:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;flex:none}
[data-status=locked]>.rank-status{border-color:#9e681d;background:#ffe0a1;color:#71470f}
[data-status=locked]>.rank-status .rank-lock{display:block}
[data-status=owned]>.rank-status .rank-check,[data-status=current]>.rank-status .rank-check{display:block}
#rank-gallery-art{display:block;width:210px;max-width:100%;height:210px;object-fit:contain;margin:0 auto 14px;filter:drop-shadow(0 4px 0 #081d1640)}
#rank-gallery-name{font:400 25px/1.2 var(--font-display);margin:0 0 8px;color:#ffbf47}
#rank-gallery-level{font-size:12px;font-weight:900;margin:0;color:#fff1d8}
.rank-gallery-footer{display:flex;justify-content:flex-end;gap:12px;margin-top:16px;border-top:1px solid #ceae73;padding-top:12px}
#rank-gallery-profile{min-height:44px;padding:9px 14px;border:2px solid #182a20;border-radius:10px;background:#fff1d8;color:#173d38;font-weight:900;font-size:12px;cursor:pointer}
#rank-gallery-dialog button:focus-visible,.xp-rank-open:focus-visible,.xp-rank-link:focus-visible{outline:3px solid #f79726;outline-offset:4px}
.xp-home-discover{font-size:10px;font-weight:900;color:#ffcf66}
#player-profile-rank-open,#xp-reward-rank-open{display:block;padding:0;border:0;border-radius:10px;background:none;box-shadow:none;flex:none;cursor:pointer}
#xp-reward-rank-open img{display:block;width:100%;height:100%;object-fit:contain}
#player-profile-rank-open:hover,#xp-reward-rank-open:hover{filter:brightness(1.12)}
.xp-ranks li{display:block;padding:0!important}
.xp-ranks .xp-rank-link{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:12px;width:100%;min-height:88px;padding:10px 12px;border:0;border-radius:inherit;background:none;text-align:left;cursor:pointer;color:#173d38}
.xp-ranks img{filter:none;opacity:1}
.xp-ranks .xp-rank-link:hover{background:#ffd88555}
.xp-rank-status{display:inline-block;padding:3px 7px;margin-top:5px;border-radius:5px;background:#ffd995;color:#71470f;font-size:10px;font-weight:900}
.xp-ranks li[data-reached=true] .xp-rank-status{background:#d6ecaf;color:#284922}
@media(max-width:850px){.rank-gallery-body{grid-template-columns:minmax(0,1fr) 210px;gap:14px}#rank-gallery-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
#rank-gallery-dialog{padding:14px;max-height:calc(100dvh - 24px)}
.rank-gallery-head{position:sticky;top:0;z-index:2;background:#fff1d8;padding-bottom:8px;box-shadow:0 6px 0 #fff1d8;gap:10px}
#rank-gallery-title{font-size:23px}#rank-gallery-description{font-size:12px}
.rank-level-step{padding:12px;gap:8px;grid-template-columns:1fr}.rank-level-route{font-size:clamp(16px,4.8vw,20px);gap:4px}.rank-level-route img{width:clamp(26px,8vw,32px);height:clamp(26px,8vw,32px)}#rank-gallery-xp{text-align:left}
.rank-gallery-body{display:flex;flex-direction:column;gap:16px}
#rank-gallery-preview{order:-1;display:grid;grid-template-columns:88px minmax(0,1fr);gap:4px 12px;padding:12px;text-align:left}
#rank-gallery-art{grid-column:1;grid-row:1/4;width:88px;height:108px;margin:0}
.rank-status{grid-column:2;justify-self:start;font-size:11px;padding:4px 7px;margin-bottom:3px;gap:5px}.rank-status svg{width:15px;height:15px}
#rank-gallery-name{grid-column:2;font-size:19px;margin-bottom:3px}#rank-gallery-level{grid-column:2;font-size:11px}
.rank-gallery-footer{align-items:stretch;margin-top:16px;padding-top:12px}#rank-gallery-profile{width:100%}
.xp-ranks .xp-rank-link{grid-template-columns:58px minmax(0,1fr);padding:9px}
}
