/* Roster hierarchy cards — glass org-tree layout (DEVIANT) */

.roster-page {
    --rh-card-base: rgba(8, 10, 15, 0.94);
    --rh-card-base-2: rgba(11, 14, 20, 0.98);
    --rh-card-stroke: rgba(255, 255, 255, 0.06);
    --rh-text-main: #f5f7fb;
    --rh-text-muted: var(--roster-muted);
    --rh-text-soft: #636b7a;
    --rh-online: #00e676;
    --rh-offline: #5d6575;
    --rh-c-leader: var(--roster-gold);
    --rh-c-leader-rgb: 255, 204, 0;
    --rh-c-deputy: var(--roster-red);
    --rh-c-deputy-rgb: 255, 0, 60;
    --rh-c-curator: #00f2fe;
    --rh-c-curator-rgb: 0, 242, 254;
    --rh-c-recruiter: #b142f5;
    --rh-c-recruiter-rgb: 177, 66, 245;
    --rh-c-family: #a8a8b8;
    --rh-c-family-rgb: 168, 168, 184;
    --rh-trans: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.22s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Org tree ── */
.roster-page .roster-org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 58px;
    position: relative;
    z-index: 1;
}

.roster-page .roster-level {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

.roster-page .roster-level-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    z-index: 2;
}

.roster-page .roster-level-title {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 9, 13, 0.96);
    font-family: var(--roster-font);
}

.roster-page .title-leader {
    color: var(--rh-c-leader);
    --rh-count-bg: var(--rh-c-leader);
    --rh-count-fg: #0b0f15;
    box-shadow: inset 0 0 0 1px rgba(var(--rh-c-leader-rgb), 0.08);
}
.roster-page .title-deputy {
    color: var(--rh-c-deputy);
    --rh-count-bg: var(--rh-c-deputy);
    --rh-count-fg: #fff;
    box-shadow: inset 0 0 0 1px rgba(var(--rh-c-deputy-rgb), 0.08);
}
.roster-page .title-curator {
    color: var(--rh-c-curator);
    --rh-count-bg: var(--rh-c-curator);
    --rh-count-fg: #0b0f15;
    box-shadow: inset 0 0 0 1px rgba(var(--rh-c-curator-rgb), 0.08);
}
.roster-page .title-recruiter {
    color: var(--rh-c-recruiter);
    --rh-count-bg: var(--rh-c-recruiter);
    --rh-count-fg: #fff;
    box-shadow: inset 0 0 0 1px rgba(var(--rh-c-recruiter-rgb), 0.08);
}
.roster-page .title-family {
    color: var(--rh-c-family);
    --rh-count-bg: var(--rh-c-family);
    --rh-count-fg: #0b0f15;
    box-shadow: inset 0 0 0 1px rgba(var(--rh-c-family-rgb), 0.08);
}

.roster-page .count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--rh-count-bg, var(--rh-c-family));
    color: var(--rh-count-fg, #0b0f15);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}

.roster-page .roster-nodes-row {
    display: flex;
    gap: 40px;
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.roster-page .roster-nodes-row::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 240px), 720px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.roster-page .roster-nodes-row.single::before { display: none; }

.roster-page .roster-level:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -58px;
    left: 50%;
    width: 1px;
    height: 58px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

.roster-page .rh-card-node {
    position: relative;
    width: 270px;
    flex: 0 0 270px;
    opacity: 0;
    transform: translate3d(0, 16px, 0);
}

.roster-page .rh-card-node.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--rh-delay, 0ms);
}

.roster-page .rh-card-node::after {
    display: none;
}

.roster-page .rh-card-node::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 10px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.roster-page .roster-nodes-row.single .rh-card-node::before {
    height: 28px;
    top: -32px;
}

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-card-node:has(.rh-card:hover)::before,
    .roster-page .rh-card-node:has(.rh-card:focus-within)::before {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* ── Card shell ── */
.roster-page .rh-card {
    --rh-accent: var(--rh-c-family);
    --rh-accent-rgb: var(--rh-c-family-rgb);
    width: 100%;
    min-height: 348px;
    padding: 20px 18px 16px;
    border-radius: 28px;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    transition: var(--rh-trans);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, #111318 0%, #0d0f13 100%);
    box-shadow: none;
    z-index: 1;
    cursor: pointer;
    font-family: var(--roster-font);
}

.roster-page .rh-card-node:has(.rh-rank-badge:hover),
.roster-page .rh-card-node:has(.rh-medal-wrap:hover) {
    z-index: 12;
}

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-card-node:has(.rh-rank-badge:hover) .rh-card,
    .roster-page .rh-card-node:has(.rh-medal-wrap:hover) .rh-card {
        z-index: 12;
    }
}

