@font-face {
    font-family: 'Local Noto Sans JP';
    src: local('Noto Sans JP');
}
body{
    position: relative;
    top: 0;
    margin: 0;
    /* touch-action: none; */
    caret-color: transparent;
    cursor: pointer;
    width: 100vw;
    margin: 0 auto;
    font-family: 'Local Noto Sans JP' , sans-serif;
}
main{
    width: 100%;
}

nav{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 20px 0;
    padding: 0 5vw;
    height: 64px;
}
h1{
    padding: 15px 0 0 0;
    font-size: 2rem;
    text-align: center;
}

/* クラス/ID------------- */

.insert{
    width: 100%;
}

#nameSubmit{
    display: flex;
    flex-direction: column;
    margin: 0 0 15px 0;
}
#nameSubmit div{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}
.insertArea{
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px 0 25px 0;
}
.insertArea span p{
    width: 150px;
    height: 50px;
    text-align: center;
    background-color: #fff;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 15px 0 0 0;
}
.insertArea > span {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
    height: 50px;
    margin: 0 0 15px 0;
    border-radius: 9999px;
    overflow: hidden; /* ← これ必須。角丸の中に背景を収める */
}

/* 左側：#FFE3E3 → 白 */
.insertArea > span > span.left {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, #FFE3E3, white);
    z-index: 0;
}

/* 右側：白 → #DBEAFE */
.insertArea > span > span.right {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, white, #DBEAFE);
    z-index: 0;
}

/* 中身（pなど）が上に来るようにする */
.insertArea span > * {
    position: relative;
    z-index: 2;
}
.addedName{
    width: 180px;
    height: 40px;
    border-radius: 15px;
    background-color: #772ce8;
    opacity: 0.6;
}
.names{
    position: relative;
}
.wrap{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.start{
    width: 150px;
    margin: 0 auto;
}
.grayOut {
    background-color: #d1d5db;
}
.hide{
    display: none;
}
.hide{
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: #0007;
    z-index: 3;
}
/* モーダル */
.modal{
    position: fixed;
    width: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background-color: #fff;
    z-index: 4;
    opacity: 1;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
}
.modal h2 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
}
.modal div.primary{
    height: 150px;
    margin: 0 0 15px 0;
    display: flex;
    padding: 70px 0;
}
.modal div.secondary{
    display: block;
    width: 100%;
}
.modal div.secondary button{
    margin: 10px 0 0 0;
}
.modal p{
    font-size: 1.5rem;
}
.modal button{
    width: 100%;
}
.modal .teamOpen{
    height: 40px;
    border: none;
    border-radius: 15px;
    color: #fff;
    font-weight: bold;
    background-color: #f9fafb;
    color: #6c7582;
    text-align: center;
    padding: 10px 15px;
}
.modal .teamOpen > p{
    font-size: 1rem;
    margin: 0 0 10px 0;
}
.modal .teamOpen div div.appendName{
    position: relative;
    display: flex;
    flex-wrap: wrap;
    /* flex-direction: column; */
    justify-content: space-around;
}
.modal .teamOpen div div.appendName p{
    font-size: 1rem;
    width: 30%;
    margin: 10px 0 0 0;
}

.menuBack{
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100dvw;
    height: 100dvh;
    background-color: #0008;
    z-index: 4;
}
.sideMenu{
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100dvh;
    background-color: #fff;
    padding: 20px 0 0 0;
    z-index: 5;
}
.border{
    width: 100%;
    height: 2px;
    background-color: #000;
}
.sideMenu > div{
    margin: 20px 0;
    text-align: center;
    padding: 0 15px;
}
.sideMenu h2{
    height: 30px;
    font-size: 1.2rem;
    padding: 3px 0 0 10px;
}
.sideMenu span{
    display: flex;
    padding: 0 0 0 25px;
}
.sideMenu span.pointChange{
    display: flex;
    justify-content: space-between;
    padding: 0;
}
.sideMenu span button{
    width: 60px;
    color: #fff;
    background-color: #fff;
}
.sideMenu .pointSet{
    font-size: 1.2rem;
    padding: 10px 0 0 0;
}
.sideMenu .playerDel{
    display: flex;
    flex-direction: column;
}
.sideMenu .playerDel div{
    width: 100%;
    height: 50px;
    background-color: #fff;
    border: 1px solid #000;
    border-radius: 9999px;
    margin: 5px 0;
}
.sideMenu .players{
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    align-items: center;
}
.sideMenu .players p{
    padding: 10px 0;
}
.sideMenu .delAll{
    margin: 15px 0 0 0;
}

