/* Original Modal */
.custom_dialog {
    position: fixed;
    top: 0;
    height: 100%;
    width: 100%;
    display: none;
    z-index: 101;
}
/********************/

.custom_modal_bg {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    height: 100%;
    width: 100%;
}
#custom_item_content .custom_modal_content {
    width: 70%;
    max-height: 850px;
}

.custom_modal_content {
    position: absolute;
    background: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    border-radius: 20px;
}

/* 個別ダイアログの方 */
.custom_dialog_content {
    position: absolute;
    background: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    border-radius: 20px;
}


@media screen and (max-width: 1200px) {
    .custom_dialog_content {
        width: 40%;
    }
}

@media screen and (max-width: 1024px) {
    .custom_dialog_content {
        width: 50%;
    }
}

@media screen and (max-width: 900px) {
    .custom_dialog_content {
        width: 65%;
    }
}

@media screen and (max-width: 750px) {
    .custom_dialog_content {
        width: 70%;
    }
}


@media screen and (max-width: 570px) {
    .custom_dialog_content {
        width: 80%;
    }
}

@media screen and (max-width: 500px) {
    .custom_dialog_content {
        width: 85%;
    }
}
/********************/

.custom_modal_content .modal_panel, .custom_modal_content .modal_buy {
    margin: auto;
    padding: 15px 0 15px 0;
    width: 100%;
    height: auto;
    text-align: center;
}
.custom_modal_content .modal_panel {
    background: #4097DB;
    border-radius: 20px 20px 0 0 / 20px 20px 0 0;
}

/* 個別ダイアログのCSS */
.custom_dialog_content .head_area {
    display: inline-block;
    background: #4097DB;
    border-radius: 20px 20px 0 0 / 20px 20px 0 0;
    width: 100%;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    color: #FFF;
}
.custom_dialog_content .head_area img {
    vertical-align: center;
    width: 40px;
}
.custom_dialog_content .description {
    position: relative;
    width: 80%;
    max-height: 70vh;
    overflow: auto;
    font-size: 0.9em;
    line-height: 1.4em;
    margin: auto;
    color: #000;
    padding: 20px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ダイアログ内の文字の大きさも変える */
@media screen and (max-width: 750px) {
    .custom_dialog_content .description {
        font-size: 1.0em;
        max-height: 50vh;
    }
}

.custom_dialog_content .description video {
    position: relative;
    margin: auto;
    max-width: 95%;
    max-height: 50vh;
}

@media screen and (max-width: 750px) {
    .custom_dialog_content .description video {
        max-height: 40vh;
    }
}

.custom_dialog_content .description li{
    width: 48%;
    height: 25vh;
    list-style: none;
    margin-bottom: 15px;
    overflow: hidden;
}

.custom_dialog_content .description img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.custom_dialog_content ul {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
}
.custom_dialog_content ul.confirm {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.custom_dialog_content li.gacha_result {
    width: 97%;
    margin: 5px auto auto auto;
    padding: 3px 0;
    vertical-align: middle;
    text-align: left;
    border: solid 1px #6091d3;
    border-radius: 10px;
    font-size: 0.8em;
}
.custom_dialog_content li.gacha_result img {
    width: 15%;
}
.custom_dialog_content .notice {
    width: 70%;
    margin: auto;
    text-align: center;
    font-size: 0.7em;
    padding: 5px;
    color: gray;
}
/********************/

.modal_panel img{
    width: 90%;
    text-align: center;
}
.modal_buy img {
    width: 40%;
    text-align: center;
    cursor: pointer;

}
#custom_item_content .modal_panel img{
    width: 40%;
}
#custom_item_content .modal_buy img {
    width: 20%;
    display: none;
}

.custom_modal_content ul {
    list-style: none;
}
.custom_modal_content ul.myitemlist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.custom_modal_content li {
    width: 95%;
    margin: 8px auto auto auto;
    vertical-align: middle;
    text-align: center;
    border: solid 1px #6091d3;
    border-radius: 10px;
}
.custom_modal_content ul.myitemlist li {
    width: 10%;
    padding: 0 2px;
    margin: 4px -2px 0;
    vertical-align: auto;
    border: none;
    border-radius: 0;
    position: relative;
}
.custom_modal_content li img {
    width: 15%;
}
.custom_modal_content li img.can_use {
    cursor: pointer;
}
.custom_modal_content ul.myitemlist li img {
    width: 90%;
}

ul.myitemlist li.item_description .description {
    display: none;
    position: absolute;
    padding: 10px;
    font-size: 0.7em;
    line-height: 1.1em;
    color: #fff;
    background: #000;
    border-radius: 5px;
    width: 200px;
    top: 80%;
    left: 0;
    text-align: left;
    z-index: 6;
}
ul.myitemlist li.item_description .description .title{
    width: 100%;
    text-align: center;
    padding: 3px 0;
    font-weight: bold;
}

