.team-player-photo-button {
    display: block;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
}

.team-player-photo-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.team-player-photo-button:hover img,
.team-player-photo-button:focus-visible img {
    transform: scale(1.04);
    filter: brightness(0.94);
}

.team-player-photo-button:focus-visible {
    outline: 4px solid rgba(220, 38, 38, 0.32);
    outline-offset: 4px;
}

.player-photo-modal[hidden] {
    display: none !important;
}

.player-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
}

.player-photo-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(3, 7, 18, 0.78);
    cursor: zoom-out;
}

.player-photo-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.player-photo-modal__dialog img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    background: #111827;
}

.player-photo-modal__caption {
    display: grid;
    gap: 4px;
    padding: 18px 22px;
    color: #111827;
}

.player-photo-modal__caption strong {
    font-size: 1.2rem;
    font-weight: 950;
}

.player-photo-modal__caption span {
    color: #6b7280;
    font-weight: 800;
}

.player-photo-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body.player-photo-modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .team-player-photo-button {
        width: 100%;
        height: 260px;
        flex-basis: auto;
    }

    .player-photo-modal {
        padding: 12px;
    }

    .player-photo-modal__dialog {
        max-height: calc(100vh - 24px);
        border-radius: 22px;
    }

    .player-photo-modal__dialog img {
        max-height: calc(100vh - 132px);
    }

    .player-photo-modal__caption {
        padding: 15px 16px;
    }
}

@media (max-width: 440px) {
    .team-player-photo-button {
        height: 220px;
    }
}
