:root {
    --color-lightgray: #F6F6F6;
    --color-gray: #888;
    --color-darkgray: #484848;
    --color-lightpink: #FF8ED2;
    --color-pink: #F345AE;
    --color-heavypink: #BF0073;
}

#player-modal {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 30%);
    z-index: 99999;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;

    img {
        max-width: 100%;
        height: auto;
    }

    .pc-only {
        display: block !important;
        @media (max-width: 768px) {
            display: none !important;
        }
    }

    .sp-only {
        display: none !important;
        @media (max-width: 768px) {
            display: block !important;
        }
    }

    >.modal-window {
        background: #fff;
        width: 95%;
        max-width: 900px;
        margin: 20px auto;
        position: relative;
        padding: 24px 0;
        overflow-y: auto;
        max-height: 92vh;
        @media (max-width: 768px) {
            background: var(--color-lightgray);
            padding: 16px 0 8px;
        }

        >.js-close-modal {
            position: absolute;
            top: 28px;
            right: 15px;
            z-index: 100;
            width: 38px;
            height: 38px;
            background: #fff;
            border-radius: 50%;
            border: 1px solid #e0e0e0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
            @media (max-width: 768px) {
                top: 8px;
                right: 8px;
                width: 24px;
                height: 24px;
            }
            
            &::before,
            &::after {
                content: '';
                position: absolute;
                width: 18px;
                height: 1px;
                background: var(--color-darkgray);
                @media (max-width: 768px) {
                    width: 12px;
                }
            }

            &::before {
                transform: rotate(45deg);
            }

            &::after {
                transform: rotate(-45deg);
            }

            &:hover {
                background: #fcfcfc;
                transform: scale(1.1);
                box-shadow: none;
            }
        }

        >.modal-body {
            background: var(--color-lightgray);
            padding: 20px;
            
            
            
            @media (max-width: 768px) {
                padding: 0;
            }


            >.modal-inner {
                max-width: 650px;
                margin: 0 auto;

                >.profile-header {
                    margin-bottom: 24px;
                    @media (max-width: 768px) {
                        padding: 0 20px;
                    }

                    >.profile-header-inner {
                        display: flex;
                        flex-wrap: wrap;
                        justify-content: center;
                        gap: 30px;
                        align-items: center;
                        @media (max-width: 768px) {
                            gap: 4px;
                        }

                        >.player-pic {
                            width: 32%;
                            @media (max-width: 768px) {
                                width: 42%;
                            }
                        }

                        >.player-basic-info {
                            width: calc(68% - 30px);
                            @media (max-width: 768px) {
                                width: calc(58% - 8px);
                            }

                            >.player-name-group {
                                display: flex;
                                flex-wrap: wrap;
                                align-items: baseline;
                                justify-content: center;
                                gap: 16px;
                                margin-bottom: 8px;
                                @media (max-width: 768px) {
                                    gap: 4px;
                                    flex-direction: column;
                                    align-items: center;
                                }

                                >h2 {
                                    font-size: 30px;
                                    @media (max-width: 768px) {
                                        font-size: 20px;
                                        margin-bottom: 0;
                                    }

                                    >a {
                                        color: inherit;
                                        text-decoration: none;
                                    }
                                }

                                >span {
                                    color: var(--color-darkgray);
                                    font-size: 18px;
                                    font-weight: 400;
                                    @media (max-width: 768px) {
                                        font-size: 16px;
                                    }
                                }
                            }

                            >.player-sub {
                                color: var(--color-darkgray);
                                font-size: 20px;
                                text-align: center;
                                margin-bottom: 16px;
                                font-weight: 600;
                                @media (max-width: 768px) {
                                    font-size: 14px;
                                    margin-bottom: 0;
                                }
                                
                                >span {
                                    @media (max-width: 768px) {
                                        display: block;
                                    }
                                    @media (min-width: 769px) {
                                        margin-left: 12px;
                                    }
                                }
                            }
                        }
                    }
                    .player-school {
                        @media (max-width: 768px) {
                            margin-top: 8px;
                        }
                        >ul {
                            display: flex;
                            flex-direction: column;
                            gap: 30px;
                            justify-content: center;
                            align-items: center;
                            
                            >li {
                                position: relative;
                                border: solid 1px var(--color-gray);
                                color: var(--color-darkgray);
                                background: #fff;
                                padding: 5px 10px;
                                font-size: 16px;
                                text-align: center;
                                width: 80%;
                                @media (max-width: 768px) {
                                    font-size: 13px;
                                    width: 100%;
                                }

                                &:not(:last-child)::after {
                                    content: '';
                                    position: absolute;
                                    bottom: -22px;
                                    left: 50%;
                                    transform: translateX(-50%);
                                    width: 0;
                                    height: 0;
                                    border-style: solid;
                                    border-width: 12px 10px 0 10px;
                                    border-color: var(--color-gray) transparent transparent transparent;
                                }
                            }
                        }
                    }
                }

                >.js-sp-tabs {
                    @media (max-width: 768px) {
                        display: flex;
                        justify-content: space-between;
                    }

                    @media (min-width: 769px) {
                        display: none !important;
                    }
                    >.m-tab {
                        background: var(--color-gray);
                        color: #fff;
                        width: 33%;
                        text-align: center;
                        font-weight: 700;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 14px;
                        line-height: 1.1;
                        padding: 6px;
                        &.active {
                            background: var(--color-pink);
                        }
                    }
                }

                >.modal-main-contents {
                    display: flex;
                    flex-wrap: wrap;
                    gap: 24px;
                    @media (max-width: 768px) {
                        padding: 8px;
                        background: var(--color-lightgray);
                    }

                    >.m-pane {
                        transition: opacity 0.4s ease;
                        
                        @media (max-width: 768px) {
                            width: 100%;
                        }
                        @media (min-width: 769px) {
                            display: block !important;
                            opacity: 1 !important;
                            visibility: visible !important;
                        }

                        &[style*="display: block"] {
                            animation: paneFadeUp 0.4s ease forwards;
                        }

                        dl {
                            border: solid 1px var(--color-lightpink);
                            border-collapse: collapse;
                            background: #fff;
                            box-sizing: border-box;

                            @media (max-width: 768px) {
                                border: none;
                            }

                            >dt,
                            >dd {
                                padding: 8px;
                                text-align: center;
                                font-size: 16px;
                                @media (max-width: 768px) {
                                    padding: 0;
                                    font-size: 14px;
                                }
                            }

                            >dt {
                                line-height: 1.1;
                                font-weight: 700;
                                border-bottom: solid 1px var(--color-lightpink);
                                color: var(--color-gray);

                                @media (max-width: 768px) {
                                    display: none;
                                }
                            }
                        }

                        &:nth-child(1),
                        &:nth-child(3) {
                            @media (min-width: 769px) {
                                width: calc(50% - 12px);
                            }
                        }

                        &:nth-child(1) {
                            @media (min-width: 769px) {
                                order: 1;
                            }

                            >dl {
                                >dd {
                                    background: var(--color-lightgray);

                            .protest-list {
                                border: 1px dotted var(--color-gray);
                                background: var(--color-lightgray);
                                border-radius: 5px;

                                >.protest-row {
                                    display: flex;
                                    align-items: center;
                                    min-height: 40px;
                                    border-bottom: 1px dotted var(--color-gray);

                                    &:last-child {
                                        border-bottom: none;
                                    }

                                    >.year-box {
                                        display: inline-block;
                                        width: 50px;
                                        text-align: center;
                                        padding: 4px 0;
                                        border: 1px solid var(--color-lightpink);
                                        background: #fff;
                                        font-weight: 700;
                                        font-size: 14px;
                                        margin-left: 4px;
                                        margin-right: 4px;
                                        color: var(--color-darkgray);
                                    }

                                    >.protest-result,
                                    >.protest-empty {
                                        flex: 1;
                                        text-align: center;
                                        position: relative;
                                    }

                                    >.protest-result {
                                        .status-badge {
                                            display: inline-block;
                                            text-align: center;
                                            width: 70px;
                                            padding: 3px;
                                            border-radius: 20px;
                                            font-size: 12px;
                                            color: #fff;
                                            white-space: nowrap;
                                                    font-weight: 700;

                                            &.step1 {
                                                background: var(--color-lightpink);
                                            }

                                            &.step2 {
                                                background: var(--color-pink);
                                            }

                                            &.final {
                                                background: var(--color-heavypink);
                                            }
                                        }
                                    }

                                    &.merge {
                                        >.protest-result {
                                            font-size: 14px;
                                            flex: 3;
                                            text-align: center;
                                            color: var(--color-gray);
                                        }
                                    }

                                    &:not(.merge) {

                                        >.protest-result,
                                        >.protest-empty {
                                            border-right: 1px dotted var(--color-gray);
                                            height: 100%;
                                            min-height: 45px;
                                            display: flex;
                                            width: 25%;
                                            align-items: center;
                                            justify-content: center;
                                        }

                                        >*:last-child {
                                            border-right: none;
                                        }
                                    }
                                }
                            }
                        }
                            }


                        }

                        &:nth-child(2) {
                            @media (min-width: 769px) {
                                width: 100%;
                                order: 0;
                            }

                            >.stats-grid {
                                display: flex;
                                flex-wrap: wrap;
                                margin-bottom: 16px;
                                align-items: stretch;
                                justify-content: center;
                                @media (max-width: 768px) {
                                    margin-bottom: 0;
                                }

                                >dl {
                                    display: flex;
                                    flex-direction: column;
                                    height: 100%;
                                    width: 20%;
                                    @media (max-width: 768px) {
                                        border: 1px solid var(--color-lightpink);
                                        width: 50%;
                                        margin-bottom: 8px;
                                    }

                                    >dt {
                                        padding: 8px 4px;
                                        border-bottom: solid 1px var(--color-lightpink);
                                        min-height: 60px;
                                        display: flex;
                                        align-items: center;
                                        justify-content: center;
                                        vertical-align: middle;
                                        color: var(--color-gray);
                                        @media (max-width: 768px) {
                                            padding: 8px;
                                            min-height: unset;
                                        }
                                    }

                                    >dd {
                                        padding: 8px 4px;
                                        margin-top: auto;
                                        vertical-align: middle;
                                        font-weight: 700;
                                    }

                                    &:nth-child(1) {
                                        @media (max-width: 768px) {
                                            border-right: none;
                                        }
                                    }
                                    &:nth-child(3),
                                    &:nth-child(4) {
                                        width: 30%;
                                        @media (max-width: 768px) {
                                            width: 100%;
                                        }
                                    }

                                    &:not(:last-child) {
                                        @media (min-width: 769px) {
                                            border-right: none;
                                        }
                                    }
                                }
                            }
                            >.player-vision {
                                >dl {
                                    @media (max-width: 768px) {
                                        border: 1px solid var(--color-lightpink);
                                    }
                                    >dt {
                                        color: var(--color-gray);
                                        @media (max-width: 768px) {
                                            display: block;
                                            padding: 8px;
                                        }
                                    }
                                    >dd {
                                        font-size: 16px;
                                        font-weight: 700;
                                        padding: 16px;
                                        @media (max-width: 768px) {
                                            padding: 8px;
                                            font-size: 14px;
                                        }
                                    }
                                }
                            }
                        }

                        &:nth-child(3) {
                            @media (min-width: 769px) {
                                order: 2;
                            }

                            dd {
                                background: var(--color-lightgray);

                                >.distance-grid {
                                    display: flex;
                                    flex-wrap: wrap;
                                    align-items: center;
                                    gap: 16px;

                                    >.dist-row {
                                        background: #fff;
                                        width: calc(50% - 8px);
                                        border: solid 1px var(--color-lightpink);
                                        display: flex;
                                        flex-wrap: wrap;

                                        >span {
                                            padding: 4px;
                                            font-size: 14px;

                                            &:nth-child(1) {
                                                width: 40%;
                                                border-right: solid 1px var(--color-lightpink);
                                            }

                                            &:nth-child(2) {
                                                width: 60%;
                                                font-weight: 700;
                                            }
                                        }

                                        &.favorite {
                                            >span {
                                                &:nth-child(1) {
                                                    font-weight: 700;
                                                    color: var(--color-pink);
                                                }
                                            }
                                        }
                                    }

                                    >.dist-note {
                                        text-align: left;
                                        font-size: 11px;
                                        width: calc(50% - 8px);
                                        color: var(--color-pink);
                                    }
                                }
                            }
                        }

                    }
                }
            }
        }
    }
}
@keyframes paneFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}