.player-account {
    position: relative;
    z-index: 70;
}

.player-account__chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    max-width: min(220px, 100%);
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--v2-line, #e4e0d6);
    border-radius: 999px;
    background: var(--v2-paper, #fff);
    color: var(--v2-ink, #16181d);
    cursor: pointer;
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    touch-action: manipulation;
}

.player-account__chip:hover,
.player-account.is-open .player-account__chip {
    border-color: var(--v2-blue, #3b6d9e);
}

.player-account__ava {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: var(--v2-blue-soft, #e8f0f8);
    color: var(--v2-blue, #3b6d9e);
    font-size: .82rem;
    font-weight: 800;
}

.player-account__ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-account__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-account__chevron {
    display: inline-flex;
    color: var(--v2-muted, #6b707c);
    transition: transform .18s ease;
}

.player-account.is-open .player-account__chevron {
    transform: rotate(180deg);
}

.player-account__marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e4453a;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}

.player-account__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 71;
    width: min(280px, calc(100vw - 24px));
    padding: 12px 8px 8px;
    border: 1px solid var(--v2-line, #e4e0d6);
    border-radius: 16px;
    background: var(--v2-paper, #fff);
    box-shadow: 0 16px 40px rgba(13, 30, 61, .14);
}

.player-account__who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 8px 10px;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--v2-line, #e4e0d6);
}

.player-account__who strong {
    color: var(--v2-ink, #16181d);
    font-size: .95rem;
}

.player-account__who span {
    color: var(--v2-muted, #6b707c);
    font-size: .78rem;
    font-weight: 600;
}

.player-account__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-account__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--v2-ink, #16181d);
    font-size: .92rem;
    font-weight: 600;
}

.player-account__link:hover,
.player-account__link.is-active {
    background: var(--v2-blue-soft, #e8f0f8);
}

.player-account__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e4453a;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}

.player-account__logout {
    display: block;
    margin: 8px 4px 0;
    padding-top: 8px;
    border-top: 1px solid var(--v2-line, #e4e0d6);
}

.player-account__logout button {
    appearance: none;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--v2-muted, #6b707c);
    cursor: pointer;
    font: inherit;
    font-size: .92rem;
    font-weight: 700;
    text-align: left;
    touch-action: manipulation;
}

.player-account__logout button:hover {
    background: #f8eceb;
    color: #e4453a;
}

@media (max-width: 760px) {
    .player-account__chip {
        min-height: 44px;
        padding-right: 8px;
    }
    .player-account__name {
        max-width: 5.5em;
    }
}