.roster-page .rh-card--locked { cursor: default; }

.roster-page .rh-tier--leader { --rh-accent: var(--rh-c-leader); --rh-accent-rgb: var(--rh-c-leader-rgb); }
.roster-page .rh-tier--deputy { --rh-accent: var(--rh-c-deputy); --rh-accent-rgb: var(--rh-c-deputy-rgb); }
.roster-page .rh-tier--curator { --rh-accent: var(--rh-c-curator); --rh-accent-rgb: var(--rh-c-curator-rgb); }
.roster-page .rh-tier--recruiter { --rh-accent: var(--rh-c-recruiter); --rh-accent-rgb: var(--rh-c-recruiter-rgb); }
.roster-page .rh-tier--family { --rh-accent: var(--rh-c-family); --rh-accent-rgb: var(--rh-c-family-rgb); }

.roster-page .rh-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 28%);
    pointer-events: none;
    z-index: 0;
}

.roster-page .rh-card::after {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-card:hover {
        transform: translate3d(0, -4px, 0);
        border-color: rgba(255, 255, 255, 0.12);
        z-index: 5;
    }
}

.roster-page .rh-accent-line {
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 999px;
    opacity: 0.9;
    z-index: 2;
    background: linear-gradient(90deg, transparent 0%, var(--rh-accent) 50%, transparent 100%);
}

/* ── Status ── */
.roster-page .rh-status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 9px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(7, 9, 13, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.roster-page .rh-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.roster-page .rh-status--ingame { color: var(--rh-online); }
.roster-page .rh-status--ingame .rh-status-dot {
    background: var(--rh-online);
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.55);
    animation: rhPulse 2.4s ease-in-out infinite;
}

.roster-page .rh-status--on { color: #4a9eff; }
.roster-page .rh-status--on .rh-status-dot { background: #4a9eff; }
.roster-page .rh-status--idle { color: #ffaa00; }
.roster-page .rh-status--idle .rh-status-dot { background: #ffaa00; }
.roster-page .rh-status--dnd { color: var(--roster-red); }
.roster-page .rh-status--dnd .rh-status-dot { background: var(--roster-red); }
.roster-page .rh-status--off { color: var(--rh-text-muted); }
.roster-page .rh-status--off .rh-status-dot { background: var(--rh-offline); }

@keyframes rhPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.92); }
}

/* ── Avatar + rank ── */
.roster-page .rh-avatar-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    margin-bottom: 16px;
    margin-top: 6px;
    border-radius: 22px;
    padding: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    z-index: 2;
    overflow: visible;
}

.roster-page .rh-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    background: #111;
    transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-card:hover .rh-avatar { transform: scale(1.03); }
}

.roster-page .rh-rank-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: rgba(10, 12, 16, 0.98);
    border: 1px solid;
    z-index: 40;
    cursor: help;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.roster-page .rh-rank-badge:hover {
    z-index: 60;
}

.roster-page .rh-rank-badge.rank-s { color: var(--rh-c-leader); border-color: rgba(var(--rh-c-leader-rgb), 0.35); }
.roster-page .rh-rank-badge.rank-a { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.35); }
.roster-page .rh-rank-badge.rank-b { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.35); }
.roster-page .rh-rank-badge.rank-c { color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
.roster-page .rh-rank-badge.rank-d,
.roster-page .rh-rank-badge.rank-e,
.roster-page .rh-rank-badge.rank-f { color: #c3cad7; border-color: rgba(195, 202, 215, 0.28); }

.roster-page .rh-rank-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    opacity: 0;
    pointer-events: none;
    width: 176px;
    background: rgba(9, 11, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 70;
    text-align: left;
}

.roster-page .rh-rank-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: rgba(9, 11, 16, 0.98);
    border-top-color: transparent;
}

.roster-page .rh-rank-badge:hover .rh-rank-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.roster-page .rh-tooltip-title {
    margin: 0 0 6px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rh-text-soft);
}

.roster-page .rh-tooltip-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--rh-text-main);
}

