.roster-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.tree-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rank {
    background: rgba(12, 12, 12, 0.8);
    border: 1px solid rgba(255, 204, 0, 0.14);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.rank:hover {
    background: rgba(18, 18, 18, 0.85);
    transform: translateY(-2px);
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Coluna Rounded', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 1rem;
    color: #ffcc00;
}

.rank-description {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.members {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding-top 0.35s ease;
    padding-left: 1rem;
    padding-top: 0;
}

.members.open {
    padding-top: 0.75rem;
}

.member {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    align-items: flex-start;
    background: rgba(8, 8, 8, 0.75);
    border-radius: 16px;
    border: 1px solid rgba(255, 204, 0, 0.1);
    padding: 1rem 1.25rem;
    margin-top: 0.85rem;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.member-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.member-role {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.member-meta {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.redacted {
    position: relative;
    display: inline-block;
}

.redacted img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    background-color: rgba(20, 20, 20, 0.85);
}

.redacted .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    color: #ff4d4d;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    border-radius: 12px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffcc00;
}

.profile-role {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.profile-specialty,
.profile-status,
.profile-experience {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.profile-awards {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.75rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.profile-awards.open,
.member:hover .profile-awards {
    max-height: 600px;
}

.award-type {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.award {
    display: block;
    border-radius: 6px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease;
    object-fit: contain;
}

.award-type.awards .award,
.award-type.medals .award {
    width: 56px;
    height: 56px;
}

.award-type.ribbons .award {
    height: 38px;
    width: auto;
    border-radius: 4px;
}

.award:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .rank {
        padding: 1rem 1.25rem;
    }

    .member {
        flex-direction: column;
        padding: 0.85rem 1rem;
    }

    .member-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