.dialog{
    display: none;
    position: fixed;
    width: 80%;
    height: 50px;
    top: 10%;
    left: 50%;
    transform: translate(-50%,0%);
    z-index: 999;
    background-color: #0008;
    color: #fff;
    border-radius: 15px;
    text-align: center;
    padding: 13px 0 0 0;
}
.dialog p{
    font-size: 1.2rem;
}

/* タグ-------------- */

button{
    width: 110px;
    height: 40px;
    border: none;
    border-radius: 15px;
    color: #fff;
    background-color: #772ce8;
    font-weight: bold;
    font-size: 1rem;
}
input{
    height: 40px;
    caret-color: #000;
    cursor: text;
    font-weight: bold;
    font-size: 1rem;
}

/* 結果表示 */

.lastResult{
    width: 100%;
    height: 600px;
    background-color: #fff;
}
.lastResult h2{
    width: 100%;
    height: 50px;
    padding: 15px;
    margin: 0 auto;
    text-align: center;
    background-color: #a82bff;
    color: #fff;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}
.lastResult section{
    height: 450px;
    overflow-y: auto;
}
.lastResult > span{
    display: block;
    display: flex;
    justify-content: center;
    margin: 0 0 10px 0;
}
.lastResult > span p{
    /* font-size: 1.5rem; */
    font-weight: bold;
}
.lastResult > span.buttonSpan{
    display: block;
    display: flex;
    justify-content: space-evenly;
    margin: 25px 0;
}
.lastResult > span.buttonSpan button{
    width: 180px;
    border-radius: 5px;
}
.lastResult > span.buttonSpan button.back{
    background-color: #fff;
    border: 1px solid #ddd;
    color: #000;
}
.lastResult div{
    width: 100%;
    height: auto;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 15px;
    border: 2px solid #ddd;
    padding: 0 0 30px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.lastResult table{
    width: 90%;
    height: auto;
    margin: 25px auto 0 auto;
    border-radius: 15px;
}
.lastResult table tr.top{
    /* border: 2px solid #ddd; */
    background-color: #eceef2;
}
.lastResult table tr{
    width: 80%;
    height: 45px;
    border-bottom: 2px solid #ddd;
}
.lastResult table th{
    text-align: center;
    padding: 15px;
}
.lastResult table td{
    text-align: center;
    padding: 15px;
}
.lastResult table td.points{
    text-align: right;
}
.lastResult table td p{
    color: #72e;
}
.lastResult .teamHis{
    overflow-y: auto;
    /* overflow: hidden; */
}
.lastResult .teamHis div{
    /* margin: 15px 0 0 0; */
    height: 350px;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    padding: 5px;
}
.hist{
    margin: 10px 0;
}
.hist > span{
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}
.hist > span span{
    width: 40%;
    box-shadow: none;
    border: none;
    flex-direction: column;
    border-radius: 15px;
    border: 1px #cdcdcd solid;
    padding: 10px;
}
.hist > span .redSide{
    background-color: #FFE3E3;
}
.hist > span .blueSide{
    background-color: #DBEAFE;
}
.hist > span .loseTeam{
    filter: grayscale(100%);
}
/* AI */
.card-wrapper {
    perspective: 1000px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    position: relative;
    padding: 0 15px;
}

.flip-checkbox {
    display: none;
}

.card {
    width: 100%;
    /* height: 100%; 削除 */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s;
    cursor: pointer;
    display: block;
}

/* front は relative → 中身に応じて伸びる */
.card-front {
    position: relative;
}

/* back は absolute → front に重ねる */
.card-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
}

.card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 15px;
}

/* flip */
.flip-checkbox:checked + .card {
    transform: rotateY(180deg);
}