/* ── Identity ── */
.roster-page .rh-name {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    min-height: 1.45em;
    font-size: 1.22rem;
    font-weight: 800;
    margin: 0 0 3px;
    letter-spacing: -0.03em;
    color: var(--rh-text-main);
    z-index: 2;
    text-align: center;
    max-width: 100%;
    line-height: 1.2;
}

.roster-page .rh-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rh-handle {
    margin: 0;
    color: var(--rh-text-muted);
    font-size: 0.82rem;
    z-index: 2;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rh-join-date {
    margin-top: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.67rem;
    color: var(--rh-text-muted);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.045);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-height: 30px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.roster-page .rh-join-date span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.roster-page .rh-join-date svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

/* ── Medal in name ── */
.roster-page .rh-medal-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    margin-left: 4px;
    flex-shrink: 0;
}

.roster-page .rh-medal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: transform 0.22s ease;
}

.roster-page .rh-medal-icon svg {
    width: 18px;
    height: 18px;
    color: var(--med-color, #8e8e9f);
    fill: currentColor;
    display: block;
    shape-rendering: geometricPrecision;
    filter: drop-shadow(0 0 4px rgba(var(--med-rgb, 142, 142, 159), 0.28));
    transition: transform 0.22s ease, filter 0.22s ease;
}

.roster-page .rh-medal-icon--custom {
    border: none;
    background: transparent;
}

.roster-page .rh-medal-wrap:hover .rh-medal-icon svg {
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 0 7px rgba(var(--med-rgb, 142, 142, 159), 0.5));
}

.roster-page .rh-medal-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    pointer-events: none;
    width: max-content;
    max-width: 200px;
    background: rgba(9, 11, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 11px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
    text-align: center;
    color: var(--rh-text-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.roster-page .rh-medal-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(9, 11, 16, 0.98);
}

.roster-page .rh-medal-wrap:hover .rh-medal-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.roster-page .rh-medal-tooltip-title {
    margin: 0;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--med-color, #ececf2);
}

/* ── Position card ── */
.roster-page .rh-tags-container {
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
    z-index: 2;
}

.roster-page .rh-position-card {
    width: 100%;
    min-height: 50px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.01) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-position-card:hover {
        transform: translateY(-1px);
        border-color: rgba(255, 255, 255, 0.075);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.014) 100%);
    }
}

.roster-page .rh-position-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
}

.roster-page .rh-position-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.025);
    color: var(--rh-accent);
    background: linear-gradient(180deg, rgba(var(--rh-accent-rgb), 0.10), rgba(var(--rh-accent-rgb), 0.035));
}

.roster-page .rh-position-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.roster-page .rh-position-label {
    font-size: 0.54rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rh-text-soft);
    font-weight: 700;
    line-height: 1.1;
}

.roster-page .rh-position-name {
    font-size: 0.78rem;
    color: var(--rh-text-main);
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-page .rh-position-arrow {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rh-text-soft);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--rh-trans);
    font-size: 0.72rem;
}

.roster-page .rh-position-card:hover .rh-position-arrow {
    color: var(--rh-text-main);
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.035);
}

.roster-page .rh-position-card.is-empty {
    cursor: default;
    opacity: 0.85;
}

.roster-page .rh-position-card.is-empty:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.04);
}

.roster-page .rh-position-card.is-empty .rh-position-icon {
    color: var(--rh-text-soft) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.roster-page .rh-position-card.is-empty .rh-position-name {
    color: var(--rh-text-muted);
    font-weight: 600;
}

/* ── Socials dock ── */
.roster-page .rh-socials-container {
    width: 100%;
    margin-top: 13px;
    overflow: hidden;
    z-index: 2;
    flex-shrink: 0;
}

.roster-page .rh-socials-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 0;
    height: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: height 0.28s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.28s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.28s cubic-bezier(0.23, 1, 0.32, 1),
                margin 0.28s cubic-bezier(0.23, 1, 0.32, 1),
                padding 0.28s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    border-top: 1px solid transparent;
    scrollbar-width: none;
}

.roster-page .rh-socials-dock::-webkit-scrollbar { display: none; }

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-card:hover .rh-socials-dock:not(.rh-socials-dock--empty),
    .roster-page .rh-card:focus-within .rh-socials-dock:not(.rh-socials-dock--empty) {
        margin-top: 4px;
        height: 38px;
        padding: 10px 0 2px;
        opacity: 1;
        transform: translate3d(0, 0, 0);
        border-top-color: rgba(255, 255, 255, 0.06);
    }
}

