html.scrollLock,
body.scrollLock {
    overflow-y: hidden;
}

#top_title {
    font-size: 34px;
    background: #fff;
    display: inline-block;
    margin: auto;
    padding: 1.5rem 5rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 10px;
}

.category-4th-grade #top_title {
    color: #e4007f;
    border: 5px solid #e4007f;
}

.category-5th-grade #top_title {
    color: #009944;
    border: 5px solid #009944;
}

.category-6th-grade #top_title {
    color: #e60012;
    border: 5px solid #e60012;
}

.select_vote li a {
    background: #7c7c7c !important;
}

.category-4th-grade .select_vote li .current {
    background: #e4007f !important;
}

.category-5th-grade .select_vote li .current {
    background: #009944 !important;
}

.category-6th-grade .select_vote li .current {
    background: #e60012 !important;
}

.select_vote li a:hover {
    opacity: 1;
}

.select_vote li.list4 a:hover {
    background: #e4007f !important;
}

.select_vote li.list5 a:hover {
    background: #009944 !important;
}

.select_vote li.list6 a:hover {
    background: #e60012 !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pic-list {
    width: 90%;
    margin: auto;
    max-width: 1024px;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.pic-list li {
    width: 22%;
    margin-left: 4%;
    margin-bottom: 50px;
    font-weight: 500;
}

.pic-list li:nth-child(4n + 1) {
    margin-left: 0;
}

.pic-list li figure {
    display: block;
    width: 100%;
    padding: 3%;
    border: 1px solid #eeeeee;
    text-align: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.pic-list li figure img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    /* opacity: 0; Fix opacity 0 */ 
    transform: translate(0, 10px);
    transition: 0.5s;
}

.pic-list li figure img.lazyloaded {
    transform: translate(0, 0);
    opacity: 1;
}

.pic-list li .name,
.pic-list li .school,
.voted_pic .name,
.voted_pic .school {
    display: block;
    text-align: center;
    font-size: 18px;
    line-height: 1.5;
    font-weight: bold;
}

.vote_btn {
    display: inline-block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    border: none;
}

.vote_btn:hover {
    color: #fff;
}

.category-4th-grade .vote_btn {
    background: #e4007f !important;
}

.category-5th-grade .vote_btn {
    background: #009944 !important;
}

.category-6th-grade .vote_btn {
    background: #e60012 !important;
}

.voted_span {
    display: inline-block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    background: #143290 !important;
}

/* voted */

.vote_btn.correct {
    display: inline-block !important;
    background: #00b0e4 !important;
}

.vote_btn {
    position: relative;
    overflow: hidden;
}

.vote_btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.vote_btn.loading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007bff;
    animation: loading 1s infinite linear;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.voted-item-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.voted-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    text-align: center;
    padding: 1rem;
}

.category-4th-grade .voted-item {
    border: 6px solid #e4007f; 
}

.category-5th-grade .voted-item {
    border: 6px solid #009944; 
}

.category-6th-grade .voted-item {
    border: 6px solid #e60012; 
}

.voted-item .voted-message {
    display: block;
    text-align: center;
    font-size: 18px;
    line-height: 1.5;
    font-weight: bold;
}

.voted-item figure {
    margin-bottom: 1rem;
    cursor: pointer;
}

.voted-item figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.voted-item .name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.voted-item .school {
    margin-bottom: 1rem;
}

.voted-item .vote_btn {
    margin-top: 0.5rem;
}

.voted_annaunce {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 3%;
    border: 1px solid #ccc;
    max-width: 640px;
    width: 95%;
    margin: 0 auto 60px;
}

.voted_annaunce .voted_pic {
    width: 30%;
    cursor: pointer;
}

.voted_annaunce .voted_pic img {
    width: 100%;
    height: auto;
}

.voted_annaunce .annaunce_text {
    width: 65%;
    margin-left: 5%;
    /* text-align: left; */
}

.voted_annaunce .annaunce_text strong {
    display: block;
    margin-top: 10px;
    line-height: 1.2;
    padding: 5px;
    background: #fafafa;
}

.voted_annaunce .vote_btn {
    display: inline-block !important;
    max-width: 200px;
    width: 100%;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 7500;
}

.admin-bar .modal {
    /* WP アドミンバー用 */
    z-index: 100000;
}

.modal .modal-body {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* padding: 50px; */
    padding: 25px 50px;
    z-index: 8100;
    background: #fff;
    cursor: auto;
    text-align: center;
    margin: auto;
    overflow-y: auto;
}

.modal .modal-inner {
    position: relative;
}

.modal .modal-body .modal-image img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 100px);
}

.landscape .modal-body .modal-image img {
    width: auto;
    max-width: 90vw;
    max-height: calc(100vh - 100px);
}

.portrait .modal-body .modal-image img {
    width: auto;
    max-width: 100vw;
    max-height: 80vh;
}

.modal .modal-detail span {
    display: block;
}

.modal .modal-body .vote_btn {
    width: 50%;
}

.modal .overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 8000;
}

.modal .modal_close {
    position: absolute;
    /* top: -50px; */
    top: -15px;
    right: -50px;
    display: block;
    width: 50px;
    height: 50px;
    background: #fff;
    cursor: pointer;
    z-index: 8200;
}

.modal .modal_close span {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
}

.modal .modal_close span:before {
    content: '\02715';
    line-height: 1;
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media screen and (max-width: 1366px) {
}

@media screen and (max-width: 1280px) {
}

@media screen and (max-width: 1024px) {
}

@media screen and (max-width: 768px) {
}

@media screen and (max-width: 640px) {
}

@media screen and (max-width: 1366px) {
}

@media screen and (max-width: 1280px) {
}

@media screen and (max-width: 1024px) {
}

@media screen and (max-width: 768px) {
    .select_vote li a,
    .select_vote li span {
        font-size: 13px;
    }
    .pic-list li figure img {
        height: 180px;
    }
    .modal .modal-body {
        width: 90%;
        padding: 20px;
    }
    .modal .modal-body .modal-image img {
        max-width: 100%;
        max-height: calc(100vh - 200px);
    }
    .modal .modal_close {
        top: -20px;
        right: -20px;
        width: 20px;
        height: 20px;
    }
    .modal .modal_close span:before {
        font-size: 15px;
    }
}

@media screen and (max-width: 640px) {
    .voted_annaunce {
        font-size: 14px;
    }
    #top_title {
        width: 100%;
        font-size: 24px;
        padding: 1.5rem 0;
        text-align: center;
    }
    .pic-list li {
        width: 49%;
        margin-left: 2%;
    }
    .pic-list li:nth-child(2n + 1) {
        margin-left: 0;
    }
    .pic-list li .name,
    .pic-list li .school {
        font-size: 14px;
    }
    .vote_btn,
    .voted_span {
        font-size: 14px;
    }
    .modal .modal-body {
        width: 95%;
        padding: 15px;
    }
    .modal .modal-body .modal-image img {
        max-width: 100%;
        max-height: calc(100vh - 200px);
    }
    .modal .modal_close {
        top: -15px;
        right: -15px;
        width: 15px;
        height: 15px;
    }
    .modal .modal_close span:before {
        font-size: 12px;
    }
}

@media screen and (max-width: 320px) {
}
