.tier-list-hero{
    max-width:900px;
    margin:0 auto;
}
.tier-list-panel{
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015));
    box-shadow:0 18px 40px rgba(0,0,0,.22);
    backdrop-filter:blur(8px);
}
.tier-list-topbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
}
.tier-list-mini-note{
    font-size:.92rem;
    color:rgba(255,255,255,.66);
}
.tier-list-legend{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:10px;
}
.tier-list-legend-item{
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    background:rgba(255,255,255,.025);
    padding:10px;
    text-align:center;
    font-weight:800;
    font-size:.95rem;
}
.tier-list-empty{
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    background:rgba(255,255,255,.02);
}
.tier-row{
    display:grid;
    grid-template-columns:68px 1fr;
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    overflow:visible;
    margin-bottom:16px;
    background:rgba(255,255,255,.018);
}
.tier-row-label{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.55rem;
    font-weight:900;
    letter-spacing:.03em;
    color:#111;
    min-height:100%;
}
.tier-label-s{background:#ff7f7f;}
.tier-label-a{background:#ffa763;}
.tier-label-b{background:#f6df73;}
.tier-label-c{background:#bfe26b;}
.tier-label-d{background:#73d0ff;}
.tier-label-f{background:#9ca3af;}

.tier-row-content{
    padding:14px 14px 12px;
}
.tier-row-s{background:rgba(255,127,127,.06);}
.tier-row-a{background:rgba(255,167,99,.05);}
.tier-row-b{background:rgba(246,223,115,.05);}
.tier-row-c{background:rgba(191,226,107,.05);}
.tier-row-d{background:rgba(115,208,255,.05);}
.tier-row-f{background:rgba(156,163,175,.05);}

.tier-row-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:12px;
}
.tier-row-title{
    font-weight:800;
    font-size:1.02rem;
}
.tier-row-count{
    font-size:.82rem;
    color:rgba(255,255,255,.62);
}
.tier-chip-grid{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.tier-chip{
    width:88px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    background:rgba(255,255,255,.03);
    padding:6px 6px 7px;
    text-align:center;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
    position:relative;
}
.tier-chip:hover{
    transform:translateY(-2px);
    border-color:rgba(255,193,7,.35);
    box-shadow:0 10px 18px rgba(0,0,0,.18);
}
.tier-chip img{
    width:100%;
    max-width:56px;
    height:auto;
    display:block;
    margin:0 auto 4px;
    filter:none !important;
}
.tier-chip-name{
    font-size:.68rem;
    line-height:1.15;
    color:rgba(255,255,255,.9);
    min-height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.tier-chip-score{
    margin-top:4px;
    font-size:.62rem;
    font-weight:800;
    color:rgba(255,255,255,.72);
}
.tier-chip-reason{
    display:none;
    position:absolute;
    left:50%;
    bottom:calc(100% + 8px);
    transform:translateX(-50%);
    width:180px;
    padding:10px;
    border-radius:12px;
    background:#1f2430;
    border:1px solid rgba(255,255,255,.09);
    box-shadow:0 16px 30px rgba(0,0,0,.3);
    z-index:9999;
    text-align:left;
}
.tier-chip:hover .tier-chip-reason{
    display:block;
}
.tier-chip-reason strong{
    display:block;
    margin-bottom:4px;
    font-size:.74rem;
}
.tier-chip-reason div{
    font-size:.72rem;
    line-height:1.35;
    color:rgba(255,255,255,.78);
}

/* Light mode fixes */
body.light-mode .tier-list-panel,
body.light-mode .tier-list-empty{
    background:#fff;
    border-color:#e5e7eb;
    box-shadow:0 10px 24px rgba(0,0,0,.08);
}

body.light-mode .tier-list-mini-note,
body.light-mode .tier-row-count,
body.light-mode .tier-chip-score{
    color:#6b7280;
}

body.light-mode .tier-list-legend-item,
body.light-mode .tier-chip{
    background:#fff;
    border-color:#e5e7eb;
    color:#111827;
}

body.light-mode .tier-row{
    border-color:#e5e7eb;
}

body.light-mode .tier-row-s{background:rgba(255,127,127,.08);}
body.light-mode .tier-row-a{background:rgba(255,167,99,.08);}
body.light-mode .tier-row-b{background:rgba(246,223,115,.10);}
body.light-mode .tier-row-c{background:rgba(191,226,107,.10);}
body.light-mode .tier-row-d{background:rgba(115,208,255,.10);}
body.light-mode .tier-row-f{background:rgba(156,163,175,.10);}

body.light-mode .tier-row-title,
body.light-mode .tier-chip-name{
    color:#111827;
}

body.light-mode .tier-chip-reason{
    background:#fff;
    border-color:#d1d5db;
    box-shadow:0 12px 24px rgba(0,0,0,.12);
}

body.light-mode .tier-chip-reason strong,
body.light-mode .tier-chip-reason div{
    color:#111827;
}

@media (max-width:991.98px){
    .tier-list-legend{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}
@media (max-width:575.98px){
    .tier-row{
        grid-template-columns:50px 1fr;
    }
    .tier-row-label{
        font-size:1.1rem;
    }
    .tier-chip-grid{
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:8px;
    }
    .tier-chip{
        width:100%;
        padding:6px 4px 7px;
    }
    .tier-chip img{
        max-width:44px;
    }
    .tier-chip-name{
        font-size:.62rem;
        min-height:24px;
    }
    .tier-chip-score{
        font-size:.58rem;
    }
    .tier-list-legend{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