.roster-page .rh-socials-dock a.rh-soc {
    color: var(--rh-soc-color, var(--rh-text-muted));
    text-decoration: none;
    font-size: 1.28rem;
    width: auto;
    height: auto;
    min-width: 0;
    border: none;
    border-radius: 0;
    background: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.72;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.roster-page .rh-socials-dock a.rh-soc--yt { --rh-soc-color: #ff4d4d; }
.roster-page .rh-socials-dock a.rh-soc--tw { --rh-soc-color: #a970ff; }
.roster-page .rh-socials-dock a.rh-soc--tg { --rh-soc-color: #33b5f3; }
.roster-page .rh-socials-dock a.rh-soc--ds { --rh-soc-color: #7289da; }

@media (hover: hover) and (pointer: fine) {
    .roster-page .rh-socials-dock a.rh-soc:hover {
        opacity: 1;
        transform: scale(1.1);
        color: var(--rh-soc-color, var(--rh-text-main));
    }

    .roster-page .rh-socials-dock a.rh-soc--yt:hover { --rh-soc-color: #ff5555; }
    .roster-page .rh-socials-dock a.rh-soc--tw:hover { --rh-soc-color: #bf94ff; }
    .roster-page .rh-socials-dock a.rh-soc--tg:hover { --rh-soc-color: #4cc4ff; }
    .roster-page .rh-socials-dock a.rh-soc--ds:hover { --rh-soc-color: #8ea1ff; }
}

.roster-page .rh-socials-dock--empty { display: none; }

.roster-page .rh-socials-dock--loading { display: none; }

.roster-page .rh-socials-loading {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--rh-text-muted);
}

/* ── Position modal ── */
.roster-page .rh-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    padding: 20px;
}

.roster-page .rh-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.roster-page .rh-modal-box {
    width: 340px;
    max-width: 100%;
    position: relative;
    border-radius: 24px;
    padding: 32px 24px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%),
        linear-gradient(180deg, rgba(12, 15, 21, 0.98) 0%, rgba(9, 11, 16, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.56);
    transform: scale(0.94) translateY(18px);
    transition: var(--rh-trans);
    text-align: center;
    overflow: hidden;
    font-family: var(--roster-font);
}

.roster-page .rh-modal-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -20%, rgba(255, 0, 60, 0.08) 0%, transparent 42%);
    pointer-events: none;
}

.roster-page .rh-modal-overlay.active .rh-modal-box {
    transform: scale(1) translateY(0);
}

.roster-page .rh-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    color: var(--rh-text-muted);
    cursor: pointer;
    transition: var(--rh-trans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 2;
}

.roster-page .rh-modal-close:hover {
    color: var(--rh-text-main);
    background: rgba(255, 255, 255, 0.06);
}

.roster-page .rh-modal-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: var(--rh-accent, var(--roster-red));
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 2;
}

.roster-page .rh-modal-title {
    margin: 0 0 10px;
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--rh-text-main);
    position: relative;
    z-index: 2;
}

.roster-page .rh-modal-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.58;
    color: var(--rh-text-muted);
    position: relative;
    z-index: 2;
}

@media (max-width: 720px) {
    .roster-page .roster-org-tree { gap: 44px; }
    .roster-page .roster-nodes-row { gap: 24px; }
    .roster-page .roster-nodes-row::before,
    .roster-page .rh-card-node::before,
    .roster-page .rh-card-node::after,
    .roster-page .roster-level:not(:last-child)::after { display: none; }
    .roster-page .rh-card { width: 100%; }
    .roster-page .rh-card-node {
        width: min(100%, 310px);
        flex: 0 1 min(100%, 310px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .roster-page .rh-card-node,
    .roster-page .rh-card,
    .roster-page .rh-socials-dock,
    .roster-page .rh-status--ingame .rh-status-dot {
        transition: none !important;
        animation: none !important;
    }

    .roster-page .rh-card-node {
        opacity: 1;
        transform: none;
    }

    .roster-page .rh-socials-dock:not(.rh-socials-dock--empty) {
        margin-top: 4px;
        height: 38px;
        padding: 10px 0 2px;
        opacity: 1;
        transform: none;
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    .roster-page .rh-card:hover .rh-socials-dock:not(.rh-socials-dock--empty),
    .roster-page .rh-card:focus-within .rh-socials-dock:not(.rh-socials-dock--empty) {
        transform: none;
    }

    .roster-page .rh-socials-dock a.rh-soc {
        opacity: 1;
        transform: none;
    }
}
