.ac-site-main:has(.roles-page) { padding: 0 !important; }
body:has(.roles-page),
.ac-site-main:has(.roles-page) { background: #071018; }
body:has(.roles-page) footer {
    margin-top: 0;
    background: #071018;
    border-top: 0;
    color: #94a3b8;
}
.roles-page {
    position: relative;
    overflow-x: hidden;
    min-height: calc(100dvh - 4.75rem);
    padding: 1rem clamp(0.8rem, 3vw, 2.4rem) 2.4rem;
    color: #e2e8f0;
    background:
        radial-gradient(900px 280px at 8% -8%, rgba(125, 211, 252, 0.22), transparent 55%),
        radial-gradient(820px 260px at 94% 108%, rgba(167, 139, 250, 0.18), transparent 52%),
        radial-gradient(640px 220px at 50% 0%, rgba(52, 211, 153, 0.12), transparent 46%),
        #071018;
}
.roles-hero { text-align: center; margin-bottom: 1.2rem; }
.roles-kicker {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.64rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #7dd3fc;
}
.roles-kicker i {
    width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #7dd3fc;
    box-shadow: 0 0 12px #7dd3fc;
}
.roles-hero h1 {
    font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; margin: 0.25rem 0 0.4rem;
    background: linear-gradient(90deg, #fff, #7dd3fc 40%, #a78bfa 80%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.roles-hero p { max-width: 40rem; margin: 0 auto; color: #94a3b8; }
.roles-ladder {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    max-width: 42rem;
    margin: 0 auto;
}
.roles-card {
    position: relative;
    width: 100%;
    border-radius: 1.05rem;
    padding: 0.9rem 1rem 0.95rem;
    background: rgba(8, 16, 28, 0.78);
    border: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}
.roles-card.tone-user { --role-c: #94a3b8; border-color: rgba(148, 163, 184, 0.4); }
.roles-card.tone-silver { --role-c: #e5e7eb; border-color: rgba(229, 231, 235, 0.45); }
.roles-card.tone-gold { --role-c: #f5c542; border-color: rgba(245, 197, 66, 0.5); }
.roles-card.tone-emerald { --role-c: #34d399; border-color: rgba(52, 211, 153, 0.5); }
.roles-card.tone-diamond { --role-c: #7dd3fc; border-color: rgba(125, 211, 252, 0.5); }
.roles-card.tone-ultimate { --role-c: #e879f9; border-color: rgba(232, 121, 249, 0.5); }
.roles-card.tone-moderator { --role-c: #38bdf8; border-color: rgba(56, 189, 248, 0.55); }
.roles-card.tone-supreme { --role-c: #f87171; border-color: rgba(248, 113, 113, 0.55); }
.roles-card.tone-aivan { --role-c: #38bdf8; border-color: rgba(56, 189, 248, 0.7); background: rgba(8, 20, 36, 0.92); }
.roles-badge { color: var(--role-c); }
.roles-card.is-mine { outline: 2px solid color-mix(in srgb, var(--role-c, #7dd3fc) 70%, white); outline-offset: 2px; }
.roles-card-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.roles-check {
    width: 1.45rem; height: 1.45rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #4ade80; color: #052e16; font-weight: 900; font-size: 0.85rem;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.7);
}
.roles-badge {
    display: inline-flex; align-items: center;
    font-weight: 900; font-size: 1.05rem;
    color: var(--role-c);
}
.roles-nick-demo { margin: 0 0 0.7rem; font-weight: 800; }
.roles-perms { margin: 0; padding-left: 1.05rem; display: grid; gap: 0.35rem; }
.roles-perms li { color: #e2e8f0; font-size: 0.88rem; font-weight: 650; }
.roles-how { margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px dashed rgba(148, 163, 184, 0.28); }
.roles-how span {
    display: block; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: #94a3b8; font-weight: 800; margin-bottom: 0.2rem;
}
.roles-how p { margin: 0; color: #cbd5e1; font-size: 0.86rem; }
.roles-progress { margin-top: 0.55rem; }
.roles-progress b { display: block; font-size: 0.78rem; color: #c4b5fd; margin-bottom: 0.2rem; }
.roles-progress i {
    display: block; height: 7px; border-radius: 999px; background: rgba(15, 23, 42, 0.7);
    position: relative; overflow: hidden;
}
.roles-progress i::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%);
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}
.roles-toggle {
    margin-top: 0.85rem; width: 100%;
    border-radius: 999px; padding: 0.38rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.55); color: #e2e8f0;
    font-weight: 800; font-size: 0.78rem; cursor: pointer;
}
.roles-toggle.is-on, .roles-toggle:hover { background: rgba(56, 189, 248, 0.16); }
.roles-players {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
    margin-top: 0.55rem; max-height: 9.5rem; overflow: auto;
    padding: 0.15rem;
}
.roles-player {
    display: flex; align-items: center; gap: 0.45rem;
    color: #fff; text-decoration: none; font-weight: 700; font-size: 0.84rem;
    border-radius: 0.55rem; padding: 0.22rem 0.35rem;
}
.roles-player:hover { background: rgba(255,255,255,0.06); }
.roles-player img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.roles-empty { color: #94a3b8; font-size: 0.82rem; margin: 0.4rem 0 0; }
@media (max-width: 640px) {
    .roles-ladder { max-width: none; }
}