/*ul.myitemlist li.item_description .description:before {
    content: "";
    position: absolute;
    top: -24px;
    right: 65%;
    border: 15px solid transparent;
    border-top: 15px solid #000;
    margin-left: -15px;
    transform: rotateZ(180deg);
}*/

ul.myitemlist li.item_description .description hr {
    height: 1px;
    background-image: linear-gradient(
            90deg,
            hsla(0, 0%, 100%, 0),
            hsla(0, 0%, 100%, 0.5) 50%,
            hsla(0, 0%, 100%, 0) 100%
    );
}
ul.myitemlist li.item_description .badge {
    position: absolute;
    top: 0;
    right: 5px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #E62353;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    border-radius: 50%;
    z-index: 5;
}
ul.myitemlist li .inuse{
    position: absolute;
    width: 90%;
    height: auto;
    top: 0;
}

ul.myitemlist li .inuse img{
    width: 100%;
    height: auto;
}

/* custom_dialog 個別ダイアログのボタンデザイン */
.confirm .buttons .dialog_button, .confirm .add_button .dialog_button {
    width: auto;
    margin: 20px 10px;
    background: #fff;
    font-weight: bold;
    border: 1px solid #4097DB;
    color: #4097DB;
    border-radius: 12px;
    padding: 10px;
    font-size: 1.2em;
    cursor: pointer;
    transition: .5s;
}

.confirm .buttons .dialog_button:hover, .confirm .add_button .dialog_button:hover {
    color: #fff;
    background: #4097DB;
    border-radius: 20px;
}

/***********************
* Loading Parts
************************/

#loading-inner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 80px;
    /*margin-top: -25px;*/
    /*margin-left: -25px;*/
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    font-size: 0.8em;
    z-index: 999;
}

#loading-back {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #000;
    opacity: 0.8;
    z-index: 998;
}

#loading-inner span {
    display: inline-block;
    margin: 0;
    animation: jump-string 1.0s infinite;
    animation-delay:170ms;
}

#loading-inner span:nth-child(2) {
    animation-delay: 240ms;
}
#loading-inner span:nth-child(3) {
    animation-delay: 310ms;
}
#loading-inner span:nth-child(4) {
    animation-delay: 380ms;
}
#loading-inner span:nth-child(5) {
    animation-delay: 450ms;
}
#loading-inner span:nth-child(6) {
    animation-delay: 520ms;
}
#loading-inner span:nth-child(7) {
    animation-delay: 590ms;
}

@keyframes jump-string {
    0% ,20%, 100% {
        transform: translateY(0);
    }
    5% {
        transform: translateY(-6px);
    }
    10% {
        transform: translateY(-12px);
    }
    15% {
        transform: translateY(-6px);
    }
}
/* Loadingここまで */



/* アニメーション */
.shake {
    -webkit-animation: shake .4s linear 0s 1;
    animation: shake .4s linear 0s 1;
    transform-origin: left bottom;
}
@-webkit-keyframes shake {
    0%   { -webkit-transform: scale(1.0, 1.0) translate(-50%, -50%); }
    40%  { -webkit-transform: scale(0.95, 1.2) translate(-50%, -60%); }
    50%  { -webkit-transform: scale(1.1, 0.9) translate(-50%, -45%); }
    60%  { -webkit-transform: scale(0.95, 1.05) translate(-50%, -53%); }
    70%  { -webkit-transform: scale(1.05, 0.95) translate(-50%, -47%); }
    80%  { -webkit-transform: scale(1.0, 1.0) translate(-50%, -50%); }
    100% { -webkit-transform: scale(1.0, 1.0) translate(-50%, -50%); }
}
@keyframes shake {
    0%   { transform: scale(1.0, 1.0) translate(-50%, -50%); }
    40%  { transform: scale(0.95, 1.2) translate(-50%, -60%); }
    50%  { transform: scale(1.1, 0.9) translate(-50%, -45%); }
    60%  { transform: scale(0.95, 1.05) translate(-50%, -53%); }
    70%  { transform: scale(1.05, 0.95) translate(-50%, -47%); }
    80%  { transform: scale(1.0, 1.0) translate(-50%, -50%); }
    100% { transform: scale(1.0, 1.0) translate(-50%, -50%); }
}

/* 本当はstyle_pc.cssに書くのだが */
ul#main_menu li img {
    cursor: pointer;
}

/* スタート画面での裏表示でごちゃつくの回避 */
#menu {
    opacity: 1;
    transition: all 0.5s;

}
#content {
    opacity: 1;
    transition: all 0.7s;

}
#content #main_wrapper {
    opacity: 0;
}
#menu #left_wrapper {
    opacity: 0;
}

/*
 メニューホバー時のちょっとしたアニメーション
 */
#menu #left_wrapper #main_menu li img, #content #wrapper #talk_menu_icons img {
    transition-duration: 0.3s;
}
#menu #left_wrapper #main_menu li img:hover, #content #wrapper #talk_menu_icons img:hover {
    transform: scale(0.8);
    transition-duration: 0.3s;
    opacity: 0.7;
}