.rankings-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
}

        .rank-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 16px 0 22px;
        }

        .rank-section {
            margin-top: 26px;
        }

        .rank-table {
            width: 100%;
            border-collapse: collapse;
        }

        .rank-table th,
        .rank-table td {
            padding: 12px 10px;
            text-align: left;
            vertical-align: top;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .rank-table th {
            color: var(--muted);
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
        }

        .rank-table td {
            font-size: 14px;
        }

        .row-menu {
            position: relative;
            display: inline-block;
        }

        .row-menu > summary {
            list-style: none;
            cursor: pointer;
            user-select: none;
            width: 36px;
            height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius);
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
        }

        .row-menu > summary::-webkit-details-marker {
            display: none;
        }

        .row-menu-panel {
            position: absolute;
            top: 44px;
            right: 0;
            z-index: 30;
            min-width: 260px;
            background: var(--surface);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: var(--radius);
            padding: 12px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.45);
        }

        .row-menu-panel form {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .row-menu-panel input {
            width: 100%;
        }

        .row-menu-panel .btn {
            width: 100%;
            justify-content: center;
        }

        .rank-empty {
            padding: 18px 0;
            color: var(--muted);
        }

        .rank-avatar-cell {
            width: 60px;
        }

        .rank-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            object-fit: cover;
            display: block;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
        }

        .rank-name-cell {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .row-menu-remove-form {
            margin-top: 10px;
        }

        @media (max-width: 640px) {
            .card.large {
                padding: 14px;
                border-radius: var(--radius);
            }

            .rank-toolbar {
                gap: 6px;
                margin: 12px 0 18px;
            }

            .rank-toolbar .btn {
                width: 100%;
                justify-content: center;
            }

            .rank-section h2 {
                font-size: 18px;
                margin-bottom: 10px;
            }

            .rank-table,
            .rank-table thead,
            .rank-table tbody,
            .rank-table th,
            .rank-table td,
            .rank-table tr {
                display: block;
                width: 100%;
            }

            .rank-table thead {
                display: none;
            }

            .rank-table tr {
                margin-bottom: 12px;
                padding: 12px;
                border-radius: var(--radius);
                background: rgba(255,255,255,0.03);
                border: 1px solid rgba(255,255,255,0.05);
            }

            .rank-table td {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                padding: 8px 0;
                border-bottom: 0;
                font-size: 13px;
            }

            .rank-table td::before {
                content: attr(data-label);
                color: var(--muted);
                font-size: 12px;
                font-weight: 700;
                flex: 0 0 42%;
            }

            .rank-avatar-cell {
                width: auto;
            }

            .rank-avatar {
                width: 34px;
                height: 34px;
            }

            .rank-name-cell {
                flex-wrap: wrap;
                gap: 6px;
                justify-content: flex-end;
                text-align: right;
            }

            .rank-table td:last-child {
                padding-bottom: 0;
            }

            .rank-table td .btn.small,
            .rank-table td .btn {
                width: 100%;
                justify-content: center;
            }

            .row-menu-panel {
                min-width: 220px;
                max-width: calc(100vw - 32px);
            }
        }
